mother-brain 0.0.26 → 0.0.31
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 +255 -48
package/dist/cli.js
CHANGED
|
@@ -653,7 +653,7 @@ async function uninstall(options) {
|
|
|
653
653
|
// src/cli.ts
|
|
654
654
|
import { exec as exec3 } from "child_process";
|
|
655
655
|
var program = new Command();
|
|
656
|
-
var VERSION = "0.0.
|
|
656
|
+
var VERSION = "0.0.31";
|
|
657
657
|
program.name("mother-brain").description("AI-powered project management framework for GitHub Copilot CLI").version(VERSION);
|
|
658
658
|
program.command("init").description("Initialize Mother Brain in the current project").option("-f, --force", "Overwrite existing skills").action(init);
|
|
659
659
|
program.command("update").description("Update Mother Brain skills to the latest version").action(update);
|
package/package.json
CHANGED
|
@@ -482,11 +482,29 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
482
482
|
- **Minimal detection**: For new project detection, a single glob for `.mother-brain/` is sufficient
|
|
483
483
|
- Goal: User sees menu within 1-2 tool calls, not 6+
|
|
484
484
|
|
|
485
|
-
**📦
|
|
485
|
+
**📦 AUTO-UPDATE CHECK (on startup, if project exists)**:
|
|
486
486
|
- If `.mother-brain/version.json` exists:
|
|
487
487
|
1. Read installed version from file
|
|
488
488
|
2. Check npm for latest: `npm view mother-brain version --json 2>$null`
|
|
489
|
-
3. If newer version available
|
|
489
|
+
3. If newer version available:
|
|
490
|
+
|
|
491
|
+
**STEP A: Capture Local Improvements FIRST (before updating)**
|
|
492
|
+
- Check if user modified Mother Brain skills:
|
|
493
|
+
- Compare `.github/skills/mother-brain/SKILL.md` to npm version
|
|
494
|
+
- Use `git diff --stat` if available, or file size/hash comparison
|
|
495
|
+
- If modifications detected:
|
|
496
|
+
```
|
|
497
|
+
📤 You've made improvements to Mother Brain!
|
|
498
|
+
|
|
499
|
+
Before updating, I'll submit your changes as suggestions.
|
|
500
|
+
```
|
|
501
|
+
- Run Step 2A.1 flow (automatic improvement submission):
|
|
502
|
+
- Extract diff/changes from local vs npm version
|
|
503
|
+
- Create GitHub issue on superdenby/MotherBrain
|
|
504
|
+
- Display: "✅ Improvement submitted as issue #[N]"
|
|
505
|
+
- Store improvement record in `.mother-brain/improvements-submitted.json`
|
|
506
|
+
|
|
507
|
+
**STEP B: Update to Latest Version**
|
|
490
508
|
- Run PowerShell to fetch and replace skills in one operation:
|
|
491
509
|
```powershell
|
|
492
510
|
# Create temp dir, download, extract, copy skills, cleanup
|
|
@@ -504,12 +522,30 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
504
522
|
@{version=$latest} | ConvertTo-Json | Set-Content ".mother-brain\version.json"
|
|
505
523
|
Remove-Item $temp -Recurse -Force
|
|
506
524
|
```
|
|
507
|
-
|
|
525
|
+
|
|
526
|
+
**STEP C: Preserve Project-Specific Files (NEVER overwritten)**
|
|
527
|
+
- These are NEVER touched during update:
|
|
528
|
+
- `.mother-brain/` folder (all project state)
|
|
529
|
+
- `.mother-brain/project-brain.md` (project learnings)
|
|
530
|
+
- `.mother-brain/docs/` (vision, roadmap, tasks)
|
|
531
|
+
- `.github/skills/` files that are NOT mother-brain/child-brain/skill-creator
|
|
532
|
+
- Project-specific skills remain untouched
|
|
533
|
+
|
|
534
|
+
**STEP D: Restart Required**
|
|
535
|
+
- **CRITICAL: After updating, STOP and display restart message**:
|
|
508
536
|
```
|
|
509
|
-
|
|
537
|
+
⚠️ Mother Brain Updated to v[latest]
|
|
538
|
+
|
|
539
|
+
✅ Your improvements have been submitted as suggestions
|
|
540
|
+
✅ Your project files are preserved
|
|
541
|
+
✅ New Mother Brain skills installed
|
|
542
|
+
|
|
543
|
+
👉 Please run /mother-brain again to use the new features.
|
|
510
544
|
```
|
|
545
|
+
- **DO NOT continue with the menu** - the user must restart for new features to take effect
|
|
546
|
+
- STOP execution here
|
|
511
547
|
4. If check fails (offline), skip silently - don't block startup
|
|
512
|
-
|
|
548
|
+
5. If already on latest version, continue silently
|
|
513
549
|
|
|
514
550
|
- Check current directory for existing Mother Brain artifacts
|
|
515
551
|
- Look for:
|
|
@@ -521,6 +557,16 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
521
557
|
|
|
522
558
|
**If project exists:**
|
|
523
559
|
- Load session state from `docs/session-state.json`
|
|
560
|
+
|
|
561
|
+
- **Git Check (ensure git is available)**:
|
|
562
|
+
- Check if `.git` folder exists in project root
|
|
563
|
+
- If NOT exists:
|
|
564
|
+
```
|
|
565
|
+
⚠️ Git repository not found - initializing...
|
|
566
|
+
```
|
|
567
|
+
- Run: `git init && git add . && git commit -m "Initialize git for Mother Brain"`
|
|
568
|
+
- Display: "✅ Git repository initialized"
|
|
569
|
+
- Git is required for improvement submissions and change tracking
|
|
524
570
|
|
|
525
571
|
- Display welcome back message:
|
|
526
572
|
```
|
|
@@ -1270,7 +1316,23 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
1270
1316
|
|
|
1271
1317
|
**Purpose**: One-click release - commit, version bump, push, tag, and publish.
|
|
1272
1318
|
|
|
1273
|
-
**Prerequisite**: Must be in the mother-brain folder (not a project folder)
|
|
1319
|
+
**Prerequisite**: Must be in the mother-brain framework folder (not a project folder)
|
|
1320
|
+
|
|
1321
|
+
**⚡ MANDATORY RELEASE CHECKLIST (All items MUST be completed)**
|
|
1322
|
+
|
|
1323
|
+
Every release MUST update ALL of the following:
|
|
1324
|
+
```
|
|
1325
|
+
[ ] cli/package.json - version field
|
|
1326
|
+
[ ] cli/src/cli.ts - version constant (if exists)
|
|
1327
|
+
[ ] README.md - version badge AND version text
|
|
1328
|
+
[ ] Git commit with changes
|
|
1329
|
+
[ ] Git tag (v0.0.X)
|
|
1330
|
+
[ ] Push to remote (main + tags)
|
|
1331
|
+
[ ] GitHub Release (created automatically by workflow)
|
|
1332
|
+
[ ] npm publish (triggered by tag push via workflow)
|
|
1333
|
+
```
|
|
1334
|
+
|
|
1335
|
+
**⛔ BLOCKING RULE**: Do NOT return to menu until ALL items above are completed.
|
|
1274
1336
|
|
|
1275
1337
|
**⚡ ONE-CLICK RELEASE FLOW (No prompts, no menus)**
|
|
1276
1338
|
|
|
@@ -1283,38 +1345,50 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
1283
1345
|
- If no changes: Display "Nothing to release" and return to menu
|
|
1284
1346
|
|
|
1285
1347
|
**Step 2D.2: Auto-Determine Version**
|
|
1286
|
-
- Read current version from `package.json`
|
|
1287
|
-
- Scan learning-log.md entries since last release tag
|
|
1348
|
+
- Read current version from `cli/package.json`
|
|
1349
|
+
- Scan learning-log.md entries since last release tag (if exists)
|
|
1288
1350
|
- **Auto-determine version bump**:
|
|
1289
1351
|
- If any entry contains "breaking" or "major" → **major** bump (X.0.0)
|
|
1290
1352
|
- If any entry contains "feature", "new", "add" → **minor** bump (0.X.0)
|
|
1291
1353
|
- Otherwise → **patch** bump (0.0.X)
|
|
1292
1354
|
- Do NOT ask user - auto-decide based on content
|
|
1293
1355
|
|
|
1294
|
-
**Step 2D.3:
|
|
1295
|
-
-
|
|
1296
|
-
-
|
|
1297
|
-
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1356
|
+
**Step 2D.3: Update ALL Version References (MANDATORY)**
|
|
1357
|
+
- Update `cli/package.json`: `"version": "[new-version]"`
|
|
1358
|
+
- Update `cli/src/cli.ts`: version constant (search for old version, replace with new)
|
|
1359
|
+
- Update `README.md`:
|
|
1360
|
+
- Find `version-X.X.X-blue` badge and replace with new version
|
|
1361
|
+
- Find `**Version**: X.X.X` text and replace with new version
|
|
1362
|
+
- **Verify all files updated before proceeding**
|
|
1363
|
+
|
|
1364
|
+
**Step 2D.4: Sync Skills to CLI**
|
|
1365
|
+
- Copy `.github/skills/*` to `cli/skills/` (overwrite)
|
|
1366
|
+
|
|
1367
|
+
**Step 2D.5: Build CLI**
|
|
1368
|
+
- Run `cd cli && npm run build`
|
|
1369
|
+
- If build fails: STOP and display error
|
|
1370
|
+
|
|
1371
|
+
**Step 2D.6: Execute Git Operations**
|
|
1372
|
+
- Stage all changes: `git add -A`
|
|
1373
|
+
- Commit: `git commit -m "[type]: [description] (v[version])"`
|
|
1374
|
+
- Create tag: `git tag v[version]`
|
|
1375
|
+
- Push to remote: `git push [remote] main --tags`
|
|
1376
|
+
|
|
1377
|
+
**Step 2D.7: Confirmation**
|
|
1378
|
+
- Wait for workflow to complete (or check status)
|
|
1307
1379
|
- Display:
|
|
1308
1380
|
```
|
|
1309
1381
|
✅ Release v[version] Published!
|
|
1310
1382
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1383
|
+
✅ cli/package.json updated
|
|
1384
|
+
✅ cli/src/cli.ts updated
|
|
1385
|
+
✅ README.md updated
|
|
1386
|
+
✅ Git tag created and pushed
|
|
1387
|
+
✅ GitHub Release created (via workflow)
|
|
1388
|
+
✅ npm publish triggered (via workflow)
|
|
1316
1389
|
|
|
1317
|
-
|
|
1390
|
+
Tag: v[version]
|
|
1391
|
+
Release: https://github.com/superdenby/MotherBrain/releases/tag/v[version]
|
|
1318
1392
|
```
|
|
1319
1393
|
|
|
1320
1394
|
- Use `ask_user` with choices:
|
|
@@ -1854,22 +1928,37 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
1854
1928
|
|
|
1855
1929
|
- **Note**: Project-specific skills created during Step 6 go in project's `.github/skills/`. Core skills are accessed from the framework.
|
|
1856
1930
|
|
|
1857
|
-
**Step 3.6.4: Initialize Git (
|
|
1858
|
-
-
|
|
1859
|
-
-
|
|
1860
|
-
-
|
|
1861
|
-
-
|
|
1931
|
+
**Step 3.6.4: Initialize Git (MANDATORY)**
|
|
1932
|
+
- Git is REQUIRED for Mother Brain to function properly:
|
|
1933
|
+
- Improvement submissions require git diff
|
|
1934
|
+
- Version tracking requires git tags
|
|
1935
|
+
- Change detection requires git status
|
|
1862
1936
|
|
|
1863
|
-
-
|
|
1937
|
+
- Check if git is already initialized:
|
|
1864
1938
|
```powershell
|
|
1865
|
-
|
|
1866
|
-
git init
|
|
1867
|
-
git add .
|
|
1868
|
-
git commit -m "Initial project setup from Mother Brain"
|
|
1939
|
+
$gitExists = Test-Path (Join-Path "[project-path]" ".git")
|
|
1869
1940
|
```
|
|
1870
1941
|
|
|
1942
|
+
- If git already exists:
|
|
1943
|
+
- Display: "✅ Git repository detected"
|
|
1944
|
+
- Skip initialization
|
|
1945
|
+
|
|
1946
|
+
- If git does NOT exist:
|
|
1947
|
+
- Initialize automatically:
|
|
1948
|
+
```powershell
|
|
1949
|
+
Set-Location "[project-path]"
|
|
1950
|
+
git init
|
|
1951
|
+
git add .
|
|
1952
|
+
git commit -m "Initial project setup from Mother Brain"
|
|
1953
|
+
```
|
|
1954
|
+
- Display: "✅ Git repository initialized"
|
|
1955
|
+
|
|
1956
|
+
- Use `ask_user` with choices:
|
|
1957
|
+
- "Continue (git is ready)"
|
|
1958
|
+
- "I want to connect to a remote repository"
|
|
1959
|
+
|
|
1871
1960
|
- If user wants to connect existing repo:
|
|
1872
|
-
- Ask for repo URL
|
|
1961
|
+
- Ask for repo URL with `ask_user` freeform
|
|
1873
1962
|
- `git remote add origin [url]`
|
|
1874
1963
|
|
|
1875
1964
|
**Step 3.6.5: Switch Context to Project Folder**
|
|
@@ -2821,24 +2910,26 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
2821
2910
|
- Update task document with final status
|
|
2822
2911
|
- Update roadmap checklist
|
|
2823
2912
|
|
|
2824
|
-
**⚠️ CRITICAL: After marking task complete,
|
|
2913
|
+
**⚠️ CRITICAL: After marking task complete, proceed through Steps 10B, 10C, and optionally 10D before reaching Step 11.**
|
|
2825
2914
|
|
|
2826
|
-
**⛔ BLOCKING GATE -
|
|
2915
|
+
**⛔ BLOCKING GATE - Steps 10B and 10C are MANDATORY:**
|
|
2827
2916
|
```
|
|
2828
2917
|
Task marked complete by user
|
|
2829
2918
|
↓
|
|
2830
|
-
[STOP] Run Step 10B (Post-Task Reflection) ←
|
|
2919
|
+
[STOP] Run Step 10B (Post-Task Reflection) ← Friction analysis via Child Brain
|
|
2920
|
+
↓
|
|
2921
|
+
[STOP] Run Step 10C (Project Brain Checkpoint) ← Update living documentation
|
|
2831
2922
|
↓
|
|
2832
|
-
|
|
2923
|
+
IF last task in phase → Run Step 10D (Phase Feedback Checkpoint)
|
|
2833
2924
|
↓
|
|
2834
2925
|
ONLY THEN proceed to Step 11 (Next Action Menu)
|
|
2835
2926
|
```
|
|
2836
2927
|
|
|
2837
|
-
**DO NOT skip
|
|
2838
|
-
1. Scan
|
|
2839
|
-
2.
|
|
2840
|
-
3.
|
|
2841
|
-
4. Only AFTER
|
|
2928
|
+
**DO NOT skip Steps 10B or 10C.** Even if the task had no issues:
|
|
2929
|
+
1. Step 10B: Scan for friction, invoke Child Brain if found
|
|
2930
|
+
2. Step 10C: Update project documentation silently
|
|
2931
|
+
3. Step 10D: If phase complete, gather user feedback
|
|
2932
|
+
4. Only AFTER all checkpoints → proceed to Step 11
|
|
2842
2933
|
|
|
2843
2934
|
### 10A. **Friction Analysis via Child Brain**
|
|
2844
2935
|
- When user provides negative/adjustment feedback in task validation:
|
|
@@ -2935,10 +3026,126 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
2935
3026
|
🛠️ SKILLS: [Created/updated - or "No skill changes"]
|
|
2936
3027
|
```
|
|
2937
3028
|
|
|
2938
|
-
Proceed to Step
|
|
3029
|
+
Proceed to Step 10C (Project Brain Checkpoint)
|
|
2939
3030
|
|
|
2940
3031
|
**Key Principle**: Child Brain handles ALL learning analysis. Mother Brain only orchestrates when to invoke it.
|
|
2941
3032
|
|
|
3033
|
+
### 10C. **Project Brain Checkpoint** (Living Documentation)
|
|
3034
|
+
- **When to run**: After Step 10B (Post-Task Reflection) completes
|
|
3035
|
+
- **Purpose**: Silently update project documentation to ensure project stays on track
|
|
3036
|
+
|
|
3037
|
+
**Step 10C.1: Check Project Alignment (Silent)**
|
|
3038
|
+
|
|
3039
|
+
- Compare current progress against vision:
|
|
3040
|
+
1. Load `vision.md` - what user wanted
|
|
3041
|
+
2. Load `roadmap.md` - what's planned
|
|
3042
|
+
3. Check completed tasks - what's been delivered
|
|
3043
|
+
4. Identify gaps or drift
|
|
3044
|
+
|
|
3045
|
+
**Step 10C.2: Update Living Documentation**
|
|
3046
|
+
|
|
3047
|
+
Create/update these files in `.mother-brain/docs/` as needed:
|
|
3048
|
+
|
|
3049
|
+
- **`research/[topic].md`** - Domain research findings
|
|
3050
|
+
- Add research conducted during this task
|
|
3051
|
+
- Note sources, best practices discovered
|
|
3052
|
+
- Flag areas needing more research
|
|
3053
|
+
|
|
3054
|
+
- **`requirements.md`** - Discovered requirements
|
|
3055
|
+
- Add requirements that emerged during task
|
|
3056
|
+
- Note user preferences revealed
|
|
3057
|
+
- Track implicit requirements from feedback
|
|
3058
|
+
|
|
3059
|
+
- **`data-models.md`** - Identified data structures
|
|
3060
|
+
- Document data structures used/needed
|
|
3061
|
+
- Track schema evolution
|
|
3062
|
+
- Note relationships discovered
|
|
3063
|
+
|
|
3064
|
+
- **`user-needs.md`** - User requirements discovered
|
|
3065
|
+
- Track what user actually needs (vs. wants)
|
|
3066
|
+
- Note workflow preferences
|
|
3067
|
+
- Document pain points addressed
|
|
3068
|
+
|
|
3069
|
+
- **`questions.md`** - Open questions and gaps
|
|
3070
|
+
- What's unclear about the vision?
|
|
3071
|
+
- What decisions need user input?
|
|
3072
|
+
- What technical research is needed?
|
|
3073
|
+
|
|
3074
|
+
**Step 10C.3: Feed Discoveries into Vision**
|
|
3075
|
+
|
|
3076
|
+
- If significant new understanding emerged:
|
|
3077
|
+
- Update `vision.md` with new discoveries
|
|
3078
|
+
- Mark section as "Updated after Task [X]"
|
|
3079
|
+
- Keep vision as living document, not static
|
|
3080
|
+
|
|
3081
|
+
- Display only if updates made:
|
|
3082
|
+
```
|
|
3083
|
+
📘 Project documentation updated
|
|
3084
|
+
```
|
|
3085
|
+
|
|
3086
|
+
**Step 10C.4: Check Phase Completion**
|
|
3087
|
+
|
|
3088
|
+
- Detect if this was the last task in current phase:
|
|
3089
|
+
- Load roadmap, count remaining tasks in phase
|
|
3090
|
+
- If 0 remaining → trigger **Step 10D (Phase Feedback Checkpoint)**
|
|
3091
|
+
|
|
3092
|
+
- If more tasks remain in phase:
|
|
3093
|
+
- Proceed to Step 11 (Next Action Menu)
|
|
3094
|
+
|
|
3095
|
+
### 10D. **Phase Feedback Checkpoint** (User Reflection)
|
|
3096
|
+
- **When to run**: When last task in a phase is completed
|
|
3097
|
+
- **Purpose**: Gather user feedback before proceeding to next phase
|
|
3098
|
+
|
|
3099
|
+
**Step 10D.1: Celebrate Phase Completion**
|
|
3100
|
+
|
|
3101
|
+
- Display:
|
|
3102
|
+
```
|
|
3103
|
+
🎉 Phase [Name] Complete!
|
|
3104
|
+
|
|
3105
|
+
What was delivered:
|
|
3106
|
+
- [Task 1] - [Brief description]
|
|
3107
|
+
- [Task 2] - [Brief description]
|
|
3108
|
+
- [Task 3] - [Brief description]
|
|
3109
|
+
|
|
3110
|
+
Before we move to [Next Phase Name], I'd like your feedback.
|
|
3111
|
+
```
|
|
3112
|
+
|
|
3113
|
+
**Step 10D.2: Gather User Feedback**
|
|
3114
|
+
|
|
3115
|
+
- Use `ask_user` with freeform enabled:
|
|
3116
|
+
```
|
|
3117
|
+
Now that you've seen Phase [Name] in action:
|
|
3118
|
+
|
|
3119
|
+
1. What's working well?
|
|
3120
|
+
2. What isn't quite right?
|
|
3121
|
+
3. Any new ideas or changes in direction?
|
|
3122
|
+
|
|
3123
|
+
(This helps me understand your evolving vision)
|
|
3124
|
+
```
|
|
3125
|
+
|
|
3126
|
+
**Step 10D.3: Research Refresh**
|
|
3127
|
+
|
|
3128
|
+
- Based on user feedback:
|
|
3129
|
+
- Research any new domains/technologies mentioned
|
|
3130
|
+
- Update skill candidates if new needs identified
|
|
3131
|
+
- Store findings in `research/` folder
|
|
3132
|
+
|
|
3133
|
+
**Step 10D.4: Update Roadmap if Needed**
|
|
3134
|
+
|
|
3135
|
+
- If user feedback suggests changes:
|
|
3136
|
+
- Offer to adjust roadmap
|
|
3137
|
+
- Add new tasks if needed
|
|
3138
|
+
- Reprioritize based on feedback
|
|
3139
|
+
|
|
3140
|
+
- Display:
|
|
3141
|
+
```
|
|
3142
|
+
📘 Feedback incorporated
|
|
3143
|
+
|
|
3144
|
+
[Summary of what was learned/changed]
|
|
3145
|
+
```
|
|
3146
|
+
|
|
3147
|
+
- Proceed to Step 11 (Next Action Menu)
|
|
3148
|
+
|
|
2942
3149
|
### 11. **Next Action Menu**
|
|
2943
3150
|
- After task completion, use `ask_user` with choices:
|
|
2944
3151
|
- After task completion, use `ask_user` with choices:
|