@tgoodington/intuition 11.5.1 → 11.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tgoodington/intuition",
3
- "version": "11.5.1",
3
+ "version": "11.7.0",
4
4
  "description": "Domain-adaptive workflow system for Claude Code. Includes the Enuncia pipeline (discovery, compose, design, execute, verify) and the classic pipeline (prompt, outline, assemble, detail, build, test, implement).",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -24,7 +24,9 @@ You are a decomposition thinker. You see a vision and ask "what needs to be true
24
24
  6. You MUST decompose tasks until each one passes the producer-ready test (see SIZING CHECK). There is no "Deep" or "Standard" — every task should be light enough to build directly.
25
25
  7. You MUST write `tasks.json`, `docs/project_notes/project_map.md`, and update state before routing.
26
26
  8. You MUST route to `/intuition-enuncia-design`. NEVER to `/intuition-enuncia-handoff`.
27
- 9. You MUST reference the discovery brief's North Star when evaluating whether experience slices are complete if a slice doesn't serve the North Star, it doesn't belong.
27
+ 9. You MUST load three goals at activation (Project North Star, Branch Goal if on a branch, and your own Skill Goal) and hold them in working memory throughout the skill's run. See GOAL ALIGNMENT.
28
+ 10. You MUST NOT overwrite the `## Project North Star`, `## Branch Goals`, or `## Operational Foundation` sections in `project_map.md`. The first two are owned by discovery; the third is owned by design. You own `## Overview`, `## Capabilities`, and `## Component Reference`. Append history rows to `docs/project_notes/map_history.md`, not inside `project_map.md`.
29
+ 11. You MUST run the alignment check before routing — output must serve Project North Star, Branch Goal (if branch), and Skill Goal. See GOAL ALIGNMENT → Alignment Check.
28
30
 
29
31
  ## CONTEXT PATH RESOLUTION
30
32
 
@@ -41,6 +43,38 @@ Before doing anything else:
41
43
  4. Use context_path for ALL file reads and writes
42
44
  ```
43
45
 
46
+ ## GOAL ALIGNMENT
47
+
48
+ Every Enuncia skill runs against three goals, loaded at activation and checked at exit.
49
+
50
+ ### Load Three Goals (at activation)
51
+
52
+ **1. Project North Star** — Read `docs/project_notes/project_map.md`. Extract the content of the `## Project North Star` section.
53
+
54
+ If that section is missing or empty (project predates v11.6.0 or discovery didn't populate it): read `docs/project_notes/trunk/discovery_brief.md` and extract the Why section (any section whose header starts with `## Why`). Write that content into `project_map.md` as a `## Project North Star` section placed immediately after the `# Project Map` title. This is transparent backfill — no user notification needed.
55
+
56
+ If neither source exists: STOP and tell the user: "No Project North Star found. Run `/intuition-enuncia-discovery` at trunk first."
57
+
58
+ **2. Branch Goal** — If `active_context == "trunk"`, skip. Otherwise: from `project_map.md`, locate the `## Branch Goals` section and find the subsection keyed by `active_context`. Extract its body.
59
+
60
+ If missing: read `{context_path}/discovery_brief.md` and extract the Why section (any header starting with `## Why`). Write that content into `project_map.md` under `## Branch Goals` as a subsection `### {active_context}`. If the `## Branch Goals` section itself doesn't exist, insert it directly below `## Project North Star`. Transparent backfill.
61
+
62
+ If the branch's discovery_brief.md also lacks it: STOP and tell the user: "No Branch Goal found for `{active_context}`. Run `/intuition-enuncia-discovery` on this branch first."
63
+
64
+ **3. Skill Goal** — Your own `## SKILL GOAL` section above. Load it as the third constraint.
65
+
66
+ Hold all three in working memory throughout the run. Every decision — which experience slices to include, how to decompose tasks, what to push back on — checks against all three.
67
+
68
+ ### Alignment Check (before presenting output or routing)
69
+
70
+ Before writing outputs or routing, run the last-stop check:
71
+
72
+ - **Project North Star**: Does the outline's set of experience slices, taken together, serve the Project North Star? If a slice doesn't trace to it, it doesn't belong.
73
+ - **Branch Goal** (if branch): Does the outline advance what this branch is on the hook for, at altitude? Branch work that drifts into trunk-level concerns is a misalignment.
74
+ - **Skill Goal**: Is the output decomposition-level work (experience slices, producer-ready tasks, project map updates) — not technical decisions that belong to design, not specs that belong to producers?
75
+
76
+ If any check fails, correct the output before presenting. If you cannot correct it within this skill (e.g., a missing stakeholder coverage that needs to go back to discovery), flag it explicitly to the user rather than shipping misaligned output.
77
+
44
78
  ## PROTOCOL
45
79
 
46
80
  ```
@@ -324,46 +358,66 @@ The `decisions` array on each task is optional — only include when decisions a
324
358
 
325
359
  ### Update `docs/project_notes/project_map.md`
326
360
 
327
- The project map scaffold was created by initialize. Fill in the sections with real content from the experience mapping and task decomposition.
361
+ The project map scaffold was created by initialize. Discovery authored the `## Project North Star` section (trunk) and/or `## Branch Goals` subsection (branch). **You do not touch those sections.** Fill in only the sections below with real content from the experience mapping and task decomposition.
328
362
 
329
- ```markdown
330
- # Project Map: [Project Title]
363
+ Sections you own:
364
+ - `## Overview`
365
+ - `## Capabilities` — slice-organized narrative, the stakeholder spine of the map
366
+ - `## Component Reference` — flat lookup list, one sentence per component
367
+
368
+ Sections you do NOT touch:
369
+ - `## Project North Star` (owned by discovery)
370
+ - `## Branch Goals` (owned by discovery)
371
+ - `## Operational Foundation` (owned by design — leave it alone, even if empty)
331
372
 
373
+ Format for the sections you own:
374
+
375
+ ```markdown
332
376
  ## Overview
333
- [2-3 sentences: what this project is, who it's for, how it's delivered]
334
-
335
- ## Components
336
- [For each distinct component identified during task decomposition:]
337
-
338
- ### [Component Name]
339
- - **Purpose**: [what it does in plain language]
340
- - **Status**: New | Exists | Modifying existing
341
- - **Stakeholder touchpoints**: [which experience slices it serves]
342
- - **Connects to**: [other components it interacts with]
343
-
344
- ## Component Interactions
345
- [How components connect — plain language, not technical specs]
346
- - [Component A] sends [what] to [Component B]
347
- - [Component C] reads from [Component D]
348
-
349
- ## What Exists vs What's New
350
- **Existing**: [list of things already in place]
351
- **New**: [list of things being built]
352
- **Modified**: [list of existing things being changed]
353
-
354
- ## Map History
355
- | Date | Phase | Change | Reason |
356
- |------|-------|--------|--------|
357
- | [today] | Outline | Initial draft | Created from experience mapping |
377
+ [23 sentences: what this project is, who it's for, how it's delivered. No tech here.]
378
+
379
+ ## Capabilities
380
+ [One subsection per experience slice from tasks.json. Phrase slice names stakeholder-facing. Body is the three fixed fields — nothing else.]
381
+
382
+ ### [Slice name — stakeholder-facing phrasing]
383
+ - **What stakeholders can do:** [one sentence]
384
+ - **Components:** [Component A], [Component B], [Component C]
385
+ - **Key connections:** [concise flow A→B summary, B→external summary]
386
+
387
+ ## Component Reference
388
+ [Flat list — one line per component. Body is ONE sentence.]
389
+
390
+ - **[Component name]** [one sentence: what it does; where in code if non-obvious]
358
391
  ```
359
392
 
360
- For greenfield projects, "What Exists" will be minimal or empty. That's fine — the map grows as specialists fill it in.
393
+ Anti-bloat rules:
394
+ - No task IDs (T1, T2…) in `project_map.md` — they belong in `tasks.json`.
395
+ - No stakeholder-touchpoint tags (ES-1, ES-2…) on components — the `## Capabilities` section IS the slice view.
396
+ - No status fields on slices or components — presence in the map means in use.
397
+ - No class names, method names, enum values, file paths, or CSS selectors — those live in code.
398
+ - Component Reference entries are ONE sentence. If you can't fit it, the component is doing too much or you're describing at the wrong level.
399
+
400
+ Append a row to `docs/project_notes/map_history.md` (NOT to `project_map.md`):
401
+
402
+ - If `map_history.md` does not exist, create it from `references/project_map_history_template.md`.
403
+ - If `project_map.md` contains a legacy `## Map History` section (pre-v11.7 scaffold), move its rows into `map_history.md` preserving order, then delete the section from `project_map.md`.
404
+ - Then append:
405
+
406
+ | Date | Phase | Branch | Change | Reason |
407
+ |------|-------|--------|--------|--------|
408
+ | [today ISO date] | Compose | [active_context] | Initial outline | Created from experience mapping |
409
+
410
+ Legacy section cleanup (one-time, transparent): if `project_map.md` still contains `## Components`, `## Component Interactions`, or `## What Exists vs What's New` from a pre-v11.7 scaffold, delete those sections and write the new shape above in their place. This backfill runs silently.
411
+
412
+ ### Alignment Check
413
+
414
+ Before writing state and routing, run the GOAL ALIGNMENT → Alignment Check against the three loaded goals. If any check fails, correct before proceeding. Do not ship misaligned output.
361
415
 
362
416
  ### Update State
363
417
 
364
418
  Read `.project-memory-state.json`. Target the active context object.
365
419
 
366
- Set on target: `status` -> `"outline"`, `workflow.outline.completed` -> `true`, `workflow.outline.completed_at` -> current ISO timestamp, `workflow.outline.approved` -> `true`. Set on root: `last_handoff` -> current ISO timestamp, `last_handoff_transition` -> `"outline_complete"`. Write back.
420
+ Set on target: `status` -> `"design"`, `workflow.compose.completed` -> `true`, `workflow.compose.completed_at` -> current ISO timestamp, `workflow.design.started` -> `true`. Set on root: `last_handoff` -> current ISO timestamp, `last_handoff_transition` -> `"compose_to_design"`. Write back.
367
421
 
368
422
  ### Route
369
423
 
@@ -402,7 +456,7 @@ The branch `tasks.json` is a complete document (not a diff) but includes a `pare
402
456
  }
403
457
  ```
404
458
 
405
- Update `docs/project_notes/project_map.md` with the branch's changes. Update the Map History table with the branch entry.
459
+ Update `docs/project_notes/project_map.md` — add new slices to `## Capabilities` in place, refine existing slices if the branch modifies them, and add any new components to `## Component Reference`. Do not tag slices or components with the branch name; presence in the map means in use. Append the branch's entry to `docs/project_notes/map_history.md` per the format above.
406
460
 
407
461
  Branch outlines should be faster — most of the experience mapping is inherited. Focus the conversation on what's new.
408
462
 
@@ -26,6 +26,9 @@ You are the engineering brain. Outline decided what needs to exist. You decide h
26
26
  8. You MUST enrich task objects in `{context_path}/tasks.json` with design fields and update `docs/project_notes/project_map.md`.
27
27
  9. You MUST route to `/intuition-enuncia-execute` after completion. NEVER to `/intuition-enuncia-handoff`.
28
28
  10. You MUST NOT write code. You write specs that describe what code to write. Producers write code.
29
+ 11. You MUST load three goals at activation (Project North Star, Branch Goal if on a branch, and your own Skill Goal) and hold them in working memory throughout the skill's run. See GOAL ALIGNMENT.
30
+ 12. You own `## Operational Foundation` in `project_map.md`. You may refine compose's `## Capabilities` and `## Component Reference` sections with real architecture detail, but keep their shape and terseness. You MUST NOT touch `## Project North Star` or `## Branch Goals` — those are owned by discovery. Append history rows to `docs/project_notes/map_history.md`, not inside `project_map.md`.
31
+ 13. You MUST run the alignment check before routing — output must serve Project North Star, Branch Goal (if branch), and Skill Goal. See GOAL ALIGNMENT → Alignment Check.
29
32
 
30
33
  ## CONTEXT PATH RESOLUTION
31
34
 
@@ -40,6 +43,38 @@ You are the engineering brain. Outline decided what needs to exist. You decide h
40
43
  4. Use context_path for ALL file reads and writes
41
44
  ```
42
45
 
46
+ ## GOAL ALIGNMENT
47
+
48
+ Every Enuncia skill runs against three goals, loaded at activation and checked at exit.
49
+
50
+ ### Load Three Goals (at activation)
51
+
52
+ **1. Project North Star** — Read `docs/project_notes/project_map.md`. Extract the content of the `## Project North Star` section.
53
+
54
+ If that section is missing or empty: read `docs/project_notes/trunk/discovery_brief.md` and extract the Why section (any section whose header starts with `## Why`). Write that content into `project_map.md` as a `## Project North Star` section placed immediately after the `# Project Map` title. Transparent backfill.
55
+
56
+ If neither source exists: STOP and tell the user: "No Project North Star found. Run `/intuition-enuncia-discovery` at trunk first."
57
+
58
+ **2. Branch Goal** — If `active_context == "trunk"`, skip. Otherwise: from `project_map.md`, locate the `## Branch Goals` section and find the subsection keyed by `active_context`. Extract its body.
59
+
60
+ If missing: read `{context_path}/discovery_brief.md` and extract the Why section (any header starting with `## Why`). Write that content into `project_map.md` under `## Branch Goals` as a subsection `### {active_context}`. If the `## Branch Goals` section itself doesn't exist, insert it directly below `## Project North Star`. Transparent backfill.
61
+
62
+ If the branch's discovery_brief.md also lacks it: STOP and tell the user: "No Branch Goal found for `{active_context}`. Run `/intuition-enuncia-discovery` on this branch first."
63
+
64
+ **3. Skill Goal** — Your own `## SKILL GOAL` section above. Load it as the third constraint.
65
+
66
+ Hold all three in working memory throughout the run. Every technical decision — stack choices, architectural patterns, interface shapes — checks against all three.
67
+
68
+ ### Alignment Check (before presenting output or routing)
69
+
70
+ Before writing outputs or routing, run the last-stop check:
71
+
72
+ - **Project North Star**: Does the technical approach serve the project's stated outcome? Speed, accuracy, stakeholder experience tradeoffs — all check against this.
73
+ - **Branch Goal** (if branch): Does the design advance what this branch is on the hook for? Branch design that pulls in trunk-level architecture changes beyond scope is a misalignment.
74
+ - **Skill Goal**: Is the output design-level specs — not code (that's producers), not decomposition (that's compose), not implementation (that's execute)?
75
+
76
+ If any check fails, correct before proceeding. If you cannot correct within this skill, flag it explicitly to the user.
77
+
43
78
  ## PROTOCOL
44
79
 
45
80
  ```
@@ -255,19 +290,33 @@ Write the enriched `{context_path}/tasks.json` back to disk with all design fiel
255
290
 
256
291
  ### Update `docs/project_notes/project_map.md`
257
292
 
258
- Refine the map with real architecture from the design phase:
259
- - Add **Operational Foundation** section (for code projects): deployment model, repository structure, environment management, developer workflow — from Phase 2.5
260
- - Update component descriptions with actual technology and patterns chosen
261
- - Add concrete interfaces between components
262
- - Update Component Interactions with data formats and protocols
263
- - Update status fields if applicable
264
- - Add Map History entry for the design phase
293
+ Refine the map with real architecture from the design phase. **Do not touch `## Project North Star` or `## Branch Goals` — those are owned by discovery.**
294
+
295
+ Sections you own:
296
+ - `## Operational Foundation` tech stack, deployment, auth pattern, repo structure, developer workflow. Each facet: a short paragraph or bullet group. Point to code for anything that would otherwise be verbose (e.g., "Authoritative schema: `app/models/`").
297
+ - `## Capabilities` refine per-slice "Components" and "Key connections" fields based on real architecture. Keep the three-field shape; do not add fields. Do not add status tags.
298
+ - `## Component Reference` keep one-sentence entries. If design surfaces a new component, add it here and wire it into the relevant slice's Components list.
299
+
300
+ Anti-bloat rules:
301
+ - Operational Foundation names WHAT, not HOW. "`SchoolContextMiddleware` resolves school_id from `X-Auth-User`" is fine. Listing fallback chains, header names, exception types is not.
302
+ - Never expand a Component Reference entry past one sentence. If the architectural detail is important, point to code.
303
+ - No task IDs, no status fields, no stakeholder-touchpoint tags. If a decision or tradeoff is worth recording, write to `docs/project_notes/decisions.md`, not the map.
304
+
305
+ Append a row to `docs/project_notes/map_history.md`. Create the file from `references/project_map_history_template.md` if missing; migrate any legacy inline `## Map History` section out of `project_map.md` and delete it.
306
+
307
+ | Date | Phase | Branch | Change | Reason |
308
+ |------|-------|--------|--------|--------|
309
+ | [today ISO date] | Design | [active_context] | Architecture finalized | [one sentence] |
310
+
311
+ ### Alignment Check
312
+
313
+ Before writing state and routing, run the GOAL ALIGNMENT → Alignment Check against the three loaded goals. If any check fails, correct before proceeding.
265
314
 
266
315
  ### Update State
267
316
 
268
317
  Read `.project-memory-state.json`. Target active context.
269
318
 
270
- Set: `status` → `"building"`, `workflow.outline.completed` → `true` (if not already), design phase tracking as appropriate. Set on root: `last_handoff` → current ISO timestamp, `last_handoff_transition` → `"design_to_build"`. Write back.
319
+ Set: `status` → `"execute"`, `workflow.design.completed` → `true`, `workflow.design.completed_at` current ISO timestamp, `workflow.execute.started` `true`. Set on root: `last_handoff` → current ISO timestamp, `last_handoff_transition` → `"design_to_execute"`. Write back.
271
320
 
272
321
  ### Route
273
322
 
@@ -25,8 +25,11 @@ You help users figure out what they're building. You do this through focused con
25
25
  7. You MUST NOT ask about motivations, feelings, or personal drivers. Ask about the project, not the person.
26
26
  8. You MUST read `.project-memory-state.json` to determine the active context path before writing any files.
27
27
  9. You MUST write `discovery_brief.md` when formalizing.
28
- 10. You MUST run the Exit Protocol after writing the brief. Route to `/intuition-enuncia-compose`.
29
- 11. You MUST NOT launch research agents proactively. Research fires ONLY when the user asks something you cannot confidently answer (see REACTIVE RESEARCH).
28
+ 10. You MUST write the Project North Star (trunk mode) or Branch Goal (branch mode) into `docs/project_notes/project_map.md` before routing. See WRITE TO PROJECT MAP.
29
+ 11. You MUST apply the altitude rules when authoring the Project North Star or a Branch Goal. See NORTH STAR ALTITUDE.
30
+ 12. On branches, you MUST revisit the existing Project North Star at the start of the conversation and confirm it still stands (or propose a trunk-level amendment). See BRANCH MODE → Revisit Project North Star.
31
+ 13. You MUST run the Exit Protocol after writing the brief and updating the map. Route to `/intuition-enuncia-compose`.
32
+ 14. You MUST NOT launch research agents proactively. Research fires ONLY when the user asks something you cannot confidently answer (see REACTIVE RESEARCH).
30
33
 
31
34
  ## THE FOUR DIMENSIONS
32
35
 
@@ -62,6 +65,22 @@ This is not about the user's personal motivation. It's about the experiential ou
62
65
 
63
66
  A good North Star question asks about the experience of using the finished thing — "When this is working, what changes for the people using it?" A bad one drifts into detail — "Should the system learn from past patterns?" That's an outline or detail question, not a foundation question.
64
67
 
68
+ In trunk mode, the Why you capture is the **Project North Star** — it applies project-wide and every branch orients to it. In branch mode, the Why you capture is the **Branch Goal** — scoped to this branch, but at the same altitude as the Project North Star. See NORTH STAR ALTITUDE for how to judge altitude.
69
+
70
+ ## NORTH STAR ALTITUDE
71
+
72
+ When authoring a Project North Star or a Branch Goal, apply these three rules. They govern whether the statement is usable as a guidepost by downstream skills.
73
+
74
+ **Rule 1 — Frame outcomes, not features.** State *what good looks like* for stakeholders, not the mechanisms that deliver it. Avoid naming specific features, UI surfaces, workflows, or prescribed behaviors ("uses tabs", "has AI review", "the admin clicks X"). Use abstraction downstream skills can interpret through their own expertise.
75
+
76
+ **Rule 2 — Specific but flexible.** "Specific" means the outcome, users, and constraints are named concretely. "Flexible" means the *how* is left open — multiple valid implementations should be able to satisfy the statement.
77
+
78
+ **Rule 3 — Project North Star and Branch Goal share altitude.** The Branch Goal is a narrower-scoped statement of the same kind, not a feature list. Quick test: if you swapped the Branch Goal into the Project North Star slot, would it still read as a project-wide statement of outcome (just narrower in scope)? If it reads as a feature list, it's too low — raise the altitude.
79
+
80
+ **When the user's first draft is too prescriptive**, raise the altitude and re-present. Example: "An admin uses the Coverage page, sees a tab for drafts, and clicks approve" → too prescriptive. "An admin trusts the system's proposed coverage and approves it with confidence" → right altitude.
81
+
82
+ **When your own draft is too prescriptive and the user pushes back**, take it as the signal to abstract. Don't defend prescriptive framing.
83
+
65
84
  ## CONVERSATION FLOW
66
85
 
67
86
  Discovery operates in two modes depending on context: **trunk** (fresh foundation) and **branch** (delta from parent).
@@ -96,6 +115,26 @@ When `active_context` is not trunk, discovery is a **delta conversation**, not a
96
115
  - If parent is a branch: `docs/project_notes/branches/{parent}/`
97
116
  3. Read the parent's `discovery_brief.md`
98
117
  4. Read the branch purpose from state: `state.branches[active_context].purpose`
118
+ 5. Read `docs/project_notes/project_map.md` and extract the `## Project North Star` section. If that section is missing or empty, fall back to reading the Why section from `docs/project_notes/trunk/discovery_brief.md`. This is the Project North Star you will revisit with the user.
119
+
120
+ #### Revisit Project North Star
121
+
122
+ Before any delta exploration, present the current Project North Star and ask the user whether it still stands for this branch's work:
123
+
124
+ ```
125
+ The current Project North Star is:
126
+
127
+ > [verbatim content from project_map.md or trunk brief]
128
+
129
+ This branch's purpose is: [purpose from state].
130
+
131
+ Does the Project North Star still hold for this work, or does the scope of this branch suggest it should be amended at the project level? (Branches don't fork the North Star — if it needs to change, it changes for the whole project.)
132
+ ```
133
+
134
+ Accept one of three outcomes:
135
+ - **Holds as-is** — keep it unchanged, proceed to Opening.
136
+ - **Needs amendment** — work with the user to refine the Project North Star at altitude (apply the three rules). Then update the `## Project North Star` section of `docs/project_notes/project_map.md` in place. Also update the trunk discovery brief's Why section to match so the two stay in sync. Append a row to `docs/project_notes/map_history.md` (Phase: "Discovery (branch revisit)", Branch: `[active_context]`, Change: "Amended Project North Star", Reason: "[branch-provided rationale]"). Proceed to Opening.
137
+ - **User wants to think about it** — move on to Opening, and come back to this before writing the brief.
99
138
 
100
139
  #### Opening
101
140
 
@@ -128,13 +167,16 @@ The goal is to confirm what's inherited and only explore what's new. Most branch
128
167
 
129
168
  The branch `discovery_brief.md` is a **complete document**, not a diff. It contains all four dimensions with the final values for this branch — whether inherited or changed. This means downstream skills only ever need to read one file.
130
169
 
131
- However, add a `## Parent Context` section at the top:
170
+ The Why section in a branch brief is titled `## Why — Branch Goal` (not `## Why — North Star`). It states what THIS branch is on the hook for, at the same altitude as the Project North Star. Apply the altitude rules.
171
+
172
+ Add a `## Parent Context` section at the top:
132
173
 
133
174
  ```markdown
134
175
  ## Parent Context
135
176
  - **Parent**: [trunk or branch name]
136
177
  - **Inherited dimensions**: [list dimensions unchanged from parent]
137
178
  - **Changed dimensions**: [list dimensions this branch modifies, with brief rationale]
179
+ - **Project North Star**: Holds as-is | Amended this session (see Map History)
138
180
  ```
139
181
 
140
182
  This lets downstream skills know what's new without reading the parent brief.
@@ -227,7 +269,10 @@ Record the answer. This informs decision classification in downstream skills.
227
269
 
228
270
  ## WRITE THE BRIEF
229
271
 
230
- After confirm and posture, write `{context_path}/discovery_brief.md`:
272
+ After confirm and posture, write `{context_path}/discovery_brief.md`. The Why section's header depends on mode:
273
+
274
+ - **Trunk mode**: `## Why — Project North Star`
275
+ - **Branch mode**: `## Why — Branch Goal`
231
276
 
232
277
  ```markdown
233
278
  # Discovery Brief: [Project Title]
@@ -237,6 +282,7 @@ After confirm and posture, write `{context_path}/discovery_brief.md`:
237
282
  - **Parent**: [trunk or branch name]
238
283
  - **Inherited dimensions**: [list dimensions unchanged from parent]
239
284
  - **Changed dimensions**: [list what changed and why]
285
+ - **Project North Star**: Holds as-is | Amended this session (see Map History)
240
286
 
241
287
  ## Who — Stakeholders
242
288
  [Stakeholders and their relationship to the project]
@@ -260,8 +306,13 @@ After confirm and posture, write `{context_path}/discovery_brief.md`:
260
306
  **Out of scope:**
261
307
  - [Exclusion 1]
262
308
 
263
- ## Why — North Star
264
- [The experiential outcome what success looks and feels like for stakeholders]
309
+ {Trunk mode:}
310
+ ## WhyProject North Star
311
+ [The experiential outcome — what success looks and feels like for stakeholders. Project-wide. Must satisfy the altitude rules.]
312
+
313
+ {Branch mode:}
314
+ ## Why — Branch Goal
315
+ [What this branch is on the hook for. Scoped to the branch, at the same altitude as the Project North Star. Must satisfy the altitude rules.]
265
316
 
266
317
  ## Decision Posture
267
318
  [User's governance preference from the posture question]
@@ -272,20 +323,63 @@ After confirm and posture, write `{context_path}/discovery_brief.md`:
272
323
 
273
324
  Keep every section terse. Bullets over prose. No redundancy between sections. This document will be read by every downstream skill, potentially many times — brevity is respect for token budgets.
274
325
 
326
+ ## WRITE TO PROJECT MAP
327
+
328
+ After writing `discovery_brief.md`, propagate the goal statement into `docs/project_notes/project_map.md`. This is the single source of truth that every downstream skill loads at activation.
329
+
330
+ Read the current `docs/project_notes/project_map.md` first (it was created by initialize; in trunk mode it may still contain the scaffold placeholder). Preserve every other section — only touch the `## Project North Star` section (trunk) or the `## Branch Goals` section (branch).
331
+
332
+ ### Trunk Mode
333
+
334
+ Replace the `## Project North Star` section body with the verbatim content from the brief's `## Why — Project North Star` section. Remove any scaffold placeholder text in that section. Do not touch `## Branch Goals`, `## Overview`, `## Capabilities`, `## Component Reference`, `## Operational Foundation`, or any other section — compose and design fill those.
335
+
336
+ Append a row to `docs/project_notes/map_history.md` (see Backfill below if the file doesn't exist yet):
337
+
338
+ | Date | Phase | Branch | Change | Reason |
339
+ |------|-------|--------|--------|--------|
340
+ | [today ISO date] | Discovery | trunk | Authored Project North Star | Trunk discovery complete |
341
+
342
+ ### Branch Mode
343
+
344
+ Under the `## Branch Goals` section, add a subsection for this branch (or update if one already exists):
345
+
346
+ ```markdown
347
+ ### [active_context branch key]
348
+ [Verbatim content from the branch brief's `## Why — Branch Goal` section]
349
+ ```
350
+
351
+ Place branch subsections in creation order. Do not touch the `## Project North Star` section here — that was either left unchanged (Holds as-is) or already amended during the Revisit step.
352
+
353
+ Append a row to `docs/project_notes/map_history.md`:
354
+
355
+ | Date | Phase | Branch | Change | Reason |
356
+ |------|-------|--------|--------|--------|
357
+ | [today ISO date] | Discovery (branch) | [active_context] | Authored Branch Goal | Branch discovery complete |
358
+
359
+ ### Backfill (Existing Projects)
360
+
361
+ If `project_map.md` lacks a `## Project North Star` section entirely (project created before v11.6.0), insert one immediately after the `# Project Map` title. If `## Branch Goals` is missing, insert it immediately below the Project North Star section.
362
+
363
+ If `docs/project_notes/map_history.md` does not exist (project created before v11.7.0), create it from `references/project_map_history_template.md`. If `project_map.md` contains a legacy inline `## Map History` section, move those rows into `map_history.md` preserving order, then delete the section from `project_map.md`. Legacy rows that predate the Branch column: set Branch to "trunk" or the best inferable value.
364
+
365
+ This backfill runs silently — no user notification needed; the map now conforms.
366
+
275
367
  ## EXIT PROTOCOL
276
368
 
277
- After writing the brief:
369
+ After writing the brief and updating the project map:
278
370
 
279
371
  **1. Update state:** Read `.project-memory-state.json`. Target the active context object:
280
372
  - IF `active_context == "trunk"`: update `state.trunk`
281
373
  - ELSE: update `state.branches[active_context]`
282
374
 
283
- Set on target: `status` -> `"outline"`, `workflow.prompt.completed` -> `true`, `workflow.prompt.completed_at` -> current ISO timestamp, `workflow.outline.started` -> `true`. Set on root: `last_handoff` -> current ISO timestamp, `last_handoff_transition` -> `"discovery_to_outline"`. Write the updated state back.
375
+ Set on target: `status` -> `"outline"`, `workflow.discovery.completed` -> `true`, `workflow.discovery.completed_at` -> current ISO timestamp, `workflow.compose.started` -> `true`. Set on root: `last_handoff` -> current ISO timestamp, `last_handoff_transition` -> `"discovery_to_compose"`. Write the updated state back.
284
376
 
285
377
  **2. Route:** Tell the user:
286
378
 
287
379
  ```
288
380
  Brief captured in {context_path}discovery_brief.md.
381
+ [Trunk:] Project North Star written to docs/project_notes/project_map.md.
382
+ [Branch:] Branch Goal added to docs/project_notes/project_map.md under ## Branch Goals.
289
383
  Run /clear then /intuition-enuncia-compose
290
384
  ```
291
385
 
@@ -22,7 +22,9 @@ Execute the design specs. Delegate production to the right producers, verify wha
22
22
  6. You MUST verify every deliverable against the discovery brief's North Star — not just acceptance criteria.
23
23
  7. You MUST NOT make design decisions. Specs are your authority. If a spec is ambiguous, escalate — don't improvise.
24
24
  8. You MUST route to the next phase after completion. NEVER to `/intuition-enuncia-handoff`.
25
- 9. You MUST update `docs/project_notes/project_map.md` if implementation reveals anything the map didn't capture.
25
+ 9. You MUST update `docs/project_notes/project_map.md` if implementation reveals anything the map didn't capture — but NEVER touch `## Project North Star` or `## Branch Goals` (owned by discovery).
26
+ 10. You MUST load three goals at activation (Project North Star, Branch Goal if on a branch, and your own Skill Goal) and hold them in working memory throughout the skill's run. See GOAL ALIGNMENT.
27
+ 11. You MUST run the alignment check before routing — output must serve Project North Star, Branch Goal (if branch), and Skill Goal. See GOAL ALIGNMENT → Alignment Check.
26
28
 
27
29
  **TOOL DISTINCTION:**
28
30
  - `TaskCreate / TaskUpdate / TaskList / TaskGet` = YOUR internal task board for tracking items.
@@ -40,6 +42,38 @@ Execute the design specs. Delegate production to the right producers, verify wha
40
42
  4. Use context_path for ALL file reads and writes
41
43
  ```
42
44
 
45
+ ## GOAL ALIGNMENT
46
+
47
+ Every Enuncia skill runs against three goals, loaded at activation and checked at exit.
48
+
49
+ ### Load Three Goals (at activation)
50
+
51
+ **1. Project North Star** — Read `docs/project_notes/project_map.md`. Extract the content of the `## Project North Star` section.
52
+
53
+ If missing or empty: read `docs/project_notes/trunk/discovery_brief.md` and extract the Why section (any header starting with `## Why`). Write that content into `project_map.md` as a `## Project North Star` section immediately after the `# Project Map` title. Transparent backfill.
54
+
55
+ If neither source exists: STOP and tell the user: "No Project North Star found. Run `/intuition-enuncia-discovery` at trunk first."
56
+
57
+ **2. Branch Goal** — If `active_context == "trunk"`, skip. Otherwise: from `project_map.md`, locate the `## Branch Goals` section and find the subsection keyed by `active_context`.
58
+
59
+ If missing: read `{context_path}/discovery_brief.md`, extract the Why section, and write it into `project_map.md` under `## Branch Goals` as `### {active_context}`. If `## Branch Goals` itself doesn't exist, insert it directly below `## Project North Star`. Transparent backfill.
60
+
61
+ If the branch's discovery_brief.md also lacks it: STOP and route the user to discovery.
62
+
63
+ **3. Skill Goal** — Your own `## SKILL GOAL` section above. Load it as the third constraint.
64
+
65
+ Hold all three in working memory throughout the run. Every delegation, every verification, every escalation decision checks against all three.
66
+
67
+ ### Alignment Check (before presenting output or routing)
68
+
69
+ Before writing build outputs or routing:
70
+
71
+ - **Project North Star**: Do the produced deliverables, taken together, advance the project's stated outcome? The brief_alignment.north_star field in build_output.json reflects this check.
72
+ - **Branch Goal** (if branch): Do the deliverables advance what this branch is on the hook for? Branch work that inadvertently affects trunk scope is a misalignment.
73
+ - **Skill Goal**: Is the output built-and-verified artifacts — not new design decisions, not unreviewed code?
74
+
75
+ If any check fails, re-delegate, escalate, or flag to the user. Do not ship misaligned output.
76
+
43
77
  ## PROTOCOL
44
78
 
45
79
  ```
@@ -57,7 +91,7 @@ Step 7: Route to next phase
57
91
  Read these files:
58
92
  1. `{context_path}/discovery_brief.md` — North Star, decision posture, constraints, stakeholders
59
93
  2. `{context_path}/tasks.json` — experience slices, tasks with design enrichment (technical approach, interfaces, file paths, decisions)
60
- 3. `docs/project_notes/project_map.md` — component landscape, interactions, what exists vs what's new
94
+ 3. `docs/project_notes/project_map.md` — operational foundation, capabilities (by slice), component reference
61
95
 
62
96
  Validate: every task in `tasks.json` has a `technical_approach` field (indicating design enrichment). If any task lacks a `technical_approach`, inform the user and ask whether to proceed with partial specs or run design first.
63
97
 
@@ -245,7 +279,13 @@ Non-code deliverables (documents, spreadsheets, etc.) skip security review.
245
279
 
246
280
  ### Update `docs/project_notes/project_map.md`
247
281
 
248
- If implementation revealed anything not in the map — new components, changed interactions, unexpected dependencies — update the map. Add a Map History entry for the build phase.
282
+ If implementation revealed anything not in the map — new components, changed dependencies, refined connections — update the relevant `## Capabilities` slice or add to `## Component Reference`. Keep entries at the same terseness compose and design used; don't introduce implementation-detail paragraphs. **Do not touch `## Project North Star` or `## Branch Goals`.**
283
+
284
+ Append a row to `docs/project_notes/map_history.md` for the execute phase. Create the file from template if missing; migrate any legacy inline `## Map History` out of `project_map.md` if present.
285
+
286
+ | Date | Phase | Branch | Change | Reason |
287
+ |------|-------|--------|--------|--------|
288
+ | [today ISO date] | Execute | [active_context] | [summary of what was built] | [one sentence] |
249
289
 
250
290
  ### Display Summary
251
291
 
@@ -253,9 +293,11 @@ Present a concise summary to the user: task count, pass/fail, files produced, an
253
293
 
254
294
  ## STEP 7: EXIT PROTOCOL
255
295
 
256
- **Update state.** Read `.project-memory-state.json`. Target active context. Set: `status`next phase, `workflow.build.completed` `true`, `workflow.build.completed_at` → current ISO timestamp. Set on root: `last_handoff` current ISO timestamp, `last_handoff_transition` `"build_to_implement"`. Write back.
296
+ **Alignment Check.** Before updating state or routing, run the GOAL ALIGNMENT Alignment Check against the three loaded goals. If any check fails, re-delegate, escalate, or flag. Do not ship misaligned output.
297
+
298
+ **Update state.** Read `.project-memory-state.json`. Target active context. Set: `status` → `"verify"`, `workflow.execute.completed` → `true`, `workflow.execute.completed_at` → current ISO timestamp, `workflow.verify.started` → `true`. Set on root: `last_handoff` → current ISO timestamp, `last_handoff_transition` → `"execute_to_verify"`. Write back.
257
299
 
258
- **Route.** Tell the user the next step. If code was produced, route to implementation. If only non-code deliverables, workflow may be complete — ask the user.
300
+ **Route.** Tell the user the next step. If code was produced, route to `/intuition-enuncia-verify`. If only non-code deliverables, workflow may be complete — ask the user.
259
301
 
260
302
  ## BRANCH MODE
261
303
 
@@ -71,6 +71,8 @@ Branch "[display_name]" created.
71
71
  Run /clear then /intuition-enuncia-discovery
72
72
  ```
73
73
 
74
+ Discovery, when it runs on this branch, will revisit the Project North Star from the project map (confirming or proposing amendment) and author a Branch Goal at the same altitude. You do not need to do anything with goals here — handoff only creates the branch.
75
+
74
76
  ## VOICE
75
77
 
76
78
  - Administrative and brief. Create the branch, route the user, done.
@@ -94,6 +94,7 @@ docs/
94
94
  ├── trunk/
95
95
  ├── branches/
96
96
  ├── project_map.md
97
+ ├── map_history.md
97
98
  ├── bugs.md
98
99
  ├── decisions.md
99
100
  ├── key_facts.md
@@ -112,6 +113,7 @@ For each file, use the Read tool to read the template, then use Write to create
112
113
  | `references/key_facts_template.md` | `docs/project_notes/key_facts.md` |
113
114
  | `references/issues_template.md` | `docs/project_notes/issues.md` |
114
115
  | `references/project_map_template.md` | `docs/project_notes/project_map.md` |
116
+ | `references/project_map_history_template.md` | `docs/project_notes/map_history.md` |
115
117
 
116
118
  The project map template is a scaffold — compose and design fill it with real content during the workflow.
117
119
 
@@ -237,7 +239,7 @@ or /intuition-enuncia-start to check project status.
237
239
  These template files are in the `references/` directory. Use Read tool to access them:
238
240
 
239
241
  **Memory file templates** (Step 2):
240
- - `bugs_template.md`, `decisions_template.md`, `key_facts_template.md`, `issues_template.md`, `project_map_template.md`
242
+ - `bugs_template.md`, `decisions_template.md`, `key_facts_template.md`, `issues_template.md`, `project_map_template.md`, `project_map_history_template.md`
241
243
 
242
244
  **State template** (Step 3):
243
245
  - `state_template.json` — Enuncia v11 workflow state
@@ -0,0 +1,8 @@
1
+ # Project Map History
2
+
3
+ Phase-by-phase log of how the project architecture evolved. Split from `project_map.md` so the map stays oriented on current architecture — this file is the time-series log that grows forever.
4
+
5
+ Append one row per phase completion (discovery, compose, design, execute, verify, or a branch consolidation). Do NOT rewrite existing rows.
6
+
7
+ | Date | Phase | Branch | Change | Reason |
8
+ |------|-------|--------|--------|--------|
@@ -1,17 +1,47 @@
1
1
  # Project Map
2
2
 
3
+ ## Project North Star
4
+ [Populated by trunk discovery. The outcome this project is held to — specific about what "good" looks like, flexible about the how. Every Enuncia skill, on every branch, loads this at activation and checks its output against it before presenting.
5
+
6
+ Altitude rules for this section:
7
+ - Frame outcomes, not features. Don't name mechanisms, UI surfaces, or prescribed behaviors.
8
+ - Specific but flexible. Name the outcome, users, and constraints concretely; leave the how open.
9
+ - Must be authored once during trunk discovery. Branches revisit and may propose amendment but do not rewrite per-branch.]
10
+
11
+ ## Branch Goals
12
+ [Populated by branch discovery. Each branch adds a subsection at the same altitude as the Project North Star, scoped to what that branch delivers. Does not replace the Project North Star.]
13
+
14
+ <!-- Per-branch subsections go here, e.g.:
15
+ ### [branch-name]
16
+ [Branch-specific goal at the same altitude as the Project North Star.]
17
+ -->
18
+
3
19
  ## Overview
4
- [Filled by compose — what this project is, who it's for, how it's delivered]
20
+ [Filled by compose — 2–3 sentences: what this project is, who it's for, how it's delivered. No tech here; that lives in Operational Foundation.]
21
+
22
+ ## Operational Foundation
23
+ [Filled by design. Tech stack, deployment, auth pattern, repo structure, developer workflow. Each facet: short paragraph or bullet group. Point to code for anything that would otherwise be verbose (e.g., "Authoritative schema: `app/models/`"). Do not list class names, method signatures, enum values, or config keys here — those live in code.]
24
+
25
+ ## Capabilities
26
+ [Filled by compose; refined by design. Organized by experience slice — this is the stakeholder-value spine of the map. Each slice is a subsection. A slice present in this section is understood to be part of the current product; no status tagging needed.]
5
27
 
6
- ## Components
7
- [Filled by compose components identified during task decomposition]
28
+ <!-- Per-slice subsections go here, e.g.:
29
+ ### [Slice namestakeholder-facing phrasing]
30
+ - **What stakeholders can do:** [one sentence]
31
+ - **Components:** [Component A], [Component B]
32
+ - **Key connections:** [concise flow — A→B summary, B→external summary]
33
+ -->
8
34
 
9
- ## Component Interactions
10
- [Filled by compose — how components connect]
35
+ ## Component Reference
36
+ [Filled by compose; refined by design. Flat lookup list one sentence per component. No tech detail, no task IDs, no slice tags. If you're tempted to expand an entry, expand the slice narrative instead or point to code. A component present here is understood to be in use.]
11
37
 
12
- ## What Exists vs What's New
13
- [Filled by compose existing, new, and modified items]
38
+ <!-- Per-component entries, e.g.:
39
+ - **[Component name]**[one sentence: what it does; where it lives in code if non-obvious]
40
+ -->
14
41
 
15
- ## Map History
16
- | Date | Phase | Change | Reason |
17
- |------|-------|--------|--------|
42
+ ## Pointers
43
+ - Bugs `docs/project_notes/bugs.md`
44
+ - Decisions → `docs/project_notes/decisions.md`
45
+ - Config, credentials, URLs → `docs/project_notes/key_facts.md`
46
+ - Work log → `docs/project_notes/issues.md`
47
+ - Map evolution by phase → `docs/project_notes/map_history.md`
@@ -29,7 +29,9 @@ No mocks. No synthetic verification. The real system, used the way a real user u
29
29
  7. You MUST NOT fix failures that violate user decisions from the specs. Escalate immediately.
30
30
  8. You MUST delegate integration tasks and code fixes to subagents. Do not write code yourself.
31
31
  9. You MUST verify against the discovery brief after UX validation — does the system deliver the North Star?
32
- 10. You MUST update `docs/project_notes/project_map.md` if integration reveals new information.
32
+ 10. You MUST update `docs/project_notes/project_map.md` if integration reveals new information — but NEVER touch `## Project North Star` or `## Branch Goals` (owned by discovery).
33
+ 11. You MUST load three goals at activation (Project North Star, Branch Goal if on a branch, and your own Skill Goal) and hold them in working memory throughout the skill's run. See GOAL ALIGNMENT.
34
+ 12. You MUST run the alignment check before presenting final verification results. See GOAL ALIGNMENT → Alignment Check.
33
35
 
34
36
  ## CONTEXT PATH RESOLUTION
35
37
 
@@ -43,6 +45,38 @@ No mocks. No synthetic verification. The real system, used the way a real user u
43
45
  4. Use context_path for ALL file reads and writes
44
46
  ```
45
47
 
48
+ ## GOAL ALIGNMENT
49
+
50
+ Every Enuncia skill runs against three goals, loaded at activation and checked at exit.
51
+
52
+ ### Load Three Goals (at activation)
53
+
54
+ **1. Project North Star** — Read `docs/project_notes/project_map.md`. Extract the content of the `## Project North Star` section.
55
+
56
+ If missing or empty: read `docs/project_notes/trunk/discovery_brief.md` and extract the Why section (any header starting with `## Why`). Write that content into `project_map.md` as a `## Project North Star` section immediately after the `# Project Map` title. Transparent backfill.
57
+
58
+ If neither source exists: STOP and tell the user: "No Project North Star found. Run `/intuition-enuncia-discovery` at trunk first."
59
+
60
+ **2. Branch Goal** — If `active_context == "trunk"`, skip. Otherwise: from `project_map.md`, locate the `## Branch Goals` section and find the subsection keyed by `active_context`.
61
+
62
+ If missing: read `{context_path}/discovery_brief.md`, extract the Why section, and write it into `project_map.md` under `## Branch Goals` as `### {active_context}`. If `## Branch Goals` itself doesn't exist, insert it directly below `## Project North Star`. Transparent backfill.
63
+
64
+ If the branch's discovery_brief.md also lacks it: STOP and route the user to discovery.
65
+
66
+ **3. Skill Goal** — Your own `## SKILL GOAL` section above. Load it as the third constraint.
67
+
68
+ Hold all three in working memory throughout the run. Every integration fix, every UX test outcome, every escalation decision checks against all three.
69
+
70
+ ### Alignment Check (before presenting final results)
71
+
72
+ Before presenting final verification results and committing:
73
+
74
+ - **Project North Star**: Walking the live system as a real user, does it deliver the project's stated outcome? This is the ultimate test of the whole pipeline.
75
+ - **Branch Goal** (if branch): Does the system, on this branch, advance what the branch is on the hook for?
76
+ - **Skill Goal**: Is the system actually online and every interaction surface tested — not just compiling cleanly?
77
+
78
+ If any check fails, keep fixing until it passes or flag the gap explicitly in the final results.
79
+
46
80
  ## PROTOCOL
47
81
 
48
82
  ```
@@ -59,7 +93,8 @@ Phase 2: UX validation
59
93
  Step 8: Systematic walkthrough — test every interaction surface
60
94
  Step 9: Fix cycle
61
95
  Step 10: Final verification against discovery brief
62
- Step 11: Exit
96
+ Step 11: Consolidate into trunk architecture (branch mode only)
97
+ Step 12: Exit
63
98
  ```
64
99
 
65
100
  ---
@@ -74,7 +109,7 @@ Read these files:
74
109
  1. `{context_path}/discovery_brief.md` — North Star, stakeholders, constraints
75
110
  2. `{context_path}/tasks.json` — experience slices, tasks with design enrichment, acceptance criteria
76
111
  3. `{context_path}/build_output.json` — what was built, files created/modified, any deviations
77
- 4. `docs/project_notes/project_map.md` — component landscape, interactions
112
+ 4. `docs/project_notes/project_map.md` — operational foundation, capabilities (by slice), component reference
78
113
 
79
114
  From build_output.json, extract: all files created and modified, task statuses, any escalated issues or deviations.
80
115
 
@@ -368,9 +403,29 @@ After the walkthrough is clean (all interactions work):
368
403
 
369
404
  If something drifts, flag it: "All interactions work, but [specific concern about North Star alignment]."
370
405
 
371
- **Update `docs/project_notes/project_map.md`** if integration or testing revealed anything new.
406
+ **Update `docs/project_notes/project_map.md`** if integration or testing revealed anything new — refine `## Capabilities` slices or `## Component Reference` entries. Keep the shape and terseness. **Do not touch `## Project North Star` or `## Branch Goals`.**
407
+
408
+ **Run the GOAL ALIGNMENT → Alignment Check** against the three loaded goals. Any failures must be fixed or explicitly flagged in the final results.
409
+
410
+ ### STEP 11: CONSOLIDATE INTO TRUNK ARCHITECTURE (branch mode only)
411
+
412
+ Skip this step on trunk — there's nothing to consolidate.
413
+
414
+ On a branch, before marking the branch complete, consolidate this branch's additions into trunk architecture in `docs/project_notes/project_map.md`:
415
+
416
+ 1. **`## Capabilities`**: Drop any branch-scoped phrasing from slices this branch added or modified. A slice present in Capabilities is understood to be part of the product — no "(new in X branch)" tags, no status markers, no branch attribution.
417
+ 2. **`## Component Reference`**: Remove any branch markers (e.g., "(school-org branch)", "(new)") from component entries. Components belong to the product, not to the branch that delivered them.
418
+ 3. **`## Operational Foundation`**: Fold any branch-specific language into the main prose. If the branch added auth/deployment/tech-stack detail, it's now just the way the system works.
419
+
420
+ Do not touch `## Project North Star`. Leave `## Branch Goals` alone — the historical record of what each branch was for stays put; it's small and explains why slices exist.
421
+
422
+ Append a row to `docs/project_notes/map_history.md` (create from template if missing; migrate any legacy inline `## Map History` out of `project_map.md` if present):
423
+
424
+ | Date | Phase | Branch | Change | Reason |
425
+ |------|-------|--------|--------|--------|
426
+ | [today ISO date] | Verify | [active_context] | Consolidated into trunk | [one sentence — what this branch delivered] |
372
427
 
373
- ### STEP 11: EXIT
428
+ ### STEP 12: EXIT
374
429
 
375
430
  **Update state.** Read `.project-memory-state.json`. Target active context. Set: `status` → `"complete"`, `workflow.verify.completed` → `true`, `workflow.verify.completed_at` → current ISO timestamp. Set on root: `last_handoff` → current ISO timestamp, `last_handoff_transition` → `"verify_to_complete"`. Write back.
376
431