brain-dev 2.1.0 → 2.2.0

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.
@@ -5,7 +5,7 @@ const path = require('node:path');
5
5
  const { readState, writeState, atomicWriteSync } = require('../state.cjs');
6
6
  const { parseRoadmap } = require('../roadmap.cjs');
7
7
  const { loadTemplate, interpolate } = require('../templates.cjs');
8
- const { output, error, success } = require('../core.cjs');
8
+ const { output, error, success, pipelineGate } = require('../core.cjs');
9
9
  const { generateExpertise } = require('../stack-expert.cjs');
10
10
 
11
11
  /**
@@ -230,8 +230,8 @@ function handleSave(args, brainDir, state) {
230
230
  nextAction: '/brain:plan'
231
231
  };
232
232
 
233
- success("Context captured. Run /brain:plan to create execution plans.");
234
- output(result, '');
233
+ success("Context captured.");
234
+ output(result, pipelineGate(`npx brain-dev plan --phase ${phaseNumber}`));
235
235
 
236
236
  return result;
237
237
  }
@@ -8,7 +8,7 @@ const { loadTemplate, interpolate, loadTemplateWithOverlay } = require('../templ
8
8
  const { getAgent, resolveModel } = require('../agents.cjs');
9
9
  const { logEvent } = require('../logger.cjs');
10
10
  const { estimateFromPlan, getDefaultBudget, checkBudget } = require('../complexity.cjs');
11
- const { output, error, success } = require('../core.cjs');
11
+ const { output, error, success, pipelineGate } = require('../core.cjs');
12
12
  const { generateExpertise, getDetectedFramework } = require('../stack-expert.cjs');
13
13
 
14
14
  /**
@@ -317,7 +317,8 @@ function handleSingle(args, brainDir, state) {
317
317
  `[brain] Checker enabled: true`,
318
318
  result.advocate_enabled ? `[brain] Advocate enabled: true` : '',
319
319
  '',
320
- fullPrompt
320
+ fullPrompt,
321
+ pipelineGate(`npx brain-dev execute --phase ${phaseNumber}`)
321
322
  ].filter(Boolean);
322
323
  output(result, humanLines.join('\n'));
323
324
 
package/bin/lib/core.cjs CHANGED
@@ -59,4 +59,21 @@ function success(msg) {
59
59
  console.log(`${tag} ${msg}`);
60
60
  }
61
61
 
62
- module.exports = { isTTY, output, prefix, error, success };
62
+ /**
63
+ * Generate a pipeline gate marker for command output.
64
+ * This is a visual signal telling Claude the exact next command to run.
65
+ * @param {string} nextCommand - The exact command to run next
66
+ * @returns {string}
67
+ */
68
+ function pipelineGate(nextCommand) {
69
+ return [
70
+ '',
71
+ '--- PIPELINE GATE ---',
72
+ `NEXT COMMAND (mandatory): ${nextCommand}`,
73
+ 'Do NOT skip this command. Do NOT improvise. Do NOT start coding.',
74
+ 'Copy and run the command above.',
75
+ '--- END GATE ---'
76
+ ].join('\n');
77
+ }
78
+
79
+ module.exports = { isTTY, output, prefix, error, success, pipelineGate };
@@ -242,3 +242,15 @@ Include sections:
242
242
  - On successful completion of all tasks: `## EXECUTION COMPLETE`
243
243
  - On failure after retry: `## EXECUTION FAILED`
244
244
  - On checkpoint (user input needed): `## CHECKPOINT REACHED`
245
+
246
+ ## Pipeline Enforcement Reminders
247
+
248
+ **EXECUTION FAILED:** When you output this marker:
249
+ - The orchestrator will handle recovery (debugger agent or re-execution)
250
+ - Do NOT start debugging manually. Do NOT skip to the next plan.
251
+ - Follow the "Suggested actions" field ONLY.
252
+
253
+ **CHECKPOINT REACHED:** When you output this marker:
254
+ - STOP all implementation work immediately
255
+ - The user MUST be asked via AskUserQuestion — do NOT pick an option yourself
256
+ - Checkpoints exist because a HUMAN decision is required. Never skip them.
@@ -196,6 +196,12 @@ If you cannot create a valid plan after **2 attempts** (e.g., checker keeps reje
196
196
 
197
197
  Do NOT produce incomplete or low-quality plans. Blocking with clear information is better than a plan that will fail during execution.
198
198
 
199
+ **When PLANNING BLOCKED is output:**
200
+ - Ask the user for the missing information using AskUserQuestion
201
+ - Do NOT attempt to force a plan through
202
+ - Do NOT rewrite requirements yourself
203
+ - Wait for user input, then re-run /brain:plan
204
+
199
205
  ## Enriched SUMMARY.md
200
206
 
201
207
  After each plan executes, the executor creates a SUMMARY.md with:
@@ -220,3 +220,10 @@ When verification is complete, output:
220
220
  **Gaps:** [count of failed must_haves, or "none"]
221
221
  **Human items:** [count of items needing human verification, or "none"]
222
222
  ```
223
+
224
+ ## Pipeline Enforcement
225
+
226
+ **When gaps_found or partial:**
227
+ - Run `/brain:execute` with `--gaps-only` flag to fix specific gaps
228
+ - Do NOT manually fix the files — the executor agent has the context to fix gaps properly
229
+ - Do NOT skip to `/brain:complete` with unresolved gaps
@@ -23,9 +23,16 @@ Supports creating new ADRs, listing existing ones, and searching decision histor
23
23
  </context>
24
24
 
25
25
  <critical-rules>
26
- - ALWAYS use `npx brain-dev adr` to manage ADRs. Never manually create ADR files in .brain/adrs/.
27
- - The CLI assigns sequential IDs, applies the template, and tracks status lifecycle.
28
- - Manual ADR creation can cause ID conflicts and missing metadata.
26
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
27
+ 1. Run `npx brain-dev adr $ARGUMENTS` FIRST before reading code, before analyzing, before suggesting fixes
28
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
29
+ 3. FOLLOW the nextAction field — copy the exact command, do not modify it
30
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
31
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
32
+
33
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
34
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
35
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
29
36
  </critical-rules>
30
37
 
31
38
  <process>
@@ -22,11 +22,16 @@ Each step tells you which agent to spawn and what prompt to use.
22
22
  </context>
23
23
 
24
24
  <critical-rules>
25
- - ALWAYS run `npx brain-dev execute --auto` to start. Never manually chain brain commands as a substitute.
26
- - Follow the generated runbook EXACTLYeach step tells you which command to run.
27
- - DO NOT skip steps or reorder them the runbook respects phase dependencies.
28
- - On error, follow the error recovery decision tree in the runbook do not improvise.
29
- - ALWAYS run `npx brain-dev execute --auto --stop` when done or on failure.
25
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
26
+ 1. Run `npx brain-dev execute --auto` FIRST before reading code, before analyzing, before suggesting fixes
27
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
28
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
29
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
30
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
31
+
32
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
33
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
34
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
30
35
  </critical-rules>
31
36
 
32
37
  <process>
@@ -24,9 +24,16 @@ Ensures all phases are verified before completing.
24
24
  </context>
25
25
 
26
26
  <critical-rules>
27
- - ALWAYS run `npx brain-dev complete` FIRST. Never manually create git tags or archive files.
28
- - DO NOT skip the completion auditit verifies all phases passed before archiving.
29
- - DO NOT mark phases as complete without running this command — it updates state, creates audit trails, and generates release notes.
27
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
28
+ 1. Run `npx brain-dev complete $ARGUMENTS` FIRSTbefore reading code, before analyzing, before suggesting fixes
29
+ 2. READ the full output — it contains step-by-step instructions specific to this project's stack
30
+ 3. FOLLOW the nextAction field — copy the exact command, do not modify it
31
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
32
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
33
+
34
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
35
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
36
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
30
37
  </critical-rules>
31
38
 
32
39
  <process>
@@ -26,9 +26,16 @@ When no subcommand is given, launches an interactive menu.
26
26
  </context>
27
27
 
28
28
  <critical-rules>
29
- - ALWAYS use `npx brain-dev config` to change settings. Never manually edit brain.json config fields.
30
- - The CLI validates values against the schema manual edits can set invalid values that break the pipeline.
31
- - Use `config docs` to see available settings before making changes.
29
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
30
+ 1. Run `npx brain-dev config $ARGUMENTS` FIRSTbefore reading code, before analyzing, before suggesting fixes
31
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
32
+ 3. FOLLOW the nextAction field — copy the exact command, do not modify it
33
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
34
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
35
+
36
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
37
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
38
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
32
39
  </critical-rules>
33
40
 
34
41
  <process>
@@ -22,10 +22,16 @@ Creates a CONTEXT.md file that feeds into the planning process.
22
22
  </context>
23
23
 
24
24
  <critical-rules>
25
- - ALWAYS run `npx brain-dev discuss` FIRST. Never skip discussion and go straight to planning.
26
- - DO NOT assume you know the right approach the discuss step surfaces gray areas that cause rework later.
27
- - DO NOT write CONTEXT.md manually the CLI provides the discuss template with stack-specific guidance.
28
- - Decisions made here feed directly into planning. Skipping discuss = plans based on assumptions.
25
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
26
+ 1. Run `npx brain-dev discuss $ARGUMENTS` FIRSTbefore reading code, before analyzing, before suggesting fixes
27
+ 2. READ the full outputit contains step-by-step instructions specific to this project's stack
28
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
29
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
30
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
31
+
32
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
33
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
34
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
29
35
  </critical-rules>
30
36
 
31
37
  <process>
@@ -23,10 +23,16 @@ Discovers plans, analyzes dependencies, groups into waves, spawns subagents, and
23
23
  </context>
24
24
 
25
25
  <critical-rules>
26
- - ALWAYS run `npx brain-dev execute` FIRST. Never manually implement plan tasks yourself.
27
- - DO NOT read PLAN.md files and execute them manuallythe CLI handles agent spawning, wave ordering, and progress tracking.
28
- - DO NOT skip to verification without running execute the executor agent creates SUMMARY.md files that the verifier needs.
29
- - If execution fails, follow the EXECUTION FAILED output do not improvise a fix outside the pipeline.
26
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
27
+ 1. Run `npx brain-dev execute $ARGUMENTS` FIRSTbefore reading code, before analyzing, before suggesting fixes
28
+ 2. READ the full outputit contains step-by-step instructions specific to this project's stack
29
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
30
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
31
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
32
+
33
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
34
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
35
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
30
36
  </critical-rules>
31
37
 
32
38
  <process>
@@ -22,9 +22,16 @@ Optionally auto-repairs safe issues with --fix.
22
22
  </context>
23
23
 
24
24
  <critical-rules>
25
- - ALWAYS run `npx brain-dev health` FIRST. Never manually fix hooks, templates, or state files.
26
- - The CLI knows which repairs are safe (auto-repairable) vs which need manual intervention.
27
- - DO NOT manually edit .brain/brain.json to fix health issues use `--fix` flag instead.
25
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
26
+ 1. Run `npx brain-dev health $ARGUMENTS` FIRST before reading code, before analyzing, before suggesting fixes
27
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
28
+ 3. FOLLOW the nextAction field — copy the exact command, do not modify it
29
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
30
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
31
+
32
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
33
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
34
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
28
35
  </critical-rules>
29
36
 
30
37
  <process>
@@ -12,9 +12,16 @@ Set up Brain for an existing or new project. Detects your stack, maps the codeba
12
12
  </objective>
13
13
 
14
14
  <critical-rules>
15
- - ALWAYS run `npx brain-dev new-project` FIRST. Never manually create PROJECT.md or edit brain.json project fields.
16
- - The CLI detects your stack, maps workspace siblings, and sets up detection.json — manual setup misses this.
17
- - ALWAYS use AskUserQuestion for the goal question do not print options as text.
15
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
16
+ 1. Run `npx brain-dev new-project` FIRST before reading code, before analyzing, before suggesting fixes
17
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
18
+ 3. FOLLOW the nextAction field — copy the exact command, do not modify it
19
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
20
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
21
+
22
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
23
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
24
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
18
25
  </critical-rules>
19
26
 
20
27
  <process>
@@ -22,20 +22,19 @@ Examples: "add payment integration", "refactor auth to JWT", "fix ATS rescoring
22
22
  </context>
23
23
 
24
24
  <critical-rules>
25
- NEVER skip the pipeline. Even if the fix seems obvious:
26
- - DO NOT start debugging, coding, or investigating before running `npx brain-dev new-task "description"`
27
- - DO NOT "just fix it" and skip discuss/plan/verify steps
28
- - The pipeline exists to catch edge cases, ensure test coverage, and create audit trails
29
- - A "quick fix" that skips pipeline often misses root causes or introduces regressions
25
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
26
+ 1. Run `npx brain-dev new-task "description"` FIRST — before reading code, before analyzing, before suggesting fixes
27
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
28
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
29
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
30
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
30
31
 
31
- If the user describes a BUG:
32
- 1. First run `npx brain-dev new-task "fix: description of bug"` to create the task
33
- 2. The discuss step IS the investigation use it to understand root cause
34
- 3. The plan step defines the fix + tests
35
- 4. The execute step implements with TDD
36
- 5. The verify step confirms the fix works
32
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
33
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
34
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
37
35
 
38
- If the task seems too small for full pipeline, suggest `/brain:quick` instead. But NEVER skip pipeline silently.
36
+ BUG WORKFLOW: User describes bug `npx brain-dev new-task "fix: description"` discuss (root cause) plan (fix + tests) → execute (TDD) → verify → complete.
37
+ If too small for full pipeline, suggest `/brain:quick` instead. NEVER skip pipeline silently.
39
38
  </critical-rules>
40
39
 
41
40
  <process>
@@ -15,8 +15,16 @@ No arguments required. Captures current session state automatically.
15
15
  </context>
16
16
 
17
17
  <critical-rules>
18
- - ALWAYS run `npx brain-dev pause` to save state. Never manually write continue-here.md or edit session files.
19
- - The CLI captures decisions, plan state, and active work context that manual saves miss.
18
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
19
+ 1. Run `npx brain-dev pause` FIRST before reading code, before analyzing, before suggesting fixes
20
+ 2. READ the full output — it contains step-by-step instructions specific to this project's stack
21
+ 3. FOLLOW the nextAction field — copy the exact command, do not modify it
22
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
23
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
24
+
25
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
26
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
27
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
20
28
  </critical-rules>
21
29
 
22
30
  <process>
@@ -25,10 +25,16 @@ Default flow: Research (if needed) -> Plan -> Verify -> Done.
25
25
  </context>
26
26
 
27
27
  <critical-rules>
28
- - ALWAYS run `npx brain-dev plan` FIRST. Never write PLAN.md files manually.
29
- - DO NOT skip the plan-checker verification loopit catches requirement gaps and file ownership conflicts.
30
- - DO NOT proceed to execute without running plan plans contain must_haves that the verifier checks against.
31
- - If planning fails, use `/brain:discuss` to clarify requirements do not force a plan through.
28
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
29
+ 1. Run `npx brain-dev plan $ARGUMENTS` FIRSTbefore reading code, before analyzing, before suggesting fixes
30
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
31
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
32
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
33
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
34
+
35
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
36
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
37
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
32
38
  </critical-rules>
33
39
 
34
40
  <process>
@@ -28,11 +28,16 @@ Use subagent_type "brain-verifier" for verification (--full mode only).
28
28
  </agents>
29
29
 
30
30
  <critical-rules>
31
- - ALWAYS run `npx brain-dev quick` FIRST. Never skip the CLI and code directly.
32
- - Even quick tasks go through plan execute commit. The CLI generates the planner/executor prompts.
33
- - DO NOT manually write code without first having a plan from the CLI.
34
- - Follow the `nextAction` field in each CLI output do not guess the next step.
35
- - If the task needs discussion or verification, use `/brain:new-task` instead.
31
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
32
+ 1. Run `npx brain-dev quick "description"` FIRST before reading code, before analyzing, before suggesting fixes
33
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
34
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
35
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
36
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
37
+
38
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
39
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
40
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
36
41
  </critical-rules>
37
42
 
38
43
  <process>
@@ -13,9 +13,16 @@ Default mode shows what happened. Use --fix to auto-resume or --rollback to reve
13
13
  </objective>
14
14
 
15
15
  <critical-rules>
16
- - ALWAYS run `npx brain-dev recover` FIRST. Never manually edit brain.json, delete lock files, or reset state.
17
- - Manual state edits can corrupt the project the CLI validates consistency before making changes.
18
- - Review the recovery briefing before choosing --fix or --rollback.
16
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
17
+ 1. Run `npx brain-dev recover` FIRST before reading code, before analyzing, before suggesting fixes
18
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
19
+ 3. FOLLOW the nextAction field — copy the exact command, do not modify it
20
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
21
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
22
+
23
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
24
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
25
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
19
26
  </critical-rules>
20
27
 
21
28
  <process>
@@ -25,10 +25,16 @@ Stories are Brain's primary way to organize significant work. A story creates:
25
25
  </context>
26
26
 
27
27
  <critical-rules>
28
- - ALWAYS run `npx brain-dev story` FIRST. Never manually create research, requirements, or roadmap files.
29
- - DO NOT skip the research phaseit uses 6 parallel researchers that find pitfalls you'd miss manually.
30
- - DO NOT start coding before the story is fully activated (research requirements → roadmap → activate).
31
- - After each step, run `npx brain-dev story --continue` do not guess the next step.
28
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
29
+ 1. Run `npx brain-dev story "title"` FIRSTbefore reading code, before analyzing, before suggesting fixes
30
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
31
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
32
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
33
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
34
+
35
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
36
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
37
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
32
38
  </critical-rules>
33
39
 
34
40
  <process>
@@ -23,10 +23,16 @@ Produces a VERIFICATION.md report with pass/gaps/human_needed status.
23
23
  </context>
24
24
 
25
25
  <critical-rules>
26
- - ALWAYS run `npx brain-dev verify` FIRST. Never manually check must_haves yourself.
27
- - DO NOT declare work "done" or "verified" without running the verify command it performs 3-level checks (exists, substantive, wired) that catch issues manual review misses.
28
- - DO NOT skip verification to save time unverified work creates technical debt and regressions.
29
- - If verification finds gaps, use `/brain:plan --gaps` to create fix plans — do not manually patch.
26
+ PIPELINE ENFORCEMENT (NON-NEGOTIABLE):
27
+ 1. Run `npx brain-dev verify $ARGUMENTS` FIRSTbefore reading code, before analyzing, before suggesting fixes
28
+ 2. READ the full output it contains step-by-step instructions specific to this project's stack
29
+ 3. FOLLOW the nextAction field copy the exact command, do not modify it
30
+ 4. If output shows an ERROR: follow the recovery path in the output, do NOT debug manually
31
+ 5. If output shows a CHECKPOINT: use AskUserQuestion, do NOT pick options yourself
32
+
33
+ CONSEQUENCE OF SKIPPING: Pipeline tracks state, creates audit trails, spawns specialized agents,
34
+ and injects framework-specific expertise. Skipping it means: no state tracking, no audit trail,
35
+ no specialized agents, no framework guidance, potential data loss in .brain/ state.
30
36
  </critical-rules>
31
37
 
32
38
  <process>
@@ -66,14 +66,29 @@ try {
66
66
  '',
67
67
  'Commands: /brain:new-project, /brain:story, /brain:discuss, /brain:plan, /brain:execute, /brain:verify, /brain:complete, /brain:quick, /brain:new-task, /brain:progress, /brain:pause, /brain:resume, /brain:help, /brain:health, /brain:update, /brain:upgrade, /brain:storm, /brain:adr, /brain:phase, /brain:config, /brain:map, /brain:recover, /brain:dashboard, /brain:auto (or execute --auto)',
68
68
  '',
69
- 'Instructions for Claude:',
70
- '- When user types /brain:<command>, run: npx brain-dev <command> [args]',
71
- '- EXCEPTION: For /brain:update, always run: npx brain-dev@latest update (the @latest is critical to avoid stale npx cache)',
72
- '- Read output carefully and FOLLOW the step instructions. Do not skip steps or improvise.',
73
- '- Use /brain:progress to check current state before suggesting next steps.',
74
- '- NEVER run brain-dev init after an update. Updates are backward compatible.',
75
- '- NEVER start coding/debugging before running the brain command. The pipeline IS the process.',
76
- '- When user describes a bug or task, FIRST run the appropriate brain command (new-task, quick, story), THEN follow its output.',
69
+ 'PIPELINE RULES (NON-NEGOTIABLE):',
70
+ '',
71
+ '1. ENTRY: When user describes ANY work (bug, feature, task), run the brain command FIRST.',
72
+ ' Do NOT read code, run git, or analyze before running: npx brain-dev <command>',
73
+ ' If you catch yourself analyzing: STOP, run the CLI, restart with CLI context.',
74
+ '',
75
+ '2. FOLLOW: When brain command outputs, find the nextAction field.',
76
+ ' Copy the exact command verbatim. Do NOT interpret, modify, or skip it.',
77
+ ' Human text is EXPLANATION. The nextAction field is the INSTRUCTION.',
78
+ '',
79
+ '3. NEVER ESCAPE: If you see EXECUTION FAILED, PLANNING BLOCKED, or gaps_found:',
80
+ ' Follow the recovery instructions in that output ONLY.',
81
+ ' Do NOT start debugging manually. Do NOT exit the pipeline.',
82
+ '',
83
+ '4. CHECKPOINTS: If you see CHECKPOINT REACHED:',
84
+ ' Use AskUserQuestion to ask the user. Do NOT pick an option yourself.',
85
+ '',
86
+ '5. AGENTS: When output says to spawn an agent (brain-planner, brain-executor):',
87
+ ' Use the Agent tool with the specified subagent_type. Do NOT execute the prompt yourself.',
88
+ '',
89
+ '6. STATE: Run /brain:progress before suggesting next steps.',
90
+ ' For /brain:update, always use: npx brain-dev@latest update',
91
+ ' NEVER run brain-dev init after an update.',
77
92
  '--- End Brain Context ---'
78
93
  ];
79
94
  console.log(lines.join('\n'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brain-dev",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "AI-powered development workflow orchestrator",
5
5
  "author": "halilcosdu",
6
6
  "license": "MIT",