merge main (3197b927) into fix/external-watch-compares-unnormalized-text (0.1.0 release wave)
CI / ci (push) Canceled after 0s
CI / ci (pull_request) Canceled after 0s

Conflict resolution (keep-both, nothing from either side lost):
- CHANGELOG.md: the branch external-watch entry stays under [Unreleased]
  (unreleased fix, PR #203); the owner 0.1.0 release entries stay in [0.1.0].
- docs/devlog/INDEX.md: union of rows, newest-first — the 2026-12-01 release
  row above the 2026-11-30 external-watch row.

Purity: code dirs carry trunk 3197b927 hunks verbatim (diff-of-diffs cmp clean);
fix code and the branch devlog are byte-identical to reviewed 822b1b5.
This commit is contained in:
AlexKucera committed 2026-12-01 20:19:29 +01:00
commit 07da076f41
15 files changed
+515 -74

No files matched your search

+2
View File
@@ -14,6 +14,7 @@ Owned by the root AGENTS.md contract.
- ADR format follows the domain-modeling skill's `ADR-FORMAT.md`: short title + 1–3 sentences; optional Considered Options / Consequences only when they earn their place.
- `docs/agents/` holds the engineering-skills config (issue tracker, triage labels, domain-docs consumer rules) written by `setup-matt-pocock-skills` — edit directly, no child doc needed.
- `docs/sample-pass.md` is the worked sample Pass demonstrating the craft-canon skills firing as Fix Cards (issues #7, #11, #123, and #58 verification artifacts); card shape follows GLOSSARY.md (lane and emitter fields included), anchors follow ADR-0006.
- `docs/releases/<version>.md` holds the release notes, one file per released version, written for humans: highlights, the milestones it closes, install, known limits. It distills that version's `CHANGELOG.md` section (which stays the entry-by-entry record with issue numbers); the Gitea release body is pasted from it.
## Work Guidance
@@ -31,3 +32,4 @@ Owned by the root AGENTS.md contract.
| `agents/` | Agent-skills config — issue-tracker, triage-label, domain conventions (written by `/setup-matt-pocock-skills`) |
| `brainstorming-output/` | Transient brainstorming session records — working artifacts, not durable decisions; durable outcomes flow into PRD/ADRs |
| `research/` | Verified research artifacts (provider/API factsheets) feeding ADRs — source-cited and probe-dated, not decisions |
| `releases/` | Release notes per version — human-readable distillation of the CHANGELOG section; the Gitea release body |
+1 -1
View File
@@ -9,7 +9,7 @@ Reading mode renders markdown through apex (MIT, unified dialect) as an HTML fra
## Consequences
- **Bundling:** the prebuilt apex binary ships in app resources, signed + notarized. No source build in CI, no user install gate — a renderer must not grow a gate.
- **Bundling:** the prebuilt apex binary (arm64 slice) and a vendored libyaml ship in app resources, Developer ID–signed at commit time (apex with the hardened runtime), apex's rpaths replaced by the single `@executable_path/../Resources`, which resolves in the bundle and in the checkout alike; Xcode copies and seals both as resources untouched. The vendored copy lives in `Resources/libyaml.bundle/` ON PURPOSE: Xcode's synced-folder classifier sniffs Mach-O content and silently adds any bare dylib (extension or not) to the app's link phase; a `.bundle` folder is an opaque resource. apex's release build links libyaml through CI/Homebrew rpaths, so alone it only ever ran on developer machines — reading mode silently fell back to source for everyone else (surfaced by the 0.1.0 notarization, which also rejects an unsigned Mach-O in Resources). Re-sign both when the Developer ID certificate rotates (`codesign -f -s "<identity>" --options runtime --timestamp Resources/apex`; `codesign -f -s "<identity>" --timestamp Resources/libyaml.bundle/libyaml-0.2.dylib`). No source build in CI, no user install gate — a renderer must not grow a gate. Licenses: `Resources/THIRD-PARTY-NOTICES.md`.
- **One WKWebView, reloaded in place.** Remounting per document (`.id(sel)`) was the dominant switch cost — hundreds of ms of web-process respawn; `loadHTMLString` on a retained view feels instant.
- **`--no-mixed-lists` is required**, not tuning: apex's default merges an ordered list following a bullet list into one `<ul>`, killing `1. 1. 1.` auto-renumbering.
- **Early handoff:** stdout EOF is conversion done; apex's ~65 ms teardown is reaped async via `terminationHandler` (the error path still waits for exit status).
@@ -0,0 +1,130 @@
# Release 0.1.0 — version bump, README rewrite, release notes, DMG packaging
> **Date:** 2026-12-01
> **Type:** milestone
> **Reference:** tag `v0.1.0` at `d470615` (local; push + Gitea release pending Alexander's go)
## Goal
Cut the first release: bump to 0.1.0 with a git tag, a DMG shareable on Gitea, a human-readable
release-notes document (CHANGELOG.md is too dense for a release page), and a README with a real
feature list and usage instructions now that the codebase is stable.
## What Was Done
- `Museion.xcodeproj/project.pbxproj`: `MARKETING_VERSION` 1.0 → 0.1.0 on all three targets (six
configs). `CURRENT_PROJECT_VERSION` stays 1. Verified in a real Release archive: Info.plist reads
`0.1.0` / `1`, `LSMinimumSystemVersion` 27.0, binary arm64 only.
- `CHANGELOG.md`: `## [0.1.0] - 2026-12-01` heading over the former Unreleased entries, empty
`[Unreleased]` above, pointer to the release notes.
- `README.md`: rewritten. Intro → features (Writing, Outlines, Library, The Mentor, Measuring
progress, Publishing, Rails) → requirements → install → quick start → shortcut table → the
Museion Home (kept, plus a folder-layout block) → development commands → license. Every feature
line grounded in `MuseionApp.swift` (menus/shortcuts), `Museion/AGENTS.md`, and CHANGELOG entries;
nothing from the PRD's ambitions.
- `docs/releases/0.1.0.md`: the distilled notes — what's in it, the milestones closed (M0–M6 plus
the post-v1 extensions), install, known limits, numbers. This is the Gitea release body.
- `scripts/release.sh`: archive → `-exportArchive` with `method: developer-id` → UDZO DMG
(`diskutil image create from`) → `notarytool --wait` → `stapler staple` → `spctl` assessment.
Preflight refuses before any build when no `Developer ID Application` identity is in the
keychain. `NOTARIZE=0` skips notarize+staple. Output `dist/Museion-<MARKETING_VERSION>.dmg`
(version read from build settings, not from the pbxproj text). `.gitignore` gains `dist/`.
- DOX: root `AGENTS.md` commands block + scripts index row + Stack line (macOS 27+, see gotchas);
`docs/AGENTS.md` Local Contract for `docs/releases/<version>.md` + Child DOX Index row.
- Three commits (`docs(readme)`, `build(release)`, `chore(release)`) and annotated tag `v0.1.0` on
the last.
- **Signing prerequisites (Alexander, this Mac):** Developer ID Application identity created through
developer.apple.com + a Keychain Access CSR (Xcode's Manage Certificates refuses even for the
Account Holder); `notarytool store-credentials museion-notary` registered by Alexander.
- **`scripts/release.sh` hardened by the real runs:** capture `codesign -dvv` before grepping
(pipefail + `grep -q` SIGPIPEs codesign → false "not Developer ID signed"); read notarytool's
status FIELD (`--wait` exits 0 on Invalid; JSON goes to stdout only — no output-path option);
sign the DMG before submitting (Gatekeeper's `spctl -t open` on the image needs it); retry the
staple 6× (ticket can lag "Accepted"); two shipped-layout proofs before notarizing — apex must
run from the export and the app must not link libyaml.
- **Reading renderer made self-contained (`Museion/Resources/`):** `apex` → 1.1.58 (the
bundle had 1.1.17; the official universal release tarball, `.sha256` verified), arm64 slice,
rpaths replaced by the single `@executable_path/../Resources/libyaml.bundle`, Developer ID–signed
with `--options runtime`; `libyaml.bundle/libyaml-0.2.dylib` (0.2.5 from Homebrew's Cellar, install
name `@rpath/libyaml-0.2.dylib`) beside it, same identity; `THIRD-PARTY-NOTICES.md` (both MIT
texts fetched from the source repos). `--no-mixed-lists` still exists in 1.1.58 (ADR-0011's
requirement). ADR-0011's Bundling consequence rewritten; `Museion/AGENTS.md`
reading-mode line; README license pointer; CHANGELOG `**reading:**` entry.
- Final DMG: `dist/Museion-0.1.0.dmg` 3.0 MB — notarization **Accepted**, staple valid, `spctl`:
DMG and the app inside both `accepted, source=Notarized Developer ID`; apex runs from the mounted
DMG with the bundled libyaml.
- Verification: `scripts/full-test.sh` at the tagged commit — 717 executed / 717 passed / 0 failed;
`shellcheck scripts/release.sh` clean; `bash -n` clean; preflight refusal exercised; archive step
ran (38 s); DMG step proven on the dev-signed archive app (3.3 MB UDZO, mounts, signature
verifies inside).
## Decisions & Rationale
| Decision | Rationale |
|----------|-----------|
| No wayfinder map — direct session | The skill's own test: no fog, one session. The only real decision (signing) was a question for Alexander, not a ticket. |
| `v0.1.0` tag with the `v` | The convention Gitea release pages expect; annotated so it carries a message. |
| Tag AFTER the docs commits | The tagged tree must contain the README and release notes it describes. |
| DMG, no zip | Same effort with `diskutil image create`; DMG is what Mac users expect. |
| `docs/releases/<version>.md` over a root `RELEASE_NOTES.md` | Scales per release, lives under the docs contract, reviewable in the commit; the Gitea release body is pasted from it. |
| `archive` + `-exportArchive` (method `developer-id`) over a plain Release build with `CODE_SIGN_IDENTITY` overrides | The Xcode-sanctioned distribution path — identical to Organizer's export, so a GUI fallback matches. Preflight guarantees no portal-side surprise from `-allowProvisioningUpdates`. |
| arm64 only | `MACOSX_DEPLOYMENT_TARGET = 27.0`; macOS 27 does not run on Intel, so a universal binary is dead weight. |
| Developer ID + notarization | Alexander has a Developer ID (not yet on this Mac). Without notarization Gatekeeper still blocks on Sequoia+ regardless of the signing cert, so Developer ID alone buys nothing for the downloader. |
| `diskutil image create from` over `hdiutil create` | hdiutil create is deprecated on macOS 27 (warning on every run); the replacement produced an identical UDZO image. |
| Stale README "macOS 26.5+" → 27+ | pbxproj `MACOSX_DEPLOYMENT_TARGET = 27.0` on all six configs and `Museion/AGENTS.md` already said 27.0; the root Stack line was corrected to match. |
## Gotchas & Fixes
| Problem | Root Cause | Fix |
|---------|------------|-----|
| `codesign -dv` prints no `Authority=` lines — the script's Developer-ID check would have false-failed on the real run | Authority chain needs `-dvv` | `codesign -dvv` in both the check and the diagnostic echo |
| `hdiutil create` warns "deprecated. Please use 'diskutil image create…'" on macOS 27 | Apple moved image creation under diskutil | `diskutil image create from --format UDZO --volumeName … <stage> <dmg>`; kept `hdiutil detach` for the busy-volume guard (not deprecated) |
| `security find-identity -v -p codesigning` showed only `Apple Development` despite Alexander having a Developer ID | A Developer ID private key exists only on the Mac that generated the CSR; the portal copy is useless without it | Preflight names the Xcode path (Settings ▸ Accounts ▸ Manage Certificates ▸ + ▸ Developer ID Application) or a `.p12` import from the other Mac |
| `git log --oneline` hid the merge commit `3bb1782` and read as if HEAD were `cac66f6` | This machine's log config suppresses merges in short logs | Trust `git status --branch` and `git show -s` for ancestry; the snapshot's "ahead 2" was the merge + one chore commit |
| AGENTS.md session-log window was one log stale (11-23 missing) | The 11-23 write-log did not refresh the window | Window rebuilt from INDEX's 10 newest rows |
| Xcode ▸ Manage Certificates ▸ + ▸ Developer ID Application: "This operation can only be performed by the Account Holder" — for the Account Holder | Xcode caches the team role as Admin on Xcode 27.2 / macOS 27.2 (documented by others on the same combo) | Website route: Keychain Access ▸ Certificate Assistant CSR → developer.apple.com ▸ Certificates ▸ + → download `.cer` → `security import` (not `open`, which strands an "Add Certificates" dialog). Script header + refusal message point there now |
| First notarization: `notarytool --wait` passed, `stapler` failed "Record not found" | Submission was **Invalid**, not slow: `--wait` exits 0 on Invalid, so `set -e` walked on | Script reads the status field from `--output-format json` (stdout only) and prints Apple's log on anything but Accepted |
| Apple's log: `Contents/Resources/apex` "does not have the hardened runtime enabled" | Xcode never signs Mach-Os in Resources — the bundled apex was ad-hoc linker-signed | Sign apex at commit time with Developer ID + `--options runtime`; Xcode copies and seals it as a resource |
| Deeper: the bundled apex could never run on a clean Mac | apex's release build links `@rpath/libyaml-0.2.dylib` with rpaths for its CI runner, `/usr/local/lib`, `/opt/homebrew/lib`; macOS ships no libyaml → reading mode silently fell back to source for every non-Homebrew user since #76 | Vendor `libyaml.bundle/libyaml-0.2.dylib` beside apex, same team signature (library validation), one rpath that resolves in bundle AND checkout; proved by removing the dylib ("Library not loaded") and restoring it |
| `Museion/Resources/libyaml-0.2.dylib` → `ld: library 'yaml-0' not found`; and `otool -L Museion` showed `@rpath/libyaml-0.2.dylib` with nothing in Frameworks | Xcode's synced-folder classifier treats a dylib in the folder as the APP's link target — would have shipped an app that can't launch | Extension-less still linked (Xcode sniffs Mach-O content); a `.bundle` folder is an opaque resource → `libyaml.bundle/`. `release.sh` now refuses if the app links libyaml and runs apex from the export |
| `spctl -a -t open … Museion-0.1.0.dmg` → "rejected, source=no usable signature" after a successful notarize+staple | The DMG itself was unsigned; the image-level assessment needs a signature for the ticket to ride | `codesign --timestamp --sign "$SIGNER" "$DMG"` before submitting |
| `lipo … -out` → usage dump | The flag is `-output` | `lipo in -thin arm64 -output out` |
## Files Changed
| File | Change Summary |
|------|---------------|
| `Museion.xcodeproj/project.pbxproj` | `MARKETING_VERSION = 0.1.0` ×6 |
| `CHANGELOG.md` | `[0.1.0] - 2026-12-01` heading + notes pointer |
| `README.md` | Full rewrite: features, requirements, install, quick start, shortcuts, Home layout, development |
| `docs/releases/0.1.0.md` | New — distilled release notes (Gitea release body) |
| `scripts/release.sh` | New — Developer ID export → notarized DMG |
| `.gitignore` | `dist/` |
| `AGENTS.md` | Stack line → macOS 27+; commands block `release.sh`; scripts index row; session-log window |
| `docs/AGENTS.md` | `docs/releases/<version>.md` contract + index row |
| `Museion/Resources/apex` | 1.1.58 (was 1.1.17): arm64 slice, single rpath → `libyaml.bundle`, Developer ID + hardened runtime (committed signed) |
| `Museion/Resources/libyaml.bundle/libyaml-0.2.dylib` | New — vendored libyaml 0.2.5, install name `@rpath/libyaml-0.2.dylib`, Developer ID–signed |
| `Museion/Resources/THIRD-PARTY-NOTICES.md` | New — apex + libyaml MIT notices (ships in the bundle) |
| `docs/adr/0011-apex-html-reading-pipeline.md` | Bundling consequence rewritten (vendoring, signing, `.bundle` rationale, re-sign on cert rotation) |
| `Museion/AGENTS.md` | Reading-mode line: bundled apex facts + `.bundle` rule |
| `README.md` | License section points at the third-party notices |
| `CHANGELOG.md` | `**reading:**` entry under 0.1.0 Fixed |
## Open Items & Next Steps
- [ ] Authorization to commit the reading-renderer fix (`fix(reading): …`), the `release.sh`
hardening (`fix(release): …`), and this log — then move the still-local tag:
`git tag -f v0.1.0 <release commit>` so the tagged tree is the one the DMG was built from.
- [ ] Only on explicit go: `git push origin main v0.1.0`, then the Gitea release with
`dist/Museion-0.1.0.dmg` attached and `docs/releases/0.1.0.md` as the body.
- [ ] When the Developer ID certificate rotates: re-sign both bundled binaries (ADR-0011 has the
one-liners), otherwise notarization fails on the stale team signature.
- [ ] apex upgrades: same recipe (download the universal release tarball, verify `.sha256`, lipo,
rpaths, sign) — ADR-0011. Ask upstream for a statically linked build so the dylib dance
disappears.
- [ ] Pre-existing, not touched: Release build emits `Text +` deprecation warnings in
`TrendsPaneView.swift:389–391`.
---
*Log written by write-log skill*
+1
View File
@@ -5,6 +5,7 @@ Complete history of session logs in this directory, newest first. One-line summa
<!-- write-log: full-index -->
| Date | Type | File | Summary |
|------|------|------|---------|
| 2026-12-01 | milestone | [20261201-release-010-readme-notes-packaging_log.md](20261201-release-010-readme-notes-packaging_log.md) | Release 0.1.0: version bump + tag, README feature/usage rewrite, distilled release notes, release.sh (Developer ID DMG, notarize); rail 717/717; Developer ID cert pending |
| 2026-11-30 | fix | [20261130-external-watch-compares-unnormalized-text_log.md](20261130-external-watch-compares-unnormalized-text_log.md) | Unticketed fix (brief-32, argus cycle-6): the external guest's watch reads through the ONE shared external normalizer — the false #67 conflict on unchanged BOM/CRLF files (re-arming after sibling events and alert answers, blocking departures/quit) is gone; real foreign writes still raise; RED-first 3 pins over the real watch closure; rail 720/720 |
| 2026-11-23 | fix | [20261123-home-repoint-retains-old-editor-target_log.md](20261123-home-repoint-retains-old-editor-target_log.md) | Unticketed fix (brief-28, argus cycle-5): a Home repoint is a guarded document departure — the gate runs before the preference/binding commit, the refusal keeps Home A and the buffers; document identity is (Home, ID) across the model and re-checked at async completion (card scan, rescan — both mutation-checked); RED-first 6/6 at ca265d3b, review r1 +2 pins (rescan hoist, draft survives); rail 717/717 |
| 2026-11-19 | fix | [20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md](20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md) | Quit routes through the departure gate (#200): conflict-held shutdown, BLOCK-QUIT at applicationShouldTerminate, never-loaded-retype guard; finish-audit fixes; rail 708/708 |
+55
View File
@@ -0,0 +1,55 @@
# Museion 0.1.0
*Released 2026-12-01 · the first release. Entry-by-entry detail with issue numbers: [CHANGELOG.md](../../CHANGELOG.md).*
Museion is the Agentic Writing Environment: a native macOS app where your text, your library, and a resident AI mentor work under one roof. It is built for long-form writers who want to get better, not ghostwritten — the mentor critiques, demonstrates, and remembers your recurring weaknesses, and nothing ships without your hand on it.
0.1.0 is the complete v1 loop, three months in the making and dogfooded along the way: write, get critiqued, remember what keeps going wrong, measure whether it stops, publish.
## What is in it
**The Mentor Loop.** A user-installed [Hermes](https://hermes-agent.nousresearch.com/docs) engine runs as a child process under three isolated profiles. **Pass 1** critiques structure, argument, and flow; **Pass 2** works at sentence level. Each pass ends in a verdict and a set of **Fix Cards** — mechanical ones apply behind a sheet that shows the exact edit, one card at a time, never all at once; demonstration ones show a single annotated example on your own text. A native deslop lint lands its findings as cards before the engine even sees the piece. Promote a card into **Learnings** and every later pass consults it; dismiss one and it fades, resurfacing on an output clock. **Sessions** are freeform conversations with resume, fork, and compact; a reply can become a new post. **Blind Read** judges the current text against the pass-start snapshot without knowing which is which.
**A real editor.** A TextKit 2 prose surface with styled markdown source, sub-second autosave, an honest save-state dot, cursor and scroll restored across restarts, and an explicit *Reload / Keep Local* alert when the file changes underneath you — never a silent overwrite. Reading mode, focus mode, image drops that copy into the piece and reference in place, list indentation and folding, and spellcheck on request.
**Cold Turkey.** A writing lock nested inside focus mode: pick net words or minutes, and Museion holds a fullscreen kiosk until you meet the goal. Quitting asks once. Nothing persists.
**Outlines.** Nested-bullet outline pieces with LogSeq-style keys, drag-to-reorder and nest, zoom into a branch, and a one-way Convert to Post.
**A library that is a folder.** Pieces live under projects and fold into an archive, all plain markdown under your **Museion Home** (iCloud Drive by default on fresh installs, `~/Documents/Museion` otherwise; repoint-only, never moved). Grouping by project and Pass State, search across titles and bodies, rename/move/archive/trash from the row menu, and a live file watcher so Finder edits show up without a refresh. Open any `.md` in place as a guest; import `.md` files as posts.
**Measurable improvement.** Running a pass on an unaided first draft captures four style metrics before the mentor sees anything. The Trends pane charts them across captures with an honest *improving / steady / slipping* verdict per metric.
**Publishing.** Micro.blog via Micropub: Send as Draft, review, Publish. Illustrations upload and ride inline; a picture without alt text never ships.
## Milestones
- **M0 — ACP bridge.** The app spawns Hermes, opens a session, streams replies, cancels, and tears down cleanly on quit.
- **M1 — Editor surface.** Posts list over the Home folder, post lifecycle (new, save, rename, trash), the TextKit 2 prose editor with autosave and external-change guard.
- **M2 — Passes and Fix Cards.** Pass 1 / Pass 2, the in-app MCP server that receives cards, the Fix Cards palette with ask-before Apply, the native deslop lint.
- **M3 — Critique memory.** Learnings: promote with one confirm, consult on every pass, dismiss with decay.
- **M4 — Measurable improvement.** First-draft stats capture and the Trends pane.
- **M5 — Research and library-light.** Mid-pass research notes kept into the piece with provenance; drill offers; the bundled skill set (Serif stack, deslop, craft canon, VOICE).
- **M6 — Micropub publish.** Draft → publish to Micro.blog, illustrations included.
- **After v1 scope.** Projects and archive, the outliner, library search, image drops, Cold Turkey, per-surface engines with in-app model settings and Test Connection, Nous Portal, gateless launch, iCloud-default Home, the editorial two-color chrome.
## Install
Download `Museion-0.1.0.dmg` below, open it, drag Museion to Applications.
- **macOS 27 or later**, Apple Silicon.
- **Hermes** is needed for Passes and Sessions — `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash`. Museion provisions the profiles and seeds its skills on the next launch. The editor, library, outlines, and publishing work without it.
- A provider API key (z.ai, Anthropic, OpenAI, or Nous Portal) under Settings ▸ Provider Keys.
The app is Developer ID-signed and notarized.
## Known limits
- Long-form structure tools (binder, compile), backlinks and graph views, multi-mind setups, and publish targets beyond Micro.blog are out of v1 scope — see `PRODUCT.md` for the full non-goal list.
- Convert to Post is one-way. Opening a mixed-content outline asks how to proceed; opening as an outline normalizes on save.
- The Mentor methodology is a bundled skill set, not a trained model — fierce or gentle is a persona blend, not a setting.
- One user so far. No testimonials, customers, or benchmarks exist yet, and none are claimed.
## Numbers
74 Swift files, about 23,000 lines in the app target; a unit suite of over 700 tests, run through `scripts/full-test.sh`; SwiftFormat and SwiftLint clean repo-wide.