@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.
Files changed (60) hide show
  1. package/assets/.gitkeep +0 -0
  2. package/assets/skills/kanon-create-issue/SKILL.md +435 -0
  3. package/assets/skills/kanon-init/SKILL.md +363 -0
  4. package/assets/skills/kanon-mcp/SKILL.md +248 -0
  5. package/assets/skills/kanon-orchestrator-hooks/SKILL.md +43 -0
  6. package/assets/skills/kanon-roadmap/SKILL.md +466 -0
  7. package/assets/templates/claude-code-snippet.md +13 -0
  8. package/assets/templates/cursor-rules.mdc +29 -0
  9. package/assets/templates/gemini-instructions.md +19 -0
  10. package/assets/workflows/kanon-create-issue.md +9 -0
  11. package/assets/workflows/kanon-init.md +10 -0
  12. package/dist/auth.d.ts +14 -0
  13. package/dist/auth.d.ts.map +1 -0
  14. package/dist/auth.js +33 -0
  15. package/dist/auth.js.map +1 -0
  16. package/dist/detect.d.ts +14 -0
  17. package/dist/detect.d.ts.map +1 -0
  18. package/dist/detect.js +50 -0
  19. package/dist/detect.js.map +1 -0
  20. package/dist/index.d.ts +3 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +200 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/installers/index.d.ts +5 -0
  25. package/dist/installers/index.d.ts.map +1 -0
  26. package/dist/installers/index.js +7 -0
  27. package/dist/installers/index.js.map +1 -0
  28. package/dist/mcp-config.d.ts +35 -0
  29. package/dist/mcp-config.d.ts.map +1 -0
  30. package/dist/mcp-config.js +125 -0
  31. package/dist/mcp-config.js.map +1 -0
  32. package/dist/registry.d.ts +12 -0
  33. package/dist/registry.d.ts.map +1 -0
  34. package/dist/registry.js +109 -0
  35. package/dist/registry.js.map +1 -0
  36. package/dist/skills.d.ts +11 -0
  37. package/dist/skills.d.ts.map +1 -0
  38. package/dist/skills.js +56 -0
  39. package/dist/skills.js.map +1 -0
  40. package/dist/templates.d.ts +17 -0
  41. package/dist/templates.d.ts.map +1 -0
  42. package/dist/templates.js +86 -0
  43. package/dist/templates.js.map +1 -0
  44. package/dist/tools/index.d.ts +3 -0
  45. package/dist/tools/index.d.ts.map +1 -0
  46. package/dist/tools/index.js +4 -0
  47. package/dist/tools/index.js.map +1 -0
  48. package/dist/types.d.ts +28 -0
  49. package/dist/types.d.ts.map +1 -0
  50. package/dist/types.js +3 -0
  51. package/dist/types.js.map +1 -0
  52. package/dist/utils/index.d.ts +3 -0
  53. package/dist/utils/index.d.ts.map +1 -0
  54. package/dist/utils/index.js +5 -0
  55. package/dist/utils/index.js.map +1 -0
  56. package/dist/workflows.d.ts +12 -0
  57. package/dist/workflows.d.ts.map +1 -0
  58. package/dist/workflows.js +61 -0
  59. package/dist/workflows.js.map +1 -0
  60. package/package.json +29 -0
@@ -0,0 +1,466 @@
1
+ ---
2
+ name: kanon-roadmap
3
+ description: Proactive roadmap capture — recognize future work during conversations and SDD workflows, create and enrich roadmap items automatically
4
+ version: 2.0.0
5
+ tags: [kanon, roadmap, planning, proactive-capture]
6
+ ---
7
+
8
+ # Kanon Roadmap — Proactive Capture Guide
9
+
10
+ Kanon's roadmap is where **future work lives before it becomes actionable**. Roadmap items track ideas, planned features, and improvements organized by time horizon. The agent's job is to capture these items proactively — without waiting to be asked.
11
+
12
+ ---
13
+
14
+ ## Core Philosophy
15
+
16
+ | Layer | Purpose | Audience |
17
+ |-------|---------|----------|
18
+ | **Roadmap items** | Track future work that is not yet actionable | Humans (developers, leads, stakeholders) |
19
+ | **Issues** | Track actionable work currently in progress or ready to start | Humans |
20
+ | **Engram** | Store technical memory, SDD artifacts, decisions | Agents across sessions |
21
+ | **The agent** | Bridge all three — capture future work to roadmap, promote to issues when ready, link to engram for technical depth | Both |
22
+
23
+ **Roadmap is not a backlog.** It is a planning tool organized by time horizons. Items move from vague ideas (someday) toward concrete plans (now), and when ready, get promoted to actionable issues.
24
+
25
+ ---
26
+
27
+ ## Project Resolution (mandatory)
28
+
29
+ The user should never need to know or type a project key (e.g. `"MCLAW"`). The agent infers the project and resolves the key internally.
30
+
31
+ ### How to resolve the project
32
+
33
+ 1. **Infer the project name from the current working directory.** Use the basename of `cwd` (e.g. `/home/user/workspace/micro-claw` → `micro-claw`). The user is always inside the project directory when they run roadmap commands.
34
+ 2. **Resolve the project key** by calling `kanon_list_projects(workspaceId)` and matching the inferred name against the `name` field of returned projects (case-insensitive, normalize hyphens/underscores/spaces). If there is exactly one match, use its `key` as the `projectKey` for all subsequent tool calls.
35
+ 3. **If no match is found**: Tell the user — "I couldn't find a Kanon project matching '{inferred-name}'. You can create one with `/kanon-init` or tell me the project name to use."
36
+ 4. **If multiple matches are found**: Present the options using human-readable names and let the user choose.
37
+ 5. **Cache the resolved `projectKey`** for the rest of the session. Do not re-resolve on every call.
38
+
39
+ ### User-facing communication
40
+
41
+ - Always refer to the project by its human-readable name (e.g. "micro-claw"), never by its key (e.g. "MCLAW").
42
+ - The project key is an internal implementation detail passed to tool calls only.
43
+ - In examples below, `projectKey` parameters show placeholder values like `"PROJ"` — the agent resolves the real key at runtime using the steps above.
44
+
45
+ ---
46
+
47
+ ## Available Tools
48
+
49
+ ### Roadmap Management
50
+
51
+ | Tool | Purpose | Key Parameters |
52
+ |------|---------|----------------|
53
+ | `kanon_list_roadmap(projectKey, ...)` | List roadmap items with optional filters | `projectKey` (required); filters: `horizon`, `status`, `label` |
54
+ | `kanon_create_roadmap_item(projectKey, title, ...)` | Create a new roadmap item | `projectKey`, `title` (required); optional: `description`, `horizon`, `status`, `effort`, `impact`, `labels`, `targetDate` |
55
+ | `kanon_update_roadmap_item(projectKey, itemId, ...)` | Update a roadmap item | `projectKey`, `itemId` (required); optional: `title`, `description`, `horizon`, `status`, `effort`, `impact`, `labels`, `targetDate`, `sortOrder` |
56
+ | `kanon_delete_roadmap_item(projectKey, itemId)` | Permanently delete a roadmap item | `projectKey`, `itemId` (required) |
57
+ | `kanon_promote_roadmap_item(projectKey, itemId, ...)` | Promote a roadmap item to an actionable issue | `projectKey`, `itemId` (required); optional: `title`, `type`, `priority`, `labels`, `groupKey` |
58
+
59
+ ### Dependency Management
60
+
61
+ | Tool | Purpose | Key Parameters |
62
+ |------|---------|----------------|
63
+ | `kanon_add_dependency(projectKey, sourceItemId, targetItemId, ...)` | Add a blocks relationship between two roadmap items | `projectKey`, `sourceItemId`, `targetItemId` (required); optional: `type` (only `"blocks"` supported) |
64
+ | `kanon_remove_dependency(projectKey, sourceItemId, dependencyId)` | Remove a dependency | `projectKey`, `sourceItemId`, `dependencyId` (required — the dependency's own UUID, not the target item's ID) |
65
+
66
+ **Parameter note**: All tools that reference a roadmap item use `itemId` (UUID), NOT `id`. This is the exact parameter name the MCP tools expect.
67
+
68
+ ---
69
+
70
+ ## Horizons
71
+
72
+ Horizon answers **when** — where this item sits in the planning timeline.
73
+
74
+ | Horizon | Meaning | Typical items |
75
+ |---------|---------|---------------|
76
+ | **now** | Ready to promote — team could start this soon | Well-understood items with clear scope |
77
+ | **next** | Planned for the near future — needs a bit more definition | Items with known value but some open questions |
78
+ | **later** | Valuable but not urgent — will revisit when priorities shift | Good ideas that need time to mature |
79
+ | **someday** | Ideas, wishes, long-term dreams — no commitment | Brainstorms, exploratory concepts, "wouldn't it be nice" |
80
+
81
+ **Default horizon**: `later` — the API default. Use `someday` for truly vague or speculative ideas. Items naturally move left as they gain clarity and urgency.
82
+
83
+ ---
84
+
85
+ ## Status
86
+
87
+ Status answers **what state** the item is in — independent of horizon.
88
+
89
+ | Status | Meaning |
90
+ |--------|---------|
91
+ | **idea** | Default. Not yet evaluated or committed to |
92
+ | **planned** | Committed to — decision made to do this work, but not started |
93
+ | **in_progress** | Actively being worked on (usually means it has been promoted or is underway) |
94
+ | **done** | Completed — kept for historical reference |
95
+
96
+ **Horizon vs Status**: Horizon = when (timeline placement). Status = what state (lifecycle). An item can be `horizon: now, status: planned` (ready timeline, decision made but not started) or `horizon: later, status: idea` (future, still exploratory).
97
+
98
+ ---
99
+
100
+ ## Effort and Impact Scoring
101
+
102
+ Both use a 1-5 integer scale. These are optional but help prioritize.
103
+
104
+ | Score | Effort (how much work) | Impact (how much value) |
105
+ |-------|----------------------|------------------------|
106
+ | 1 | Trivial — an hour or less | Marginal improvement |
107
+ | 2 | Small — a day or less | Nice to have |
108
+ | 3 | Medium — a few days | Meaningful improvement |
109
+ | 4 | Large — a week or more | Significant value |
110
+ | 5 | Massive — multi-week effort | Transformative |
111
+
112
+ **High impact + low effort** items are strong candidates for moving to `now` or `next`.
113
+
114
+ ---
115
+
116
+ ## Target Date
117
+
118
+ Use `targetDate` (ISO 8601, e.g. `"2026-06-01"`) when an item has a known external deadline or milestone dependency. This is optional and distinct from horizon — a `later` item can still have a target date (e.g., "before Q3 review").
119
+
120
+ ---
121
+
122
+ ## Roadmap Item vs Issue — When to Use Which
123
+
124
+ | Signal | Create a... | Why |
125
+ |--------|-------------|-----|
126
+ | "We should do X someday" | **Roadmap item** | Future work, not ready to act on |
127
+ | "This would be nice to have eventually" | **Roadmap item** | Idea worth capturing, no urgency |
128
+ | SDD explore/propose identifies out-of-scope work | **Roadmap item** | Related future work surfaced during planning |
129
+ | "Let's fix this now" / "This is blocking" | **Issue** | Actionable work, ready to start |
130
+ | Bug found during implementation | **Issue** | Needs attention, has concrete reproduction steps |
131
+ | Roadmap item reaches `now` and team is ready | **Promote** the roadmap item | Graduates from planning to execution |
132
+
133
+ **Rule of thumb**: If someone could start working on it tomorrow with a clear understanding of what to do, it is an issue. If it needs more thought, scoping, or is explicitly deferred, it is a roadmap item.
134
+
135
+ ---
136
+
137
+ ## Proactive Capture Triggers
138
+
139
+ These are situations where the agent MUST consider creating or updating a roadmap item **without being explicitly asked**. Always confirm with the user before creating.
140
+
141
+ ### Trigger 1: Problem Capture During Conversations
142
+
143
+ **When**: The user discusses a problem, limitation, or improvement opportunity that is not being addressed right now.
144
+
145
+ **Detection signals**:
146
+ - "We should eventually..."
147
+ - "It would be nice if..."
148
+ - "That's a problem but not urgent"
149
+ - "Let's deal with that later"
150
+ - "Down the road we could..."
151
+ - User describes friction, workarounds, or manual processes
152
+ - User mentions a feature they wish existed
153
+
154
+ **Action**:
155
+ 1. Acknowledge the idea: "That sounds like a good candidate for the roadmap."
156
+ 2. Ask for confirmation: "Want me to add it as a roadmap item?"
157
+ 3. If yes, create with appropriate horizon:
158
+ - User says "not urgent" / "eventually" / "someday" -> `someday` or `later`
159
+ - User says "soon" / "next sprint" / "after this" -> `next`
160
+ - User says "ready to go" / "we should start soon" -> `now`
161
+ 4. Use a clear, human-readable title (same `[Area] Description` pattern as issues).
162
+
163
+ **Example**:
164
+ ```
165
+ User (cwd: /home/user/workspace/micro-claw):
166
+ "The API doesn't have rate limiting. It hasn't been a problem yet but we should add it before we go public."
167
+
168
+ Agent (internally resolves micro-claw -> projectKey "MCLAW" via kanon_list_projects):
169
+ "That sounds like a good roadmap item for micro-claw — rate limiting before public launch. Want me to add it?"
170
+
171
+ User: "Yeah, go ahead."
172
+
173
+ -> kanon_create_roadmap_item(
174
+ projectKey: "MCLAW", // resolved internally, never shown to user
175
+ title: "[API] Add rate limiting for public endpoints",
176
+ description: "No rate limiting currently. Need to add before public launch to prevent abuse. Consider per-endpoint limits and API key tiers.",
177
+ horizon: "next",
178
+ impact: 4,
179
+ labels: ["api", "security"]
180
+ )
181
+ ```
182
+
183
+ After creating, save the item ID to engram for cross-session lookup:
184
+ ```
185
+ mem_save(
186
+ title: "Roadmap item: [API] Add rate limiting",
187
+ type: "discovery",
188
+ topic_key: "kanon/roadmap/api-rate-limiting",
189
+ content: "itemId: {returned-uuid}\nTitle: [API] Add rate limiting for public endpoints\nHorizon: next"
190
+ )
191
+ ```
192
+
193
+ ### Trigger 2: SDD Exploration and Proposal Capture
194
+
195
+ **When**: During SDD workflows (explore, propose), the orchestrator identifies features, improvements, or related work that is explicitly marked as "out of scope", "future work", "deferred", or "not included in this change".
196
+
197
+ **This is the orchestrator's responsibility** — not the sub-agent's. The orchestrator reviews deferred items after `sdd-explore` and `sdd-propose` phases complete, then handles roadmap capture directly.
198
+
199
+ **Detection signals**:
200
+ - Proposal says "out of scope: X, Y, Z"
201
+ - Exploration surfaces related problems not covered by the current change
202
+ - Design document mentions "future enhancement"
203
+ - Spec excludes scenarios with "deferred to future work"
204
+
205
+ **Action**:
206
+ 1. After the SDD phase returns, extract the list of deferred/out-of-scope items from the executive summary.
207
+ 2. Present the list to the user: "The proposal identified these items as out of scope. Want me to add any to the roadmap?"
208
+ 3. For each confirmed item:
209
+ - Check for duplicates first: `kanon_list_roadmap(projectKey, ...)` with relevant filters.
210
+ - If no existing item, create one:
211
+ - Horizon: `later` (known value, intentionally deferred) or `someday` (vague, needs more thought)
212
+ - Status: `idea` (not yet committed)
213
+ - Description: Reference the SDD change name that surfaced it
214
+ - Labels: Include the SDD change area for traceability
215
+ - If an existing item covers this, update it with the new context.
216
+ 4. Save each created item's ID to engram (see Trigger 1 pattern above).
217
+
218
+ **Injection block for sub-agents** — include this in SDD phase prompts so sub-agents surface deferred items clearly:
219
+ ```
220
+ ROADMAP: When you identify out-of-scope or deferred work in your output, list it explicitly
221
+ under a "Deferred Items" heading in your executive_summary. Include: item title, why it was
222
+ deferred, and suggested horizon (later/someday). The orchestrator will handle roadmap capture.
223
+ ```
224
+
225
+ **Example**:
226
+ ```
227
+ SDD proposal for "auth-redesign" returns with deferred items:
228
+ "Out of scope: SSO integration, API key management, audit logging"
229
+
230
+ Orchestrator presents to user:
231
+ "The auth-redesign proposal deferred 3 items. Add any to roadmap?
232
+ 1. SSO integration for enterprise users
233
+ 2. API key management
234
+ 3. Audit logging"
235
+
236
+ User: "Add 1 and 3."
237
+
238
+ -> kanon_create_roadmap_item(
239
+ projectKey: "{resolved-key}", // resolved internally from cwd project name
240
+ title: "[Auth] SSO integration for enterprise users",
241
+ description: "Identified during auth-redesign (sdd/auth-redesign/proposal). Deferred from current scope. Would need SAML/OIDC provider support.",
242
+ horizon: "later",
243
+ impact: 4,
244
+ effort: 4,
245
+ labels: ["auth", "enterprise"]
246
+ )
247
+
248
+ -> kanon_create_roadmap_item(
249
+ projectKey: "{resolved-key}", // resolved internally from cwd project name
250
+ title: "[Auth] Audit logging for auth events",
251
+ description: "Identified during auth-redesign (sdd/auth-redesign/proposal). Deferred from current scope.",
252
+ horizon: "later",
253
+ impact: 3,
254
+ effort: 2,
255
+ labels: ["auth", "security"]
256
+ )
257
+ ```
258
+
259
+ ### Trigger 3: Progressive Enrichment
260
+
261
+ **When**: The agent learns new information about an existing roadmap item across sessions or during related work.
262
+
263
+ **Detection signals**:
264
+ - Working on something related to an existing roadmap item
265
+ - User mentions updated priorities or timelines
266
+ - New technical context changes the effort/impact estimate
267
+ - A dependency is resolved that unblocks a roadmap item
268
+ - User says "actually that X thing is more urgent now"
269
+
270
+ **Action**:
271
+ 1. Search for the existing item — first check engram (`mem_search` with `kanon/roadmap/{slug}`), then fall back to `kanon_list_roadmap(projectKey, ...)`.
272
+ 2. Update the relevant fields:
273
+ - New context learned -> update `description` (append, do not overwrite)
274
+ - Priority changed -> update `horizon` (e.g., `later` -> `next`) and/or `status`
275
+ - Better understanding of scope -> update `effort` and/or `impact`
276
+ - Known deadline identified -> set `targetDate`
277
+ - Related work completed -> note it in `description`
278
+ 3. Use `kanon_update_roadmap_item` with only the changed fields.
279
+
280
+ **Cross-session lookup pattern**: When creating a roadmap item, always save its ID to engram so future agents can find it without scanning the full roadmap:
281
+ ```
282
+ mem_save(
283
+ title: "Roadmap item ID: {slugified-title}",
284
+ type: "discovery",
285
+ scope: "project",
286
+ topic_key: "kanon/roadmap/{item-slug}",
287
+ content: "itemId: {uuid}\nTitle: {title}\nProjectKey: {projectKey}\nHorizon: {horizon}"
288
+ )
289
+ ```
290
+ On future sessions, do `mem_search(query: "kanon/roadmap/{slug}")` → `mem_get_observation(id)` → use the stored `itemId` directly.
291
+
292
+ **Example**:
293
+ ```
294
+ Agent is working on database optimization. Finds that the "full-text search" roadmap item
295
+ would benefit from the new indexes being added.
296
+
297
+ First, look up the item ID from engram:
298
+ mem_search(query: "kanon/roadmap/full-text-search") -> get itemId
299
+
300
+ -> kanon_update_roadmap_item(
301
+ projectKey: "{resolved-key}", // resolved internally from cwd project name
302
+ itemId: "{item-uuid}",
303
+ description: "{existing description}\n\n---\nUpdate 2026-03-24: Database optimization work added indexes that would support this. Effort estimate reduced.",
304
+ effort: 2 // was 4, now easier because of new indexes
305
+ )
306
+ ```
307
+
308
+ ---
309
+
310
+ ## Dependencies
311
+
312
+ Dependencies express **blocks** relationships between roadmap items. Item A blocks item B means B cannot start until A is complete.
313
+
314
+ ### When to Use Dependencies
315
+
316
+ - One item requires infrastructure or foundation work from another (e.g., "API versioning" blocks "Deprecate v1 endpoints")
317
+ - A feature depends on a prerequisite feature being in place
318
+ - You want to make sequencing visible on the roadmap
319
+
320
+ ### How Dependencies Work
321
+
322
+ ```
323
+ kanon_add_dependency(
324
+ projectKey: "{resolved-key}",
325
+ sourceItemId: "{blocker-item-uuid}", // the item that must complete first
326
+ targetItemId: "{blocked-item-uuid}", // the item waiting on the blocker
327
+ type: "blocks" // only "blocks" is currently supported
328
+ )
329
+ ```
330
+
331
+ The API enforces **cycle prevention** — if adding the dependency would create a circular chain, it returns an error. Do not retry; resolve the modeling issue instead.
332
+
333
+ To remove a dependency, you need the `dependencyId` (the dependency record's own UUID, returned when the dependency was created), not the target item's ID:
334
+
335
+ ```
336
+ kanon_remove_dependency(
337
+ projectKey: "{resolved-key}",
338
+ sourceItemId: "{blocker-item-uuid}",
339
+ dependencyId: "{dependency-record-uuid}"
340
+ )
341
+ ```
342
+
343
+ ### Dependency Guidance
344
+
345
+ - Use sparingly — only when the dependency is a real sequencing constraint, not just topical similarity.
346
+ - If two items are related but either could proceed independently, use labels or description references instead.
347
+ - Before adding a dependency, confirm both items exist and their IDs are correct.
348
+
349
+ ---
350
+
351
+ ## Deletion
352
+
353
+ Use `kanon_delete_roadmap_item` to permanently remove an item. This is irreversible.
354
+
355
+ **When deletion is appropriate**:
356
+ - Duplicate item created in error
357
+ - Idea explicitly rejected and no historical value in keeping it
358
+ - Item was merged into another item (update the surviving item's description first to capture any unique context from the deleted one)
359
+
360
+ **When NOT to delete**:
361
+ - Item was completed — use `status: "done"` and keep it for history
362
+ - Item was deprioritized — use `horizon: "someday"` or `status: "idea"`
363
+ - Item was promoted to an issue — it is automatically marked `promoted: true`, leave it
364
+
365
+ ```
366
+ kanon_delete_roadmap_item(
367
+ projectKey: "{resolved-key}",
368
+ itemId: "{item-uuid}"
369
+ )
370
+ ```
371
+
372
+ ---
373
+
374
+ ## Promotion — When and How
375
+
376
+ Promotion converts a roadmap item into an actionable Kanon issue. The roadmap item is marked as `promoted` and linked to the new issue via a back-reference.
377
+
378
+ ### When to Promote
379
+
380
+ - The item's horizon has reached `now`
381
+ - The team/user explicitly says "let's do this"
382
+ - An SDD workflow is about to start for this item
383
+ - A dependency was resolved that makes the item actionable
384
+
385
+ ### How to Promote
386
+
387
+ ```
388
+ kanon_promote_roadmap_item(
389
+ projectKey: "{resolved-key}",
390
+ itemId: "{roadmap-item-uuid}",
391
+ title: "[Area] Clear action title", // optional — defaults to roadmap item title
392
+ type: "feature", // optional — defaults based on content
393
+ priority: "medium", // optional
394
+ groupKey: "sprint-4" // optional — assign to a sprint/group
395
+ )
396
+ ```
397
+
398
+ **After promotion**: The new issue is created with the roadmap item's description as initial context. The roadmap item gets `promoted: true` and retains its history. Multiple issues can be promoted from a single roadmap item (e.g., a large feature broken into phases).
399
+
400
+ ---
401
+
402
+ ## Cross-Skill Coordination
403
+
404
+ When both `kanon-mcp` and `kanon-roadmap` skills are active in the same session, responsibilities are split:
405
+
406
+ | Responsibility | Handled by |
407
+ |----------------|------------|
408
+ | Issue creation and enrichment during SDD phases | Sub-agents (per kanon-mcp KANON: block) |
409
+ | Roadmap deferred-item capture after sdd-explore / sdd-propose | Orchestrator (per kanon-roadmap Trigger 2) |
410
+ | Issue state transitions per SDD phase | Sub-agents |
411
+ | Roadmap item lifecycle (horizon/status updates) | Orchestrator or agent responding to user signals |
412
+ | Saving roadmap item IDs to engram | Whoever creates the item — immediately after creation |
413
+
414
+ **Do not** ask sub-agents to create roadmap items for out-of-scope work. That is the orchestrator's job, done with user confirmation after the phase returns.
415
+
416
+ ---
417
+
418
+ ## Human-Readable Titles
419
+
420
+ Follow the same pattern as Kanon issues: `[Area] Clear action description`
421
+
422
+ **Good titles**:
423
+ - `[API] Rate limiting for public endpoints`
424
+ - `[UI] Dark mode support across all pages`
425
+ - `[Infra] Migrate from Heroku to Fly.io`
426
+ - `[DX] Automated database seeding for local dev`
427
+
428
+ **Bad titles (never do this)**:
429
+ - `Rate limiting` (too vague, no area)
430
+ - `TODO: maybe add dark mode?` (not a clear description)
431
+ - `sdd/auth/future-work-1` (internal jargon)
432
+ - `Feature request from user` (meaningless on a board)
433
+
434
+ ---
435
+
436
+ ## Labels for Categorization
437
+
438
+ Use labels to make the roadmap scannable and filterable:
439
+
440
+ | Label | When to use |
441
+ |-------|-------------|
442
+ | `performance` | Speed, caching, optimization work |
443
+ | `security` | Auth, encryption, access control |
444
+ | `ux` | User experience improvements |
445
+ | `dx` | Developer experience, tooling, workflows |
446
+ | `infra` | Infrastructure, deployment, monitoring |
447
+ | `tech-debt` | Known shortcuts that need revisiting |
448
+ | `integration` | Third-party services, APIs, plugins |
449
+
450
+ Use domain-specific labels (e.g., `auth`, `api`, `billing`) alongside category labels for cross-referencing.
451
+
452
+ ---
453
+
454
+ ## Best Practices
455
+
456
+ 1. **Confirm before creating** — Always ask the user before adding a roadmap item. A quick "Want me to add that to the roadmap?" is enough.
457
+ 2. **Titles are for humans** — Write every title as if a stakeholder will scan it on a planning board.
458
+ 3. **Descriptions tell the story** — Include why it matters, what problem it solves, and any known constraints. A person reading the card should understand the item without additional context.
459
+ 4. **Start vague, refine over time** — Items in `someday` can have minimal descriptions. As they move toward `now`, enrich them with scope, effort estimates, and acceptance criteria.
460
+ 5. **Check for duplicates** — Before creating, call `kanon_list_roadmap` to see if a similar item already exists. Update the existing item rather than creating a duplicate.
461
+ 6. **Link to context** — When a roadmap item is surfaced by SDD work, reference the change name in the description so future agents can trace the connection.
462
+ 7. **Do not over-capture** — Not every passing thought needs a roadmap item. Capture things the user explicitly agrees are worth tracking, or things identified as deferred scope in SDD.
463
+ 8. **Save IDs to engram** — After creating any roadmap item, save its `itemId` to engram with `topic_key: kanon/roadmap/{slug}`. This is the only reliable way to find it across sessions.
464
+ 9. **Effort and impact are living estimates** — Update them as understanding grows. Initial estimates are guesses; that is fine.
465
+ 10. **Promote at the right time** — Do not promote items in `later` or `someday` unless the user explicitly asks. Promotion means "ready to work on."
466
+ 11. **One roadmap item can spawn multiple issues** — Large features may be promoted in phases. Each promotion creates a separate issue linked back to the same roadmap item.
@@ -0,0 +1,13 @@
1
+ <!-- kanon-mcp-start -->
2
+ ## Kanon Project Management (installed by pnpm setup:mcp)
3
+
4
+ Kanon MCP tools (kanon_*) are available for project management. Load skills ON-DEMAND when their trigger matches.
5
+
6
+ | Skill | Trigger |
7
+ |-------|---------|
8
+ | kanon-init | "init project", "/kanon-init", new project onboarding |
9
+ | kanon-create-issue | "create an issue", "track this", "log a bug" |
10
+ | kanon-mcp | Issue management, board updates, state transitions |
11
+ | kanon-roadmap | "later", "someday", deferred work capture |
12
+ | kanon-orchestrator-hooks | SDD phase launches, deferred_items processing, roadmap injection |
13
+ <!-- kanon-mcp-end -->
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Kanon project management integration — use kanon MCP tools for issue tracking, roadmap capture, and project onboarding
3
+ alwaysApply: false
4
+ ---
5
+
6
+ # Kanon MCP Integration
7
+
8
+ Kanon MCP tools (`kanon_*`) are available for project management. Use them in the situations described below.
9
+
10
+ ## When to Use Kanon Tools
11
+
12
+ ### Issue Creation
13
+ When the user describes a bug, feature request, or task that should be tracked, use `kanon_create_issue` to create a well-structured issue. Follow these conventions:
14
+ - Title format: `[Area] Verb phrase` (e.g., `[API] Add authentication middleware`)
15
+ - Check available groups first with `kanon_list_groups(projectKey)` and assign `groupKey` when a matching group exists
16
+ - Set appropriate priority and type based on the user's description
17
+
18
+ ### Issue Tracking
19
+ When the user's work maps to an existing issue, use Kanon tools to keep the board in sync:
20
+ - `kanon_list_issues` — find relevant issues for the current work
21
+ - `kanon_get_issue` — retrieve full issue details and context
22
+ - `kanon_transition_issue` — move issues through workflow states (e.g., to-do, in-progress, done)
23
+ - `kanon_update_issue` — update issue details as work progresses
24
+
25
+ ### Roadmap Capture
26
+ When future work is identified during development (deferred ideas, follow-up tasks, technical debt), use `kanon_create_roadmap_item` to capture it for later prioritization. This prevents good ideas from being lost.
27
+
28
+ ### Project Onboarding
29
+ When onboarding a new codebase to Kanon, use `kanon_create_project` to set up the project, then use `kanon_list_groups` and `kanon_create_issue` to seed initial structure.
@@ -0,0 +1,19 @@
1
+ <!-- kanon-mcp-start -->
2
+ ## Kanon Project Management (installed by pnpm setup:mcp)
3
+
4
+ Kanon MCP tools (kanon_*) are available for project management.
5
+
6
+ Available workflows:
7
+ - `/kanon-init` — Scan codebase, create project, seed issues and roadmap items
8
+ - `/kanon-create-issue` — Create an issue from natural language description
9
+
10
+ Available skills (auto-loaded when relevant):
11
+ - kanon-mcp — Issue management, board updates, state transitions
12
+ - kanon-roadmap — Capture deferred work as roadmap items
13
+ - kanon-orchestrator-hooks — SDD phase launches, deferred_items processing, roadmap injection
14
+
15
+ When creating issues:
16
+ - Title format: `[Area] Verb phrase`
17
+ - Check available groups first: `kanon_list_groups(projectKey)`
18
+ - Assign groupKey when a matching group exists
19
+ <!-- kanon-mcp-end -->
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Create a Kanon issue from a natural language description
3
+ ---
4
+
5
+ Load and follow the kanon-create-issue skill. Parse the user's description and create a well-structured issue:
6
+
7
+ 1. **Parse** — Infer type, priority, labels, and area from the description
8
+ 2. **Preview** — Show the structured card to the user for confirmation
9
+ 3. **Create** — Call kanon_create_issue and report the issue key
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Initialize a Kanon project — scan codebase, create project, seed issues and roadmap items
3
+ ---
4
+
5
+ Load and follow the kanon-init skill. Execute all 4 phases using the kanon MCP tools:
6
+
7
+ 1. **Discover** — Scan directory structure, tech stack, TODOs/FIXMEs, and architecture gaps
8
+ 2. **Resolve Project** — Find or create the Kanon project in the workspace
9
+ 3. **Seed Content** — Create issues from TODOs and gaps, roadmap items for larger concerns
10
+ 4. **Report** — Present a summary of what was created
package/dist/auth.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ interface AuthResult {
2
+ apiUrl: string;
3
+ apiKey: string;
4
+ }
5
+ /**
6
+ * Resolve API URL and key with precedence: CLI flags > env vars > interactive prompt.
7
+ * apiUrl is required; apiKey is optional (some setups don't need it).
8
+ */
9
+ export declare function resolveAuth(options: {
10
+ apiUrl?: string;
11
+ apiKey?: string;
12
+ }): Promise<AuthResult>;
13
+ export {};
14
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,UAAU,CAAC,CAmBtB"}
package/dist/auth.js ADDED
@@ -0,0 +1,33 @@
1
+ // ─── Auth Resolution ─────────────────────────────────────────────────────────
2
+ import readline from "node:readline";
3
+ /**
4
+ * Resolve API URL and key with precedence: CLI flags > env vars > interactive prompt.
5
+ * apiUrl is required; apiKey is optional (some setups don't need it).
6
+ */
7
+ export async function resolveAuth(options) {
8
+ let apiUrl = options.apiUrl || process.env["KANON_API_URL"] || "";
9
+ let apiKey = options.apiKey || process.env["KANON_API_KEY"] || "";
10
+ if (!apiUrl) {
11
+ apiUrl = await prompt("Kanon API URL: ");
12
+ }
13
+ if (!apiUrl) {
14
+ throw new Error("API URL is required. Provide via --api-url, KANON_API_URL env var, or enter it when prompted.");
15
+ }
16
+ if (!apiKey) {
17
+ apiKey = await prompt("Kanon API Key (press Enter to skip): ");
18
+ }
19
+ return { apiUrl, apiKey };
20
+ }
21
+ function prompt(question) {
22
+ const rl = readline.createInterface({
23
+ input: process.stdin,
24
+ output: process.stdout,
25
+ });
26
+ return new Promise((resolve) => {
27
+ rl.question(question, (answer) => {
28
+ rl.close();
29
+ resolve(answer.trim());
30
+ });
31
+ });
32
+ }
33
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,OAAO,QAAQ,MAAM,eAAe,CAAC;AAOrC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAGjC;IACC,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IAClE,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IAElE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,+FAA+F,CAChG,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,MAAM,MAAM,CAAC,uCAAuC,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC;AAED,SAAS,MAAM,CAAC,QAAgB;IAC9B,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IAEH,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YAC/B,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Check if running inside WSL by reading /proc/version.
3
+ */
4
+ export declare function isWsl(): boolean;
5
+ /**
6
+ * Resolve Windows home directory from within WSL.
7
+ * Uses cmd.exe to get %USERNAME% and constructs /mnt/c/Users/<user>.
8
+ */
9
+ export declare function resolveWinHome(): string | undefined;
10
+ /**
11
+ * Check if a command exists on the system.
12
+ */
13
+ export declare function commandExists(cmd: string): boolean;
14
+ //# sourceMappingURL=detect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../src/detect.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAO/B;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,SAAS,CAiBnD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOlD"}