mother-brain 0.6.0 β 0.6.2
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 +1 -1
- package/package.json +1 -1
- package/skills/mother-brain/SKILL.md +133 -459
- package/skills/mother-brain/references/improvement-pipeline.md +114 -0
- package/skills/mother-brain/references/onboarding-workflow.md +71 -0
- package/skills/mother-brain/references/release-checklist.md +65 -0
- package/skills/mother-brain/references/setup-validation.md +70 -0
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.
|
|
801
|
+
var VERSION = "0.6.1";
|
|
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
|
@@ -277,6 +277,21 @@ Mother Brain transforms high-level visions into executable reality by:
|
|
|
277
277
|
- **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
278
|
- **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
279
|
- **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.
|
|
280
|
+
- **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.
|
|
281
|
+
- **VISUAL/DESIGN DISCOVERY GATE (BLOCKING)**: Before implementing ANY story with visual/UI elements, run MANDATORY discovery:
|
|
282
|
+
1. "What style/aesthetic are you imagining?"
|
|
283
|
+
2. "Any references, examples, or inspiration?"
|
|
284
|
+
3. "What should it definitely NOT look like?"
|
|
285
|
+
Block implementation until user provides direction. Never make styling decisions autonomously β visual choices are user-driven, not AI-driven.
|
|
286
|
+
- **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.
|
|
287
|
+
- **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.
|
|
288
|
+
- **SUB-TASK CLASSIFICATION (MID-STORY FEEDBACK)**: When bugs or feedback arise during story execution:
|
|
289
|
+
1. Ask: "Is this essential to meet the outcome's acceptance criteria, or a separate improvement?"
|
|
290
|
+
2. If ESSENTIAL to outcome β treat as immediate sub-task, fix before continuing
|
|
291
|
+
3. If NOT essential to outcome β add to backlog, continue with story
|
|
292
|
+
Keep story focused on its acceptance criteria. Don't let scope creep derail completion.
|
|
293
|
+
- **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
|
+
- **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.
|
|
280
295
|
|
|
281
296
|
### Output Formatting Rules (CRITICAL)
|
|
282
297
|
|
|
@@ -600,75 +615,9 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
600
615
|
|
|
601
616
|
### 2.2. **Existing Project Onboarding**
|
|
602
617
|
- When user selects to onboard Mother Brain into an existing project:
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
-
|
|
606
|
-
- Use `glob` and `view` to understand:
|
|
607
|
-
- **Project Type**: What kind of project is this? (web app, game, library, CLI, etc.)
|
|
608
|
-
- **Tech Stack**: Languages, frameworks, dependencies
|
|
609
|
-
- **Architecture**: Folder structure, patterns, modules
|
|
610
|
-
- **Features Built**: What functionality already exists?
|
|
611
|
-
- **Current State**: Is it working? Partially complete? Early stage?
|
|
612
|
-
|
|
613
|
-
- Display findings:
|
|
614
|
-
```
|
|
615
|
-
π Project Analysis Complete
|
|
616
|
-
|
|
617
|
-
What I Found:
|
|
618
|
-
- Type: [Project type detected]
|
|
619
|
-
- Tech Stack: [Languages, frameworks]
|
|
620
|
-
- Features Built: [List of detected features]
|
|
621
|
-
- Current State: [Assessment of completeness]
|
|
622
|
-
```
|
|
623
|
-
|
|
624
|
-
**Step 2.2.2: Vision Extraction (Clarifying Questions)**
|
|
625
|
-
- Ask user questions to fill gaps (like vision discovery, but informed by analysis):
|
|
626
|
-
- "What is the main goal of this project?"
|
|
627
|
-
- "Who is this for? Who will use it?"
|
|
628
|
-
- "What problem does this solve?"
|
|
629
|
-
- "What inspired this project?" (to trigger domain research)
|
|
630
|
-
- "What's the most important thing to get right?"
|
|
631
|
-
- "Where are you trying to get to next? What's your next milestone?"
|
|
632
|
-
|
|
633
|
-
- Create `.mother-brain/docs/vision.md` with extracted vision
|
|
634
|
-
|
|
635
|
-
**Step 2.2.3: Retrospective Roadmap**
|
|
636
|
-
- Build roadmap that reflects reality:
|
|
637
|
-
- **Phase 0 (Done)**: What's already built (based on repo analysis)
|
|
638
|
-
- **Phase 1 (Current)**: What's in progress or next immediate steps
|
|
639
|
-
- **Phase 2+**: Future milestones based on user's stated goals
|
|
640
|
-
|
|
641
|
-
- Mark completed work as DONE in roadmap
|
|
642
|
-
- Identify current position in timeline
|
|
643
|
-
|
|
644
|
-
- Create `.mother-brain/docs/roadmap.md`
|
|
645
|
-
|
|
646
|
-
**Step 2.2.4: Skill Identification**
|
|
647
|
-
- Analyze patterns in existing code
|
|
648
|
-
- Identify repetitive work that warrants skills
|
|
649
|
-
- Invoke skill-creator for detected patterns
|
|
650
|
-
|
|
651
|
-
**Step 2.2.5: Confirmation**
|
|
652
|
-
- Display:
|
|
653
|
-
```
|
|
654
|
-
β
Mother Brain Onboarded!
|
|
655
|
-
|
|
656
|
-
π Vision: Captured
|
|
657
|
-
π Roadmap: [X] tasks identified
|
|
658
|
-
- [Y] already complete
|
|
659
|
-
- [Z] remaining
|
|
660
|
-
π οΈ Skills: [N] identified for creation
|
|
661
|
-
|
|
662
|
-
Ready to help you reach your next milestone!
|
|
663
|
-
```
|
|
664
|
-
|
|
665
|
-
- Use `ask_user` with choices:
|
|
666
|
-
- "Start next task"
|
|
667
|
-
- "Review the roadmap"
|
|
668
|
-
- "Review the vision"
|
|
669
|
-
- "Adjust something before continuing"
|
|
670
|
-
|
|
671
|
-
- Proceed to normal workflow (Step 8+)
|
|
618
|
+
- **Read `references/onboarding-workflow.md`** for the full onboarding workflow (Steps 2.2.1β2.2.5)
|
|
619
|
+
- Covers: deep repo analysis, vision extraction, retrospective roadmap, skill identification, confirmation
|
|
620
|
+
- After onboarding completes β proceed to normal workflow (Step 8+)
|
|
672
621
|
|
|
673
622
|
### 2A. **Improve Mother Brain Menu** (From Any Project)
|
|
674
623
|
- When user selects "π§ Improve Mother Brain" from the existing project menu:
|
|
@@ -753,217 +702,10 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
753
702
|
|
|
754
703
|
### 2A.1 **Send Improvement** (Automatic Multi-Issue Contribution)
|
|
755
704
|
- When user selects "π€ Send my local improvements":
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
**Step 2A.1.1: Gather All Improvement Sources**
|
|
762
|
-
|
|
763
|
-
- Collect from THREE sources:
|
|
764
|
-
|
|
765
|
-
**Source 1: Learning Log Entries**
|
|
766
|
-
- Read `.mother-brain/project-brain.md` or `docs/learning-log.md`
|
|
767
|
-
- Parse for individual learning entries (marked by `## [Date]` or similar)
|
|
768
|
-
- Each entry = potential improvement
|
|
769
|
-
- Extract: date, trigger, learning, resolution
|
|
770
|
-
|
|
771
|
-
**Source 2: Core File Changes**
|
|
772
|
-
- Get changes to Mother Brain core files:
|
|
773
|
-
```powershell
|
|
774
|
-
git diff HEAD -- ".github/skills/mother-brain/SKILL.md"
|
|
775
|
-
git diff HEAD -- ".github/skills/child-brain/SKILL.md"
|
|
776
|
-
git diff HEAD -- ".github/skills/skill-creator/SKILL.md"
|
|
777
|
-
```
|
|
778
|
-
- If files are new/untracked: `git diff /dev/null -- [file]`
|
|
779
|
-
|
|
780
|
-
**Source 3: Conversation Context**
|
|
781
|
-
- Scan conversation history for:
|
|
782
|
-
- Friction points discussed
|
|
783
|
-
- Problems reported
|
|
784
|
-
- Solutions implemented
|
|
785
|
-
- Pattern: "this isn't working" β "fixed by..."
|
|
786
|
-
|
|
787
|
-
- **If no improvements found across all sources**:
|
|
788
|
-
- Display: "π No local Mother Brain improvements to send."
|
|
789
|
-
- Return to Step 2A (Improve Mother Brain Menu)
|
|
790
|
-
|
|
791
|
-
**Step 2A.1.1A: Check Issues Tracker (Deduplication)**
|
|
792
|
-
|
|
793
|
-
- Check if `.mother-brain/issues-tracker.md` exists
|
|
794
|
-
- **If exists**:
|
|
795
|
-
- Read file and parse submitted issues list
|
|
796
|
-
- Extract issue numbers and titles already submitted
|
|
797
|
-
- Store in memory for comparison
|
|
798
|
-
- **If doesn't exist**:
|
|
799
|
-
- Create empty tracker file with template:
|
|
800
|
-
```markdown
|
|
801
|
-
# Mother Brain Issues Tracker
|
|
802
|
-
|
|
803
|
-
## Issues Submitted to GitHub (super-state/mother-brain)
|
|
804
|
-
|
|
805
|
-
(No issues submitted yet)
|
|
806
|
-
```
|
|
807
|
-
|
|
808
|
-
**Step 2A.1.2: Correlate Learnings with File Changes**
|
|
809
|
-
|
|
810
|
-
- For each learning entry found:
|
|
811
|
-
1. Identify which file(s) were modified for this learning
|
|
812
|
-
2. Extract the relevant diff sections (not the whole file diff)
|
|
813
|
-
3. Match learning description to code changes
|
|
814
|
-
|
|
815
|
-
- Group by improvement type:
|
|
816
|
-
- **Behavioral improvements** β Mother Brain SKILL.md changes
|
|
817
|
-
- **Feedback handling** β Child Brain SKILL.md changes
|
|
818
|
-
- **Skill creation** β Skill Creator SKILL.md changes
|
|
819
|
-
|
|
820
|
-
**Step 2A.1.3: Generate Individual Issues (with Deduplication)**
|
|
821
|
-
|
|
822
|
-
- **Before generating issues**: Check each improvement against issues tracker
|
|
823
|
-
- Compare improvement title/description against already-submitted issues
|
|
824
|
-
- If match found: Skip this improvement
|
|
825
|
-
- If no match: Proceed to generate issue
|
|
826
|
-
|
|
827
|
-
- Display deduplication results:
|
|
828
|
-
```
|
|
829
|
-
π Checking for duplicate submissions...
|
|
830
|
-
|
|
831
|
-
Found [X] improvements:
|
|
832
|
-
- [Y] new (will be submitted)
|
|
833
|
-
- [Z] already submitted (skipped)
|
|
834
|
-
```
|
|
835
|
-
|
|
836
|
-
- **If all improvements already submitted**:
|
|
837
|
-
- Display: "β
All improvements already submitted! No duplicates created."
|
|
838
|
-
- Return to Step 2A (Improve Mother Brain Menu)
|
|
839
|
-
|
|
840
|
-
- For EACH NEW (not duplicate) improvement, create a separate issue:
|
|
841
|
-
|
|
842
|
-
```markdown
|
|
843
|
-
Title: [Improvement] [Brief title describing THIS specific improvement]
|
|
844
|
-
|
|
845
|
-
## Summary
|
|
846
|
-
[2-3 sentences explaining what this specific improvement does]
|
|
847
|
-
|
|
848
|
-
## Problem
|
|
849
|
-
[What friction was encountered that triggered this improvement]
|
|
850
|
-
|
|
851
|
-
## Solution
|
|
852
|
-
[How Mother Brain addressed the friction]
|
|
853
|
-
|
|
854
|
-
## Changes Made
|
|
855
|
-
**File**: [filename] (lines ~X-Y)
|
|
856
|
-
|
|
857
|
-
<details>
|
|
858
|
-
<summary>View diff</summary>
|
|
859
|
-
|
|
860
|
-
```diff
|
|
861
|
-
[relevant diff for THIS improvement only - not entire file]
|
|
862
|
-
```
|
|
863
|
-
</details>
|
|
864
|
-
|
|
865
|
-
## Benefits
|
|
866
|
-
[How this helps all Mother Brain users]
|
|
867
|
-
|
|
868
|
-
## Testing
|
|
869
|
-
[How the improvement was validated]
|
|
870
|
-
|
|
871
|
-
---
|
|
872
|
-
*Submitted via Mother Brain v[version]*
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
**Step 2A.1.4: Submit Issues via gh CLI**
|
|
876
|
-
|
|
877
|
-
- **Pre-flight Check**: Verify gh CLI is available and authenticated
|
|
878
|
-
```powershell
|
|
879
|
-
gh --version
|
|
880
|
-
gh auth status
|
|
881
|
-
```
|
|
882
|
-
|
|
883
|
-
- **If gh CLI available and authenticated**:
|
|
884
|
-
- For each generated improvement:
|
|
885
|
-
1. Create GitHub issue using gh CLI:
|
|
886
|
-
```powershell
|
|
887
|
-
gh issue create --repo super-state/mother-brain --title "[title]" --body "[body]"
|
|
888
|
-
```
|
|
889
|
-
2. Parse output to get issue number and URL
|
|
890
|
-
3. Collect issue numbers and URLs
|
|
891
|
-
4. Add small delay between submissions (avoid rate limiting): `Start-Sleep -Seconds 2`
|
|
892
|
-
|
|
893
|
-
- Target repository: `super-state/mother-brain`
|
|
894
|
-
- Detected from: git remote (if configured)
|
|
895
|
-
- Fallback: hardcoded default
|
|
896
|
-
|
|
897
|
-
- **If gh CLI not installed or not authenticated**:
|
|
898
|
-
- **Fallback to manual submission**:
|
|
899
|
-
1. Save each issue to `.mother-brain/github-issues/issue-[N].md`
|
|
900
|
-
2. Display instructions:
|
|
901
|
-
```
|
|
902
|
-
β οΈ gh CLI not available
|
|
903
|
-
|
|
904
|
-
To auto-submit improvements, install gh CLI:
|
|
905
|
-
https://cli.github.com
|
|
906
|
-
|
|
907
|
-
Then authenticate: gh auth login
|
|
908
|
-
|
|
909
|
-
π Issue content saved to:
|
|
910
|
-
- .mother-brain/github-issues/issue-1.md
|
|
911
|
-
- .mother-brain/github-issues/issue-2.md
|
|
912
|
-
|
|
913
|
-
You can submit these manually at:
|
|
914
|
-
https://github.com/super-state/mother-brain/issues/new
|
|
915
|
-
```
|
|
916
|
-
3. Return to main menu with saved files
|
|
917
|
-
|
|
918
|
-
**Step 2A.1.5: Update Issues Tracker & Display Results**
|
|
919
|
-
|
|
920
|
-
- **Update `.mother-brain/issues-tracker.md`**:
|
|
921
|
-
- Add new section for this session (if new issues were created):
|
|
922
|
-
```markdown
|
|
923
|
-
### Session: [Date] - [Context]
|
|
924
|
-
|
|
925
|
-
| Issue # | Title | Status | URL |
|
|
926
|
-
|---------|-------|--------|-----|
|
|
927
|
-
| #[N] | [Title] | β
Submitted | [URL] |
|
|
928
|
-
```
|
|
929
|
-
- Commit changes to git:
|
|
930
|
-
```powershell
|
|
931
|
-
git add .mother-brain/issues-tracker.md
|
|
932
|
-
git commit -m "docs: track submitted issues from [session context]"
|
|
933
|
-
```
|
|
934
|
-
|
|
935
|
-
- Display summary of ALL submitted issues:
|
|
936
|
-
```
|
|
937
|
-
β
Improvements Submitted!
|
|
938
|
-
|
|
939
|
-
Created [N] new issues:
|
|
940
|
-
|
|
941
|
-
π #[1]: [title1]
|
|
942
|
-
[issue URL]
|
|
943
|
-
|
|
944
|
-
π #[2]: [title2]
|
|
945
|
-
[issue URL]
|
|
946
|
-
|
|
947
|
-
π #[3]: [title3]
|
|
948
|
-
[issue URL]
|
|
949
|
-
|
|
950
|
-
[If any were skipped] Skipped [Z] duplicates already submitted
|
|
951
|
-
|
|
952
|
-
Your contributions are now visible to maintainers.
|
|
953
|
-
Tracker updated: .mother-brain/issues-tracker.md
|
|
954
|
-
```
|
|
955
|
-
|
|
956
|
-
- Use `ask_user` with choices:
|
|
957
|
-
- "Keep local changes (for further work)"
|
|
958
|
-
- "Revert Mother Brain files (clean slate)"
|
|
959
|
-
|
|
960
|
-
- **If revert selected**:
|
|
961
|
-
```powershell
|
|
962
|
-
git checkout HEAD -- ".github/skills/mother-brain/" ".github/skills/child-brain/" ".github/skills/skill-creator/" "cli/"
|
|
963
|
-
```
|
|
964
|
-
- Display: "β¨ Local Mother Brain files reverted to clean slate."
|
|
965
|
-
|
|
966
|
-
- Return to main menu (Step 2)
|
|
705
|
+
- **Read `references/improvement-pipeline.md`** for the full pipeline (Steps 2A.1.1β2A.1.5)
|
|
706
|
+
- Covers: gather sources (learning log, core file diffs, conversation context), deduplication via issues tracker, correlate learnings with file changes, generate individual GitHub issues, submit via gh CLI (with manual fallback), update tracker
|
|
707
|
+
- Target repository: `super-state/mother-brain`
|
|
708
|
+
- After submission β return to main menu (Step 2)
|
|
967
709
|
|
|
968
710
|
### 2A.2 **Review Community Improvements** (Maintainer Workflow)
|
|
969
711
|
- **Access**: Only shown when meta-mode is active (in Mother Brain framework repo)
|
|
@@ -1324,92 +1066,10 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
1324
1066
|
|
|
1325
1067
|
### 2D. **Release Mother Brain** (Framework Versioning)
|
|
1326
1068
|
- When user selects "Release Mother Brain" from menu or after eject:
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
**
|
|
1331
|
-
|
|
1332
|
-
**β‘ MANDATORY RELEASE CHECKLIST (All items MUST be completed)**
|
|
1333
|
-
|
|
1334
|
-
Every release MUST update ALL of the following:
|
|
1335
|
-
```
|
|
1336
|
-
[ ] cli/package.json - version field
|
|
1337
|
-
[ ] cli/src/cli.ts - version constant (if exists)
|
|
1338
|
-
[ ] README.md - version badge AND version text
|
|
1339
|
-
[ ] Git commit with changes
|
|
1340
|
-
[ ] Git tag (v0.0.X)
|
|
1341
|
-
[ ] Push to remote (main + tags)
|
|
1342
|
-
[ ] GitHub Release (created automatically by workflow)
|
|
1343
|
-
[ ] npm publish (triggered by tag push via workflow)
|
|
1344
|
-
```
|
|
1345
|
-
|
|
1346
|
-
**β BLOCKING RULE**: Do NOT return to menu until ALL items above are completed.
|
|
1347
|
-
|
|
1348
|
-
**β‘ ONE-CLICK RELEASE FLOW (No prompts, no menus)**
|
|
1349
|
-
|
|
1350
|
-
When user selects "Release Mother Brain", execute ALL of the following automatically:
|
|
1351
|
-
|
|
1352
|
-
**Step 2D.1: Verify & Analyze**
|
|
1353
|
-
- Check current folder is mother-brain framework folder
|
|
1354
|
-
- If in a project folder: Display error and offer to return to framework
|
|
1355
|
-
- Run `git status` to verify there are changes to release
|
|
1356
|
-
- If no changes: Display "Nothing to release" and return to menu
|
|
1357
|
-
|
|
1358
|
-
**Step 2D.2: Auto-Determine Version**
|
|
1359
|
-
- Read current version from `cli/package.json`
|
|
1360
|
-
- Scan learning-log.md entries since last release tag (if exists)
|
|
1361
|
-
- **Auto-determine version bump**:
|
|
1362
|
-
- If any entry contains "breaking" or "major" β **major** bump (X.0.0)
|
|
1363
|
-
- If any entry contains "feature", "new", "add" β **minor** bump (0.X.0)
|
|
1364
|
-
- Otherwise β **patch** bump (0.0.X)
|
|
1365
|
-
- Do NOT ask user - auto-decide based on content
|
|
1366
|
-
|
|
1367
|
-
**Step 2D.3: Update ALL Version References (MANDATORY)**
|
|
1368
|
-
- Update `cli/package.json`: `"version": "[new-version]"`
|
|
1369
|
-
- Update `cli/src/cli.ts`: version constant (search for old version, replace with new)
|
|
1370
|
-
- Update `README.md`:
|
|
1371
|
-
- Find `version-X.X.X-blue` badge and replace with new version
|
|
1372
|
-
- Find `**Version**: X.X.X` text and replace with new version
|
|
1373
|
-
- **Verify all files updated before proceeding**
|
|
1374
|
-
|
|
1375
|
-
**Step 2D.4: Sync Skills to CLI and Agents**
|
|
1376
|
-
- Copy `.github/skills/*` to `cli/skills/` (overwrite) β for npm package
|
|
1377
|
-
- Verify `.agents/skills/` symlinks point to `.github/skills/` β for Codex CLI in framework repo
|
|
1378
|
-
|
|
1379
|
-
**Step 2D.5: Build CLI**
|
|
1380
|
-
- Run `cd cli && npm run build`
|
|
1381
|
-
- If build fails: STOP and display error
|
|
1382
|
-
|
|
1383
|
-
**Step 2D.6: Execute Git Operations**
|
|
1384
|
-
- Stage all changes: `git add -A`
|
|
1385
|
-
- Commit: `git commit -m "[type]: [description] (v[version])"`
|
|
1386
|
-
- Create tag: `git tag v[version]`
|
|
1387
|
-
- **Push to origin (super-state) ONLY**: `git push origin main --tags`
|
|
1388
|
-
- **NEVER push to personal fork** - only super-state has npm publish token
|
|
1389
|
-
|
|
1390
|
-
**Step 2D.7: Confirmation**
|
|
1391
|
-
- Wait for workflow to complete (or check status)
|
|
1392
|
-
- Display:
|
|
1393
|
-
```
|
|
1394
|
-
β
Release v[version] Published!
|
|
1395
|
-
|
|
1396
|
-
β
cli/package.json updated
|
|
1397
|
-
β
cli/src/cli.ts updated
|
|
1398
|
-
β
README.md updated
|
|
1399
|
-
β
Git tag created and pushed
|
|
1400
|
-
β
GitHub Release created (via workflow)
|
|
1401
|
-
β
npm publish triggered (via workflow)
|
|
1402
|
-
|
|
1403
|
-
Tag: v[version]
|
|
1404
|
-
Release: https://github.com/superdenby/MotherBrain/releases/tag/v[version]
|
|
1405
|
-
```
|
|
1406
|
-
|
|
1407
|
-
- Use `ask_user` with choices:
|
|
1408
|
-
- "Open release on GitHub"
|
|
1409
|
-
- "Return to main menu"
|
|
1410
|
-
- "Start new project"
|
|
1411
|
-
|
|
1412
|
-
- Handle selection appropriately
|
|
1069
|
+
- **Read `references/release-checklist.md`** for the full release workflow (Steps 2D.1β2D.7)
|
|
1070
|
+
- **β‘ ONE-CLICK RELEASE FLOW**: Verify changes β auto-determine version β update all version references β sync skills β build CLI β git commit/tag/push
|
|
1071
|
+
- **β BLOCKING RULE**: Do NOT return to menu until ALL checklist items are completed
|
|
1072
|
+
- **NEVER push to personal fork** β only super-state has npm publish token
|
|
1413
1073
|
|
|
1414
1074
|
### 2E. **Brainstorm Mode** (Thinking Partner)
|
|
1415
1075
|
- When user selects "Just talk (brainstorm mode)":
|
|
@@ -2977,99 +2637,12 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
2977
2637
|
- Emphasize learning and iteration mindset
|
|
2978
2638
|
|
|
2979
2639
|
### 7.6 **Setup Validation & Self-Healing (MANDATORY REFLECTION - BLOCKS COMPLETION)**
|
|
2980
|
-
- **
|
|
2981
|
-
- **When to run**: IMMEDIATELY after Step 7.5
|
|
2982
|
-
- **Purpose**: Detect and learn from
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
- Review the conversation history from Steps 3-7 for:
|
|
2986
|
-
- **Build/Tool Failures**: Commands that failed, tools that errored
|
|
2987
|
-
- **Skill Creation Failures**: Skills that failed to create or validate
|
|
2988
|
-
- **Research Failures**: Web searches that returned no results
|
|
2989
|
-
- **File Creation Errors**: Documents that failed to create
|
|
2990
|
-
- **Retry Attempts**: Any step that had to be re-run
|
|
2991
|
-
- **Partial Completions**: Steps that succeeded but with warnings
|
|
2992
|
-
|
|
2993
|
-
- If 0 issues detected: Skip to Step 8 (Task Document Creation) when user selects "Start Task 001"
|
|
2994
|
-
- If 1+ issues detected: Proceed with healing
|
|
2995
|
-
|
|
2996
|
-
**Step 7.6.2: Layer 1 - Fix Current Project Setup**
|
|
2997
|
-
- For each issue found:
|
|
2998
|
-
- Identify what failed
|
|
2999
|
-
- Determine root cause
|
|
3000
|
-
- Apply fix to current project:
|
|
3001
|
-
- Re-run failed command/tool
|
|
3002
|
-
- Re-create failed file
|
|
3003
|
-
- Re-validate failed skill
|
|
3004
|
-
- Fix any incomplete setup
|
|
3005
|
-
- Continue until all issues resolved
|
|
3006
|
-
|
|
3007
|
-
**Step 7.6.3: Layer 2 - Extract Meta-Lessons for Mother Brain**
|
|
3008
|
-
- For each issue, ask: "What could Mother Brain do differently to prevent this in ALL future projects?"
|
|
3009
|
-
- Categories to consider:
|
|
3010
|
-
- **Missing Validation**: Should a validation step exist where it doesn't?
|
|
3011
|
-
- **Error Handling Gap**: Should Mother Brain catch and handle this error type?
|
|
3012
|
-
- **Workflow Ordering**: Should steps be reordered to prevent this?
|
|
3013
|
-
- **Missing Retry Logic**: Should automatic retry be added?
|
|
3014
|
-
- **Missing Pre-Checks**: Should a prerequisite check exist?
|
|
3015
|
-
|
|
3016
|
-
- Extract project-agnostic principle:
|
|
3017
|
-
- β Bad: "Coffee project skill creation failed"
|
|
3018
|
-
- β
Good: "Skill creation should validate tool permissions before creating files"
|
|
3019
|
-
|
|
3020
|
-
**Step 7.6.4: Auto-Apply Mother Brain Updates**
|
|
3021
|
-
- For each meta-lesson extracted:
|
|
3022
|
-
- Identify which step/section of SKILL.md to update
|
|
3023
|
-
- Apply update using edit tool
|
|
3024
|
-
- Display what was changed (transparency, not approval)
|
|
3025
|
-
|
|
3026
|
-
- Log in `docs/learning-log.md`:
|
|
3027
|
-
```markdown
|
|
3028
|
-
## [Date] - Setup Self-Healing: [Project Name]
|
|
3029
|
-
**Issues Found**: [Count]
|
|
3030
|
-
**Layer 1 Fixes Applied**:
|
|
3031
|
-
- [What was fixed in this project's setup]
|
|
3032
|
-
**Layer 2 Meta-Lessons Extracted**:
|
|
3033
|
-
- [Project-agnostic principle 1]
|
|
3034
|
-
- [Project-agnostic principle 2]
|
|
3035
|
-
**Mother Brain Updates Applied**:
|
|
3036
|
-
- [Which step/section was updated]
|
|
3037
|
-
- [What preventive measure was added]
|
|
3038
|
-
**Impact**: Prevents [issue type] in all future projects
|
|
3039
|
-
```
|
|
3040
|
-
|
|
3041
|
-
**Step 7.6.5: Display Summary**
|
|
3042
|
-
- If issues were found, display:
|
|
3043
|
-
```
|
|
3044
|
-
π§ Setup Validation & Reflection Complete
|
|
3045
|
-
|
|
3046
|
-
Found [X] issue(s) during setup - all resolved:
|
|
3047
|
-
|
|
3048
|
-
β
Project Fixes:
|
|
3049
|
-
- [What was fixed in this project]
|
|
3050
|
-
|
|
3051
|
-
β
Mother Brain Improvements:
|
|
3052
|
-
- [Meta-lesson applied for future projects]
|
|
3053
|
-
|
|
3054
|
-
β
Reflection complete - setup is now truly complete!
|
|
3055
|
-
```
|
|
3056
|
-
|
|
3057
|
-
- If no issues found, display:
|
|
3058
|
-
```
|
|
3059
|
-
β
Reflection Complete
|
|
3060
|
-
|
|
3061
|
-
No issues detected during setup.
|
|
3062
|
-
All steps executed successfully.
|
|
3063
|
-
|
|
3064
|
-
Setup is now complete!
|
|
3065
|
-
```
|
|
3066
|
-
|
|
2640
|
+
- **Read `references/setup-validation.md`** for the full protocol (Steps 7.6.1β7.6.5)
|
|
2641
|
+
- **When to run**: IMMEDIATELY after Step 7.5 menu response, BEFORE proceeding to any next action
|
|
2642
|
+
- **Purpose**: Detect and learn from issues during setup flow (Steps 3-7)
|
|
2643
|
+
- Two-layer approach: Layer 1 fixes current project, Layer 2 extracts meta-lessons for all future projects
|
|
2644
|
+
- If 0 issues β skip to user's selected action; if 1+ issues β heal, then proceed
|
|
3067
2645
|
- **ONLY AFTER this step completes can you proceed to user's selected action from Step 7.5 menu**
|
|
3068
|
-
- This checkpoint ensures learning happens every session, not just when errors occur
|
|
3069
|
-
|
|
3070
|
-
- Continue to user's selected action from Step 7.5 menu
|
|
3071
|
-
|
|
3072
|
-
**Key Principle**: Every setup run improves Mother Brain for all future projects. Issues are not just fixedβthey're learned from.
|
|
3073
2646
|
|
|
3074
2647
|
### 8. **Task Document Creation**
|
|
3075
2648
|
- Create `docs/tasks/` directory
|
|
@@ -3128,7 +2701,7 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
3128
2701
|
|
|
3129
2702
|
Before implementing ANY task, you MUST complete this gate:
|
|
3130
2703
|
|
|
3131
|
-
**Step 9.0:
|
|
2704
|
+
**Step 9.0: Story Start Assessment**
|
|
3132
2705
|
|
|
3133
2706
|
1. **Load Project Brain** (if exists):
|
|
3134
2707
|
- Read `.mother-brain/project-brain.md`
|
|
@@ -3171,6 +2744,33 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
3171
2744
|
- Note: "No Elder Brain knowledge for [technology]"
|
|
3172
2745
|
- Plan to contribute back via Elder Brain RECEIVE after task
|
|
3173
2746
|
|
|
2747
|
+
**Step 9.0.1: Blocking Dependencies Collection (MANDATORY)**
|
|
2748
|
+
|
|
2749
|
+
Before starting ANY story, identify what the AI CANNOT do autonomously:
|
|
2750
|
+
|
|
2751
|
+
**Check for these dependency types:**
|
|
2752
|
+
- **Account/Service Setup**: Creating accounts, subscribing to services, accepting terms of service
|
|
2753
|
+
- **API Keys & Credentials**: Obtaining keys, secrets, OAuth tokens the AI cannot generate
|
|
2754
|
+
- **External Configuration**: Setting up third-party consoles, enabling features in dashboards
|
|
2755
|
+
- **Physical Actions**: Device setup, hardware configuration, local installations the AI can't perform
|
|
2756
|
+
- **Payment/Billing**: Anything requiring financial transactions
|
|
2757
|
+
|
|
2758
|
+
**If ANY blocking dependencies found:**
|
|
2759
|
+
```
|
|
2760
|
+
βΈοΈ Before I can work autonomously on this story, I need you to:
|
|
2761
|
+
|
|
2762
|
+
1. [Blocking dependency 1 - what exactly to do]
|
|
2763
|
+
2. [Blocking dependency 2 - what exactly to do]
|
|
2764
|
+
3. [Blocking dependency 3 - what exactly to do]
|
|
2765
|
+
|
|
2766
|
+
Let me know when these are ready, or if you need help with any step.
|
|
2767
|
+
```
|
|
2768
|
+
|
|
2769
|
+
- **WAIT for user confirmation before proceeding**
|
|
2770
|
+
- Update session-state.json with `blockingDependencies` array
|
|
2771
|
+
- When user confirms, verify programmatically where possible (see VERIFICATION OVER TRUST principle)
|
|
2772
|
+
- Only proceed to implementation when all blocking dependencies resolved
|
|
2773
|
+
|
|
3174
2774
|
3. **Skill Sufficiency Check** (CRITICAL):
|
|
3175
2775
|
- List existing skills in `.github/skills/`
|
|
3176
2776
|
- For EACH creative/specialized element in this task, ask:
|
|
@@ -3595,6 +3195,64 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
3595
3195
|
|
|
3596
3196
|
**Key Principle**: Mother Brain orchestrates; Child Brain analyzes and routes. This separation keeps Mother Brain clean.
|
|
3597
3197
|
|
|
3198
|
+
### 10A.1 **Mid-Story Sub-Task Classification (MANDATORY)**
|
|
3199
|
+
|
|
3200
|
+
When bugs, issues, or feedback arise DURING story execution (before outcome validation):
|
|
3201
|
+
|
|
3202
|
+
**Step 10A.1.1: Display Story Context Header**
|
|
3203
|
+
Always remind user of the active story:
|
|
3204
|
+
```
|
|
3205
|
+
π Current Story: [Outcome Name]
|
|
3206
|
+
Status: In Progress | [X/Y] acceptance criteria verified
|
|
3207
|
+
|
|
3208
|
+
β οΈ Issue Detected: [brief description of issue/feedback]
|
|
3209
|
+
```
|
|
3210
|
+
|
|
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?
|
|
3215
|
+
|
|
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
|
+
```
|
|
3220
|
+
|
|
3221
|
+
**Step 10A.1.3: Handle Based on Classification**
|
|
3222
|
+
|
|
3223
|
+
**If ESSENTIAL:**
|
|
3224
|
+
- Treat as immediate sub-task
|
|
3225
|
+
- Add to session-state.json: `currentStory.subTasks` with `essential: true`
|
|
3226
|
+
- Fix before continuing with story
|
|
3227
|
+
- Display: "π Adding as essential sub-task, fixing now..."
|
|
3228
|
+
|
|
3229
|
+
**If IMPROVEMENT (not essential):**
|
|
3230
|
+
- Add to backlog (roadmap.md or backlog section)
|
|
3231
|
+
- 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]..."
|
|
3234
|
+
|
|
3235
|
+
**If NOT SURE:**
|
|
3236
|
+
- Ask clarifying question:
|
|
3237
|
+
```
|
|
3238
|
+
Let me help clarify:
|
|
3239
|
+
|
|
3240
|
+
The current story's acceptance criteria are:
|
|
3241
|
+
1. [Criterion A]
|
|
3242
|
+
2. [Criterion B]
|
|
3243
|
+
|
|
3244
|
+
Does this issue block any of these specific criteria from being met?
|
|
3245
|
+
```
|
|
3246
|
+
- Based on response, classify as essential or improvement
|
|
3247
|
+
|
|
3248
|
+
**Step 10A.1.4: Maintain Story Focus**
|
|
3249
|
+
After handling sub-task:
|
|
3250
|
+
- Always return to story context
|
|
3251
|
+
- Show: "π Returning to: [Outcome Name]"
|
|
3252
|
+
- Display remaining acceptance criteria to verify
|
|
3253
|
+
|
|
3254
|
+
**Key Principle**: Stories stay focused on their acceptance criteria. Scope creep is routed to backlog, not allowed to derail completion.
|
|
3255
|
+
|
|
3598
3256
|
### 10B. **Post-Task Reflection via Child Brain** (Proactive Improvement)
|
|
3599
3257
|
- **When to run**: ALWAYS after task is marked complete by user - this is mandatory, not optional
|
|
3600
3258
|
- **Trigger**: Step 10 task completion β Step 10B runs automatically β then Step 11
|
|
@@ -3789,9 +3447,25 @@ Key rules: Use `allow_freeform: true` on all `ask_user` calls. Check freeform re
|
|
|
3789
3447
|
```json
|
|
3790
3448
|
{
|
|
3791
3449
|
"projectName": "Gaming Backlog Manager",
|
|
3450
|
+
"currentStory": {
|
|
3451
|
+
"id": "outcome-001",
|
|
3452
|
+
"name": "Ability to track my game backlog",
|
|
3453
|
+
"approved": false,
|
|
3454
|
+
"acceptanceCriteria": [
|
|
3455
|
+
{"criterion": "I can add games to my backlog", "verified": true},
|
|
3456
|
+
{"criterion": "I can mark games as completed", "verified": false},
|
|
3457
|
+
{"criterion": "I can see my backlog list", "verified": true}
|
|
3458
|
+
],
|
|
3459
|
+
"subTasks": [
|
|
3460
|
+
{"id": "sub-001", "description": "Fix mobile layout", "essential": true, "status": "done"},
|
|
3461
|
+
{"id": "sub-002", "description": "Add dark mode", "essential": false, "status": "backlog"}
|
|
3462
|
+
],
|
|
3463
|
+
"blockingDependencies": []
|
|
3464
|
+
},
|
|
3792
3465
|
"lastTask": "003-localstorage-data-layer",
|
|
3793
3466
|
"lastTaskStatus": "DONE",
|
|
3794
3467
|
"currentPhase": "Phase 1",
|
|
3468
|
+
"completedStories": ["outcome-001"],
|
|
3795
3469
|
"completedTasks": ["001", "002", "003"],
|
|
3796
3470
|
"totalTasks": 9,
|
|
3797
3471
|
"skillsCreated": ["pwa-builder"],
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Improvement Submission Pipeline
|
|
2
|
+
|
|
3
|
+
Automatically detect ALL local Mother Brain improvements, parse learning logs for each distinct improvement, and submit a separate GitHub issue for each one.
|
|
4
|
+
|
|
5
|
+
## Step 2A.1.1: Gather All Improvement Sources
|
|
6
|
+
|
|
7
|
+
Collect from THREE sources:
|
|
8
|
+
|
|
9
|
+
### Source 1: Learning Log Entries
|
|
10
|
+
- Read `.mother-brain/project-brain.md` or `docs/learning-log.md`
|
|
11
|
+
- Parse for individual learning entries (marked by `## [Date]` or similar)
|
|
12
|
+
- Each entry = potential improvement
|
|
13
|
+
- Extract: date, trigger, learning, resolution
|
|
14
|
+
|
|
15
|
+
### Source 2: Core File Changes
|
|
16
|
+
- Get changes to Mother Brain core files:
|
|
17
|
+
```powershell
|
|
18
|
+
git diff HEAD -- ".github/skills/mother-brain/SKILL.md"
|
|
19
|
+
git diff HEAD -- ".github/skills/child-brain/SKILL.md"
|
|
20
|
+
git diff HEAD -- ".github/skills/skill-creator/SKILL.md"
|
|
21
|
+
```
|
|
22
|
+
- If files are new/untracked: `git diff /dev/null -- [file]`
|
|
23
|
+
|
|
24
|
+
### Source 3: Conversation Context
|
|
25
|
+
- Scan conversation history for:
|
|
26
|
+
- Friction points discussed
|
|
27
|
+
- Problems reported
|
|
28
|
+
- Solutions implemented
|
|
29
|
+
- Pattern: "this isn't working" β "fixed by..."
|
|
30
|
+
|
|
31
|
+
- **If no improvements found across all sources**:
|
|
32
|
+
- Display: "π No local Mother Brain improvements to send."
|
|
33
|
+
- Return to Step 2A (Improve Mother Brain Menu)
|
|
34
|
+
|
|
35
|
+
## Step 2A.1.1A: Check Issues Tracker (Deduplication)
|
|
36
|
+
|
|
37
|
+
- Check if `.mother-brain/issues-tracker.md` exists
|
|
38
|
+
- **If exists**: Read and parse submitted issues list for comparison
|
|
39
|
+
- **If doesn't exist**: Create empty tracker file
|
|
40
|
+
|
|
41
|
+
## Step 2A.1.2: Correlate Learnings with File Changes
|
|
42
|
+
|
|
43
|
+
- For each learning entry found:
|
|
44
|
+
1. Identify which file(s) were modified for this learning
|
|
45
|
+
2. Extract the relevant diff sections (not the whole file diff)
|
|
46
|
+
3. Match learning description to code changes
|
|
47
|
+
|
|
48
|
+
- Group by improvement type:
|
|
49
|
+
- **Behavioral improvements** β Mother Brain SKILL.md changes
|
|
50
|
+
- **Feedback handling** β Child Brain SKILL.md changes
|
|
51
|
+
- **Skill creation** β Skill Creator SKILL.md changes
|
|
52
|
+
|
|
53
|
+
## Step 2A.1.3: Generate Individual Issues (with Deduplication)
|
|
54
|
+
|
|
55
|
+
- Check each improvement against issues tracker β skip duplicates
|
|
56
|
+
- For EACH NEW improvement, create a separate issue using this template:
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
Title: [Improvement] [Brief title describing THIS specific improvement]
|
|
60
|
+
|
|
61
|
+
## Summary
|
|
62
|
+
[2-3 sentences explaining what this specific improvement does]
|
|
63
|
+
|
|
64
|
+
## Problem
|
|
65
|
+
[What friction was encountered that triggered this improvement]
|
|
66
|
+
|
|
67
|
+
## Solution
|
|
68
|
+
[How Mother Brain addressed the friction]
|
|
69
|
+
|
|
70
|
+
## Changes Made
|
|
71
|
+
**File**: [filename] (lines ~X-Y)
|
|
72
|
+
|
|
73
|
+
<details>
|
|
74
|
+
<summary>View diff</summary>
|
|
75
|
+
|
|
76
|
+
\```diff
|
|
77
|
+
[relevant diff for THIS improvement only - not entire file]
|
|
78
|
+
\```
|
|
79
|
+
</details>
|
|
80
|
+
|
|
81
|
+
## Benefits
|
|
82
|
+
[How this helps all Mother Brain users]
|
|
83
|
+
|
|
84
|
+
## Testing
|
|
85
|
+
[How the improvement was validated]
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
*Submitted via Mother Brain v[version]*
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Step 2A.1.4: Submit Issues via gh CLI
|
|
92
|
+
|
|
93
|
+
- **Pre-flight Check**: `gh --version && gh auth status`
|
|
94
|
+
|
|
95
|
+
- **If gh CLI available and authenticated**:
|
|
96
|
+
- For each improvement: `gh issue create --repo super-state/mother-brain --title "[title]" --body "[body]"`
|
|
97
|
+
- Parse output for issue number and URL
|
|
98
|
+
- Add `Start-Sleep -Seconds 2` between submissions (rate limiting)
|
|
99
|
+
- Target repository: `super-state/mother-brain`
|
|
100
|
+
|
|
101
|
+
- **If gh CLI not available**:
|
|
102
|
+
- Save each issue to `.mother-brain/github-issues/issue-[N].md`
|
|
103
|
+
- Display instructions for manual submission at https://github.com/super-state/mother-brain/issues/new
|
|
104
|
+
|
|
105
|
+
## Step 2A.1.5: Update Issues Tracker & Display Results
|
|
106
|
+
|
|
107
|
+
- Update `.mother-brain/issues-tracker.md` with new session entries
|
|
108
|
+
- Commit tracker: `git add .mother-brain/issues-tracker.md && git commit -m "docs: track submitted issues"`
|
|
109
|
+
- Display summary of all submitted issues with numbers and URLs
|
|
110
|
+
- Use `ask_user` with choices:
|
|
111
|
+
- "Keep local changes (for further work)"
|
|
112
|
+
- "Revert Mother Brain files (clean slate)"
|
|
113
|
+
- If revert: `git checkout HEAD -- ".github/skills/mother-brain/" ".github/skills/child-brain/" ".github/skills/skill-creator/" "cli/"`
|
|
114
|
+
- Return to main menu (Step 2)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Existing Project Onboarding Workflow
|
|
2
|
+
|
|
3
|
+
When user selects to onboard Mother Brain into an existing project, follow these steps:
|
|
4
|
+
|
|
5
|
+
## Step 2.2.1: Deep Repo Analysis
|
|
6
|
+
- Scan ALL files in the directory (not just specific ones)
|
|
7
|
+
- Use `glob` and `view` to understand:
|
|
8
|
+
- **Project Type**: What kind of project is this? (web app, game, library, CLI, etc.)
|
|
9
|
+
- **Tech Stack**: Languages, frameworks, dependencies
|
|
10
|
+
- **Architecture**: Folder structure, patterns, modules
|
|
11
|
+
- **Features Built**: What functionality already exists?
|
|
12
|
+
- **Current State**: Is it working? Partially complete? Early stage?
|
|
13
|
+
|
|
14
|
+
- Display findings:
|
|
15
|
+
```
|
|
16
|
+
π Project Analysis Complete
|
|
17
|
+
|
|
18
|
+
What I Found:
|
|
19
|
+
- Type: [Project type detected]
|
|
20
|
+
- Tech Stack: [Languages, frameworks]
|
|
21
|
+
- Features Built: [List of detected features]
|
|
22
|
+
- Current State: [Assessment of completeness]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Step 2.2.2: Vision Extraction (Clarifying Questions)
|
|
26
|
+
- Ask user questions to fill gaps (like vision discovery, but informed by analysis):
|
|
27
|
+
- "What is the main goal of this project?"
|
|
28
|
+
- "Who is this for? Who will use it?"
|
|
29
|
+
- "What problem does this solve?"
|
|
30
|
+
- "What inspired this project?" (to trigger domain research)
|
|
31
|
+
- "What's the most important thing to get right?"
|
|
32
|
+
- "Where are you trying to get to next? What's your next milestone?"
|
|
33
|
+
|
|
34
|
+
- Create `.mother-brain/docs/vision.md` with extracted vision
|
|
35
|
+
|
|
36
|
+
## Step 2.2.3: Retrospective Roadmap
|
|
37
|
+
- Build roadmap that reflects reality:
|
|
38
|
+
- **Phase 0 (Done)**: What's already built (based on repo analysis)
|
|
39
|
+
- **Phase 1 (Current)**: What's in progress or next immediate steps
|
|
40
|
+
- **Phase 2+**: Future milestones based on user's stated goals
|
|
41
|
+
|
|
42
|
+
- Mark completed work as DONE in roadmap
|
|
43
|
+
- Identify current position in timeline
|
|
44
|
+
- Create `.mother-brain/docs/roadmap.md`
|
|
45
|
+
|
|
46
|
+
## Step 2.2.4: Skill Identification
|
|
47
|
+
- Analyze patterns in existing code
|
|
48
|
+
- Identify repetitive work that warrants skills
|
|
49
|
+
- Invoke skill-creator for detected patterns
|
|
50
|
+
|
|
51
|
+
## Step 2.2.5: Confirmation
|
|
52
|
+
- Display:
|
|
53
|
+
```
|
|
54
|
+
β
Mother Brain Onboarded!
|
|
55
|
+
|
|
56
|
+
π Vision: Captured
|
|
57
|
+
π Roadmap: [X] tasks identified
|
|
58
|
+
- [Y] already complete
|
|
59
|
+
- [Z] remaining
|
|
60
|
+
π οΈ Skills: [N] identified for creation
|
|
61
|
+
|
|
62
|
+
Ready to help you reach your next milestone!
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- Use `ask_user` with choices:
|
|
66
|
+
- "Start next task"
|
|
67
|
+
- "Review the roadmap"
|
|
68
|
+
- "Review the vision"
|
|
69
|
+
- "Adjust something before continuing"
|
|
70
|
+
|
|
71
|
+
- Proceed to normal workflow (Step 8+)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Release Checklist β Mother Brain Framework
|
|
2
|
+
|
|
3
|
+
One-click release: commit, version bump, push, tag, and publish.
|
|
4
|
+
|
|
5
|
+
**Prerequisite**: Must be in the mother-brain framework folder (not a project folder)
|
|
6
|
+
|
|
7
|
+
## Mandatory Checklist (ALL items MUST be completed)
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
[ ] cli/package.json - version field
|
|
11
|
+
[ ] cli/src/cli.ts - version constant (if exists)
|
|
12
|
+
[ ] README.md - version badge AND version text
|
|
13
|
+
[ ] Git commit with changes
|
|
14
|
+
[ ] Git tag (v0.0.X)
|
|
15
|
+
[ ] Push to remote (main + tags)
|
|
16
|
+
[ ] GitHub Release (created automatically by workflow)
|
|
17
|
+
[ ] npm publish (triggered by tag push via workflow)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**β BLOCKING RULE**: Do NOT return to menu until ALL items above are completed.
|
|
21
|
+
|
|
22
|
+
## Step 2D.1: Verify & Analyze
|
|
23
|
+
- Check current folder is mother-brain framework folder
|
|
24
|
+
- If in a project folder: Display error and offer to return to framework
|
|
25
|
+
- Run `git status` to verify there are changes to release
|
|
26
|
+
- If no changes: Display "Nothing to release" and return to menu
|
|
27
|
+
|
|
28
|
+
## Step 2D.2: Auto-Determine Version
|
|
29
|
+
- Read current version from `cli/package.json`
|
|
30
|
+
- Scan learning-log.md entries since last release tag (if exists)
|
|
31
|
+
- **Auto-determine version bump**:
|
|
32
|
+
- If any entry contains "breaking" or "major" β **major** bump (X.0.0)
|
|
33
|
+
- If any entry contains "feature", "new", "add" β **minor** bump (0.X.0)
|
|
34
|
+
- Otherwise β **patch** bump (0.0.X)
|
|
35
|
+
- Do NOT ask user - auto-decide based on content
|
|
36
|
+
|
|
37
|
+
## Step 2D.3: Update ALL Version References (MANDATORY)
|
|
38
|
+
- Update `cli/package.json`: `"version": "[new-version]"`
|
|
39
|
+
- Update `cli/src/cli.ts`: version constant (search for old version, replace with new)
|
|
40
|
+
- Update `README.md`:
|
|
41
|
+
- Find `version-X.X.X-blue` badge and replace with new version
|
|
42
|
+
- Find `**Version**: X.X.X` text and replace with new version
|
|
43
|
+
- **Verify all files updated before proceeding**
|
|
44
|
+
|
|
45
|
+
## Step 2D.4: Sync Skills to CLI and Agents
|
|
46
|
+
- Copy `.github/skills/*` to `cli/skills/` (overwrite) β for npm package
|
|
47
|
+
- Verify `.agents/skills/` symlinks point to `.github/skills/` β for Codex CLI in framework repo
|
|
48
|
+
|
|
49
|
+
## Step 2D.5: Build CLI
|
|
50
|
+
- Run `cd cli && npm run build`
|
|
51
|
+
- If build fails: STOP and display error
|
|
52
|
+
|
|
53
|
+
## Step 2D.6: Execute Git Operations
|
|
54
|
+
- Stage all changes: `git add -A`
|
|
55
|
+
- Commit: `git commit -m "[type]: [description] (v[version])"`
|
|
56
|
+
- Create tag: `git tag v[version]`
|
|
57
|
+
- **Push to origin (super-state) ONLY**: `git push origin main --tags`
|
|
58
|
+
- **NEVER push to personal fork** - only super-state has npm publish token
|
|
59
|
+
|
|
60
|
+
## Step 2D.7: Confirmation
|
|
61
|
+
- Display release summary with all checkmarks
|
|
62
|
+
- Use `ask_user` with choices:
|
|
63
|
+
- "Open release on GitHub"
|
|
64
|
+
- "Return to main menu"
|
|
65
|
+
- "Start new project"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Setup Validation & Self-Healing Protocol
|
|
2
|
+
|
|
3
|
+
**MANDATORY REFLECTION β Blocks setup completion.**
|
|
4
|
+
|
|
5
|
+
This is the REFLECTION step mentioned in RULE 8. It MUST complete before declaring "setup complete".
|
|
6
|
+
|
|
7
|
+
**When to run**: IMMEDIATELY after Step 7.5 menu response, BEFORE proceeding to any next action.
|
|
8
|
+
**Purpose**: Detect and learn from any issues during the setup flow (Steps 3-7).
|
|
9
|
+
|
|
10
|
+
## Step 7.6.1: Scan Conversation for Setup Issues
|
|
11
|
+
- Review conversation history from Steps 3-7 for:
|
|
12
|
+
- **Build/Tool Failures**: Commands that failed, tools that errored
|
|
13
|
+
- **Skill Creation Failures**: Skills that failed to create or validate
|
|
14
|
+
- **Research Failures**: Web searches that returned no results
|
|
15
|
+
- **File Creation Errors**: Documents that failed to create
|
|
16
|
+
- **Retry Attempts**: Any step that had to be re-run
|
|
17
|
+
- **Partial Completions**: Steps that succeeded but with warnings
|
|
18
|
+
|
|
19
|
+
- If 0 issues detected: Skip to Step 8 when user selects "Start Task 001"
|
|
20
|
+
- If 1+ issues detected: Proceed with healing
|
|
21
|
+
|
|
22
|
+
## Step 7.6.2: Layer 1 β Fix Current Project Setup
|
|
23
|
+
- For each issue found:
|
|
24
|
+
- Identify what failed
|
|
25
|
+
- Determine root cause
|
|
26
|
+
- Apply fix: re-run failed command, re-create failed file, re-validate failed skill
|
|
27
|
+
- Continue until all issues resolved
|
|
28
|
+
|
|
29
|
+
## Step 7.6.3: Layer 2 β Extract Meta-Lessons for Mother Brain
|
|
30
|
+
- For each issue, ask: "What could Mother Brain do differently to prevent this in ALL future projects?"
|
|
31
|
+
- Categories:
|
|
32
|
+
- **Missing Validation**: Should a validation step exist where it doesn't?
|
|
33
|
+
- **Error Handling Gap**: Should Mother Brain catch and handle this error type?
|
|
34
|
+
- **Workflow Ordering**: Should steps be reordered to prevent this?
|
|
35
|
+
- **Missing Retry Logic**: Should automatic retry be added?
|
|
36
|
+
- **Missing Pre-Checks**: Should a prerequisite check exist?
|
|
37
|
+
|
|
38
|
+
- Extract project-agnostic principle:
|
|
39
|
+
- β Bad: "Coffee project skill creation failed"
|
|
40
|
+
- β
Good: "Skill creation should validate tool permissions before creating files"
|
|
41
|
+
|
|
42
|
+
## Step 7.6.4: Auto-Apply Mother Brain Updates
|
|
43
|
+
- For each meta-lesson: identify SKILL.md section to update, apply edit, display changes
|
|
44
|
+
- Log in `docs/learning-log.md`:
|
|
45
|
+
```markdown
|
|
46
|
+
## [Date] - Setup Self-Healing: [Project Name]
|
|
47
|
+
**Issues Found**: [Count]
|
|
48
|
+
**Layer 1 Fixes Applied**: [What was fixed]
|
|
49
|
+
**Layer 2 Meta-Lessons Extracted**: [Principles]
|
|
50
|
+
**Mother Brain Updates Applied**: [Steps/sections updated]
|
|
51
|
+
**Impact**: Prevents [issue type] in all future projects
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Step 7.6.5: Display Summary
|
|
55
|
+
- If issues found:
|
|
56
|
+
```
|
|
57
|
+
π§ Setup Validation & Reflection Complete
|
|
58
|
+
Found [X] issue(s) β all resolved.
|
|
59
|
+
β
Project Fixes: [summary]
|
|
60
|
+
β
Mother Brain Improvements: [meta-lessons]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- If no issues:
|
|
64
|
+
```
|
|
65
|
+
β
Reflection Complete β No issues detected. Setup is complete!
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- **ONLY AFTER this step completes** β proceed to user's selected action from Step 7.5 menu
|
|
69
|
+
|
|
70
|
+
**Key Principle**: Every setup run improves Mother Brain for all future projects. Issues are not just fixedβthey're learned from.
|