One liveness-gated snapshot pass per launch, chained after provisioning: gateway.pid pid-liveness + ps scan (skip while the engine runs), 24 h age check, curated recursive copy (credentials and SQLite sidecars in; logs/caches/locks out), atomic temp+rename install, keep last 7. Restore stays manual copy-back in v1 — Help > Open Backup Folder and a RESTORE.md written beside the snapshots. [Generated by AI]
214 lines
41 KiB
Markdown
214 lines
41 KiB
Markdown
# Museion — PRD
|
||
|
||
> **Rung:** PRD (build-ready). Features decomposed into user stories, v1 scope locked, risks enumerated. Ready to build — no open question blocks M0. Matured from PROJECT.md (which carried two stress-tests; both reshapes are applied below).
|
||
|
||
**One-liner:** The Agentic Writing Environment (AWE) — the IDE for long-form writing, where scholars, texts, and AI minds work under a single native macOS roof. Named for the Mouseion of Alexandria: the one place in history where they already did.
|
||
|
||
**v1 (locked):** **The Mentor Loop** — minimal editor surface + one fierce agent + persistent critique memory + library-light (research lands there) + plain markdown + a real publish path. The AWE vision is the destination, not v1.
|
||
|
||
## Fixed facts (decided, not open)
|
||
|
||
- Native SwiftUI macOS app, macOS 26.5+, Swift 6 (ADR-0001)
|
||
- GPL-3.0-or-later (ADR-0002)
|
||
- Forge: Gitea at git.babylondreams.de (ADR-0003)
|
||
- Plain markdown files on disk — no bespoke store. Content is folder-shaped under one Museion Home (ADR-0004): `posts/<post id>/post.md` + `research/` + `assets/` — still plain files, so Obsidian gravity weakens but holds.
|
||
- v1 = the Mentor Loop + library-light; long-form structure, multi-mind, Paper-grade polish deferred to v2+
|
||
- **Engine (G1, resolved):** Museion is the shell; Hermes (Python, NousResearch, MIT) is the engine, driven over **ACP** — spawned as a child process `hermes acp -p museion` (stdio JSON-RPC). **User-installed Hermes** — no app-managed install, no bundled Python. First run gates on `hermes acp --check`.
|
||
- **Profile isolation (G3, this session):** Museion always runs Hermes under the dedicated `museion` profile (`~/.hermes/profiles/museion/` — isolated config, memory, skills, credentials, chat history). Coding learnings and writing learnings never mix. Not configurable in v1.
|
||
- **Provisioning (G3a):** first run creates the `museion` profile if missing, then seeds the writing skills bundled in the app (Serif stack, merged deslop, container personas, demonstrator doctrine, distilled craft canon, drill packs — spec: *The bundled skill set*) into `~/.hermes/profiles/museion/skills/`. Seeding is **additive only** — a bundled skill absent from the profile is copied; an existing one is never overwritten, because the mentor's self-improving skills live there.
|
||
- **Profile backup (G4, amended #15):** Museion snapshots `~/.hermes/profiles/museion/` to `~/Library/Application Support/Museion/Backups/` — timestamped, at most once per day on launch, keeping the last 7, and only when the engine isn't running (liveness gate). The snapshot is a complete copy of what matters (credentials and SQLite sidecars included) with curated exclusions — `logs/`, `cache/`, `audio_cache/`, `image_cache/`, `*.pid`/`*.sock`/`*.lock`, `.DS_Store`, model-cache files — so restore is one Finder copy-back; backups stay user-local, never in the project or git.
|
||
- **Content layout (G5, merged):** one Museion Home; a post is a folder `posts/<post id>/` holding `post.md`, `research/`, `assets/` — created lazily on first write. Further writing types (`essays/`, `stories/`) get the same shape when they arrive; v1 ships `posts/` only. Post id = slug of the draft's first line, computed at first save; explicit Rename moves the folder (the file is always `post.md`); external markdown edits as-is, Import (copy, never move) makes it a Post. ADR-0004.
|
||
- **Writing tools (G6, merged; ADR-0008 + ADR-0006):** the Museion binary doubles as the stdio MCP server `museion-tools`, registered into the profile via `hermes mcp add` once the mode exists (#23) — provisioning never writes `mcp_servers` (#44) — any MCP-capable engine registers it as a client (engine-swap seam — Hermes today, Pi the identified fallback, ADR-0007). Tool surface: `query_learnings`, `submit_fix_cards` — the fix-card tool's argument schema is the fix-card schema; anchors are quote-based (exact substring + occurrence + context), so edits between issue and accept degrade to a loud no-match, never a wrong-span patch. Research stays engine-native; draft stats are computed natively in Swift at capture time — not an agent tool. Pass prompts are Museion-sent minimal stubs (pass name, piece path, tool reminders) — all methodology lives in the profile's skills. The Serif methodology (SKILL.md files, agentskills.io-standard) stays the mentor's operating system. Fallbacks if ACP ever falls short: Hermes gateway JSON-RPC (every feature), HTTP+SSE API server.
|
||
- **Critique memory home (ADR-0005):** writer learnings live in the Home's `learnings/` (no dot — hand-editable, git-diffable), scoped per content type (`learnings/posts/`, …), one markdown file per learning with decay state in frontmatter. The mentor's own automated memory stays in the profile; Museion never reads or writes it. Fresh start in v1 — verified: the hand-maintained MEMORY.md carries agent-tooling notes, no writing learnings to import.
|
||
- **Model/provider:** user-managed by editing the `museion` profile's config (currently `zai/glm-5.3`); Museion never touches it.
|
||
- **Publish (G2, resolved):** Micro.blog via Micropub. Media endpoint accepts PNG (also JPEG, GIF, WebP, SVG, JXL — verified) — ink-sketch illustrations upload as-is.
|
||
- **Build order:** loop-first — bridge spike (M0) before editor polish; the differentiator (critique memory) lands in M3, not last.
|
||
- **Museion Home:** `~/Museion` by default, editable in Settings; repoint-only — Museion never moves content.
|
||
- **Workspace UI design reference (`ref/Web-Prototype/`):** OpenDesign handoff — `museion-workspace.html` is the visual contract for the Mentor Loop workspace (nav rail Posts/Sessions/Learnings/Settings, editor pane, mentor pane with Passes/Chat tabs, fix cards, promote-to-learnings dialog, engine status). Build from its tokens and layout geometry (`DESIGN-HANDOFF.md` + `DESIGN-MANIFEST.json`), not a loose reinterpretation; its web viewport matrix maps to macOS window sizes and pane collapse, not literal breakpoints. Visual contract only — user stories govern behavior and scope; the illustration `ref/` style guides stay author-side and outside app scope (G12).
|
||
|
||
## Problem
|
||
|
||
AI-assisted long-form writing today means a chat window stapled to a notes app. The manuscript, sources, and thinking live in one place; the AI lives in a sidebar with amnesia, built for snippets — not for books, dissertations, or posts. The writer spends effort *feeding context to the tool* instead of writing.
|
||
|
||
And one layer deeper: today's AI tools help writers produce *more text faster* — none makes the *writer* better. The assistant flatters, the writer stagnates. A serious writer doesn't want a ghostwriter; they want a fierce editor and a teacher. Pain is documented: ~58% measured sycophancy across models; authors publicly begging for non-flattering feedback.
|
||
|
||
Why now: LLMs hold book-length context, agentic tooling matured, and local models make a native, private, writer-owned tool possible. Code solved this with IDEs; writing has no equivalent.
|
||
|
||
## Audience
|
||
|
||
- **v1: Alex himself** — scratch-own-itch, the Helm ADE pattern: personal, local-first, GPL, zero audience risk while the category is invented. Dogfood until the loop earns more.
|
||
- **The vertical it proves:** essay/blog writers — unoccupied (roast research: fiction-only competitors, nobody serves essays/blogs). If ever published, that's the wedge: writers who want to get better, not ghostwritten. Decision to publish is post-v1, informed by actual use.
|
||
|
||
## Solution
|
||
|
||
An IDE for writing — the manuscript is the codebase. Three first-class citizens under one native roof: **the text** (long-form structure, à la Scrivener/Ulysses — minimal in v1), **the library** (sources and notes — library-light in v1, so research lands somewhere tangible), and **the minds** (AI agents as residents that see the whole project, edit, critique — and *mentor*: a fierce editor that makes the writer better, not redundant. The Mouseion housed scholars, not scribes).
|
||
|
||
v1 delivers this as the Mentor Loop. The workflow is not hypothetical — it already runs daily: Alex writes and edits posts with his Hermes agent on the `serif-writing` skill stack (three-pillar style DNA — Sanderson/Brown/King —, 24 anti-patterns, banned-vocab tiers, Editor's Knife line fixes, two-pass rule, learning capture), complemented by `ref/fiction-craft` (developmental level: misbelief, introspection, protagonist agency, varied emotional beats) for when fiction arrives. The stack grows per the 2026-08-28 mentor-feel session (session doc under `docs/brainstorming-output/`): two container personas, a master-study demonstrator doctrine, distilled craft canon filling the developmental shelves, drill packs. Museion's v1 job is to **formalize this validated workflow into an app**, not to invent the mentor.
|
||
|
||
## v1 scope lock
|
||
|
||
**In scope:** the seven features below, sequenced M0–M6 (loop-first).
|
||
|
||
**Non-goals (deferred to v2+ or never):** long-form structure tools (binder/compile), multi-mind agents, vault depth (backlinks, graph), native Swift agent loop, app-managed Hermes install/venv, publish targets beyond Micro.blog, platforms beyond macOS, App Store distribution (GPL-3 landmine — struck), session↔Post link machinery, engine-swap transcript migration, AI-draft wizards/templates, mentor image judgment (the author judges illustration style; the mentor never assesses images). Deferred-but-wanted items are collected in *v2 parking lot* below.
|
||
|
||
**Milestones:**
|
||
|
||
| # | Milestone | Ships when |
|
||
|---|---|---|
|
||
| M0 | **Bridge spike** (the slice test on real rails) | SwiftUI app spawns `hermes acp -p museion`, opens a session, sends a prompt, renders the streamed reply in a debug pane. A fix-card-shaped message round-trips. First run provisions the profile (create if missing + seed bundled skills) and takes the first snapshot. Records the engine version in `~/Library/Application Support/Museion/state.json` (surfaced in the gate and About). |
|
||
| M1 | **Editor surface** | The Museion Home opens with its posts listed; posts edit in calm focus mode, autosave to disk — nothing but plain files. |
|
||
| M2 | **Edit passes & fix cards** | Pass 1/Pass 2 runs on the current draft through the bridge; fix cards render; applying a card writes the file under the trust model; the native deslop lint (S3.4) pre-seeds style cards — banned-vocab tiers and em-dash density, computed in Swift, no engine round-trip. |
|
||
| M3 | **Critique memory** — the differentiator | Promote/dismiss/decay works on real posts; every pass consults memory. *This is the milestone that justifies the app.* |
|
||
| M4 | **Measurable improvement** | Stats tracked on unaided first drafts; trend view across drafts. |
|
||
| M5 | **Research & library-light** | Mentor researches mid-pass; findings land as keep/reject candidate source-notes; kept notes feed later passes. |
|
||
| M6 | **Publish** | Draft and publish to Micro.blog via Micropub, illustrations attached with alt text. |
|
||
|
||
M0–M3 is the ~3-month differentiator core; M4–M6 are sheddable in that order if scope pressure returns.
|
||
|
||
### v2 parking lot (deferred, not lost)
|
||
|
||
From the 2026-08-28 sessions (Sudowrite/Muse learnings; issues #9, #10). None of it blocks v1.
|
||
|
||
- **Periodization** — the M4 trend view names the dominant persistent weakness across recent unaided first drafts and surfaces the matching drill from the prompt-pack as the recommended next exercise (game film → drills → periodization).
|
||
- **Per-post context sheet** — the essay Story Bible: thesis, audience, key claims, what this post is *not* (frontmatter + prompt pack).
|
||
- **Fierce↔coach dial, per project** — the fierce end qualitatively different (blunt diagnostic mode), not just tone.
|
||
- **Mentor lenses** — user-buildable critique flavors with context injection ("check only evidence gaps," "critique as a New Yorker editor would"). Ship lenses, not ghostwriters.
|
||
- **Reader-simulation session flavor** — three simulated readers: what landed, where they stopped. Fills the reader-psych shelf with a prompt pack.
|
||
- **Demonstrator-model audition (optional)** — Claude Fable 5 (human-judged #1 on the Hemingway bench; GLM-5.3's nearest register neighbor, stronger emotional depth) and Muse Glimmer 30B (Apache-2.0 open weights, one 24 GB GPU; credible community prose reputation, unlisted on EQ-Bench — audition-tier) vs the `zai/glm-5.3` pin: same draft, same skills, one session each; actors, not authors — the winner executes the doctrine best. Glimmer doubles as a local-engine candidate for the ADR-0007 swap seam (fully-on-device critique story).
|
||
- **Dedicated lint repair model** (GPT-5.6-line) if the lint ever grows a repair loop — curiosity only.
|
||
|
||
## User stories
|
||
|
||
### Editor surface (M1)
|
||
|
||
- **S1.1 — Open the Home.** As the writer, I open the Museion Home and see my Posts listed. *AC:* the list mirrors `posts/`; post folders are created lazily on first write and named from the Title's slug at first save (blank draft → `untitled`; collisions get `-2`, `-3`…); new/rename/delete round-trip to the file system — explicit Rename moves the folder (the file is always `post.md`), delete moves to Trash; external markdown opens and edits as-is; Import (copy, never move) asks Origin once (writer by default) and makes it a Post.
|
||
- **S1.2 — Write in calm.** As the writer, I edit in a distraction-free focus mode, so the tool disappears. *AC:* centered focus mode; autosave to disk; no proprietary store — every state survives closing the app.
|
||
|
||
### Mentor agent over the bridge (M0, M2)
|
||
|
||
- **S2.1 — First-run engine gate & provisioning.** As the writer, Museion tells me on first run whether Hermes is ready (`hermes acp --check`) and how to install it if not; it then provisions its engine. *AC:* explicit pass/fail, no silent failure — the check reruns on every launch, not just the first; the `museion` profile is created if missing; bundled writing skills are seeded additively — missing ones copied, existing ones never overwritten (G3a).
|
||
- **S2.2 — The resident mind.** As the writer, the mentor runs as a resident I don't manage. *AC:* app spawns `hermes acp -p museion` (stdio JSON-RPC child); memory/skills/credentials load from `~/.hermes/profiles/museion/`; app quit tears down the child; child crash surfaces a restart prompt, never data loss.
|
||
- **S2.3 — Session lifecycle.** As the writer, each session is a conversation with the standard affordances. *AC:* new/cancel/fork/resume/compact; every pass auto-creates its session; freeform sessions always allowed, free-floating or Piece-associated; sessions are engine-owned — Museion only UIs them (swap the engine, transcripts stay behind); cancel mid-pass stops the agent; streamed output renders live.
|
||
- **S2.4 — Writing tools, Museion-hosted.** As the mentor, I have purpose-built tools. *AC:* the Museion binary serves them over stdio MCP (`museion-tools`), registered into the `museion` profile via `hermes mcp add` once the mode exists (#23); provisioning never writes `mcp_servers` (#44); surface = `query_learnings` + `submit_fix_cards`, typed and quote-anchored (ADR-0006); callable mid-pass; outputs land in Museion's UI; passes are Museion-driven over ACP; research stays engine-native; draft stats are computed natively in Swift at capture time — not an agent tool; `query_learnings` returns only the visible set — Decay filtering happens inside `museion-tools`, the mentor never sees the mechanics.
|
||
- **S2.5 — Trust model.** As the writer, the mentor acts only within trust levels: auto-act / inform-after / ask-before / never-do. *AC:* trust level maps to UI (dimmed inline edits vs blocking asks); never-do actions never auto-apply. Defaults, not configurable in v1: research fetch = auto-act; candidate source-note = inform-after; apply any fix, promote, keep note, publish = ask-before; delete files, touch anything outside Home and profile, shell, git = never-do.
|
||
- **S2.6 — The engine is backed up.** As the writer, the mentor's accumulated state (memory, skills, history) survives profile corruption or a bad update. *AC:* on launch, if the last snapshot is older than a day and the engine isn't running (liveness gate: gateway.pid pid-liveness + `ps` scan), Museion copies `~/.hermes/profiles/museion/` to a timestamped snapshot under `~/Library/Application Support/Museion/Backups/`, keeping the last 7 (G4); complete copy of what matters — credentials included, logs/caches/locks excluded; a failed backup is one log line, never an alert; restore is manual copy-back in v1 (Help → Open Backup Folder; `RESTORE.md` beside the snapshots); snapshots never land in the project or git.
|
||
- **S2.7 — Draft from session.** As the writer, a freeform session can birth a Post. *AC:* "New Post from Session" creates the piece folder, writes the draft, stamps `origin: ai` (immutable — never stats-eligible); brainstorming is a session started with a brainstorm prompt — no separate machinery; session↔Post association stays by name/convention.
|
||
- **S2.8 — Drill offers at the motivation moment.** As the writer, when a pass exposes a weakness, the mentor may offer a micro-drill targeting exactly that weakness. *AC:* drills are session flavor (bundled prompt-pack skill — see *The bundled skill set*), no machinery beyond S2.3; ≤2 minutes, offered right after the pass finding that motivates it; single-dimension rule — a drill targets exactly one weakness shelf, the pattern the pass just exposed, nothing else; never homework, queues, or streaks; a declined drill vanishes; drills never edit the draft.
|
||
|
||
### Structured edit passes → fix cards (M2)
|
||
|
||
- **S3.1 — Run a pass.** As the writer, I run Pass 1 (paragraph level and up — the skill stack's compose pass) or Pass 2 (line level — its hunt pass) on the current draft as a first-class document state. *AC:* running a pass never destroys text; changes diff against the original — a pre-pass snapshot lands in the post's `passes/` (latest per pass type kept); Pass State advances when the pass completes, not when its cards resolve; passes run in any order — order is the skill stack's to nag about, never the app's to enforce. A pass completes when the engine's turn ends — stream complete, tool calls settled.
|
||
- **S3.2 — Read fix cards.** As the writer, each finding arrives as a card: problem → diagnostic question → fix. *AC:* cards anchor to text spans; applying a card writes the file; the card schema is the critique-memory schema; cards arrive ranked and capped per pass — an attention budget, not an infinite scroll.
|
||
- **S3.3 — Keep my hand on the wheel.** As the writer, I accept or skip each card; ask-before fixes block until answered. *AC:* no batch-apply-all in v1.
|
||
- **S3.4 — Native deslop lint.** As the writer, deterministic style findings arrive as fix cards without an engine round-trip. *AC:* banned-vocab tiers and em-dash density computed in Swift at pass invocation, after First-Draft stats capture (S5.1); findings use the fix-card schema (ADR-0006) and render like any card; same trust model (ask-before apply); the vocab tiers and em-dash budget ship as data, trivially editable without a recompile. Evidence: prompting tops out ~80% style compliance — the last 20% is deterministic-checker territory (three 2026 studies; session doc, model research digest).
|
||
|
||
### Persistent critique memory — the load-bearing feature (M3)
|
||
|
||
- **S4.1 — Promote by confirmation.** As the writer, only my explicit confirmation promotes a fix card into persistent critique memory — never a raw repetition counter. *AC:* one confirm = one entry, carrying the fix-card fields plus provenance.
|
||
- **S4.2 — Dismiss with decay.** As the writer, dismissed patterns fade instead of haunting me. *AC:* a dismissed learning resurfaces after 10 subsequent passes of that content type (output-clock, not calendar); each re-dismiss doubles the interval (10→20→40…); per-learning `resurface_after` frontmatter overrides the base.
|
||
- **S4.3 — The mentor remembers.** As the writer, every future pass consults my critique memory, so recurring weaknesses surface as fix cards. *AC:* stored as plain markdown in the Home's `learnings/posts/` (ADR-0005) — one file per learning (`YYYYMMDD-<pattern-slug>.md`), human-readable, diffable and exportable.
|
||
- **S4.4 — Mine alone.** As the writer, my memory is per-writer and portable. *AC:* lives in the Museion Home as plain files; fresh start in v1 — no legacy import (verified: the hand-maintained MEMORY.md carries agent-tooling notes, no writing learnings).
|
||
|
||
### Measurable improvement (M4)
|
||
|
||
- **S5.1 — Measure the writer, not the text.** As the writer, stats (burstiness, type-token ratio, sentence-length variation, trigram repetition) are computed on **unaided first drafts only**. *AC:* edited text never feeds the trend; first-draft detection is explicit (pass state), not inferred; capture fires at the first pass invocation of any kind, before the engine sees anything — sessions never disqualify a draft, only passes do; only `origin: writer` First Drafts qualify — `origin` (writer|ai) is immutable frontmatter, asked once at Import (writer by default); captured stats live in the `museion:` frontmatter block, so the trend view is a scan of `posts/`.
|
||
- **S5.2 — See the arc.** As the writer, I see per-metric trends across drafts over time. *AC:* the view answers "am I getting better," not "is this draft good."
|
||
|
||
|
||
### Publish path (M6)
|
||
|
||
- **S6.1 — Draft then publish.** As the writer, I send a post to Micro.blog as a draft first, then publish. *AC:* `POST /micropub` with `h=entry`, markdown `content`, `name` for the title, `post-status=draft` → publish; Bearer app-token auth — token in Keychain, entered once; no OAuth in v1; frontmatter `category:` is permitted but inert in v1 (never sent) — v2 fetches existing categories and allows creating new.
|
||
- **S6.2 — Illustrations travel with it.** As the writer, illustrations upload and attach with alt text. *AC:* `q=config` → media-endpoint → multipart PNG upload → `202` + `Location` URL → attached as `photo` with `mp-photo-alt`; publish never sends a photo without alt text — the only floor, style judgment stays with the author.
|
||
|
||
### Research & library-light (M5)
|
||
|
||
- **S8.1 — Research mid-pass.** As the mentor, I can fact-check claims and pull sources mid-edit (web search with citations + page fetch/extraction — Hermes-side tools). *AC:* findings arrive as candidate source-notes with provenance.
|
||
- **S8.2 — Keep or reject.** As the writer, I curate: nothing auto-saves. *AC:* candidates live in their Session until kept — resume brings them back; they are engine-owned cargo, expendable with the engine (ADR-0007); kept notes are plain markdown in the post's `research/` folder; rejected ones vanish — noise never feeds the mentor.
|
||
- **S8.3 — The library feeds the loop.** As the writer, kept notes are consulted as context on every pass. *AC:* the manuscript-is-the-codebase promise holds at v1 depth.
|
||
|
||
## The bundled skill set (the G3a payload)
|
||
|
||
The mentor's mind ships as markdown skills inside the app, seeded additively into `~/.hermes/profiles/museion/skills/` at first run (G3a). Spec'd here so the set can be authored independently of the app milestones — seeding is additive, so skills can land progressively. Folded from the 2026-08-28 mentor-feel session + Sudowrite/Muse learnings (issues #1–#10; docs under `docs/brainstorming-output/`).
|
||
|
||
- **Serif stack — as-is, except the subtractive layer moved to deslop.** The proven daily workflow keeps three-pillar style DNA (Sanderson/Brown/King), Editor's Knife line fixes, and the two-pass rule; its tell catalog, vocab tiers, banned phrases, closers, and statistical signals now live in deslop. Memory and learning capture were deleted from the skill — Hermes owns memory (G13).
|
||
- **fiction-craft — as-is.** Developmental level (misbelief, introspection, protagonist agency, varied emotional beats) for when fiction arrives.
|
||
- **deslop — humanizer + unslop merged into one skill.** One rule set, strongest detection/fix patterns from each source; every pattern survives or is consciously dropped with a reason. Personas and the demonstrator gauntlet reference this one skill. Owns the single subtractive rule set for the bundled skills (31 tells, Tier 1/Tier 2 vocabulary, banned phrases and closers, verb swaps, statistical signals; em-dash policy: minimum, no spaces, 1-2 fine — absorbed from serif-writing).
|
||
- **Pass persona.** Editor-in-Chief 40 · Knife 30 · Coach 10 · Leader 10 · Sparring 8 · Sensei 5 — structural intelligence first, line-level deletion second.
|
||
- **Session persona.** Coach 40 · Knife 30 · Sensei 10 · Sparring 10 · Chief 5 · Leader 0 — pattern-teaching across drafts; answers, not Socratic questions. Both personas: the Knife never leaves the room (anti-sycophancy floor is constant); warm-but-firm by blend arithmetic, not a mood adjective; learnings consulted silently — inform the critique, never nag.
|
||
- **Voice-anchor rule (both personas).** Critique calibrates against the writer's best published prose — a small curated sample, the writer's explicit pick, never auto-collected. Drift is called out as "this isn't how you write openings; yours are better" — a critique baseline, never a copy-target or generation-style input.
|
||
- **Demonstrator doctrine.** Master-study method: demonstrate in a named master's style ("your paragraph, as Brown would pace it"), annotated with what changed and why. Options by default — variants, never a lone rewrite (a single example reads as the answer; variants read as a lesson). Bounded span: ≤ ~100 words, always on the writer's own material — never the piece, never open-ended generation. Every composed example passes the deslop gauntlet before the writer sees it (who deslops the deslopper). The writer's picked variant feeds Learnings (which master voice won). In-bounds per CONTEXT.md: example paragraphs, drafts, corrections — never a one-button final piece.
|
||
- **Micro-drill prompt-pack.** Drill offers ride the motivation moment — triggered by the pass finding that motivates them, ≤2 minutes, single-shelf targets, never homework/queues/streaks, a declined drill vanishes, drills never edit the draft (S2.8). Pattern-targeted examples: five cold openings none of which may contain "I"; rewrite this paragraph as Brown would pace it.
|
||
- **Craft canon (distilled).** 2–3 writing books distilled into diagnostic skills (problem, why it fails, fix — never summaries; fiction-craft is the pattern), one skill per shelf or per book, whichever distills cleaner. Fill the emptiest shelves first — primary: argument & rhetoric, structure for posts/essays, reader psychology, better-words doctrine (word precision beyond kill-lists); secondary: humor & punch, titles & hooks, revision craft. The craft-territory grid doubles as the acquisition checklist — every empty shelf names a book-slot. Distill-first: a writing-book RAG is built only if distillation underdelivers.
|
||
|
||
**Cross-cutting rule — prompt-end constraints:** style constraints (banned vocab, anti-patterns, em-dash budget) sit at/near the *end* of the assembled pass prompt — Claude/GLM are recency-biased followers; top-of-prompt constraints decay by the time the draft arrives. Verify the real `museion` profile's prompt assembly with a real pass; fix the ordering if they land early; document the verified layout.
|
||
|
||
**Done-looks-like:** a sample Pass and a sample Session produce visibly different mentor behavior; neither persona flatters; a worked master-study demonstration passes the gauntlet end-to-end.
|
||
|
||
## Differentiation
|
||
|
||
- **vs Obsidian + Copilot (the status quo to beat):** agent-first and native, not notes-first with an AI plugin. Obsidian is Electron, plugin-grade AI, note-shaped. Museion is manuscript-shaped with AI as a resident — and with *memory of the writer*, which a plugin can't own.
|
||
- **vs Ulysses/Scrivener:** real AI depth — they have none; their structure is the ceiling, ours is the floor.
|
||
- **vs Paper:** Paper has the elegance, not the depth. Museion: Paper's calm, Scrivener's structure, Copilot's mind.
|
||
- **vs AI-writing tools (Sudowrite Story Coach, Fictionary, AutoCrit — $15–30/mo band, fiction-only):** they generate text or coach fiction manuscripts; Museion is an *environment* where the writer's own project is the context, aimed at the unoccupied essay/blog vertical. Fierceness alone is a system prompt — ChatGPT does "be brutal" free; **the discipline apparatus** (manuscript context + memory of recurring weaknesses) is what they can't copy.
|
||
- **The mentor stance (sharpest edge):** every AI writing tool on the market makes the text faster; none is built to make the *writer* better. Uncontested position — a ghostwriter-substitute can never pivot into it without abandoning its product.
|
||
- Category framing ("AWE") is a bet: the IDE analogy makes the product legible, but may need evangelizing before anyone searches for it.
|
||
|
||
## Monetization
|
||
|
||
**v1: $0 — by design.** Personal GPL tool, Helm ADE pattern: local-first, no backend, no accounts, nothing to sell. The only real economics are Alex's spare time — ship-fast is YES for the narrow loop, NO for the IDE shell.
|
||
|
||
**If ever published:** $15–30/mo band (validated by weaker fiction-only competitors). GPL-compatible paths: donations, sponsorship, open-core service. **App Store: struck** (GPL-3 vs App Store TOS is a landmine; roast, Contrarian, upheld).
|
||
|
||
## Edge
|
||
|
||
- **Dogfooding** — v1's user is its builder: fastest feedback loop, zero audience risk while the category is invented.
|
||
- **The Alexandria family** — Classis (ADE) already sails; Museion is the second environment from the same hand, sharing native-SwiftUI craft and a coherent brand story (*Classis sails, Pharos guides, Museion holds knowledge*).
|
||
- **Track record** — Classis and dialysisPal prove Alex ships solo native SwiftUI; Helm ADE proves the personal-local-first environment pattern works for him.
|
||
- **Validated methodology in hand** — the Serif skill stack is a hand-built, battle-tested writing curriculum already producing fierce, non-flattering edits in daily use; Museion productizes Alex's own proven workflow. The writing-domain question is answered.
|
||
|
||
## Risks (build-ready enumeration)
|
||
|
||
1. **Bridge fragility / version drift** — ACP is production-ready (Zed, VS Code, JetBrains ship against it) and `--check` gates first run, but Hermes updates can still move the protocol. *Mitigation:* M0 tests against the actually-installed hermes-agent version and records it; documented fallbacks (gateway JSON-RPC, HTTP+SSE API server) exist if ACP regresses.
|
||
2. **No Swift ACP client SDK** (verified — Python only). *Mitigation:* M0 hand-rolls a thin client — ACP is JSON-RPC over stdio and Museion needs a small surface (initialize, session new/prompt/update, permission request/response, cancel). `ponytail:` hand-rolled thin client; adopt a Swift SDK if one appears.
|
||
3. **Token cost** — passes send draft + library + memory context. *Mitigation:* pass-scoped context assembly; model/provider pinned per profile (Hermes supports per-profile pins); v1 is personal, so the budget is visible, not abstract — cost shown before the pass and kept predictable, never a deterrent to running another one (meter iteration kindly: revision-punishing metering is Sudowrite's #1 churn driver, and iteration is the product).
|
||
4. **Solo-dev scope / enthusiasm half-life** (~6 weeks, per roast Buyer). *Mitigation:* milestone slicing with M0–M3 as the sheddable-tail-free core; M4–M6 shed in order. The re-roast's guard: the narrow loop already grew back once — watch for it again.
|
||
5. **UX smothering fierceness** — friction is the product; polish that hides the critique kills it. *Mitigation:* critique stays visible and sharp in the UI (S3.2/S4 cards are first-class, never toasts).
|
||
6. **Stats validity** — measuring edited output proves the edits, not the writer. *Mitigation:* unaided-first-drafts-only is a hard rule (S5.1), not a setting.
|
||
7. **Profile leakage** — coding learnings contaminating the writing mentor. *Mitigation:* solved by design (G3) — `-p museion` always, not configurable in v1.
|
||
8. **Engine upstream death or drift** — Hermes could stall or turn unfavorable. *Mitigation:* ADR-0007 — Museion owns all durable state, tools run in a Museion-hosted MCP server, and sessions (the only engine-owned state) are expendable; Pi is the identified fallback.
|
||
9. **Carried, personal-v1-moot:** macOS-only · n=1 design risk · category evangelism · Obsidian's gravity (the switch reason, if published, is mentor + memory, not "native and elegant").
|
||
|
||
## Decisions (audit trail)
|
||
|
||
- **G1 — Agent plumbing → Hermes over ACP, native app as the shell.** Decision chain: (1) initial call: native Swift agent-loop port from pi-agent-core — rejected `pi -p` headless for "cruft"; (2) re-roast demolished the cruft premise and flagged the port as the scope-killer; (3) framework fork (Swift+pi / Node / Hermes-Python) resolved: pi was never the writing engine — Hermes is; Node/Electron would surrender the native differentiator; Python can't host the inline-edit trust UX. **PRD resolution (verified this session):** ACP production-ready per Hermes docs (programmatic-integration page); spawn user-installed `hermes acp -p museion` as stdio JSON-RPC child; writing tools Hermes-side as MCP; gateway/API-server fallbacks documented. Native loop port only if the bridge genuinely hurts.
|
||
- **G2 — Publish target → Micro.blog via Micropub.** **PRD resolution (verified):** media endpoint accepts PNG (supported-file-uploads doc) — the JPEG-doc-example worry is closed; flow is `q=config` → media-endpoint → multipart → `202`+`Location` → `photo` + `mp-photo-alt`.
|
||
- **G3 — Dedicated `museion` Hermes profile (this session).** User decision: Hermes profiles isolate config/memory/skills/credentials per profile; Museion always launches `-p museion` so coding and writing learnings never mix. Bot Mode (desktop UI over profiles) confirmed the primitive; `hermes profile create` provisions it.
|
||
- **G3a — Provisioning + skill seeding (this session).** User decision: Museion creates the `museion` profile if missing and copies its bundled writing skills (Serif stack, shipped as app resources) into the profile. Seeding is additive-only so it never clobbers the mentor's self-improved skills — a later Museion version adds new skills, never overwrites old ones.
|
||
- **G4 — Profile backup (this session).** User decision: Museion keeps timestamped snapshots of the whole `museion` profile — the mentor's memory and improved skills are irreplaceable state, not reinstallable. Defaults: daily on launch, last 7 kept, complete copy including credentials (same-machine threat model), restore manual in v1.
|
||
- **Build order → loop-first (this session).** M0 bridge spike before editor polish; differentiator (M3) before conveniences (M5–M6).
|
||
- **G5 — Content layout → one Home, lazy post folders (merged from both grill sessions).** Museion Home (`~/Museion` default, Settings-editable, repoint-only — pi session) with the main session's shape: `posts/<post id>/` holding `post.md`, `research/`, `assets/`, created lazily on first write; post id = slug of the first line at first save; explicit Rename moves the folder; external markdown edits as-is, Import (copy) makes it a Post. New content types copy the shape. ADR-0004.
|
||
- **G6 — Writing tools → in-app Swift MCP server, minimal surface (merged).** Host from the main session (ADR-0008): the binary doubles as `museion-tools`, registered via `hermes mcp add` once the mode exists (#23) — provisioning never writes `mcp_servers` (#44); surface from the pi session: `query_learnings` + `submit_fix_cards` only, typed and quote-anchored (ADR-0006); passes Museion-driven over ACP — the app sends a minimal stub prompt, methodology stays in the skills; stats native in Swift at capture; research engine-native. Model/provider user-managed in the profile config.
|
||
- **G7 — Learnings → the Home, per content type (merged).** `<home>/learnings/<type>/`, one markdown file per learning with decay state in frontmatter (main session) — per-writer, portable, Museion-owned, fresh start with no legacy import (pi session; verified nothing to import). The engine owns nothing. ADR-0005.
|
||
- **G8 — Decay → output clock (merged).** Resurface after 10 passes of that content type (pi session), doubling per re-dismiss; per-learning `resurface_after` frontmatter override (main session).
|
||
- **G9 — Trust defaults (pi session).** Research fetch = auto-act; candidate source-note = inform-after; apply/promote/keep-note/publish = ask-before; delete files, anything outside Home+profile, shell, git = never-do. Not configurable in v1.
|
||
- **G10 — Origin wall & session drafting (pi session).** "New Post from Session" stamps immutable `origin: ai`; only writer-origin First Drafts feed stats; brainstorm = session flavor; sessions engine-owned with resume/compact.
|
||
- **G11 — Publish & model (main session).** Micropub token in Keychain, entered once, no OAuth in v1; model/provider user-managed in the profile config.
|
||
- **G12 — Illustration gate → collapsed (grill session 3).** User decision: the author judges illustration style himself; the mentor never assesses images. M6 deleted, milestones renumbered; illustrations are plain image refs into `assets/`, and the publish floor lives in S6.2 — no photo ships without alt text. The `ref/` style guides stay author-side generation references, outside app scope.
|
||
- **G13 — Mentor feel & the skills ceiling (brainstorm session, 2026-08-28).** Decisions, evidenced in `docs/brainstorming-output/brainstorming-session-2026-08-28-0923.md`: (1) feel = trust that the mentor guards Alex's voice against AI-default register; two container personas — Pass = Editor-in-Chief/Knife (Chief 40/Knife 30), Session = Coach/Knife (Coach 40/Knife 30), warm-but-firm by blend arithmetic; learnings consulted silently, never nagged. (2) The persona exceeds the library: the stack covers ~1/3 of the craft territory and every empty shelf is additive (rhetoric, structure-for-posts, reader-psych, humor, better-words doctrine). Fill by distilling books into skills first; RAG only if distillation underdelivers. (3) The demonstrator role is in-bounds — master-study doctrine (example paragraphs in a named master's style, passed through the mentor's own deslop gauntlet); CONTEXT.md's "never composes" corrected to the real boundary: no one-button publish of mentor prose. (4) Micro-drills in v1 (S2.8) — ride the motivation moment; design for the lazy writer. (5) Native deslop lint in v1 (S3.4) — full style compliance needs a deterministic checker + repair loop, not prompts; style constraints sit at prompt-end (recency bias). (6) Model stays `zai/glm-5.3` — research-validated (EQ Longform 81.8, slop 7.09, Claude-Fable-nearest register); audition actors, not authors; optional later audition: Claude Fable 5 for the demonstrator role. Full spec: *The bundled skill set*; the carrying issues (#1–#10) are folded into this PRD. Sudowrite/Muse learnings add Muse Glimmer 30B as a local-engine candidate (v2 parking lot).
|
||
|
||
## Stress-test verdict № 1 (2026-08-26 — carried from MISSION.md)
|
||
|
||
**RESHAPE** (confidence: high). Five personas, fresh context, model spread. Scores: `Contrarian 3/10 · Expansionist 9/10 · Logician 7/10 · Researcher 7/10 · Buyer 6/10`.
|
||
|
||
Four of five converged: fierceness alone is a system prompt; the defensible product is the *discipline apparatus* — manuscript context, library, and **memory of recurring weaknesses across drafts**. This brief *is* the reshape applied: v1 = the Mentor Loop. Biggest risk: without persistent critique memory, Museion is a wrapper around a prompt Alex already runs. Biggest upside: only writing tool betting on making the *writer* better, in an unoccupied essay/blog vertical. Cheapest test: already run organically — multiple posts edited via Hermes + Serif with hand-maintained learning capture.
|
||
|
||
## Stress-test verdict № 2 (2026-08-26, later — v1 scope re-roast)
|
||
|
||
**RESHAPE** (confidence: high). Scores: `Contrarian 4/10 · Expansionist 8/10 · Logician 5/10 · Researcher 6/10 · Buyer 4/10 → 8 if reshaped`.
|
||
|
||
The thesis held (critique memory has **no shipped competitor**; closest analogues ProWritingAid/Hemingway/Marlowe are static or one-shot; the "make the writer better" pain is externally validated). The **scope did not**: the differentiating work and the riskiest work were disjoint — the agent-loop port was weeks of un-differentiated infrastructure before the feature that justifies the app.
|
||
|
||
Key findings, verified against primary sources: the "cruft" premise was factually wrong; the port was un-priced; ≥4 Swift agent packages already exist; **stats must measure unaided first drafts**; **research must be keep/reject, not auto-save**; **promotion needs writer confirmation + decay, not a raw counter**. All applied above (S5.1, S8.2, S4.1–S4.2).
|
||
|
||
Biggest risk: scope death — revised v1 was a 9–12 month solo build against a ~6-week enthusiasm half-life. Resolution: RESHAPE applied via the framework fork (Hermes over ACP/RPC); the slice test's engine question is now half-answered by architecture, and this PRD's M0 is that test run against Hermes.
|