M1: Post lifecycle (S1.1) #18

Closed
opened 2026-08-28 18:33:06 +02:00 by AlexKucera · 0 comments
Owner

Destination

Every decision the #18 build needs is made — first-save frontmatter contract, rename semantics, refresh model, New Post backing — so a build session can implement the acceptance criteria below without deciding anything.

Notes

  • Plan-don't-do: this map produces decisions, not deliverables (Engine-gate pattern, like #12). Execution stays with the build session.
  • Consult: CONTEXT.md (Post, Post ID, Title, Origin, Pass State), PRD.md S1.1, ADR-0004 (folder-shaped content), ADR-0010 (TextKit2 editor), #17 devlog (the read-side contract this builds on).
  • All four tickets were resolved live at charting time (the grilling happened in the charting session); they are closed and hold the detail.
  • Tracker ops: docs/agents/issue-tracker.md (Wayfinding operations).

Decisions so far

  • Grilling: first-save frontmatter contract — first save always stamps flat pass_state: First Draft + origin: writer (the keys the #17 reader already parses); bare posts normalize on save; origin immutable after stamping; museion: block reserved for #31, not written yet.
  • Grilling: Explicit Rename = retitle + move — dialog asks the new Title, rewrites/inserts the # Title line, moves the folder to the new slug (file stays post.md); plain-text title edits never move the folder; shared slug function (lowercase, diacritic-fold, strip punctuation, whitespace→hyphens, keep CJK, ~80-char cap); collisions -2, -3… case-insensitive.
  • Grilling: Posts-list refresh model — FSEvents watcher on posts/, ~0.5 s debounced rescan reusing Post.scan(home:) off-main; own ops route through the same rescan; watcher runs while the workspace is open.
  • Grilling: New Post backing editor — plain TextEditor stub in the existing placeholder slot; ⌘S triggers the first write (lazy folder, slug, frontmatter stamp); New Post selects a fresh in-memory draft, no folder; #19's TextKit2 editor replaces the stub in place — the lifecycle machinery lives below the view and survives the swap.

Not yet specified

Map complete: every child closed, no fog left — the Post lifecycle is fully specified; a build session can implement the acceptance criteria below without deciding anything.

Out of scope

  • Import & external markdown — #22 (consumes the #59 contract, asks Origin once).
  • Editor core, markdown presentation, focus mode — #19–21 (the stub is throwaway at the view layer).
  • Pass State advancement UI — M2 (#24): #18 writes First Draft only.
  • museion: stats block — #31 (S5.1); shape reserved, not written.
  • New Post from Session — #30 (S2.7), builds on this machinery later.

Original acceptance criteria (PRD S1.1, lifecycle slice)

  • Post folder created lazily on first write, not on New Post
  • Post ID = Title slug at first save; untitled fallback; collision suffixes -2, -3…
  • Explicit Rename moves the folder; the file remains post.md
  • Delete moves to Trash (recoverable), not permanent removal
  • New/rename/delete verifiable in Finder immediately

[Generated by AI]

## Destination Every decision the #18 build needs is made — first-save frontmatter contract, rename semantics, refresh model, New Post backing — so a build session can implement the acceptance criteria below without deciding anything. ## Notes - Plan-don't-do: this map produces decisions, not deliverables (Engine-gate pattern, like #12). Execution stays with the build session. - Consult: CONTEXT.md (Post, Post ID, Title, Origin, Pass State), PRD.md S1.1, ADR-0004 (folder-shaped content), ADR-0010 (TextKit2 editor), #17 devlog (the read-side contract this builds on). - All four tickets were resolved live at charting time (the grilling happened in the charting session); they are closed and hold the detail. - Tracker ops: docs/agents/issue-tracker.md (Wayfinding operations). ## Decisions so far - [Grilling: first-save frontmatter contract](https://git.babylondreams.de/AlexKucera/museion/issues/59) — first save always stamps flat `pass_state: First Draft` + `origin: writer` (the keys the #17 reader already parses); bare posts normalize on save; origin immutable after stamping; `museion:` block reserved for #31, not written yet. - [Grilling: Explicit Rename = retitle + move](https://git.babylondreams.de/AlexKucera/museion/issues/60) — dialog asks the new Title, rewrites/inserts the `# Title` line, moves the folder to the new slug (file stays `post.md`); plain-text title edits never move the folder; shared slug function (lowercase, diacritic-fold, strip punctuation, whitespace→hyphens, keep CJK, ~80-char cap); collisions `-2`, `-3`… case-insensitive. - [Grilling: Posts-list refresh model](https://git.babylondreams.de/AlexKucera/museion/issues/61) — FSEvents watcher on `posts/`, ~0.5 s debounced rescan reusing `Post.scan(home:)` off-main; own ops route through the same rescan; watcher runs while the workspace is open. - [Grilling: New Post backing editor](https://git.babylondreams.de/AlexKucera/museion/issues/62) — plain TextEditor stub in the existing placeholder slot; ⌘S triggers the first write (lazy folder, slug, frontmatter stamp); New Post selects a fresh in-memory draft, no folder; #19's TextKit2 editor replaces the stub in place — the lifecycle machinery lives below the view and survives the swap. ## Not yet specified Map complete: every child closed, no fog left — the Post lifecycle is fully specified; a build session can implement the acceptance criteria below without deciding anything. ## Out of scope - Import & external markdown — #22 (consumes the #59 contract, asks Origin once). - Editor core, markdown presentation, focus mode — #19–21 (the stub is throwaway at the view layer). - Pass State advancement UI — M2 (#24): #18 writes `First Draft` only. - `museion:` stats block — #31 (S5.1); shape reserved, not written. - New Post from Session — #30 (S2.7), builds on this machinery later. ## Original acceptance criteria (PRD S1.1, lifecycle slice) - [ ] Post folder created lazily on first write, not on New Post - [ ] Post ID = Title slug at first save; untitled fallback; collision suffixes -2, -3… - [ ] Explicit Rename moves the folder; the file remains post.md - [ ] Delete moves to Trash (recoverable), not permanent removal - [ ] New/rename/delete verifiable in Finder immediately [Generated by AI]
AlexKucera added the ready-for-agent label 2026-08-28 18:33:06 +02:00
AlexKucera added a new dependency 2026-08-28 19:18:41 +02:00
AlexKucera added a new dependency 2026-08-28 19:18:42 +02:00
AlexKucera added the wayfinder:map label 2026-10-02 15:48:10 +02:00
Sign in to join this conversation.