mother-brain 0.4.3 → 0.4.5
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/child-brain/SKILL.md +1 -0
- package/skills/mother-brain/SKILL.md +92 -2
package/dist/cli.js
CHANGED
|
@@ -747,7 +747,7 @@ async function uninstall(options) {
|
|
|
747
747
|
// src/cli.ts
|
|
748
748
|
import { exec as exec3 } from "child_process";
|
|
749
749
|
var program = new Command();
|
|
750
|
-
var VERSION = "0.4.
|
|
750
|
+
var VERSION = "0.4.5";
|
|
751
751
|
program.name("mother-brain").description("AI-powered project management framework for GitHub Copilot CLI and Codex CLI").version(VERSION);
|
|
752
752
|
program.command("init").description("Initialize Mother Brain in the current project").option("-f, --force", "Overwrite existing skills").action(init);
|
|
753
753
|
program.command("update").description("Update Mother Brain skills to the latest version").action(update);
|
package/package.json
CHANGED
|
@@ -33,6 +33,7 @@ allowed-tools: powershell view grep glob web_search ask_user create edit skill
|
|
|
33
33
|
### RULE 3: APPROVAL GATE
|
|
34
34
|
- ALWAYS present proposed changes with: Accept / Revise / Reject
|
|
35
35
|
- NEVER apply changes without explicit user acceptance
|
|
36
|
+
- **RUNTIME FALLBACK**: If `ask_user` is not available (e.g., Codex CLI), present choices as numbered plain text and ask user to reply with the number or option text.
|
|
36
37
|
|
|
37
38
|
### RULE 4: FOUR-LAYER CONSIDERATION
|
|
38
39
|
- Every feedback MUST be analyzed across ALL FOUR layers:
|
|
@@ -23,7 +23,7 @@ allowed-tools: powershell view grep glob web_search ask_user create edit skill
|
|
|
23
23
|
- Do NOT improvise, skip, or invent workflows
|
|
24
24
|
- If the step says "use X tool" → use that exact tool
|
|
25
25
|
|
|
26
|
-
### RULE 2: ALWAYS USE `ask_user`
|
|
26
|
+
### RULE 2: ALWAYS USE `ask_user` (WITH RUNTIME FALLBACK)
|
|
27
27
|
- EVERY user choice MUST use the `ask_user` tool
|
|
28
28
|
- NEVER ask questions as plain text output
|
|
29
29
|
- NEVER leave user in freeform - always return to menu
|
|
@@ -31,6 +31,16 @@ allowed-tools: powershell view grep glob web_search ask_user create edit skill
|
|
|
31
31
|
- If your output ends without an `ask_user` call → STOP and add one
|
|
32
32
|
- Users must NEVER see an empty prompt with no guidance
|
|
33
33
|
- Exception: Only when explicitly executing a task selected by user
|
|
34
|
+
- **RUNTIME FALLBACK**: If `ask_user` is not available (e.g., Codex CLI), present choices as numbered plain text instead:
|
|
35
|
+
```
|
|
36
|
+
Choose an option:
|
|
37
|
+
1. Option A
|
|
38
|
+
2. Option B
|
|
39
|
+
3. Option C
|
|
40
|
+
|
|
41
|
+
Reply with the number or option text.
|
|
42
|
+
```
|
|
43
|
+
This ensures Mother Brain works across ALL agent runtimes (GitHub Copilot CLI, Codex CLI, IDE extensions, etc.) even when interactive UI tools are unavailable.
|
|
34
44
|
|
|
35
45
|
### RULE 3: VERSION CHECK FIRST
|
|
36
46
|
- Before showing ANY menu, run: `npm view mother-brain version --json 2>$null`
|
|
@@ -243,6 +253,8 @@ Mother Brain transforms high-level visions into executable reality by:
|
|
|
243
253
|
- **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.
|
|
244
254
|
- **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.
|
|
245
255
|
- **RESEARCH ALL INVOCATION METHODS**: When integrating with a platform (Codex CLI, Copilot CLI, etc.), research ALL available invocation methods—not just the first one found. Platforms often have multiple systems (skills vs prompts vs commands). Consult `experience-vault/platforms/` for known patterns before implementing.
|
|
256
|
+
- **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.
|
|
257
|
+
- **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.
|
|
246
258
|
- **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. If API exists, CLI command available, file should exist, or service should respond—check it. Verification methods: API calls, CLI commands, file existence checks, service health endpoints, build artifact validation. If verification fails, guide user to fix the specific gap. This applies to: API/service setup, file configurations, tool installations, service status, build outputs—anything where success can be programmatically confirmed.
|
|
247
259
|
|
|
248
260
|
### Output Formatting Rules (CRITICAL)
|
|
@@ -3260,6 +3272,7 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
3260
3272
|
- "Any examples or references I should look at?"
|
|
3261
3273
|
- "Any specific conventions or requirements?"
|
|
3262
3274
|
- Store answers in Project Brain AND use them for skill creation
|
|
3275
|
+
- **Note**: For broader preference discovery beyond skills (layout, interaction patterns, UX choices), see **Step 9.1: Mini Discovery**
|
|
3263
3276
|
|
|
3264
3277
|
5. **Skill Creation/Enhancement** (if needed):
|
|
3265
3278
|
- Research the domain (web_search for best practices)
|
|
@@ -3292,7 +3305,84 @@ This pattern ensures NO workflow ever traps the user—there's always an escape
|
|
|
3292
3305
|
```
|
|
3293
3306
|
|
|
3294
3307
|
---
|
|
3295
|
-
|
|
3308
|
+
|
|
3309
|
+
**Step 9.1: Mini Discovery (On-Demand Preference Check)**
|
|
3310
|
+
|
|
3311
|
+
Mini Discovery is a lightweight discovery phase that triggers MID-BUILD when Mother Brain identifies it knows the OUTCOME but not the SPECIFICS of how the user wants it delivered. It's like a focused version of Vision Discovery (Step 3) that happens during task execution.
|
|
3312
|
+
|
|
3313
|
+
**When to Trigger (ANY of these):**
|
|
3314
|
+
- Task involves **user-facing output** (UI, content, messaging, branding) and Project Brain has no style preferences for this category
|
|
3315
|
+
- Task has **multiple valid approaches** and user hasn't indicated preference (e.g., modal vs page, tabs vs accordion, dark vs light)
|
|
3316
|
+
- Task involves **creative/aesthetic choices** (color, layout, tone, personality)
|
|
3317
|
+
- Task requires **workflow/interaction design** (how will users actually USE this feature?)
|
|
3318
|
+
- Mother Brain catches itself about to **guess or assume** specifics the user hasn't specified
|
|
3319
|
+
|
|
3320
|
+
**When to SKIP:**
|
|
3321
|
+
- Technical infrastructure (CI/CD, database migrations, dependency installs)
|
|
3322
|
+
- Bug fixes with clear reproduction steps and expected behavior
|
|
3323
|
+
- Tasks where Project Brain already has documented preferences for this category
|
|
3324
|
+
- Tasks where the user explicitly said "just make it work, I'll refine later"
|
|
3325
|
+
|
|
3326
|
+
**Mini Discovery Process:**
|
|
3327
|
+
|
|
3328
|
+
1. **Identify the Unknowns** — List what you DON'T know:
|
|
3329
|
+
```
|
|
3330
|
+
🔍 Mini Discovery — Task [Number]
|
|
3331
|
+
|
|
3332
|
+
I know the goal: [outcome]
|
|
3333
|
+
But I need to understand:
|
|
3334
|
+
- [Unknown 1: e.g., "How should the settings page be laid out?"]
|
|
3335
|
+
- [Unknown 2: e.g., "What tone should error messages use?"]
|
|
3336
|
+
- [Unknown 3: e.g., "Should this be a modal or a full page?"]
|
|
3337
|
+
```
|
|
3338
|
+
|
|
3339
|
+
2. **Ask Targeted Questions** — NOT open-ended. Offer concrete options:
|
|
3340
|
+
```
|
|
3341
|
+
For [unknown], which approach do you prefer?
|
|
3342
|
+
1. [Option A] — [brief description/tradeoff]
|
|
3343
|
+
2. [Option B] — [brief description/tradeoff]
|
|
3344
|
+
3. [Option C] — [brief description/tradeoff]
|
|
3345
|
+
|
|
3346
|
+
Reply with the number or describe what you have in mind.
|
|
3347
|
+
```
|
|
3348
|
+
- Ask 1-3 questions max per Mini Discovery (don't overwhelm)
|
|
3349
|
+
- Show visual examples or references when possible
|
|
3350
|
+
- If user says "you decide" → pick the most common/conventional approach and note it in Project Brain
|
|
3351
|
+
|
|
3352
|
+
3. **Research if Needed** — If user references something unfamiliar:
|
|
3353
|
+
- Use `web_search` to find examples, patterns, or best practices
|
|
3354
|
+
- Show user what you found: "Here's what [reference] looks like — is this the direction?"
|
|
3355
|
+
|
|
3356
|
+
4. **Record Discoveries** — Update Project Brain with new preferences:
|
|
3357
|
+
- Add to Style & Tone section
|
|
3358
|
+
- Add to Validation Checks if applicable
|
|
3359
|
+
- Update vision doc if discoveries reveal scope changes
|
|
3360
|
+
|
|
3361
|
+
5. **Expand Roadmap if Needed** — If Mini Discovery reveals:
|
|
3362
|
+
- The task is bigger than estimated → split into sub-tasks
|
|
3363
|
+
- A prerequisite is missing → add it before current task
|
|
3364
|
+
- A new feature emerged from discussion → add to roadmap backlog
|
|
3365
|
+
- Display: "📋 Roadmap updated with [X] new items from Mini Discovery"
|
|
3366
|
+
|
|
3367
|
+
6. **Build/Update Skills** — If discoveries reveal domain knowledge:
|
|
3368
|
+
- Create or update skills with user preferences
|
|
3369
|
+
- These skills now carry the user's specific choices for future tasks
|
|
3370
|
+
|
|
3371
|
+
**Display at Mini Discovery start:**
|
|
3372
|
+
```
|
|
3373
|
+
🔍 Mini Discovery — before I build this, let me understand what you're looking for...
|
|
3374
|
+
```
|
|
3375
|
+
|
|
3376
|
+
**Display at Mini Discovery end:**
|
|
3377
|
+
```
|
|
3378
|
+
✅ Mini Discovery complete — proceeding with implementation
|
|
3379
|
+
📘 Project Brain updated with [X] new preferences
|
|
3380
|
+
```
|
|
3381
|
+
|
|
3382
|
+
**KEY PRINCIPLE**: The goal is to understand HOW the user will experience the outcome, not just WHAT the outcome is. A login page can be minimal or elaborate, friendly or corporate, social-login-first or email-first — Mini Discovery captures these specifics so Mother Brain builds what the user actually envisioned.
|
|
3383
|
+
|
|
3384
|
+
---
|
|
3385
|
+
|
|
3296
3386
|
- **Pre-Task Analysis** (after gate passes):
|
|
3297
3387
|
- Load current task document
|
|
3298
3388
|
- Look ahead at next 3-5 tasks in current phase
|