brain-dev 0.1.0 → 0.1.1
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/README.md
CHANGED
|
@@ -85,6 +85,27 @@ init → new-project → discuss → plan → execute → verify → complete
|
|
|
85
85
|
- **`/brain:map`** generates deep codebase documentation
|
|
86
86
|
- **`/brain:health`** self-diagnoses and auto-repairs
|
|
87
87
|
|
|
88
|
+
## Quick Tasks
|
|
89
|
+
|
|
90
|
+
Not everything needs a full phase. For small, focused work:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
/brain:quick "fix the login redirect bug"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Brain creates a plan, executes it, and commits — all in one flow. No discuss, no research, no ceremony.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
/brain:quick --full "add rate limiting to API" # With plan checking + verification
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
| Mode | What happens |
|
|
103
|
+
|------|-------------|
|
|
104
|
+
| Default | plan → execute → commit |
|
|
105
|
+
| `--full` | plan → check → execute → verify → commit |
|
|
106
|
+
|
|
107
|
+
Quick tasks live in `.brain/quick/`, separate from phases. Tracked in STATE.md.
|
|
108
|
+
|
|
88
109
|
## State Machine
|
|
89
110
|
|
|
90
111
|
Brain tracks progress through a deterministic state machine:
|
|
@@ -124,6 +145,7 @@ No supply chain risk. No transitive vulnerabilities. No `node_modules` bloat.
|
|
|
124
145
|
| `/brain:execute` | Build according to plans with TDD |
|
|
125
146
|
| `/brain:verify` | 3-level verification against must-haves |
|
|
126
147
|
| `/brain:complete` | Mark phase done, advance to next |
|
|
148
|
+
| `/brain:quick` | Quick task — skip the ceremony |
|
|
127
149
|
|
|
128
150
|
### Session
|
|
129
151
|
| Command | Description |
|
|
@@ -125,7 +125,7 @@ function handleAnalyze(args, brainDir, state) {
|
|
|
125
125
|
phase_number: phaseNumber,
|
|
126
126
|
phase_name: phase.name,
|
|
127
127
|
phase_goal: phase.goal,
|
|
128
|
-
phase_requirements: phase.requirements.join(', ') || 'None specified',
|
|
128
|
+
phase_requirements: (Array.isArray(phase.requirements) ? phase.requirements.join(', ') : '') || 'None specified',
|
|
129
129
|
research_section: researchSection
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -83,7 +83,7 @@ function buildBrownfieldQuestions(detection) {
|
|
|
83
83
|
// Question 1: Vision/Goal - context-aware with workspace
|
|
84
84
|
let visionText = `I detected a ${summary}. What do you want to do?`;
|
|
85
85
|
if (workspace && workspace.siblings.length > 0) {
|
|
86
|
-
const sibNames = workspace.siblings.map(s => `${s.name} (${s.stack.framework || s.stack.language})`).join(', ');
|
|
86
|
+
const sibNames = workspace.siblings.map(s => `${s.name} (${s.stack ? (s.stack.framework || s.stack.language || 'unknown') : 'unknown'})`).join(', ');
|
|
87
87
|
visionText = `I detected a ${summary}. I also found ${workspace.siblings.length} related project(s): ${sibNames}. What do you want to do?`;
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -692,7 +692,7 @@ function buildCodebaseContext(detection) {
|
|
|
692
692
|
lines.push('');
|
|
693
693
|
lines.push('### Related Projects in Workspace');
|
|
694
694
|
for (const sib of workspace.siblings) {
|
|
695
|
-
lines.push(`- **${sib.name}:** ${sib.stack.framework || sib.stack.language}`);
|
|
695
|
+
lines.push(`- **${sib.name}:** ${sib.stack ? (sib.stack.framework || sib.stack.language || 'unknown') : 'unknown'}`);
|
|
696
696
|
}
|
|
697
697
|
lines.push('');
|
|
698
698
|
lines.push('Consider how this project integrates with sibling projects.');
|
|
@@ -84,7 +84,7 @@ function generatePlannerPrompt(phase, brainDir) {
|
|
|
84
84
|
phase_number: phase.number,
|
|
85
85
|
phase_name: phase.name,
|
|
86
86
|
phase_goal: phase.goal,
|
|
87
|
-
phase_requirements: phase.requirements.join(', ') || 'None specified',
|
|
87
|
+
phase_requirements: (Array.isArray(phase.requirements) ? phase.requirements.join(', ') : '') || 'None specified',
|
|
88
88
|
phase_depends_on: phase.dependsOn.length > 0 ? phase.dependsOn.join(', ') : 'None',
|
|
89
89
|
context_decisions: contextSection,
|
|
90
90
|
research_summary: researchSection,
|
|
@@ -253,7 +253,7 @@ function handleCheck(args, brainDir, state) {
|
|
|
253
253
|
|
|
254
254
|
// Read context for checker
|
|
255
255
|
const contextContent = readContext(brainDir, phaseNumber) || '_No context decisions._';
|
|
256
|
-
const phaseRequirements = phase.requirements.join(', ') || 'None specified';
|
|
256
|
+
const phaseRequirements = (Array.isArray(phase.requirements) ? phase.requirements.join(', ') : '') || 'None specified';
|
|
257
257
|
const phaseGoal = phase.goal || 'No goal specified';
|
|
258
258
|
|
|
259
259
|
// Generate checker prompt for each plan
|