maxsimcli 5.0.7 → 5.1.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.
Files changed (91) hide show
  1. package/README.md +101 -99
  2. package/dist/assets/CHANGELOG.md +7 -0
  3. package/dist/assets/hooks/maxsim-capture-learnings.cjs +128 -0
  4. package/dist/assets/hooks/maxsim-capture-learnings.cjs.map +1 -0
  5. package/dist/assets/hooks/maxsim-check-update.cjs +126 -88
  6. package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
  7. package/dist/assets/hooks/maxsim-notification-sound.cjs +87 -43
  8. package/dist/assets/hooks/maxsim-notification-sound.cjs.map +1 -1
  9. package/dist/assets/hooks/maxsim-statusline.cjs +45 -171
  10. package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
  11. package/dist/assets/hooks/maxsim-stop-sound.cjs +86 -43
  12. package/dist/assets/hooks/maxsim-stop-sound.cjs.map +1 -1
  13. package/dist/assets/hooks/maxsim-sync-reminder.cjs +72 -21
  14. package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -1
  15. package/dist/assets/templates/agents/AGENTS.md +62 -51
  16. package/dist/assets/templates/agents/executor.md +44 -59
  17. package/dist/assets/templates/agents/planner.md +36 -31
  18. package/dist/assets/templates/agents/researcher.md +35 -43
  19. package/dist/assets/templates/agents/verifier.md +29 -31
  20. package/dist/assets/templates/commands/maxsim/debug.md +20 -154
  21. package/dist/assets/templates/commands/maxsim/execute.md +19 -33
  22. package/dist/assets/templates/commands/maxsim/go.md +21 -20
  23. package/dist/assets/templates/commands/maxsim/help.md +5 -14
  24. package/dist/assets/templates/commands/maxsim/init.md +18 -40
  25. package/dist/assets/templates/commands/maxsim/plan.md +22 -37
  26. package/dist/assets/templates/commands/maxsim/progress.md +15 -16
  27. package/dist/assets/templates/commands/maxsim/quick.md +18 -29
  28. package/dist/assets/templates/commands/maxsim/settings.md +18 -26
  29. package/dist/assets/templates/references/continuation-format.md +2 -4
  30. package/dist/assets/templates/references/model-profiles.md +2 -2
  31. package/dist/assets/templates/references/planning-config.md +10 -11
  32. package/dist/assets/templates/references/self-improvement.md +120 -0
  33. package/dist/assets/templates/rules/conventions.md +1 -1
  34. package/dist/assets/templates/rules/verification-protocol.md +1 -1
  35. package/dist/assets/templates/skills/brainstorming/SKILL.md +35 -26
  36. package/dist/assets/templates/skills/code-review/SKILL.md +78 -55
  37. package/dist/assets/templates/skills/commit-conventions/SKILL.md +70 -36
  38. package/dist/assets/templates/skills/github-operations/SKILL.md +142 -0
  39. package/dist/assets/templates/skills/handoff-contract/SKILL.md +62 -28
  40. package/dist/assets/templates/skills/maxsim-batch/SKILL.md +68 -42
  41. package/dist/assets/templates/skills/maxsim-simplify/SKILL.md +65 -40
  42. package/dist/assets/templates/skills/project-memory/SKILL.md +121 -0
  43. package/dist/assets/templates/skills/research/SKILL.md +126 -0
  44. package/dist/assets/templates/skills/roadmap-writing/SKILL.md +71 -68
  45. package/dist/assets/templates/skills/systematic-debugging/SKILL.md +37 -25
  46. package/dist/assets/templates/skills/tdd/SKILL.md +36 -39
  47. package/dist/assets/templates/skills/using-maxsim/SKILL.md +69 -55
  48. package/dist/assets/templates/skills/verification/SKILL.md +167 -0
  49. package/dist/assets/templates/workflows/batch.md +249 -268
  50. package/dist/assets/templates/workflows/diagnose-issues.md +225 -151
  51. package/dist/assets/templates/workflows/execute-plan.md +191 -981
  52. package/dist/assets/templates/workflows/execute.md +350 -309
  53. package/dist/assets/templates/workflows/go.md +119 -138
  54. package/dist/assets/templates/workflows/health.md +71 -114
  55. package/dist/assets/templates/workflows/help.md +85 -147
  56. package/dist/assets/templates/workflows/init-existing.md +180 -1373
  57. package/dist/assets/templates/workflows/init.md +53 -165
  58. package/dist/assets/templates/workflows/new-milestone.md +91 -334
  59. package/dist/assets/templates/workflows/new-project.md +165 -1384
  60. package/dist/assets/templates/workflows/plan-create.md +182 -73
  61. package/dist/assets/templates/workflows/plan-discuss.md +89 -82
  62. package/dist/assets/templates/workflows/plan-research.md +191 -85
  63. package/dist/assets/templates/workflows/plan.md +122 -58
  64. package/dist/assets/templates/workflows/progress.md +76 -310
  65. package/dist/assets/templates/workflows/quick.md +70 -495
  66. package/dist/assets/templates/workflows/sdd.md +231 -221
  67. package/dist/assets/templates/workflows/settings.md +90 -120
  68. package/dist/assets/templates/workflows/verify-phase.md +296 -258
  69. package/dist/cli.cjs +17 -23465
  70. package/dist/cli.cjs.map +1 -1
  71. package/dist/install.cjs +356 -8358
  72. package/dist/install.cjs.map +1 -1
  73. package/package.json +16 -22
  74. package/dist/assets/templates/skills/agent-system-map/SKILL.md +0 -92
  75. package/dist/assets/templates/skills/evidence-collection/SKILL.md +0 -87
  76. package/dist/assets/templates/skills/github-artifact-protocol/SKILL.md +0 -67
  77. package/dist/assets/templates/skills/github-tools-guide/SKILL.md +0 -89
  78. package/dist/assets/templates/skills/input-validation/SKILL.md +0 -51
  79. package/dist/assets/templates/skills/memory-management/SKILL.md +0 -75
  80. package/dist/assets/templates/skills/research-methodology/SKILL.md +0 -137
  81. package/dist/assets/templates/skills/sdd/SKILL.md +0 -91
  82. package/dist/assets/templates/skills/tool-priority-guide/SKILL.md +0 -80
  83. package/dist/assets/templates/skills/verification-before-completion/SKILL.md +0 -71
  84. package/dist/assets/templates/skills/verification-gates/SKILL.md +0 -169
  85. package/dist/assets/templates/workflows/discuss-phase.md +0 -683
  86. package/dist/assets/templates/workflows/research-phase.md +0 -73
  87. package/dist/assets/templates/workflows/verify-work.md +0 -572
  88. package/dist/core-D5zUr9cb.cjs +0 -4305
  89. package/dist/core-D5zUr9cb.cjs.map +0 -1
  90. package/dist/skills-CjFWZIGM.cjs +0 -6824
  91. package/dist/skills-CjFWZIGM.cjs.map +0 -1
@@ -1,223 +1,111 @@
1
1
  <purpose>
2
+ Unified initialization router. Detects current project and repo state, then delegates to the appropriate sub-workflow. This file is a thin router — all heavy logic lives in the sub-workflows.
2
3
 
3
- Unified initialization router. Detects the current project state and delegates to the appropriate sub-workflow:
4
- - **New project** (no .planning/) -> delegates to @~/.claude/maxsim/workflows/new-project.md
5
- - **Existing project** (.planning/ exists, no ROADMAP.md) -> delegates to @~/.claude/maxsim/workflows/init-existing.md
6
- - **Active milestone** (.planning/ + ROADMAP.md, phases in progress) -> shows status, offers options
7
- - **Milestone complete** (all phases done) -> offers completion or new milestone via @~/.claude/maxsim/workflows/new-milestone.md
8
-
9
- This file is a THIN ROUTER. All heavy logic lives in the sub-workflows.
10
-
4
+ Routes:
5
+ - Already initialized -> show status, offer reinit
6
+ - GitHub repo exists with code -> @~/.claude/maxsim/workflows/init-existing.md
7
+ - New or empty repo -> @~/.claude/maxsim/workflows/new-project.md
11
8
  </purpose>
12
9
 
13
- <required_reading>
14
-
15
- Read all files referenced by the invoking prompt's execution_context before starting.
16
-
17
- </required_reading>
18
-
19
10
  <process>
20
11
 
21
- ## 1. Parse Flags
22
-
23
- Check if `--auto` was passed in $ARGUMENTS. If present, set `AUTO_MODE=true` and pass through to sub-workflows.
24
-
25
- ## 2. Detect Scenario
26
-
27
- Run filesystem checks to determine which flow applies:
12
+ ## Step 1: Check Already Initialized
28
13
 
29
14
  ```bash
30
- # Check project state
31
- PLANNING_EXISTS=$(test -d .planning && echo "true" || echo "false")
32
-
33
- if [ "$PLANNING_EXISTS" = "true" ]; then
34
- ROADMAP_EXISTS=$(test -f .planning/ROADMAP.md && echo "true" || echo "false")
35
- STATE_EXISTS=$(test -f .planning/STATE.md && echo "true" || echo "false")
36
- else
37
- ROADMAP_EXISTS="false"
38
- STATE_EXISTS="false"
39
- fi
40
-
41
- echo "PLANNING=$PLANNING_EXISTS ROADMAP=$ROADMAP_EXISTS STATE=$STATE_EXISTS"
15
+ INITIALIZED=$(test -f .claude/maxsim/config.json && echo "true" || echo "false")
42
16
  ```
43
17
 
44
- Use the results to route:
18
+ If `INITIALIZED` is `true`, display current status and ask:
45
19
 
46
- | PLANNING | ROADMAP | Route |
47
- |----------|---------|-------|
48
- | false | - | Scenario A: New Project |
49
- | true | false | Scenario B: Existing Project |
50
- | true | true | Scenario C or D: check phase completion |
20
+ ```
21
+ ## MAXSIM Already Initialized
51
22
 
52
- For Scenario C vs D, check phase progress:
23
+ This project is already set up. Run /maxsim:go to continue where you left off.
53
24
 
54
- ```bash
55
- node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap analyze 2>/dev/null || echo "NO_ANALYSIS"
25
+ Would you like to reinitialize? This will overwrite your existing config.
56
26
  ```
57
27
 
58
- If all phases show status "complete" -> Scenario D (Milestone Complete).
59
- Otherwise -> Scenario C (Active Milestone).
28
+ Use AskUserQuestion:
29
+ - header: "Reinitialize?"
30
+ - question: "This project is already initialized. Reinitialize from scratch?"
31
+ - options:
32
+ - "Yes, reinitialize" — overwrite existing config
33
+ - "No, continue with /maxsim:go" — exit router
60
34
 
61
- ## 3. Route to Scenario
35
+ If "No": Print "Run `/maxsim:go` to continue." and exit.
36
+ If "Yes": Continue to Step 2 (proceed as if not initialized).
62
37
 
63
- ### Scenario A: New Project
38
+ ## Step 2: Check GitHub Repo
64
39
 
65
- No `.planning/` directory found. This is a fresh project initialization.
40
+ ```bash
41
+ gh repo view --json name,url,isEmpty 2>/dev/null || echo "NO_REPO"
42
+ ```
66
43
 
67
- Display:
44
+ Parse the result:
68
45
 
69
- ```
70
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
71
- MAXSIM ► INITIALIZING NEW PROJECT
72
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
- ```
46
+ - If command fails or returns `NO_REPO`: `REPO_EXISTS=false`
47
+ - If JSON returned: `REPO_EXISTS=true`, parse `isEmpty` field
74
48
 
75
- **CRITICAL Run init context BEFORE delegating:**
49
+ ## Step 3: Check for Existing Code
76
50
 
77
51
  ```bash
78
- INIT_CONTEXT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init new-project)
79
- echo "$INIT_CONTEXT"
52
+ HAS_CODE=$(test -n "$(ls -A . 2>/dev/null | grep -v '^\.git$' | head -1)" && echo "true" || echo "false")
80
53
  ```
81
54
 
82
- Save this JSON output the sub-workflow will use it as `INIT_CONTEXT` and skip its own init call.
83
-
84
- Now delegate to @~/.claude/maxsim/workflows/new-project.md — execute the full new-project workflow end-to-end. The `INIT_CONTEXT` JSON is already loaded; the sub-workflow will detect this and skip Step 1's CLI call.
85
-
86
- Pass through:
87
- - `--auto` flag if set
88
- - All $ARGUMENTS for idea document references
55
+ ## Step 4: Route to Sub-workflow
89
56
 
90
- After the new-project workflow completes, display:
57
+ Use the results from Steps 2–3 to determine the route:
91
58
 
92
- ```
93
- Project initialized. Run /maxsim:plan 1 to start phase planning.
94
- ```
59
+ | REPO_EXISTS | isEmpty / HAS_CODE | Route |
60
+ |-------------|-------------------|-------|
61
+ | false | — | new-project |
62
+ | true | isEmpty=true and HAS_CODE=false | new-project |
63
+ | true | has code | init-existing |
95
64
 
96
- ### Scenario B: Existing Project
97
-
98
- `.planning/` exists but no `ROADMAP.md`. This is an existing codebase that needs MAXSIM initialization.
65
+ ### Route A: New Project
99
66
 
100
67
  Display:
101
68
 
102
69
  ```
103
70
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
104
- MAXSIM ► INITIALIZING EXISTING PROJECT
71
+ MAXSIM ► INITIALIZING NEW PROJECT
105
72
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
106
73
  ```
107
74
 
108
- **CRITICAL Run init context BEFORE delegating:**
109
-
110
- ```bash
111
- INIT_CONTEXT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init init-existing)
112
- echo "$INIT_CONTEXT"
113
- ```
114
-
115
- Save this JSON output — the sub-workflow will use it as `INIT_CONTEXT` and skip its own init call.
116
-
117
- Now delegate to @~/.claude/maxsim/workflows/init-existing.md — execute the full init-existing workflow end-to-end. The `INIT_CONTEXT` JSON is already loaded; the sub-workflow will detect this and skip Step 1's CLI call.
118
-
119
- Pass through:
120
- - `--auto` flag if set
75
+ Delegate to @~/.claude/maxsim/workflows/new-project.md. Execute that workflow end-to-end. Pass through all $ARGUMENTS.
121
76
 
122
- After the init-existing workflow completes, display:
77
+ After completion:
123
78
 
124
79
  ```
125
- Project initialized. Run /maxsim:plan 1 to start phase planning.
80
+ Project initialized. Run /maxsim:go to start working.
126
81
  ```
127
82
 
128
- ### Scenario C: Active Milestone
129
-
130
- `.planning/` and `ROADMAP.md` exist with phases still in progress. The project is actively being worked on.
83
+ ### Route B: Existing Project
131
84
 
132
85
  Display:
133
86
 
134
87
  ```
135
88
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
136
- MAXSIM ► PROJECT STATUS
89
+ MAXSIM ► INITIALIZING EXISTING PROJECT
137
90
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
138
91
  ```
139
92
 
140
- Load current state:
141
-
142
- ```bash
143
- node ~/.claude/maxsim/bin/maxsim-tools.cjs state load 2>/dev/null
144
- ```
145
-
146
- Read `.planning/ROADMAP.md` and `.planning/STATE.md` to display:
147
- - Current milestone name and version
148
- - Phase progress (completed/total)
149
- - Current phase and plan being executed
150
- - Recent activity from session continuity
151
-
152
- Then present options conversationally (natural language, not AskUserQuestion):
153
-
154
- **Options:**
155
-
156
- 1. **Continue working** -- Based on the current state, suggest the next logical action:
157
- - If a plan is in progress: "Continue executing Plan {N} with `/maxsim:execute {phase}`"
158
- - If a phase needs planning: "Plan the next phase with `/maxsim:plan {phase}`"
159
- - If verification is pending: "Verify the current phase"
160
-
161
- 2. **Start a new milestone** -- If the user wants to pivot or start fresh:
162
- - Delegate to @~/.claude/maxsim/workflows/new-milestone.md for the milestone creation flow
163
-
164
- 3. **View detailed progress** -- Direct to `/maxsim:progress` for full status
165
-
166
- 4. **Exit** -- No action needed
167
-
168
- Wait for the user's choice and route accordingly.
169
-
170
- ### Scenario D: Milestone Complete
171
-
172
- `.planning/` and `ROADMAP.md` exist with all phases marked complete. The current milestone is finished.
93
+ Delegate to @~/.claude/maxsim/workflows/init-existing.md. Execute that workflow end-to-end. Pass through all $ARGUMENTS.
173
94
 
174
- Display:
95
+ After completion:
175
96
 
176
97
  ```
177
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
178
- MAXSIM ► MILESTONE COMPLETE
179
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
98
+ Project initialized. Run /maxsim:go to start working.
180
99
  ```
181
100
 
182
- Load state and display completion summary:
183
- - Milestone name and version
184
- - Total phases completed
185
- - Key metrics (plans executed, decisions made)
186
-
187
- Then present options conversationally:
188
-
189
- **Options:**
190
-
191
- 1. **Complete and archive this milestone** -- Run the milestone completion flow:
192
- - Delegate to @~/.claude/maxsim/workflows/new-milestone.md with completion mode
193
- - Archives current milestone data
194
- - Updates MILESTONES.md with summary
195
-
196
- 2. **Start a new milestone** -- Begin the next cycle:
197
- - Delegate to @~/.claude/maxsim/workflows/new-milestone.md for creation flow
198
- - Gathers new milestone goals
199
- - Creates fresh REQUIREMENTS.md and ROADMAP.md
200
-
201
- 3. **View final progress** -- Direct to `/maxsim:progress` for the full report
202
-
203
- Wait for the user's choice and route accordingly.
204
-
205
- ## 4. Context Management
206
-
207
- For long-running flows (Scenarios A and B especially), the sub-workflows handle their own context management including checkpoint-before-clear patterns. The router does not need to manage context beyond the initial detection and delegation.
208
-
209
- If context is filling up during Scenario C or D interactive options:
210
- - Recommend the user run `/clear` and then the specific command for their chosen action
211
- - Example: "Context is getting large. Run `/clear`, then `/maxsim:plan 3` to continue planning phase 3."
212
-
213
101
  </process>
214
102
 
215
103
  <constraints>
216
-
217
- - This workflow is a ROUTER only. All project initialization logic lives in the sub-workflows.
218
- - Do NOT inline or duplicate logic from new-project.md, init-existing.md, or new-milestone.md.
219
- - Do NOT reference removed command names in user-facing output. The old per-scenario commands no longer exist as user-facing commands.
220
- - The sub-workflows may still reference removed command names internally -- that is expected and will be cleaned up in a later plan.
221
- - For Scenarios C and D, use natural conversational flow for options. Do not use AskUserQuestion for the menu -- just present options and let the user respond naturally.
222
-
104
+ - This workflow is a ROUTER only — no initialization logic lives here
105
+ - Tool name is Agent (NOT Task)
106
+ - No SlashCommand tool
107
+ - GitHub Issues is the SOLE source of truth
108
+ - No local .planning/ directory references
109
+ - Use `node ~/.claude/maxsim/bin/maxsim-tools.cjs` for CLI operations
110
+ - Do not inline or duplicate logic from new-project.md or init-existing.md
223
111
  </constraints>