Files
museion/CHANGELOG.md
T
AlexKucera 42a27cc8a3
CI / ci (push) Canceled after 0s
feat(settings): sidebar + detail Settings page (#135)
Profiles S2 over the variant C verdict (#130): Settings becomes a
sidebar + detail shell — Content (the #17 Home control, unchanged) ·
Pass 1 · Pass 2 · Chat ('· Sessions' rides it) · Provider Keys. Each
surface page edits its model block in memory: provider menu, an
NSComboBox sourcing hermes' registry cache with first-class free text
(the #132 seed claude-sonnet-5-5 is NOT in the cache — custom is the
default state, pinned), per-provider effort menus led by
'unset · provider default' (zai low/high/max; OpenAI + Anthropic the
five-rung ladder), variant B's current-model headline, and a
user-requested Restore Defaults back to the seed. Provider Keys carries
endpoint, the z.ai key-type toggle swapping the endpoint family
(paas/v4 ↔ coding/paas/v4 — a custom endpoint survives), and masked
keys with reveal; no Keychain (#131).

Persistence is S3's job: every change routes through an injectable
SettingsWriting seam whose implementer contract is frozen now (MUST
debounce — the key field fires per keystroke; secrets via stdin/env,
never argv; error text redacted before it renders). Write failures
surface in an orange strip, cleared by the next success.

Dogfood fix, log-observed via os_log probes on the live app:
comboBoxSelectionDidChange fires BEFORE stringValue updates — the pick
is read from objectValueOfSelectedItem and the box re-synced by hand,
or the model never learns a dropdown pick. Two blind fixes failed
before the probe round settled it; pinned against the stale-string
fixture and filed to the swift wiki.

Finish-audit fanout (ponytail/security/general): Ship/SHIP/APPROVE —
applied the SettingsWriting contract, an inlined one-caller wrapper,
a corrected registry-leniency comment, and a seed-provider pin;
declined deleting the hydration clamp (trust-boundary validation for
S3's config.yaml reads); deferred endpoint scheme validation to S3's
write boundary. Suite: 432 passed / 432 (xcresult-verified). DOX:
Museion/AGENTS.md, MuseionTests/AGENTS.md, CHANGELOG, session log.

Closes #135
2026-10-27 11:52:39 +01:00

67 lines
22 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog
All notable changes to this project will be documented in this file. The format is based on [Common Changelog](https://common-changelog.org) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- **settings:** Profiles S2 — Settings page as sidebar + detail (#130 prototype variant C verdict) — destinations Content (the unchanged Home control) · Pass 1 · Pass 2 · Chat (annotated "· Sessions") · Provider Keys. Each surface page edits its model block over an in-memory model: provider menu, model combobox sourcing Hermes' own registry cache with first-class free text (the seed `claude-sonnet-5-5` reads as *custom (not in registry)* — the default state), per-provider reasoning-effort menu led by "unset · provider default", variant B's current-model headline, and Restore Defaults back to the #132 seed; the Provider Keys page carries endpoint, the z.ai key-type toggle swapping the endpoint family (`/api/paas/v4` ↔ `/api/coding/paas/v4`, custom endpoints survive), and masked keys with reveal. Persistence is S3's — every change routes through an injectable `SettingsWriting` seam whose contract (debounce, secrets never via argv, redacted error text) is frozen now; write failures surface in an orange strip. Dropdown picks commit through `comboBoxSelectionDidChange` reading the selection index — the notification fires before `stringValue` updates (log-observed dogfood fix). Suite 432 (issue #135)
- **profiles:** Profiles S1 — surface registry + provisioning ×3 (PRD #134, ADR-0014) — one gate pass now provisions ALL THREE Hermes profiles: `museion` is adopted in place (never re-created or reconfigured — its model stays the user's), `museion-pass1`/`museion-pass2` are created fresh with the #132 defaults (`claude-sonnet-5-5` on anthropic, reasoning effort unset, 24k output budget as a guardrail) written via the engine's own `hermes -p <profile> config set` rail — wire-verified, marker-gated so a re-pass is a no-op and Settings changes survive, and a failed provision names the profile on the #48 card. Writing skills move to ONE master copy at `~/Library/Application Support/Museion/skills/` symlinked into each profile per the #133 allocation (Pass 1: 9 · Pass 2: 8 · Chat: 10 — the persona pair never co-occurs); today's copy-era dirs migrate to symlinks only on byte-match, diverged dirs stay copies, user skills untouched. Daily backup widens to one stamp carrying all three profiles — any live engine skips the whole stamp; restore docs name the three folders (issue #134)
- **stats:** First-draft stats capture (PRD S5.1) — running Pass 1 or Pass 2 on an unaided draft (writer-origin, First Draft Pass State, post type) computes four style metrics natively in Swift at the invocation — before the mentor sees anything — and stamps `stats_captured` plus four `stats_*` values into the piece's frontmatter, so the coming trend view is a scan of `posts/`; a cancelled pass keeps its capture, re-runs while still First Draft overwrite (latest draft wins), and the frontmatter write paths (pass completion, editor save) now update their keys in place instead of rebuilding the block — captured stats and foreign YAML survive (issue #31)
- **sessions:** New Post from Session & drill offers (PRD S2.7/S2.8) — a freeform Session births a Post: "New Post" in the Sessions pane opens an ask-before sheet prefilled with the session's last mentor reply (editable, G9), and ONE confirm materializes the piece under `projects/posts/` stamped `origin: ai` — immutable frontmatter, never stats-eligible — and opens it in Posts; a failed write keeps the sheet up with the reason inline and the draft intact. "New Brainstorm" is a session started with an opener prompt (session flavor, no new machinery). The freeform composer (input + liveness + Stop) moved into the shared `SessionTranscriptView`, so both session surfaces are conversations; session-born pieces and the resume rail are pinned (issue #30). Resume now speaks the REAL adapter wire: 0.21.5 answers `session/load` with `_meta.hermes.sessionProvenance.acpSessionId` and no top-level `sessionId` — resume accepts both shapes (live-probed; every prior real-engine resume misread as "unknown") (issue #30)
- **mentor:** Research & library-light (PRD S8, G9) — the mentor researches mid-pass and its findings arrive as candidate source-notes with provenance inside their Session: a third museion-tools tool `submit_research_notes` is the typed rail (decode-validate only, replies `{"received": N}`, writes NOTHING — the session is the holding area), candidates ride the transcript as full cards parsed by payload shape (the `notes` array routes before the fix-card parse; titles are display text), and resume re-materializes them for free from the engine's replay (engine-owned cargo, ADR-0007 — dispositions reset honestly). The writer curates in place: Keep opens the ask-before sheet and ONE confirm lands one plain markdown note with provenance (`source`/`kept` frontmatter) into the piece's `research/` — anchored through the one `folder(of:)` id lookup, a symlinked `research/` refuses, collision -2; Reject vanishes, recording nothing. The pass prompt names the rail and forbids the engine writing candidates itself; kept notes flip `hasResearch`, so every later pass consults the library (issue #29)
- **sessions:** Session lifecycle UI (PRD S2.3, ADR-0007) — the mentor bridge hosts multiple engine-owned sessions on one child: per-session transcripts keyed by wire sessionId behind the same-named proxies (every existing caller compiles unchanged), a names-only roster at `~/Library/Application Support/Museion/sessions.json` (0600; id/name/pieceTitle/date — the words stay engine-owned), and the standard affordances over the wire: `session/new`, `session/load` (the engine replays the full history before responding — user turns included), `session/fork`, compact as the `/compress` slash prompt, `session/cancel` as the Stop rail. The Sessions pane replaces its placeholder: roster list (piece-associated by name when Posts has an open piece), row-click resume, Fork · Compact, live streaming with Stop; every pass auto-creates its rostered session ("Pass N · \<title\>") and streams into it; the transcript renderer is shared with the mentor pane. Resume refusals are honest and entry-attributed (an engine-unknown session never fabricates history), concurrent replays refuse instead of interleaving, restart replays from the engine, and the notification hops ride the main queue so the adapter's replay-before-response contract is guaranteed. Finish-audit (three reviewers) surfaced the concurrent-resume race, the dead restart branch, the runPass guard window, the 15 s session/load default, and the missing createSession backstop — all fixed and pinned (issue #28)
- **mentor:** Dismiss & decay for Learnings (PRD S4.2, G8) — dismissed patterns fade instead of haunting: a Dismiss button on every visible Learning in the Learnings pane stamps decay state into the Learning's own frontmatter (`dismissed`, `dismiss_count`, `dismissed_at_pass` — every other line preserved verbatim; hand-editable, git-diffable, survives restarts) and hides it from every pass: `query_learnings` serves only visible learnings. Resurfacing is an output clock, not a calendar — a dismissed Learning returns after 10 subsequent completed passes of its content type (a per-type counter under `<home>/learnings/pass-counts.json`, ticked by every completed pass, re-runs included), each re-dismiss doubles the interval (10 → 20 → 40…), and a per-Learning `resurface_after` frontmatter key overrides the base 10. Dismissed rows dim with a "resurfaces in N passes" countdown and no button until they return; hand-edited decay state reads leniently — garbage means visible, absurd numbers clamp, a hand-edit can never crash the pane or the rail (issue #27)
- **mentor:** Promote & consult Learnings (PRD S4.1/S4.3/S4.4, ADR-0005) — only the writer's explicit confirmation promotes a Fix Card into a Learning: one confirm = one entry, never a repetition counter (the store refuses a second promote of a stamped card). The promote ask on every card row (open or closed — the Learning outlives the card) matches the design contract's dialog (pattern/problem/provenance preview, Cancel/Promote); confirming writes ONE plain markdown file `<home>/learnings/<type>s/YYYYMMDD-<pattern-slug>.md` carrying the card's teaching fields — pattern, problem, diagnostic question, the demonstration example (demonstration lanes only) — plus promotion provenance (flat frontmatter + readable body, `from_card` traceability, collision -2; the instance-bound anchor and mechanical replacement stay on the card — the Learning teaches the symptom/fix, never re-quotes the originating text) and stamps the card `promoted_at` (pre-#26 cards decode nil); every pass consults exactly these files through `query_learnings`, so recurring weaknesses surface as fix cards; the Learnings pane replaces its placeholder — list-only, grouped by content type, newest first, lenient to hand-edits; learnings are hand-editable, git-diffable, per-writer portable files in the Home (dismiss/decay landed in #27) (issue #26)
- **mentor:** Fix Card apply/skip & trust UI (PRD S3.2/S3.3/S2.5) — Fix Cards are actionable: mechanical cards offer Apply behind a blocking ask-before sheet showing the exact edit (anchored quote → replacement, occurrence + context; an empty fix cuts the span) — the only path to a write, one card at a time, no apply-all; the edit lands through the editing session (pending edits flush first, the editor re-seeds, the card closes applied), Skip and Done close the card in place recording nothing, demonstration cards close Done/Skip only (ADR-0006); cards arrive ranked (store-stamped order, `#N` in the meta, open cards first) and capped at ten per submit — the app keeps the ranked head and the wire reply says what dropped; a stale anchor — the Post changed after the card was issued — alerts with no text selected or changed and flags the card (issue #25)
- **mentor:** museion-tools MCP server + Fix Cards (#23, #24 rails) — the app binary grows a headless `--serve-mcp` role speaking NDJSON JSON-RPC on stdio, exposing `query_learnings` (the piece's visible learnings) and `submit_fix_cards` (ADR-0006 cards, anchor-validated against post.md; stale anchors land flagged, never rejected) registered into the museion profile at provisioning; cards persist per-piece under `<piece>/cards/` and surface live in a floating Fix Cards palette (opened from the mentor pass bar, `pass N · lane · emitter` meta when the engine stamps `provenance.pass`); the transcript renders card tool calls as one-line events, the pass verdict references findings by title only (persona v1.3: tools work in silence, the card is the finding's only full statement), and a Debug checkbox (off by default) gates the session/tool chatter writers never wanted
- **skills:** fix-card lanes + card-emitting doctrine (#123, text landings of #118/#119/#121) — every Fix Card declares a lane (mechanical: the whole fix is table-computable and the only lane Apply executes; demonstration: one annotated example, closed Done/Skip) and an emitter (lint | engine; the engine never re-cards a live lint finding); the pass persona emits one ranked `submit_fix_cards` call at pass end, capped at ten, Learnings-resonant first; the Knife floor gains writer-praise immunity; deslop's tables gain the actually/unfortunately filler cuts and the utilize/utilization→use mapping; CONTEXT.md adds the Emitter and Done terms, ADR-0006 the lane/emitter fields, and the sample pass a mechanical-lane exemplar (FC-10)
- **prose:** list shortcuts (v1.2 S5) — when the caret sits on a markdown list line, Tab/⇧Tab indent/outdent the item (wrapped lines ride along, the caret follows), and ⌥↑/⌥↓ move the item with its subtree among siblings; every structural edit is one undo step over the plain text store. List parents fold visually: a gutter chevron collapses the children to a rust `▸` with a `⋯ N` summary after the parent's line — folding is view state and never edits the buffer (issue #115)
- **outline:** Convert to Post (v1.2 S4) — a Convert to Post… command on outline pieces (library row menu, Archive pane included): the piece keeps its name, project, and Pass State while `type` flips to post; at the ask the writer picks the body — Verbatim Bullets (default, keeps every line) or Headings (top-level blocks become section headings, deeper levels step down to the `######` floor, deeper still stays bullets; the ask warns when the ladder would drop paragraph lines between bullets); the open session flushes first and reopens in prose; an outline changed on disk behind the ask aborts the convert rather than dropping unconsented prose; one-way in v1 (issue #114)
- **outline:** drag-reorder + zoom-in (v1.2 S6) — pointer-drag a block run into any sibling seam or onto a block to nest as its child (the block selection rides the drag, a 30/40/30 fat-gap hit test resolves seams vs onto, and a dropped run on an invalid target leaves the document untouched); Esc cancels mid-drag, the moved run becomes the selection; double-click any bullet zooms to its children with breadcrumbs back out, and zoom keeps only fully-visible selections (issue #112)
- **outline:** mixed-content open guard (v1.2 S7) — opening a `type: outline` piece whose body has paragraph lines between bullets (the parse would drop them on the next save) now asks first: Open in Prose (default — everything visible, nothing drops), Open as Outline (explicit consent — saves normalize as before), or Cancel; the ask presents over an empty editor so nothing can edit before the choice, re-clicking the open piece never re-asks, and a draft or guest staged during the ask displaces it cleanly (issue #111)
- **outline:** outliner surface & outline type (v1.1 S3, ADR-0013 per #105 variant B) — File ▸ New Outline ⇧⌘N stages a `type: outline` piece; the outliner is a dedicated block surface: nested bullets with LogSeq-style keys (Tab/⇧Tab indent/outdent, ⌥↑/⌥↓ move subtree, ↑/↓ hop visible blocks, ⇧↑/⇧↓ block-select runs, ⌘↑/⌘↓ fold/unfold, Enter splits at the caret), one live caret row over inert rows, session-scoped folds, and the same debounced autosave / ⌘S / external-change alert as prose; hand-edited files parse leniently and normalize on save (issue #109)
- **library:** projects & archive UI (v1.1 S2, variant B per #104) — the library column groups pieces by project under serif lowercase section heads (collapse toggle, `· N` counts, Pass-State groups inside); Move to Project / Move to Archive / Move Back / whole-project Unarchive as folder moves (post.md bytes untouched, never clobbering, ids globally unique); an Archive rail destination lists archived pieces grouped by project with row-click back to Posts; File ▸ New Post ⌘N and New Project… ⌥⌘N; New Project opens a draft targeted at it, and every folder move flushes pending edits first — a failed write aborts the move with nothing relocated (issue #108)
- **library:** projects & archive storage substrate (v1.1 S1) — pieces live under `projects/<name>/<id>/post.md` with finished work folding into `archive/<name>/` (ADR-0012): the library scans both roots, New Piece and Import land in the selected project (else the default `posts`), slugs stay globally unique across projects and archive so an archived name is never reused, and every piece carries `type: post` frontmatter (absent or unknown types read as post; the file stays `post.md` for every type) (issue #107)
- **editor:** spellcheck posture (#77, Neo triage input) — Edit ▸ Check Spelling While Typing now toggles continuous spell checking in the editor; off by default (markdown on disk carries the spelling, squiggles on request), per-launch with no persistence
- **editor:** M1 editor core (PRD S1.2) — posts open into a native TextKit2 editing surface (ADR-0010 mode B): styled source with scaled headings, paragraph spacing, and dimmed markdown syntax lifted from the proven spike; ~1 s debounced autosave with flush on selection change, window close, and app quit (⌘S stays immediate); an honest save-state dot — Changed while edits pend, Saved when clean, accent on failure (#83); cursor position and scroll restored across restarts via a per-post `.museion-state.json` sidecar that dies with the folder on Trash; and an explicit "File on Disk changed — Reload / Keep Local" alert on external edits, never a silent clobber (issue #19)
- **workspace:** M1 Post lifecycle (PRD S1.1) — Posts are now writable end to end: New Post holds an in-memory draft (no folder until first save), ⌘S lazily materializes `posts/<slug>/post.md` stamped with flat frontmatter (`pass_state: First Draft`, `origin: writer`), the slug is the Title's (lowercased, diacritic-folded, CJK-keeping) form with case-insensitive `-2`/`-3` collision suffixes, Explicit Rename retitles the `# Title` line and moves the folder (file stays `post.md`), and Delete moves the folder to the Trash; a recursive FSEvents watcher keeps the list mirroring `posts/` (external Finder edits included), and a plain-TextEditor stub stands in for the S1.2 editor (issue #18)
- **workspace:** M1 Home & Posts list (PRD S1.1) — the post-gate main surface is now the workspace shell from the design contract: nav rail (Posts, Sessions, Learnings, Settings), a Posts pane that mirrors the Museion Home's `posts/` folder on disk (Pass State groups, origin meta, empty state, lazy folders skipped), a Settings pane where the Home can be repointed (repoint-only — Museion never moves content; NSOpenPanel picker, UserDefaults persistence, default `~/Documents/Museion`), and placeholder panes for Sessions/Learnings until their milestones; the M0 mentor pane becomes the workspace's fourth column (issue #17)
- **backup:** S2.6 daily profile backup — on launch, once per 24 h and only while the engine is idle (gateway.pid liveness + `ps` scan), Museion snapshots `~/.hermes/profiles/museion/` into a timestamped folder under `~/Library/Application Support/Museion/Backups/` (credentials included, logs/caches/locks excluded, last 7 kept); restore is manual Finder copy-back — Help → Open Backup Folder, `RESTORE.md` beside the snapshots (issue #50)
- **acp:** M0 ACP bridge (PRD S2.2) — the app spawns the Hermes engine (`hermes acp -p museion`) as a child process via a hand-rolled NDJSON JSON-RPC stdio client, opens a Session, streams mentor replies live in a debug pane, renders fix-card tool calls as structured cards, cancels turns via Stop, tears the child down on quit, and surfaces an in-pane restart prompt on engine crash — never data loss (issue #14)
- **provisioning:** S2.1 profile provisioning — idempotent per-gate pass creates the `museion` Hermes profile (`hermes profile create --no-alias --no-skills`) and additively seeds the bundled writing skills via `seed-manifest.txt`; existing skills are never overwritten (issue #47)
- **provisioning:** Failure alert & retry UX — provisioning failures show a separate phase-named alert (never re-raising the gate) with the error excerpt behind Technical details; Retry re-runs the whole pass, Not Now defers to the next launch's silent retry (issue #48)
- **gate:** Engine gate (launch gate, PRD S2.1) — discovers the user-installed Hermes engine via the documented six-path probe, health-checks it (`hermes acp --check`), and blocks app launch behind a sheet on every launch: checking/pass/fail cards with install instructions and re-check on fail, engine version in the pass card, About window, and a `state.json` record of every completed check (issue #42)
- Initial project scaffold: Xcode project (SwiftUI, macOS 26.5+, Swift 6), unit + UI smoke tests, GPL-3.0-or-later license, Gitea Actions CI (dormant until a macOS runner registers), DOX agent documentation tree, ADRs 0001–0003 (stack, license, forge).
- **skills:** Pass and Session container persona skills — mentor manner by blend arithmetic (constant Knife floor, silent Learnings, voice anchor)
- **skills:** Demonstrator doctrine skill — master-study demonstrations as named-master variants on the writer's own bounded span, annotated and desloped before display; the picked variant feeds Learnings (issue #3)
- **skills:** Micro-drill prompt-pack skill — two-minute single-shelf drill offers riding the Pass finding that motivates them; declined drills vanish, drill output never touches the draft (issue #8)
- **skills:** Craft canon distilled from the #4 shortlist — rhetoric (Heinrichs: argument and rhetoric, ten cards plus the fallacy index), reader-psychology (Williams: the reader-processing diagnosis sequence), prose-craft (Clark: fifteen generative tools across better-words, structure, humor, revision); a sample Pass demonstrates all three firing as fix cards (issue #7)
- **skills:** Titles-and-hooks craft skill distilled from web sources per the #4 research — the title surface (takeaway over label, bounded numbers, the worn tease, mode fit, person over committee voice) and the hook's curiosity gap (open it, foot it, honor the title–hook contract), every rule data-backed; the sample Pass gains a ninth fix card demonstrating the shelf (issue #11)
### Fixed
- **mentor:** live passes no longer read as crashes — `session/prompt` waits pass-length (1800 s, not the 15 s request default that abandoned working turns with a false "connection lost"), a liveness row shows the engine thinking, Stop stays for the whole turn, and a missing `stopReason` never advances a pass
- **workspace:** doubled View menu — "Toggle Reading Mode" (#68) sat in its own `CommandMenu("View")`, putting a second View menu in the menu bar beside the system one; it now joins the system View menu (`CommandGroup(after: .toolbar)`), ⌘R and behavior unchanged (issue #84)
- **acp:** mentor pane against adapter 0.21.5 — `session/new` now sends the newly required `mcpServers` list (empty: Museion ships none); its absence was rejected as invalid params and wrongly surfaced as "the mentor engine stopped" when the engine was fine. The advisory version-drift note now compares base versions, so build metadata (`0.21.5+2177.g735e426` recorded vs `0.21.5` reported) no longer fabricates a mismatch on every launch; real drift still fires.