@kanon-pm/setup 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/assets/.gitkeep +0 -0
- package/assets/skills/kanon-create-issue/SKILL.md +435 -0
- package/assets/skills/kanon-init/SKILL.md +363 -0
- package/assets/skills/kanon-mcp/SKILL.md +248 -0
- package/assets/skills/kanon-orchestrator-hooks/SKILL.md +43 -0
- package/assets/skills/kanon-roadmap/SKILL.md +466 -0
- package/assets/templates/claude-code-snippet.md +13 -0
- package/assets/templates/cursor-rules.mdc +29 -0
- package/assets/templates/gemini-instructions.md +19 -0
- package/assets/workflows/kanon-create-issue.md +9 -0
- package/assets/workflows/kanon-init.md +10 -0
- package/dist/auth.d.ts +14 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +33 -0
- package/dist/auth.js.map +1 -0
- package/dist/detect.d.ts +14 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/detect.js +50 -0
- package/dist/detect.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +200 -0
- package/dist/index.js.map +1 -0
- package/dist/installers/index.d.ts +5 -0
- package/dist/installers/index.d.ts.map +1 -0
- package/dist/installers/index.js +7 -0
- package/dist/installers/index.js.map +1 -0
- package/dist/mcp-config.d.ts +35 -0
- package/dist/mcp-config.d.ts.map +1 -0
- package/dist/mcp-config.js +125 -0
- package/dist/mcp-config.js.map +1 -0
- package/dist/registry.d.ts +12 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +109 -0
- package/dist/registry.js.map +1 -0
- package/dist/skills.d.ts +11 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +56 -0
- package/dist/skills.js.map +1 -0
- package/dist/templates.d.ts +17 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +86 -0
- package/dist/templates.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types.d.ts +28 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/workflows.d.ts +12 -0
- package/dist/workflows.d.ts.map +1 -0
- package/dist/workflows.js +61 -0
- package/dist/workflows.js.map +1 -0
- package/package.json +29 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kanon-init
|
|
3
|
+
description: Automated project onboarding — scan codebase, create Kanon project, seed initial issues, groups, and roadmap items from TODOs and architecture gaps
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
tags: [kanon, onboarding, project-setup, codebase-scan, batch]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Kanon Init — Automated Project Onboarding
|
|
9
|
+
|
|
10
|
+
Scan the current codebase, resolve or create a Kanon project, seed issues and roadmap items from TODO/FIXME comments and architecture gaps, and report results. One command takes a repo from unknown to fully tracked.
|
|
11
|
+
|
|
12
|
+
Supports two modes:
|
|
13
|
+
- **Interactive** (user-invoked via `/kanon-init`): workspace selection + single confirmation before creation
|
|
14
|
+
- **Batch** (sub-agent): zero interaction, workspace/project params passed as inputs
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Trigger
|
|
19
|
+
|
|
20
|
+
`/kanon-init`, `init project`, new project onboarding
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Inputs
|
|
25
|
+
|
|
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
|
+
| Input | Type | Required | Description |
|
|
29
|
+
|-------|------|----------|-------------|
|
|
30
|
+
| `workspaceId` | string | No | If provided, skip workspace selection (batch mode) |
|
|
31
|
+
| `projectKey` | string | No | If provided, skip project creation and seed into existing project |
|
|
32
|
+
| `projectName` | string | No | Override the derived project name |
|
|
33
|
+
|
|
34
|
+
**Mode detection**: If `workspaceId` is provided as input, run in **batch mode** (zero prompts). Otherwise, run in **interactive mode**.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Prerequisites
|
|
39
|
+
|
|
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."
|
|
48
|
+
|
|
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.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Phase 1: Discover
|
|
57
|
+
|
|
58
|
+
Scan the codebase to understand its structure, tech stack, and areas of concern.
|
|
59
|
+
|
|
60
|
+
### 1a: Directory Structure and Area Derivation
|
|
61
|
+
|
|
62
|
+
Scan top-level directories and workspace packages:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Glob("*") → top-level dirs and files
|
|
66
|
+
Glob("packages/*") → monorepo packages (if packages/ exists)
|
|
67
|
+
Glob("src/*") → flat project subdirs (if no packages/)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Map directories to human-readable groups using this table. Apply in order, first match wins per directory. **Cap at 5 groups.**
|
|
71
|
+
|
|
72
|
+
| Directory pattern | groupKey | Group name |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `packages/api`, `api/`, `server/` | `api` | API |
|
|
75
|
+
| `packages/web`, `web/`, `client/`, `frontend/` | `web` | Frontend |
|
|
76
|
+
| `packages/mcp` | `mcp` | MCP |
|
|
77
|
+
| `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) |
|
|
81
|
+
|
|
82
|
+
**Priority when capping at 5**: API > Frontend > Infrastructure > others alphabetically.
|
|
83
|
+
|
|
84
|
+
### 1b: Tech Stack Detection
|
|
85
|
+
|
|
86
|
+
Read manifest files at the project root (and workspace package roots for monorepos):
|
|
87
|
+
|
|
88
|
+
| File | Extract |
|
|
89
|
+
|------|---------|
|
|
90
|
+
| `package.json` | `name`, `description`, `dependencies`, `devDependencies`, `workspaces` |
|
|
91
|
+
| `go.mod` | Module path, Go version |
|
|
92
|
+
| `Cargo.toml` | Package name, dependencies |
|
|
93
|
+
| `pyproject.toml` | Project name, dependencies |
|
|
94
|
+
|
|
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.).
|
|
96
|
+
|
|
97
|
+
### 1c: TODO/FIXME Scan
|
|
98
|
+
|
|
99
|
+
Grep all source files for actionable comments:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Grep(pattern: "TODO|FIXME|HACK|XXX", output_mode: "content", head_limit: 20)
|
|
103
|
+
```
|
|
104
|
+
|
|
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.
|
|
106
|
+
|
|
107
|
+
### 1d: Architecture Gap Detection
|
|
108
|
+
|
|
109
|
+
Check for the existence of these paths. Missing = gap.
|
|
110
|
+
|
|
111
|
+
| Path to check | Gap if missing |
|
|
112
|
+
|---|---|
|
|
113
|
+
| `.github/workflows/` | CI/CD pipeline |
|
|
114
|
+
| `Dockerfile` or `docker-compose.yml` | Containerization |
|
|
115
|
+
| `.eslintrc*` or `eslint.config.*` | Linting configuration |
|
|
116
|
+
| `vitest.config.*` or `jest.config.*` | Test configuration |
|
|
117
|
+
| `README.md` | Project documentation |
|
|
118
|
+
| `docs/` | Documentation directory |
|
|
119
|
+
|
|
120
|
+
### 1e: README Content
|
|
121
|
+
|
|
122
|
+
If `README.md` exists, read the first 50 lines to extract the project's stated purpose.
|
|
123
|
+
|
|
124
|
+
### 1f: Derive Project Metadata
|
|
125
|
+
|
|
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"
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Phase 2: Resolve Project
|
|
134
|
+
|
|
135
|
+
Ensure the Kanon project exists without creating duplicates.
|
|
136
|
+
|
|
137
|
+
### 2a: Workspace Selection
|
|
138
|
+
|
|
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.
|
|
145
|
+
|
|
146
|
+
### 2b: Project Lookup
|
|
147
|
+
|
|
148
|
+
Call `kanon_list_projects(workspaceId)`.
|
|
149
|
+
|
|
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.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Phase 3: Seed Content
|
|
167
|
+
|
|
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
|
+
### 3a: Idempotency Check
|
|
171
|
+
|
|
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.
|
|
180
|
+
|
|
181
|
+
### 3b: Interactive Confirmation (interactive mode only)
|
|
182
|
+
|
|
183
|
+
In interactive mode, before creating anything, present a confirmation table:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
## Proposed Items
|
|
187
|
+
|
|
188
|
+
| # | Type | Title | Group |
|
|
189
|
+
|---|------|-------|-------|
|
|
190
|
+
| 1 | issue | [API] Fix N+1 query in user list | api |
|
|
191
|
+
| 2 | issue | [Infra] Set up GitHub Actions | infra |
|
|
192
|
+
| ... | | | |
|
|
193
|
+
| 11 | roadmap | Add test infrastructure | — |
|
|
194
|
+
|
|
195
|
+
Create all {N} items? (y/n)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Wait for user confirmation. If declined, skip creation entirely.
|
|
199
|
+
|
|
200
|
+
In **batch mode**, skip this step — create everything silently.
|
|
201
|
+
|
|
202
|
+
### 3c: Issue Creation
|
|
203
|
+
|
|
204
|
+
Create issues in priority order, respecting a **total cap of 10 issues**:
|
|
205
|
+
|
|
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`
|
|
209
|
+
|
|
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
|
+
```
|
|
249
|
+
|
|
250
|
+
#### Title Format
|
|
251
|
+
|
|
252
|
+
Always use: `[Area] Verb phrase`
|
|
253
|
+
|
|
254
|
+
Good: `[API] Add request validation middleware`, `[Infra] Set up GitHub Actions CI`
|
|
255
|
+
Bad: `TODO fix auth`, `packages/api needs work`
|
|
256
|
+
|
|
257
|
+
### 3d: Roadmap Item Creation
|
|
258
|
+
|
|
259
|
+
Create roadmap items for larger concerns detected during discovery. **Cap at 5 items.** Only create for gaps actually detected. Status: `idea` for all.
|
|
260
|
+
|
|
261
|
+
| Gap detected | Roadmap title | Horizon | Effort | Impact |
|
|
262
|
+
|---|---|---|---|---|
|
|
263
|
+
| No CI/CD pipeline | Add CI/CD pipeline | `now` | 3 | 5 |
|
|
264
|
+
| No test configuration | Set up test infrastructure | `now` | 2 | 4 |
|
|
265
|
+
| No docs/ directory | Add project documentation | `next` | 2 | 3 |
|
|
266
|
+
| No Dockerfile | Add containerization | `next` | 2 | 3 |
|
|
267
|
+
| No linting config | Set up linting and formatting | `later` | 1 | 2 |
|
|
268
|
+
|
|
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
|
+
### 3e: MCP Call Sequence
|
|
284
|
+
|
|
285
|
+
Execute in this order:
|
|
286
|
+
|
|
287
|
+
1. `kanon_list_issues(projectKey)` — cache for dedup
|
|
288
|
+
2. `kanon_list_roadmap(projectKey)` — cache for dedup
|
|
289
|
+
3. For each issue (in priority order): `kanon_create_issue(...)` — skip duplicates
|
|
290
|
+
4. For each roadmap item: `kanon_create_roadmap_item(...)` — skip duplicates
|
|
291
|
+
|
|
292
|
+
If any individual MCP call fails, log a warning and continue with the remaining items. Do not abort the entire flow.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Phase 4: Report
|
|
297
|
+
|
|
298
|
+
Present results and persist context.
|
|
299
|
+
|
|
300
|
+
### 4a: Summary Table
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
## Kanon Init Summary
|
|
304
|
+
|
|
305
|
+
| Category | Count | Details |
|
|
306
|
+
|----------|-------|---------|
|
|
307
|
+
| Project | 1 | {KEY} ({created | reused}) |
|
|
308
|
+
| Groups | {N} | {group1}, {group2}, ... |
|
|
309
|
+
| Issues created | {N} | {X} bugs, {Y} tasks |
|
|
310
|
+
| Issues skipped (duplicates) | {N} | — |
|
|
311
|
+
| Roadmap items created | {N} | — |
|
|
312
|
+
| Roadmap items skipped | {N} | — |
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### 4b: Save to Engram
|
|
316
|
+
|
|
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
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Edge Cases
|
|
339
|
+
|
|
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.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Best Practices
|
|
357
|
+
|
|
358
|
+
1. **Clean titles for seeded issues** — TODO comments are often terse. Expand them into proper `[Area] Description` titles a teammate can understand.
|
|
359
|
+
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.
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kanon-mcp
|
|
3
|
+
description: Human-facing project board integration — clean cards, meaningful titles, progressive enrichment from SDD and general work
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
tags: [kanon, project-management, sdd, issue-tracking]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Kanon MCP — Usage Guide
|
|
9
|
+
|
|
10
|
+
Kanon is the **human-facing project board**. Every card should be readable by a person who has never touched the codebase. Engram holds the technical memory; Kanon holds the work narrative.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Core Philosophy
|
|
15
|
+
|
|
16
|
+
| Layer | Purpose | Audience |
|
|
17
|
+
|-------|---------|----------|
|
|
18
|
+
| **Kanon** | Track units of work with clean titles, rich descriptions, and meaningful states | Humans (developers, leads, stakeholders) |
|
|
19
|
+
| **Engram** | Store SDD artifacts, technical decisions, and codebase knowledge | Agents across sessions |
|
|
20
|
+
| **The agent** | Bridge both — create clean Kanon cards, enrich them with engram context | Both |
|
|
21
|
+
|
|
22
|
+
**One issue = one unit of work.** SDD phases do NOT create separate issues. They transition the same issue through states and progressively enrich its description.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Available Tools
|
|
27
|
+
|
|
28
|
+
### Project and Group Discovery
|
|
29
|
+
|
|
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) |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Issue States
|
|
55
|
+
|
|
56
|
+
`backlog` | `explore` | `propose` | `design` | `spec` | `tasks` | `apply` | `verify` | `archived`
|
|
57
|
+
|
|
58
|
+
States reflect where the work currently stands — not which SDD phase generated an artifact.
|
|
59
|
+
|
|
60
|
+
## Issue Types and Priorities
|
|
61
|
+
|
|
62
|
+
**Types**: `feature`, `bug`, `task`, `spike`
|
|
63
|
+
|
|
64
|
+
**Priorities**: `critical`, `high`, `medium`, `low` — assign meaningfully, not everything is `medium`.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Human-Readable Issue Titles
|
|
69
|
+
|
|
70
|
+
Titles follow the pattern: `[Area] Clear action description`
|
|
71
|
+
|
|
72
|
+
The area tag groups related work visually on the board.
|
|
73
|
+
|
|
74
|
+
**Good titles:**
|
|
75
|
+
- `[Bridge] Sync engine connection pooling`
|
|
76
|
+
- `[Auth] JWT token refresh race condition`
|
|
77
|
+
- `[UI] Dark mode toggle in settings`
|
|
78
|
+
- `[API] Rate limiting for public endpoints`
|
|
79
|
+
|
|
80
|
+
**Bad titles (never do this):**
|
|
81
|
+
- `sdd/sync-engine/proposal`
|
|
82
|
+
- `sdd-new/kanon-bridge/spec`
|
|
83
|
+
- `apply dark-mode`
|
|
84
|
+
- `Implement feature`
|
|
85
|
+
|
|
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
|
+
---
|
|
89
|
+
|
|
90
|
+
## Progressive Description Enrichment
|
|
91
|
+
|
|
92
|
+
As work progresses, the issue description builds up incrementally. Each phase appends its section. A human opening the card sees the full story without needing engram access.
|
|
93
|
+
|
|
94
|
+
### Target Description Structure
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
## Context
|
|
98
|
+
[Why this work exists — added during explore/propose phase]
|
|
99
|
+
|
|
100
|
+
## Approach
|
|
101
|
+
[Technical approach chosen — added during design phase]
|
|
102
|
+
|
|
103
|
+
## Spec Summary
|
|
104
|
+
[Key requirements, acceptance criteria, edge cases — added during spec phase]
|
|
105
|
+
|
|
106
|
+
## Tasks
|
|
107
|
+
- [x] Task 1 — completed
|
|
108
|
+
- [ ] Task 2 — in progress
|
|
109
|
+
- [ ] Task 3 — pending
|
|
110
|
+
[Added during tasks phase, checkboxes updated during apply]
|
|
111
|
+
|
|
112
|
+
## Verification
|
|
113
|
+
[Test results, compliance status — added during verify phase]
|
|
114
|
+
|
|
115
|
+
## Engram References
|
|
116
|
+
- `sdd/{change}/proposal` — Full proposal details
|
|
117
|
+
- `sdd/{change}/spec` — Complete specification
|
|
118
|
+
- `sdd/{change}/design` — Architecture decisions
|
|
119
|
+
[Each phase appends its topic_key here as a breadcrumb trail]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Phase-Specific Enrichment Rules
|
|
123
|
+
|
|
124
|
+
| Phase Completing | Section to Add/Update | Content Source |
|
|
125
|
+
|------------------|-----------------------|----------------|
|
|
126
|
+
| explore | **Context** | Investigation findings, problem statement |
|
|
127
|
+
| 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 |
|
|
131
|
+
| apply | **Tasks** (update) | Check off completed items, note deviations |
|
|
132
|
+
| verify | **Verification** | Test results, compliance, remaining concerns |
|
|
133
|
+
| archive | All sections | Final polish, ensure completeness |
|
|
134
|
+
|
|
135
|
+
Every phase also appends its engram `topic_key` to the **Engram References** section.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Proactive Issue Creation
|
|
140
|
+
|
|
141
|
+
Create Kanon issues whenever the agent:
|
|
142
|
+
|
|
143
|
+
- **Starts meaningful work** — not just SDD, any substantial task the user requests
|
|
144
|
+
- **Discovers a bug** worth tracking during implementation
|
|
145
|
+
- **Identifies technical debt** that should not be forgotten
|
|
146
|
+
- **Finds follow-up items** during code review or verification
|
|
147
|
+
|
|
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`.
|
|
151
|
+
|
|
152
|
+
### Labels for Categorization
|
|
153
|
+
|
|
154
|
+
Use labels to make the board scannable:
|
|
155
|
+
|
|
156
|
+
| Label | When to use |
|
|
157
|
+
|-------|-------------|
|
|
158
|
+
| `sdd` | Work driven by SDD workflow |
|
|
159
|
+
| `bug` | Bugs found during any work |
|
|
160
|
+
| `tech-debt` | Identified technical debt for later |
|
|
161
|
+
| `exploration` | Spikes, investigations, research |
|
|
162
|
+
|
|
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
|
+
---
|
|
225
|
+
|
|
226
|
+
## Non-SDD Usage
|
|
227
|
+
|
|
228
|
+
Kanon is not only for SDD. Use it as a general work tracker:
|
|
229
|
+
|
|
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.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Best Practices
|
|
239
|
+
|
|
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.
|
|
246
|
+
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.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kanon-orchestrator-hooks
|
|
3
|
+
description: Kanon-specific hooks for the SDD orchestrator — ROADMAP injection into sub-agent prompts and post-phase deferred_items processing
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [kanon, sdd, orchestrator, roadmap]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Kanon Orchestrator Hooks
|
|
9
|
+
|
|
10
|
+
This skill is loaded by the orchestrator when launching SDD phases or processing phase results in the kanon project. It provides kanon-specific behavior that extends the generic SDD workflow.
|
|
11
|
+
|
|
12
|
+
## Hook 1: ROADMAP Injection for Sub-Agent Launches
|
|
13
|
+
|
|
14
|
+
When launching phases `sdd-explore`, `sdd-propose`, `sdd-design`, or `sdd-spec`, include this block in the sub-agent prompt:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
ROADMAP: When you identify out-of-scope or deferred work, list it in your return envelope
|
|
18
|
+
under `deferred_items`. Format: title ([Area] Description), reason, suggested_horizon (later/someday).
|
|
19
|
+
The orchestrator handles roadmap capture — do NOT create roadmap items yourself.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Hook 2: Post-Phase Roadmap Processing
|
|
23
|
+
|
|
24
|
+
After receiving results from `sdd-explore`, `sdd-propose`, `sdd-design`, or `sdd-spec`:
|
|
25
|
+
|
|
26
|
+
1. Check if `deferred_items` is present and non-empty in the return envelope.
|
|
27
|
+
2. If yes, present to user: "This phase identified {N} items as out of scope. Add any to the roadmap?"
|
|
28
|
+
3. For each confirmed item: load `kanon-roadmap` skill and follow Trigger 2 procedure (duplicate check via `kanon_list_roadmap`, create via `kanon_create_roadmap_item`, save to engram).
|
|
29
|
+
4. If `kanon-roadmap` skill is not loaded, load it from `.claude/skills/kanon-roadmap/SKILL.md`.
|
|
30
|
+
|
|
31
|
+
## Hook 3: Roadmap Capture During Conversation
|
|
32
|
+
|
|
33
|
+
Detect these signals during any conversation in the kanon project:
|
|
34
|
+
- "We should eventually...", "down the road", "someday", "not now but later"
|
|
35
|
+
- User describes friction, workarounds, or missing features they defer
|
|
36
|
+
- Out-of-scope items identified during any analysis
|
|
37
|
+
|
|
38
|
+
Action:
|
|
39
|
+
1. Acknowledge: "That sounds like a roadmap item for kanon."
|
|
40
|
+
2. Confirm: "Want me to add it?"
|
|
41
|
+
3. If yes: load `kanon-roadmap` skill for full capture behavior.
|
|
42
|
+
|
|
43
|
+
Do NOT create roadmap items without user confirmation.
|