maxsimcli 4.8.0 → 4.9.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.
- package/dist/assets/CHANGELOG.md +13 -0
- package/dist/assets/hooks/maxsim-check-update.cjs +38 -0
- package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-statusline.cjs +116 -48
- package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-sync-reminder.cjs +117 -0
- package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -0
- package/dist/assets/templates/agents/AGENTS.md +78 -106
- package/dist/assets/templates/agents/executor.md +101 -0
- package/dist/assets/templates/agents/planner.md +86 -0
- package/dist/assets/templates/agents/researcher.md +71 -0
- package/dist/assets/templates/agents/verifier.md +88 -0
- package/dist/assets/templates/commands/maxsim/debug.md +7 -7
- package/dist/assets/templates/commands/maxsim/execute.md +45 -0
- package/dist/assets/templates/commands/maxsim/go.md +29 -0
- package/dist/assets/templates/commands/maxsim/help.md +2 -2
- package/dist/assets/templates/commands/maxsim/init.md +52 -0
- package/dist/assets/templates/commands/maxsim/plan.md +50 -0
- package/dist/assets/templates/commands/maxsim/progress.md +4 -3
- package/dist/assets/templates/commands/maxsim/quick.md +6 -4
- package/dist/assets/templates/commands/maxsim/settings.md +4 -3
- package/dist/assets/templates/references/continuation-format.md +16 -16
- package/dist/assets/templates/references/model-profile-resolution.md +1 -1
- package/dist/assets/templates/references/model-profiles.md +12 -19
- package/dist/assets/templates/rules/conventions.md +51 -0
- package/dist/assets/templates/rules/verification-protocol.md +57 -0
- package/dist/assets/templates/skills/agent-system-map/SKILL.md +92 -0
- package/dist/assets/templates/skills/brainstorming/SKILL.md +48 -36
- package/dist/assets/templates/skills/code-review/SKILL.md +40 -61
- package/dist/assets/templates/skills/commit-conventions/SKILL.md +75 -0
- package/dist/assets/templates/skills/evidence-collection/SKILL.md +87 -0
- package/dist/assets/templates/skills/handoff-contract/SKILL.md +70 -0
- package/dist/assets/templates/skills/input-validation/SKILL.md +51 -0
- package/dist/assets/templates/skills/maxsim-batch/SKILL.md +41 -45
- package/dist/assets/templates/skills/maxsim-simplify/SKILL.md +37 -90
- package/dist/assets/templates/skills/memory-management/SKILL.md +32 -67
- package/dist/assets/templates/skills/research-methodology/SKILL.md +137 -0
- package/dist/assets/templates/skills/roadmap-writing/SKILL.md +40 -58
- package/dist/assets/templates/skills/sdd/SKILL.md +34 -69
- package/dist/assets/templates/skills/systematic-debugging/SKILL.md +20 -26
- package/dist/assets/templates/skills/tdd/SKILL.md +25 -33
- package/dist/assets/templates/skills/tool-priority-guide/SKILL.md +80 -0
- package/dist/assets/templates/skills/using-maxsim/SKILL.md +42 -73
- package/dist/assets/templates/skills/verification-before-completion/SKILL.md +12 -24
- package/dist/assets/templates/skills/verification-gates/SKILL.md +169 -0
- package/dist/assets/templates/templates/UAT.md +3 -3
- package/dist/assets/templates/templates/VALIDATION.md +1 -1
- package/dist/assets/templates/templates/context.md +4 -4
- package/dist/assets/templates/templates/debug-subagent-prompt.md +3 -3
- package/dist/assets/templates/templates/discovery.md +2 -2
- package/dist/assets/templates/templates/phase-prompt.md +2 -2
- package/dist/assets/templates/templates/planner-subagent-prompt.md +7 -7
- package/dist/assets/templates/templates/project.md +1 -1
- package/dist/assets/templates/templates/research.md +1 -1
- package/dist/assets/templates/templates/state.md +2 -2
- package/dist/assets/templates/templates/summary.md +41 -0
- package/dist/assets/templates/workflows/batch.md +5 -5
- package/dist/assets/templates/workflows/diagnose-issues.md +2 -2
- package/dist/assets/templates/workflows/discovery-phase.md +3 -3
- package/dist/assets/templates/workflows/discuss-phase.md +11 -11
- package/dist/assets/templates/workflows/execute-phase.md +205 -11
- package/dist/assets/templates/workflows/execute-plan.md +299 -34
- package/dist/assets/templates/workflows/execute.md +421 -0
- package/dist/assets/templates/workflows/go.md +250 -0
- package/dist/assets/templates/workflows/health.md +5 -5
- package/dist/assets/templates/workflows/help.md +165 -435
- package/dist/assets/templates/workflows/init-existing.md +23 -23
- package/dist/assets/templates/workflows/init.md +205 -0
- package/dist/assets/templates/workflows/new-milestone.md +9 -9
- package/dist/assets/templates/workflows/new-project.md +26 -26
- package/dist/assets/templates/workflows/plan-create.md +298 -0
- package/dist/assets/templates/workflows/plan-discuss.md +347 -0
- package/dist/assets/templates/workflows/plan-phase.md +29 -29
- package/dist/assets/templates/workflows/plan-research.md +177 -0
- package/dist/assets/templates/workflows/plan.md +231 -0
- package/dist/assets/templates/workflows/progress.md +46 -42
- package/dist/assets/templates/workflows/quick.md +195 -14
- package/dist/assets/templates/workflows/research-phase.md +5 -5
- package/dist/assets/templates/workflows/sdd.md +20 -12
- package/dist/assets/templates/workflows/settings.md +18 -14
- package/dist/assets/templates/workflows/verify-phase.md +1 -1
- package/dist/assets/templates/workflows/verify-work.md +16 -16
- package/dist/cli.cjs +496 -91
- package/dist/cli.cjs.map +1 -1
- package/dist/core-D5zUr9cb.cjs.map +1 -1
- package/dist/install.cjs +234 -17
- package/dist/install.cjs.map +1 -1
- package/dist/mcp-server.cjs +21 -2
- package/dist/mcp-server.cjs.map +1 -1
- package/dist/skills-CjFWZIGM.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/assets/hooks/maxsim-context-monitor.cjs +0 -121
- package/dist/assets/hooks/maxsim-context-monitor.cjs.map +0 -1
- package/dist/assets/templates/agents/maxsim-code-reviewer.md +0 -239
- package/dist/assets/templates/agents/maxsim-codebase-mapper.md +0 -214
- package/dist/assets/templates/agents/maxsim-debugger.md +0 -572
- package/dist/assets/templates/agents/maxsim-drift-checker.md +0 -522
- package/dist/assets/templates/agents/maxsim-executor.md +0 -504
- package/dist/assets/templates/agents/maxsim-integration-checker.md +0 -273
- package/dist/assets/templates/agents/maxsim-phase-researcher.md +0 -305
- package/dist/assets/templates/agents/maxsim-plan-checker.md +0 -343
- package/dist/assets/templates/agents/maxsim-planner.md +0 -610
- package/dist/assets/templates/agents/maxsim-project-researcher.md +0 -359
- package/dist/assets/templates/agents/maxsim-research-synthesizer.md +0 -263
- package/dist/assets/templates/agents/maxsim-roadmapper.md +0 -324
- package/dist/assets/templates/agents/maxsim-spec-reviewer.md +0 -245
- package/dist/assets/templates/agents/maxsim-verifier.md +0 -393
- package/dist/assets/templates/commands/maxsim/add-phase.md +0 -43
- package/dist/assets/templates/commands/maxsim/add-tests.md +0 -41
- package/dist/assets/templates/commands/maxsim/add-todo.md +0 -57
- package/dist/assets/templates/commands/maxsim/artefakte.md +0 -122
- package/dist/assets/templates/commands/maxsim/audit-milestone.md +0 -36
- package/dist/assets/templates/commands/maxsim/batch.md +0 -42
- package/dist/assets/templates/commands/maxsim/check-drift.md +0 -56
- package/dist/assets/templates/commands/maxsim/check-todos.md +0 -46
- package/dist/assets/templates/commands/maxsim/cleanup.md +0 -18
- package/dist/assets/templates/commands/maxsim/complete-milestone.md +0 -136
- package/dist/assets/templates/commands/maxsim/discuss-phase.md +0 -87
- package/dist/assets/templates/commands/maxsim/discuss.md +0 -70
- package/dist/assets/templates/commands/maxsim/execute-phase.md +0 -41
- package/dist/assets/templates/commands/maxsim/health.md +0 -22
- package/dist/assets/templates/commands/maxsim/init-existing.md +0 -46
- package/dist/assets/templates/commands/maxsim/insert-phase.md +0 -32
- package/dist/assets/templates/commands/maxsim/list-phase-assumptions.md +0 -46
- package/dist/assets/templates/commands/maxsim/map-codebase.md +0 -71
- package/dist/assets/templates/commands/maxsim/new-milestone.md +0 -44
- package/dist/assets/templates/commands/maxsim/new-project.md +0 -46
- package/dist/assets/templates/commands/maxsim/pause-work.md +0 -38
- package/dist/assets/templates/commands/maxsim/plan-milestone-gaps.md +0 -34
- package/dist/assets/templates/commands/maxsim/plan-phase.md +0 -44
- package/dist/assets/templates/commands/maxsim/realign.md +0 -39
- package/dist/assets/templates/commands/maxsim/reapply-patches.md +0 -110
- package/dist/assets/templates/commands/maxsim/remove-phase.md +0 -31
- package/dist/assets/templates/commands/maxsim/research-phase.md +0 -189
- package/dist/assets/templates/commands/maxsim/resume-work.md +0 -40
- package/dist/assets/templates/commands/maxsim/roadmap.md +0 -19
- package/dist/assets/templates/commands/maxsim/sdd.md +0 -39
- package/dist/assets/templates/commands/maxsim/set-profile.md +0 -34
- package/dist/assets/templates/commands/maxsim/update.md +0 -37
- package/dist/assets/templates/commands/maxsim/verify-work.md +0 -38
- package/dist/assets/templates/workflows/add-phase.md +0 -111
- package/dist/assets/templates/workflows/add-tests.md +0 -351
- package/dist/assets/templates/workflows/add-todo.md +0 -247
- package/dist/assets/templates/workflows/audit-milestone.md +0 -297
- package/dist/assets/templates/workflows/check-drift.md +0 -248
- package/dist/assets/templates/workflows/check-todos.md +0 -261
- package/dist/assets/templates/workflows/cleanup.md +0 -153
- package/dist/assets/templates/workflows/complete-milestone.md +0 -701
- package/dist/assets/templates/workflows/discuss.md +0 -343
- package/dist/assets/templates/workflows/insert-phase.md +0 -129
- package/dist/assets/templates/workflows/list-phase-assumptions.md +0 -178
- package/dist/assets/templates/workflows/map-codebase.md +0 -315
- package/dist/assets/templates/workflows/pause-work.md +0 -122
- package/dist/assets/templates/workflows/plan-milestone-gaps.md +0 -274
- package/dist/assets/templates/workflows/realign.md +0 -288
- package/dist/assets/templates/workflows/remove-phase.md +0 -154
- package/dist/assets/templates/workflows/resume-project.md +0 -306
- package/dist/assets/templates/workflows/roadmap.md +0 -130
- package/dist/assets/templates/workflows/set-profile.md +0 -81
- package/dist/assets/templates/workflows/transition.md +0 -544
- package/dist/assets/templates/workflows/update.md +0 -220
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Orchestrate parallel codebase mapper agents to analyze codebase and produce structured documents in .planning/codebase/
|
|
3
|
-
|
|
4
|
-
Each agent has fresh context, explores a specific focus area, and **writes documents directly**. The orchestrator only receives confirmation + line counts, then writes a summary.
|
|
5
|
-
|
|
6
|
-
Output: .planning/codebase/ folder with 7 structured documents about the codebase state.
|
|
7
|
-
</purpose>
|
|
8
|
-
|
|
9
|
-
<philosophy>
|
|
10
|
-
**Why dedicated mapper agents:**
|
|
11
|
-
- Fresh context per domain (no token contamination)
|
|
12
|
-
- Agents write documents directly (no context transfer back to orchestrator)
|
|
13
|
-
- Orchestrator only summarizes what was created (minimal context usage)
|
|
14
|
-
- Faster execution (agents run simultaneously)
|
|
15
|
-
|
|
16
|
-
**Document quality over length:**
|
|
17
|
-
Include enough detail to be useful as reference. Prioritize practical examples (especially code patterns) over arbitrary brevity.
|
|
18
|
-
|
|
19
|
-
**Always include file paths:**
|
|
20
|
-
Documents are reference material for Claude when planning/executing. Always include actual file paths formatted with backticks: `src/services/user.ts`.
|
|
21
|
-
</philosophy>
|
|
22
|
-
|
|
23
|
-
<process>
|
|
24
|
-
|
|
25
|
-
<step name="init_context" priority="first">
|
|
26
|
-
Load codebase mapping context:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init map-codebase)
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`.
|
|
33
|
-
</step>
|
|
34
|
-
|
|
35
|
-
<step name="check_existing">
|
|
36
|
-
Check if .planning/codebase/ already exists using `has_maps` from init context.
|
|
37
|
-
|
|
38
|
-
If `codebase_dir_exists` is true:
|
|
39
|
-
```bash
|
|
40
|
-
ls -la .planning/codebase/
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**If exists:**
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
.planning/codebase/ already exists with these documents:
|
|
47
|
-
[List files found]
|
|
48
|
-
|
|
49
|
-
What's next?
|
|
50
|
-
1. Refresh - Delete existing and remap codebase
|
|
51
|
-
2. Update - Keep existing, only update specific documents
|
|
52
|
-
3. Skip - Use existing codebase map as-is
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Wait for user response.
|
|
56
|
-
|
|
57
|
-
If "Refresh": Delete .planning/codebase/, continue to create_structure
|
|
58
|
-
If "Update": Ask which documents to update, continue to spawn_agents (filtered)
|
|
59
|
-
If "Skip": Exit workflow
|
|
60
|
-
|
|
61
|
-
**If doesn't exist:**
|
|
62
|
-
Continue to create_structure.
|
|
63
|
-
</step>
|
|
64
|
-
|
|
65
|
-
<step name="create_structure">
|
|
66
|
-
Create .planning/codebase/ directory:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
mkdir -p .planning/codebase
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**Expected output files:**
|
|
73
|
-
- STACK.md (from tech mapper)
|
|
74
|
-
- INTEGRATIONS.md (from tech mapper)
|
|
75
|
-
- ARCHITECTURE.md (from arch mapper)
|
|
76
|
-
- STRUCTURE.md (from arch mapper)
|
|
77
|
-
- CONVENTIONS.md (from quality mapper)
|
|
78
|
-
- TESTING.md (from quality mapper)
|
|
79
|
-
- CONCERNS.md (from concerns mapper)
|
|
80
|
-
|
|
81
|
-
Continue to spawn_agents.
|
|
82
|
-
</step>
|
|
83
|
-
|
|
84
|
-
<step name="spawn_agents">
|
|
85
|
-
Spawn 4 parallel maxsim-codebase-mapper agents.
|
|
86
|
-
|
|
87
|
-
Use Task tool with `subagent_type="maxsim-codebase-mapper"`, `model="{mapper_model}"`, and `run_in_background=true` for parallel execution.
|
|
88
|
-
|
|
89
|
-
**CRITICAL:** Use the dedicated `maxsim-codebase-mapper` agent, NOT `Explore`. The mapper agent writes documents directly.
|
|
90
|
-
|
|
91
|
-
**Agent 1: Tech Focus**
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Task(
|
|
95
|
-
subagent_type="maxsim-codebase-mapper",
|
|
96
|
-
model="{mapper_model}",
|
|
97
|
-
run_in_background=true,
|
|
98
|
-
description="Map codebase tech stack",
|
|
99
|
-
prompt="Focus: tech
|
|
100
|
-
|
|
101
|
-
Analyze this codebase for technology stack and external integrations.
|
|
102
|
-
|
|
103
|
-
Write these documents to .planning/codebase/:
|
|
104
|
-
- STACK.md - Languages, runtime, frameworks, dependencies, configuration
|
|
105
|
-
- INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
|
|
106
|
-
|
|
107
|
-
Explore thoroughly. Write documents directly using templates. Return confirmation only."
|
|
108
|
-
)
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Agent 2: Architecture Focus**
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
Task(
|
|
115
|
-
subagent_type="maxsim-codebase-mapper",
|
|
116
|
-
model="{mapper_model}",
|
|
117
|
-
run_in_background=true,
|
|
118
|
-
description="Map codebase architecture",
|
|
119
|
-
prompt="Focus: arch
|
|
120
|
-
|
|
121
|
-
Analyze this codebase architecture and directory structure.
|
|
122
|
-
|
|
123
|
-
Write these documents to .planning/codebase/:
|
|
124
|
-
- ARCHITECTURE.md - Pattern, layers, data flow, abstractions, entry points
|
|
125
|
-
- STRUCTURE.md - Directory layout, key locations, naming conventions
|
|
126
|
-
|
|
127
|
-
Explore thoroughly. Write documents directly using templates. Return confirmation only."
|
|
128
|
-
)
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**Agent 3: Quality Focus**
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
Task(
|
|
135
|
-
subagent_type="maxsim-codebase-mapper",
|
|
136
|
-
model="{mapper_model}",
|
|
137
|
-
run_in_background=true,
|
|
138
|
-
description="Map codebase conventions",
|
|
139
|
-
prompt="Focus: quality
|
|
140
|
-
|
|
141
|
-
Analyze this codebase for coding conventions and testing patterns.
|
|
142
|
-
|
|
143
|
-
Write these documents to .planning/codebase/:
|
|
144
|
-
- CONVENTIONS.md - Code style, naming, patterns, error handling
|
|
145
|
-
- TESTING.md - Framework, structure, mocking, coverage
|
|
146
|
-
|
|
147
|
-
Explore thoroughly. Write documents directly using templates. Return confirmation only."
|
|
148
|
-
)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**Agent 4: Concerns Focus**
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
Task(
|
|
155
|
-
subagent_type="maxsim-codebase-mapper",
|
|
156
|
-
model="{mapper_model}",
|
|
157
|
-
run_in_background=true,
|
|
158
|
-
description="Map codebase concerns",
|
|
159
|
-
prompt="Focus: concerns
|
|
160
|
-
|
|
161
|
-
Analyze this codebase for technical debt, known issues, and areas of concern.
|
|
162
|
-
|
|
163
|
-
Write this document to .planning/codebase/:
|
|
164
|
-
- CONCERNS.md - Tech debt, bugs, security, performance, fragile areas
|
|
165
|
-
|
|
166
|
-
Explore thoroughly. Write document directly using template. Return confirmation only."
|
|
167
|
-
)
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Continue to collect_confirmations.
|
|
171
|
-
</step>
|
|
172
|
-
|
|
173
|
-
<step name="collect_confirmations">
|
|
174
|
-
Wait for all 4 agents to complete.
|
|
175
|
-
|
|
176
|
-
Read each agent's output file to collect confirmations.
|
|
177
|
-
|
|
178
|
-
**Expected confirmation format from each agent:**
|
|
179
|
-
```
|
|
180
|
-
## Mapping Complete
|
|
181
|
-
|
|
182
|
-
**Focus:** {focus}
|
|
183
|
-
**Documents written:**
|
|
184
|
-
- `.planning/codebase/{DOC1}.md` ({N} lines)
|
|
185
|
-
- `.planning/codebase/{DOC2}.md` ({N} lines)
|
|
186
|
-
|
|
187
|
-
Ready for orchestrator summary.
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
**What you receive:** Just file paths and line counts. NOT document contents.
|
|
191
|
-
|
|
192
|
-
If any agent failed, note the failure and continue with successful documents.
|
|
193
|
-
|
|
194
|
-
Continue to verify_output.
|
|
195
|
-
</step>
|
|
196
|
-
|
|
197
|
-
<step name="verify_output">
|
|
198
|
-
Verify all documents created successfully:
|
|
199
|
-
|
|
200
|
-
```bash
|
|
201
|
-
ls -la .planning/codebase/
|
|
202
|
-
wc -l .planning/codebase/*.md
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**Verification checklist:**
|
|
206
|
-
- All 7 documents exist
|
|
207
|
-
- No empty documents (each should have >20 lines)
|
|
208
|
-
|
|
209
|
-
If any documents missing or empty, note which agents may have failed.
|
|
210
|
-
|
|
211
|
-
Continue to scan_for_secrets.
|
|
212
|
-
</step>
|
|
213
|
-
|
|
214
|
-
<step name="scan_for_secrets">
|
|
215
|
-
**CRITICAL SECURITY CHECK:** Scan output files for accidentally leaked secrets before committing.
|
|
216
|
-
|
|
217
|
-
Run secret pattern detection:
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
# Check for common API key patterns in generated docs
|
|
221
|
-
grep -E '(sk-[a-zA-Z0-9]{20,}|sk_live_[a-zA-Z0-9]+|sk_test_[a-zA-Z0-9]+|ghp_[a-zA-Z0-9]{36}|gho_[a-zA-Z0-9]{36}|glpat-[a-zA-Z0-9_-]+|AKIA[A-Z0-9]{16}|xox[baprs]-[a-zA-Z0-9-]+|-----BEGIN.*PRIVATE KEY|eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+\.)' .planning/codebase/*.md 2>/dev/null && SECRETS_FOUND=true || SECRETS_FOUND=false
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
**If SECRETS_FOUND=true:**
|
|
225
|
-
|
|
226
|
-
```
|
|
227
|
-
⚠️ SECURITY ALERT: Potential secrets detected in codebase documents!
|
|
228
|
-
|
|
229
|
-
Found patterns that look like API keys or tokens in:
|
|
230
|
-
[show grep output]
|
|
231
|
-
|
|
232
|
-
This would expose credentials if committed.
|
|
233
|
-
|
|
234
|
-
**Action required:**
|
|
235
|
-
1. Review the flagged content above
|
|
236
|
-
2. If these are real secrets, they must be removed before committing
|
|
237
|
-
3. Consider adding sensitive files to Claude Code "Deny" permissions
|
|
238
|
-
|
|
239
|
-
Pausing before commit. Reply "safe to proceed" if the flagged content is not actually sensitive, or edit the files first.
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
Wait for user confirmation before continuing to commit_codebase_map.
|
|
243
|
-
|
|
244
|
-
**If SECRETS_FOUND=false:**
|
|
245
|
-
|
|
246
|
-
Continue to commit_codebase_map.
|
|
247
|
-
</step>
|
|
248
|
-
|
|
249
|
-
<step name="commit_codebase_map">
|
|
250
|
-
Commit the codebase map:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: map existing codebase" --files .planning/codebase/*.md
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
Continue to offer_next.
|
|
257
|
-
</step>
|
|
258
|
-
|
|
259
|
-
<step name="offer_next">
|
|
260
|
-
Present completion summary and next steps.
|
|
261
|
-
|
|
262
|
-
**Get line counts:**
|
|
263
|
-
```bash
|
|
264
|
-
wc -l .planning/codebase/*.md
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
**Output format:**
|
|
268
|
-
|
|
269
|
-
```
|
|
270
|
-
Codebase mapping complete.
|
|
271
|
-
|
|
272
|
-
Created .planning/codebase/:
|
|
273
|
-
- STACK.md ([N] lines) - Technologies and dependencies
|
|
274
|
-
- ARCHITECTURE.md ([N] lines) - System design and patterns
|
|
275
|
-
- STRUCTURE.md ([N] lines) - Directory layout and organization
|
|
276
|
-
- CONVENTIONS.md ([N] lines) - Code style and patterns
|
|
277
|
-
- TESTING.md ([N] lines) - Test structure and practices
|
|
278
|
-
- INTEGRATIONS.md ([N] lines) - External services and APIs
|
|
279
|
-
- CONCERNS.md ([N] lines) - Technical debt and issues
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## ▶ Next Up
|
|
285
|
-
|
|
286
|
-
**Initialize project** — use codebase context for planning
|
|
287
|
-
|
|
288
|
-
`/maxsim:new-project`
|
|
289
|
-
|
|
290
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
**Also available:**
|
|
295
|
-
- Re-run mapping: `/maxsim:map-codebase`
|
|
296
|
-
- Review specific file: `cat .planning/codebase/STACK.md`
|
|
297
|
-
- Edit any document before proceeding
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
End workflow.
|
|
303
|
-
</step>
|
|
304
|
-
|
|
305
|
-
</process>
|
|
306
|
-
|
|
307
|
-
<success_criteria>
|
|
308
|
-
- .planning/codebase/ directory created
|
|
309
|
-
- 4 parallel maxsim-codebase-mapper agents spawned with run_in_background=true
|
|
310
|
-
- Agents write documents directly (orchestrator doesn't receive document contents)
|
|
311
|
-
- Read agent output files to collect confirmations
|
|
312
|
-
- All 7 codebase documents exist
|
|
313
|
-
- Clear completion summary with line counts
|
|
314
|
-
- User offered clear next steps in MAXSIM style
|
|
315
|
-
</success_criteria>
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Create `.continue-here.md` handoff file to preserve complete work state across sessions. Enables seamless resumption with full context restoration.
|
|
3
|
-
</purpose>
|
|
4
|
-
|
|
5
|
-
<required_reading>
|
|
6
|
-
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
-
</required_reading>
|
|
8
|
-
|
|
9
|
-
<process>
|
|
10
|
-
|
|
11
|
-
<step name="detect">
|
|
12
|
-
Find current phase directory from most recently modified files:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# Find most recent phase directory with work
|
|
16
|
-
ls -lt .planning/phases/*/PLAN.md 2>/dev/null | head -1 | grep -oP 'phases/\K[^/]+'
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
If no active phase detected, ask user which phase they're pausing work on.
|
|
20
|
-
</step>
|
|
21
|
-
|
|
22
|
-
<step name="gather">
|
|
23
|
-
**Collect complete state for handoff:**
|
|
24
|
-
|
|
25
|
-
1. **Current position**: Which phase, which plan, which task
|
|
26
|
-
2. **Work completed**: What got done this session
|
|
27
|
-
3. **Work remaining**: What's left in current plan/phase
|
|
28
|
-
4. **Decisions made**: Key decisions and rationale
|
|
29
|
-
5. **Blockers/issues**: Anything stuck
|
|
30
|
-
6. **Mental context**: The approach, next steps, "vibe"
|
|
31
|
-
7. **Files modified**: What's changed but not committed
|
|
32
|
-
|
|
33
|
-
Ask user for clarifications if needed via conversational questions.
|
|
34
|
-
</step>
|
|
35
|
-
|
|
36
|
-
<step name="write">
|
|
37
|
-
**Write handoff to `.planning/phases/XX-name/.continue-here.md`:**
|
|
38
|
-
|
|
39
|
-
```markdown
|
|
40
|
-
---
|
|
41
|
-
phase: XX-name
|
|
42
|
-
task: 3
|
|
43
|
-
total_tasks: 7
|
|
44
|
-
status: in_progress
|
|
45
|
-
last_updated: [timestamp from current-timestamp]
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
<current_state>
|
|
49
|
-
[Where exactly are we? Immediate context]
|
|
50
|
-
</current_state>
|
|
51
|
-
|
|
52
|
-
<completed_work>
|
|
53
|
-
|
|
54
|
-
- Task 1: [name] - Done
|
|
55
|
-
- Task 2: [name] - Done
|
|
56
|
-
- Task 3: [name] - In progress, [what's done]
|
|
57
|
-
</completed_work>
|
|
58
|
-
|
|
59
|
-
<remaining_work>
|
|
60
|
-
|
|
61
|
-
- Task 3: [what's left]
|
|
62
|
-
- Task 4: Not started
|
|
63
|
-
- Task 5: Not started
|
|
64
|
-
</remaining_work>
|
|
65
|
-
|
|
66
|
-
<decisions_made>
|
|
67
|
-
|
|
68
|
-
- Decided to use [X] because [reason]
|
|
69
|
-
- Chose [approach] over [alternative] because [reason]
|
|
70
|
-
</decisions_made>
|
|
71
|
-
|
|
72
|
-
<blockers>
|
|
73
|
-
- [Blocker 1]: [status/workaround]
|
|
74
|
-
</blockers>
|
|
75
|
-
|
|
76
|
-
<context>
|
|
77
|
-
[Mental state, what were you thinking, the plan]
|
|
78
|
-
</context>
|
|
79
|
-
|
|
80
|
-
<next_action>
|
|
81
|
-
Start with: [specific first action when resuming]
|
|
82
|
-
</next_action>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Be specific enough for a fresh Claude to understand immediately.
|
|
86
|
-
|
|
87
|
-
Use `current-timestamp` for last_updated field. You can use init todos (which provides timestamps) or call directly:
|
|
88
|
-
```bash
|
|
89
|
-
timestamp=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs current-timestamp full --raw)
|
|
90
|
-
```
|
|
91
|
-
</step>
|
|
92
|
-
|
|
93
|
-
<step name="commit">
|
|
94
|
-
```bash
|
|
95
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/phases/*/.continue-here.md
|
|
96
|
-
```
|
|
97
|
-
</step>
|
|
98
|
-
|
|
99
|
-
<step name="confirm">
|
|
100
|
-
```
|
|
101
|
-
✓ Handoff created: .planning/phases/[XX-name]/.continue-here.md
|
|
102
|
-
|
|
103
|
-
Current state:
|
|
104
|
-
|
|
105
|
-
- Phase: [XX-name]
|
|
106
|
-
- Task: [X] of [Y]
|
|
107
|
-
- Status: [in_progress/blocked]
|
|
108
|
-
- Committed as WIP
|
|
109
|
-
|
|
110
|
-
To resume: /maxsim:resume-work
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
</step>
|
|
114
|
-
|
|
115
|
-
</process>
|
|
116
|
-
|
|
117
|
-
<success_criteria>
|
|
118
|
-
- [ ] .continue-here.md created in correct phase directory
|
|
119
|
-
- [ ] All sections filled with specific content
|
|
120
|
-
- [ ] Committed as WIP
|
|
121
|
-
- [ ] User knows location and how to resume
|
|
122
|
-
</success_criteria>
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Create all phases necessary to close gaps identified by `/maxsim:audit-milestone`. Reads MILESTONE-AUDIT.md, groups gaps into logical phases, creates phase entries in ROADMAP.md, and offers to plan each phase. One command creates all fix phases — no manual `/maxsim:add-phase` per gap.
|
|
3
|
-
</purpose>
|
|
4
|
-
|
|
5
|
-
<required_reading>
|
|
6
|
-
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
-
</required_reading>
|
|
8
|
-
|
|
9
|
-
<process>
|
|
10
|
-
|
|
11
|
-
## 1. Load Audit Results
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# Find the most recent audit file
|
|
15
|
-
ls -t .planning/v*-MILESTONE-AUDIT.md 2>/dev/null | head -1
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Parse YAML frontmatter to extract structured gaps:
|
|
19
|
-
- `gaps.requirements` — unsatisfied requirements
|
|
20
|
-
- `gaps.integration` — missing cross-phase connections
|
|
21
|
-
- `gaps.flows` — broken E2E flows
|
|
22
|
-
|
|
23
|
-
If no audit file exists or has no gaps, error:
|
|
24
|
-
```
|
|
25
|
-
No audit gaps found. Run `/maxsim:audit-milestone` first.
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 2. Prioritize Gaps
|
|
29
|
-
|
|
30
|
-
Group gaps by priority from REQUIREMENTS.md:
|
|
31
|
-
|
|
32
|
-
| Priority | Action |
|
|
33
|
-
|----------|--------|
|
|
34
|
-
| `must` | Create phase, blocks milestone |
|
|
35
|
-
| `should` | Create phase, recommended |
|
|
36
|
-
| `nice` | Ask user: include or defer? |
|
|
37
|
-
|
|
38
|
-
For integration/flow gaps, infer priority from affected requirements.
|
|
39
|
-
|
|
40
|
-
## 3. Group Gaps into Phases
|
|
41
|
-
|
|
42
|
-
Cluster related gaps into logical phases:
|
|
43
|
-
|
|
44
|
-
**Grouping rules:**
|
|
45
|
-
- Same affected phase → combine into one fix phase
|
|
46
|
-
- Same subsystem (auth, API, UI) → combine
|
|
47
|
-
- Dependency order (fix stubs before wiring)
|
|
48
|
-
- Keep phases focused: 2-4 tasks each
|
|
49
|
-
|
|
50
|
-
**Example grouping:**
|
|
51
|
-
```
|
|
52
|
-
Gap: DASH-01 unsatisfied (Dashboard doesn't fetch)
|
|
53
|
-
Gap: Integration Phase 1→3 (Auth not passed to API calls)
|
|
54
|
-
Gap: Flow "View dashboard" broken at data fetch
|
|
55
|
-
|
|
56
|
-
→ Phase 6: "Wire Dashboard to API"
|
|
57
|
-
- Add fetch to Dashboard.tsx
|
|
58
|
-
- Include auth header in fetch
|
|
59
|
-
- Handle response, update state
|
|
60
|
-
- Render user data
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## 4. Determine Phase Numbers
|
|
64
|
-
|
|
65
|
-
Find highest existing phase:
|
|
66
|
-
```bash
|
|
67
|
-
# Get sorted phase list, extract last one
|
|
68
|
-
PHASES=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs phases list)
|
|
69
|
-
HIGHEST=$(echo "$PHASES" | jq -r '.directories[-1]')
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
New phases continue from there:
|
|
73
|
-
- If Phase 5 is highest, gaps become Phase 6, 7, 8...
|
|
74
|
-
|
|
75
|
-
## 5. Present Gap Closure Plan
|
|
76
|
-
|
|
77
|
-
```markdown
|
|
78
|
-
## Gap Closure Plan
|
|
79
|
-
|
|
80
|
-
**Milestone:** {version}
|
|
81
|
-
**Gaps to close:** {N} requirements, {M} integration, {K} flows
|
|
82
|
-
|
|
83
|
-
### Proposed Phases
|
|
84
|
-
|
|
85
|
-
**Phase {N}: {Name}**
|
|
86
|
-
Closes:
|
|
87
|
-
- {REQ-ID}: {description}
|
|
88
|
-
- Integration: {from} → {to}
|
|
89
|
-
Tasks: {count}
|
|
90
|
-
|
|
91
|
-
**Phase {N+1}: {Name}**
|
|
92
|
-
Closes:
|
|
93
|
-
- {REQ-ID}: {description}
|
|
94
|
-
- Flow: {flow name}
|
|
95
|
-
Tasks: {count}
|
|
96
|
-
|
|
97
|
-
{If nice-to-have gaps exist:}
|
|
98
|
-
|
|
99
|
-
### Deferred (nice-to-have)
|
|
100
|
-
|
|
101
|
-
These gaps are optional. Include them?
|
|
102
|
-
- {gap description}
|
|
103
|
-
- {gap description}
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
Create these {X} phases? (yes / adjust / defer all optional)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Wait for user confirmation.
|
|
111
|
-
|
|
112
|
-
## 6. Update ROADMAP.md
|
|
113
|
-
|
|
114
|
-
Add new phases to current milestone:
|
|
115
|
-
|
|
116
|
-
```markdown
|
|
117
|
-
### Phase {N}: {Name}
|
|
118
|
-
**Goal:** {derived from gaps being closed}
|
|
119
|
-
**Requirements:** {REQ-IDs being satisfied}
|
|
120
|
-
**Gap Closure:** Closes gaps from audit
|
|
121
|
-
|
|
122
|
-
### Phase {N+1}: {Name}
|
|
123
|
-
...
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## 7. Update REQUIREMENTS.md Traceability Table (REQUIRED)
|
|
127
|
-
|
|
128
|
-
For each REQ-ID assigned to a gap closure phase:
|
|
129
|
-
- Update the Phase column to reflect the new gap closure phase
|
|
130
|
-
- Reset Status to `Pending`
|
|
131
|
-
|
|
132
|
-
Reset checked-off requirements the audit found unsatisfied:
|
|
133
|
-
- Change `[x]` → `[ ]` for any requirement marked unsatisfied in the audit
|
|
134
|
-
- Update coverage count at top of REQUIREMENTS.md
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
# Verify traceability table reflects gap closure assignments
|
|
138
|
-
grep -c "Pending" .planning/REQUIREMENTS.md
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## 8. Create Phase Directories
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
mkdir -p ".planning/phases/{NN}-{name}"
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## 9. Commit Roadmap and Requirements Update
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs(roadmap): add gap closure phases {N}-{M}" --files .planning/ROADMAP.md .planning/REQUIREMENTS.md
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## 10. Offer Next Steps
|
|
154
|
-
|
|
155
|
-
```markdown
|
|
156
|
-
## ✓ Gap Closure Phases Created
|
|
157
|
-
|
|
158
|
-
**Phases added:** {N} - {M}
|
|
159
|
-
**Gaps addressed:** {count} requirements, {count} integration, {count} flows
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## ▶ Next Up
|
|
164
|
-
|
|
165
|
-
**Plan first gap closure phase**
|
|
166
|
-
|
|
167
|
-
`/maxsim:plan-phase {N}`
|
|
168
|
-
|
|
169
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
**Also available:**
|
|
174
|
-
- `/maxsim:execute-phase {N}` — if plans already exist
|
|
175
|
-
- `cat .planning/ROADMAP.md` — see updated roadmap
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
**After all gap phases complete:**
|
|
180
|
-
|
|
181
|
-
`/maxsim:audit-milestone` — re-audit to verify gaps closed
|
|
182
|
-
`/maxsim:complete-milestone {version}` — archive when audit passes
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
</process>
|
|
186
|
-
|
|
187
|
-
<gap_to_phase_mapping>
|
|
188
|
-
|
|
189
|
-
## How Gaps Become Tasks
|
|
190
|
-
|
|
191
|
-
**Requirement gap → Tasks:**
|
|
192
|
-
```yaml
|
|
193
|
-
gap:
|
|
194
|
-
id: DASH-01
|
|
195
|
-
description: "User sees their data"
|
|
196
|
-
reason: "Dashboard exists but doesn't fetch from API"
|
|
197
|
-
missing:
|
|
198
|
-
- "useEffect with fetch to /api/user/data"
|
|
199
|
-
- "State for user data"
|
|
200
|
-
- "Render user data in JSX"
|
|
201
|
-
|
|
202
|
-
becomes:
|
|
203
|
-
|
|
204
|
-
phase: "Wire Dashboard Data"
|
|
205
|
-
tasks:
|
|
206
|
-
- name: "Add data fetching"
|
|
207
|
-
files: [src/components/Dashboard.tsx]
|
|
208
|
-
action: "Add useEffect that fetches /api/user/data on mount"
|
|
209
|
-
|
|
210
|
-
- name: "Add state management"
|
|
211
|
-
files: [src/components/Dashboard.tsx]
|
|
212
|
-
action: "Add useState for userData, loading, error states"
|
|
213
|
-
|
|
214
|
-
- name: "Render user data"
|
|
215
|
-
files: [src/components/Dashboard.tsx]
|
|
216
|
-
action: "Replace placeholder with userData.map rendering"
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**Integration gap → Tasks:**
|
|
220
|
-
```yaml
|
|
221
|
-
gap:
|
|
222
|
-
from_phase: 1
|
|
223
|
-
to_phase: 3
|
|
224
|
-
connection: "Auth token → API calls"
|
|
225
|
-
reason: "Dashboard API calls don't include auth header"
|
|
226
|
-
missing:
|
|
227
|
-
- "Auth header in fetch calls"
|
|
228
|
-
- "Token refresh on 401"
|
|
229
|
-
|
|
230
|
-
becomes:
|
|
231
|
-
|
|
232
|
-
phase: "Add Auth to Dashboard API Calls"
|
|
233
|
-
tasks:
|
|
234
|
-
- name: "Add auth header to fetches"
|
|
235
|
-
files: [src/components/Dashboard.tsx, src/lib/api.ts]
|
|
236
|
-
action: "Include Authorization header with token in all API calls"
|
|
237
|
-
|
|
238
|
-
- name: "Handle 401 responses"
|
|
239
|
-
files: [src/lib/api.ts]
|
|
240
|
-
action: "Add interceptor to refresh token or redirect to login on 401"
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
**Flow gap → Tasks:**
|
|
244
|
-
```yaml
|
|
245
|
-
gap:
|
|
246
|
-
name: "User views dashboard after login"
|
|
247
|
-
broken_at: "Dashboard data load"
|
|
248
|
-
reason: "No fetch call"
|
|
249
|
-
missing:
|
|
250
|
-
- "Fetch user data on mount"
|
|
251
|
-
- "Display loading state"
|
|
252
|
-
- "Render user data"
|
|
253
|
-
|
|
254
|
-
becomes:
|
|
255
|
-
|
|
256
|
-
# Usually same phase as requirement/integration gap
|
|
257
|
-
# Flow gaps often overlap with other gap types
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
</gap_to_phase_mapping>
|
|
261
|
-
|
|
262
|
-
<success_criteria>
|
|
263
|
-
- [ ] MILESTONE-AUDIT.md loaded and gaps parsed
|
|
264
|
-
- [ ] Gaps prioritized (must/should/nice)
|
|
265
|
-
- [ ] Gaps grouped into logical phases
|
|
266
|
-
- [ ] User confirmed phase plan
|
|
267
|
-
- [ ] ROADMAP.md updated with new phases
|
|
268
|
-
- [ ] REQUIREMENTS.md traceability table updated with gap closure phase assignments
|
|
269
|
-
- [ ] Unsatisfied requirement checkboxes reset (`[x]` → `[ ]`)
|
|
270
|
-
- [ ] Coverage count updated in REQUIREMENTS.md
|
|
271
|
-
- [ ] Phase directories created
|
|
272
|
-
- [ ] Changes committed (includes REQUIREMENTS.md)
|
|
273
|
-
- [ ] User knows to run `/maxsim:plan-phase` next
|
|
274
|
-
</success_criteria>
|