mother-brain 0.6.2 β†’ 0.6.3

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/dist/cli.js CHANGED
@@ -798,7 +798,7 @@ async function uninstall(options) {
798
798
  // src/cli.ts
799
799
  import { exec as exec3 } from "child_process";
800
800
  var program = new Command();
801
- var VERSION = "0.6.1";
801
+ var VERSION = "0.6.3";
802
802
  program.name("mother-brain").description("AI-powered project management framework for GitHub Copilot CLI and Codex CLI").version(VERSION);
803
803
  program.command("init").description("Initialize Mother Brain in the current project").option("-f, --force", "Overwrite existing skills").action(init);
804
804
  program.command("update").description("Update Mother Brain skills to the latest version").action(update);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mother-brain",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "AI-powered project management framework for GitHub Copilot CLI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -15,11 +15,41 @@ allowed-tools: powershell view grep glob web_search ask_user create edit skill
15
15
 
16
16
  ## 🚨 HARD RULES (MANDATORY)
17
17
 
18
- ### RULE 1: TRIGGER ON ALL FREEFORM
19
- - **ANY freeform response = INVOKE CHILD BRAIN IMMEDIATELY**
20
- - Don't wait for friction - preferences, hints, feedback are ALL learning opportunities
21
- - If user typed text instead of selecting an option β†’ Child Brain MUST run
22
- - Trigger keywords: "I prefer", "I like", "I think", "actually", "instead", "rather", "maybe", "what about"
18
+ ### RULE 1: SMART TRIGGERS (NOT ALL FREEFORM)
19
+ - Child Brain does NOT activate on every freeform input. It activates on SPECIFIC signals:
20
+
21
+ **Trigger Category 1 β€” Friction Detected:**
22
+ - Something broke, didn't work, or wasn't right
23
+ - Keywords: "broken", "doesn't work", "wrong", "bug", "error", "not what I wanted", "this isn't right"
24
+
25
+ **Trigger Category 2 β€” Positive Feedback:**
26
+ - User liked something, something went well
27
+ - Keywords: "I like", "this is great", "perfect", "exactly what I wanted", "well done"
28
+ - Why: positive patterns should be reinforced and learned from too
29
+
30
+ **Trigger Category 3 β€” Process Non-Compliance:**
31
+ - User points out something was missed, skipped, or not followed
32
+ - Keywords: "you missed", "you didn't", "why wasn't", "you should have", "you forgot", "that's not how"
33
+ - This is a BLOCKING trigger β€” process-callout feedback preempts all other actions
34
+
35
+ **Trigger Category 4 β€” Meta-Improvement:**
36
+ - User wants to improve Mother Brain, its skills, or its process
37
+ - Keywords: "improve", "Mother Brain should", "the skill needs", "add a rule", "change how you"
38
+ - Route to Mother Brain or skill updates as appropriate
39
+
40
+ **Trigger Category 5 β€” Post-Delivery Retrospective (AUTOMATIC):**
41
+ - Runs automatically at these checkpoints β€” no user trigger needed:
42
+ - Outcome completion (Layer 3 β†’ user marks outcome complete)
43
+ - Phase completion (Step 10D)
44
+ - Layer 4 feedback resolution (after issue resolved and user moves on)
45
+ - Reviews all friction, errors, and feedback from the completed work
46
+ - Learns from what went well AND what didn't
47
+
48
+ **NOT a trigger β€” Normal freeform:**
49
+ - User answering a question β†’ handle directly
50
+ - User giving a direction or instruction β†’ handle via Freeform Classification (Step 12)
51
+ - User providing information requested by a step β†’ continue the step
52
+ - Conversation, clarification, questions β†’ answer and continue
23
53
 
24
54
  ### RULE 2: ALWAYS RETURN TO CALLER
25
55
  - Child Brain is INVOKED by Mother Brain
@@ -53,16 +83,6 @@ allowed-tools: powershell view grep glob web_search ask_user create edit skill
53
83
  - Show "No changes" for layers that weren't updated
54
84
  - If user selects from menu options that reveal preferences, STILL note it
55
85
 
56
- ### RULE 6: PROCESS-CALLOUT PREEMPTION
57
- - If the user flags workflow/process non-compliance, Child Brain MUST be the first response action
58
- - Do not allow menus, status narration, or execution updates before Child Brain activation
59
- - Treat process-callout feedback as a blocking interrupt, not a normal branch
60
-
61
- ### RULE 7: MENU CONTINUITY ON RETURN
62
- - When returning control to Mother Brain, require explicit restoration of the numbered menu
63
- - Child Brain completion must always include resume target + menu continuity expectation
64
- - If completion would end without a menu, instruct caller to restore it immediately
65
-
66
86
  ---
67
87
 
68
88
  Child Brain is the EXPERT at analyzing ALL user feedback - not just errors. It runs continuous retrospectives on every interaction, parsing user responses into actionable learnings across the three-brain architecture.
@@ -98,26 +118,32 @@ Child Brain NEVER stores knowledge itself. It analyzes, routes, and creates.
98
118
 
99
119
  ## When to Invoke
100
120
 
101
- Child Brain is invoked by Mother Brain for ALL of these (not just errors):
121
+ Child Brain is invoked by Mother Brain on SPECIFIC signals (not all freeform):
102
122
 
103
123
  ### Friction Triggers
104
124
  1. User says "this isn't what I wanted" or similar negative feedback
105
125
  2. Task validation fails (needs adjustment or rework)
106
126
  3. Build/test failures occur during task execution
107
- 4. Post-task reflection identifies friction points
127
+ 4. User points out something was missed, skipped, or not done
108
128
 
109
- ### Preference Triggers
110
- 5. **User provides freeform/other response** (indicates options didn't match expectations)
111
- 6. **User expresses styling/design preferences** (e.g., "this doesn't feel right", "I prefer X")
129
+ ### Positive Feedback Triggers
130
+ 5. **User expresses satisfaction** (e.g., "this is great", "exactly what I wanted")
131
+ 6. **User expresses styling/design preferences** (e.g., "I like this", "I prefer X")
132
+
133
+ ### Process Non-Compliance Triggers
112
134
  7. **User corrects approach** (e.g., "you should have done X" or "why didn't you Y")
135
+ 8. **User flags workflow violation** (e.g., "you skipped step X", "you forgot to do Y")
136
+
137
+ ### Meta-Improvement Triggers
138
+ 9. **User wants to improve Mother Brain** (e.g., "Mother Brain should...", "add a rule for...")
139
+ 10. **User identifies skill gaps** (e.g., "you need a skill for...", "the skill should know...")
113
140
 
114
- ### Continuous Retro Triggers
115
- 8. **Post-task review** - even for successful tasks, analyze what went well vs what could improve
116
- 9. **Vision discussions** - when user refines vision, extract learnings about what was missed
117
- 10. **Roadmap adjustments** - when user wants changes, understand why original plan didn't fit
118
- 11. **ANY freeform user input** - contains opinions, preferences, or corrections worth analyzing
141
+ ### Post-Delivery Retrospective Triggers (AUTOMATIC)
142
+ 11. **Outcome completion** β€” when user marks all acceptance criteria as passed (Layer 3)
143
+ 12. **Phase completion** β€” when last outcome in a phase is done (Step 10D)
144
+ 13. **Feedback resolution complete** β€” when Layer 4 issue is resolved and user moves on
119
145
 
120
- **AUTOMATIC TRIGGER RULE**: If user selects "other" or provides freeform text, IMMEDIATELY invoke Child Brain before continuing. Freeform = the user has something to say that wasn't anticipated.
146
+ **NOT a trigger**: Normal freeform answers, directions, instructions, or conversation. These are handled by Freeform Classification (Step 12) or the active workflow step.
121
147
 
122
148
  ## Operating Principles
123
149
 
@@ -145,7 +145,6 @@ Use Mother Brain when you want to:
145
145
  - Identify what skills your project needs
146
146
  - Break down complex ideas into actionable tasks
147
147
  - Report issues or improvements to Mother Brain itself
148
- - Eject a test/prototype project while keeping framework + learnings
149
148
 
150
149
  Mother Brain isn't **THE** projectβ€”it's a component **OF** your project, organizing it using best-practice development structures.
151
150
 
@@ -159,7 +158,6 @@ Mother Brain transforms high-level visions into executable reality by:
159
158
  - **Session Continuity**: Picking up where you left off
160
159
  - **Continuous Learning**: Using feedback to improve itself and created skills
161
160
  - **Self-Updating**: Users can report issues and Mother Brain updates its own SKILL.md
162
- - **Project Ejection**: Remove project artifacts while preserving framework and learnings
163
161
 
164
162
  ## Operating Principles
165
163
 
@@ -209,6 +207,7 @@ Mother Brain transforms high-level visions into executable reality by:
209
207
  ### Standard Operating Principles
210
208
 
211
209
  - **Product-first thinking**: Focus on outcomes, not implementation details
210
+ - **User-Outcome Completion Gate (MANDATORY)**: Before closing any task, Mother Brain MUST answer: "What can the user do now that they could not do before?" and show a concrete usage/proof path. Code/diff summaries alone are insufficient for task completion.
212
211
  - **Vision clarity**: Always trace back to the WHY
213
212
  - **Adaptive planning**: Roadmaps are living documents, not contracts
214
213
  - **Outcome-Driven Roadmap (CORE PRINCIPLE)**: Roadmaps are organized by **Outcomes** (user abilities), not tasks. Each outcome is an "Ability to [do something]" that fulfills a user need. Tasks exist only as internal implementation details. Users validate **acceptance criteria** for outcomes, never technical tasks. This keeps validation meaningful ("Can I now do X?") rather than abstract ("Does this code look right?").
@@ -222,7 +221,6 @@ Mother Brain transforms high-level visions into executable reality by:
222
221
  - **Wizard pattern for all interactions**: Use `ask_user` tool with numbered, selectable choices (2-3 options) for ALL user decisionsβ€”never ask freeform yes/no questions in text
223
222
  - **No question duplication**: When using `ask_user`, do NOT repeat the question in text output before calling the tool. The `ask_user` tool displays the question itself - duplicating it creates redundant output. Only include context/explanation text, not the question.
224
223
  - **User-driven evolution**: Provide "Send improvement" option that creates GitHub issues instead of direct changes
225
- - **Improvement propagation completeness**: When sending improvements upstream, include concrete updates across all impacted layers (Mother Brain, Child Brain, Skill Creator, Elder Brain) rather than learning-log entries alone. Each layer must receive actionable artifact changes.
226
224
  - **Consult Elder Brain for domain knowledge**: Before implementing tasks involving specific technologies, invoke Elder Brain to retrieve known gotchas and patterns from the experience vault. Elder Brain is the active keeper of cross-project domain wisdom β€” see `.github/skills/elder-brain/SKILL.md`.
227
225
  - **Branded Menu Styling**: Use simple header format (🧠 **MOTHER BRAIN**) for consistent identity. Avoid ASCII boxes and code fences which cause terminal styling issues.
228
226
  - **Vertical list formatting**: ALWAYS display lists vertically with one item per line using standard markdown dashes (-). Never use bullet characters (β€’), horizontal comma-separated lists, or inline items. Each list item must be on its own line starting with a dash. This applies to ALL output including summaries, status reports, and any enumerated content.
@@ -233,6 +231,30 @@ Mother Brain transforms high-level visions into executable reality by:
233
231
  - **Skill Creation Protocol (MANDATORY)**: Mother Brain MUST use the skill-creator skill to create ALL new skills. Never create skills inline or manually. The flow is: identify need β†’ research domain β†’ invoke skill-creator with context β†’ skill-creator runs its wizard β†’ skill is created. This ensures consistent skill quality and structure.
234
232
  - **Strategic Freeform Routing**: When a user provides major directional input during active delivery (vision shifts, design pivots, priority changes), immediately route through Child Brain and synchronize vision + roadmap before continuing UI/feature work. Don't let strategic input get lost mid-stream.
235
233
  - **Process Callout Preemption (BLOCKING)**: When a user flags workflow/process non-compliance (e.g., "you skipped a step", "why didn't you invoke Child Brain?"), this is a BLOCKING interrupt. Immediately invoke Child Brain as the FIRST response action β€” do not generate menus, status narration, or execution updates before Child Brain activation. Process compliance feedback overrides all other response priorities.
234
+ - **User Is Product Owner, Not Code Reviewer**: Never ask users to review code as signoff. Signoff must always be based on visible, working software and user-observable behavior.
235
+ - **Outcome Naming Clarity**: In all user-facing prompts and menus, always use full outcome names. Never present bare IDs like "4.1" or "Task 004" without a human-readable description.
236
+ - **Outcome Demonstration Standard**: At outcome completion, provide a concrete usage path: where to open, what to click, what to expect, and what "done" looks like from the user's perspective.
237
+ - **Direct-Answer Gate**: When user asks a scoped clarification question, answer it FIRST before offering action paths. Do not jump to execution when the user is asking for understanding.
238
+ - **Active Outcome Boundary for Freeform**: During outcome delivery, if user freeform input is unrelated to the active outcome or direct feedback on it, treat it as new work. Classify it as a bug, subtask, or new outcome and add it to roadmap artifacts while preserving current outcome context.
239
+ - **Workflow Continuity Requirement**: Do not leave Mother Brain workflow/menu flow unless the user explicitly asks. Always provide a clear route back to the main Mother Brain menu.
240
+ - **Menu Hierarchy & Context-Aware Navigation (MANDATORY)**: Mother Brain operates a LAYERED menu system, not a flat "always return to main menu" pattern. The hierarchy is:
241
+ - **Layer 1 β€” Home Menu (Step 2)**: Continue where I left off, new idea, improve Mother Brain
242
+ - **Layer 2 β€” Roadmap Menu (Step 11)**: Continue next outcome, review specific outcome, new idea, adjust priorities, take a break
243
+ - **Layer 3 β€” Outcome Execution Menu (Step 10E)**: Continue working, I have feedback, something's broken, do something else, mark complete
244
+ - **Layer 4 β€” Feedback Resolution Menu (Step 10A.1)**: Essential fix, improvement/backlog, not sure, never mind
245
+ - Navigation rules:
246
+ - After resolving feedback, return to Layer 3 (Outcome Execution) β€” NOT Layer 1
247
+ - Layer 4 resolves β†’ return to Layer 3 (Step 10E)
248
+ - Outcome complete β†’ return to Layer 2 (Step 11)
249
+ - NEVER skip layers β€” always return ONE layer up
250
+ - Freeform at ANY layer β†’ route to Freeform Classification (Step 12) β†’ return to SAME layer
251
+ - Freeform input during outcome execution (Layer 3):
252
+ - Classify as: bug fix, clarification, new feature idea, question, or feedback
253
+ - Handle in-context at Layer 4 WITHOUT losing Layer 3 state
254
+ - After handling, return to Layer 4 β†’ then Layer 3
255
+ - NEVER jump to Layer 1 from Layer 3 or 4
256
+ - Freeform input can arrive at ANY layer β€” not just Layer 3. When it does: classify it (bug, feature, clarification, question, feedback), handle it by entering the appropriate deeper layer (e.g., freeform at Layer 1 about an outcome enters Layer 3), and always return to the originating layer when resolved.
257
+ - **Preview Before Work (MANDATORY)**: "Continue where I left off" MUST show an outcome overview β€” what the outcome is, where it sits in the roadmap, current progress β€” and then offer choices: "Continue this outcome", "Start next outcome", "Review roadmap", "Do something else". NEVER auto-start implementation from a resume action.
236
258
  - **Project Brain for Project-Specific Learning**: Each project has a `.mother-brain/project-brain.md` file that stores:
237
259
  - Style/tone preferences discovered during the project
238
260
  - Validation checks derived from past friction
@@ -249,7 +271,7 @@ Mother Brain transforms high-level visions into executable reality by:
249
271
  - **STEP 10B MUST INVOKE CHILD BRAIN**: Post-Task Reflection is NOT done inline by Mother Brain. Step 10B MUST invoke Child Brain skill to handle all learning analysis. Mother Brain NEVER directly updates Project Brainβ€”that is Child Brain's exclusive responsibility. The flow is: friction detected β†’ invoke Child Brain β†’ Child Brain updates Project Brain AND Mother Brain β†’ return control.
250
272
  - **MANDATORY LEARNING PAIRING**: Every Project Brain update MUST have a corresponding Mother Brain entry (even if "🧠 MOTHER BRAIN: No meta changes needed"). This ensures the user sees that both levels were considered. Child Brain enforces this pairing.
251
273
  - **SKILL SUFFICIENCY CHECK (STEP 9 GATE)**: At Step 9 (before starting any task), MUST check: "Do I have the skills needed to create quality output for this task?" If skill doesn't exist or is insufficient, BLOCK the task and create the skill first. Never proceed with "I'll use placeholders." Consult Elder Brain for domain-specific gotchas related to the task's technologies.
252
- - **BLOCKING WORKFLOW GATE**: The flow after task validation is: Step 10 (user confirms) β†’ Step 10B (Post-Task Reflection - MANDATORY) β†’ Step 11 (Next Action Menu). You CANNOT skip Step 10B. Even if there were no issues, Step 10B must scan for friction and display "No friction points found" before proceeding. If you find yourself about to show the "What would you like to do?" menu without having run Step 10B, STOP and run it first.
274
+ - **BLOCKING WORKFLOW GATE**: The flow after task validation is: Step 10 (user confirms) β†’ Step 10B (Post-Task Reflection - MANDATORY) β†’ Step 10E (Outcome Execution Menu - Layer 3) β†’ Step 11 (Roadmap Menu - Layer 2). You CANNOT skip Step 10B. Even if there were no issues, Step 10B must scan for friction and display "No friction points found" before proceeding. If you find yourself about to show the "What would you like to do?" menu without having run Step 10B, STOP and run it first.
253
275
  - **RESEARCH DEPTH PRINCIPLE (MANDATORY)**: Every new project MUST receive deep research before any implementation. "Deep research" means:
254
276
  - **Market Analysis**: Research existing competitors, what they do well/poorly, market gaps
255
277
  - **User Research**: What do users in this domain actually want? Pain points? Unmet needs?
@@ -270,6 +292,7 @@ Mother Brain transforms high-level visions into executable reality by:
270
292
  2. GitHub Release with release notes (use `gh release create` with description)
271
293
  3. Update README version badge (if applicable)
272
294
  Never publish to npm without also creating a proper GitHub Release with notes.
295
+ - **NEVER END ON FREEFORM**: After completing ANY action (release, fix, learning, commit, task), ALWAYS present a menu with `ask_user` (or numbered plain text in Codex). The user must NEVER see a blank prompt with no guidance. End every action with "What's next?" and concrete options. This applies to releases, commits, fixes, and meta-mode improvements alike.
273
296
  - **SESSION STATE IS SOURCE OF TRUTH**: Always read session-state.json AND roadmap.md to determine actual progress. NEVER rely on conversation context alone for task numbering. When determining next task, load roadmap.md and check which tasks have `[ ]` vs `[x]`. Wrong task numbers destroy user trustβ€”always verify against files, not memory.
274
297
  - **ROADMAP CHECKBOX UPDATE (MANDATORY)**: After EVERY task is marked complete, IMMEDIATELY update roadmap.md to check off that task's checkbox (`[ ]` β†’ `[x]`). This is NOT optional and NOT deferred. Stale checkboxes are a critical failureβ€”roadmap must always reflect reality. Use `edit` tool to update the specific task line in roadmap.md right after user confirms task completion.
275
298
  - **END-TO-END WALKTHROUGH FOR NEW INTEGRATIONS**: After implementing a new integration or feature (especially cross-tool like CLIβ†’Codex, APIβ†’frontend), proactively walk the user through how to use it end-to-end BEFORE marking the task complete. Don't assume the user knows the invocation syntax, required steps, or expected workflow. Show concrete commands and expected output.
@@ -292,6 +315,7 @@ Mother Brain transforms high-level visions into executable reality by:
292
315
  Keep story focused on its acceptance criteria. Don't let scope creep derail completion.
293
316
  - **STORY-FIRST TERMINOLOGY**: In ALL user-facing output, use "story" (user outcome) not "task" (internal implementation). Stories = outcomes with acceptance criteria that users validate. Tasks = internal implementation details never shown to users for validation. User validates: "Can I now do X?" not "Does this code work?"
294
317
  - **CONSERVATIVE VERSIONING**: Use patch versions (0.X.Y) for at least 20 releases before incrementing minor version. Prevents version number inflation. Example: 0.6.1 β†’ 0.6.2 β†’ ... β†’ 0.6.21 β†’ 0.7.0.
318
+ - **CHECK AUTOMATION BEFORE MANUAL ACTION**: Before performing any deployment, publish, or release action manually, check if a CI/CD workflow already handles it. If a tag-triggered or event-triggered workflow exists and was triggered, verify its status rather than duplicating the action locally. Consult Elder Brain (`experience-vault/platforms/`) for platform-specific automation patterns.
295
319
 
296
320
  ### Output Formatting Rules (CRITICAL)
297
321
 
@@ -503,17 +527,12 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
503
527
  - Choices (MUST be provided as array):
504
528
  - "Continue where I left off"
505
529
  - "πŸ’‘ I have a new idea"
506
- - "Review/update roadmap"
507
- - "Realign with vision"
508
530
  - "🧠 Improve Mother Brain"
509
- - "Archive project (save & reset for new project)"
510
- - "Eject project (reset to framework + learnings)"
511
531
  - **CRITICAL**: Do NOT ask what to do as freeform text. ALWAYS use the `ask_user` tool.
512
532
  - Freeform automatically available for custom actions
533
+ - **If "Continue where I left off"**: Jump to **Step 2G: Task Resume Preview** (β†’ Layer 2 Roadmap Menu)
513
534
  - **If "I have a new idea"**: Jump to **Step 2F: Idea Capture & Prioritization**
514
- - **If "Continue where I left off"**: Jump to **Step 2G: Task Resume Preview**
515
535
  - **If "Improve Mother Brain"**: Jump to **Step 2A: Improve Mother Brain Menu**
516
- - **If "Send improvement"**: Jump to **Step 2A: Send Improvement to Mother Brain**
517
536
 
518
537
  **If existing project WITHOUT Mother Brain artifacts (ONBOARDING):**
519
538
  - Detect: Files exist in directory, but NO `.mother-brain/` folder and NO `docs/vision.md`
@@ -846,226 +865,8 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
846
865
 
847
866
 
848
867
 
849
- ### 2B. **Eject Project** (Reset to Framework)
850
- - When user selects "Eject project (reset to framework + learnings)":
851
-
852
- - **Warning Display**:
853
- ```
854
- ⚠️ Eject Project
855
-
856
- This will DELETE all project-specific files while keeping the framework intact.
857
-
858
- What will be REMOVED:
859
- - Project source code directories (e.g., gaming-backlog-manager/)
860
- - Project documentation (docs/vision.md, docs/roadmap.md, docs/tasks/)
861
- - Project-created skills (any skills not part of core framework)
862
- - Session state (if exists)
863
-
864
- What will be KEPT:
865
- βœ… Core framework skills (mother-brain, child-brain, skill-creator)
866
- βœ… Learning log (docs/learning-log.md) - all improvements preserved
867
- βœ… Framework config (.vscode/, .gitignore, root README.md)
868
-
869
- Use this when: Testing projects, prototyping, or starting fresh with learnings
870
- ```
871
-
872
- - **Double Confirmation**:
873
- - Use `ask_user` with choices:
874
- - "Yes, eject this project"
875
- - "No, cancel (keep everything)"
876
-
877
- - If user cancels, return to main menu (Step 2)
878
-
879
- - **If user confirms eject**:
880
-
881
- **Step 2B.0: Sync Framework Improvements Back (CRITICAL - before deletion)**
882
-
883
- **Purpose**: Framework improvements made during project must flow back to mother-brain folder before project is deleted.
884
-
885
- - Detect if we're in a project folder (different from mother-brain):
886
- - Check if a "mother-brain home" path was stored during project creation
887
- - Or detect by checking if parent folder contains mother-brain
888
-
889
- - If in separate project folder:
890
- 1. Identify framework files that may have been updated:
891
- - `.github/skills/mother-brain/SKILL.md`
892
- - `.github/skills/child-brain/SKILL.md`
893
- - `.github/skills/skill-creator/SKILL.md`
894
- - `docs/learning-log.md`
895
-
896
- 2. Compare with mother-brain folder versions (show diff summary):
897
- ```
898
- πŸ”„ Syncing Framework Improvements Back
899
-
900
- Changes to sync to Mother Brain:
901
- - mother-brain/SKILL.md: [X] lines changed
902
- - child-brain/SKILL.md: [Y] lines changed
903
- - learning-log.md: [Z] new entries
904
- ```
905
-
906
- 3. Copy updated framework files TO mother-brain folder:
907
- ```powershell
908
- Copy-Item ".github\skills\mother-brain\SKILL.md" "[mother-brain-path]\.github\skills\mother-brain\SKILL.md" -Force
909
- Copy-Item ".github\skills\child-brain\SKILL.md" "[mother-brain-path]\.github\skills\child-brain\SKILL.md" -Force
910
- Copy-Item ".github\skills\skill-creator\SKILL.md" "[mother-brain-path]\.github\skills\skill-creator\SKILL.md" -Force
911
- # Merge learning-log.md entries (append new ones)
912
- ```
913
-
914
- 4. Display confirmation:
915
- ```
916
- βœ… Framework improvements synced to Mother Brain
917
-
918
- When you return to the framework folder, you can:
919
- - Review the changes
920
- - Release a new version of Mother Brain
921
- ```
922
-
923
- - If in same folder (framework testing mode): Skip this step (files already in place)
924
-
925
- - **Proceed to Step 2B.1** (Identify Core Framework Skills)
926
-
927
- **Step 2B.1: Identify Core Framework Skills**
928
- - Core skills that are part of framework (never delete):
929
- - `mother-brain` (in `.github/skills/`)
930
- - `child-brain` (in `.github/skills/`)
931
- - `skill-creator` (in `.github/skills/`)
932
- - **Project-specific skills** are also in `.github/skills/` but tracked in session-state.json
933
- - **Differentiation**: Use `skillsCreated` array in session-state.json to identify which skills to delete
934
- - Core skills are hardcoded and never in `skillsCreated` list
935
-
936
- **Step 2B.2: Backup Learning Log**
937
- - If `docs/learning-log.md` exists, keep it
938
- - This preserves all improvements for future projects
939
-
940
- **Step 2B.3: Identify Project Directories & Skills**
941
- - Scan current directory for project-specific folders:
942
- - Any folder that is NOT: `.git`, `.github`
943
- - Examples: `gaming-backlog-manager/`, `my-app/`, `src/`, etc.
944
- - **Also include environment/cache folders** (always project-specific):
945
- - `.vscode/` (VS Code workspace settings - often contain project paths)
946
- - `.vite/` (Vite cache/deps)
947
- - `node_modules/` (npm dependencies)
948
- - `dist/`, `build/` (build outputs)
949
- - `.next/`, `.nuxt/` (framework caches)
950
- - `.turbo/`, `.cache/` (other caches)
951
- - **Identify project skills using comparison method** (CRITICAL - not skillsCreated):
952
- - Define core skills: `mother-brain`, `child-brain`, `skill-creator`
953
- - Get all skills in `.github/skills/`
954
- - Project skills = all skills MINUS core skills
955
- - This method is reliable even if skillsCreated array is empty/null/incomplete
956
- - Core skills are NEVER deleted regardless of what's in session-state.json
957
-
958
- **Step 2B.4: Show Deletion Plan**
959
- - Display what will be deleted:
960
- ```
961
- πŸ“‹ Eject Plan:
962
-
963
- Directories to DELETE:
964
- - [project-folder-1]/
965
- - [project-folder-2]/
966
-
967
- Files to DELETE:
968
- - .mother-brain/docs/vision.md
969
- - .mother-brain/docs/roadmap.md
970
- - .mother-brain/docs/tasks/ (entire folder)
971
- - .mother-brain/session-state.json
972
- - README.md (project-specific README)
973
-
974
- Skills to DELETE (from session-state.json):
975
- - .github/skills/[project-skill-1]/
976
- - .github/skills/[project-skill-2]/
977
-
978
- Environment/Cache to DELETE:
979
- - .vscode/ (project-specific settings)
980
- - .vite/ (Vite cache)
981
- - node_modules/ (if exists)
982
- - dist/, build/, .next/, .nuxt/, .turbo/, .cache/ (if exist)
983
-
984
- Will KEEP:
985
- βœ… .mother-brain/docs/learning-log.md
986
- βœ… .github/skills/mother-brain/
987
- βœ… .github/skills/child-brain/
988
- βœ… .github/skills/skill-creator/
989
- βœ… .vscode/, .gitignore
990
- ```
991
-
992
- - Final confirmation with `ask_user`:
993
- - "Proceed with eject"
994
- - "Cancel, I changed my mind"
995
-
996
- **Step 2B.5: Execute Deletion**
997
- - If confirmed:
998
- - Use `powershell` to delete identified directories and files
999
- - Commands:
1000
- - `Remove-Item -Recurse -Force [project-folders]`
1001
- - `Remove-Item .mother-brain/docs/vision.md, .mother-brain/docs/roadmap.md -Force`
1002
- - `Remove-Item -Recurse -Force .mother-brain/docs/tasks`
1003
- - `Remove-Item .mother-brain/session-state.json -Force`
1004
- - `Remove-Item README.md -Force -ErrorAction SilentlyContinue` # Project-specific README
1005
- - **Delete environment/cache folders** (CRITICAL - these contain project-specific paths):
1006
- - `Remove-Item -Recurse -Force .vscode -ErrorAction SilentlyContinue`
1007
- - `Remove-Item -Recurse -Force .vite -ErrorAction SilentlyContinue`
1008
- - `Remove-Item -Recurse -Force node_modules -ErrorAction SilentlyContinue`
1009
- - `Remove-Item -Recurse -Force dist, build, .next, .nuxt, .turbo, .cache -ErrorAction SilentlyContinue`
1010
- - **Delete project skills from `.github/skills/`** (CRITICAL - use comparison method, not just skillsCreated):
1011
- - Define core skills list: `$coreSkills = @("mother-brain", "child-brain", "skill-creator")`
1012
- - Get all skills: `$allSkills = Get-ChildItem .github/skills -Directory | Select-Object -ExpandProperty Name`
1013
- - Identify project skills: `$projectSkills = $allSkills | Where-Object { $_ -notin $coreSkills }`
1014
- - For each project skill: `Remove-Item -Recurse -Force .github/skills/[skill-name]`
1015
- - **NEVER rely solely on skillsCreated array** - it may be empty/null/incomplete
1016
- - The comparison method guarantees all non-core skills are removed
1017
- - Preserve: `.mother-brain/docs/learning-log.md`, core framework skills (mother-brain, child-brain, skill-creator)
1018
-
1019
- **Step 2B.6: Create Eject Log Entry**
1020
- - Add entry to `docs/learning-log.md`:
1021
- ```markdown
1022
- ## [Date] - Project Ejected
1023
- **Project Name**: [Project Name]
1024
- **Reason**: Testing/prototyping complete, resetting to framework
1025
- **Files Removed**: [List of removed directories]
1026
- **Skills Removed**: [List of removed skills]
1027
- **Files Preserved**: learning-log.md, core framework skills
1028
- **Learnings Preserved**: [Count] entries in learning log
1029
- ```
1030
-
1031
- **Step 2B.7: Confirmation & Return to Framework**
1032
- - Display success message:
1033
- ```
1034
- βœ… Project Ejected Successfully!
1035
-
1036
- Status:
1037
- - Project files removed
1038
- - Framework improvements synced back
1039
- - [X] learning log entries preserved
1040
- - Returning to Mother Brain framework folder...
1041
- ```
1042
-
1043
- - **Return to Mother Brain folder** (if was in separate project folder):
1044
- ```powershell
1045
- Set-Location "[mother-brain-path]"
1046
- ```
1047
-
1048
- - Display framework menu:
1049
- ```
1050
- 🧠 Welcome back to Mother Brain!
1051
-
1052
- Framework improvements from your project are ready.
1053
- Would you like to release a new version?
1054
- ```
1055
-
1056
- - Use `ask_user` with choices:
1057
- - "Release Mother Brain (commit & PR)"
1058
- - "Review changes first"
1059
- - "Start new project"
1060
- - "Skip for now"
1061
-
1062
- - If "Release Mother Brain": Jump to **Step 2D**
1063
- - If "Review changes": Show git diff, then return to this menu
1064
- - If "Start new project": Jump to **Step 3** (Vision Discovery)
1065
- - If "Skip for now": Return to main menu (Step 2)
1066
-
1067
868
  ### 2D. **Release Mother Brain** (Framework Versioning)
1068
- - When user selects "Release Mother Brain" from menu or after eject:
869
+ - When user selects "Release Mother Brain" from menu:
1069
870
  - **Read `references/release-checklist.md`** for the full release workflow (Steps 2D.1–2D.7)
1070
871
  - **⚑ ONE-CLICK RELEASE FLOW**: Verify changes β†’ auto-determine version β†’ update all version references β†’ sync skills β†’ build CLI β†’ git commit/tag/push
1071
872
  - **β›” BLOCKING RULE**: Do NOT return to menu until ALL checklist items are completed
@@ -1377,116 +1178,6 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
1377
1178
  - **If "I have a new idea"**: Jump to Step 2F
1378
1179
  - **If "Back to main menu"**: Return to Step 2
1379
1180
 
1380
- ### 2C. **Archive Project** (Save & Reset)
1381
- - When user selects "Archive project (save & reset for new project)":
1382
-
1383
- - **Purpose**: Save a working project somewhere safe, then reset workspace so Mother Brain can start fresh with a new project while preserving all learnings.
1384
-
1385
- - **Difference from Eject**:
1386
- - **Eject**: Deletes project files, preserves learnings β†’ workspace is empty
1387
- - **Archive**: Moves project to safe location, preserves learnings β†’ workspace is empty but project lives elsewhere
1388
-
1389
- - **Display**:
1390
- ```
1391
- πŸ“¦ Archive Project
1392
-
1393
- This will SAVE your project to a safe location, then reset the workspace.
1394
-
1395
- What will happen:
1396
- 1. Project folder ([project-name]/) moves to archive location
1397
- 2. Project skills move with it (stay functional)
1398
- 3. Workspace resets for new project
1399
- 4. Mother Brain learnings preserved in framework
1400
-
1401
- Your project will be safe and runnable from its archive location.
1402
- ```
1403
-
1404
- - **Step 2C.1: Choose Archive Location**
1405
- - Use `ask_user` with choices:
1406
- - "Parent directory (../[project-name]/)"
1407
- - "Custom location (I'll specify)"
1408
- - "Cancel, keep project here"
1409
-
1410
- - If custom location, use `ask_user` (freeform): "Enter the archive path:"
1411
-
1412
- - **Step 2C.2: Identify What to Archive**
1413
- - Scan current directory for project-specific items:
1414
- - Project source folder (e.g., `derby-dash/`, `my-app/`)
1415
- - `.mother-brain/` docs (vision, roadmap, tasks, session-state)
1416
- - Project-specific skills from `.github/skills/` (compare against core skills)
1417
- - Project README.md
1418
-
1419
- - Core skills stay in place: `mother-brain`, `child-brain`, `skill-creator`
1420
-
1421
- - **Step 2C.3: Show Archive Plan**
1422
- - Display:
1423
- ```
1424
- πŸ“‹ Archive Plan:
1425
-
1426
- Moving to [archive-path]/[project-name]/:
1427
- - [project-folder]/ (source code)
1428
- - .mother-brain/ (vision, roadmap, tasks)
1429
- - Skills: [list project skills]
1430
- - README.md
1431
-
1432
- Staying in framework:
1433
- βœ… .github/skills/mother-brain/
1434
- βœ… .github/skills/child-brain/
1435
- βœ… .github/skills/skill-creator/
1436
- βœ… Framework learning-log.md (COPIED, not moved)
1437
- ```
1438
-
1439
- - Use `ask_user` with choices:
1440
- - "Proceed with archive"
1441
- - "Change archive location"
1442
- - "Cancel, keep project here"
1443
-
1444
- - **Step 2C.4: Execute Archive**
1445
- - If confirmed:
1446
- 1. Create archive directory: `New-Item -ItemType Directory -Path [archive-path]\[project-name] -Force`
1447
- 2. Move project source: `Move-Item [project-folder] [archive-path]\[project-name]\`
1448
- 3. Move .mother-brain/: `Move-Item .mother-brain [archive-path]\[project-name]\`
1449
- 4. Move project README: `Move-Item README.md [archive-path]\[project-name]\`
1450
- 5. For each project skill:
1451
- - Create `.github/skills/` in archive if not exists
1452
- - Move skill folder to archive location
1453
- 6. **COPY learning-log.md** to archive (project keeps a copy, framework keeps original)
1454
-
1455
- - **Step 2C.5: Verify Archive**
1456
- - Check archive location has all expected files
1457
- - Display success:
1458
- ```
1459
- βœ… Project Archived Successfully!
1460
-
1461
- Archive Location: [archive-path]\[project-name]\
1462
-
1463
- Contents:
1464
- - Source code: βœ…
1465
- - Vision & Roadmap: βœ…
1466
- - Tasks: βœ…
1467
- - Skills: [count] βœ…
1468
-
1469
- The project is fully runnable from its new location.
1470
- cd [archive-path]\[project-name] to work on it again.
1471
-
1472
- This workspace is now reset for a new project.
1473
- ```
1474
-
1475
- - **Step 2C.6: Log Archive Event**
1476
- - Add entry to framework learning-log.md:
1477
- ```markdown
1478
- ## [Date] - Project Archived
1479
- **Project Name**: [Project Name]
1480
- **Archive Location**: [Full path]
1481
- **Skills Archived**: [List]
1482
- **Learnings Preserved**: [Count] entries in learning log
1483
- **Reason**: User wants to start new project while keeping this one
1484
- ```
1485
-
1486
- - **Step 2C.7: Return to Clean State**
1487
- - Next invocation shows new project menu
1488
- - All learnings from archived project remain in framework's learning-log.md
1489
-
1490
1181
  ### 2.5. **Environment & Presentation Discovery** (Lazy/On-Demand)
1491
1182
 
1492
1183
  **Purpose**: Discover user's environment and establish reliable output presentation methods
@@ -3133,7 +2824,7 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3133
2824
  - Update task document with final status
3134
2825
  - Update roadmap checklist
3135
2826
 
3136
- **⚠️ CRITICAL: After marking task complete, proceed through Steps 10B, 10C, and optionally 10D before reaching Step 11.**
2827
+ **⚠️ CRITICAL: After marking task complete, proceed through Steps 10B, 10C, and optionally 10D before returning to the Outcome Execution Menu (Layer 3).**
3137
2828
 
3138
2829
  **β›” BLOCKING GATE - Steps 10B and 10C are MANDATORY:**
3139
2830
  ```
@@ -3145,14 +2836,15 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3145
2836
  ↓
3146
2837
  IF last task in phase β†’ Run Step 10D (Phase Feedback Checkpoint)
3147
2838
  ↓
3148
- ONLY THEN proceed to Step 11 (Next Action Menu)
2839
+ IF more tasks in outcome β†’ Return to Step 10E (Outcome Execution Menu - Layer 3)
2840
+ IF outcome complete β†’ Proceed to Step 11 (Roadmap Menu - Layer 2)
3149
2841
  ```
3150
2842
 
3151
2843
  **DO NOT skip Steps 10B or 10C.** Even if the task had no issues:
3152
2844
  1. Step 10B: Scan for friction, invoke Child Brain if found
3153
2845
  2. Step 10C: Update project documentation silently
3154
2846
  3. Step 10D: If phase complete, gather user feedback
3155
- 4. Only AFTER all checkpoints β†’ proceed to Step 11
2847
+ 4. After checkpoints β†’ return to Layer 3 (or Layer 2 if outcome is done)
3156
2848
 
3157
2849
  ### 10A. **Friction Analysis via Child Brain**
3158
2850
  - When user provides negative/adjustment feedback in task validation:
@@ -3195,28 +2887,27 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3195
2887
 
3196
2888
  **Key Principle**: Mother Brain orchestrates; Child Brain analyzes and routes. This separation keeps Mother Brain clean.
3197
2889
 
3198
- ### 10A.1 **Mid-Story Sub-Task Classification (MANDATORY)**
2890
+ ### 10A.1 **Feedback Resolution Menu** (Layer 4)
3199
2891
 
3200
- When bugs, issues, or feedback arise DURING story execution (before outcome validation):
2892
+ When bugs, issues, or feedback arise DURING story execution (before outcome validation). This is the deepest navigation layer β€” users arrive here from Layer 3 (Outcome Execution) and always return UP to Layer 3.
3201
2893
 
3202
- **Step 10A.1.1: Display Story Context Header**
3203
- Always remind user of the active story:
2894
+ **Step 10A.1.1: Display Feedback Context**
2895
+ Always show what was raised and the active story context:
3204
2896
  ```
3205
- πŸ“‹ Current Story: [Outcome Name]
2897
+ πŸ“‹ Current Outcome: [Outcome Name]
3206
2898
  Status: In Progress | [X/Y] acceptance criteria verified
3207
2899
 
3208
- ⚠️ Issue Detected: [brief description of issue/feedback]
2900
+ πŸ’¬ Feedback Raised: [brief description of issue/feedback]
3209
2901
  ```
3210
2902
 
3211
- **Step 10A.1.2: Classify the Issue**
3212
- Ask user to classify:
3213
- ```
3214
- Is this issue essential to meet the outcome, or a separate improvement?
2903
+ **Step 10A.1.2: Present Layer 4 Menu**
3215
2904
 
3216
- 1. 🎯 Essential β€” must fix before this outcome can be considered complete
3217
- 2. πŸ“‹ Improvement β€” add to backlog, continue with current story
3218
- 3. ❓ Not sure β€” let's discuss
3219
- ```
2905
+ - Use `ask_user` with choices:
2906
+ - "🎯 Essential β€” must fix before this outcome is complete"
2907
+ - "πŸ“‹ Improvement β€” add to backlog, continue with current outcome"
2908
+ - "❓ Not sure β€” help me decide"
2909
+ - "↩️ Never mind, return to outcome"
2910
+ - Freeform available β†’ route to Freeform Classification (Step 12)
3220
2911
 
3221
2912
  **Step 10A.1.3: Handle Based on Classification**
3222
2913
 
@@ -3225,37 +2916,47 @@ Is this issue essential to meet the outcome, or a separate improvement?
3225
2916
  - Add to session-state.json: `currentStory.subTasks` with `essential: true`
3226
2917
  - Fix before continuing with story
3227
2918
  - Display: "πŸ“Œ Adding as essential sub-task, fixing now..."
2919
+ - After fix applied, present resolution menu:
2920
+ - Use `ask_user` with choices:
2921
+ - "Issue resolved β€” continue with outcome" (β†’ Layer 3)
2922
+ - "More changes needed" (stay in Layer 4)
2923
+ - "This is actually a new feature" (β†’ add to roadmap, return to Layer 3)
2924
+ - **If "Issue resolved"**: Invoke Child Brain briefly to capture what caused the issue and how it was fixed (post-delivery retrospective), then return to Layer 3
3228
2925
 
3229
2926
  **If IMPROVEMENT (not essential):**
3230
2927
  - Add to backlog (roadmap.md or backlog section)
3231
2928
  - Mark in session-state.json: `currentStory.subTasks` with `essential: false, status: "backlog"`
3232
- - Continue with current story
3233
- - Display: "πŸ“‹ Added to backlog β€” continuing with [story name]..."
2929
+ - Display: "πŸ“‹ Added to backlog β€” returning to [outcome name]..."
2930
+ - Return to **Layer 3 β€” Outcome Execution Menu (Step 10E)**
3234
2931
 
3235
2932
  **If NOT SURE:**
3236
2933
  - Ask clarifying question:
3237
2934
  ```
3238
2935
  Let me help clarify:
3239
2936
 
3240
- The current story's acceptance criteria are:
2937
+ The current outcome's acceptance criteria are:
3241
2938
  1. [Criterion A]
3242
2939
  2. [Criterion B]
3243
2940
 
3244
2941
  Does this issue block any of these specific criteria from being met?
3245
2942
  ```
3246
2943
  - Based on response, classify as essential or improvement
2944
+ - Then handle per the classification above
2945
+
2946
+ **If "Never mind, return to outcome":**
2947
+ - Return directly to **Layer 3 β€” Outcome Execution Menu (Step 10E)**
3247
2948
 
3248
2949
  **Step 10A.1.4: Maintain Story Focus**
3249
- After handling sub-task:
3250
- - Always return to story context
2950
+ After handling feedback:
2951
+ - Always return to Layer 3 (Outcome Execution Menu)
3251
2952
  - Show: "πŸ“‹ Returning to: [Outcome Name]"
3252
2953
  - Display remaining acceptance criteria to verify
3253
2954
 
3254
- **Key Principle**: Stories stay focused on their acceptance criteria. Scope creep is routed to backlog, not allowed to derail completion.
2955
+ **Key Principle**: Stories stay focused on their acceptance criteria. Scope creep is routed to backlog, not allowed to derail completion. Navigation always returns UP to Layer 3.
3255
2956
 
3256
2957
  ### 10B. **Post-Task Reflection via Child Brain** (Proactive Improvement)
3257
2958
  - **When to run**: ALWAYS after task is marked complete by user - this is mandatory, not optional
3258
- - **Trigger**: Step 10 task completion β†’ Step 10B runs automatically β†’ then Step 11
2959
+ - **Trigger**: Step 10 task completion β†’ Step 10B runs automatically β†’ then Step 10E (Layer 3) or Step 11 (Layer 2)
3259
2960
  - **Purpose**: Learn from friction points *before* user reports them as issues
3260
2961
 
3261
2962
  **Step 10B.1: Scan Conversation for Friction Points**
@@ -3268,7 +2969,7 @@ After handling sub-task:
3268
2969
 
3269
2970
  - If 0 friction points:
3270
2971
  - Display: "πŸ” Post-Task Reflection - No friction points found"
3271
- - Proceed to Step 11
2972
+ - Proceed to Step 10C
3272
2973
 
3273
2974
  - If 1+ friction points:
3274
2975
  - Proceed to Step 10B.2
@@ -3371,7 +3072,66 @@ After handling sub-task:
3371
3072
  - If 0 remaining β†’ trigger **Step 10D (Phase Feedback Checkpoint)**
3372
3073
 
3373
3074
  - If more tasks remain in phase:
3374
- - Proceed to Step 11 (Next Action Menu)
3075
+ - Proceed to Step 11 (Roadmap Menu)
3076
+
3077
+ ### 10E. **Outcome Execution Menu** (Layer 3)
3078
+
3079
+ **Purpose**: The active outcome navigation hub. Users arrive here when starting work on an outcome (from Layer 2), during task execution, or when returning from Layer 4 feedback resolution. Shows current outcome progress and offers context-appropriate actions.
3080
+
3081
+ **When to show**: When entering an outcome from Layer 2, between tasks within an outcome, or after Layer 4 feedback resolution.
3082
+
3083
+ **Step 10E.1: Display Outcome Context**
3084
+
3085
+ ```
3086
+ 🎯 Active Outcome: [Outcome Name]
3087
+
3088
+ Acceptance Criteria:
3089
+ [βœ…] I can [criterion 1]
3090
+ [πŸ”„] I can [criterion 2] ← Working on this
3091
+ [⬜] I can [criterion 3]
3092
+
3093
+ Current Task: [Task Name] β€” [Status]
3094
+ Progress: [X/Y] criteria verified
3095
+ ```
3096
+
3097
+ **Step 10E.2: Present Layer 3 Menu**
3098
+
3099
+ - Use `ask_user` with choices:
3100
+ - "Continue working" (β†’ resume/start next task in this outcome)
3101
+ - "I have feedback on this outcome"
3102
+ - "Something's broken"
3103
+ - "Do something else (β†’ Roadmap)" (β†’ Layer 2)
3104
+ - "Mark outcome complete"
3105
+ - Freeform available β†’ route to Freeform Classification (Step 12)
3106
+
3107
+ **Step 10E.3: Handle Selections**
3108
+
3109
+ - **If "Continue working"**:
3110
+ - Load next uncompleted task for this outcome
3111
+ - Proceed to Step 9 (Task Execution)
3112
+ - After task completion, return to Step 10E (NOT Step 11)
3113
+
3114
+ - **If "I have feedback on this outcome"**:
3115
+ - Jump to **Layer 4 β€” Feedback Resolution (Step 10A.1)**
3116
+ - After resolution, return to Step 10E
3117
+
3118
+ - **If "Something's broken"**:
3119
+ - Invoke Child Brain immediately (friction detected)
3120
+ - After Child Brain completes, return to Step 10E
3121
+
3122
+ - **If "Do something else"**:
3123
+ - Navigate UP one layer to **Step 11 (Roadmap Menu / Layer 2)**
3124
+ - Save current outcome progress before navigating
3125
+
3126
+ - **If "Mark outcome complete"**:
3127
+ - Run outcome validation from Step 10 (acceptance criteria check)
3128
+ - If all criteria pass:
3129
+ - Mark complete
3130
+ - **AUTOMATIC: Invoke Child Brain post-delivery retrospective** β€” review all friction, errors, feedback, and successes from this outcome's execution. Learn from what went well AND what didn't.
3131
+ - Proceed to Steps 10B/10C β†’ Step 11 (Layer 2)
3132
+ - If criteria fail β†’ invoke Child Brain, return to Step 10E
3133
+
3134
+ **Key Principle**: Layer 3 is the "working context" β€” users stay here while executing an outcome. Navigation always goes UP to Layer 2 (Roadmap) or DOWN to Layer 4 (Feedback), never directly to Layer 1.
3375
3135
 
3376
3136
  ### 10D. **Phase Feedback Checkpoint** (User Reflection)
3377
3137
  - **When to run**: When last task in a phase is completed
@@ -3429,19 +3189,68 @@ After handling sub-task:
3429
3189
  [Summary of what was learned/changed]
3430
3190
  ```
3431
3191
 
3432
- - Proceed to Step 11 (Next Action Menu)
3192
+ **Step 10D.5: Phase Retrospective (AUTOMATIC)**
3193
+
3194
+ - **AUTOMATIC: Invoke Child Brain post-delivery retrospective** for the entire phase
3195
+ - Review ALL friction, errors, feedback, and successes across all outcomes in this phase
3196
+ - This is a deeper review than per-outcome retrospectives β€” looks for cross-cutting patterns
3197
+ - Child Brain should consider: Were skills adequate? Were estimates reasonable? Did the process work well?
3198
+
3199
+ - Proceed to Step 11 (Roadmap Menu)
3433
3200
 
3434
- ### 11. **Next Action Menu**
3435
- - After task completion, use `ask_user` with choices:
3436
- - "Start next task automatically"
3201
+ ### 11. **Roadmap Menu** (Layer 2)
3202
+ **Purpose**: The project-level navigation hub. Users arrive here after task completion, via "Continue where I left off" (Step 2G), or by navigating up from Layer 3. This is where users see their roadmap position and decide what to do next.
3203
+
3204
+ **When to show**: After Steps 10B/10C/10D complete, after outcome validation, or when navigating up from Layer 3.
3205
+
3206
+ **Step 11.1: Display Roadmap Position**
3207
+
3208
+ ```
3209
+ πŸ“ Roadmap Position
3210
+
3211
+ Phase: [Phase Name] β€” [X/Y] outcomes complete
3212
+
3213
+ [βœ…] Outcome 1: [Name]
3214
+ [βœ…] Outcome 2: [Name]
3215
+ [πŸ”„] Outcome 3: [Name] ← Current
3216
+ [⬜] Outcome 4: [Name]
3217
+ ```
3218
+
3219
+ **Step 11.2: Present Layer 2 Menu**
3220
+
3221
+ - Use `ask_user` with choices:
3222
+ - "Continue next outcome" (β†’ Layer 3 Outcome Execution Menu)
3223
+ - "Review specific outcome"
3437
3224
  - "πŸ’‘ I have a new idea"
3438
- - "Review roadmap and choose task"
3225
+ - "Adjust priorities (Value Framework)"
3439
3226
  - "Take a break (save progress)"
3440
- - "Update/refine the roadmap"
3441
- - "Adjust my priorities (Value Framework)"
3442
- - Freeform available for custom actions
3443
- - **If "I have a new idea"**: Jump to **Step 2F: Idea Capture & Prioritization**
3444
- - **If "Adjust my priorities"**: Re-run Step 4A.2 questions, update `.mother-brain/docs/value-framework.md`, re-score existing roadmap tasks if weights changed significantly, show what moved
3227
+ - Freeform available for custom actions β†’ route to Freeform Classification (Step 12)
3228
+
3229
+ **Step 11.3: Handle Selections**
3230
+
3231
+ - **If "Continue next outcome"**:
3232
+ - Load next uncompleted outcome from roadmap
3233
+ - Jump to **Layer 3 β€” Outcome Execution Menu (Step 10E)**
3234
+
3235
+ - **If "Review specific outcome"**:
3236
+ - List all outcomes with status (βœ…/πŸ”„/⬜)
3237
+ - User selects one β†’ show outcome details (acceptance criteria, tasks, status)
3238
+ - After review, return to Step 11.2
3239
+
3240
+ - **If "I have a new idea"**:
3241
+ - Jump to **Step 2F: Idea Capture & Prioritization**
3242
+ - After idea captured, return to Step 11.2 (NOT Layer 1)
3243
+
3244
+ - **If "Adjust priorities"**:
3245
+ - Re-run Step 4A.2 questions
3246
+ - Update `.mother-brain/docs/value-framework.md`
3247
+ - Re-score existing roadmap tasks if weights changed significantly
3248
+ - Show what moved, then return to Step 11.2
3249
+
3250
+ - **If "Take a break"**:
3251
+ - Save session state to `session-state.json`
3252
+ - Display progress summary
3253
+ - End session gracefully
3445
3254
 
3446
3255
  - Save session state to `docs/session-state.json`:
3447
3256
  ```json
@@ -3484,9 +3293,6 @@ After handling sub-task:
3484
3293
  }
3485
3294
  }
3486
3295
  ```
3487
-
3488
- - If continuing: Load next task, go to step 8
3489
- - If pausing: Save state, provide summary of progress
3490
3296
 
3491
3297
  ### 11A. **MVP Complete & Beyond** (Phase Transition Flow)
3492
3298
  - **When to run**: Automatically triggered when the last task in Phase 1 (MVP) is marked complete
@@ -3580,14 +3386,14 @@ After handling sub-task:
3580
3386
  - Identify patterns that need new skills
3581
3387
  - If new patterns detected: Create skills using skill-creator
3582
3388
  - Update roadmap with detailed tasks
3583
- - Return to Step 11 (Next Action Menu)
3389
+ - Return to Step 11 (Roadmap Menu)
3584
3390
 
3585
3391
  **If "Take a new direction":**
3586
3392
  - Use `ask_user` (freeform): "What direction do you want to take the project?"
3587
3393
  - Re-run vision discovery (Step 3) with context of what exists
3588
3394
  - Generate new roadmap phases while preserving completed work
3589
3395
  - Create any needed new skills using skill-creator
3590
- - Return to Step 11 (Next Action Menu)
3396
+ - Return to Step 11 (Roadmap Menu)
3591
3397
 
3592
3398
  **If "Add new features":**
3593
3399
  - Use `ask_user` (freeform): "What features do you want to add?"
@@ -3598,7 +3404,7 @@ After handling sub-task:
3598
3404
  - Invoke skill-creator for each pattern
3599
3405
  - Add features as new tasks to appropriate phase
3600
3406
  - Update roadmap
3601
- - Return to Step 11 (Next Action Menu)
3407
+ - Return to Step 11 (Roadmap Menu)
3602
3408
 
3603
3409
  **If "Pause project":**
3604
3410
  - Save comprehensive session state
@@ -3631,7 +3437,56 @@ After handling sub-task:
3631
3437
  - **Project-agnostic**: Works for web apps, mobile apps, libraries, CLIs, games, etc.
3632
3438
  - **Preserve learnings**: Replanning doesn't discard completed work or learned skills
3633
3439
 
3634
- ### 12. **Session Continuity** (When Re-Invoked)
3440
+ ### 12. **Freeform Classification** (Utility Step)
3441
+
3442
+ **Purpose**: Reusable classification step invoked by ANY layer when a user provides freeform text instead of selecting a menu option. Determines the user's intent and routes to the appropriate handler.
3443
+
3444
+ **When to invoke**: Any time user enters freeform text at a menu instead of selecting an option. Called by Layers 2, 3, and 4.
3445
+
3446
+ **Step 12.1: Classify the Input**
3447
+
3448
+ Analyze the freeform text and classify as one of:
3449
+
3450
+ 1. **Bug/Fix** β€” User is reporting something broken
3451
+ - Trigger words: "broken", "doesn't work", "error", "wrong", "bug", "crash", "fix"
3452
+ - β†’ If in Layer 3/4: Route to Layer 4 Feedback Resolution (Step 10A.1) as essential
3453
+ - β†’ If in Layer 2: Ask which outcome is affected, then enter Layer 3 β†’ Layer 4
3454
+
3455
+ 2. **Feature/Idea** β€” User has a new feature or idea
3456
+ - Trigger words: "what if", "could we", "add", "new feature", "idea", "I want"
3457
+ - β†’ Route to Step 2F (Idea Capture & Prioritization)
3458
+ - β†’ After capture, return to the LAYER the user was on (not Layer 1)
3459
+
3460
+ 3. **Clarification/Question** β€” User is asking about the project/roadmap/outcome
3461
+ - Trigger words: "why", "what does", "how", "explain", "tell me about", "?"
3462
+ - β†’ Answer the question directly
3463
+ - β†’ Return to the SAME menu the user was on
3464
+
3465
+ 4. **Feedback/Preference** β€” User is expressing a preference or giving feedback
3466
+ - Trigger words: "I prefer", "I like", "actually", "instead", "rather", "maybe"
3467
+ - β†’ Invoke Child Brain (MANDATORY per Hard Rules)
3468
+ - β†’ After Child Brain completes, return to the SAME menu the user was on
3469
+
3470
+ 5. **Direction Change** β€” User wants to do something completely different
3471
+ - Trigger words: "stop", "let's do", "switch to", "forget this", "different"
3472
+ - β†’ Navigate UP one layer from current position
3473
+ - β†’ If already at Layer 1, present Layer 1 menu
3474
+
3475
+ **Step 12.2: Confirm Classification (if ambiguous)**
3476
+
3477
+ If the intent is unclear, use `ask_user`:
3478
+ - "I think you're saying [classification]. Is that right?"
3479
+ - Choices: the top 2-3 most likely classifications
3480
+
3481
+ **Step 12.3: Route and Return**
3482
+
3483
+ - Execute the appropriate handler for the classification
3484
+ - **CRITICAL**: After handling, return the user to the LAYER they were on when they entered freeform
3485
+ - Never dump the user back to Layer 1 unless they were already there or explicitly asked to go home
3486
+
3487
+ **Key Principle**: Freeform input is a DETOUR, not an EXIT. The user's navigation context is preserved across freeform handling.
3488
+
3489
+ ### 13. **Session Continuity** (When Re-Invoked)
3635
3490
  - When mother-brain is re-invoked:
3636
3491
  - Show ASCII art again
3637
3492
  - Load `docs/session-state.json`
@@ -3642,7 +3497,7 @@ After handling sub-task:
3642
3497
 
3643
3498
  - This ensures seamless continuation from any stopping point
3644
3499
 
3645
- ### 13. **Self-Improvement Integration**
3500
+ ### 14. **Self-Improvement Integration**
3646
3501
  - After using heal on any skill (including Mother Brain):
3647
3502
  - Extract lesson learned
3648
3503
  - Update relevant documentation:
@@ -3790,8 +3645,8 @@ Skills: 3 available
3790
3645
 
3791
3646
  What would you like to do?
3792
3647
  1. Continue where I left off
3793
- 2. Review roadmap
3794
- 3. πŸ’‘ I have a new idea
3648
+ 2. πŸ’‘ I have a new idea
3649
+ 3. 🧠 Improve Mother Brain
3795
3650
  ...
3796
3651
  ```
3797
3652
 
@@ -32,15 +32,6 @@ allowed-tools: bash node view grep glob web_search ask_user powershell create ed
32
32
  - Do NOT run in background or parallel
33
33
  - The caller is waiting for you to finish
34
34
 
35
- ### RULE 4: FOUR-LAYER PROPAGATION FOR HEAL LEARNINGS
36
- - When healing reveals framework-level improvements, Skill Creator MUST route updates across:
37
- 1. Mother Brain (process/orchestration)
38
- 2. Child Brain (learning orchestration behavior)
39
- 3. Skill Creator itself (generation/healing safeguards)
40
- 4. Elder Brain (`experience-vault/`) for domain/platform gotchas
41
- - Do not treat `learning-log.md` entries as sufficient completion on their own
42
- - Require concrete artifact updates (skills/docs) before declaring healing complete
43
-
44
35
  ---
45
36
 
46
37
  Use this skill when the user wants a new reusable capability, or when you notice repeated work that should be turned into a skill.
@@ -75,7 +66,6 @@ This skill is optimized for *minimal prompts, maximal clarity*, and iterative im
75
66
  - **Error handling**: Skills must handle failures gracefully with actionable error messages, not silent failures.
76
67
  - **TEST OUTPUT**: Skills MUST verify their output actually works before claiming success. Build it, run it, test it. Don't assumeβ€”prove.
77
68
  - **Continuous self-improvement**: When the Heal function fixes a skill execution issue, extract the general lesson and update skill-creator itself to prevent creating skills with similar flaws in the future.
78
- - **Propagation completeness**: For framework-impacting fixes, ensure updates are proposed/applied to all affected layers, not just local logs.
79
69
  - **Skill composition**: Skills should detect when they need expertise from another skill and invoke it using the `skill` tool. This allows skills to collaborate and combine their capabilities for better results.
80
70
  - **Guided external service setup**: When skills require external services (databases, APIs, cloud platforms), NEVER dump technical instructions on the user. Instead:
81
71
  - Explain in plain language WHAT the service does and WHY it's needed