@kata-sh/cli 0.1.1 → 0.1.2
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/package.json +1 -1
- package/src/resources/AGENTS.md +1 -1
- package/src/resources/extensions/kata/docs/preferences-reference.md +1 -1
- package/src/resources/extensions/kata/gitignore.ts +1 -1
- package/src/resources/extensions/kata/preferences.ts +1 -1
- package/src/resources/extensions/kata/prompts/complete-milestone.md +1 -1
- package/src/resources/extensions/kata/prompts/complete-slice.md +2 -2
- package/src/resources/extensions/kata/prompts/discuss.md +7 -7
- package/src/resources/extensions/kata/prompts/execute-task.md +2 -2
- package/src/resources/extensions/kata/prompts/guided-complete-slice.md +1 -1
- package/src/resources/extensions/kata/prompts/guided-discuss-milestone.md +1 -1
- package/src/resources/extensions/kata/prompts/guided-discuss-slice.md +1 -1
- package/src/resources/extensions/kata/prompts/guided-execute-task.md +1 -1
- package/src/resources/extensions/kata/prompts/guided-plan-milestone.md +1 -1
- package/src/resources/extensions/kata/prompts/guided-plan-slice.md +1 -1
- package/src/resources/extensions/kata/prompts/guided-research-slice.md +1 -1
- package/src/resources/extensions/kata/prompts/plan-milestone.md +2 -2
- package/src/resources/extensions/kata/prompts/plan-slice.md +2 -2
- package/src/resources/extensions/kata/prompts/queue.md +1 -1
- package/src/resources/extensions/kata/prompts/research-milestone.md +1 -1
- package/src/resources/extensions/kata/prompts/research-slice.md +1 -1
- package/src/resources/extensions/kata/prompts/system.md +4 -4
- package/src/resources/extensions/kata/templates/preferences.md +1 -1
- package/src/resources/extensions/kata/tests/complete-milestone.test.ts +1 -1
- package/src/resources/extensions/kata/tests/reassess-prompt.test.ts +1 -1
- package/src/resources/extensions/slash-commands/create-extension.ts +20 -20
- package/src/resources/extensions/slash-commands/create-slash-command.ts +2 -2
- package/src/resources/extensions/subagent/index.ts +2 -2
package/package.json
CHANGED
package/src/resources/AGENTS.md
CHANGED
|
@@ -9,7 +9,7 @@ Kata CLI is a thin wrapper around pi-coding-agent that provides:
|
|
|
9
9
|
- **Branded entry point**: `src/loader.ts` sets env vars and launches `src/cli.ts`
|
|
10
10
|
- **Bundled extensions**: `src/resources/extensions/` contains all built-in extensions
|
|
11
11
|
- **Resource syncing**: `src/resource-loader.ts` copies bundled extensions to `~/.kata-cli/agent/` on startup
|
|
12
|
-
- **Config directory**: `~/.kata-cli/` (not `~/.kata/` to avoid collision with other Kata apps)
|
|
12
|
+
- **Config directory**: `~/.kata-cli/` (not `~/.kata-cli/` to avoid collision with other Kata apps)
|
|
13
13
|
- **Package shim**: `pkg/package.json` provides `piConfig` with `name: "kata"` and `configDir: ".kata-cli"`
|
|
14
14
|
|
|
15
15
|
## Directory Structure
|
|
@@ -132,7 +132,7 @@ auto_supervisor: {}
|
|
|
132
132
|
|
|
133
133
|
Project-specific guidance for skill selection and execution preferences.
|
|
134
134
|
|
|
135
|
-
See \`~/.kata/agent/extensions/kata/docs/preferences-reference.md\` for full field documentation and examples.
|
|
135
|
+
See \`~/.kata-cli/agent/extensions/kata/docs/preferences-reference.md\` for full field documentation and examples.
|
|
136
136
|
|
|
137
137
|
## Fields
|
|
138
138
|
|
|
@@ -122,7 +122,7 @@ export interface SkillResolutionReport {
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Known skill directories, in priority order.
|
|
125
|
-
* User skills (~/.kata/agent/skills/) take precedence over project skills.
|
|
125
|
+
* User skills (~/.kata-cli/agent/skills/) take precedence over project skills.
|
|
126
126
|
*/
|
|
127
127
|
function getSkillSearchDirs(
|
|
128
128
|
cwd: string,
|
|
@@ -7,7 +7,7 @@ All relevant context has been preloaded below — the roadmap, all slice summari
|
|
|
7
7
|
{{inlinedContext}}
|
|
8
8
|
|
|
9
9
|
Then:
|
|
10
|
-
1. Read the milestone-summary template at `~/.kata/agent/extensions/kata/templates/milestone-summary.md`
|
|
10
|
+
1. Read the milestone-summary template at `~/.kata-cli/agent/extensions/kata/templates/milestone-summary.md`
|
|
11
11
|
2. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during completion, without relaxing required verification or artifact rules
|
|
12
12
|
3. Verify each **success criterion** from the milestone definition in `{{roadmapPath}}`. For each criterion, confirm it was met with specific evidence from slice summaries, test results, or observable behavior. List any criterion that was NOT met.
|
|
13
13
|
4. Verify the milestone's **definition of done** — all slices are `[x]`, all slice summaries exist, and any cross-slice integration points work correctly.
|
|
@@ -8,8 +8,8 @@ All relevant context has been preloaded below — the slice plan, all task summa
|
|
|
8
8
|
|
|
9
9
|
Then:
|
|
10
10
|
1. Read the templates:
|
|
11
|
-
- `~/.kata/agent/extensions/kata/templates/slice-summary.md`
|
|
12
|
-
- `~/.kata/agent/extensions/kata/templates/uat.md`
|
|
11
|
+
- `~/.kata-cli/agent/extensions/kata/templates/slice-summary.md`
|
|
12
|
+
- `~/.kata-cli/agent/extensions/kata/templates/uat.md`
|
|
13
13
|
2. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during completion, without relaxing required verification or artifact rules
|
|
14
14
|
3. Run all slice-level verification checks defined in the slice plan. All must pass before marking the slice done. If any fail, fix them first.
|
|
15
15
|
4. Confirm the slice's observability/diagnostic surfaces are real and useful where relevant: status inspection works, failure state is externally visible, structured errors/logs are actionable, and hidden failures are not being mistaken for success.
|
|
@@ -126,11 +126,11 @@ Directories use bare IDs. Files use ID-SUFFIX format. Titles live inside file co
|
|
|
126
126
|
|
|
127
127
|
Once the user is satisfied, in a single pass:
|
|
128
128
|
1. `mkdir -p .kata/milestones/{{milestoneId}}/slices`
|
|
129
|
-
2. Write or update `.kata/PROJECT.md` — read the template at `~/.kata/agent/extensions/kata/templates/project.md` first. Describe what the project is, its current state, and list the milestone sequence.
|
|
130
|
-
3. Write or update `.kata/REQUIREMENTS.md` — read the template at `~/.kata/agent/extensions/kata/templates/requirements.md` first. Confirm requirement states, ownership, and traceability before roadmap creation.
|
|
131
|
-
4. Write `{{contextAbsPath}}` — read the template at `~/.kata/agent/extensions/kata/templates/context.md` first. Preserve key risks, unknowns, existing codebase constraints, integration points, and relevant requirements surfaced during discussion.
|
|
132
|
-
5. Write `{{roadmapAbsPath}}` — read the template at `~/.kata/agent/extensions/kata/templates/roadmap.md` first. Decompose into demoable vertical slices with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, requirement coverage, and a boundary map. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment.
|
|
133
|
-
6. Seed `.kata/DECISIONS.md` — read the template at `~/.kata/agent/extensions/kata/templates/decisions.md` first. Append rows for any architectural or pattern decisions made during discussion.
|
|
129
|
+
2. Write or update `.kata/PROJECT.md` — read the template at `~/.kata-cli/agent/extensions/kata/templates/project.md` first. Describe what the project is, its current state, and list the milestone sequence.
|
|
130
|
+
3. Write or update `.kata/REQUIREMENTS.md` — read the template at `~/.kata-cli/agent/extensions/kata/templates/requirements.md` first. Confirm requirement states, ownership, and traceability before roadmap creation.
|
|
131
|
+
4. Write `{{contextAbsPath}}` — read the template at `~/.kata-cli/agent/extensions/kata/templates/context.md` first. Preserve key risks, unknowns, existing codebase constraints, integration points, and relevant requirements surfaced during discussion.
|
|
132
|
+
5. Write `{{roadmapAbsPath}}` — read the template at `~/.kata-cli/agent/extensions/kata/templates/roadmap.md` first. Decompose into demoable vertical slices with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, requirement coverage, and a boundary map. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment.
|
|
133
|
+
6. Seed `.kata/DECISIONS.md` — read the template at `~/.kata-cli/agent/extensions/kata/templates/decisions.md` first. Append rows for any architectural or pattern decisions made during discussion.
|
|
134
134
|
7. Update `.kata/STATE.md`
|
|
135
135
|
8. Commit: `docs({{milestoneId}}): context, requirements, and roadmap`
|
|
136
136
|
|
|
@@ -140,8 +140,8 @@ After writing the files and committing, say exactly: "Milestone {{milestoneId}}
|
|
|
140
140
|
|
|
141
141
|
Once the user confirms the milestone split, in a single pass:
|
|
142
142
|
1. `mkdir -p .kata/milestones/{{milestoneId}}/slices` for each milestone
|
|
143
|
-
2. Write `.kata/PROJECT.md` — read the template at `~/.kata/agent/extensions/kata/templates/project.md` first.
|
|
144
|
-
3. Write `.kata/REQUIREMENTS.md` — read the template at `~/.kata/agent/extensions/kata/templates/requirements.md` first. Capture Active, Deferred, Out of Scope, and any already Validated requirements. Later milestones may have provisional ownership where slice plans do not exist yet.
|
|
143
|
+
2. Write `.kata/PROJECT.md` — read the template at `~/.kata-cli/agent/extensions/kata/templates/project.md` first.
|
|
144
|
+
3. Write `.kata/REQUIREMENTS.md` — read the template at `~/.kata-cli/agent/extensions/kata/templates/requirements.md` first. Capture Active, Deferred, Out of Scope, and any already Validated requirements. Later milestones may have provisional ownership where slice plans do not exist yet.
|
|
145
145
|
4. Write a `CONTEXT.md` for **every** milestone — capture the intent, scope, risks, constraints, user-visible outcome, completion class, final integrated acceptance, and relevant requirements for each. Each future milestone's CONTEXT.md should be rich enough that a planning agent encountering it fresh — with no memory of this conversation — can understand the intent, constraints, dependencies, what this milestone unlocks, and what "done" looks like.
|
|
146
146
|
5. Write a `ROADMAP.md` for **only the first milestone** — detail-planning later milestones now is waste because the codebase will change. Include requirement coverage and a milestone definition of done.
|
|
147
147
|
6. Seed `.kata/DECISIONS.md`.
|
|
@@ -50,8 +50,8 @@ Then:
|
|
|
50
50
|
- Know when to stop. If you've tried 3+ fixes without progress, your mental model is probably wrong. Stop. List what you know for certain. List what you've ruled out. Form fresh hypotheses from there.
|
|
51
51
|
- Don't fix symptoms. Understand *why* something fails before changing code. A test that passes after a change you don't understand is luck, not a fix.
|
|
52
52
|
11. **Blocker discovery:** If execution reveals that the remaining slice plan is fundamentally invalid — not just a bug or minor deviation, but a plan-invalidating finding like a wrong API, missing capability, or architectural mismatch — set `blocker_discovered: true` in the task summary frontmatter and describe the blocker clearly in the summary narrative. Do NOT set `blocker_discovered: true` for ordinary debugging, minor deviations, or issues that can be fixed within the current task or the remaining plan. This flag triggers an automatic replan of the slice.
|
|
53
|
-
12. If you made an architectural, pattern, library, or observability decision during this task that downstream work should know about, append it to `.kata/DECISIONS.md` (read the template at `~/.kata/agent/extensions/kata/templates/decisions.md` if the file doesn't exist yet). Not every task produces decisions — only append when a meaningful choice was made.
|
|
54
|
-
13. Read the template at `~/.kata/agent/extensions/kata/templates/task-summary.md`
|
|
53
|
+
12. If you made an architectural, pattern, library, or observability decision during this task that downstream work should know about, append it to `.kata/DECISIONS.md` (read the template at `~/.kata-cli/agent/extensions/kata/templates/decisions.md` if the file doesn't exist yet). Not every task produces decisions — only append when a meaningful choice was made.
|
|
54
|
+
13. Read the template at `~/.kata-cli/agent/extensions/kata/templates/task-summary.md`
|
|
55
55
|
14. Write `{{taskSummaryAbsPath}}`
|
|
56
56
|
15. Mark {{taskId}} done in `{{planPath}}` (change `[ ]` to `[x]`)
|
|
57
57
|
16. Commit your work: `git add -A && git commit -m 'feat({{sliceId}}/{{taskId}}): <what was built>'`. If `git add` silently fails to stage files (a known git worktree stat-cache bug), use this workaround per file: `git update-index --cacheinfo 100644,$(git hash-object -w <file>),<file>` then commit. If that also fails, move on — the system will auto-commit remaining changes after your session ends.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Complete slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. All tasks are done. Read the templates at `~/.kata/agent/extensions/kata/templates/slice-summary.md` and `uat.md`. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during completion, without relaxing required verification or artifact rules. Write `{{sliceId}}-SUMMARY.md` (compress task summaries), write `{{sliceId}}-UAT.md`, and fill the `UAT Type` plus `Not Proven By This UAT` sections explicitly so the artifact states what class of acceptance it covers and what still remains unproven. Review task summaries for `key_decisions` and ensure any significant ones are in `.kata/DECISIONS.md`. Mark the slice checkbox done in the roadmap, update STATE.md, update milestone summary, and leave the slice branch clean for the extension to squash-merge back to main automatically.
|
|
1
|
+
Complete slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. All tasks are done. Read the templates at `~/.kata-cli/agent/extensions/kata/templates/slice-summary.md` and `uat.md`. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during completion, without relaxing required verification or artifact rules. Write `{{sliceId}}-SUMMARY.md` (compress task summaries), write `{{sliceId}}-UAT.md`, and fill the `UAT Type` plus `Not Proven By This UAT` sections explicitly so the artifact states what class of acceptance it covers and what still remains unproven. Review task summaries for `key_decisions` and ensure any significant ones are in `.kata/DECISIONS.md`. Mark the slice checkbox done in the roadmap, update STATE.md, update milestone summary, and leave the slice branch clean for the extension to squash-merge back to main automatically.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Discuss milestone {{milestoneId}} ("{{milestoneTitle}}"). Identify gray areas, ask the user about them, and write `{{milestoneId}}-CONTEXT.md` in the milestone directory with the decisions. Read the template at `~/.kata/agent/extensions/kata/templates/context.md` first. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow; do not override required artifact rules.
|
|
1
|
+
Discuss milestone {{milestoneId}} ("{{milestoneTitle}}"). Identify gray areas, ask the user about them, and write `{{milestoneId}}-CONTEXT.md` in the milestone directory with the decisions. Read the template at `~/.kata-cli/agent/extensions/kata/templates/context.md` first. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow; do not override required artifact rules.
|
|
2
2
|
|
|
3
3
|
**Investigate between question rounds to make your questions smarter.** Before each round of questions, do enough lightweight research that your questions are grounded in reality — not guesses about what exists or what's possible. Check library docs (`resolve_library`/`get_library_docs`) when tech choices are relevant, search the web (`search-the-web` with `freshness`/`domain` filters, then `fetch_page` for full content) to verify the landscape, scout the codebase (`rg`, `find`, `scout`) to understand what already exists. Don't go deep — just enough that your next question reflects what's actually true. The goal is to ask questions the user can't answer by saying "did you check the docs?" or "look at the code."
|
|
@@ -45,7 +45,7 @@ If the user wants to keep going, keep asking. Stop when they say wrap up.
|
|
|
45
45
|
|
|
46
46
|
Once the user is ready to wrap up:
|
|
47
47
|
|
|
48
|
-
1. Read the slice context template at `~/.kata/agent/extensions/kata/templates/slice-context.md`
|
|
48
|
+
1. Read the slice context template at `~/.kata-cli/agent/extensions/kata/templates/slice-context.md`
|
|
49
49
|
2. `mkdir -p {{sliceDirAbsPath}}`
|
|
50
50
|
3. Write `{{contextAbsPath}}` — use the template structure, filling in:
|
|
51
51
|
- **Goal** — one sentence: what this slice delivers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Execute the next task: {{taskId}} ("{{taskTitle}}") in slice {{sliceId}} of milestone {{milestoneId}}. Read the task plan (`{{taskId}}-PLAN.md`), load relevant summaries from prior tasks, and execute each step. Verify must-haves when done. If the task touches UI, browser flows, DOM behavior, or user-visible web state, exercise the real flow in the browser, prefer `browser_batch` for obvious sequences, prefer `browser_assert` for explicit pass/fail verification, use `browser_diff` when an action's effect is ambiguous, and use browser diagnostics when validating async or failure-prone UI. If you made an architectural, pattern, or library decision, append it to `.kata/DECISIONS.md`. Read the template at `~/.kata/agent/extensions/kata/templates/task-summary.md`. Write `{{taskId}}-SUMMARY.md`, mark it done, commit, and advance. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during execution, without relaxing required verification or artifact rules. If running long and not all steps are finished, stop implementing and prioritize writing a clean partial summary over attempting one more step — a recoverable handoff is more valuable than a half-finished step with no documentation. If verification fails, debug methodically: form a hypothesis and test that specific theory before changing anything, change one variable at a time, read entire functions not just the suspect line, distinguish observable facts from assumptions, and if 3+ fixes fail without progress stop and reassess your mental model — list what you know for certain, what you've ruled out, and form fresh hypotheses. Don't fix symptoms — understand why something fails before changing code.
|
|
1
|
+
Execute the next task: {{taskId}} ("{{taskTitle}}") in slice {{sliceId}} of milestone {{milestoneId}}. Read the task plan (`{{taskId}}-PLAN.md`), load relevant summaries from prior tasks, and execute each step. Verify must-haves when done. If the task touches UI, browser flows, DOM behavior, or user-visible web state, exercise the real flow in the browser, prefer `browser_batch` for obvious sequences, prefer `browser_assert` for explicit pass/fail verification, use `browser_diff` when an action's effect is ambiguous, and use browser diagnostics when validating async or failure-prone UI. If you made an architectural, pattern, or library decision, append it to `.kata/DECISIONS.md`. Read the template at `~/.kata-cli/agent/extensions/kata/templates/task-summary.md`. Write `{{taskId}}-SUMMARY.md`, mark it done, commit, and advance. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during execution, without relaxing required verification or artifact rules. If running long and not all steps are finished, stop implementing and prioritize writing a clean partial summary over attempting one more step — a recoverable handoff is more valuable than a half-finished step with no documentation. If verification fails, debug methodically: form a hypothesis and test that specific theory before changing anything, change one variable at a time, read entire functions not just the suspect line, distinguish observable facts from assumptions, and if 3+ fixes fail without progress stop and reassess your mental model — list what you know for certain, what you've ruled out, and form fresh hypotheses. Don't fix symptoms — understand why something fails before changing code.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Plan milestone {{milestoneId}} ("{{milestoneTitle}}"). Read `.kata/DECISIONS.md` if it exists — respect existing decisions. Read `.kata/REQUIREMENTS.md` if it exists and treat Active requirements as the capability contract. If `REQUIREMENTS.md` is missing, continue in legacy compatibility mode but explicitly note missing requirement coverage. Read the template at `~/.kata/agent/extensions/kata/templates/roadmap.md`. Create `{{milestoneId}}-ROADMAP.md` in the milestone directory with slices, risk levels, dependencies, demo sentences, verification classes, milestone definition of done, requirement coverage, and a boundary map. Write success criteria as observable truths, not implementation tasks. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment. If planning produces structural decisions, append them to `.kata/DECISIONS.md`. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required roadmap formatting.
|
|
1
|
+
Plan milestone {{milestoneId}} ("{{milestoneTitle}}"). Read `.kata/DECISIONS.md` if it exists — respect existing decisions. Read `.kata/REQUIREMENTS.md` if it exists and treat Active requirements as the capability contract. If `REQUIREMENTS.md` is missing, continue in legacy compatibility mode but explicitly note missing requirement coverage. Read the template at `~/.kata-cli/agent/extensions/kata/templates/roadmap.md`. Create `{{milestoneId}}-ROADMAP.md` in the milestone directory with slices, risk levels, dependencies, demo sentences, verification classes, milestone definition of done, requirement coverage, and a boundary map. Write success criteria as observable truths, not implementation tasks. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment. If planning produces structural decisions, append them to `.kata/DECISIONS.md`. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required roadmap formatting.
|
|
2
2
|
|
|
3
3
|
## Requirement Rules
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.kata/DECISIONS.md` if it exists — respect existing decisions. Read `.kata/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Read the templates at `~/.kata/agent/extensions/kata/templates/plan.md` and `task-plan.md`. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains. Write `{{sliceId}}-PLAN.md` and individual `T##-PLAN.md` files in the `tasks/` subdirectory. If planning produces structural decisions, append them to `.kata/decisions.md`. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required plan formatting. Before committing, self-audit the plan: every must-have maps to at least one task, every task has complete sections (steps, must-haves, verification, observability impact, inputs, and expected output), task ordering is consistent with no circular references, every pair of artifacts that must connect has an explicit wiring step, task scope targets 2–5 steps and 3–8 files (6–8 steps or 8–10 files — consider splitting; 10+ steps or 12+ files — must split), the plan honors locked decisions from context/research/decisions artifacts, the proof-level wording does not overclaim live integration if only fixture/contract proof is planned, every Active requirement this slice owns has at least one task with verification that proves it is met, and every task produces real user-facing progress — if the slice has a UI surface at least one task builds the real UI, if it has an API at least one task connects it to a real data source, and showing the completed result to a non-technical stakeholder would demonstrate real product progress rather than developer artifacts.
|
|
1
|
+
Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.kata/DECISIONS.md` if it exists — respect existing decisions. Read `.kata/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Read the templates at `~/.kata-cli/agent/extensions/kata/templates/plan.md` and `task-plan.md`. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains. Write `{{sliceId}}-PLAN.md` and individual `T##-PLAN.md` files in the `tasks/` subdirectory. If planning produces structural decisions, append them to `.kata/decisions.md`. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required plan formatting. Before committing, self-audit the plan: every must-have maps to at least one task, every task has complete sections (steps, must-haves, verification, observability impact, inputs, and expected output), task ordering is consistent with no circular references, every pair of artifacts that must connect has an explicit wiring step, task scope targets 2–5 steps and 3–8 files (6–8 steps or 8–10 files — consider splitting; 10+ steps or 12+ files — must split), the plan honors locked decisions from context/research/decisions artifacts, the proof-level wording does not overclaim live integration if only fixture/contract proof is planned, every Active requirement this slice owns has at least one task with verification that proves it is met, and every task produces real user-facing progress — if the slice has a UI surface at least one task builds the real UI, if it has an API at least one task connects it to a real data source, and showing the completed result to a non-technical stakeholder would demonstrate real product progress rather than developer artifacts.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.kata/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.kata/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during research, without relaxing required verification or artifact rules. Explore the relevant code — use `rg`/`find` for targeted reads, or `scout` if the area is broad or unfamiliar. Check libraries with `resolve_library`/`get_library_docs`. Read the template at `~/.kata/agent/extensions/kata/templates/research.md`. Write `{{sliceId}}-RESEARCH.md` in the slice directory with summary, don't-hand-roll, common pitfalls, and relevant code sections.
|
|
1
|
+
Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.kata/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.kata/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during research, without relaxing required verification or artifact rules. Explore the relevant code — use `rg`/`find` for targeted reads, or `scout` if the area is broad or unfamiliar. Check libraries with `resolve_library`/`get_library_docs`. Read the template at `~/.kata-cli/agent/extensions/kata/templates/research.md`. Write `{{sliceId}}-RESEARCH.md` in the slice directory with summary, don't-hand-roll, common pitfalls, and relevant code sections.
|
|
2
2
|
|
|
3
3
|
## Strategic Questions to Answer
|
|
4
4
|
|
|
@@ -7,13 +7,13 @@ All relevant context has been preloaded below — start working immediately with
|
|
|
7
7
|
{{inlinedContext}}
|
|
8
8
|
|
|
9
9
|
Then:
|
|
10
|
-
1. Read the template at `~/.kata/agent/extensions/kata/templates/roadmap.md`
|
|
10
|
+
1. Read the template at `~/.kata-cli/agent/extensions/kata/templates/roadmap.md`
|
|
11
11
|
2. Read `.kata/REQUIREMENTS.md` if it exists. Treat **Active** requirements as the capability contract for planning. If it does not exist, continue in legacy compatibility mode but explicitly note that requirement coverage is operating without a contract.
|
|
12
12
|
3. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required roadmap formatting
|
|
13
13
|
4. Create the roadmap: decompose into demoable vertical slices — as many as the work needs, no more
|
|
14
14
|
5. Order by risk (high-risk first)
|
|
15
15
|
6. Write `{{outputPath}}` with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, **requirement coverage**, and a boundary map. Write success criteria as observable truths, not implementation tasks. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment
|
|
16
|
-
7. If planning produced structural decisions (e.g. slice ordering rationale, technology choices, scope exclusions), append them to `.kata/DECISIONS.md` (read the template at `~/.kata/agent/extensions/kata/templates/decisions.md` if the file doesn't exist yet)
|
|
16
|
+
7. If planning produced structural decisions (e.g. slice ordering rationale, technology choices, scope exclusions), append them to `.kata/DECISIONS.md` (read the template at `~/.kata-cli/agent/extensions/kata/templates/decisions.md` if the file doesn't exist yet)
|
|
17
17
|
8. Update `.kata/STATE.md`
|
|
18
18
|
|
|
19
19
|
## Requirement Mapping Rules
|
|
@@ -15,8 +15,8 @@ Pay particular attention to **Forward Intelligence** sections — they contain h
|
|
|
15
15
|
Then:
|
|
16
16
|
0. If `REQUIREMENTS.md` was preloaded above, identify which Active requirements the roadmap says this slice owns or supports. These are the requirements this plan must deliver — every owned requirement needs at least one task that directly advances it, and verification must prove the requirement is met.
|
|
17
17
|
1. Read the templates:
|
|
18
|
-
- `~/.kata/agent/extensions/kata/templates/plan.md`
|
|
19
|
-
- `~/.kata/agent/extensions/kata/templates/task-plan.md`
|
|
18
|
+
- `~/.kata-cli/agent/extensions/kata/templates/plan.md`
|
|
19
|
+
- `~/.kata-cli/agent/extensions/kata/templates/task-plan.md`
|
|
20
20
|
2. If a `Kata Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required plan formatting
|
|
21
21
|
3. Define slice-level verification first — the objective stopping condition for this slice:
|
|
22
22
|
- For non-trivial slices: plan actual test files with real assertions. Name the files. The first task creates them (initially failing). Remaining tasks make them pass.
|
|
@@ -69,7 +69,7 @@ Determine where the new milestones should go in the overall sequence. Consider d
|
|
|
69
69
|
Once the user is satisfied, in a single pass for **each** new milestone (starting from {{nextId}}):
|
|
70
70
|
|
|
71
71
|
1. `mkdir -p .kata/milestones/<ID>/slices`
|
|
72
|
-
2. Write `.kata/milestones/<ID>/<ID>-CONTEXT.md` — read the template at `~/.kata/agent/extensions/kata/templates/context.md` first. Capture intent, scope, risks, constraints, integration points, and relevant requirements. Mark the status as "Queued — pending auto-mode execution."
|
|
72
|
+
2. Write `.kata/milestones/<ID>/<ID>-CONTEXT.md` — read the template at `~/.kata-cli/agent/extensions/kata/templates/context.md` first. Capture intent, scope, risks, constraints, integration points, and relevant requirements. Mark the status as "Queued — pending auto-mode execution."
|
|
73
73
|
|
|
74
74
|
Then, after all milestone directories and context files are written:
|
|
75
75
|
|
|
@@ -11,7 +11,7 @@ Then research the codebase and relevant technologies:
|
|
|
11
11
|
2. **Skill Discovery ({{skillDiscoveryMode}}):**{{skillDiscoveryInstructions}}
|
|
12
12
|
3. Explore relevant code. For small/familiar codebases, use `rg`, `find`, and targeted reads. For large or unfamiliar codebases, use `scout` to build a broad map efficiently before diving in.
|
|
13
13
|
4. Use `resolve_library` / `get_library_docs` for unfamiliar libraries
|
|
14
|
-
5. Read the template at `~/.kata/agent/extensions/kata/templates/research.md`
|
|
14
|
+
5. Read the template at `~/.kata-cli/agent/extensions/kata/templates/research.md`
|
|
15
15
|
6. If `.kata/REQUIREMENTS.md` exists, research against it. Identify which Active requirements are table stakes, likely omissions, overbuilt risks, or domain-standard behaviors the user may or may not want.
|
|
16
16
|
7. Write `{{outputPath}}` with:
|
|
17
17
|
- Summary (2-3 paragraphs, primary recommendation)
|
|
@@ -18,7 +18,7 @@ Then research what this slice needs:
|
|
|
18
18
|
2. **Skill Discovery ({{skillDiscoveryMode}}):**{{skillDiscoveryInstructions}}
|
|
19
19
|
3. Explore relevant code for this slice's scope. For targeted exploration, use `rg`, `find`, and reads. For broad or unfamiliar subsystems, use `scout` to map the relevant area first.
|
|
20
20
|
4. Use `resolve_library` / `get_library_docs` for unfamiliar libraries
|
|
21
|
-
5. Read the template at `~/.kata/agent/extensions/kata/templates/research.md`
|
|
21
|
+
5. Read the template at `~/.kata-cli/agent/extensions/kata/templates/research.md`
|
|
22
22
|
6. Write `{{outputPath}}`
|
|
23
23
|
|
|
24
24
|
The slice directory already exists at `{{slicePath}}/`. Do NOT mkdir — just write the file.
|
|
@@ -12,9 +12,9 @@ Kata ships with bundled skills. Load the relevant skill file with the `read` too
|
|
|
12
12
|
|
|
13
13
|
| Trigger | Skill to load |
|
|
14
14
|
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
|
|
15
|
-
| Frontend UI — web components, pages, landing pages, dashboards, React/HTML/CSS, styling | `~/.kata/agent/skills/frontend-design/SKILL.md` |
|
|
16
|
-
| macOS or iOS apps — SwiftUI, Xcode, App Store | `~/.kata/agent/skills/swiftui/SKILL.md` |
|
|
17
|
-
| Debugging — complex bugs, failing tests, root-cause investigation after standard approaches fail | `~/.kata/agent/skills/debug-like-expert/SKILL.md` |
|
|
15
|
+
| Frontend UI — web components, pages, landing pages, dashboards, React/HTML/CSS, styling | `~/.kata-cli/agent/skills/frontend-design/SKILL.md` |
|
|
16
|
+
| macOS or iOS apps — SwiftUI, Xcode, App Store | `~/.kata-cli/agent/skills/swiftui/SKILL.md` |
|
|
17
|
+
| Debugging — complex bugs, failing tests, root-cause investigation after standard approaches fail | `~/.kata-cli/agent/skills/debug-like-expert/SKILL.md` |
|
|
18
18
|
|
|
19
19
|
## Hard Rules
|
|
20
20
|
|
|
@@ -84,7 +84,7 @@ Titles live inside file content (headings, frontmatter), not in file or director
|
|
|
84
84
|
### Artifact Templates
|
|
85
85
|
|
|
86
86
|
Templates showing the expected format for each artifact type are in:
|
|
87
|
-
`~/.kata/agent/extensions/kata/templates/`
|
|
87
|
+
`~/.kata-cli/agent/extensions/kata/templates/`
|
|
88
88
|
|
|
89
89
|
**Always read the relevant template before writing an artifact** to match the expected structure exactly. The parsers that read these files depend on specific formatting:
|
|
90
90
|
|
|
@@ -12,4 +12,4 @@ auto_supervisor: {}
|
|
|
12
12
|
|
|
13
13
|
# Kata Skill Preferences
|
|
14
14
|
|
|
15
|
-
See `~/.kata/agent/extensions/kata/docs/preferences-reference.md` for full field documentation and examples.
|
|
15
|
+
See `~/.kata-cli/agent/extensions/kata/docs/preferences-reference.md` for full field documentation and examples.
|
|
@@ -9,7 +9,7 @@ import { join, dirname } from "node:path";
|
|
|
9
9
|
import { tmpdir } from "node:os";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
|
|
12
|
-
// loadPrompt reads from ~/.kata/agent/extensions/kata/prompts/ (main checkout).
|
|
12
|
+
// loadPrompt reads from ~/.kata-cli/agent/extensions/kata/prompts/ (main checkout).
|
|
13
13
|
// In a worktree the file may not exist there yet, so we resolve prompts
|
|
14
14
|
// relative to this test file's location (the worktree copy).
|
|
15
15
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
|
|
|
2
2
|
import { join, dirname } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
|
|
5
|
-
// loadPrompt reads from ~/.kata/agent/extensions/kata/prompts/ (main checkout).
|
|
5
|
+
// loadPrompt reads from ~/.kata-cli/agent/extensions/kata/prompts/ (main checkout).
|
|
6
6
|
// In a worktree the file may not exist there yet, so we resolve prompts
|
|
7
7
|
// relative to this test file's location (the worktree copy).
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -273,66 +273,66 @@ function sendPrompt(
|
|
|
273
273
|
: "";
|
|
274
274
|
|
|
275
275
|
const docHints: string[] = [
|
|
276
|
-
"- `~/.kata/agent/docs/extending-pi/01-what-are-extensions.md` — capabilities overview",
|
|
277
|
-
"- `~/.kata/agent/docs/extending-pi/03-getting-started.md` — minimal extension, hot reload",
|
|
278
|
-
"- `~/.kata/agent/docs/extending-pi/08-extensioncontext-what-you-can-access.md` — ExtensionContext API",
|
|
279
|
-
"- `~/.kata/agent/docs/extending-pi/09-extensionapi-what-you-can-do.md` — ExtensionAPI: registration, messaging",
|
|
280
|
-
"- `~/.kata/agent/docs/extending-pi/22-key-rules-gotchas.md` — must-read rules before shipping",
|
|
276
|
+
"- `~/.kata-cli/agent/docs/extending-pi/01-what-are-extensions.md` — capabilities overview",
|
|
277
|
+
"- `~/.kata-cli/agent/docs/extending-pi/03-getting-started.md` — minimal extension, hot reload",
|
|
278
|
+
"- `~/.kata-cli/agent/docs/extending-pi/08-extensioncontext-what-you-can-access.md` — ExtensionContext API",
|
|
279
|
+
"- `~/.kata-cli/agent/docs/extending-pi/09-extensionapi-what-you-can-do.md` — ExtensionAPI: registration, messaging",
|
|
280
|
+
"- `~/.kata-cli/agent/docs/extending-pi/22-key-rules-gotchas.md` — must-read rules before shipping",
|
|
281
281
|
];
|
|
282
282
|
|
|
283
283
|
if (uiSelected.includes("custom component")) {
|
|
284
284
|
docHints.push(
|
|
285
|
-
"- `~/.kata/agent/docs/extending-pi/12-custom-ui-visual-components.md` — dialogs, widgets, overlays",
|
|
285
|
+
"- `~/.kata-cli/agent/docs/extending-pi/12-custom-ui-visual-components.md` — dialogs, widgets, overlays",
|
|
286
286
|
);
|
|
287
287
|
docHints.push(
|
|
288
|
-
"- `~/.kata/agent/docs/pi-ui-tui/06-ctx-ui-custom-full-custom-components.md` — ctx.ui.custom() API",
|
|
288
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/06-ctx-ui-custom-full-custom-components.md` — ctx.ui.custom() API",
|
|
289
289
|
);
|
|
290
290
|
docHints.push(
|
|
291
|
-
"- `~/.kata/agent/docs/pi-ui-tui/07-built-in-components-the-building-blocks.md` — Text, Box, SelectList",
|
|
291
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/07-built-in-components-the-building-blocks.md` — Text, Box, SelectList",
|
|
292
292
|
);
|
|
293
293
|
docHints.push(
|
|
294
|
-
"- `~/.kata/agent/docs/pi-ui-tui/09-keyboard-input-how-to-handle-keys.md` — Key, matchesKey",
|
|
294
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/09-keyboard-input-how-to-handle-keys.md` — Key, matchesKey",
|
|
295
295
|
);
|
|
296
296
|
docHints.push(
|
|
297
|
-
"- `~/.kata/agent/docs/pi-ui-tui/10-line-width-the-cardinal-rule.md` — truncation, width rules",
|
|
297
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/10-line-width-the-cardinal-rule.md` — truncation, width rules",
|
|
298
298
|
);
|
|
299
299
|
docHints.push(
|
|
300
|
-
"- `~/.kata/agent/docs/pi-ui-tui/19-building-a-complete-component-step-by-step.md` — step-by-step guide",
|
|
300
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/19-building-a-complete-component-step-by-step.md` — step-by-step guide",
|
|
301
301
|
);
|
|
302
302
|
docHints.push(
|
|
303
|
-
"- `~/.kata/agent/docs/pi-ui-tui/21-common-mistakes-and-how-to-avoid-them.md` — pitfalls",
|
|
303
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/21-common-mistakes-and-how-to-avoid-them.md` — pitfalls",
|
|
304
304
|
);
|
|
305
305
|
} else if (uiSelected.includes("Dialogs")) {
|
|
306
306
|
docHints.push(
|
|
307
|
-
"- `~/.kata/agent/docs/pi-ui-tui/04-built-in-dialog-methods.md` — select, confirm, input, editor",
|
|
307
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/04-built-in-dialog-methods.md` — select, confirm, input, editor",
|
|
308
308
|
);
|
|
309
309
|
} else if (uiSelected.includes("Status")) {
|
|
310
310
|
docHints.push(
|
|
311
|
-
"- `~/.kata/agent/docs/pi-ui-tui/05-persistent-ui-elements.md` — status, widgets, footer, header",
|
|
311
|
+
"- `~/.kata-cli/agent/docs/pi-ui-tui/05-persistent-ui-elements.md` — status, widgets, footer, header",
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
if (uiSelected.includes("tool") || result.answers["purpose"]) {
|
|
316
316
|
docHints.push(
|
|
317
|
-
"- `~/.kata/agent/docs/extending-pi/14-custom-rendering-controlling-what-the-user-sees.md` — renderCall / renderResult",
|
|
317
|
+
"- `~/.kata-cli/agent/docs/extending-pi/14-custom-rendering-controlling-what-the-user-sees.md` — renderCall / renderResult",
|
|
318
318
|
);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
if (eventsSelected && !eventsSelected.includes("standalone")) {
|
|
322
322
|
docHints.push(
|
|
323
|
-
"- `~/.kata/agent/docs/extending-pi/07-events-the-nervous-system.md` — all events reference",
|
|
323
|
+
"- `~/.kata-cli/agent/docs/extending-pi/07-events-the-nervous-system.md` — all events reference",
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
if (eventsSelected.includes("context / prompt")) {
|
|
328
328
|
docHints.push(
|
|
329
|
-
"- `~/.kata/agent/docs/extending-pi/15-system-prompt-modification.md` — system prompt hooks",
|
|
329
|
+
"- `~/.kata-cli/agent/docs/extending-pi/15-system-prompt-modification.md` — system prompt hooks",
|
|
330
330
|
);
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
if (persistenceSelected.includes("session")) {
|
|
334
334
|
docHints.push(
|
|
335
|
-
"- `~/.kata/agent/docs/extending-pi/13-state-management-persistence.md` — pi.appendEntry, session state",
|
|
335
|
+
"- `~/.kata-cli/agent/docs/extending-pi/13-state-management-persistence.md` — pi.appendEntry, session state",
|
|
336
336
|
);
|
|
337
337
|
}
|
|
338
338
|
|
|
@@ -350,11 +350,11 @@ ${docHints.join("\n")}
|
|
|
350
350
|
|
|
351
351
|
Write the complete implementation as a single self-contained extension file:
|
|
352
352
|
|
|
353
|
-
\`~/.kata/agent/extensions/<kebab-case-name>.ts\`
|
|
353
|
+
\`~/.kata-cli/agent/extensions/<kebab-case-name>.ts\`
|
|
354
354
|
|
|
355
355
|
Then register it in the main extensions index:
|
|
356
356
|
|
|
357
|
-
\`~/.kata/agent/extensions/index.ts\` — import and call the new extension's default export alongside existing ones
|
|
357
|
+
\`~/.kata-cli/agent/extensions/index.ts\` — import and call the new extension's default export alongside existing ones
|
|
358
358
|
|
|
359
359
|
## Rules you must follow exactly
|
|
360
360
|
|
|
@@ -257,8 +257,8 @@ function sendPrompt(
|
|
|
257
257
|
${contextSection}
|
|
258
258
|
Write the complete file contents for two files:
|
|
259
259
|
|
|
260
|
-
1. \`~/.kata/agent/extensions/slash-commands/<name>.ts\` — the command implementation
|
|
261
|
-
2. Update \`~/.kata/agent/extensions/slash-commands/index.ts\` — import and register the new command alongside existing ones
|
|
260
|
+
1. \`~/.kata-cli/agent/extensions/slash-commands/<name>.ts\` — the command implementation
|
|
261
|
+
2. Update \`~/.kata-cli/agent/extensions/slash-commands/index.ts\` — import and register the new command alongside existing ones
|
|
262
262
|
|
|
263
263
|
Rules you must follow exactly:
|
|
264
264
|
- Command registration: \`pi.registerCommand("name", { description, handler })\`
|
|
@@ -502,7 +502,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
502
502
|
const discovery = discoverAgents(ctx.cwd, "both");
|
|
503
503
|
if (discovery.agents.length === 0) {
|
|
504
504
|
ctx.ui.notify(
|
|
505
|
-
"No agents found. Add .md files to ~/.kata/agent/agents/ or .kata/agents/",
|
|
505
|
+
"No agents found. Add .md files to ~/.kata-cli/agent/agents/ or .kata/agents/",
|
|
506
506
|
"warning",
|
|
507
507
|
);
|
|
508
508
|
return;
|
|
@@ -525,7 +525,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
525
525
|
"Delegate tasks to specialized subagents with isolated context windows.",
|
|
526
526
|
"Each subagent is a separate pi process with its own tools, model, and system prompt.",
|
|
527
527
|
"Modes: single ({ agent, task }), parallel ({ tasks: [{agent, task},...] }), chain ({ chain: [{agent, task},...] } with {previous} placeholder).",
|
|
528
|
-
"Agents are defined as .md files in ~/.kata/agent/agents/ (user) or .kata/agents/ (project).",
|
|
528
|
+
"Agents are defined as .md files in ~/.kata-cli/agent/agents/ (user) or .kata/agents/ (project).",
|
|
529
529
|
"Use the /subagent command to list available agents and their descriptions.",
|
|
530
530
|
"Use chain mode to pipeline: scout finds context, planner designs, worker implements.",
|
|
531
531
|
].join(" "),
|