@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.
- package/README.md +55 -28
- package/agents/kata-debugger.md +20 -1
- package/agents/kata-entity-generator.md +237 -0
- package/agents/kata-executor.md +31 -0
- package/agents/kata-phase-researcher.md +13 -4
- package/agents/kata-planner.md +19 -0
- package/agents/kata-project-researcher.md +5 -5
- package/agents/kata-research-synthesizer.md +9 -0
- package/bin/install.js +100 -38
- package/commands/kata/add-phase.md +8 -195
- package/commands/kata/add-todo.md +8 -170
- package/commands/kata/audit-milestone.md +10 -248
- package/commands/kata/check-todo.md +20 -0
- package/commands/kata/complete-milestone.md +8 -124
- package/commands/kata/debug.md +9 -138
- package/commands/kata/discuss-phase.md +13 -73
- package/commands/kata/execute-phase.md +9 -293
- package/commands/kata/help.md +13 -376
- package/commands/kata/insert-phase.md +8 -215
- package/commands/kata/list-phase-assumptions.md +10 -40
- package/commands/kata/map-codebase.md +10 -61
- package/commands/kata/pause-work.md +9 -112
- package/commands/kata/plan-milestone-gaps.md +9 -273
- package/commands/kata/plan-phase.md +9 -464
- package/commands/kata/progress.md +10 -346
- package/commands/kata/quick.md +20 -0
- package/commands/kata/remove-phase.md +8 -326
- package/commands/kata/research-phase.md +10 -170
- package/commands/kata/resume-work.md +10 -30
- package/commands/kata/set-profile.md +20 -0
- package/commands/kata/settings.md +20 -0
- package/commands/kata/start-milestone.md +20 -0
- package/commands/kata/start-new-milestone.md +20 -0
- package/commands/kata/start-project.md +20 -0
- package/commands/kata/update-kata.md +20 -0
- package/commands/kata/update.md +13 -219
- package/commands/kata/verify-work.md +10 -209
- package/commands/kata/whats-new.md +13 -117
- package/kata/references/checkpoints.md +318 -28
- package/kata/references/model-profiles.md +73 -0
- package/kata/references/planning-config.md +94 -0
- package/kata/references/ui-brand.md +2 -2
- package/kata/references/verification-patterns.md +17 -0
- package/kata/templates/codebase/architecture.md +2 -2
- package/kata/templates/codebase/structure.md +4 -4
- package/kata/templates/config.json +9 -0
- package/kata/templates/entity.md +173 -0
- package/kata/templates/phase-prompt.md +18 -27
- package/kata/workflows/complete-milestone.md +11 -0
- package/kata/workflows/diagnose-issues.md +12 -1
- package/kata/workflows/discovery-phase.md +5 -9
- package/kata/workflows/discuss-phase.md +11 -0
- package/kata/workflows/execute-phase.md +68 -9
- package/kata/workflows/execute-plan.md +47 -4
- package/kata/workflows/map-codebase.md +35 -2
- package/kata/workflows/resume-project.md +4 -0
- package/kata/workflows/verify-phase.md +2 -3
- package/kata/workflows/verify-work.md +36 -3
- package/package.json +12 -5
- package/skills/kata-adding-phases/SKILL.md +209 -0
- package/skills/kata-adding-todos/SKILL.md +195 -0
- package/skills/kata-auditing-milestones/SKILL.md +279 -0
- package/{commands/kata/check-todos.md → skills/kata-checking-todos/SKILL.md} +16 -5
- package/skills/kata-completing-milestones/SKILL.md +137 -0
- package/skills/kata-configuring-settings/SKILL.md +139 -0
- package/skills/kata-debugging/SKILL.md +170 -0
- package/skills/kata-discussing-phases/SKILL.md +85 -0
- package/skills/kata-executing-phases/SKILL.md +335 -0
- package/skills/kata-executing-quick-tasks/SKILL.md +306 -0
- package/skills/kata-inserting-phases/SKILL.md +229 -0
- package/skills/kata-listing-phase-assumptions/SKILL.md +51 -0
- package/skills/kata-mapping-codebases/SKILL.md +70 -0
- package/skills/kata-pausing-work/SKILL.md +137 -0
- package/skills/kata-planning-milestone-gaps/SKILL.md +295 -0
- package/skills/kata-planning-phases/SKILL.md +521 -0
- package/skills/kata-providing-help/SKILL.md +495 -0
- package/skills/kata-removing-phases/SKILL.md +350 -0
- package/skills/kata-researching-phases/SKILL.md +202 -0
- package/skills/kata-resuming-work/SKILL.md +41 -0
- package/skills/kata-setting-profiles/SKILL.md +109 -0
- package/skills/kata-showing-whats-new/SKILL.md +131 -0
- package/skills/kata-starting-milestones/SKILL.md +721 -0
- package/{commands/kata/new-milestone.md → skills/kata-starting-new-milestones/SKILL.md} +256 -272
- package/{commands/kata/new-project.md → skills/kata-starting-projects/SKILL.md} +138 -29
- package/skills/kata-tracking-progress/SKILL.md +365 -0
- package/skills/kata-updating/SKILL.md +179 -0
- package/skills/kata-updating-kata/SKILL.md +179 -0
- package/skills/kata-verifying-work/SKILL.md +217 -0
- /package/hooks/{statusline.js → kata-statusline.js} +0 -0
package/bin/install.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import os from 'os';
|
|
6
|
+
import readline from 'readline';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
|
|
9
|
+
// ES module equivalent of __dirname
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
7
12
|
|
|
8
13
|
// Colors
|
|
9
14
|
const cyan = '\x1b[36m';
|
|
@@ -13,19 +18,20 @@ const dim = '\x1b[2m';
|
|
|
13
18
|
const reset = '\x1b[0m';
|
|
14
19
|
|
|
15
20
|
// Get version from package.json
|
|
16
|
-
const pkg =
|
|
21
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
|
|
17
22
|
|
|
18
23
|
const banner = `
|
|
19
|
-
${cyan}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
${cyan} ┌──────────────────────────────────────────────────────────┐
|
|
25
|
+
│ │
|
|
26
|
+
│ ██╗ ██╗ █████╗ ████████╗ █████╗ ╔═══════╗ │
|
|
27
|
+
│ ██║ ██╔╝██╔══██╗╚══██╔══╝██╔══██╗ ║ ═╦═ ║ │
|
|
28
|
+
│ █████╔╝ ███████║ ██║ ███████║ ╠══╬══╦═╣ │
|
|
29
|
+
│ ██╔═██╗ ██╔══██║ ██║ ██╔══██║ ║ ║ ╠═╣ │
|
|
30
|
+
│ ██║ ██╗██║ ██║ ██║ ██║ ██║ ╚══╩══╩═╝ │
|
|
31
|
+
│ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ 型 │
|
|
32
|
+
│ │
|
|
33
|
+
└──────────────────────────────────────────────────────────┘${reset}
|
|
34
|
+
${dim}v${pkg.version} · agent orchestration framework${reset}
|
|
29
35
|
`;
|
|
30
36
|
|
|
31
37
|
// Parse args
|
|
@@ -156,7 +162,13 @@ function copyWithPathReplacement(srcDir, destDir, pathPrefix) {
|
|
|
156
162
|
*/
|
|
157
163
|
function cleanupOrphanedFiles(claudeDir) {
|
|
158
164
|
const orphanedFiles = [
|
|
159
|
-
'hooks/gsd-notify.sh',
|
|
165
|
+
'hooks/gsd-notify.sh', // Removed in v1.6.x
|
|
166
|
+
'hooks/kata-lint.js', // Dev-only, erroneously distributed in v1.7.x
|
|
167
|
+
'hooks/statusline.js', // Renamed to kata-statusline.js
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
const orphanedDirs = [
|
|
171
|
+
// Removed: 'commands/kata' - commands are now part of the distribution
|
|
160
172
|
];
|
|
161
173
|
|
|
162
174
|
for (const relPath of orphanedFiles) {
|
|
@@ -166,6 +178,14 @@ function cleanupOrphanedFiles(claudeDir) {
|
|
|
166
178
|
console.log(` ${green}✓${reset} Removed orphaned ${relPath}`);
|
|
167
179
|
}
|
|
168
180
|
}
|
|
181
|
+
|
|
182
|
+
for (const relPath of orphanedDirs) {
|
|
183
|
+
const fullPath = path.join(claudeDir, relPath);
|
|
184
|
+
if (fs.existsSync(fullPath)) {
|
|
185
|
+
fs.rmSync(fullPath, { recursive: true });
|
|
186
|
+
console.log(` ${green}✓${reset} Removed orphaned ${relPath}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
169
189
|
}
|
|
170
190
|
|
|
171
191
|
/**
|
|
@@ -271,20 +291,6 @@ function install(isGlobal) {
|
|
|
271
291
|
// Clean up orphaned files from previous versions
|
|
272
292
|
cleanupOrphanedFiles(claudeDir);
|
|
273
293
|
|
|
274
|
-
// Create commands directory
|
|
275
|
-
const commandsDir = path.join(claudeDir, 'commands');
|
|
276
|
-
fs.mkdirSync(commandsDir, { recursive: true });
|
|
277
|
-
|
|
278
|
-
// Copy commands/kata with path replacement
|
|
279
|
-
const kataSrc = path.join(src, 'commands', 'kata');
|
|
280
|
-
const kataDest = path.join(commandsDir, 'kata');
|
|
281
|
-
copyWithPathReplacement(kataSrc, kataDest, pathPrefix);
|
|
282
|
-
if (verifyInstalled(kataDest, 'commands/kata')) {
|
|
283
|
-
console.log(` ${green}✓${reset} Installed commands/kata`);
|
|
284
|
-
} else {
|
|
285
|
-
failures.push('commands/kata');
|
|
286
|
-
}
|
|
287
|
-
|
|
288
294
|
// Copy kata skill with path replacement
|
|
289
295
|
const skillSrc = path.join(src, 'kata');
|
|
290
296
|
const skillDest = path.join(claudeDir, 'kata');
|
|
@@ -327,6 +333,38 @@ function install(isGlobal) {
|
|
|
327
333
|
}
|
|
328
334
|
}
|
|
329
335
|
|
|
336
|
+
// Copy skills to ~/.claude/skills (skill directories must be at root level)
|
|
337
|
+
const skillsSrc = path.join(src, 'skills');
|
|
338
|
+
if (fs.existsSync(skillsSrc)) {
|
|
339
|
+
const skillsDest = path.join(claudeDir, 'skills');
|
|
340
|
+
fs.mkdirSync(skillsDest, { recursive: true });
|
|
341
|
+
|
|
342
|
+
// Remove old Kata skills (kata-*) before copying new ones
|
|
343
|
+
if (fs.existsSync(skillsDest)) {
|
|
344
|
+
for (const dir of fs.readdirSync(skillsDest)) {
|
|
345
|
+
const dirPath = path.join(skillsDest, dir);
|
|
346
|
+
if (dir.startsWith('kata-') && fs.statSync(dirPath).isDirectory()) {
|
|
347
|
+
fs.rmSync(dirPath, { recursive: true });
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// Copy each skill directory with path replacement
|
|
353
|
+
const skillEntries = fs.readdirSync(skillsSrc, { withFileTypes: true });
|
|
354
|
+
for (const entry of skillEntries) {
|
|
355
|
+
if (entry.isDirectory()) {
|
|
356
|
+
const skillSrc = path.join(skillsSrc, entry.name);
|
|
357
|
+
const skillDest = path.join(skillsDest, entry.name);
|
|
358
|
+
copyWithPathReplacement(skillSrc, skillDest, pathPrefix);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (verifyInstalled(skillsDest, 'skills')) {
|
|
362
|
+
console.log(` ${green}✓${reset} Installed skills`);
|
|
363
|
+
} else {
|
|
364
|
+
failures.push('skills');
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
330
368
|
// Copy CHANGELOG.md
|
|
331
369
|
const changelogSrc = path.join(src, 'CHANGELOG.md');
|
|
332
370
|
const changelogDest = path.join(claudeDir, 'kata', 'CHANGELOG.md');
|
|
@@ -348,6 +386,30 @@ function install(isGlobal) {
|
|
|
348
386
|
failures.push('VERSION');
|
|
349
387
|
}
|
|
350
388
|
|
|
389
|
+
// Copy commands to ~/.claude/commands (slash commands for explicit invocation)
|
|
390
|
+
const commandsSrc = path.join(src, 'commands');
|
|
391
|
+
if (fs.existsSync(commandsSrc)) {
|
|
392
|
+
const commandsDest = path.join(claudeDir, 'commands');
|
|
393
|
+
|
|
394
|
+
// Remove old kata commands before copying new ones
|
|
395
|
+
const kataCommandsDest = path.join(commandsDest, 'kata');
|
|
396
|
+
if (fs.existsSync(kataCommandsDest)) {
|
|
397
|
+
fs.rmSync(kataCommandsDest, { recursive: true });
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// Copy commands/kata directory with path replacement
|
|
401
|
+
const kataCommandsSrc = path.join(commandsSrc, 'kata');
|
|
402
|
+
if (fs.existsSync(kataCommandsSrc)) {
|
|
403
|
+
copyWithPathReplacement(kataCommandsSrc, kataCommandsDest, pathPrefix);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (verifyInstalled(kataCommandsDest, 'commands')) {
|
|
407
|
+
console.log(` ${green}✓${reset} Installed commands`);
|
|
408
|
+
} else {
|
|
409
|
+
failures.push('commands');
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
351
413
|
// Copy hooks
|
|
352
414
|
const hooksSrc = path.join(src, 'hooks');
|
|
353
415
|
if (fs.existsSync(hooksSrc)) {
|
|
@@ -377,8 +439,8 @@ function install(isGlobal) {
|
|
|
377
439
|
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
378
440
|
const settings = cleanupOrphanedHooks(readSettings(settingsPath));
|
|
379
441
|
const statuslineCommand = isGlobal
|
|
380
|
-
? 'node "$HOME/.claude/hooks/statusline.js"'
|
|
381
|
-
: 'node .claude/hooks/statusline.js';
|
|
442
|
+
? 'node "$HOME/.claude/hooks/kata-statusline.js"'
|
|
443
|
+
: 'node .claude/hooks/kata-statusline.js';
|
|
382
444
|
const updateCheckCommand = isGlobal
|
|
383
445
|
? 'node "$HOME/.claude/hooks/kata-check-update.js"'
|
|
384
446
|
: 'node .claude/hooks/kata-check-update.js';
|
|
@@ -414,7 +476,7 @@ function install(isGlobal) {
|
|
|
414
476
|
/**
|
|
415
477
|
* Apply statusline config, then print completion message
|
|
416
478
|
*/
|
|
417
|
-
function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline) {
|
|
479
|
+
function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, isGlobal) {
|
|
418
480
|
if (shouldInstallStatusline) {
|
|
419
481
|
settings.statusLine = {
|
|
420
482
|
type: 'command',
|
|
@@ -497,7 +559,7 @@ function promptLocation() {
|
|
|
497
559
|
console.log(` ${yellow}Non-interactive terminal detected, defaulting to global install${reset}\n`);
|
|
498
560
|
const { settingsPath, settings, statuslineCommand } = install(true);
|
|
499
561
|
handleStatusline(settings, false, (shouldInstallStatusline) => {
|
|
500
|
-
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline);
|
|
562
|
+
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, true);
|
|
501
563
|
});
|
|
502
564
|
return;
|
|
503
565
|
}
|
|
@@ -517,7 +579,7 @@ function promptLocation() {
|
|
|
517
579
|
console.log(`\n ${yellow}Input stream closed, defaulting to global install${reset}\n`);
|
|
518
580
|
const { settingsPath, settings, statuslineCommand } = install(true);
|
|
519
581
|
handleStatusline(settings, false, (shouldInstallStatusline) => {
|
|
520
|
-
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline);
|
|
582
|
+
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, true);
|
|
521
583
|
});
|
|
522
584
|
}
|
|
523
585
|
});
|
|
@@ -540,7 +602,7 @@ function promptLocation() {
|
|
|
540
602
|
const { settingsPath, settings, statuslineCommand } = install(isGlobal);
|
|
541
603
|
// Interactive mode - prompt for optional features
|
|
542
604
|
handleStatusline(settings, true, (shouldInstallStatusline) => {
|
|
543
|
-
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline);
|
|
605
|
+
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, isGlobal);
|
|
544
606
|
});
|
|
545
607
|
});
|
|
546
608
|
}
|
|
@@ -556,13 +618,13 @@ if (hasGlobal && hasLocal) {
|
|
|
556
618
|
const { settingsPath, settings, statuslineCommand } = install(true);
|
|
557
619
|
// Non-interactive - respect flags
|
|
558
620
|
handleStatusline(settings, false, (shouldInstallStatusline) => {
|
|
559
|
-
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline);
|
|
621
|
+
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, true);
|
|
560
622
|
});
|
|
561
623
|
} else if (hasLocal) {
|
|
562
624
|
const { settingsPath, settings, statuslineCommand } = install(false);
|
|
563
625
|
// Non-interactive - respect flags
|
|
564
626
|
handleStatusline(settings, false, (shouldInstallStatusline) => {
|
|
565
|
-
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline);
|
|
627
|
+
finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, false);
|
|
566
628
|
});
|
|
567
629
|
} else {
|
|
568
630
|
promptLocation();
|
|
@@ -1,207 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: add-phase
|
|
3
3
|
description: Add phase to end of current milestone in roadmap
|
|
4
|
+
version: 0.1.0
|
|
4
5
|
argument-hint: <description>
|
|
6
|
+
disable-model-invocation: true
|
|
5
7
|
allowed-tools:
|
|
6
8
|
- Read
|
|
7
9
|
- Write
|
|
8
10
|
- Bash
|
|
9
11
|
---
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
Add a new integer phase to the end of the current milestone in the roadmap.
|
|
13
|
+
## Step 1: Parse Context
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
Phase Description: "$ARGUMENTS"
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
</objective>
|
|
17
|
+
## Step 2: Invoke Skill
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@.planning/STATE.md
|
|
22
|
-
</execution_context>
|
|
23
|
-
|
|
24
|
-
<process>
|
|
25
|
-
|
|
26
|
-
<step name="parse_arguments">
|
|
27
|
-
Parse the command arguments:
|
|
28
|
-
- All arguments become the phase description
|
|
29
|
-
- Example: `/kata:add-phase Add authentication` → description = "Add authentication"
|
|
30
|
-
- Example: `/kata:add-phase Fix critical performance issues` → description = "Fix critical performance issues"
|
|
31
|
-
|
|
32
|
-
If no arguments provided:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
ERROR: Phase description required
|
|
36
|
-
Usage: /kata:add-phase <description>
|
|
37
|
-
Example: /kata:add-phase Add authentication system
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Exit.
|
|
41
|
-
</step>
|
|
42
|
-
|
|
43
|
-
<step name="load_roadmap">
|
|
44
|
-
Load the roadmap file:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
if [ -f .planning/ROADMAP.md ]; then
|
|
48
|
-
ROADMAP=".planning/ROADMAP.md"
|
|
49
|
-
else
|
|
50
|
-
echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
|
|
51
|
-
exit 1
|
|
52
|
-
fi
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Read roadmap content for parsing.
|
|
56
|
-
</step>
|
|
57
|
-
|
|
58
|
-
<step name="find_current_milestone">
|
|
59
|
-
Parse the roadmap to find the current milestone section:
|
|
60
|
-
|
|
61
|
-
1. Locate the "## Current Milestone:" heading
|
|
62
|
-
2. Extract milestone name and version
|
|
63
|
-
3. Identify all phases under this milestone (before next "---" separator or next milestone heading)
|
|
64
|
-
4. Parse existing phase numbers (including decimals if present)
|
|
65
|
-
|
|
66
|
-
Example structure:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
## Current Milestone: v1.0 Foundation
|
|
70
|
-
|
|
71
|
-
### Phase 4: Focused Command System
|
|
72
|
-
### Phase 5: Path Routing & Validation
|
|
73
|
-
### Phase 6: Documentation & Distribution
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
</step>
|
|
77
|
-
|
|
78
|
-
<step name="calculate_next_phase">
|
|
79
|
-
Find the highest integer phase number in the current milestone:
|
|
80
|
-
|
|
81
|
-
1. Extract all phase numbers from phase headings (### Phase N:)
|
|
82
|
-
2. Filter to integer phases only (ignore decimals like 4.1, 4.2)
|
|
83
|
-
3. Find the maximum integer value
|
|
84
|
-
4. Add 1 to get the next phase number
|
|
85
|
-
|
|
86
|
-
Example: If phases are 4, 5, 5.1, 6 → next is 7
|
|
87
|
-
|
|
88
|
-
Format as two-digit: `printf "%02d" $next_phase`
|
|
89
|
-
</step>
|
|
90
|
-
|
|
91
|
-
<step name="generate_slug">
|
|
92
|
-
Convert the phase description to a kebab-case slug:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
# Example transformation:
|
|
96
|
-
# "Add authentication" → "add-authentication"
|
|
97
|
-
# "Fix critical performance issues" → "fix-critical-performance-issues"
|
|
98
|
-
|
|
99
|
-
slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Phase directory name: `{two-digit-phase}-{slug}`
|
|
103
|
-
Example: `07-add-authentication`
|
|
104
|
-
</step>
|
|
105
|
-
|
|
106
|
-
<step name="create_phase_directory">
|
|
107
|
-
Create the phase directory structure:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
phase_dir=".planning/phases/${phase_num}-${slug}"
|
|
111
|
-
mkdir -p "$phase_dir"
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Confirm: "Created directory: $phase_dir"
|
|
115
|
-
</step>
|
|
116
|
-
|
|
117
|
-
<step name="update_roadmap">
|
|
118
|
-
Add the new phase entry to the roadmap:
|
|
119
|
-
|
|
120
|
-
1. Find the insertion point (after last phase in current milestone, before "---" separator)
|
|
121
|
-
2. Insert new phase heading:
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
### Phase {N}: {Description}
|
|
125
|
-
|
|
126
|
-
**Goal:** [To be planned]
|
|
127
|
-
**Depends on:** Phase {N-1}
|
|
128
|
-
**Plans:** 0 plans
|
|
129
|
-
|
|
130
|
-
Plans:
|
|
131
|
-
- [ ] TBD (run /kata:plan-phase {N} to break down)
|
|
132
|
-
|
|
133
|
-
**Details:**
|
|
134
|
-
[To be added during planning]
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
3. Write updated roadmap back to file
|
|
138
|
-
|
|
139
|
-
Preserve all other content exactly (formatting, spacing, other phases).
|
|
140
|
-
</step>
|
|
141
|
-
|
|
142
|
-
<step name="update_project_state">
|
|
143
|
-
Update STATE.md to reflect the new phase:
|
|
144
|
-
|
|
145
|
-
1. Read `.planning/STATE.md`
|
|
146
|
-
2. Under "## Current Position" → "**Next Phase:**" add reference to new phase
|
|
147
|
-
3. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
|
|
148
|
-
```
|
|
149
|
-
- Phase {N} added: {description}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
If "Roadmap Evolution" section doesn't exist, create it.
|
|
153
|
-
</step>
|
|
154
|
-
|
|
155
|
-
<step name="completion">
|
|
156
|
-
Present completion summary:
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
Phase {N} added to current milestone:
|
|
160
|
-
- Description: {description}
|
|
161
|
-
- Directory: .planning/phases/{phase-num}-{slug}/
|
|
162
|
-
- Status: Not planned yet
|
|
163
|
-
|
|
164
|
-
Roadmap updated: {roadmap-path}
|
|
165
|
-
Project state updated: .planning/STATE.md
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## ▶ Next Up
|
|
170
|
-
|
|
171
|
-
**Phase {N}: {description}**
|
|
172
|
-
|
|
173
|
-
`/kata:plan-phase {N}`
|
|
174
|
-
|
|
175
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
**Also available:**
|
|
180
|
-
- `/kata:add-phase <description>` — add another phase
|
|
181
|
-
- Review roadmap
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
```
|
|
185
|
-
</step>
|
|
186
|
-
|
|
187
|
-
</process>
|
|
188
|
-
|
|
189
|
-
<anti_patterns>
|
|
190
|
-
|
|
191
|
-
- Don't modify phases outside current milestone
|
|
192
|
-
- Don't renumber existing phases
|
|
193
|
-
- Don't use decimal numbering (that's /kata:insert-phase)
|
|
194
|
-
- Don't create plans yet (that's /kata:plan-phase)
|
|
195
|
-
- Don't commit changes (user decides when to commit)
|
|
196
|
-
</anti_patterns>
|
|
197
|
-
|
|
198
|
-
<success_criteria>
|
|
199
|
-
Phase addition is complete when:
|
|
200
|
-
|
|
201
|
-
- [ ] Phase directory created: `.planning/phases/{NN}-{slug}/`
|
|
202
|
-
- [ ] Roadmap updated with new phase entry
|
|
203
|
-
- [ ] STATE.md updated with roadmap evolution note
|
|
204
|
-
- [ ] New phase appears at end of current milestone
|
|
205
|
-
- [ ] Next phase number calculated correctly (ignoring decimals)
|
|
206
|
-
- [ ] User informed of next steps
|
|
207
|
-
</success_criteria>
|
|
19
|
+
Run the following skill to add the phase:
|
|
20
|
+
`Skill("kata-adding-phases")`
|
|
@@ -1,182 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: add-todo
|
|
3
3
|
description: Capture idea or task as todo from current conversation context
|
|
4
4
|
argument-hint: [optional 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
|
-
- Glob
|
|
10
11
|
---
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
Capture an idea, task, or issue that surfaces during a Kata session as a structured todo for later work.
|
|
13
|
+
## Step 1: Parse Context
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
</objective>
|
|
15
|
+
Arguments: "$ARGUMENTS"
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
@.planning/STATE.md
|
|
20
|
-
</context>
|
|
17
|
+
## Step 2: Invoke Skill
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<step name="ensure_directory">
|
|
25
|
-
```bash
|
|
26
|
-
mkdir -p .planning/todos/pending .planning/todos/done
|
|
27
|
-
```
|
|
28
|
-
</step>
|
|
29
|
-
|
|
30
|
-
<step name="check_existing_areas">
|
|
31
|
-
```bash
|
|
32
|
-
ls .planning/todos/pending/*.md 2>/dev/null | xargs -I {} grep "^area:" {} 2>/dev/null | cut -d' ' -f2 | sort -u
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Note existing areas for consistency in infer_area step.
|
|
36
|
-
</step>
|
|
37
|
-
|
|
38
|
-
<step name="extract_content">
|
|
39
|
-
**With arguments:** Use as the title/focus.
|
|
40
|
-
- `/kata:add-todo Add auth token refresh` → title = "Add auth token refresh"
|
|
41
|
-
|
|
42
|
-
**Without arguments:** Analyze recent conversation to extract:
|
|
43
|
-
- The specific problem, idea, or task discussed
|
|
44
|
-
- Relevant file paths mentioned
|
|
45
|
-
- Technical details (error messages, line numbers, constraints)
|
|
46
|
-
|
|
47
|
-
Formulate:
|
|
48
|
-
- `title`: 3-10 word descriptive title (action verb preferred)
|
|
49
|
-
- `problem`: What's wrong or why this is needed
|
|
50
|
-
- `solution`: Approach hints or "TBD" if just an idea
|
|
51
|
-
- `files`: Relevant paths with line numbers from conversation
|
|
52
|
-
</step>
|
|
53
|
-
|
|
54
|
-
<step name="infer_area">
|
|
55
|
-
Infer area from file paths:
|
|
56
|
-
|
|
57
|
-
| Path pattern | Area |
|
|
58
|
-
|--------------|------|
|
|
59
|
-
| `src/api/*`, `api/*` | `api` |
|
|
60
|
-
| `src/components/*`, `src/ui/*` | `ui` |
|
|
61
|
-
| `src/auth/*`, `auth/*` | `auth` |
|
|
62
|
-
| `src/db/*`, `database/*` | `database` |
|
|
63
|
-
| `tests/*`, `__tests__/*` | `testing` |
|
|
64
|
-
| `docs/*` | `docs` |
|
|
65
|
-
| `.planning/*` | `planning` |
|
|
66
|
-
| `scripts/*`, `bin/*` | `tooling` |
|
|
67
|
-
| No files or unclear | `general` |
|
|
68
|
-
|
|
69
|
-
Use existing area from step 2 if similar match exists.
|
|
70
|
-
</step>
|
|
71
|
-
|
|
72
|
-
<step name="check_duplicates">
|
|
73
|
-
```bash
|
|
74
|
-
grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
If potential duplicate found:
|
|
78
|
-
1. Read the existing todo
|
|
79
|
-
2. Compare scope
|
|
80
|
-
|
|
81
|
-
If overlapping, use AskUserQuestion:
|
|
82
|
-
- header: "Duplicate?"
|
|
83
|
-
- question: "Similar todo exists: [title]. What would you like to do?"
|
|
84
|
-
- options:
|
|
85
|
-
- "Skip" — keep existing todo
|
|
86
|
-
- "Replace" — update existing with new context
|
|
87
|
-
- "Add anyway" — create as separate todo
|
|
88
|
-
</step>
|
|
89
|
-
|
|
90
|
-
<step name="create_file">
|
|
91
|
-
```bash
|
|
92
|
-
timestamp=$(date "+%Y-%m-%dT%H:%M")
|
|
93
|
-
date_prefix=$(date "+%Y-%m-%d")
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Generate slug from title (lowercase, hyphens, no special chars).
|
|
97
|
-
|
|
98
|
-
Write to `.planning/todos/pending/${date_prefix}-${slug}.md`:
|
|
99
|
-
|
|
100
|
-
```markdown
|
|
101
|
-
---
|
|
102
|
-
created: [timestamp]
|
|
103
|
-
title: [title]
|
|
104
|
-
area: [area]
|
|
105
|
-
files:
|
|
106
|
-
- [file:lines]
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Problem
|
|
110
|
-
|
|
111
|
-
[problem description - enough context for future Claude to understand weeks later]
|
|
112
|
-
|
|
113
|
-
## Solution
|
|
114
|
-
|
|
115
|
-
[approach hints or "TBD"]
|
|
116
|
-
```
|
|
117
|
-
</step>
|
|
118
|
-
|
|
119
|
-
<step name="update_state">
|
|
120
|
-
If `.planning/STATE.md` exists:
|
|
121
|
-
|
|
122
|
-
1. Count todos: `ls .planning/todos/pending/*.md 2>/dev/null | wc -l`
|
|
123
|
-
2. Update "### Pending Todos" under "## Accumulated Context"
|
|
124
|
-
</step>
|
|
125
|
-
|
|
126
|
-
<step name="git_commit">
|
|
127
|
-
Commit the todo and any updated state:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
git add .planning/todos/pending/[filename]
|
|
131
|
-
[ -f .planning/STATE.md ] && git add .planning/STATE.md
|
|
132
|
-
git commit -m "$(cat <<'EOF'
|
|
133
|
-
docs: capture todo - [title]
|
|
134
|
-
|
|
135
|
-
Area: [area]
|
|
136
|
-
EOF
|
|
137
|
-
)"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Confirm: "Committed: docs: capture todo - [title]"
|
|
141
|
-
</step>
|
|
142
|
-
|
|
143
|
-
<step name="confirm">
|
|
144
|
-
```
|
|
145
|
-
Todo saved: .planning/todos/pending/[filename]
|
|
146
|
-
|
|
147
|
-
[title]
|
|
148
|
-
Area: [area]
|
|
149
|
-
Files: [count] referenced
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
Would you like to:
|
|
154
|
-
|
|
155
|
-
1. Continue with current work
|
|
156
|
-
2. Add another todo
|
|
157
|
-
3. View all todos (/kata:check-todos)
|
|
158
|
-
```
|
|
159
|
-
</step>
|
|
160
|
-
|
|
161
|
-
</process>
|
|
162
|
-
|
|
163
|
-
<output>
|
|
164
|
-
- `.planning/todos/pending/[date]-[slug].md`
|
|
165
|
-
- Updated `.planning/STATE.md` (if exists)
|
|
166
|
-
</output>
|
|
167
|
-
|
|
168
|
-
<anti_patterns>
|
|
169
|
-
- Don't create todos for work in current plan (that's deviation rule territory)
|
|
170
|
-
- Don't create elaborate solution sections — captures ideas, not plans
|
|
171
|
-
- Don't block on missing information — "TBD" is fine
|
|
172
|
-
</anti_patterns>
|
|
173
|
-
|
|
174
|
-
<success_criteria>
|
|
175
|
-
- [ ] Directory structure exists
|
|
176
|
-
- [ ] Todo file created with valid frontmatter
|
|
177
|
-
- [ ] Problem section has enough context for future Claude
|
|
178
|
-
- [ ] No duplicates (checked and resolved)
|
|
179
|
-
- [ ] Area consistent with existing todos
|
|
180
|
-
- [ ] STATE.md updated if exists
|
|
181
|
-
- [ ] Todo and state committed to git
|
|
182
|
-
</success_criteria>
|
|
19
|
+
Run the following skill:
|
|
20
|
+
`Skill("kata-adding-todos")`
|