@kanon-pm/setup 0.3.0 → 0.5.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.
@@ -3,6 +3,11 @@ name: kanon-init
3
3
  description: Automated project onboarding — scan codebase, create Kanon project, seed initial issues, groups, and roadmap items from TODOs and architecture gaps
4
4
  version: 2.0.0
5
5
  tags: [kanon, onboarding, project-setup, codebase-scan, batch]
6
+ allowed-tools:
7
+ - kanon_*
8
+ - mem_save
9
+ - mem_search
10
+ - mem_get_observation
6
11
  ---
7
12
 
8
13
  # Kanon Init — Automated Project Onboarding
@@ -23,33 +28,21 @@ Supports two modes:
23
28
 
24
29
  ## Inputs
25
30
 
26
- The skill accepts optional inputs. When invoked by a sub-agent or orchestrator, these are passed directly. When invoked interactively, they are derived during execution.
27
-
28
31
  | Input | Type | Required | Description |
29
32
  |-------|------|----------|-------------|
30
33
  | `workspaceId` | string | No | If provided, skip workspace selection (batch mode) |
31
34
  | `projectKey` | string | No | If provided, skip project creation and seed into existing project |
32
35
  | `projectName` | string | No | Override the derived project name |
33
36
 
34
- **Mode detection**: If `workspaceId` is provided as input, run in **batch mode** (zero prompts). Otherwise, run in **interactive mode**.
37
+ **Mode detection**: If `workspaceId` is provided, run in **batch mode** (zero prompts). Otherwise, **interactive mode**.
35
38
 
36
39
  ---
37
40
 
38
41
  ## Prerequisites
39
42
 
40
- Before starting, load the Kanon MCP tools via ToolSearch:
41
-
42
- ```
43
- ToolSearch: select:mcp__kanon__kanon_list_workspaces,mcp__kanon__kanon_create_project,mcp__kanon__kanon_list_projects,mcp__kanon__kanon_list_issues,mcp__kanon__kanon_create_issue,mcp__kanon__kanon_list_roadmap,mcp__kanon__kanon_create_roadmap_item,mcp__kanon__kanon_get_project,mcp__kanon__kanon_list_groups
44
- ```
45
-
46
- If ToolSearch returns no results, the Kanon MCP server is not configured. Stop and tell the user:
47
- > "The Kanon MCP server is not configured in your Claude Code settings. Add the Kanon MCP server configuration and try again."
43
+ Load Kanon MCP tools via ToolSearch. If tools are not available, stop and tell the user to configure the Kanon MCP server.
48
44
 
49
- Call `kanon_list_workspaces()` to verify connectivity. If it fails, stop and tell the user:
50
- > "The Kanon MCP server is not reachable. Make sure the Kanon API is running, the MCP server is configured in your Claude Code settings, and the `KANON_API_KEY` environment variable is set."
51
-
52
- Do NOT proceed past this point if connectivity fails.
45
+ Call `kanon_list_workspaces()` to verify connectivity. If it fails, stop and report the MCP server is not reachable.
53
46
 
54
47
  ---
55
48
 
@@ -62,12 +55,12 @@ Scan the codebase to understand its structure, tech stack, and areas of concern.
62
55
  Scan top-level directories and workspace packages:
63
56
 
64
57
  ```
65
- Glob("*") top-level dirs and files
66
- Glob("packages/*") monorepo packages (if packages/ exists)
67
- Glob("src/*") flat project subdirs (if no packages/)
58
+ Glob("*") -> top-level dirs and files
59
+ Glob("packages/*") -> monorepo packages (if packages/ exists)
60
+ Glob("src/*") -> flat project subdirs (if no packages/)
68
61
  ```
69
62
 
70
- Map directories to human-readable groups using this table. Apply in order, first match wins per directory. **Cap at 5 groups.**
63
+ Map directories to human-readable groups. **Cap at 5 groups.**
71
64
 
72
65
  | Directory pattern | groupKey | Group name |
73
66
  |---|---|---|
@@ -75,38 +68,36 @@ Map directories to human-readable groups using this table. Apply in order, first
75
68
  | `packages/web`, `web/`, `client/`, `frontend/` | `web` | Frontend |
76
69
  | `packages/mcp` | `mcp` | MCP |
77
70
  | `packages/cli`, `cli/` | `cli` | CLI |
78
- | `infra/`, `deploy/`, `docker/`, `.github/`, `terraform/`, `k8s/` | `infra` | Infrastructure |
79
- | `packages/{name}` (any other) | `{name}` | (Capitalize directory name) |
80
- | `src/{subdir}` (flat project) | `{subdir}` | (Capitalize subdir name) |
71
+ | `infra/`, `deploy/`, `docker/`, `.github/`, `terraform/` | `infra` | Infrastructure |
72
+ | `packages/{name}` (any other) | `{name}` | (Capitalize name) |
73
+ | `src/{subdir}` (flat project) | `{subdir}` | (Capitalize subdir) |
81
74
 
82
75
  **Priority when capping at 5**: API > Frontend > Infrastructure > others alphabetically.
83
76
 
84
77
  ### 1b: Tech Stack Detection
85
78
 
86
- Read manifest files at the project root (and workspace package roots for monorepos):
79
+ Read manifest files at project root (and workspace package roots for monorepos):
87
80
 
88
81
  | File | Extract |
89
82
  |------|---------|
90
- | `package.json` | `name`, `description`, `dependencies`, `devDependencies`, `workspaces` |
83
+ | `package.json` | `name`, `description`, `dependencies`, `workspaces` |
91
84
  | `go.mod` | Module path, Go version |
92
85
  | `Cargo.toml` | Package name, dependencies |
93
86
  | `pyproject.toml` | Project name, dependencies |
94
87
 
95
- From dependencies, detect frameworks (Express, Fastify, React, Next.js, etc.), databases (Prisma, TypeORM, etc.), testing (Vitest, Jest, pytest, etc.), and build tools (Turbo, Nx, etc.).
88
+ Detect frameworks, databases, testing tools, and build tools from dependencies.
96
89
 
97
90
  ### 1c: TODO/FIXME Scan
98
91
 
99
- Grep all source files for actionable comments:
100
-
101
92
  ```
102
93
  Grep(pattern: "TODO|FIXME|HACK|XXX", output_mode: "content", head_limit: 20)
103
94
  ```
104
95
 
105
- Collect each match with file path and line number. Filter out bare markers (lines where `TODO` or `FIXME` is the only content with no descriptive text). Keep entries that have meaningful text after the marker.
96
+ Filter out bare markers with no descriptive text. Keep entries with meaningful text after the marker.
106
97
 
107
98
  ### 1d: Architecture Gap Detection
108
99
 
109
- Check for the existence of these paths. Missing = gap.
100
+ Check for these paths. Missing = gap.
110
101
 
111
102
  | Path to check | Gap if missing |
112
103
  |---|---|
@@ -123,64 +114,37 @@ If `README.md` exists, read the first 50 lines to extract the project's stated p
123
114
 
124
115
  ### 1f: Derive Project Metadata
125
116
 
126
- From the scan, derive:
127
- - **Project name**: from `package.json` `name` field, `go.mod` module, or directory name
128
- - **Project key**: uppercase, max 6 chars, derived from name (e.g., "kanon" -> "KAN", "my-cool-app" -> "MCA"). Must match `^[A-Z][A-Z0-9]*$`
129
- - **Description**: from README first line or `package.json` description, or "No description found"
117
+ - **Project name**: from `package.json` `name`, `go.mod` module, or directory name
118
+ - **Project key**: uppercase, max 6 chars, derived from name (e.g., "kanon" -> "KAN"). Must match `^[A-Z][A-Z0-9]*$`
119
+ - **Description**: from README first line or `package.json` description
130
120
 
131
121
  ---
132
122
 
133
123
  ## Phase 2: Resolve Project
134
124
 
135
- Ensure the Kanon project exists without creating duplicates.
136
-
137
125
  ### 2a: Workspace Selection
138
126
 
139
- - **Batch mode** (`workspaceId` provided): Use the provided `workspaceId`. No prompts.
140
- - **Interactive mode** (`workspaceId` not provided):
141
- - Call `kanon_list_workspaces()`.
142
- - If exactly one workspace: auto-select it, inform the user.
143
- - If multiple: present a numbered list and ask the user to choose.
144
- - If none: stop and tell the user to create a workspace first.
127
+ - **Batch mode**: Use provided `workspaceId`.
128
+ - **Interactive mode**: Call `kanon_list_workspaces()`. If one workspace, auto-select. If multiple, ask user. If none, stop.
145
129
 
146
130
  ### 2b: Project Lookup
147
131
 
148
132
  Call `kanon_list_projects(workspaceId)`.
149
133
 
150
- - **If a project with the derived key already exists**: Reuse it. Log:
151
- > "Project **{KEY}** already exists. Reusing it for seeding."
152
- - **If no match**: Create the project:
153
- ```
154
- kanon_create_project(
155
- workspaceId: "{workspaceId}",
156
- key: "{KEY}",
157
- name: "{projectName}",
158
- description: "{description}"
159
- )
160
- ```
161
-
162
- Store the `projectKey` for Phase 3.
134
+ - If project with derived key exists: reuse it.
135
+ - If no match: create via `kanon_create_project`.
163
136
 
164
137
  ---
165
138
 
166
139
  ## Phase 3: Seed Content
167
140
 
168
- Create issues and roadmap items based on discovery results. This phase runs as a batch with no user prompts in batch mode.
169
-
170
141
  ### 3a: Idempotency Check
171
142
 
172
- Call these once and cache the results:
173
-
174
- ```
175
- kanon_list_issues(projectKey: "{KEY}")
176
- kanon_list_roadmap(projectKey: "{KEY}")
177
- ```
178
-
179
- Use these to skip items whose title matches an existing issue or roadmap item. Match logic: existing title starts with the same `[Area]` prefix AND contains the same key noun.
143
+ Call `kanon_list_issues` and `kanon_list_roadmap` once, cache results. Skip items whose title matches an existing issue or roadmap item.
180
144
 
181
145
  ### 3b: Interactive Confirmation (interactive mode only)
182
146
 
183
- In interactive mode, before creating anything, present a confirmation table:
147
+ Present a confirmation table before creating anything:
184
148
 
185
149
  ```
186
150
  ## Proposed Items
@@ -189,74 +153,33 @@ In interactive mode, before creating anything, present a confirmation table:
189
153
  |---|------|-------|-------|
190
154
  | 1 | issue | [API] Fix N+1 query in user list | api |
191
155
  | 2 | issue | [Infra] Set up GitHub Actions | infra |
192
- | ... | | | |
193
- | 11 | roadmap | Add test infrastructure | — |
156
+ | 11 | roadmap | Add test infrastructure | - |
194
157
 
195
158
  Create all {N} items? (y/n)
196
159
  ```
197
160
 
198
- Wait for user confirmation. If declined, skip creation entirely.
199
-
200
- In **batch mode**, skip this step — create everything silently.
161
+ In **batch mode**, skip this step.
201
162
 
202
163
  ### 3c: Issue Creation
203
164
 
204
- Create issues in priority order, respecting a **total cap of 10 issues**:
165
+ Create issues in priority order, **cap at 10 issues**:
205
166
 
206
- 1. **FIXME bugs** (up to 3): Type `bug`, priority `high`
207
- 2. **Architecture gaps** (up to 4): Type `task`, priority `medium`
208
- 3. **TODO tasks** (up to 3): Type `task`, priority `medium`
167
+ 1. **FIXME bugs** (up to 3): type `bug`, priority `high`
168
+ 2. **Architecture gaps** (up to 4): type `task`, priority `medium`
169
+ 3. **TODO tasks** (up to 3): type `task`, priority `medium`
209
170
 
210
- If fewer items exist in a category, overflow the budget to the next category.
211
-
212
- #### Issue Templates
213
-
214
- **TODO/FIXME issue:**
215
- ```
216
- kanon_create_issue(
217
- projectKey: "{KEY}",
218
- title: "[{Area}] {Cleaned TODO/FIXME text}",
219
- type: "task" | "bug", // task for TODO, bug for FIXME
220
- priority: "medium" | "high", // medium for TODO, high for FIXME
221
- description: "Found at `{file}:{line}`\n\n> {original line}\n\nExtracted from codebase scan.",
222
- groupKey: "{area-groupKey}"
223
- )
224
- ```
225
-
226
- **Architecture gap issue:**
227
- ```
228
- kanon_create_issue(
229
- projectKey: "{KEY}",
230
- title: "[{Area}] Set up {missing thing}",
231
- type: "task",
232
- priority: "medium",
233
- description: "The project is missing {thing}. This impacts {reason}.",
234
- groupKey: "{area-groupKey}" // typically "infra" for CI/Docker/linting gaps
235
- )
236
- ```
237
-
238
- **Starter issue (based on tech stack):**
239
- ```
240
- kanon_create_issue(
241
- projectKey: "{KEY}",
242
- title: "[{Area}] {Common setup task}",
243
- type: "task",
244
- priority: "low",
245
- description: "Detected {framework/tool} in the stack. This is a common setup improvement.",
246
- groupKey: "{area-groupKey}"
247
- )
248
- ```
171
+ If fewer items in a category, overflow budget to next.
249
172
 
250
173
  #### Title Format
251
174
 
252
175
  Always use: `[Area] Verb phrase`
253
176
 
254
- Good: `[API] Add request validation middleware`, `[Infra] Set up GitHub Actions CI`
255
- Bad: `TODO fix auth`, `packages/api needs work`
177
+ Good: `[API] Add request validation middleware`
178
+ Bad: `TODO fix auth`
256
179
 
257
180
  ### 3d: Roadmap Item Creation
258
181
 
259
- Create roadmap items for larger concerns detected during discovery. **Cap at 5 items.** Only create for gaps actually detected. Status: `idea` for all.
182
+ Create roadmap items for larger concerns. **Cap at 5 items.** Status: `idea` for all.
260
183
 
261
184
  | Gap detected | Roadmap title | Horizon | Effort | Impact |
262
185
  |---|---|---|---|---|
@@ -266,37 +189,19 @@ Create roadmap items for larger concerns detected during discovery. **Cap at 5 i
266
189
  | No Dockerfile | Add containerization | `next` | 2 | 3 |
267
190
  | No linting config | Set up linting and formatting | `later` | 1 | 2 |
268
191
 
269
- ```
270
- kanon_create_roadmap_item(
271
- projectKey: "{KEY}",
272
- title: "{roadmap title}",
273
- horizon: "now" | "next" | "later",
274
- effort: {1-5},
275
- impact: {1-5},
276
- description: "{why this matters}",
277
- status: "idea"
278
- )
279
- ```
280
-
281
- Skip any roadmap item whose title matches an existing roadmap item (idempotency).
282
-
283
192
  ### 3e: MCP Call Sequence
284
193
 
285
- Execute in this order:
286
-
287
194
  1. `kanon_list_issues(projectKey)` — cache for dedup
288
195
  2. `kanon_list_roadmap(projectKey)` — cache for dedup
289
- 3. For each issue (in priority order): `kanon_create_issue(...)` — skip duplicates
196
+ 3. For each issue: `kanon_create_issue(...)` — skip duplicates
290
197
  4. For each roadmap item: `kanon_create_roadmap_item(...)` — skip duplicates
291
198
 
292
- If any individual MCP call fails, log a warning and continue with the remaining items. Do not abort the entire flow.
199
+ If any MCP call fails, log a warning and continue.
293
200
 
294
201
  ---
295
202
 
296
203
  ## Phase 4: Report
297
204
 
298
- Present results and persist context.
299
-
300
205
  ### 4a: Summary Table
301
206
 
302
207
  ```
@@ -307,57 +212,34 @@ Present results and persist context.
307
212
  | Project | 1 | {KEY} ({created | reused}) |
308
213
  | Groups | {N} | {group1}, {group2}, ... |
309
214
  | Issues created | {N} | {X} bugs, {Y} tasks |
310
- | Issues skipped (duplicates) | {N} | |
311
- | Roadmap items created | {N} | |
312
- | Roadmap items skipped | {N} | |
215
+ | Issues skipped | {N} | - |
216
+ | Roadmap items created | {N} | - |
217
+ | Roadmap items skipped | {N} | - |
313
218
  ```
314
219
 
315
220
  ### 4b: Save to Engram
316
221
 
317
- ```
318
- mem_save(
319
- title: "Kanon project onboarded: {KEY}",
320
- type: "architecture",
321
- project: "{engram-project-name or KEY lowercase}",
322
- topic_key: "kanon-project/{KEY}",
323
- content: "
324
- **What**: Created/reused Kanon project {KEY} ({name}) in workspace {workspace-name}
325
- **Tech stack**: {detected stack summary}
326
- **Monorepo**: {yes/no}
327
- **Groups**: {group list}
328
- **Workspace ID**: {workspaceId}
329
- **Project key**: {KEY}
330
- **Issues created**: {N} ({breakdown by type})
331
- **Roadmap items created**: {N}
332
- "
333
- )
334
- ```
222
+ Save project onboarding context with `topic_key: kanon-project/{KEY}`.
335
223
 
336
224
  ---
337
225
 
338
226
  ## Edge Cases
339
227
 
340
- **No recognizable project files found**: Derive minimal metadata from the directory name. Still allow project creation and seeding of architecture-gap issues.
341
-
342
- **Key exceeds 6 characters**: Truncate intelligently. Prefer acronyms (e.g., "my-cool-app" -> "MCA") over simple truncation. Validate key matches `^[A-Z][A-Z0-9]*$`.
343
-
344
- **Project key already exists**: Detected via `kanon_list_projects`. Reuse the existing project — do not create duplicates.
345
-
346
- **Very large codebase with many TODOs**: The 20-match grep cap and 10-issue creation cap prevent overwhelming the board. Prioritize FIXME entries and items with descriptive text.
347
-
348
- **Re-run on already-onboarded project**: Idempotency check (Phase 3a) prevents duplicate issues. New TODOs added since last run will be created.
349
-
350
- **No TODOs found**: Skip TODO-derived issues. Architecture-gap and starter issues are still created.
351
-
352
- **MCP call failure during seeding**: Log a warning and continue with remaining items. Never block the entire flow for a single failed call.
228
+ - **No recognizable project files**: Derive metadata from directory name. Still allow project creation.
229
+ - **Key exceeds 6 characters**: Truncate intelligently. Prefer acronyms.
230
+ - **Project key already exists**: Reuse the existing project.
231
+ - **Very large codebase**: The 20-match grep cap and 10-issue cap prevent overwhelming the board.
232
+ - **Re-run on onboarded project**: Idempotency check prevents duplicates.
233
+ - **No TODOs found**: Skip TODO-derived issues. Architecture-gap issues still created.
234
+ - **MCP call failure**: Log warning and continue. Never block the entire flow.
353
235
 
354
236
  ---
355
237
 
356
238
  ## Best Practices
357
239
 
358
- 1. **Clean titles for seeded issues** — TODO comments are often terse. Expand them into proper `[Area] Description` titles a teammate can understand.
240
+ 1. **Clean titles for seeded issues** — Expand terse TODO comments into proper `[Area] Description` titles.
359
241
  2. **Respect all caps** — 10 issues, 5 roadmap items, 5 groups. Quality over quantity.
360
- 3. **Save to engram** — The onboarding context is valuable for future sessions. Do not skip Phase 4b.
361
- 4. **Fail gracefully** — If any MCP call fails during seeding, log a warning and continue. Do not abort.
362
- 5. **Idempotency first** — Always check for existing items before creating. A second run should produce zero duplicates.
363
- 6. **One project per run** — For monorepos with multiple logical projects, suggest running once per sub-project.
242
+ 3. **Save to engram** — The onboarding context is valuable for future sessions.
243
+ 4. **Fail gracefully** — If any MCP call fails, log and continue.
244
+ 5. **Idempotency first** — Always check for existing items before creating.
245
+ 6. **One project per run** — For monorepos, suggest running once per sub-project.
@@ -3,6 +3,11 @@ name: kanon-mcp
3
3
  description: Human-facing project board integration — clean cards, meaningful titles, progressive enrichment from SDD and general work
4
4
  version: 2.0.0
5
5
  tags: [kanon, project-management, sdd, issue-tracking]
6
+ allowed-tools:
7
+ - kanon_*
8
+ - mem_save
9
+ - mem_search
10
+ - mem_get_observation
6
11
  ---
7
12
 
8
13
  # Kanon MCP — Usage Guide
@@ -23,31 +28,17 @@ Kanon is the **human-facing project board**. Every card should be readable by a
23
28
 
24
29
  ---
25
30
 
26
- ## Available Tools
31
+ ## Issue Lifecycle
27
32
 
28
- ### Project and Group Discovery
33
+ 1. **Pick issue**: `kanon_list_issues` — find assigned/available work
34
+ 2. **Start work**: `kanon_start_work(key)` — auto-assigns, warns about conflicts
35
+ 3. **Progress**: `kanon_transition_issue(key, "in_progress")`
36
+ 4. **Update**: `kanon_update_issue(key, {description/context})` as you work
37
+ 5. **Complete**: `kanon_transition_issue(key, "done")`
38
+ 6. **Release**: `kanon_stop_work(key)` — frees ownership
29
39
 
30
- | Tool | Purpose | Key Parameters |
31
- |------|---------|----------------|
32
- | `kanon_list_projects(workspaceId)` | List all projects in a workspace | `workspaceId` (required) |
33
- | `kanon_get_project(projectKey)` | Get full project details | `projectKey` (required) |
34
- | `kanon_list_groups(projectKey)` | List issue groups (epics, sprints, etc.) | `projectKey` (required) |
35
-
36
- ### Issue Management
37
-
38
- | Tool | Purpose | Key Parameters |
39
- |------|---------|----------------|
40
- | `kanon_list_issues(projectKey, ...)` | List issues with optional filters | `projectKey` (required); filters: `state`, `type`, `priority`, `label`, `groupKey`, `assigneeId`, `sprintId` |
41
- | `kanon_get_issue(issueKey)` | Get full issue details | `issueKey` (required, e.g. `"KAN-42"`) |
42
- | `kanon_create_issue(projectKey, title, ...)` | Create a new issue | `projectKey`, `title` (required); optional: `type`, `priority`, `description`, `labels`, `groupKey`, `parentId`, `assigneeId`, `sprintId`, `dueDate` |
43
- | `kanon_update_issue(issueKey, ...)` | Update issue fields | `issueKey` (required); optional: `title`, `description`, `priority`, `labels`, `assigneeId`, `sprintId`, `dueDate` |
44
-
45
- ### State Transitions
46
-
47
- | Tool | Purpose | Key Parameters |
48
- |------|---------|----------------|
49
- | `kanon_transition_issue(issueKey, state)` | Transition a single issue | `issueKey`, `state` (required) |
50
- | `kanon_batch_transition(projectKey, groupKey, state)` | Transition all issues in a group | `projectKey`, `groupKey`, `state` (required) |
40
+ ALWAYS call `start_work` before implementing. ALWAYS call `stop_work` when done.
41
+ Check `activeWorkers` in issue responses for conflict awareness.
51
42
 
52
43
  ---
53
44
 
@@ -75,16 +66,12 @@ The area tag groups related work visually on the board.
75
66
  - `[Bridge] Sync engine connection pooling`
76
67
  - `[Auth] JWT token refresh race condition`
77
68
  - `[UI] Dark mode toggle in settings`
78
- - `[API] Rate limiting for public endpoints`
79
69
 
80
70
  **Bad titles (never do this):**
81
71
  - `sdd/sync-engine/proposal`
82
- - `sdd-new/kanon-bridge/spec`
83
72
  - `apply dark-mode`
84
73
  - `Implement feature`
85
74
 
86
- When creating an issue, derive the area from the feature domain and write the action in plain language a teammate would understand.
87
-
88
75
  ---
89
76
 
90
77
  ## Progressive Description Enrichment
@@ -106,7 +93,6 @@ As work progresses, the issue description builds up incrementally. Each phase ap
106
93
  ## Tasks
107
94
  - [x] Task 1 — completed
108
95
  - [ ] Task 2 — in progress
109
- - [ ] Task 3 — pending
110
96
  [Added during tasks phase, checkboxes updated during apply]
111
97
 
112
98
  ## Verification
@@ -115,7 +101,6 @@ As work progresses, the issue description builds up incrementally. Each phase ap
115
101
  ## Engram References
116
102
  - `sdd/{change}/proposal` — Full proposal details
117
103
  - `sdd/{change}/spec` — Complete specification
118
- - `sdd/{change}/design` — Architecture decisions
119
104
  [Each phase appends its topic_key here as a breadcrumb trail]
120
105
  ```
121
106
 
@@ -125,11 +110,11 @@ As work progresses, the issue description builds up incrementally. Each phase ap
125
110
  |------------------|-----------------------|----------------|
126
111
  | explore | **Context** | Investigation findings, problem statement |
127
112
  | propose | **Context** (update) | Proposal intent, scope, constraints |
128
- | design | **Approach** | Architecture decisions, tradeoffs, diagrams |
129
- | spec | **Spec Summary** | Key requirements, acceptance criteria, scenarios |
130
- | tasks | **Tasks** | Checklist of work items with descriptions |
113
+ | design | **Approach** | Architecture decisions, tradeoffs |
114
+ | spec | **Spec Summary** | Key requirements, acceptance criteria |
115
+ | tasks | **Tasks** | Checklist of work items |
131
116
  | apply | **Tasks** (update) | Check off completed items, note deviations |
132
- | verify | **Verification** | Test results, compliance, remaining concerns |
117
+ | verify | **Verification** | Test results, compliance |
133
118
  | archive | All sections | Final polish, ensure completeness |
134
119
 
135
120
  Every phase also appends its engram `topic_key` to the **Engram References** section.
@@ -140,109 +125,44 @@ Every phase also appends its engram `topic_key` to the **Engram References** sec
140
125
 
141
126
  Create Kanon issues whenever the agent:
142
127
 
143
- - **Starts meaningful work** — not just SDD, any substantial task the user requests
128
+ - **Starts meaningful work** — not just SDD, any substantial task
144
129
  - **Discovers a bug** worth tracking during implementation
145
130
  - **Identifies technical debt** that should not be forgotten
146
131
  - **Finds follow-up items** during code review or verification
147
132
 
148
- Before creating, call `kanon_list_issues` to check for duplicates or related existing cards.
149
-
150
- Before creating an issue, call `kanon_list_groups(projectKey)` to discover available groups. If the issue's domain or area matches an existing group, assign it via `groupKey`.
133
+ Before creating, call `kanon_list_issues` to check for duplicates.
134
+ Before creating, call `kanon_list_groups(projectKey)` to discover available groups and assign `groupKey`.
151
135
 
152
136
  ### Labels for Categorization
153
137
 
154
- Use labels to make the board scannable:
155
-
156
138
  | Label | When to use |
157
139
  |-------|-------------|
158
140
  | `sdd` | Work driven by SDD workflow |
159
141
  | `bug` | Bugs found during any work |
160
- | `tech-debt` | Identified technical debt for later |
142
+ | `tech-debt` | Identified technical debt |
161
143
  | `exploration` | Spikes, investigations, research |
162
144
 
163
- Use groups for epics or feature areas when the project has them.
164
-
165
- ---
166
-
167
- ## SDD Integration
168
-
169
- ### Orchestrator Protocol
170
-
171
- #### On `/sdd-new {change}`
172
-
173
- 1. Create ONE Kanon issue with a clean human-readable title:
174
- ```
175
- kanon_create_issue(
176
- projectKey: "{projectKey}",
177
- title: "[{Area}] {Human-readable description}",
178
- type: "{mapped-type}",
179
- description: "## Context\n{Initial change description}",
180
- labels: ["sdd"],
181
- groupKey: "{groupKey}" // from kanon_list_groups — match area to group
182
- )
183
- ```
184
- 2. If the title is ambiguous, ask the user: "What should this card be called on the board?"
185
- 3. Store the returned `issueKey` for ALL subsequent phases.
186
- 4. Set initial state to `explore` or `propose` depending on which phase runs first.
187
-
188
- #### On each SDD phase launch
189
-
190
- Pass the issue key and project key to the sub-agent:
191
- ```
192
- KANON: Project `{projectKey}`, issue `{issueKey}`.
193
- - Transition to `{phase_state}` at phase start.
194
- - After completing work, update the issue description to append your phase's findings.
195
- - Append your engram topic_key to the "Engram References" section.
196
- ```
197
-
198
- #### Type Mapping
199
-
200
- | SDD Change Type | Kanon Issue Type |
201
- |-----------------|------------------|
202
- | feature | `feature` |
203
- | bugfix | `bug` |
204
- | refactor | `task` |
205
- | investigation | `spike` |
206
-
207
- ### Sub-Agent Responsibilities
208
-
209
- Sub-agents that receive `kanon_issue_key` and `kanon_project_key`:
210
-
211
- 1. **FIRST action** — Transition the issue:
212
- ```
213
- kanon_transition_issue(issueKey: "{kanon_issue_key}", state: "{phase_state}")
214
- ```
215
- 2. **Do their phase work** — explore, design, spec, etc.
216
- 3. **LAST action before return** — Update the issue description:
217
- - Call `kanon_get_issue` to read the current description.
218
- - Append the relevant section (see Phase-Specific Enrichment Rules above).
219
- - Append the engram topic_key to "Engram References".
220
- - Call `kanon_update_issue` with the updated description.
221
- 4. **If any Kanon call fails** — Log a warning and continue. Never block work due to a Kanon error.
222
- 5. **Return envelope** — Include `kanon_issue_key` under `artifacts`.
223
-
224
145
  ---
225
146
 
226
147
  ## Non-SDD Usage
227
148
 
228
149
  Kanon is not only for SDD. Use it as a general work tracker:
229
150
 
230
- - **Track bugs found during work** — Create a card with type `bug`, label `bug`, clear title, and reproduction steps in the description.
231
- - **Create follow-up cards** — When implementation reveals additional work, create a new issue linked via description reference.
232
- - **Update existing issues** — When doing work related to an existing card, update its description with progress or findings.
233
- - **Check for related work** — Before creating a new issue, call `kanon_list_issues` with relevant filters to avoid duplicates.
234
- - **Close completed work** — Transition to `archived` when done, with a final description update summarizing the outcome.
151
+ - **Track bugs found during work** — Create a card with type `bug`, clear title, and reproduction steps.
152
+ - **Create follow-up cards** — When implementation reveals additional work, create a new issue.
153
+ - **Update existing issues** — When doing related work, update the description with progress.
154
+ - **Close completed work** — Transition to `archived` when done, with a final description update.
235
155
 
236
156
  ---
237
157
 
238
158
  ## Best Practices
239
159
 
240
- 1. **Titles are for humans** — Write every title as if a teammate will scan it on a board. No internal identifiers, no SDD jargon.
241
- 2. **Descriptions tell the story** — A person opening the card should understand what, why, how, and current status without any other tool.
242
- 3. **One card, one unit of work** — Resist the urge to create cards for SDD phases. The phases are workflow steps, not work items.
243
- 4. **Get before update** — Always call `kanon_get_issue` before `kanon_update_issue` to read current state and avoid overwriting content.
244
- 5. **Use filters when listing** — Always use the most specific filters available. Avoid listing all issues unfiltered.
245
- 6. **Issue keys are stable** — Store and pass `issueKey` (e.g. `KAN-42`) as the canonical reference. Do not rely on titles.
160
+ 1. **Titles are for humans** — Write every title as if a teammate will scan it on a board.
161
+ 2. **Descriptions tell the story** — A person opening the card should understand what, why, how, and current status.
162
+ 3. **One card, one unit of work** — Do not create cards for SDD phases. Phases are workflow steps, not work items.
163
+ 4. **Get before update** — Always call `kanon_get_issue` before `kanon_update_issue` to avoid overwriting content.
164
+ 5. **Use filters when listing** — Always use the most specific filters available.
165
+ 6. **Issue keys are stable** — Store and pass `issueKey` (e.g. `KAN-42`) as the canonical reference.
246
166
  7. **Batch transitions** — Use `kanon_batch_transition` when moving all issues in a group to the same state.
247
- 8. **Engram references are breadcrumbs** — Always include them so a future agent (or curious human) can dive deeper.
248
- 9. **Always check available groups** — Call `kanon_list_groups(projectKey)` before creating an issue. Ungrouped issues are harder to find on the board.
167
+ 8. **Engram references are breadcrumbs** — Always include them so a future agent can dive deeper.
168
+ 9. **Always check available groups** — Call `kanon_list_groups(projectKey)` before creating an issue.