Amend ADR-0004's Home clause to the confirmed wording: iCloud
Drive/Museion by default for new Homes (resolved dynamically, never
hard-coded), silent ~/Documents/Museion fallback at first run, no-TCC
creation with consent-on-read for pre-existing iCloud files,
repoint-only. Add the "Your Museion Home" section to the README —
default + fallback, the Settings ▸ Content ▸ Museion Home ▸ Choose…
repoint control, manual migration via Finder move, Keep Downloaded
pinning, iCloud substrate quirks (numbered conflict siblings, dataless
files), and companion workflows (Textastic-class editors, iCloud.com,
iCloud for Windows). Append the default-Home sentence to PRD line 14
per the bundle and clear the now-contradicting ~/Documents/Museion
default claims at PRD lines 26 and 192. Facts cite the #168 factsheet
and the #169 resolution; ADR-0009 and the ADR sequence are untouched.
AGENTS.md carries only the gitnexus index-stats refresh (analyze
churn).
Closes#172
With no stored Home override, launch resolves once and PINS the
winner, so the Home never silently moves: a legacy
~/Documents/Museion directory wins (existing Homes migrate manually,
never silently), else <CloudDocs>/Museion when iCloud Drive is
present (dynamically resolved unprefixed path, plain FileManager —
no ubiquity entitlements, ADR-0009), else the silent Documents
fallback. Repoint-only stands (ADR-0004), zero mover code.
The ladder + probes live in HomeResolution.swift (own file —
MuseionApp.swift stays under the lint line cap); init takes an
injectable probe/defaults seam, and default constructions under
hosted tests take an early return so the runner app's real iCloud
state and defaults are never touched. 9 seam-driven tests replace
the old default-Home pin; implement + finish-audit reviews landed
the legacy-probe dir gate, the non-destructive hosted no-write
guard, and the flip-verified CloudDocs spelling pin.
Suite 628/628 (xcresult executed count). DOX: Museion/AGENTS.md,
MuseionTests/AGENTS.md, GLOSSARY.md; devlog + INDEX + CHANGELOG.
Closes#171
Co-Authored-By: Cipher <cipher@hermes.local>
Logs for the final Cold Turkey wayfinder rounds: #165 (S5.1 tie-in
ruled NO — capture stays pass-gated), #166 (preset chips ruled NO),
and #158 (map closed — frontier empty, build on main, hotkey fog
parked out of scope). INDEX and the AGENTS.md window refreshed.
Work issue #140 closed on the tracker.
Co-Authored-By: Cipher <cipher@hermes.local>
Live HITL block passed all four felt checks including the typing
continuity AC, so the landed build ships as-is. Graduates S5.1 tie-in
(#165) and preset chips (#166) from fog, and refreshes the devlog
index plus the AGENTS.md session-log window. No app code changed.
Wires #161's goal engine and #160's contract into the app: armed
from a corner dot or View ▸ Start Cold Turkey…, enforced by the
macOS app-kiosk (7-option presentation combo + fullscreen, restored
on completion), readout with hairline + near-goal terracotta, and
a completion note fading back into focus. While held: focus exit,
reading, new buffers, ⌘W/⌃⌘F/⌘N refused (key-code-matched monitor
— character matching is layout/Caps-blind; no .closeItem placement
exists), ⌘Q asks once per #163's ruling. Typing continuity holds by
construction — lock ⇒ focus freezes the branch under the editor and
chrome mounts as overlays only. Arm values type directly (1…1000
words / 1…60 min, defaults 250/5). Nothing persists.
Wayfinder map #158 Build S2; suite 620, flip-verified pins.
Wayfinder map #158, Build S1: the pure logic slice the writing
lock consumes — no chrome, no clock of its own.
WritingGoal (words | minutes, one goal per block, fixed at arm)
+ WritingGoalRun: update(text:) takes whole-document text and
netNewWords falls out of the delta (deleting costs — net, not
gross; a big paste counts). now is injected into every call, so
the countdown cannot pause by construction; the minutes deadline
is arm+minutes (inclusive), isMet is live truth, unlatched
(delete below target un-mets — complete on the first true tick),
and progress(now:) is the clamped 0…1 the readout hairline rides.
Word counting goes through the new internal DraftStats.words(in:)
— net-words and first-draft stats share one tokenizer and can
never drift.
Finish-audit fanout: the Int() conversion trap in secondsRemaining
fixed at the seam (isFinite + Double(Int.max).nextDown cap — the
naive cap is itself off-by-one at 2^63; flip-verified pin), two
unpinnable > 0 guards in progress deleted, baselineWords narrowed
to let. Equatable and the ?? armedAt fallback kept deliberately
(S2 consumes the former; removing the latter costs formula
duplication). S2 throttle note landed on #162.
Suite 602/602 (xcresult count), swiftformat + swiftlint clean in
app and test targets. Two traps filed to the swift wiki (bare
@Suite stripped by swiftformat; the Double(Int.max) cap).
Wayfinder map #153, build slice 2 of the #154 contract: the pane's
chrome joins the transcript's editorial voice (#155).
Header per .pane-head — serif-15/600 "Mentor", engine status, mono-10
session chip; ready is the semantic green dot (DesignTokens.readyGreen,
the palette's sole exception) + lowercase mono "ready", base version in
the tooltip, the drift note kept visible. The segmented Pass 1 | Pass 2
| Chat picker is dead (settled #4): PassBarView always carries and owns
the compact text-tab selector (2pt accent underline) over a PASS N ·
STATE status line, the cost line, and the actions as MonoButton —
accent solid / surface+border / accent outline, the danger voice.
Fix-cards row is the ruled plain mono link; crash, missing-engine, and
starting states render as the quiet state-cards.
Finish-audit fanout: security clean; orphaned MARK, stale doc comment,
and a phantom-border comment fixed; pass-selector remount reset and
solid-button contrast parked in the devlog (swift-wiki gotcha #28).
Suite 592/592 (xcresult count), swiftformat + swiftlint clean at the
error tier.
Closes#153
Wayfinder map #153, build slice 1 of the #154 contract: the shared
SessionTranscriptView speaks the two-color editorial voice — speaker
prefixes map onto serif agent prose (markdown at flush, verbatim
streaming), right-aligned terracotta user capsules, and the mono status
box on the fg-wash card; ThinkingBlock port; composer restyle with one
Send/Stop button, floating liveness chip, and the Debug toggle moved to
its trailing edge (Sessions pane inherits the same surface).
Finish-audit fanout hardened it: interpreted markdown opens http(s) only
(openURL gate at the sink — engine prose echoes imported content; pinned
via the pure linkVerdict seam), Caps Lock no longer turns Shift+Return
into a send (pinned), the plain-Button toggles speak state to VoiceOver,
and the dead GeometryReader wrapper is gone.
Suite 584/584 (xcresult count), flip-verified pins, swiftformat +
swiftlint clean at the error tier.
Exactly one #144 devlog row and one log remain: the held branch's
distinct content (raw-tab toolchain gotcha, runner-contention record)
folds into the canonical landing log, the no-unit-test decision row
is superseded by the rework's seam + 7-pin suite, Files Changed gains
the rework rows, and the AGENTS.md catalog entries are held for
consent (session write-protection). No CHANGELOG change — the landed
entry stands.
Wayfinder map #148's terminal slice (decisions #150 architecture,
#149 UX variant A): every launch now opens straight into the
workspace. The engine check (hermes acp --check) runs async from
ContentView.task via AppGateState.startLaunchCheck — provisioning
(x3 profiles) and the daily backup auto-fire the moment it passes
(the gate era's exact onEnginePass chain, moved verbatim; once per
app-launch, first window only, no-op under hosted tests). Nothing
blocks: the blocking gate sheet, the placeholder logo screen,
gateRaised/gateDismissed, EngineGateView, and the
ProvisioningFailureCard sheet are deleted (net -350 lines with the
additions).
Engine state stays visible instead of interrupting: a 44x44 rail
pill above Archive (8pt pulsing accent dot while checking, warning
glyph on an accent-12% wash when failed, nothing at all once
healthy — the slot collapses and the rail spacing closes) and
mono-10 mentor-pane header states (checking... / engine missing /
setup failed / hermes <base> once ready — the BASE version, never
the gate's derived string; session chip renders only once ready).
Failure auto-expands an anchored floating card (340pt, accent
border — floats, never blocks): engine-missing carries #40's
install steps with the gateless correction plus Copy, guide link,
Re-check (disabled-while-checking), stderr + probed path;
provisioning failure rides the same card (failing profile named,
Retry inline). Focus mode recesses the card with the rail. Panes
spawn the engine the moment the check lands (.task(id: binaryPath)
on the nil->value arrival; a nil binary never calls openSession —
that path lands the crash card). state.json semantics unchanged
(About still reads it); #38's no-silent-degradation AC survives,
carried by the pill.
New GatelessLaunchTests pin the seam (hosted-test no-op, chain
armed, pill + mentor-header visibility mappings — flip-verified);
EngineGateTests byte-untouched and green; the dead deferFailure
(#48's Not-Now) deleted with its test. PRD G1 amended; gateless
DOX pass (Museion/AGENTS.md engine section rewritten); CHANGELOG;
devlog. The #149 prototype ships lint-clean.
Verified: full-scheme test 582 passed / 0 failed / 0 skipped
(xcresult executed count, unit + UI), swiftformat lint clean,
swiftlint 0 errors on touched files, finish-audit fanout clean
(ponytail/security/general; 5 fixes applied, header-mapping pins
flip-discriminated and restored).
Closes#151Closes#139
Wayfinder map #56 terminal ticket (decision #57): Sandeep Swadia's
VOICE transcript distilled into the mentor's bundled skill set.
New skill owned-insight v1.0 (Owned + Insightful bound as one —
fingerprints with the Cornell evidence, pseudo-profundity, the
so-what test, the belief-difference frame; insight drill example).
reader-psychology 1.1 gains the retelling-test card (the Pass plays
the source's independent reader); prose-craft 1.1 gains the
Engagement section with the earn-the-next-line card — craft ceiling
in the wording: diagnose absent tension, never manufacture it. Old
card 15 renumbered to 16 (external refs grep-verified absent).
session-persona 1.3 gains the session-only interview-me-first
stance; the verbatim four untouched (load-order pins green).
The sanctioned app-code ride-along: owned-insight joins
allocatedSkills on all three surfaces (P1 10 · P2 9 · Chat 11,
links 27 to 30), ProfileSurfaceTests re-pinned (12-skill fixture).
seed-manifest +owned-insight; sample-pass FC-11 (the engine rail
still carries ten: FC-1..9 + FC-11, lint emits FC-10); PRD G14 in
the bundled-set section; DOX pass; devlog.
Verified: full scheme test 574 passed / 0 failed (xcresult executed
count — manifest-payload correspondence and persona-verbatim pins
in the run), swiftformat clean, swiftlint 0 errors, finish-audit
fanout clean (one LOW docs determiner fixed). Issues #56-#58
already closed on the tracker.
The repo contract "SwiftFormat + SwiftLint must both stay clean" had
five error spots left beyond #146's PostsModel split, all mechanical.
PostStore's enum body spanned 354 against 350 — the cursor-sidecar
group (#66: CursorState + stateURL/readCursor/writeCursor, already its
own MARK section) moves verbatim into a same-file nonisolated
extension slotted chronologically before the #141 ingest MARK; the
enum body lands at 334 and PostStore.CursorState keeps its qualified
name, so no caller changes. Six single-char locals in
ProseListTextView's dropIndex/rectY/isGap get real names (plus lo/hi
in the same function — same violation class), one in ImageIngestTests'
bandedRectY. The 194-char guard in ProseList.indent and the 221-char
guard in OutlineEditorView.endDrag wrap in the house
else-carries-the-brace form (#142 landmine avoided).
PostStoreTests crossed its 1000-line ceiling at 1061 — split at the
Pass substrate MARK per the MicropubModelTests precedent: the
pass-adjacent write sides (#24/#29/#31) move byte-identical into
PostStorePassTests.swift, shared helpers storeHome/readPost/readPiece
stay internal in the original, and the #29 scenario header travels
with its tests. 63 tests in, 63 out.
The split's new parallel schedule exposed two latent test races,
reproduced idle (~50% for the first) and fixed at the root:
EditorSessionTests' sidecar poll inherited loop 1's deadline and timed
out holding flush 1's default-zero sidecar (zeros, never nil — the
telltale) — each loop now arms its own. SessionLifecycleTests' three
stderrTail asserts raced the client's main-queue stderr drain (the #30
class) — a drainStderr bounded poll now precedes each.
swiftlint reports zero errors on both targets; residual warning-tier
notices match the standing #146 posture (the error tier is the bar;
the one new notice is PostStorePassTests at 473/400 — a 1070-line
suite cannot split into two files both under 400). swiftformat clean.
Full suite 574/574 by xcresult executed count (573 unit + 1 UI smoke),
twice consecutively plus the finish-up rerun.
Closes#147
PostsModel.swift had outgrown its lint ceilings — 1127 lines against the
1000 file-length error, class body 361 against 350; both pre-dated the
week and #143 deepened them while naming this split as the follow-up.
The six domain extensions after the class move to their own files,
domain-grouped: PostsModelOutline.swift (mixed-content guard #111 +
Convert to Post #114), PostsModelPasses.swift (pass orchestration #24 +
Blind Read #122), PostsModelCards.swift (stored cards #23 +
apply/skip/done #25 + promote #26, with their support types). The
watcher section (startWatching + rescan) moves to a file-scope
extension so the class body drops to 323 — #111's precedent: same-file
extensions keep private state file-scoped while type_body_length only
counts the class body.
Pure moves, mechanically verified line-for-line: the only edits are the
18 private->internal widenings the cross-file moves force (13
private(set) setters + rescan/dismissExternal/wireSession/
isGuardedOutline/openUnguarded, each doc-noted) and the two
wrapped-condition guards unwrapped per the #142 learning, clause order
preserved. The error ceilings and both opening_brace warnings are gone;
the residual default WARNING-tier notices (708/400 file, 323/250
type-body) match the repo's standing posture — the ticket's own
~700-line landing zone makes the 400 tier unreachable.
Full suite 574/574 by xcresult executed count (573 unit + 1 UI smoke).
Closes#146
The library offered only project/pass-state browsing — no way to find a
piece by content ("which piece was it that talked about X", FEAT-004).
The library column gains a plain-text search field under the Posts
header: a 250 ms-debounced title+body filter over the non-archived
pieces, flat results with title matches first (both halves keep the
scan's Finder order), a mono match count, and the full row context menu
(Rename/Convert/Move/Archive/Trash) on result rows — extracted into one
postRow helper shared with the sections. Body matches go through
PostStore.readBody, so frontmatter never matches (machinery, not
prose). Clearing returns the project sections; state is view-local, so
both render sites (unfocused layout + focus-mode reveal) get the field.
The scan runs as a nonisolated static async helper awaited from
.task(id: trimmedQuery): off MainActor (a nonisolated async function
doesn't inherit the caller's actor) while staying INSIDE the structured
task, so a superseding keystroke or clear actually cancels the sweep
between pieces — the spec's Task.detached shape never received
cancellation (two-reviewer convergence in the finish-audit caught it,
plus the code comment claiming it did), and trimming the task id stops
whitespace-only edits from re-running identical scans.
Deliberately deferred: re-filter on a watcher rescan while a query sits
unchanged (any keystroke refreshes), and a PostScanCache-style body
memo (full-body re-read per sweep — same unbounded-read ceiling as
Post.scan; upgrade path noted in the helper's ponytail comment).
Known pre-existing (unchanged by this diff, proven by stash control):
repo-wide swiftlint exits 2 with 289 violations / 72 serious at HEAD;
this diff adds zero error-severity violations.
Suite 574/574 (xcresult executed count).
Closes#144
Every FSEvents change — each 1 s autosave echo — ran Post.scan over the
whole library: read + frontmatter parse + title per post.md, O(library
bytes) per save cycle while writing, and the posts array was replaced
unconditionally, so every observing pane regrouped and re-rendered even
when nothing changed.
Post.scan now takes an optional PostScanCache (path+mtime+size-keyed
parse memo, nil default — every other caller unchanged): the readdir
walk stays the truth, only changed files are read and re-parsed. The
stamp is captured BEFORE the read and keys the store, so a mid-scan
rewrite can never be pinned as fresh — a late overlapping store keys
its own pre-read stamp and the next scan misses (review-caught race,
pinned by a same-size-rewrite test). rescan skips the posts assignment
when the scan equals the current list; @Observable invalidates on
assignment regardless of equality, so panes stop re-rendering on the
app's own autosave echoes.
Deliberately skipped (measured cold): folder(of:) caching (stat-only
walk) and refreshCards throttling (O(open piece), card surfacing
depends on it).
Closes#143
With a fold open, every keystroke re-scanned the buffer, rebuilt the
full attributed string through setAttributedString (invalidating
TextKit layout for the ENTIRE document — O(n²) typing on folded
documents), and rasterized a chrome image the size of the document
(~35M pixels on a 700×50,000pt doc) to paint a handful of chevrons.
Single-line edits now re-key folds in place: a shouldChangeText
override records the edit (range + UTF-16 delta) and a pure rekey
function shifts surviving folds, kills folds whose marker line was
edited (un-hiding just that scope), and re-hides a line edited inside
a hidden scope — no parents rescan, no storage swap. Structural
edits, multi-line pastes, and wholesale loads keep the full pass; a
font probe at each survivor's scope head falls back to it whenever
hidden styling was wiped (the fence-flip restyle self-heals this way).
Chrome renders as one tiny cached layer per list parent (same glyph
rasters at ~15×18pt, geometry-flipped into the existing document-space
overlay) instead of the document-sized bitmap; an edit at/after every
parent line skips the rebuild outright, so writing at the document end
does zero geometry queries. Full-buffer scans per keystroke drop from
2–3 to one.
Finish-audit hardening: the single-line gate checks Character.isNewline
(a literal newline compare passes CRLF — one grapheme equal to neither
scalar), and apply() clears the recorded edit so structural indent/
outdent always takes the full pass (a childless unterminated block's
shift-tab is a single-line replacement that would otherwise keep a
dead fold's scope hidden — apparent line loss).
Closes#142
Dragging an image onto a saved post's prose editor copies it (never
moves) into the piece's assets/ under a parser-clean slugged name
(collision -2 via the shared uniqueFile helper) and inserts
 at the drop point with alt selected for
type-over — one edit step, one undo.
Routing rides the window-level SwiftUI drop destination, field-verified
to starve every deeper drag destination (nested SwiftUI targets never
fire; AppKit NSDraggingDestination overrides never fire). Pure-markdown
sets keep the open-as-guest behavior; mixed md+image sets refuse loudly
instead of silently dropping the images behind the opened markdown.
The drop point comes from NSEvent.mouseLocation mapped through the one
geometry source that answers under SwiftUI hosting —
firstRect(forCharacterRange:), bottom-up screen coords. Non-contiguous
layout returns zero/stale rects for off-screen characters, so the solve
(a pure static function, pinned by windowless tests) samples the
document, keeps only viewport-band rects, brackets the drop between two
in-band samples, binary-searches the bracket, and slides to the next
whitespace gap — a landing never splices inside a word or an existing
ref. The typewriter inset re-syncs after the edit so scrolling never
freezes. The source gate refuses folders and symlinks alike: copyItem
would land the LINK itself, and the #34 publish rail would then refuse
the whole send. Type gate = the rail's exact set (PNG/JPEG/GIF/WebP/
SVG) — nothing enters assets/ that can't ship. Drafts, outlines, and
guest surfaces refuse loudly.
Finish-audit (three fresh-context reviewers) drove the mixed-set
routing, the symlink refusal, and the pure-function extraction; every
pin flip-verified in one batched cycle. Eleven ingest tests; suite 557.
Closes#141
A piece's assets/ ink-sketch images publish with it: Send as Draft
first uploads every referenced image to Micro.blog's media endpoint
(q=config discovery, one multipart file POST per FILE — duplicate
refs share an upload), then each  ref REWRITES IN
PLACE with its uploaded URL in the wire content. The image renders
exactly where the writer placed it and the alt rides the markdown;
the piece on disk never changes.
The first shape attached uploads as a Micropub photo property with
mp-photo-alt — live dogfood (2026-11-01) showed the theme renders
properties at the bottom of the post, losing position. No property
ships at all now; inline refs are the only transport, which also
makes the parsed body ref the only way an image ships — the alt
floor at the illustration rail is therefore the only gate a photo
needs (G12: a whitespace-empty alt refuses naming the file before
anything touches the wire; the mentor is never consulted).
Pre-flight gates every payload: the endpoint's exact formats
(PNG/JPEG/GIF/WebP/SVG), path containment resolved through symlinks
(a planted link never uploads outside-file bytes under the writer's
token), all-or-nothing uploads. A URL carrying markdown-active
characters rides the angle form  — a plain-paren
destination would close at the first ) and smuggle a live link into
the published post; the frontmatter trust gate does not cover
markdown's grammar.
Finish-audit (three reviewers) drove the angle form, the symlink
containment, the per-file upload dedup, and four pins; all four
behavior guards flip-verified in one batch cycle. Suite 546 passed /
0 failed; swiftformat + swiftlint clean. Ingest UX (drop image onto
the editor) is #141, blocked by this issue.
Two-step publish to Micro.blog over Micropub: Send as Draft (JSON
h=entry create — name = the Title, markdown content verbatim,
post-status draft), review via the preview link, then Publish (the
action=update post-status flip). The piece remembers its draft URL
as a frontmatter micropub_url stamp — in-place, body and foreign
keys byte-identical — so a draft survives a reopen; Send Again
re-drafts after edits. The app token lives in the Keychain (login
keychain; entered once in the sheet, re-offered only on auth
failure — ADR-0014's no-Keychain rule covers only provider keys
hermes reads from .env). Frontmatter category: is permitted but
never sent in v1 — pinned on the wire.
The draft URL is trust-boundary data landing in frontmatter, so
every URL passes a format gate (https + host, no line/control
characters) at BOTH ends: the response decode (Location header →
body url; the preview link is display-only, never the publish
target) and Post.scan's read-back — imported frontmatter rides
verbatim, and a newline--- rider would otherwise close the block
and reparse as attacker markdown in the writer's piece.
Twenty tests pin the wire contract, decode matrix, own-slot keychain
round-trip, stamp/scan, and the model flow (flush-first, refusal
guards, the category AC); all four audit guards are flip-verified.
Full suite 529 passed / 0 failed. Live end-to-end on a real post
(needs the owner's app token) remains open on the ticket.
A Trends pane (rail destination after Learnings — measurement beside
memory): one line chart per style metric (burstiness, type-token ratio,
sentence variation, trigram repetition) across unaided-first-draft
CAPTURES over time. Points are capture moments, never draft grades —
the pane answers "am I getting better," not "is this draft good." Each
card carries a first-to-last read (improving/steady/slipping at ±0.01,
direction inverted for trigram repetition — the one falling-is-better
metric; one capture shows its value with no verdict), an up/down-better
hint, and a one-line plain-language gloss of the term.
The edited-text leak is closed by construction: Post.scan reads the
five stats_* frontmatter keys into firstDraftStats only when every key
parses to a finite double AND the piece carries the capture gate's
immutable pair (origin writer, type post — not pass_state, which
legitimately advances after the capture). Import carries external YAML
verbatim, so imported ai pieces or outlines with hand-stamped keys
never render, while a migrated writer piece keeps its real arc. The
finite gate also kills a deterministic crash: Double("nan") parses, and
a non-finite peak traps the chart's y-domain construction.
The pane rides PostsModel's watched scan — no scan of its own — so it
refreshes with the library. Fixed y-domains keep single captures
visible (sentence variation scales to its peak); offset-keyed chart
identity and a title tie-break make same-second capture twins
deterministic; the empty state names how the data arrives.
Finish-audit (3 reviewers) fixed the nan/inf crash, the import leak,
same-second ordering, and cut the injectable tolerance parameter and a
label-switch enum down to raw values. Suite 508; the non-finite and
read-back-gate pins are flip-verified.
Closes#32
A purposeful writer action on the open post — the "Blind Read" button
beside Run Pass — triggers a whole-document advisory judgment: the
current document against the Pass-start snapshot (the newest
passes/pass-N.md on disk), decided by a FRESH session of the same
museion profile over the existing one-shot ACP rail. Both versions
travel inline in one prompt under neutral A/B position labels with
randomized order — the judge never learns which is the rewrite — and
the A/B-to-origin reveal appends only after the verdict, so the mapping
cannot leak; cancelled, refused, and spawn-failed turns reveal nothing.
Advisory-only per decision #120: no Pass State advance, no cards, no
Learnings, the roster never grows — the verdict is display-only and
dies with the transient transcript. The writer stays judge of record;
demonstrator picks and Fix Card status are untouched. Honest refusals
for the degenerate states: no snapshot yet, an unchanged document, or
a busy rail (passes and reads refuse each other; the pass bar's one
Cancel ends either).
The pass engine's spawn/session/teardown block became one shared
runOneShot rail (failure rows speak the run's own name), the pass-bar
button gates on a derived openPieceHasSnapshot flag, the fake ACP
gained a prompt-log observable, and the GLOSSARY "Blind Read" term
landed with the issue.
Finish-audit (three reviewers): a refusal still ends .ended, so the
reveal now gates on the stopReason (flip-verified pin), plus the
Cancel-rail and pass/blind-read exclusivity pins. Suite 500; swiftformat
clean; swiftlint adds no violations over the HEAD baseline.
Closes#122
PRD S3.4: the deslop doctrine's deterministic findings — banned-vocab
tiers and em-dash density — are now computed in Swift at pass
invocation, one line after the #31 stats capture, with no engine
round-trip. Findings land as real fix cards (emitter lint) through
FixCardStore, so they render in the existing palette with ask-before
Apply on mechanical mapping cards; mapped phrases (the skill's verb
swaps + #31, e.g. utilize→use) case-match their anchor per ADR-0006,
everything else closes Done/Skip. One card per phrase over its tier
allowance, whole-word case-insensitive matching (delved never fires
delve), em-dash density card first when over budget; emit dedups
against OPEN cards so re-runs make progress and the engine never
re-cards a live lint finding.
The tiers ship as data (Resources/deslop-lint.json mirroring the
deslop skill verbatim — key/landscape/highlight/bare-underscore
omitted as POS-ambiguous) with a <home>/deslop-lint.json override
that wins whenever it exists and decodes: trivially editable without
a recompile.
Finish-audit fixes folded in: whitespace-only override phrases can
no longer silently kill a whole submit (the guard mirrors the
store's trimmed validation), and submit now refuses a symlinked
cards/ dir (promote's posture — the lint auto-fires it every Run
Pass). Suite 489; one EditorSession load-flake cleared in isolation
and on the idle re-run.
Closes#6
Both personas gain the verbatim-shared "Draft first, rules last"
section (pass 1.5, session 1.2): the writer's material enters
context before the rule skills, so the deslop constraint tables sit
after the draft, nearest the writing they govern — the PRD's
prompt-end rule. A real ACP audit (the app's exact wire — never
-z: one-shot mode swaps the skills directive and loads nothing)
showed the baseline already read the piece before deslop, but by
model choice; the pin converts observed-once into instructed-
always, and PersonaLoadOrderTests guards presence + verbatim
parity over the bundled payload.
Verified layout, probe traps, and the additive-only propagation
cost are documented in docs/research/prompt-layout-factsheet.md
with the probe script in-repo; real-run verify: piece → persona →
deslop → verdict, 6 fix cards + 2 research candidates landed on
the real rails. Suite 479 + 1 load-flake cleared in isolation.
Closes#1
Profiles S4: passes run on their OWN one-shot engines —
`hermes acp -p museion-passN` spawns per pass run and tears down at
the verdict, so a model switch costs nothing (the next spawn reads
fresh config). The verdict streams into a TRANSIENT unrostered
transcript (#129's ruling: one Sessions surface over the chat
engine; a rostered pass session would be unresumable by the chat
engine). `beginPassSession` died with it — passes never mint
sessions; the #28 roster pins flipped to the transient posture.
The chat engine stays resident (adopted museion profile): a Chat
model change in Settings fires onChatSurfaceWrite after a
successful chat-surface write only, wired to requestRestart —
re-spawn in place when idle (resuming the pre-restart active
session), deferred to turn end while any turn streams (#129).
Missing-key posture (#132): refreshPassReadiness reads both pass
profiles' providers and their .env keys at pane entry; Run Pass
disables naming the provider with an Open Settings link, .unknown
never blocks, and the guard refuses before anything touches disk.
Finish-audit (ponytail/security/general fanout) applied: the
general reviewer's Medium — a session/new/load/fork completing
mid-pass stole the active surface and lost the Cancel to the wrong
engine — fixed with ONE claimActive gate across the post-await
activation writers, pinned deterministically via the fake's
loadReplayHold park + a mode-file flip (flip-verified: guard off
fails on the steal observables and the misrouted-cancel hang).
Also fixed: a spawn-window cancel loss in stopStreaming (keyed on
the transient entry, not the late-arriving wire id), and a
PRE-EXISTING rescan bug where a stale scan snapshot "vanished" a
just-opened piece and killed its session, cancelling the edit
debounce — the vanish-kill now re-checks disk and the watched
home. Ponytail cut ~59 lines of test duplication; the app target's
only force-unwrap is gone.
Suite 477 (was 472): EngineLifecycleTests new (own-engine
end-to-end, held-pass cancel, idle + deferred restart ordering,
readiness, steal pin), +3 Settings hook pins, one duplicate pin
deduplicated. swiftformat clean, swiftlint at HEAD baseline.
Closes#137
Profiles S3 over the S2 shell: every Settings change now persists.
Model/effort writes ride the engine's own CLI — `hermes -p <profile>
config set/unset` for model.provider / model.default /
model.reasoning_effort / model.base_url (zai endpoint family written
LAST: setting model.provider clears a stale base_url, live-probed;
unset-when-absent is idempotent success). Provider keys upsert
VAR=value into ALL THREE profiles' .env — a key entered before any
surface is on its provider still persists and pre-lands for any later
switch (maintainer ruling 2026-10-28; no switch re-fire). 0600,
foreign lines preserved byte-for-byte, line-broken values refused at
the shared sink (env-file injection guard), NSLock serializes the
read-upsert-write across concurrent provider writes.
Hydration reads model blocks and keys back at pane open — a restart
neither blanks the key fields nor refuses Test Connection; an edit
made mid-read owns the truth (no stomp), and a custom z.ai base_url
seeds the endpoint field instead of being clobbered to a family
default. Per-target writes coalesce AND chain past the debounce
guard: cancellation can't stop a past-the-guard CLI write, so the
newer write queues — the last edit is always the last write to land
(finish-audit race fix, pinned).
Test Connection = two-step probe (GET /models, then a minimal
streaming chat) with honest decode per the factsheet: zai 1113 →
wrong key type, 401s → auth failed (Anthropic request_id),
finish=length → starved, empty 200 → request failed, errors riding a
2xx decoded as the provider error.
Live-probed wire corrections (dogfood, 2026-10-28): Content-Type
application/json on every request — URLSession defaults to
form-urlencoded and providers diverge (zai 200+envelope, OpenAI 400,
Anthropic tolerates); OpenAI speaks the Responses API (/responses,
input + max_output_tokens, flagship gpt-6.1-sol); probe token cap 512
(64 starved reasoning models into "no content"); OpenAI's
"error": null event snapshots don't decode as failures.
Finish-audit (ponytail + security + general reviewers): write-ordering
race + .env lost update + hydrate stomp + custom-endpoint clobber
fixed and pinned (one-shot hold / latched read knobs in the test
double); ~30 lines of dead flexibility cut (keyType protocol param,
works(reply:) payload, unused timeout knob, double JSON round trips).
Suite 468/468 xcresult-verified; swiftlint clean; factsheet §6
correction logged. Closes#136
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
Profiles S1 (#134, ADR-0014): one gate pass provisions all three
surface profiles — museion adopted in place (never reconfigured; its
glm-5.3-max stays the user's), museion-pass1/-pass2 created fresh with
the #132 sonnet defaults + 24k budget via the hermes 'config set' CLI
rail, marker-gated so a re-pass is a no-op and Settings changes
survive; a failed provision names the profile on the #48 card.
Skills move to ONE master copy under Application Support, symlinked
per profile per the #133 allocation (P1 9 · P2 8 · Chat 10); copy-era
dirs migrate on byte-match (.DS_Store-tolerant, symlink-refusing),
diverged dirs stay copies, user skills untouched (G3a). Backup widens
to one three-subdir stamp, any-live-skip-all; RESTORE.md names the
three folders.
Two review rounds (standards+spec, then finish-audit ponytail/
security/general) caught and fixed: the dead .DS_Store leniency in
treesByteMatch, exit-code-only config-set trust, the swallowed marker
write (defaults-stomp re-arm), symlink-following in the untrusted
tree, and a fixture-skewed count pin. Suite: 412 passed / 414 (fork
flake green in isolation 16/16; UI launch = pre-existing testmanagerd
flake, failed identically pre-change). DOX: Museion/AGENTS.md,
MuseionTests/AGENTS.md, ref/writing skills/AGENTS.md rewritten.
Closes#134
Verified against official docs and live probes (2026-10-23): z.ai both
endpoint families, Anthropic, OpenAI — /models shapes, streaming and
thinking channels, typed-tool wire formats, budget rules, error decoding.
Corrects two seed traps that no longer reproduce; records the OpenAI
tools×reasoning_effort clash and Anthropic 5.x adaptive-thinking surface.
DOX: index docs/research/ in docs/AGENTS.md.
Measure the writer, not the text. Running Pass 1 or Pass 2 on an
unaided draft (origin: writer, First Draft Pass State, post type -
lenient defaults, so bare legacy posts qualify) computes four style
metrics natively in Swift at the invocation - before the engine sees
anything - and stamps stats_captured plus four stats_* values into
the piece's frontmatter in place, so the S5.2 trend view is a plain
scan of Post.frontmatter. Capture re-fires while still First Draft
(latest draft wins); a cancelled pass keeps its capture; ai-origin
and advanced pieces never qualify.
The capture exposed an erasure class: the existingStamp-to-stamped
block rewrite rebuilt frontmatter from three parsed fields, silently
dropping everything else. advancePassState and overwrite now update
their owned keys in place (stampingFrontmatter, widened internal per
its own third-caller trigger; bare posts still normalize through
stamped), so captured stats and foreign YAML survive pass completion
AND mid-pass editor saves. Both fixes are flip-verified by pins.
DraftStats carries the four metrics (burstiness, type-token ratio,
sentence-length variation, trigram repetition) as a pure Foundation
model - full precision out, %.3f at store time. 16 new pins across
DraftStatsTests, PostStoreTests, and PassRunTests; full unit bundle
396/396 (sequential gate; parallel runs flake under external CPU
load per the #30 learning). Finish-audit fanout (ponytail/security/
review) ran on the diff: its MEDIUM (overwrite erasure) and the
converged deletions landed here.
Closes#31
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); 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. writeNew
gains an origin parameter (additive default .writer, every existing
caller compiles).
"New Brainstorm" is a session started with an opener prompt - no new
machinery (beginBrainstormSession over the normal new+prompt rails).
The freeform composer (input, liveness, Stop) moved from
MentorPaneView into the shared SessionTranscriptView: one
conversation surface, two panes - the Sessions pane stops being a
read-only transcript. Drill offers (S2.8) wire as one pass-persona
section (v1.4): the seeded micro-drill doctrine owns the motivation
moment, the two-minute bound, the single shelf, and the vanish -
session flavor, no machinery beyond S2.3.
Resume now speaks the real adapter wire. Live-probed against the
engine: 0.21.5 answers session/load with the id at
_meta.hermes.sessionProvenance.acpSessionId and NO top-level
sessionId - resumeSession accepts both shapes; every prior
real-engine resume misread as "engine does not know this session".
The fake ACP server answers load in the real shape (a
loadReplayLegacy knob pins the older contract), so the whole resume
suite guards the live wire.
New pins: draft-candidate extraction (last mentor row wins; thought/
card/research/raw lanes and refusal/connection rows never prefill),
ai-stamp write + immutability through overwrite, brainstorm roster +
labeled opener, legacy-shape resume. Finish-audit (three
reviewers, parallel) converged on the confirm() dismissal that
destroyed the edited draft on a failed write - fixed with
sheet-local error state (stale-refusal re-show dies with the
presentation) - and surfaced the missing brainstorm and legacy-shape
pins; the resume fix was flip-verified (removing the provenance
fallback fails the provenance pins). Full suite green (379 tests).
Closes#30
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 (ADR-0006
posture): decode-validate only, reply {"received": N}, write NOTHING
— the session is the holding area, and keeping is the writer's act.
Candidates ride the transcript as first-class rows (researchNote):
parsed from the tool call's rawInput by payload shape — the notes
array routes before the fix-card parse, titles are display text —
one row per note, all-or-nothing per batch, the wire's whitespace
rule mirrored so both boundaries agree. Resume re-materializes them
for free: replays re-run the same parse; dispositions reset honestly
(they were never persisted — engine-owned cargo, ADR-0007).
The writer curates in place (full cards in the shared transcript, no
palette — a handful curates where it lands): Keep opens the
ask-before sheet (G9; PromoteAskSheet posture — inline refusal,
buttons kept) and ONE confirm lands one plain markdown note with
provenance into the piece's research/ via writeResearchNote — the
one folder(of:) id lookup anchors it inside this Home, a symlinked
research/ refuses, collision -2; Reject vanishes, recording nothing.
The pass stub names the rail and forbids the engine writing
candidates itself; kept notes flip hasResearch, so every later pass
sees the research/ path (S8.3 at v1 depth).
Finish-audit (three reviewers) drove the whitespace-parity and
shape-routing fixes, the ResearchNoteContent dedup, and a poll-loop
fix for the debounce rig's sidecar half that the larger suite's load
had pushed past its fixed sleep — full suite green (373 tests).
Closes#29
Each Session is a conversation Museion UIs, never owns. The mentor
bridge hosts multiple engine-owned sessions: per-session transcripts
keyed by wire sessionId behind same-named proxies (every existing
caller compiles unchanged), a names-only roster at Application
Support/sessions.json (0600; id/name/pieceTitle/date — the words
stay engine-owned per ADR-0007), and the standard affordances over
the wire: session/new, session/load, 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
with the engine's full-history replay (user turns included), Fork ·
Compact, live streaming with Stop; every pass auto-creates its
rostered session and streams into it; the transcript renderer is
shared with the mentor pane. Notification hops ride the main queue
(FIFO with the continuation resume) so the adapter's replay-before-
response contract is guaranteed, not probabilistic.
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 rather than trusting
a diverging local copy. 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 (12 lifecycle pins; 359 tests green).
Closes#28
Dismissed patterns fade instead of haunting. Dismissing a Learning
stamps decay state into its own frontmatter (dismissed date,
dismiss_count, dismissed_at_pass — every other line preserved
verbatim, hand-editable, git-diffable) and hides it from every pass:
query_learnings serves only visible learnings. Resurfacing is an
output clock, not a calendar — a per-type counter under
<home>/learnings/pass-counts.json, ticked by every completed pass
(cancels and refusals never advance, so never tick), returns the
Learning after 10 subsequent passes of its content type; each
re-dismiss doubles the interval (10→20→40…), and a per-Learning
resurface_after frontmatter key overrides the base. Hand-edited decay
state reads leniently: garbage means visible, absurd values clamp, a
hand-edit can never trap the pane or the rail. The Learnings pane
rows dismiss (no confirm — low-stakes, self-healing), dim while
hidden with a resurfaces-in-N countdown, and foreign unclocked type
dirs neither offer Dismiss nor show a verdict — their clock can never
advance. Two review waves (two-axis implement review + three-reviewer
finish-audit: security clean) produced five fixes, each pinned or
noted in the session log.
Closes#27
Only the writer's explicit confirmation promotes a Fix Card into a
Learning — one confirm, one entry, never a repetition counter. The
Learning is a plain markdown file under <home>/learnings/<type>s/
carrying the card's teaching fields (pattern, problem, diagnostic
question, the demonstration example) plus promotion provenance; the
instance-bound anchor and mechanical replacement stay on the card.
Every pass consults these files via query_learnings; the Learnings
pane replaces its placeholder. Promote consults the on-disk card as
the truth and rejects symlinked learnings paths before any write
(finish-audit round). Dismiss/decay follows in #27.
Closes#26
The fake ACP engine's hangOnPrompt mode slept oblivious to
session/cancel, so a cancelled turn was only observable through
teardown and the pass bar's Cancel rail was never individually
discriminated. hangOnPrompt now holds the turn reading: session/cancel
answers the hanging prompt with stopReason "cancelled" (the real
engine's contract); stdin EOF without a cancel answers end_turn so
the child exits.
New pin 'cancelling a held pass ends the turn cancelled with no
advance' (RED->GREEN; bounded polls, so an emptied cancelPass fails
the pin instead of hanging the suite). Every fake-spawning test (27
rigs across ACPClientTests + PassRunTests) tears down via defer at
rig creation — a cancelled or interrupted test cannot leak the child;
trailing happy-path teardowns removed, mechanism/bound teardowns kept
and commented. Harness docs updated to match; 316 tests green.
Closes#124
Fix Cards become actionable. Mechanical cards offer Apply behind a
blocking ask-before sheet showing the exact edit (anchored quote ->
replacement, occurrence + context; empty fix cuts); the sheet is 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 via adoptText, 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, scan-ordered, open-first palette) and capped at ten
per submit — the app keeps the ranked head and the wire reply
discloses the drop. Stale anchors re-validate at apply: no text
selected or changed, the card flags itself. Includes the
finish-audit round (11 fixes, 2 flip-verified pins); 316 tests
green.
Closes#25
The pass rails landed in 683ddf8 left guards #1-3 and the pass bar's
Cancel rail without direct coverage. Three new tests over the fake ACP
path: a second runPass while one streams refuses "already running" and
cancelPass ends the held turn (state stays First Draft), a pass
mid-mentor-reply refuses before the snapshot lands, and a pass against
a never-opened engine refuses "isn't ready". Every guard in
PostsModel.runPass now has a flip-verified pin (299 tests green).
Finish-audit fanout over the delta: the three whole-tree enumerator
walks became fileExists one-liners at the deterministic path (same
discrimination, suite convention); two Info findings deferred with
landing spots in the session log.
Closes#24
Headless --serve-mcp role in the app binary: NDJSON JSON-RPC on stdio
exposing query_learnings and submit_fix_cards (ADR-0006 cards,
anchor-validated; stale lands flagged, never rejected), registered
into the museion profile at provisioning. Cards persist per piece
under <piece>/cards/ and surface in a floating Fix Cards palette
with pass-stamped provenance.
Live dogfood drove the shape: session/prompt waits pass length (the
15 s request default abandoned working turns), a liveness row and a
persisted Debug checkbox (off) split writing sessions from debug
chatter, the verdict references findings by title only while the
cards carry the detail (persona v1.3 — tools work in silence), and
the #24 pass rails (pass bar, TurnOutcome seam, snapshots) ride in.
Three-reviewer audit round: piece-path shape guard closes the
JSON-drop and substring-oracle holes, nested submit rawInput parsing
(the flat parser never matched the live rail), missing stopReason
never advances a pass, 1 MB stdin cap, card scan off MainActor.
296 tests green; every behavioral fix flip-verified.
Closes#23
Land the #118/#119/#121 post-map decisions into the mentor's
files: every Fix Card declares a lane (mechanical | demonstration)
and an emitter (lint | engine); the pass persona emits one ranked
submit_fix_cards call at pass end, capped at ten and deduped
against live lint findings; the Knife floor ignores writer praise;
deslop's tables close the actually/unfortunately gap and map
utilize/utilization to use; the sample pass gains the mechanical
exemplar FC-10.
Closes#123
Markdown lists in the prose editor become structural: Tab/⇧Tab
indent/outdent the item under the caret (wrapped lines ride along,
caret follows), ⌥↑/⌥↓ move the item with its subtree among siblings.
Every structural edit is one range replacement — a single undo step
over the plain mode-B store (ADR-0010 stands).
List parents fold visually: a gutter chevron collapses children to
near-zero height with a rust ▸ and a "⋯ N" summary after the parent's
line. Folding is view state — the buffer never changes (ADR-0013's
posture carried to prose).
Field findings baked in: SwiftUI-hosted TextKit2 never calls
NSTextView.draw(_:) and every NSTextLayoutManager fragment query
returns empty, so the chrome renders offscreen into a layer-contents
image and geometry comes from firstRect(forCharacterRange:) (screen →
window → view). Includes the finish-audit round: sibling block-for-
block ⌥-move swap (was stealing the sibling's subtree), blank-line
indent dirt, fold-key dedupe, hidden-parent chevron filtering,
plain-click-only hit zone, no-parents raster skip.
Closes#115
[Generated by AI]
In-place outline→post conversion on the piece: id, folder, Pass
State, origin kept, type frontmatter flips to post, body transforms
once. The ask picks the transform — Verbatim Bullets (default,
lossless) or Headings ladder (roots ##, stepping to the ###### floor,
deeper stays bullets), with a warning when the ladder would drop
paragraph lines between bullets.
The open session flushes first, then reopens routed to prose via
proseOverridePostID (lastDraftWasOutline's machinery reversed).
An outline that went lossy on disk behind an unwarned ask aborts
the convert; an unanswered #67 conflict aborts every flush-first
op (shared flushOrAbort seam); rescan no longer hands a same-id
reopened session its predecessor's stale disk text; a held #111
guard ask dies with the outline it pointed at.
Audit round (finish-audit, three reviewers) included: 13 new pins,
206 tests green, pin discrimination verified. Record:
docs/devlog/20261016-issue114-convert-to-post_log.md
Pointer drag of a block run into any sibling seam or onto a block to
nest as its child (wf113 variant A: fat-gap 30/40/30 bands, seam
line at the future bullet column); the block selection rides the
drag, the moved run becomes the selection, and Esc cancels mid-gesture.
Double-click any bullet zooms to its children with breadcrumbs back
out. New OutlineTree extract/insertRun splice subtrees id-preserving;
the live row's NSTextView moved to OutlineRowTextView.
Audit round: the gesture is self-contained from arm time (strong
window + callback captures — a mid-drag scroll that drops the origin
row cannot strand drag state), a second arming cancels a stuck
predecessor, rowFrames prefers the grip frame, hitTestDrop is y-up
only, and the rails read DropGeometry. Pinned in OutlineDragTests
(monitors fire on sendEvent with a real window number).
[Generated by AI]
Opening a type: outline piece whose body parses with dropped prose
(paragraph lines between bullets) now asks before the outliner mounts:
Open in Prose (default, nothing drops), Open as Outline (explicit
consent to save normalization), or Cancel. The detector shares the
parser's item definition, the ask presents over an empty editor so
nothing can normalize on save before the choice, and the prose answer
rides a routing override that dies with the next open.
Audit round pinned the lifecycle: reselect of the open piece is a
no-op (an armed debounce must never flush mid-ask), and a draft or
guest staged during the ask displaces it without being destroyed.
Closes#111
[Generated by AI]
Dedicated block surface (ADR-0013, #105 variant B): OutlineTree
parses/serializes plain nested-bullet markdown leniently and
normalizes on save; the outliner promotes one NSTextView over the
focused row with LogSeq-style keys (Tab/⇧Tab, ⌥↑/⌥↓ subtree move,
↑/↓ hop, ⇧↑/⇧↓ block selection, ⌘↑/⌥↓ fold, Enter split), folds
session-scoped by runtime node UUID. New Outline ⇧⌘N stages a
type: outline draft through the existing autosave/conflict
machinery; reading renders the serialized markdown unchanged.
Outline rows use the body face at its natural line box — the prose
CSS-1.8 lineHeightMultiple grew the focused row and detached the
bullet (test-pinned). Finish-audit fixes included: paste-multiline
sanitizing at setText, dead Enter disjunct, dead Row.path.
Closes#109
Variant B per the #104 prototype verdict: the library column groups
pieces by project (serif lowercase heads, collapse toggle, Pass-State
groups inside, 2px edge-bar selection shared with the new Archive
pane via LibraryPostRow). Move to Project / Archive / Move Back /
whole-project Unarchive are folder moves — post.md bytes untouched,
never clobbering, ids globally unique. File ▸ New Post ⌘N and New
Project… ⌥⌘N (CommandGroup, never CommandMenu per #84).
Every folder move flushes pending edits first and aborts when the
write failed — nothing moves without its text. Project membership and
the archived-refusal derive from freshly resolved disk paths, never
the scan snapshot. Slug and project-name comparisons fold through one
canonical key (NFC + lowercase). Two reviewer fanouts this session;
their findings are all fixed or visibly parked.
144/144 tests green (run twice), swiftformat/swiftlint clean.
Closes#108
Pieces re-root from posts/<id>/ to projects/<name>/<id>/ with an
archive/ twin root (ADR-0012): scan walks both levels, New Piece and
Import land in the selected project else the default posts, the slug
namespace is global across projects and archive (an archived slug is
never reused), and every piece carries type: post frontmatter —
stamped by New/Import, read leniently (absent or unknown reads as
post), the file stays post.md for every content type. Write paths
resolve the folder from the id alone (folder(of:)); sessions and
sidecars never thread (project, id).
Finish-audit hardening: duplicate ids on disk (Finder copy) dedupe in
scan to the same first-match folder(of:) writes to; folder(of:) skips
hidden/symlinked projects like scan does.
Dev posts moved by hand to projects/posts/ — no migration machinery,
the app never reads the old posts/ root (#103). Full suite green
(128 unit + UI), swiftlint clean on changed files.
Closes#107
CONTEXT.md: Project, Outline, Archive adopted; Content Type rewritten
as frontmatter attribute; Post ID global across projects.
ADR-0012 (amends 0004), ADR-0013 (specializes 0010).
Wayfinder map #97 — spec assembly ticket #106.
External .md/.markdown opens and edits as-is in a single guest slot
(File > Open... Cmd+O, drag-onto-window): SessionTarget extends
EditorSession to write in place verbatim, no cursor sidecar, the #67
conflict alert reused for foreign files. Import... (Shift+Cmd+O)
copies multi-select files in as Posts behind ONE Origin ask
(writer default, immutable); external frontmatter keys ride verbatim
with pass_state/origin set; slug/collision machinery shared with
writeNew.
Audit fixes folded in: BOM stripped + CRLF normalized at the trust
boundary (a CRLF pair is one Swift grapheme — \n splits saw one
line); unreadable files refuse to open (loadFailed — a failed read
never becomes a write); dropped web links and severed symlinks
guarded; ~24 lines of reviewer-flagged dead weight removed.
7 new tests; full unit + UI suite green; swiftlint clean.
Map #22 stays open pending the live calibration pass (#88 posture).