@gannonh/kata 0.1.4 → 0.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.
Files changed (89) hide show
  1. package/README.md +55 -28
  2. package/agents/kata-debugger.md +20 -1
  3. package/agents/kata-entity-generator.md +237 -0
  4. package/agents/kata-executor.md +31 -0
  5. package/agents/kata-phase-researcher.md +13 -4
  6. package/agents/kata-planner.md +19 -0
  7. package/agents/kata-project-researcher.md +5 -5
  8. package/agents/kata-research-synthesizer.md +9 -0
  9. package/bin/install.js +100 -38
  10. package/commands/kata/add-phase.md +8 -195
  11. package/commands/kata/add-todo.md +8 -170
  12. package/commands/kata/audit-milestone.md +10 -248
  13. package/commands/kata/check-todo.md +20 -0
  14. package/commands/kata/complete-milestone.md +8 -124
  15. package/commands/kata/debug.md +9 -138
  16. package/commands/kata/discuss-phase.md +13 -73
  17. package/commands/kata/execute-phase.md +9 -293
  18. package/commands/kata/help.md +13 -376
  19. package/commands/kata/insert-phase.md +8 -215
  20. package/commands/kata/list-phase-assumptions.md +10 -40
  21. package/commands/kata/map-codebase.md +10 -61
  22. package/commands/kata/pause-work.md +9 -112
  23. package/commands/kata/plan-milestone-gaps.md +9 -273
  24. package/commands/kata/plan-phase.md +9 -464
  25. package/commands/kata/progress.md +10 -346
  26. package/commands/kata/quick.md +20 -0
  27. package/commands/kata/remove-phase.md +8 -326
  28. package/commands/kata/research-phase.md +10 -170
  29. package/commands/kata/resume-work.md +10 -30
  30. package/commands/kata/set-profile.md +20 -0
  31. package/commands/kata/settings.md +20 -0
  32. package/commands/kata/start-milestone.md +20 -0
  33. package/commands/kata/start-new-milestone.md +20 -0
  34. package/commands/kata/start-project.md +20 -0
  35. package/commands/kata/update-kata.md +20 -0
  36. package/commands/kata/update.md +13 -219
  37. package/commands/kata/verify-work.md +10 -209
  38. package/commands/kata/whats-new.md +13 -117
  39. package/kata/references/checkpoints.md +318 -28
  40. package/kata/references/model-profiles.md +73 -0
  41. package/kata/references/planning-config.md +94 -0
  42. package/kata/references/ui-brand.md +2 -2
  43. package/kata/references/verification-patterns.md +17 -0
  44. package/kata/templates/codebase/architecture.md +2 -2
  45. package/kata/templates/codebase/structure.md +4 -4
  46. package/kata/templates/config.json +9 -0
  47. package/kata/templates/entity.md +173 -0
  48. package/kata/templates/phase-prompt.md +18 -27
  49. package/kata/workflows/complete-milestone.md +11 -0
  50. package/kata/workflows/diagnose-issues.md +12 -1
  51. package/kata/workflows/discovery-phase.md +5 -9
  52. package/kata/workflows/discuss-phase.md +11 -0
  53. package/kata/workflows/execute-phase.md +68 -9
  54. package/kata/workflows/execute-plan.md +47 -4
  55. package/kata/workflows/map-codebase.md +35 -2
  56. package/kata/workflows/resume-project.md +4 -0
  57. package/kata/workflows/verify-phase.md +2 -3
  58. package/kata/workflows/verify-work.md +36 -3
  59. package/package.json +12 -5
  60. package/skills/kata-adding-phases/SKILL.md +209 -0
  61. package/skills/kata-adding-todos/SKILL.md +195 -0
  62. package/skills/kata-auditing-milestones/SKILL.md +279 -0
  63. package/{commands/kata/check-todos.md → skills/kata-checking-todos/SKILL.md} +16 -5
  64. package/skills/kata-completing-milestones/SKILL.md +137 -0
  65. package/skills/kata-configuring-settings/SKILL.md +139 -0
  66. package/skills/kata-debugging/SKILL.md +170 -0
  67. package/skills/kata-discussing-phases/SKILL.md +85 -0
  68. package/skills/kata-executing-phases/SKILL.md +335 -0
  69. package/skills/kata-executing-quick-tasks/SKILL.md +306 -0
  70. package/skills/kata-inserting-phases/SKILL.md +229 -0
  71. package/skills/kata-listing-phase-assumptions/SKILL.md +51 -0
  72. package/skills/kata-mapping-codebases/SKILL.md +70 -0
  73. package/skills/kata-pausing-work/SKILL.md +137 -0
  74. package/skills/kata-planning-milestone-gaps/SKILL.md +295 -0
  75. package/skills/kata-planning-phases/SKILL.md +521 -0
  76. package/skills/kata-providing-help/SKILL.md +495 -0
  77. package/skills/kata-removing-phases/SKILL.md +350 -0
  78. package/skills/kata-researching-phases/SKILL.md +202 -0
  79. package/skills/kata-resuming-work/SKILL.md +41 -0
  80. package/skills/kata-setting-profiles/SKILL.md +109 -0
  81. package/skills/kata-showing-whats-new/SKILL.md +131 -0
  82. package/skills/kata-starting-milestones/SKILL.md +721 -0
  83. package/{commands/kata/new-milestone.md → skills/kata-starting-new-milestones/SKILL.md} +256 -272
  84. package/{commands/kata/new-project.md → skills/kata-starting-projects/SKILL.md} +138 -29
  85. package/skills/kata-tracking-progress/SKILL.md +365 -0
  86. package/skills/kata-updating/SKILL.md +179 -0
  87. package/skills/kata-updating-kata/SKILL.md +179 -0
  88. package/skills/kata-verifying-work/SKILL.md +217 -0
  89. /package/hooks/{statusline.js → kata-statusline.js} +0 -0
@@ -1,227 +1,20 @@
1
1
  ---
2
- name: kata:insert-phase
2
+ name: insert-phase
3
3
  description: Insert urgent work as decimal phase (e.g., 72.1) between existing phases
4
4
  argument-hint: <after> <description>
5
+ version: 0.1.0
6
+ disable-model-invocation: true
5
7
  allowed-tools:
6
8
  - Read
7
9
  - Write
8
10
  - Bash
9
11
  ---
10
12
 
11
- <objective>
12
- Insert a decimal phase for urgent work discovered mid-milestone that must be completed between existing integer phases.
13
+ ## Step 1: Parse Context
13
14
 
14
- Uses decimal numbering (72.1, 72.2, etc.) to preserve the logical sequence of planned phases while accommodating urgent insertions.
15
+ Arguments: "$ARGUMENTS"
15
16
 
16
- Purpose: Handle urgent work discovered during execution without renumbering entire roadmap.
17
- </objective>
17
+ ## Step 2: Invoke Skill
18
18
 
19
- <execution_context>
20
- @.planning/ROADMAP.md
21
- @.planning/STATE.md
22
- </execution_context>
23
-
24
- <process>
25
-
26
- <step name="parse_arguments">
27
- Parse the command arguments:
28
- - First argument: integer phase number to insert after
29
- - Remaining arguments: phase description
30
-
31
- Example: `/kata:insert-phase 72 Fix critical auth bug`
32
- → after = 72
33
- → description = "Fix critical auth bug"
34
-
35
- Validation:
36
-
37
- ```bash
38
- if [ $# -lt 2 ]; then
39
- echo "ERROR: Both phase number and description required"
40
- echo "Usage: /kata:insert-phase <after> <description>"
41
- echo "Example: /kata:insert-phase 72 Fix critical auth bug"
42
- exit 1
43
- fi
44
- ```
45
-
46
- Parse first argument as integer:
47
-
48
- ```bash
49
- after_phase=$1
50
- shift
51
- description="$*"
52
-
53
- # Validate after_phase is an integer
54
- if ! [[ "$after_phase" =~ ^[0-9]+$ ]]; then
55
- echo "ERROR: Phase number must be an integer"
56
- exit 1
57
- fi
58
- ```
59
-
60
- </step>
61
-
62
- <step name="load_roadmap">
63
- Load the roadmap file:
64
-
65
- ```bash
66
- if [ -f .planning/ROADMAP.md ]; then
67
- ROADMAP=".planning/ROADMAP.md"
68
- else
69
- echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
70
- exit 1
71
- fi
72
- ```
73
-
74
- Read roadmap content for parsing.
75
- </step>
76
-
77
- <step name="verify_target_phase">
78
- Verify that the target phase exists in the roadmap:
79
-
80
- 1. Search for "### Phase {after_phase}:" heading
81
- 2. If not found:
82
-
83
- ```
84
- ERROR: Phase {after_phase} not found in roadmap
85
- Available phases: [list phase numbers]
86
- ```
87
-
88
- Exit.
89
-
90
- 3. Verify phase is in current milestone (not completed/archived)
91
- </step>
92
-
93
- <step name="find_existing_decimals">
94
- Find existing decimal phases after the target phase:
95
-
96
- 1. Search for all "### Phase {after_phase}.N:" headings
97
- 2. Extract decimal suffixes (e.g., for Phase 72: find 72.1, 72.2, 72.3)
98
- 3. Find the highest decimal suffix
99
- 4. Calculate next decimal: max + 1
100
-
101
- Examples:
102
-
103
- - Phase 72 with no decimals → next is 72.1
104
- - Phase 72 with 72.1 → next is 72.2
105
- - Phase 72 with 72.1, 72.2 → next is 72.3
106
-
107
- Store as: `decimal_phase="$(printf "%02d" $after_phase).${next_decimal}"`
108
- </step>
109
-
110
- <step name="generate_slug">
111
- Convert the phase description to a kebab-case slug:
112
-
113
- ```bash
114
- slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
115
- ```
116
-
117
- Phase directory name: `{decimal-phase}-{slug}`
118
- Example: `06.1-fix-critical-auth-bug` (phase 6 insertion)
119
- </step>
120
-
121
- <step name="create_phase_directory">
122
- Create the phase directory structure:
123
-
124
- ```bash
125
- phase_dir=".planning/phases/${decimal_phase}-${slug}"
126
- mkdir -p "$phase_dir"
127
- ```
128
-
129
- Confirm: "Created directory: $phase_dir"
130
- </step>
131
-
132
- <step name="update_roadmap">
133
- Insert the new phase entry into the roadmap:
134
-
135
- 1. Find insertion point: immediately after Phase {after_phase}'s content (before next phase heading or "---")
136
- 2. Insert new phase heading with (INSERTED) marker:
137
-
138
- ```
139
- ### Phase {decimal_phase}: {Description} (INSERTED)
140
-
141
- **Goal:** [Urgent work - to be planned]
142
- **Depends on:** Phase {after_phase}
143
- **Plans:** 0 plans
144
-
145
- Plans:
146
- - [ ] TBD (run /kata:plan-phase {decimal_phase} to break down)
147
-
148
- **Details:**
149
- [To be added during planning]
150
- ```
151
-
152
- 3. Write updated roadmap back to file
153
-
154
- The "(INSERTED)" marker helps identify decimal phases as urgent insertions.
155
-
156
- Preserve all other content exactly (formatting, spacing, other phases).
157
- </step>
158
-
159
- <step name="update_project_state">
160
- Update STATE.md to reflect the inserted phase:
161
-
162
- 1. Read `.planning/STATE.md`
163
- 2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
164
- ```
165
- - Phase {decimal_phase} inserted after Phase {after_phase}: {description} (URGENT)
166
- ```
167
-
168
- If "Roadmap Evolution" section doesn't exist, create it.
169
-
170
- Add note about insertion reason if appropriate.
171
- </step>
172
-
173
- <step name="completion">
174
- Present completion summary:
175
-
176
- ```
177
- Phase {decimal_phase} inserted after Phase {after_phase}:
178
- - Description: {description}
179
- - Directory: .planning/phases/{decimal-phase}-{slug}/
180
- - Status: Not planned yet
181
- - Marker: (INSERTED) - indicates urgent work
182
-
183
- Roadmap updated: {roadmap-path}
184
- Project state updated: .planning/STATE.md
185
-
186
- ---
187
-
188
- ## ▶ Next Up
189
-
190
- **Phase {decimal_phase}: {description}** — urgent insertion
191
-
192
- `/kata:plan-phase {decimal_phase}`
193
-
194
- <sub>`/clear` first → fresh context window</sub>
195
-
196
- ---
197
-
198
- **Also available:**
199
- - Review insertion impact: Check if Phase {next_integer} dependencies still make sense
200
- - Review roadmap
201
-
202
- ---
203
- ```
204
- </step>
205
-
206
- </process>
207
-
208
- <anti_patterns>
209
-
210
- - Don't use this for planned work at end of milestone (use /kata:add-phase)
211
- - Don't insert before Phase 1 (decimal 0.1 makes no sense)
212
- - Don't renumber existing phases
213
- - Don't modify the target phase content
214
- - Don't create plans yet (that's /kata:plan-phase)
215
- - Don't commit changes (user decides when to commit)
216
- </anti_patterns>
217
-
218
- <success_criteria>
219
- Phase insertion is complete when:
220
-
221
- - [ ] Phase directory created: `.planning/phases/{N.M}-{slug}/`
222
- - [ ] Roadmap updated with new phase entry (includes "(INSERTED)" marker)
223
- - [ ] Phase inserted in correct position (after target phase, before next integer phase)
224
- - [ ] STATE.md updated with roadmap evolution note
225
- - [ ] Decimal number calculated correctly (based on existing decimals)
226
- - [ ] User informed of next steps and dependency implications
227
- </success_criteria>
19
+ Run the following skill:
20
+ `Skill("kata-inserting-phases")`
@@ -1,50 +1,20 @@
1
1
  ---
2
- name: kata:list-phase-assumptions
2
+ name: list-phase-assumptions
3
3
  description: Surface Claude's assumptions about a phase approach before planning
4
- argument-hint: "[phase]"
4
+ argument-hint: [phase]
5
+ version: 0.1.0
6
+ disable-model-invocation: true
5
7
  allowed-tools:
6
8
  - Read
9
+ - Write
7
10
  - Bash
8
- - Grep
9
- - Glob
10
11
  ---
11
12
 
12
- <objective>
13
- Analyze a phase and present Claude's assumptions about technical approach, implementation order, scope boundaries, risk areas, and dependencies.
13
+ ## Step 1: Parse Context
14
14
 
15
- Purpose: Help users see what Claude thinks BEFORE planning begins - enabling course correction early when assumptions are wrong.
16
- Output: Conversational output only (no file creation) - ends with "What do you think?" prompt
17
- </objective>
15
+ Arguments: "$ARGUMENTS"
18
16
 
19
- <execution_context>
20
- @~/.claude/kata/workflows/list-phase-assumptions.md
21
- </execution_context>
17
+ ## Step 2: Invoke Skill
22
18
 
23
- <context>
24
- Phase number: $ARGUMENTS (required)
25
-
26
- **Load project state first:**
27
- @.planning/STATE.md
28
-
29
- **Load roadmap:**
30
- @.planning/ROADMAP.md
31
- </context>
32
-
33
- <process>
34
- 1. Validate phase number argument (error if missing or invalid)
35
- 2. Check if phase exists in roadmap
36
- 3. Follow list-phase-assumptions.md workflow:
37
- - Analyze roadmap description
38
- - Surface assumptions about: technical approach, implementation order, scope, risks, dependencies
39
- - Present assumptions clearly
40
- - Prompt "What do you think?"
41
- 4. Gather feedback and offer next steps
42
- </process>
43
-
44
- <success_criteria>
45
-
46
- - Phase validated against roadmap
47
- - Assumptions surfaced across five areas
48
- - User prompted for feedback
49
- - User knows next steps (discuss context, plan phase, or correct assumptions)
50
- </success_criteria>
19
+ Run the following skill:
20
+ `Skill("kata-listing-phase-assumptions")`
@@ -1,71 +1,20 @@
1
1
  ---
2
- name: kata:map-codebase
2
+ name: map-codebase
3
3
  description: Analyze codebase with parallel mapper agents to produce .planning/codebase/ documents
4
- argument-hint: "[optional: specific area to map, e.g., 'api' or 'auth']"
4
+ argument-hint: [optional: specific area to map, e.g., 'api' or 'auth']
5
+ version: 0.1.0
6
+ disable-model-invocation: true
5
7
  allowed-tools:
6
8
  - Read
7
- - Bash
8
- - Glob
9
- - Grep
10
9
  - Write
11
- - Task
10
+ - Bash
12
11
  ---
13
12
 
14
- <objective>
15
- Analyze existing codebase using parallel kata-codebase-mapper agents to produce structured codebase documents.
16
-
17
- Each mapper agent explores a focus area and **writes documents directly** to `.planning/codebase/`. The orchestrator only receives confirmations, keeping context usage minimal.
18
-
19
- Output: .planning/codebase/ folder with 7 structured documents about the codebase state.
20
- </objective>
21
-
22
- <execution_context>
23
- @~/.claude/kata/workflows/map-codebase.md
24
- </execution_context>
25
-
26
- <context>
27
- Focus area: $ARGUMENTS (optional - if provided, tells agents to focus on specific subsystem)
28
-
29
- **Load project state if exists:**
30
- Check for .planning/STATE.md - loads context if project already initialized
31
-
32
- **This command can run:**
33
- - Before /kata:new-project (brownfield codebases) - creates codebase map first
34
- - After /kata:new-project (greenfield codebases) - updates codebase map as code evolves
35
- - Anytime to refresh codebase understanding
36
- </context>
37
-
38
- <when_to_use>
39
- **Use map-codebase for:**
40
- - Brownfield projects before initialization (understand existing code first)
41
- - Refreshing codebase map after significant changes
42
- - Onboarding to an unfamiliar codebase
43
- - Before major refactoring (understand current state)
44
- - When STATE.md references outdated codebase info
13
+ ## Step 1: Parse Context
45
14
 
46
- **Skip map-codebase for:**
47
- - Greenfield projects with no code yet (nothing to map)
48
- - Trivial codebases (<5 files)
49
- </when_to_use>
15
+ Arguments: "$ARGUMENTS"
50
16
 
51
- <process>
52
- 1. Check if .planning/codebase/ already exists (offer to refresh or skip)
53
- 2. Create .planning/codebase/ directory structure
54
- 3. Spawn 4 parallel kata-codebase-mapper agents:
55
- - Agent 1: tech focus → writes STACK.md, INTEGRATIONS.md
56
- - Agent 2: arch focus → writes ARCHITECTURE.md, STRUCTURE.md
57
- - Agent 3: quality focus → writes CONVENTIONS.md, TESTING.md
58
- - Agent 4: concerns focus → writes CONCERNS.md
59
- 4. Wait for agents to complete, collect confirmations (NOT document contents)
60
- 5. Verify all 7 documents exist with line counts
61
- 6. Commit codebase map
62
- 7. Offer next steps (typically: /kata:new-project or /kata:plan-phase)
63
- </process>
17
+ ## Step 2: Invoke Skill
64
18
 
65
- <success_criteria>
66
- - [ ] .planning/codebase/ directory created
67
- - [ ] All 7 codebase documents written by mapper agents
68
- - [ ] Documents follow template structure
69
- - [ ] Parallel agents completed without errors
70
- - [ ] User knows next steps
71
- </success_criteria>
19
+ Run the following skill:
20
+ `Skill("kata-mapping-codebases")`
@@ -1,123 +1,20 @@
1
1
  ---
2
- name: kata:pause-work
2
+ name: pause-work
3
3
  description: Create context handoff when pausing work mid-phase
4
+ argument-hint: <description>
5
+ version: 0.1.0
6
+ disable-model-invocation: true
4
7
  allowed-tools:
5
8
  - Read
6
9
  - Write
7
10
  - Bash
8
11
  ---
9
12
 
10
- <objective>
11
- Create `.continue-here.md` handoff file to preserve complete work state across sessions.
13
+ ## Step 1: Parse Context
12
14
 
13
- Enables seamless resumption in fresh session with full context restoration.
14
- </objective>
15
+ Arguments: "$ARGUMENTS"
15
16
 
16
- <context>
17
- @.planning/STATE.md
18
- </context>
17
+ ## Step 2: Invoke Skill
19
18
 
20
- <process>
21
-
22
- <step name="detect">
23
- Find current phase directory from most recently modified files.
24
- </step>
25
-
26
- <step name="gather">
27
- **Collect complete state for handoff:**
28
-
29
- 1. **Current position**: Which phase, which plan, which task
30
- 2. **Work completed**: What got done this session
31
- 3. **Work remaining**: What's left in current plan/phase
32
- 4. **Decisions made**: Key decisions and rationale
33
- 5. **Blockers/issues**: Anything stuck
34
- 6. **Mental context**: The approach, next steps, "vibe"
35
- 7. **Files modified**: What's changed but not committed
36
-
37
- Ask user for clarifications if needed.
38
- </step>
39
-
40
- <step name="write">
41
- **Write handoff to `.planning/phases/XX-name/.continue-here.md`:**
42
-
43
- ```markdown
44
- ---
45
- phase: XX-name
46
- task: 3
47
- total_tasks: 7
48
- status: in_progress
49
- last_updated: [timestamp]
50
- ---
51
-
52
- <current_state>
53
- [Where exactly are we? Immediate context]
54
- </current_state>
55
-
56
- <completed_work>
57
-
58
- - Task 1: [name] - Done
59
- - Task 2: [name] - Done
60
- - Task 3: [name] - In progress, [what's done]
61
- </completed_work>
62
-
63
- <remaining_work>
64
-
65
- - Task 3: [what's left]
66
- - Task 4: Not started
67
- - Task 5: Not started
68
- </remaining_work>
69
-
70
- <decisions_made>
71
-
72
- - Decided to use [X] because [reason]
73
- - Chose [approach] over [alternative] because [reason]
74
- </decisions_made>
75
-
76
- <blockers>
77
- - [Blocker 1]: [status/workaround]
78
- </blockers>
79
-
80
- <context>
81
- [Mental state, what were you thinking, the plan]
82
- </context>
83
-
84
- <next_action>
85
- Start with: [specific first action when resuming]
86
- </next_action>
87
- ```
88
-
89
- Be specific enough for a fresh Claude to understand immediately.
90
- </step>
91
-
92
- <step name="commit">
93
- ```bash
94
- git add .planning/phases/*/.continue-here.md
95
- git commit -m "wip: [phase-name] paused at task [X]/[Y]"
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: /kata: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>
123
- ```
19
+ Run the following skill:
20
+ `Skill("kata-pausing-work")`