mother-brain 0.4.5 → 0.4.6
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/AGENTS.md +63 -0
- package/dist/cli.js +16 -1
- package/package.json +3 -2
- package/skills/mother-brain/SKILL.md +1 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Mother Brain — Agent Instructions
|
|
2
|
+
|
|
3
|
+
> These rules are MANDATORY for every interaction. They are enforced regardless of whether
|
|
4
|
+
> the Mother Brain skill is explicitly invoked. Violating ANY rule is a critical failure.
|
|
5
|
+
|
|
6
|
+
## Hard Rules
|
|
7
|
+
|
|
8
|
+
### 1. Never Leave User in Freeform
|
|
9
|
+
- After completing ANY action (task, release, fix, commit, question, analysis), ALWAYS present a menu with clear options.
|
|
10
|
+
- The user must NEVER see a blank prompt with no guidance on what to do next.
|
|
11
|
+
- If `ask_user` tool is available, use it. Otherwise present numbered options as plain text.
|
|
12
|
+
- If you catch yourself ending a response without a menu → STOP and add one.
|
|
13
|
+
|
|
14
|
+
### 2. Always Use Menus for Choices
|
|
15
|
+
- EVERY user decision MUST be presented as a menu with selectable options.
|
|
16
|
+
- NEVER ask yes/no questions as plain text.
|
|
17
|
+
- NEVER ask open-ended questions when discrete options exist.
|
|
18
|
+
- When using plain text menus (e.g., Codex CLI), format as:
|
|
19
|
+
```
|
|
20
|
+
1. Option A
|
|
21
|
+
2. Option B
|
|
22
|
+
3. Option C
|
|
23
|
+
|
|
24
|
+
Reply with the number or option text.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 3. Invoke Child Brain on Freeform Feedback
|
|
28
|
+
- When the user types freeform text instead of selecting a menu option, invoke `$child-brain` IMMEDIATELY.
|
|
29
|
+
- Freeform text = the user has feedback, preferences, or corrections that must be captured.
|
|
30
|
+
- Don't try to handle feedback inline — Child Brain routes learnings to the right place.
|
|
31
|
+
- After Child Brain completes, resume exactly where you were.
|
|
32
|
+
- Trigger keywords: "I prefer", "I like", "actually", "instead", "rather", "maybe", "what about", "stop", "why did you"
|
|
33
|
+
|
|
34
|
+
### 4. Never Improvise Workflows
|
|
35
|
+
- If Mother Brain skill (`$mother-brain`) is active, follow its Steps section exactly.
|
|
36
|
+
- Do NOT invent menus, skip steps, or make up workflows.
|
|
37
|
+
- If you're unsure what to do next, return to Step 2 (Detect Project State).
|
|
38
|
+
|
|
39
|
+
### 5. Resume After Skill Invocation
|
|
40
|
+
- After invoking any skill (`$child-brain`, `$skill-creator`, etc.), you MUST return to what you were doing before.
|
|
41
|
+
- NEVER invoke a skill and then stop.
|
|
42
|
+
- Track what step/menu/task you were on, and resume there after the skill completes.
|
|
43
|
+
|
|
44
|
+
### 6. Show Learning Confirmations
|
|
45
|
+
- When preferences or learnings are recorded, display visible confirmation:
|
|
46
|
+
- `📘 Project Brain will remember this`
|
|
47
|
+
- `🧠 Mother Brain will remember this`
|
|
48
|
+
- `🧙 Elder Brain will remember this`
|
|
49
|
+
- The user should SEE their input being captured — silent learning erodes trust.
|
|
50
|
+
|
|
51
|
+
### 7. Emoji as Enhancement Only
|
|
52
|
+
- Always include text labels alongside emoji (e.g., "🧠 Mother Brain" not just "🧠").
|
|
53
|
+
- Some runtimes may not render emoji correctly.
|
|
54
|
+
|
|
55
|
+
## Skills Available
|
|
56
|
+
|
|
57
|
+
This project uses the Mother Brain framework. The following skills are available:
|
|
58
|
+
|
|
59
|
+
- **$mother-brain** — Full project management workflow (vision → roadmap → tasks → execution)
|
|
60
|
+
- **$child-brain** — Feedback analysis and learning orchestrator
|
|
61
|
+
- **$skill-creator** — Create new specialized skills
|
|
62
|
+
|
|
63
|
+
For guided project management, invoke `$mother-brain`.
|
package/dist/cli.js
CHANGED
|
@@ -76,6 +76,16 @@ async function init(options = {}) {
|
|
|
76
76
|
}, { spaces: 2 });
|
|
77
77
|
}
|
|
78
78
|
console.log(chalk.cyan("\n\u2705 Mother Brain initialized!\n"));
|
|
79
|
+
const agentsFile = path.join(cwd, "AGENTS.md");
|
|
80
|
+
const sourceAgentsFile = path.join(packageRoot, "AGENTS.md");
|
|
81
|
+
if (await fs.pathExists(sourceAgentsFile)) {
|
|
82
|
+
const agentsExists = await fs.pathExists(agentsFile);
|
|
83
|
+
if (!agentsExists || options.force) {
|
|
84
|
+
await fs.copy(sourceAgentsFile, agentsFile, { overwrite: true });
|
|
85
|
+
console.log(chalk.green("Created AGENTS.md (always-active rules for Codex/Copilot)"));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
console.log("");
|
|
79
89
|
console.log("Next steps:");
|
|
80
90
|
console.log(chalk.dim(" 1. Commit the new files to your repo"));
|
|
81
91
|
console.log(chalk.dim(" 2. Open your AI CLI:"));
|
|
@@ -202,6 +212,11 @@ async function update() {
|
|
|
202
212
|
console.log(chalk2.green(` \u2713 Updated ${skill}`));
|
|
203
213
|
}
|
|
204
214
|
}
|
|
215
|
+
const extractedAgentsFile = path2.join(tempDir, "package", "AGENTS.md");
|
|
216
|
+
const agentsFile = path2.join(cwd, "AGENTS.md");
|
|
217
|
+
if (await fs2.pathExists(extractedAgentsFile)) {
|
|
218
|
+
await fs2.copy(extractedAgentsFile, agentsFile, { overwrite: true });
|
|
219
|
+
}
|
|
205
220
|
await fs2.remove(tempDir);
|
|
206
221
|
await fs2.writeJSON(versionFile, {
|
|
207
222
|
installed: latestVersion,
|
|
@@ -747,7 +762,7 @@ async function uninstall(options) {
|
|
|
747
762
|
// src/cli.ts
|
|
748
763
|
import { exec as exec3 } from "child_process";
|
|
749
764
|
var program = new Command();
|
|
750
|
-
var VERSION = "0.4.
|
|
765
|
+
var VERSION = "0.4.6";
|
|
751
766
|
program.name("mother-brain").description("AI-powered project management framework for GitHub Copilot CLI and Codex CLI").version(VERSION);
|
|
752
767
|
program.command("init").description("Initialize Mother Brain in the current project").option("-f, --force", "Overwrite existing skills").action(init);
|
|
753
768
|
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.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "AI-powered project management framework for GitHub Copilot CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
|
-
"skills"
|
|
32
|
+
"skills",
|
|
33
|
+
"AGENTS.md"
|
|
33
34
|
],
|
|
34
35
|
"engines": {
|
|
35
36
|
"node": ">=18"
|
|
@@ -249,6 +249,7 @@ Mother Brain transforms high-level visions into executable reality by:
|
|
|
249
249
|
2. GitHub Release with release notes (use `gh release create` with description)
|
|
250
250
|
3. Update README version badge (if applicable)
|
|
251
251
|
Never publish to npm without also creating a proper GitHub Release with notes.
|
|
252
|
+
- **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.
|
|
252
253
|
- **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.
|
|
253
254
|
- **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.
|
|
254
255
|
- **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.
|