mother-brain 0.6.1 β†’ 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.1",
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.
@@ -277,6 +300,22 @@ Mother Brain transforms high-level visions into executable reality by:
277
300
  - **AGENT RUNTIME CONTEXT IN ISSUES**: When documenting friction, bugs, or improvements, always note the agent runtime (e.g., "Copilot CLI + Claude Sonnet", "Codex CLI + GPT-5"). Issues are often runtime-specificβ€”what works in one may break in another. This context is essential for reproducing and scoping fixes.
278
301
  - **EMOJI AS ENHANCEMENT, NOT IDENTIFIER**: Emoji rendering varies across agent runtimes and models. Always include text labels alongside emoji markers (e.g., "🧠 Mother Brain" not just "🧠"). Never rely on emoji alone to convey meaningβ€”some runtimes may strip, replace, or fail to reproduce them.
279
302
  - **VERIFICATION OVER TRUST**: When user completes a setup/configuration step that CAN be programmatically verified, ALWAYS verify before proceeding. Don't trust "done" when verification is possible. Verification methods: API calls, CLI commands, file existence checks, service health endpoints, build artifact validation.
303
+ - **STORY ANCHOR TRACKING (CRITICAL)**: Session state MUST track `currentStory` (the outcome being worked on) and `storyApproved` (boolean). Before ANY response, check: "Is there an unapproved story in progress?" If yes, ALWAYS show story context header: "πŸ“‹ Current Story: [Ability to X] β€” Status: [In Progress/Awaiting Approval]". Feedback during story execution is a sub-task, NOT a context switch. Never lose track of the active story.
304
+ - **VISUAL/DESIGN DISCOVERY GATE (BLOCKING)**: Before implementing ANY story with visual/UI elements, run MANDATORY discovery:
305
+ 1. "What style/aesthetic are you imagining?"
306
+ 2. "Any references, examples, or inspiration?"
307
+ 3. "What should it definitely NOT look like?"
308
+ Block implementation until user provides direction. Never make styling decisions autonomously β€” visual choices are user-driven, not AI-driven.
309
+ - **BLOCKING DEPENDENCIES UPFRONT**: At story start, identify ALL user-dependent actions the AI cannot perform (API keys, app setup, external configs, account creation). Ask for ALL of these upfront: "Before I can work autonomously, I need: [list]". Do not start implementation until blocking dependencies are resolved.
310
+ - **STORY CONFIDENCE CHECK (MINI-DISCOVERY)**: Before implementing ANY story, assess: "Do I have enough information to implement this correctly?" Technical details = usually yes. Creative/UX/style details = usually no. If uncertain on ANY user-facing aspect, ask targeted questions BEFORE implementing. Never assume layout, styling, content, or interaction patterns β€” ask first.
311
+ - **SUB-TASK CLASSIFICATION (MID-STORY FEEDBACK)**: When bugs or feedback arise during story execution:
312
+ 1. Ask: "Is this essential to meet the outcome's acceptance criteria, or a separate improvement?"
313
+ 2. If ESSENTIAL to outcome β†’ treat as immediate sub-task, fix before continuing
314
+ 3. If NOT essential to outcome β†’ add to backlog, continue with story
315
+ Keep story focused on its acceptance criteria. Don't let scope creep derail completion.
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?"
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.
280
319
 
281
320
  ### Output Formatting Rules (CRITICAL)
282
321
 
@@ -488,17 +527,12 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
488
527
  - Choices (MUST be provided as array):
489
528
  - "Continue where I left off"
490
529
  - "πŸ’‘ I have a new idea"
491
- - "Review/update roadmap"
492
- - "Realign with vision"
493
530
  - "🧠 Improve Mother Brain"
494
- - "Archive project (save & reset for new project)"
495
- - "Eject project (reset to framework + learnings)"
496
531
  - **CRITICAL**: Do NOT ask what to do as freeform text. ALWAYS use the `ask_user` tool.
497
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)
498
534
  - **If "I have a new idea"**: Jump to **Step 2F: Idea Capture & Prioritization**
499
- - **If "Continue where I left off"**: Jump to **Step 2G: Task Resume Preview**
500
535
  - **If "Improve Mother Brain"**: Jump to **Step 2A: Improve Mother Brain Menu**
501
- - **If "Send improvement"**: Jump to **Step 2A: Send Improvement to Mother Brain**
502
536
 
503
537
  **If existing project WITHOUT Mother Brain artifacts (ONBOARDING):**
504
538
  - Detect: Files exist in directory, but NO `.mother-brain/` folder and NO `docs/vision.md`
@@ -831,226 +865,8 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
831
865
 
832
866
 
833
867
 
834
- ### 2B. **Eject Project** (Reset to Framework)
835
- - When user selects "Eject project (reset to framework + learnings)":
836
-
837
- - **Warning Display**:
838
- ```
839
- ⚠️ Eject Project
840
-
841
- This will DELETE all project-specific files while keeping the framework intact.
842
-
843
- What will be REMOVED:
844
- - Project source code directories (e.g., gaming-backlog-manager/)
845
- - Project documentation (docs/vision.md, docs/roadmap.md, docs/tasks/)
846
- - Project-created skills (any skills not part of core framework)
847
- - Session state (if exists)
848
-
849
- What will be KEPT:
850
- βœ… Core framework skills (mother-brain, child-brain, skill-creator)
851
- βœ… Learning log (docs/learning-log.md) - all improvements preserved
852
- βœ… Framework config (.vscode/, .gitignore, root README.md)
853
-
854
- Use this when: Testing projects, prototyping, or starting fresh with learnings
855
- ```
856
-
857
- - **Double Confirmation**:
858
- - Use `ask_user` with choices:
859
- - "Yes, eject this project"
860
- - "No, cancel (keep everything)"
861
-
862
- - If user cancels, return to main menu (Step 2)
863
-
864
- - **If user confirms eject**:
865
-
866
- **Step 2B.0: Sync Framework Improvements Back (CRITICAL - before deletion)**
867
-
868
- **Purpose**: Framework improvements made during project must flow back to mother-brain folder before project is deleted.
869
-
870
- - Detect if we're in a project folder (different from mother-brain):
871
- - Check if a "mother-brain home" path was stored during project creation
872
- - Or detect by checking if parent folder contains mother-brain
873
-
874
- - If in separate project folder:
875
- 1. Identify framework files that may have been updated:
876
- - `.github/skills/mother-brain/SKILL.md`
877
- - `.github/skills/child-brain/SKILL.md`
878
- - `.github/skills/skill-creator/SKILL.md`
879
- - `docs/learning-log.md`
880
-
881
- 2. Compare with mother-brain folder versions (show diff summary):
882
- ```
883
- πŸ”„ Syncing Framework Improvements Back
884
-
885
- Changes to sync to Mother Brain:
886
- - mother-brain/SKILL.md: [X] lines changed
887
- - child-brain/SKILL.md: [Y] lines changed
888
- - learning-log.md: [Z] new entries
889
- ```
890
-
891
- 3. Copy updated framework files TO mother-brain folder:
892
- ```powershell
893
- Copy-Item ".github\skills\mother-brain\SKILL.md" "[mother-brain-path]\.github\skills\mother-brain\SKILL.md" -Force
894
- Copy-Item ".github\skills\child-brain\SKILL.md" "[mother-brain-path]\.github\skills\child-brain\SKILL.md" -Force
895
- Copy-Item ".github\skills\skill-creator\SKILL.md" "[mother-brain-path]\.github\skills\skill-creator\SKILL.md" -Force
896
- # Merge learning-log.md entries (append new ones)
897
- ```
898
-
899
- 4. Display confirmation:
900
- ```
901
- βœ… Framework improvements synced to Mother Brain
902
-
903
- When you return to the framework folder, you can:
904
- - Review the changes
905
- - Release a new version of Mother Brain
906
- ```
907
-
908
- - If in same folder (framework testing mode): Skip this step (files already in place)
909
-
910
- - **Proceed to Step 2B.1** (Identify Core Framework Skills)
911
-
912
- **Step 2B.1: Identify Core Framework Skills**
913
- - Core skills that are part of framework (never delete):
914
- - `mother-brain` (in `.github/skills/`)
915
- - `child-brain` (in `.github/skills/`)
916
- - `skill-creator` (in `.github/skills/`)
917
- - **Project-specific skills** are also in `.github/skills/` but tracked in session-state.json
918
- - **Differentiation**: Use `skillsCreated` array in session-state.json to identify which skills to delete
919
- - Core skills are hardcoded and never in `skillsCreated` list
920
-
921
- **Step 2B.2: Backup Learning Log**
922
- - If `docs/learning-log.md` exists, keep it
923
- - This preserves all improvements for future projects
924
-
925
- **Step 2B.3: Identify Project Directories & Skills**
926
- - Scan current directory for project-specific folders:
927
- - Any folder that is NOT: `.git`, `.github`
928
- - Examples: `gaming-backlog-manager/`, `my-app/`, `src/`, etc.
929
- - **Also include environment/cache folders** (always project-specific):
930
- - `.vscode/` (VS Code workspace settings - often contain project paths)
931
- - `.vite/` (Vite cache/deps)
932
- - `node_modules/` (npm dependencies)
933
- - `dist/`, `build/` (build outputs)
934
- - `.next/`, `.nuxt/` (framework caches)
935
- - `.turbo/`, `.cache/` (other caches)
936
- - **Identify project skills using comparison method** (CRITICAL - not skillsCreated):
937
- - Define core skills: `mother-brain`, `child-brain`, `skill-creator`
938
- - Get all skills in `.github/skills/`
939
- - Project skills = all skills MINUS core skills
940
- - This method is reliable even if skillsCreated array is empty/null/incomplete
941
- - Core skills are NEVER deleted regardless of what's in session-state.json
942
-
943
- **Step 2B.4: Show Deletion Plan**
944
- - Display what will be deleted:
945
- ```
946
- πŸ“‹ Eject Plan:
947
-
948
- Directories to DELETE:
949
- - [project-folder-1]/
950
- - [project-folder-2]/
951
-
952
- Files to DELETE:
953
- - .mother-brain/docs/vision.md
954
- - .mother-brain/docs/roadmap.md
955
- - .mother-brain/docs/tasks/ (entire folder)
956
- - .mother-brain/session-state.json
957
- - README.md (project-specific README)
958
-
959
- Skills to DELETE (from session-state.json):
960
- - .github/skills/[project-skill-1]/
961
- - .github/skills/[project-skill-2]/
962
-
963
- Environment/Cache to DELETE:
964
- - .vscode/ (project-specific settings)
965
- - .vite/ (Vite cache)
966
- - node_modules/ (if exists)
967
- - dist/, build/, .next/, .nuxt/, .turbo/, .cache/ (if exist)
968
-
969
- Will KEEP:
970
- βœ… .mother-brain/docs/learning-log.md
971
- βœ… .github/skills/mother-brain/
972
- βœ… .github/skills/child-brain/
973
- βœ… .github/skills/skill-creator/
974
- βœ… .vscode/, .gitignore
975
- ```
976
-
977
- - Final confirmation with `ask_user`:
978
- - "Proceed with eject"
979
- - "Cancel, I changed my mind"
980
-
981
- **Step 2B.5: Execute Deletion**
982
- - If confirmed:
983
- - Use `powershell` to delete identified directories and files
984
- - Commands:
985
- - `Remove-Item -Recurse -Force [project-folders]`
986
- - `Remove-Item .mother-brain/docs/vision.md, .mother-brain/docs/roadmap.md -Force`
987
- - `Remove-Item -Recurse -Force .mother-brain/docs/tasks`
988
- - `Remove-Item .mother-brain/session-state.json -Force`
989
- - `Remove-Item README.md -Force -ErrorAction SilentlyContinue` # Project-specific README
990
- - **Delete environment/cache folders** (CRITICAL - these contain project-specific paths):
991
- - `Remove-Item -Recurse -Force .vscode -ErrorAction SilentlyContinue`
992
- - `Remove-Item -Recurse -Force .vite -ErrorAction SilentlyContinue`
993
- - `Remove-Item -Recurse -Force node_modules -ErrorAction SilentlyContinue`
994
- - `Remove-Item -Recurse -Force dist, build, .next, .nuxt, .turbo, .cache -ErrorAction SilentlyContinue`
995
- - **Delete project skills from `.github/skills/`** (CRITICAL - use comparison method, not just skillsCreated):
996
- - Define core skills list: `$coreSkills = @("mother-brain", "child-brain", "skill-creator")`
997
- - Get all skills: `$allSkills = Get-ChildItem .github/skills -Directory | Select-Object -ExpandProperty Name`
998
- - Identify project skills: `$projectSkills = $allSkills | Where-Object { $_ -notin $coreSkills }`
999
- - For each project skill: `Remove-Item -Recurse -Force .github/skills/[skill-name]`
1000
- - **NEVER rely solely on skillsCreated array** - it may be empty/null/incomplete
1001
- - The comparison method guarantees all non-core skills are removed
1002
- - Preserve: `.mother-brain/docs/learning-log.md`, core framework skills (mother-brain, child-brain, skill-creator)
1003
-
1004
- **Step 2B.6: Create Eject Log Entry**
1005
- - Add entry to `docs/learning-log.md`:
1006
- ```markdown
1007
- ## [Date] - Project Ejected
1008
- **Project Name**: [Project Name]
1009
- **Reason**: Testing/prototyping complete, resetting to framework
1010
- **Files Removed**: [List of removed directories]
1011
- **Skills Removed**: [List of removed skills]
1012
- **Files Preserved**: learning-log.md, core framework skills
1013
- **Learnings Preserved**: [Count] entries in learning log
1014
- ```
1015
-
1016
- **Step 2B.7: Confirmation & Return to Framework**
1017
- - Display success message:
1018
- ```
1019
- βœ… Project Ejected Successfully!
1020
-
1021
- Status:
1022
- - Project files removed
1023
- - Framework improvements synced back
1024
- - [X] learning log entries preserved
1025
- - Returning to Mother Brain framework folder...
1026
- ```
1027
-
1028
- - **Return to Mother Brain folder** (if was in separate project folder):
1029
- ```powershell
1030
- Set-Location "[mother-brain-path]"
1031
- ```
1032
-
1033
- - Display framework menu:
1034
- ```
1035
- 🧠 Welcome back to Mother Brain!
1036
-
1037
- Framework improvements from your project are ready.
1038
- Would you like to release a new version?
1039
- ```
1040
-
1041
- - Use `ask_user` with choices:
1042
- - "Release Mother Brain (commit & PR)"
1043
- - "Review changes first"
1044
- - "Start new project"
1045
- - "Skip for now"
1046
-
1047
- - If "Release Mother Brain": Jump to **Step 2D**
1048
- - If "Review changes": Show git diff, then return to this menu
1049
- - If "Start new project": Jump to **Step 3** (Vision Discovery)
1050
- - If "Skip for now": Return to main menu (Step 2)
1051
-
1052
868
  ### 2D. **Release Mother Brain** (Framework Versioning)
1053
- - When user selects "Release Mother Brain" from menu or after eject:
869
+ - When user selects "Release Mother Brain" from menu:
1054
870
  - **Read `references/release-checklist.md`** for the full release workflow (Steps 2D.1–2D.7)
1055
871
  - **⚑ ONE-CLICK RELEASE FLOW**: Verify changes β†’ auto-determine version β†’ update all version references β†’ sync skills β†’ build CLI β†’ git commit/tag/push
1056
872
  - **β›” BLOCKING RULE**: Do NOT return to menu until ALL checklist items are completed
@@ -1362,116 +1178,6 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
1362
1178
  - **If "I have a new idea"**: Jump to Step 2F
1363
1179
  - **If "Back to main menu"**: Return to Step 2
1364
1180
 
1365
- ### 2C. **Archive Project** (Save & Reset)
1366
- - When user selects "Archive project (save & reset for new project)":
1367
-
1368
- - **Purpose**: Save a working project somewhere safe, then reset workspace so Mother Brain can start fresh with a new project while preserving all learnings.
1369
-
1370
- - **Difference from Eject**:
1371
- - **Eject**: Deletes project files, preserves learnings β†’ workspace is empty
1372
- - **Archive**: Moves project to safe location, preserves learnings β†’ workspace is empty but project lives elsewhere
1373
-
1374
- - **Display**:
1375
- ```
1376
- πŸ“¦ Archive Project
1377
-
1378
- This will SAVE your project to a safe location, then reset the workspace.
1379
-
1380
- What will happen:
1381
- 1. Project folder ([project-name]/) moves to archive location
1382
- 2. Project skills move with it (stay functional)
1383
- 3. Workspace resets for new project
1384
- 4. Mother Brain learnings preserved in framework
1385
-
1386
- Your project will be safe and runnable from its archive location.
1387
- ```
1388
-
1389
- - **Step 2C.1: Choose Archive Location**
1390
- - Use `ask_user` with choices:
1391
- - "Parent directory (../[project-name]/)"
1392
- - "Custom location (I'll specify)"
1393
- - "Cancel, keep project here"
1394
-
1395
- - If custom location, use `ask_user` (freeform): "Enter the archive path:"
1396
-
1397
- - **Step 2C.2: Identify What to Archive**
1398
- - Scan current directory for project-specific items:
1399
- - Project source folder (e.g., `derby-dash/`, `my-app/`)
1400
- - `.mother-brain/` docs (vision, roadmap, tasks, session-state)
1401
- - Project-specific skills from `.github/skills/` (compare against core skills)
1402
- - Project README.md
1403
-
1404
- - Core skills stay in place: `mother-brain`, `child-brain`, `skill-creator`
1405
-
1406
- - **Step 2C.3: Show Archive Plan**
1407
- - Display:
1408
- ```
1409
- πŸ“‹ Archive Plan:
1410
-
1411
- Moving to [archive-path]/[project-name]/:
1412
- - [project-folder]/ (source code)
1413
- - .mother-brain/ (vision, roadmap, tasks)
1414
- - Skills: [list project skills]
1415
- - README.md
1416
-
1417
- Staying in framework:
1418
- βœ… .github/skills/mother-brain/
1419
- βœ… .github/skills/child-brain/
1420
- βœ… .github/skills/skill-creator/
1421
- βœ… Framework learning-log.md (COPIED, not moved)
1422
- ```
1423
-
1424
- - Use `ask_user` with choices:
1425
- - "Proceed with archive"
1426
- - "Change archive location"
1427
- - "Cancel, keep project here"
1428
-
1429
- - **Step 2C.4: Execute Archive**
1430
- - If confirmed:
1431
- 1. Create archive directory: `New-Item -ItemType Directory -Path [archive-path]\[project-name] -Force`
1432
- 2. Move project source: `Move-Item [project-folder] [archive-path]\[project-name]\`
1433
- 3. Move .mother-brain/: `Move-Item .mother-brain [archive-path]\[project-name]\`
1434
- 4. Move project README: `Move-Item README.md [archive-path]\[project-name]\`
1435
- 5. For each project skill:
1436
- - Create `.github/skills/` in archive if not exists
1437
- - Move skill folder to archive location
1438
- 6. **COPY learning-log.md** to archive (project keeps a copy, framework keeps original)
1439
-
1440
- - **Step 2C.5: Verify Archive**
1441
- - Check archive location has all expected files
1442
- - Display success:
1443
- ```
1444
- βœ… Project Archived Successfully!
1445
-
1446
- Archive Location: [archive-path]\[project-name]\
1447
-
1448
- Contents:
1449
- - Source code: βœ…
1450
- - Vision & Roadmap: βœ…
1451
- - Tasks: βœ…
1452
- - Skills: [count] βœ…
1453
-
1454
- The project is fully runnable from its new location.
1455
- cd [archive-path]\[project-name] to work on it again.
1456
-
1457
- This workspace is now reset for a new project.
1458
- ```
1459
-
1460
- - **Step 2C.6: Log Archive Event**
1461
- - Add entry to framework learning-log.md:
1462
- ```markdown
1463
- ## [Date] - Project Archived
1464
- **Project Name**: [Project Name]
1465
- **Archive Location**: [Full path]
1466
- **Skills Archived**: [List]
1467
- **Learnings Preserved**: [Count] entries in learning log
1468
- **Reason**: User wants to start new project while keeping this one
1469
- ```
1470
-
1471
- - **Step 2C.7: Return to Clean State**
1472
- - Next invocation shows new project menu
1473
- - All learnings from archived project remain in framework's learning-log.md
1474
-
1475
1181
  ### 2.5. **Environment & Presentation Discovery** (Lazy/On-Demand)
1476
1182
 
1477
1183
  **Purpose**: Discover user's environment and establish reliable output presentation methods
@@ -2686,7 +2392,7 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
2686
2392
 
2687
2393
  Before implementing ANY task, you MUST complete this gate:
2688
2394
 
2689
- **Step 9.0: Task Start Assessment**
2395
+ **Step 9.0: Story Start Assessment**
2690
2396
 
2691
2397
  1. **Load Project Brain** (if exists):
2692
2398
  - Read `.mother-brain/project-brain.md`
@@ -2729,6 +2435,33 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
2729
2435
  - Note: "No Elder Brain knowledge for [technology]"
2730
2436
  - Plan to contribute back via Elder Brain RECEIVE after task
2731
2437
 
2438
+ **Step 9.0.1: Blocking Dependencies Collection (MANDATORY)**
2439
+
2440
+ Before starting ANY story, identify what the AI CANNOT do autonomously:
2441
+
2442
+ **Check for these dependency types:**
2443
+ - **Account/Service Setup**: Creating accounts, subscribing to services, accepting terms of service
2444
+ - **API Keys & Credentials**: Obtaining keys, secrets, OAuth tokens the AI cannot generate
2445
+ - **External Configuration**: Setting up third-party consoles, enabling features in dashboards
2446
+ - **Physical Actions**: Device setup, hardware configuration, local installations the AI can't perform
2447
+ - **Payment/Billing**: Anything requiring financial transactions
2448
+
2449
+ **If ANY blocking dependencies found:**
2450
+ ```
2451
+ ⏸️ Before I can work autonomously on this story, I need you to:
2452
+
2453
+ 1. [Blocking dependency 1 - what exactly to do]
2454
+ 2. [Blocking dependency 2 - what exactly to do]
2455
+ 3. [Blocking dependency 3 - what exactly to do]
2456
+
2457
+ Let me know when these are ready, or if you need help with any step.
2458
+ ```
2459
+
2460
+ - **WAIT for user confirmation before proceeding**
2461
+ - Update session-state.json with `blockingDependencies` array
2462
+ - When user confirms, verify programmatically where possible (see VERIFICATION OVER TRUST principle)
2463
+ - Only proceed to implementation when all blocking dependencies resolved
2464
+
2732
2465
  3. **Skill Sufficiency Check** (CRITICAL):
2733
2466
  - List existing skills in `.github/skills/`
2734
2467
  - For EACH creative/specialized element in this task, ask:
@@ -3091,7 +2824,7 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3091
2824
  - Update task document with final status
3092
2825
  - Update roadmap checklist
3093
2826
 
3094
- **⚠️ 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).**
3095
2828
 
3096
2829
  **β›” BLOCKING GATE - Steps 10B and 10C are MANDATORY:**
3097
2830
  ```
@@ -3103,14 +2836,15 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3103
2836
  ↓
3104
2837
  IF last task in phase β†’ Run Step 10D (Phase Feedback Checkpoint)
3105
2838
  ↓
3106
- 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)
3107
2841
  ```
3108
2842
 
3109
2843
  **DO NOT skip Steps 10B or 10C.** Even if the task had no issues:
3110
2844
  1. Step 10B: Scan for friction, invoke Child Brain if found
3111
2845
  2. Step 10C: Update project documentation silently
3112
2846
  3. Step 10D: If phase complete, gather user feedback
3113
- 4. Only AFTER all checkpoints β†’ proceed to Step 11
2847
+ 4. After checkpoints β†’ return to Layer 3 (or Layer 2 if outcome is done)
3114
2848
 
3115
2849
  ### 10A. **Friction Analysis via Child Brain**
3116
2850
  - When user provides negative/adjustment feedback in task validation:
@@ -3153,9 +2887,76 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3153
2887
 
3154
2888
  **Key Principle**: Mother Brain orchestrates; Child Brain analyzes and routes. This separation keeps Mother Brain clean.
3155
2889
 
2890
+ ### 10A.1 **Feedback Resolution Menu** (Layer 4)
2891
+
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.
2893
+
2894
+ **Step 10A.1.1: Display Feedback Context**
2895
+ Always show what was raised and the active story context:
2896
+ ```
2897
+ πŸ“‹ Current Outcome: [Outcome Name]
2898
+ Status: In Progress | [X/Y] acceptance criteria verified
2899
+
2900
+ πŸ’¬ Feedback Raised: [brief description of issue/feedback]
2901
+ ```
2902
+
2903
+ **Step 10A.1.2: Present Layer 4 Menu**
2904
+
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)
2911
+
2912
+ **Step 10A.1.3: Handle Based on Classification**
2913
+
2914
+ **If ESSENTIAL:**
2915
+ - Treat as immediate sub-task
2916
+ - Add to session-state.json: `currentStory.subTasks` with `essential: true`
2917
+ - Fix before continuing with story
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
2925
+
2926
+ **If IMPROVEMENT (not essential):**
2927
+ - Add to backlog (roadmap.md or backlog section)
2928
+ - Mark in session-state.json: `currentStory.subTasks` with `essential: false, status: "backlog"`
2929
+ - Display: "πŸ“‹ Added to backlog β€” returning to [outcome name]..."
2930
+ - Return to **Layer 3 β€” Outcome Execution Menu (Step 10E)**
2931
+
2932
+ **If NOT SURE:**
2933
+ - Ask clarifying question:
2934
+ ```
2935
+ Let me help clarify:
2936
+
2937
+ The current outcome's acceptance criteria are:
2938
+ 1. [Criterion A]
2939
+ 2. [Criterion B]
2940
+
2941
+ Does this issue block any of these specific criteria from being met?
2942
+ ```
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)**
2948
+
2949
+ **Step 10A.1.4: Maintain Story Focus**
2950
+ After handling feedback:
2951
+ - Always return to Layer 3 (Outcome Execution Menu)
2952
+ - Show: "πŸ“‹ Returning to: [Outcome Name]"
2953
+ - Display remaining acceptance criteria to verify
2954
+
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.
2956
+
3156
2957
  ### 10B. **Post-Task Reflection via Child Brain** (Proactive Improvement)
3157
2958
  - **When to run**: ALWAYS after task is marked complete by user - this is mandatory, not optional
3158
- - **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)
3159
2960
  - **Purpose**: Learn from friction points *before* user reports them as issues
3160
2961
 
3161
2962
  **Step 10B.1: Scan Conversation for Friction Points**
@@ -3168,7 +2969,7 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3168
2969
 
3169
2970
  - If 0 friction points:
3170
2971
  - Display: "πŸ” Post-Task Reflection - No friction points found"
3171
- - Proceed to Step 11
2972
+ - Proceed to Step 10C
3172
2973
 
3173
2974
  - If 1+ friction points:
3174
2975
  - Proceed to Step 10B.2
@@ -3271,7 +3072,66 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3271
3072
  - If 0 remaining β†’ trigger **Step 10D (Phase Feedback Checkpoint)**
3272
3073
 
3273
3074
  - If more tasks remain in phase:
3274
- - 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.
3275
3135
 
3276
3136
  ### 10D. **Phase Feedback Checkpoint** (User Reflection)
3277
3137
  - **When to run**: When last task in a phase is completed
@@ -3329,27 +3189,92 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3329
3189
  [Summary of what was learned/changed]
3330
3190
  ```
3331
3191
 
3332
- - 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)
3333
3200
 
3334
- ### 11. **Next Action Menu**
3335
- - After task completion, use `ask_user` with choices:
3336
- - "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"
3337
3224
  - "πŸ’‘ I have a new idea"
3338
- - "Review roadmap and choose task"
3225
+ - "Adjust priorities (Value Framework)"
3339
3226
  - "Take a break (save progress)"
3340
- - "Update/refine the roadmap"
3341
- - "Adjust my priorities (Value Framework)"
3342
- - Freeform available for custom actions
3343
- - **If "I have a new idea"**: Jump to **Step 2F: Idea Capture & Prioritization**
3344
- - **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
3345
3254
 
3346
3255
  - Save session state to `docs/session-state.json`:
3347
3256
  ```json
3348
3257
  {
3349
3258
  "projectName": "Gaming Backlog Manager",
3259
+ "currentStory": {
3260
+ "id": "outcome-001",
3261
+ "name": "Ability to track my game backlog",
3262
+ "approved": false,
3263
+ "acceptanceCriteria": [
3264
+ {"criterion": "I can add games to my backlog", "verified": true},
3265
+ {"criterion": "I can mark games as completed", "verified": false},
3266
+ {"criterion": "I can see my backlog list", "verified": true}
3267
+ ],
3268
+ "subTasks": [
3269
+ {"id": "sub-001", "description": "Fix mobile layout", "essential": true, "status": "done"},
3270
+ {"id": "sub-002", "description": "Add dark mode", "essential": false, "status": "backlog"}
3271
+ ],
3272
+ "blockingDependencies": []
3273
+ },
3350
3274
  "lastTask": "003-localstorage-data-layer",
3351
3275
  "lastTaskStatus": "DONE",
3352
3276
  "currentPhase": "Phase 1",
3277
+ "completedStories": ["outcome-001"],
3353
3278
  "completedTasks": ["001", "002", "003"],
3354
3279
  "totalTasks": 9,
3355
3280
  "skillsCreated": ["pwa-builder"],
@@ -3368,9 +3293,6 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3368
3293
  }
3369
3294
  }
3370
3295
  ```
3371
-
3372
- - If continuing: Load next task, go to step 8
3373
- - If pausing: Save state, provide summary of progress
3374
3296
 
3375
3297
  ### 11A. **MVP Complete & Beyond** (Phase Transition Flow)
3376
3298
  - **When to run**: Automatically triggered when the last task in Phase 1 (MVP) is marked complete
@@ -3464,14 +3386,14 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3464
3386
  - Identify patterns that need new skills
3465
3387
  - If new patterns detected: Create skills using skill-creator
3466
3388
  - Update roadmap with detailed tasks
3467
- - Return to Step 11 (Next Action Menu)
3389
+ - Return to Step 11 (Roadmap Menu)
3468
3390
 
3469
3391
  **If "Take a new direction":**
3470
3392
  - Use `ask_user` (freeform): "What direction do you want to take the project?"
3471
3393
  - Re-run vision discovery (Step 3) with context of what exists
3472
3394
  - Generate new roadmap phases while preserving completed work
3473
3395
  - Create any needed new skills using skill-creator
3474
- - Return to Step 11 (Next Action Menu)
3396
+ - Return to Step 11 (Roadmap Menu)
3475
3397
 
3476
3398
  **If "Add new features":**
3477
3399
  - Use `ask_user` (freeform): "What features do you want to add?"
@@ -3482,7 +3404,7 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3482
3404
  - Invoke skill-creator for each pattern
3483
3405
  - Add features as new tasks to appropriate phase
3484
3406
  - Update roadmap
3485
- - Return to Step 11 (Next Action Menu)
3407
+ - Return to Step 11 (Roadmap Menu)
3486
3408
 
3487
3409
  **If "Pause project":**
3488
3410
  - Save comprehensive session state
@@ -3515,7 +3437,56 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3515
3437
  - **Project-agnostic**: Works for web apps, mobile apps, libraries, CLIs, games, etc.
3516
3438
  - **Preserve learnings**: Replanning doesn't discard completed work or learned skills
3517
3439
 
3518
- ### 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)
3519
3490
  - When mother-brain is re-invoked:
3520
3491
  - Show ASCII art again
3521
3492
  - Load `docs/session-state.json`
@@ -3526,7 +3497,7 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
3526
3497
 
3527
3498
  - This ensures seamless continuation from any stopping point
3528
3499
 
3529
- ### 13. **Self-Improvement Integration**
3500
+ ### 14. **Self-Improvement Integration**
3530
3501
  - After using heal on any skill (including Mother Brain):
3531
3502
  - Extract lesson learned
3532
3503
  - Update relevant documentation:
@@ -3674,8 +3645,8 @@ Skills: 3 available
3674
3645
 
3675
3646
  What would you like to do?
3676
3647
  1. Continue where I left off
3677
- 2. Review roadmap
3678
- 3. πŸ’‘ I have a new idea
3648
+ 2. πŸ’‘ I have a new idea
3649
+ 3. 🧠 Improve Mother Brain
3679
3650
  ...
3680
3651
  ```
3681
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