@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
File without changes
@@ -0,0 +1,435 @@
1
+ ---
2
+ name: kanon-nl-create
3
+ description: Natural Language Issue Creation — parse user descriptions of bugs, features, and tasks into well-structured Kanon issues without manual field-filling
4
+ version: 1.0.0
5
+ tags: [kanon, issue-creation, natural-language, productivity]
6
+ ---
7
+
8
+ # Kanon NL Create — Natural Language Issue Creation
9
+
10
+ When a user describes a problem, feature, or task in natural language, this skill transforms that description into a well-structured Kanon issue — no manual field-filling required. The agent infers type, priority, labels, and description structure from the user's words and confirms before creating.
11
+
12
+ ---
13
+
14
+ ## Core Philosophy
15
+
16
+ The goal is zero friction. The user should be able to say "track this bug with the login redirect" and get a properly structured issue on the board without answering a form. The agent does the work of translating intent into structure.
17
+
18
+ **Always preview before creating.** Show the inferred card to the user before calling `kanon_create_issue`. A brief confirmation step prevents unwanted noise on the board.
19
+
20
+ ---
21
+
22
+ ## Trigger Conditions
23
+
24
+ Activate this skill when any of the following signals are present:
25
+
26
+ ### Explicit creation requests
27
+ - "Create an issue for..."
28
+ - "Add a ticket for..."
29
+ - "Open a card for..."
30
+ - "Track this as..."
31
+ - "Log a bug for..."
32
+ - "File this as a task..."
33
+ - "Can you create a Kanon issue for..."
34
+
35
+ ### Implicit creation signals
36
+ - User describes a bug or problem and says "let's track this" or "we should not forget this"
37
+ - After a bug fix, the agent identifies follow-up work or remaining risk
38
+ - User describes something in terms of "we need to...", "we should...", or "someone needs to..."
39
+ - User narrates a task or feature while discussing related work
40
+
41
+ ### Post-fix follow-up
42
+ After completing a bug fix or feature, if the agent discovers:
43
+ - Additional edge cases not addressed
44
+ - Refactoring needed but deferred
45
+ - Documentation gaps
46
+ - Related components that may have the same issue
47
+
48
+ The agent should say: "I also noticed [X] while working on this. Want me to create a follow-up issue?"
49
+
50
+ ---
51
+
52
+ ## NL → Structured Field Mapping
53
+
54
+ ### Title
55
+
56
+ - **Format**: `[Area] Imperative verb phrase`
57
+ - **Imperative form**: Use action verbs — "Fix", "Add", "Refactor", "Implement", "Remove", "Investigate"
58
+ - **Area**: Infer from domain or technology mentioned — `API`, `Auth`, `UI`, `DB`, `Infra`, `DX`, `Billing`, etc.
59
+ - **Keep it scannable**: A teammate should understand the card at a glance on a board
60
+
61
+ | User says | Title |
62
+ |-----------|-------|
63
+ | "there's a bug where the login page redirects to 404" | `[Auth] Fix login page redirect to 404` |
64
+ | "we need rate limiting on the public API" | `[API] Add rate limiting for public endpoints` |
65
+ | "refactor the user list to fix the N+1 query" | `[DB] Fix N+1 query in user list` |
66
+ | "investigate why deploys are slow" | `[Infra] Investigate slow deploy times` |
67
+
68
+ ### Type
69
+
70
+ Infer from the user's language:
71
+
72
+ | Signal words / context | Type |
73
+ |------------------------|------|
74
+ | "bug", "broken", "not working", "error", "crash", "regression", "fix" | `bug` |
75
+ | "add", "build", "implement", "new feature", "support", "allow users to" | `feature` |
76
+ | "refactor", "clean up", "improve", "migrate", "rename", "move", "simplify" | `task` |
77
+ | "investigate", "understand", "explore", "research", "figure out", "check if" | `spike` |
78
+
79
+ When ambiguous, default to `task`.
80
+
81
+ ### Priority
82
+
83
+ Infer from urgency signals:
84
+
85
+ | Signal | Priority |
86
+ |--------|----------|
87
+ | "blocking", "production down", "can't deploy", "urgent", "critical", "right now" | `critical` |
88
+ | "before release", "important", "customer-facing", "this week", "high priority" | `high` |
89
+ | "should fix", "eventually fix", "not urgent but", no strong signals | `medium` |
90
+ | "nice to have", "low priority", "someday", "minor", "cosmetic" | `low` |
91
+
92
+ When no urgency signal is present, default to `medium`.
93
+
94
+ ### Labels
95
+
96
+ Infer from domain, technology, and concern type mentioned:
97
+
98
+ | User mentions | Labels to add |
99
+ |---------------|---------------|
100
+ | Authentication, login, tokens, JWT, sessions | `auth` |
101
+ | API endpoints, REST, GraphQL, rate limiting | `api` |
102
+ | Database, queries, migrations, indexes | `db` |
103
+ | UI components, styling, layout, dark mode | `ui` |
104
+ | Performance, speed, latency, caching | `performance` |
105
+ | Security vulnerabilities, XSS, injection | `security` |
106
+ | Infrastructure, deployment, CI/CD | `infra` |
107
+ | Developer experience, tooling, scripts | `dx` |
108
+ | Technical debt, cleanup, refactor | `tech-debt` |
109
+ | Testing, coverage, flaky tests | `testing` |
110
+
111
+ Multiple labels are allowed and encouraged when multiple concerns are present.
112
+
113
+ ### Description
114
+
115
+ Always generate a structured markdown description. Use what the user said to fill in as much as possible. Leave sections as prompts when information is not available.
116
+
117
+ **Template**:
118
+
119
+ ```markdown
120
+ ## Context
121
+ {What the problem or need is, derived from user's description}
122
+
123
+ ## Acceptance Criteria
124
+ - {Condition 1 that must be true when this is done}
125
+ - {Condition 2}
126
+ - {Add more as needed}
127
+
128
+ ## Notes
129
+ {Any technical context, reproduction steps, constraints, or references mentioned by the user}
130
+ ```
131
+
132
+ For **bugs**, include a reproduction section if steps were mentioned:
133
+
134
+ ```markdown
135
+ ## Context
136
+ {Bug description}
137
+
138
+ ## Reproduction Steps
139
+ 1. {Step 1}
140
+ 2. {Step 2}
141
+ 3. Expected: {what should happen}
142
+ 4. Actual: {what happens instead}
143
+
144
+ ## Acceptance Criteria
145
+ - Bug no longer reproduces following the steps above
146
+ - {Any additional fix criteria}
147
+
148
+ ## Notes
149
+ {Additional context}
150
+ ```
151
+
152
+ For **spikes**, use an outcome-oriented template:
153
+
154
+ ```markdown
155
+ ## Context
156
+ {Why this investigation is needed}
157
+
158
+ ## Questions to Answer
159
+ - {Question 1}
160
+ - {Question 2}
161
+
162
+ ## Deliverable
163
+ {What the spike should produce — a decision, a document, a prototype, a recommendation}
164
+
165
+ ## Notes
166
+ {Any known constraints or starting points}
167
+ ```
168
+
169
+ ### Group
170
+
171
+ Before creating any issue, call `kanon_list_groups(projectKey)` to discover available groups. Match the issue's area or domain keywords against existing group names. If a group matches, include `groupKey` in the creation call.
172
+
173
+ | Issue area / domain | Group match strategy |
174
+ |---------------------|----------------------|
175
+ | Area tag in title (e.g., `Auth`, `API`, `UI`) | Match against group names case-insensitively |
176
+ | Labels or domain keywords | Match if a group name contains or closely matches the keyword |
177
+ | No match found | Omit `groupKey` — do not create groups, only use existing ones |
178
+
179
+ If multiple groups could match, prefer the most specific one. When unsure, ask the user: "Should this go in the '{group}' group?"
180
+
181
+ ### Default State
182
+
183
+ Always create with `state: backlog` (the API default). Do not transition the issue unless the user explicitly says it is in progress or ready to start.
184
+
185
+ ---
186
+
187
+ ## Confirmation Pattern
188
+
189
+ Before calling `kanon_create_issue`, always show a preview card and ask for confirmation. This prevents cluttering the board with misunderstood issues.
190
+
191
+ **Card preview format**:
192
+
193
+ ```
194
+ Here is the issue I would create:
195
+
196
+ Title: [Auth] Fix login page redirect to 404
197
+ Type: bug
198
+ Priority: high
199
+ Labels: auth, ui
200
+ Group: Authentication (matched from available groups)
201
+ State: backlog
202
+
203
+ Description:
204
+ ## Context
205
+ The login page redirects to a 404 error page after submitting credentials...
206
+ ...
207
+
208
+ Create it? [yes / edit / cancel]
209
+ ```
210
+
211
+ If the user says "edit" or points out corrections, update the preview and show it again before creating.
212
+
213
+ If the user says "yes" or similar confirmation, call `kanon_create_issue` and report the created issue key.
214
+
215
+ ---
216
+
217
+ ## Worked Examples
218
+
219
+ ### Example 1: Simple Bug Report
220
+
221
+ **User input**:
222
+ > "There's a bug where logging in with Google OAuth redirects to a 404. Let's track it."
223
+
224
+ **Inferred structure**:
225
+ - Title: `[Auth] Fix Google OAuth redirect to 404`
226
+ - Type: `bug`
227
+ - Priority: `medium` (no urgency signal)
228
+ - Labels: `auth`
229
+ - Description: Context with the reported behavior, acceptance criteria that the redirect no longer 404s
230
+
231
+ **Agent calls `kanon_list_groups("KAN")` and finds groups including `Authentication` (key: `auth-group`).**
232
+
233
+ **Preview shown to user**:
234
+ ```
235
+ Here is the issue I would create:
236
+
237
+ Title: [Auth] Fix Google OAuth redirect to 404
238
+ Type: bug
239
+ Priority: medium
240
+ Labels: auth
241
+ Group: Authentication (matched from available groups)
242
+ State: backlog
243
+
244
+ Description:
245
+ ## Context
246
+ Logging in with Google OAuth redirects to a 404 error page instead of the expected
247
+ post-login destination.
248
+
249
+ ## Acceptance Criteria
250
+ - Google OAuth login completes without a 404 redirect
251
+ - User lands on the correct post-login page after authenticating
252
+
253
+ ## Notes
254
+ No reproduction steps provided. Investigate OAuth callback URL configuration.
255
+
256
+ Create it?
257
+ ```
258
+
259
+ **User**: "Yes, but make it high priority — it's blocking QA."
260
+
261
+ **Agent updates and creates**:
262
+ ```
263
+ kanon_create_issue(
264
+ projectKey: "KAN",
265
+ title: "[Auth] Fix Google OAuth redirect to 404",
266
+ type: "bug",
267
+ priority: "high",
268
+ labels: ["auth"],
269
+ groupKey: "auth-group", // matched "Authentication" group
270
+ description: "..."
271
+ )
272
+ ```
273
+
274
+ **Agent reports**: "Created KAN-47."
275
+
276
+ ---
277
+
278
+ ### Example 2: Feature Request Mid-Conversation
279
+
280
+ **User input**:
281
+ > "We should add rate limiting to the public API before we go live. Not urgent right now but let's not forget."
282
+
283
+ **Inferred structure**:
284
+ - Title: `[API] Add rate limiting for public endpoints`
285
+ - Type: `feature`
286
+ - Priority: `low` ("not urgent")
287
+ - Labels: `api`, `security`
288
+ - Description: Context about pre-launch requirement, acceptance criteria around per-endpoint limits
289
+
290
+ **Preview shown to user**:
291
+ ```
292
+ Here is the issue I would create:
293
+
294
+ Title: [API] Add rate limiting for public endpoints
295
+ Type: feature
296
+ Priority: low
297
+ Labels: api, security
298
+ State: backlog
299
+
300
+ Description:
301
+ ## Context
302
+ Rate limiting is needed on public API endpoints before the public launch to prevent
303
+ abuse and ensure fair usage.
304
+
305
+ ## Acceptance Criteria
306
+ - Rate limits are enforced on all public-facing API endpoints
307
+ - Requests exceeding the limit receive an appropriate error response (e.g., 429)
308
+ - Limits are configurable per endpoint or API key tier
309
+
310
+ ## Notes
311
+ Not urgent. To be addressed before public launch.
312
+
313
+ Create it?
314
+ ```
315
+
316
+ **User**: "Yes."
317
+
318
+ **Agent creates and reports**: "Created KAN-48."
319
+
320
+ ---
321
+
322
+ ### Example 3: Post-Fix Follow-Up Discovery
323
+
324
+ **Context**: Agent just finished fixing a memory leak in the image upload handler.
325
+
326
+ **Agent proactively says**:
327
+ > "While fixing the memory leak I noticed the video upload handler has the same pattern — it's not leaking yet but it will under load. Want me to create a follow-up issue for it?"
328
+
329
+ **User**: "Yeah track it."
330
+
331
+ **Inferred structure**:
332
+ - Title: `[Media] Fix potential memory leak in video upload handler`
333
+ - Type: `bug` (potential bug, proactive fix)
334
+ - Priority: `medium`
335
+ - Labels: `performance`
336
+
337
+ **Preview shown and confirmed, then created**: "Created KAN-49."
338
+
339
+ ---
340
+
341
+ ### Example 4: Vague Task Description
342
+
343
+ **User input**:
344
+ > "Add a task to investigate why our CI builds are taking so long."
345
+
346
+ **Inferred structure**:
347
+ - Title: `[Infra] Investigate slow CI build times`
348
+ - Type: `spike`
349
+ - Priority: `medium`
350
+ - Labels: `infra`, `dx`
351
+ - Description: Questions-to-answer format with deliverable being a recommendation
352
+
353
+ **Preview shown to user**:
354
+ ```
355
+ Here is the issue I would create:
356
+
357
+ Title: [Infra] Investigate slow CI build times
358
+ Type: spike
359
+ Priority: medium
360
+ Labels: infra, dx
361
+ State: backlog
362
+
363
+ Description:
364
+ ## Context
365
+ CI builds are running slowly. Root cause is unknown. Investigation needed to identify
366
+ bottlenecks and recommend improvements.
367
+
368
+ ## Questions to Answer
369
+ - What are the slowest steps in the build pipeline?
370
+ - Are there caching opportunities not currently utilized?
371
+ - Is the slowness consistent or intermittent?
372
+
373
+ ## Deliverable
374
+ A written recommendation with specific changes to reduce build time.
375
+
376
+ ## Notes
377
+ No baseline timing data provided. Start by capturing current step-by-step timing.
378
+
379
+ Create it?
380
+ ```
381
+
382
+ **User**: "Looks good, create it."
383
+
384
+ **Agent creates and reports**: "Created KAN-50."
385
+
386
+ ---
387
+
388
+ ## Integration — `kanon_create_issue` Reference
389
+
390
+ ```
391
+ kanon_create_issue(
392
+ projectKey: "{projectKey}", // required — get from project context
393
+ title: "{title}", // required — [Area] Imperative description
394
+ type: "feature|bug|task|spike", // optional — inferred from NL
395
+ priority: "critical|high|medium|low", // optional — inferred from NL
396
+ description: "{markdown}", // optional — structured markdown
397
+ labels: ["{label1}", ...], // optional — inferred from domain/tech
398
+ // Other optional fields when context provides them:
399
+ groupKey: "{groupKey}", // from kanon_list_groups — match area/domain to group
400
+ assigneeId: "{userId}", // if user specifies "assign to X"
401
+ dueDate: "{ISO-date}" // if deadline is mentioned
402
+ )
403
+ ```
404
+
405
+ The tool returns the created issue object including its `issueKey` (e.g., `KAN-42`). Always report this key to the user after creation.
406
+
407
+ **Before creating**, call `kanon_list_issues(projectKey, ...)` with relevant filters (type, label) to check for duplicates. If a similar issue exists, surface it to the user: "There is already an open issue that looks related: KAN-35 '[Auth] OAuth callback configuration'. Is this the same thing, or a separate issue?"
408
+
409
+ ---
410
+
411
+ ## Edge Cases and Clarifications
412
+
413
+ **When the project key is unknown**: Ask the user or call `kanon_list_projects` to find it. Do not guess.
414
+
415
+ **When the description is very short**: Generate a minimal but valid description. It is better to create a sparse issue than to block on asking for details. The user can enrich it later.
416
+
417
+ **When the user provides conflicting signals** (e.g., "not urgent but this is critical"): Favor the strongest concrete signal. If truly ambiguous, ask: "Should I mark this high or medium priority?"
418
+
419
+ **When the issue is actually a roadmap item**: If the user uses language like "someday", "eventually", "down the road", or "it would be nice if", consider whether this belongs on the roadmap instead of the backlog. Reference the `kanon-roadmap` skill and suggest: "This sounds more like a roadmap item than an actionable issue — want me to add it to the roadmap instead?"
420
+
421
+ **When multiple issues are implied**: If the user describes multiple distinct problems or features in one message, identify each one and offer to create separate issues: "I see two things here. Want me to create separate issues for both?"
422
+
423
+ ---
424
+
425
+ ## Best Practices
426
+
427
+ 1. **Always preview first** — Never create an issue without showing the structured card and getting confirmation.
428
+ 2. **Titles are for humans** — Every title should be scannable on a board by someone who was not in this conversation.
429
+ 3. **Infer boldly, adjust gracefully** — Make confident inferences from the NL input. If the user corrects you, update immediately without argument.
430
+ 4. **Check for duplicates** — A quick `kanon_list_issues` with a label or type filter before creation prevents board clutter.
431
+ 5. **Report the issue key** — Always echo the created issue key (e.g., "Created KAN-42") so the user has a reference.
432
+ 6. **Default to backlog** — Issues created here are not yet in progress. Let the user or workflow move them forward.
433
+ 7. **Structured descriptions matter** — A person opening the card later should understand what to do without needing this conversation.
434
+ 8. **Roadmap vs issue** — If the request is exploratory or clearly deferred, suggest the roadmap. Do not cram everything into the backlog.
435
+ 9. **Check groups before creating** — Always call `kanon_list_groups(projectKey)` and assign `groupKey` when a match exists. Ungrouped issues are harder to find on the board.