planflow-ai 1.1.3 → 1.1.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.
Files changed (128) hide show
  1. package/.claude/commands/brain.md +9 -14
  2. package/.claude/commands/create-contract.md +22 -68
  3. package/.claude/commands/create-plan.md +29 -141
  4. package/.claude/commands/discovery-plan.md +28 -183
  5. package/.claude/commands/execute-plan.md +3 -63
  6. package/.claude/commands/flow.md +43 -94
  7. package/.claude/commands/heartbeat.md +120 -0
  8. package/.claude/commands/learn.md +94 -17
  9. package/.claude/commands/review-code.md +3 -106
  10. package/.claude/commands/review-pr.md +0 -50
  11. package/.claude/commands/setup.md +36 -9
  12. package/.claude/commands/write-tests.md +0 -7
  13. package/.claude/resources/core/_index.md +23 -30
  14. package/.claude/resources/core/autopilot-mode.md +49 -252
  15. package/.claude/resources/core/brain-capture.md +83 -159
  16. package/.claude/resources/core/complexity-scoring.md +1 -30
  17. package/.claude/resources/core/heartbeat.md +117 -0
  18. package/.claude/resources/core/project-ledger.md +0 -57
  19. package/.claude/resources/core/project-memory.md +69 -0
  20. package/.claude/resources/core/project-tasklist.md +65 -0
  21. package/.claude/resources/languages/_index.md +13 -61
  22. package/.claude/resources/languages/python-patterns.md +0 -243
  23. package/.claude/resources/languages/typescript-patterns.md +0 -213
  24. package/.claude/resources/patterns/_index.md +2 -71
  25. package/.claude/resources/patterns/brain-patterns.md +11 -21
  26. package/.claude/resources/patterns/discovery-patterns.md +2 -58
  27. package/.claude/resources/patterns/discovery-templates.md +0 -12
  28. package/.claude/resources/patterns/plans-patterns.md +3 -22
  29. package/.claude/resources/patterns/plans-templates.md +9 -102
  30. package/.claude/resources/patterns/review-code-templates.md +4 -21
  31. package/.claude/resources/patterns/review-pr-patterns.md +0 -21
  32. package/.claude/resources/skills/_index.md +5 -3
  33. package/.claude/resources/skills/brain-skill.md +20 -16
  34. package/.claude/resources/skills/create-contract-skill.md +30 -13
  35. package/.claude/resources/skills/create-plan-skill.md +33 -123
  36. package/.claude/resources/skills/discovery-skill.md +34 -158
  37. package/.claude/resources/skills/execute-plan-skill.md +18 -394
  38. package/.claude/resources/skills/learn-skill.md +60 -11
  39. package/.claude/resources/skills/review-code-skill.md +39 -125
  40. package/.claude/resources/skills/review-pr-skill.md +92 -80
  41. package/.claude/resources/skills/setup-skill.md +62 -97
  42. package/.claude/resources/skills/write-tests-skill.md +0 -22
  43. package/README.md +62 -108
  44. package/dist/cli/commands/heartbeat.d.ts +9 -0
  45. package/dist/cli/commands/heartbeat.d.ts.map +1 -0
  46. package/dist/cli/commands/heartbeat.js +145 -0
  47. package/dist/cli/commands/heartbeat.js.map +1 -0
  48. package/dist/cli/commands/init.d.ts.map +1 -1
  49. package/dist/cli/commands/init.js +3 -12
  50. package/dist/cli/commands/init.js.map +1 -1
  51. package/dist/cli/daemon/heartbeat-daemon.d.ts +9 -0
  52. package/dist/cli/daemon/heartbeat-daemon.d.ts.map +1 -0
  53. package/dist/cli/daemon/heartbeat-daemon.js +184 -0
  54. package/dist/cli/daemon/heartbeat-daemon.js.map +1 -0
  55. package/dist/cli/daemon/heartbeat-parser.d.ts +21 -0
  56. package/dist/cli/daemon/heartbeat-parser.d.ts.map +1 -0
  57. package/dist/cli/daemon/heartbeat-parser.js +136 -0
  58. package/dist/cli/daemon/heartbeat-parser.js.map +1 -0
  59. package/dist/cli/handlers/claude.d.ts +1 -1
  60. package/dist/cli/handlers/claude.d.ts.map +1 -1
  61. package/dist/cli/handlers/claude.js +2 -45
  62. package/dist/cli/handlers/claude.js.map +1 -1
  63. package/dist/cli/handlers/codex.d.ts.map +1 -1
  64. package/dist/cli/handlers/codex.js +0 -11
  65. package/dist/cli/handlers/codex.js.map +1 -1
  66. package/dist/cli/handlers/cursor.d.ts +1 -1
  67. package/dist/cli/handlers/cursor.d.ts.map +1 -1
  68. package/dist/cli/handlers/cursor.js +2 -28
  69. package/dist/cli/handlers/cursor.js.map +1 -1
  70. package/dist/cli/handlers/shared.d.ts +11 -2
  71. package/dist/cli/handlers/shared.d.ts.map +1 -1
  72. package/dist/cli/handlers/shared.js +259 -156
  73. package/dist/cli/handlers/shared.js.map +1 -1
  74. package/dist/cli/index.js +5 -69
  75. package/dist/cli/index.js.map +1 -1
  76. package/dist/cli/types.d.ts +18 -1
  77. package/dist/cli/types.d.ts.map +1 -1
  78. package/dist/cli/utils/files.d.ts.map +1 -1
  79. package/dist/cli/utils/files.js +1 -6
  80. package/dist/cli/utils/files.js.map +1 -1
  81. package/dist/cli/utils/prompts.d.ts +9 -0
  82. package/dist/cli/utils/prompts.d.ts.map +1 -1
  83. package/dist/cli/utils/prompts.js +23 -0
  84. package/dist/cli/utils/prompts.js.map +1 -1
  85. package/package.json +3 -3
  86. package/rules/core/_index.mdc +0 -30
  87. package/rules/core/autopilot-mode.mdc +88 -263
  88. package/rules/core/brain-capture.mdc +21 -23
  89. package/rules/patterns/_index.mdc +0 -70
  90. package/rules/patterns/brain-patterns.mdc +6 -13
  91. package/rules/patterns/discovery-patterns.mdc +6 -152
  92. package/rules/patterns/plans-patterns.mdc +9 -28
  93. package/rules/patterns/plans-templates.mdc +0 -57
  94. package/rules/skills/brain-skill.mdc +0 -8
  95. package/rules/skills/create-contract-skill.mdc +30 -12
  96. package/rules/skills/create-plan-skill.mdc +30 -112
  97. package/rules/skills/discovery-skill.mdc +34 -153
  98. package/rules/skills/execute-plan-skill.mdc +3 -254
  99. package/rules/skills/learn-skill.mdc +0 -8
  100. package/rules/skills/review-code-skill.mdc +39 -122
  101. package/rules/skills/review-pr-skill.mdc +93 -79
  102. package/rules/skills/setup-skill.mdc +0 -81
  103. package/rules/skills/write-tests-skill.mdc +0 -8
  104. package/skills/plan-flow/flow/SKILL.md +29 -54
  105. package/templates/shared/AGENTS.md.template +1 -3
  106. package/templates/shared/CLAUDE.md.template +3 -6
  107. package/.claude/resources/core/agent-profiles.md +0 -107
  108. package/.claude/resources/core/audit-trail.md +0 -180
  109. package/.claude/resources/core/orchestration-workflows.md +0 -187
  110. package/.claude/resources/core/tech-detection.md +0 -82
  111. package/.claude/resources/languages/go-patterns.md +0 -337
  112. package/.claude/resources/languages/rust-patterns.md +0 -363
  113. package/.claude/resources/patterns/autopilot-progress-patterns.md +0 -124
  114. package/.claude/resources/patterns/handoff-patterns.md +0 -160
  115. package/.claude/resources/patterns/parallel-review-patterns.md +0 -164
  116. package/.claude/resources/patterns/security-scan-patterns.md +0 -137
  117. package/rules/core/agent-profiles.mdc +0 -111
  118. package/rules/core/audit-trail.mdc +0 -114
  119. package/rules/core/orchestration-workflows.mdc +0 -149
  120. package/rules/patterns/autopilot-progress-patterns.mdc +0 -124
  121. package/rules/patterns/handoff-patterns.mdc +0 -164
  122. package/rules/patterns/parallel-review-patterns.mdc +0 -168
  123. package/rules/patterns/security-scan-patterns.mdc +0 -141
  124. package/scripts/hooks/pre-compact.cjs +0 -85
  125. package/scripts/hooks/session-end.cjs +0 -284
  126. package/scripts/hooks/session-start.cjs +0 -145
  127. package/templates/shared/hooks.json.example +0 -7
  128. package/templates/shared/session-hooks-instructions.md +0 -29
@@ -48,12 +48,13 @@ MODES:
48
48
  Guided: Asks structured questions about work, insights, meetings, decisions
49
49
 
50
50
  BRAIN STRUCTURE:
51
- flow/brain/
52
- ├── index.md # Brain index (always loaded at session start)
53
- ├── features/ # Feature history and context
54
- ├── errors/ # Reusable error patterns
55
- ├── decisions/ # Decision records
56
- └── sessions/ # Daily activity logs
51
+ flow/brain/ # Per-project brain
52
+ ├── index.md # Brain index (loaded at session start)
53
+ ├── features/ # Feature history and context
54
+ └── errors/ # Reusable error patterns
55
+
56
+ ~/plan-flow/brain/daily/ # Global daily logs (cross-project)
57
+ └── YYYY-MM-DD.md
57
58
 
58
59
  RELATED COMMANDS:
59
60
  /setup Creates brain directory structure
@@ -63,16 +64,13 @@ RELATED COMMANDS:
63
64
 
64
65
  ---
65
66
 
66
- > **AGENT_PROFILE: write-restricted**
67
- > See `.claude/resources/core/agent-profiles.md` for tool access rules.
68
-
69
67
  ## Critical Rules
70
68
 
71
69
  | Rule | Description |
72
70
  | ------------------------ | -------------------------------------------------------- |
73
71
  | **Brain Only** | ONLY write to `flow/brain/` - no source code, no config |
74
72
  | **Wiki-Links** | All cross-references use `[[kebab-case-name]]` format |
75
- | **Index Caps** | Max 5 errors, 3 decisions, 3 cross-project in index |
73
+ | **Index Caps** | Max 5 errors, 3 cross-project in index |
76
74
  | **No Code** | Brain is for knowledge capture, never write source code |
77
75
  | **Complete and Stop** | After writing entry, STOP and wait for user |
78
76
 
@@ -102,7 +100,7 @@ What would you like to capture? You can:
102
100
  Check if `flow/brain/` exists. If not, create:
103
101
 
104
102
  ```bash
105
- mkdir -p flow/brain/features flow/brain/errors flow/brain/decisions flow/brain/sessions
103
+ mkdir -p flow/brain/features flow/brain/errors
106
104
  ```
107
105
 
108
106
  Check if `flow/brain/index.md` exists. If not, create initial index:
@@ -116,9 +114,6 @@ _No features tracked yet._
116
114
  ## Recent Errors
117
115
  _No errors captured yet._
118
116
 
119
- ## Recent Decisions
120
- _No decisions recorded yet._
121
-
122
117
  ## Cross-Project Patterns
123
118
  _No cross-project patterns yet._
124
119
  ```
@@ -55,18 +55,12 @@ RELATED COMMANDS:
55
55
 
56
56
  ---
57
57
 
58
- > **MODE: Research**
59
- > Explore before concluding. Read 3x more than you write. Prefer Read/Grep/Glob/WebSearch tools.
60
- > Ask clarifying questions when uncertain. Don't jump to implementation.
61
-
62
- > **AGENT_PROFILE: read-only**
63
- > See `.claude/resources/core/agent-profiles.md` for tool access rules.
64
-
65
58
  ## Critical Rules
66
59
 
67
60
  | Rule | Description |
68
61
  | ------------------------ | -------------------------------------------------------- |
69
62
  | **No Auto-Chaining** | NEVER auto-invoke /discovery-plan - user must invoke it |
63
+ | **File Only** | Save the `.md` file and report its path. Do NOT show full content in chat. |
70
64
  | **Complete and Stop** | After presenting results, STOP and wait for user |
71
65
 
72
66
  ---
@@ -122,27 +116,30 @@ See: `.claude/resources/skills/create-contract-skill.md`
122
116
 
123
117
  ---
124
118
 
125
- ### Step 4: Present Results
119
+ ### Step 4: Save File and Stop
126
120
 
127
- After the skill completes, confirm file creation:
121
+ After the skill completes:
128
122
 
129
- ```markdown
130
- Contract Created!
123
+ 1. **Save the contract document** to `flow/contracts/<service_name>_contract.md`
124
+ 2. **Report only the file path** — do NOT display the full contract content in chat
125
+ 3. **STOP** — do NOT auto-invoke `/discovery-plan`
131
126
 
132
- **Deliverable**: `flow/contracts/<service_name>_contract.md`
127
+ **Output to the user** (this is the ONLY thing to show):
133
128
 
134
- **Summary**:
135
- - X endpoints documented
136
- - Authentication: [method]
137
- - Error handling documented
129
+ ```markdown
130
+ Contract created.
138
131
 
139
- **Next Steps** (user must invoke manually):
140
- 1. Review the contract above
141
- 2. Request any refinements
142
- 3. When ready, invoke `/discovery-plan @flow/contracts/<service_name>_contract.md`
132
+ **Created**: `flow/contracts/<service_name>_contract.md`
133
+
134
+ Next: review the file, then run `/discovery-plan` when ready.
143
135
  ```
144
136
 
145
- **CRITICAL**: This command is now complete. Do NOT auto-invoke `/discovery-plan`. Wait for the user to explicitly invoke it.
137
+ ⚠️ **CRITICAL**: After saving the file, the command is DONE. Do NOT:
138
+ - Show the full contract content in chat
139
+ - Auto-invoke `/discovery-plan`
140
+ - Offer to start discovery or planning
141
+
142
+ The user will read the `.md` file themselves and decide when to proceed.
146
143
 
147
144
  ---
148
145
 
@@ -175,9 +172,10 @@ Contract Created!
175
172
  |
176
173
  v
177
174
  +------------------------------------------+
178
- | Step 4: Present Results |
179
- | - Show summary |
180
- | - Link to /discovery-plan command |
175
+ | Step 4: Save File and Stop |
176
+ | - Save .md file to flow/contracts/ |
177
+ | - Report file path only |
178
+ | - STOP (no discovery, no plan) |
181
179
  +------------------------------------------+
182
180
  ```
183
181
 
@@ -248,47 +246,3 @@ When executing this command:
248
246
  | `interactive-questions-tool.md` | Interactive Questions UI workflow |
249
247
  | `/discovery-plan` command | Create discovery from contract |
250
248
  | `/create-plan` command | Create plan from discovery |
251
-
252
- ---
253
-
254
- ## Compaction Suggestion
255
-
256
- After contract creation completes, suggest context cleanup if the contract was complex (> 5 endpoints):
257
-
258
- > Contract created. Consider running `/compact` to free context before the next task.
259
-
260
- Skip if autopilot is ON.
261
-
262
- ---
263
-
264
- ## Brain Capture
265
-
266
- After contract creation completes, append a brain-capture block. See `.claude/resources/core/brain-capture.md` for processing rules.
267
-
268
- **Capture the following**:
269
-
270
- ```
271
- <!-- brain-capture
272
- skill: create-contract
273
- feature: [service name]
274
- status: completed
275
- data:
276
- service_name: [API/service name]
277
- endpoints_documented: [count]
278
- auth_type: [detected auth type]
279
- contract_doc: [path to contract document]
280
- -->
281
- ```
282
-
283
- Update `flow/brain/features/[service-name].md` with contract context and update `flow/brain/index.md`.
284
-
285
- ---
286
-
287
- ## Resource Capture
288
-
289
- During this skill's execution, watch for valuable reference materials worth preserving. See `.claude/resources/core/resource-capture.md` for capture rules, file format, and naming conventions.
290
-
291
- At natural break points, if you encounter information that could be useful for future development (API specs, architecture notes, config references, domain knowledge, etc.), ask the user: "I found something that could be useful for future reference: _{brief description}_. Should I save it to `flow/resources/`?"
292
-
293
- Only save if the user approves. Do not re-ask if declined.
294
-
@@ -25,25 +25,18 @@ DESCRIPTION:
25
25
  and tasks based on a discovery document or user input.
26
26
 
27
27
  USAGE:
28
- /create-plan [flags] <discovery_document>
29
- /create-plan [flags] <feature_description>
28
+ /create-plan <discovery_document>
29
+ /create-plan <feature_description>
30
30
  /create-plan -help
31
31
 
32
32
  ARGUMENTS:
33
33
  discovery_document Path to discovery document (recommended)
34
34
  feature_description Direct description of feature to plan (if no discovery)
35
35
 
36
- WORKFLOW FLAGS (optional):
37
- -bugfix Skip the discovery gate requirement. The bug report and user
38
- description serve as plan input instead of a discovery document.
39
- Use when fixing a bug where formal discovery is unnecessary.
40
-
41
- Without a flag, a discovery document is required (standard behavior).
42
-
43
36
  EXAMPLES:
44
37
  /create-plan @flow/discovery/discovery_user_auth_v1.md
45
38
  /create-plan "Add dark mode toggle to settings page"
46
- /create-plan -bugfix "Fix login timeout after 30 seconds of inactivity"
39
+ /create-plan @flow/contracts/api_contract.md
47
40
 
48
41
  OUTPUT:
49
42
  Creates: flow/plans/plan_<feature_name>_v<version>.md
@@ -71,43 +64,19 @@ RELATED COMMANDS:
71
64
  > - **If YES**: Autopilot is ON. After creating the plan and getting user approval, **auto-proceed** to `/execute-plan` with the plan output. Do NOT wait for manual invocation.
72
65
  > - **If NO**: Follow the standard rules below (stop and wait for user).
73
66
 
74
- > **MODE: Research**
75
- > Explore before concluding. Read 3x more than you write. Prefer Read/Grep/Glob/WebSearch tools.
76
- > Ask clarifying questions when uncertain. Don't jump to implementation.
77
-
78
- > **AGENT_PROFILE: read-only**
79
- > See `.claude/resources/core/agent-profiles.md` for tool access rules.
80
-
81
67
  ## Critical Rules
82
68
 
83
69
  | Rule | Description |
84
70
  | ------------------------ | -------------------------------------------------------- |
85
- | **Discovery Required** | NEVER create a plan without a discovery document. If none exists, run `/discovery-plan` first. **Exception**: The `-bugfix` flag bypasses this requirement — the bug report serves as input. |
71
+ | **Discovery Required** | NEVER create a plan without a discovery document. If none exists, run `/discovery-plan` first. No exceptions. |
86
72
  | **No Auto-Chaining** | NEVER auto-invoke /execute-plan - user must invoke it (unless autopilot ON) |
73
+ | **File Only** | Save the `.md` file and report its path. Do NOT show full content in chat. |
87
74
  | **Complete and Stop** | After presenting results, STOP and wait for user (unless autopilot ON) |
88
75
 
89
76
  ---
90
77
 
91
78
  ## Instructions
92
79
 
93
- ### Step 0: Parse Workflow Flag
94
-
95
- Check if the user input starts with a workflow flag:
96
-
97
- | Flag | Behavior Change |
98
- |------|----------------|
99
- | `-bugfix` | **Skip the discovery gate** (Step 2). The user's bug description + any diagnostic review serve as plan input. No discovery document required. The plan should focus on: root cause fix, regression prevention, and verification steps. |
100
- | (none) | Standard behavior — discovery document required |
101
-
102
- If a flag is found:
103
- 1. Set the **workflow context** for this execution
104
- 2. Remove the flag from the input (the rest is the user's prompt/reference)
105
- 3. The `-bugfix` flag bypasses the discovery gate in Step 2
106
-
107
- If no flag is found: proceed with standard behavior (backward compatible).
108
-
109
- ---
110
-
111
80
  ### Step 1: Validate Inputs
112
81
 
113
82
  | Input | Required | Description |
@@ -119,13 +88,9 @@ If no flag is found: proceed with standard behavior (backward compatible).
119
88
 
120
89
  ---
121
90
 
122
- ### Step 2: Validate Discovery Phase Completion (CONDITIONAL BLOCK)
123
-
124
- **A discovery document is REQUIRED before creating any plan — unless the `-bugfix` flag is set.**
125
-
126
- **If `-bugfix` flag is present**: Skip this step entirely. The user's bug description and any diagnostic review findings serve as plan input. Proceed directly to Step 3.
91
+ ### Step 2: Validate Discovery Phase Completion (HARD BLOCK)
127
92
 
128
- **If no `-bugfix` flag**:
93
+ **A discovery document is REQUIRED before creating any plan. No exceptions.**
129
94
 
130
95
  1. Check user input for a discovery document reference (`@flow/discovery/...`)
131
96
  2. If no reference provided, search `flow/discovery/` for a matching discovery document
@@ -143,6 +108,7 @@ If no flag is found: proceed with standard behavior (backward compatible).
143
108
  4. If a discovery document IS found: Proceed with plan creation using that document
144
109
 
145
110
  **Important**: NEVER read or reference files in `flow/archive/` - these are outdated.
111
+ **Important**: NEVER create a plan without a discovery document. This rule has NO exceptions.
146
112
 
147
113
  ---
148
114
 
@@ -169,50 +135,31 @@ See: `.claude/resources/skills/create-plan-skill.md`
169
135
 
170
136
  ---
171
137
 
172
- ### Step 5: Present Results
138
+ ### Step 5: Save File and Stop
173
139
 
174
- After the skill completes, confirm file creation and summarize:
140
+ After the skill completes:
175
141
 
176
- ```markdown
177
- Plan Created!
142
+ 1. **Save the plan document** to `flow/plans/plan_<feature>_v<version>.md`
143
+ 2. **Report only the file path** — do NOT display the full plan content in chat
144
+ 3. **STOP** — do NOT execute the plan, do NOT offer to build
178
145
 
179
- **Deliverable**: `flow/plans/plan_<feature>_v<version>.md`
146
+ **Output to the user** (this is the ONLY thing to show):
180
147
 
181
- **Summary**:
182
- - X phases created
183
- - Total complexity: XX/XX
184
- - Highest complexity: Phase X at Y/10
185
- ```
148
+ ```markdown
149
+ Plan created.
186
150
 
187
- **CRITICAL — Check autopilot mode BEFORE presenting next steps:**
188
-
189
- 1. **Check if `flow/.autopilot` exists**
190
- 2. **If autopilot is ON**: Do NOT show "Next Steps" or "invoke manually". Instead, use `AskUserQuestion` to ask for plan approval, then **immediately auto-proceed** to `/execute-plan` with the plan file. Do NOT stop. Do NOT wait for the user to manually invoke `/execute-plan`.
191
-
192
- ```typescript
193
- // When autopilot is ON, ask for approval then auto-proceed:
194
- AskUserQuestion({
195
- questions: [{
196
- question: "Plan is ready. Approve to proceed with execution?",
197
- header: "Plan",
198
- options: [
199
- { label: "Approve and execute", description: "Start executing the plan now" },
200
- { label: "Refine first", description: "Let me suggest changes to the plan before executing" }
201
- ],
202
- multiSelect: false
203
- }]
204
- })
205
- // If approved → immediately invoke /execute-plan (do NOT stop)
151
+ **Created**: `flow/plans/plan_<feature>_v<version>.md`
152
+
153
+ Next: review the file, then run `/execute-plan` when ready.
206
154
  ```
207
155
 
208
- 3. **If autopilot is OFF**: Show next steps and stop:
156
+ ⚠️ **CRITICAL**: After saving the file, the command is DONE. Do NOT:
157
+ - Show the full plan content in chat
158
+ - Auto-invoke `/execute-plan`
159
+ - Offer to start building or implementing
160
+ - Show implementation steps or code
209
161
 
210
- ```markdown
211
- **Next Steps**:
212
- 1. Review the plan above
213
- 2. Request any refinements
214
- 3. When ready, invoke `/execute-plan @flow/plans/plan_<feature>_v<version>.md`
215
- ```
162
+ The user will read the `.md` file themselves and decide when to proceed.
216
163
 
217
164
  ---
218
165
 
@@ -252,9 +199,10 @@ AskUserQuestion({
252
199
  |
253
200
  v
254
201
  +------------------------------------------+
255
- | Step 5: Present Results |
256
- | - Show summary |
257
- | - Link to /execute-plan command |
202
+ | Step 5: Save File and Stop |
203
+ | - Save .md file to flow/plans/ |
204
+ | - Report file path only |
205
+ | - STOP (no execute, no build) |
258
206
  +------------------------------------------+
259
207
  ```
260
208
 
@@ -327,63 +275,3 @@ When executing this command:
327
275
  | `complexity-scoring.md` | Complexity scoring system |
328
276
  | `/discovery-plan` command | Run discovery first |
329
277
  | `/execute-plan` command | Execute the created plan |
330
-
331
- ---
332
-
333
- ## Compaction Suggestion
334
-
335
- After plan creation completes, suggest context cleanup:
336
-
337
- > Plan created. Consider running `/compact` before execution to maximize available context for the implementation phases.
338
-
339
- Only suggest if the plan has > 3 phases. Skip if autopilot is ON.
340
-
341
- ---
342
-
343
- ## Brain Capture
344
-
345
- After plan creation completes successfully, append a brain-capture block. See `.claude/resources/core/brain-capture.md` for processing rules.
346
-
347
- **Capture the following**:
348
-
349
- ```
350
- <!-- brain-capture
351
- skill: create-plan
352
- feature: [feature name]
353
- status: completed
354
- data:
355
- phase_count: [number of phases]
356
- total_complexity: [sum of complexity scores]
357
- highest_phase: [phase name with highest score]
358
- discovery_link: [[discovery-feature-name]]
359
- plan_doc: [path to plan document]
360
- -->
361
- ```
362
-
363
- Update `flow/brain/features/[feature-name].md` with plan details and link to discovery entry.
364
-
365
- ---
366
-
367
- ## Resource Capture
368
-
369
- During this skill's execution, watch for valuable reference materials worth preserving. See `.claude/resources/core/resource-capture.md` for capture rules, file format, and naming conventions.
370
-
371
- At natural break points, if you encounter information that could be useful for future development (API specs, architecture notes, config references, domain knowledge, etc.), ask the user: "I found something that could be useful for future reference: _{brief description}_. Should I save it to `flow/resources/`?"
372
-
373
- Only save if the user approves. Do not re-ask if declined.
374
-
375
- ---
376
-
377
- ## Handoff
378
-
379
- ### Consumption
380
-
381
- Before creating the plan, check for `flow/handoffs/handoff_<feature>_discovery_to_plan.md` (or `handoff_<feature>_review_to_plan.md` for bugfix workflow). If it exists, read it silently and use its focus guidance to inform plan structure. If it doesn't exist, proceed normally (backward compatible).
382
-
383
- ### Production
384
-
385
- After the plan is created, produce a handoff for the execution step.
386
-
387
- **Output**: `flow/handoffs/handoff_<feature>_plan_to_execute.md`
388
-
389
- Include: feature name, workflow type, phase count, total complexity, highest complexity phase, plan and discovery paths, and focus guidance for execution.