@su-record/vibe 2.8.24 → 2.8.26

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 (222) hide show
  1. package/dist/cli/commands/config.d.ts +17 -0
  2. package/dist/cli/commands/config.d.ts.map +1 -0
  3. package/dist/cli/commands/config.js +207 -0
  4. package/dist/cli/commands/config.js.map +1 -0
  5. package/dist/cli/commands/index.d.ts +2 -0
  6. package/dist/cli/commands/index.d.ts.map +1 -1
  7. package/dist/cli/commands/index.js +2 -0
  8. package/dist/cli/commands/index.js.map +1 -1
  9. package/dist/cli/commands/info.d.ts.map +1 -1
  10. package/dist/cli/commands/info.js +2 -0
  11. package/dist/cli/commands/info.js.map +1 -1
  12. package/dist/cli/commands/init.d.ts.map +1 -1
  13. package/dist/cli/commands/init.js +78 -54
  14. package/dist/cli/commands/init.js.map +1 -1
  15. package/dist/cli/commands/stats.d.ts +13 -0
  16. package/dist/cli/commands/stats.d.ts.map +1 -0
  17. package/dist/cli/commands/stats.js +280 -0
  18. package/dist/cli/commands/stats.js.map +1 -0
  19. package/dist/cli/index.d.ts.map +1 -1
  20. package/dist/cli/index.js +33 -1
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  23. package/dist/cli/postinstall/constants.js +1 -0
  24. package/dist/cli/postinstall/constants.js.map +1 -1
  25. package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
  26. package/dist/cli/setup/GlobalInstaller.js +7 -7
  27. package/dist/cli/setup/GlobalInstaller.js.map +1 -1
  28. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
  29. package/dist/cli/setup/ProjectSetup.js +18 -12
  30. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  31. package/dist/infra/lib/ContextCompressor.d.ts.map +1 -1
  32. package/dist/infra/lib/ContextCompressor.js +10 -4
  33. package/dist/infra/lib/ContextCompressor.js.map +1 -1
  34. package/dist/infra/lib/ProjectCache.d.ts +2 -2
  35. package/dist/infra/lib/ProjectCache.d.ts.map +1 -1
  36. package/dist/infra/lib/ProjectCache.js +4 -3
  37. package/dist/infra/lib/ProjectCache.js.map +1 -1
  38. package/dist/infra/lib/utils.d.ts +24 -0
  39. package/dist/infra/lib/utils.d.ts.map +1 -1
  40. package/dist/infra/lib/utils.js +41 -0
  41. package/dist/infra/lib/utils.js.map +1 -1
  42. package/dist/infra/orchestrator/SmartRouter.d.ts +3 -0
  43. package/dist/infra/orchestrator/SmartRouter.d.ts.map +1 -1
  44. package/dist/infra/orchestrator/SmartRouter.js +11 -1
  45. package/dist/infra/orchestrator/SmartRouter.js.map +1 -1
  46. package/dist/infra/orchestrator/SmartRouter.test.d.ts +5 -0
  47. package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +1 -0
  48. package/dist/infra/orchestrator/SmartRouter.test.js +457 -0
  49. package/dist/infra/orchestrator/SmartRouter.test.js.map +1 -0
  50. package/dist/tools/convention/analyzeComplexity.d.ts.map +1 -1
  51. package/dist/tools/convention/analyzeComplexity.js +18 -10
  52. package/dist/tools/convention/analyzeComplexity.js.map +1 -1
  53. package/dist/tools/convention/checkCouplingCohesion.d.ts.map +1 -1
  54. package/dist/tools/convention/checkCouplingCohesion.js +14 -6
  55. package/dist/tools/convention/checkCouplingCohesion.js.map +1 -1
  56. package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +1 -1
  57. package/dist/tools/semantic/analyzeDependencyGraph.js +1 -1
  58. package/dist/tools/semantic/analyzeDependencyGraph.js.map +1 -1
  59. package/dist/tools/semantic/findReferences.d.ts.map +1 -1
  60. package/dist/tools/semantic/findReferences.js +13 -13
  61. package/dist/tools/semantic/findReferences.js.map +1 -1
  62. package/dist/tools/semantic/findSymbol.d.ts.map +1 -1
  63. package/dist/tools/semantic/findSymbol.js +12 -13
  64. package/dist/tools/semantic/findSymbol.js.map +1 -1
  65. package/dist/tools/semantic/lsp.d.ts.map +1 -1
  66. package/dist/tools/semantic/lsp.js +22 -14
  67. package/dist/tools/semantic/lsp.js.map +1 -1
  68. package/hooks/hooks.json +29 -0
  69. package/hooks/scripts/__tests__/keyword-detector.test.js +199 -0
  70. package/hooks/scripts/__tests__/pre-tool-guard.test.js +286 -0
  71. package/hooks/scripts/__tests__/sentinel-guard.test.js +210 -0
  72. package/hooks/scripts/auto-commit.js +65 -0
  73. package/hooks/scripts/auto-format.js +64 -0
  74. package/hooks/scripts/auto-test.js +81 -0
  75. package/hooks/scripts/code-check.js +139 -0
  76. package/hooks/scripts/command-log.js +32 -0
  77. package/hooks/scripts/context-save.js +60 -6
  78. package/hooks/scripts/hud-status.js +32 -2
  79. package/hooks/scripts/llm-orchestrate.js +95 -17
  80. package/hooks/scripts/pr-test-gate.js +52 -0
  81. package/package.json +1 -1
  82. package/skills/agents-md/rubrics/what-to-keep.md +49 -0
  83. package/skills/agents-md/templates/agents-md.md +36 -0
  84. package/skills/arch-guard/agents/detector.md +48 -0
  85. package/skills/arch-guard/agents/reporter.md +48 -0
  86. package/skills/arch-guard/agents/rule-generator.md +49 -0
  87. package/skills/arch-guard/agents/violation-checker.md +51 -0
  88. package/skills/arch-guard/frameworks/clean-architecture.md +108 -0
  89. package/skills/arch-guard/frameworks/solid.md +102 -0
  90. package/skills/arch-guard/scripts/check-boundaries.js +90 -0
  91. package/skills/arch-guard/templates/arch-rules.json +47 -0
  92. package/skills/arch-guard/templates/violation-report.md +53 -0
  93. package/skills/brand-assets/rubrics/asset-checklist.md +98 -0
  94. package/skills/brand-assets/templates/brand-guide.md +161 -0
  95. package/skills/capability-loop/agents/capability-designer.md +61 -0
  96. package/skills/capability-loop/agents/failure-analyst.md +55 -0
  97. package/skills/capability-loop/agents/implementer.md +50 -0
  98. package/skills/capability-loop/agents/tester.md +53 -0
  99. package/skills/capability-loop/templates/capability-spec.md +118 -0
  100. package/skills/capability-loop/templates/failure-analysis.md +118 -0
  101. package/skills/characterization-test/agents/behavior-capturer.md +50 -0
  102. package/skills/characterization-test/agents/coverage-checker.md +54 -0
  103. package/skills/characterization-test/agents/reporter.md +50 -0
  104. package/skills/characterization-test/agents/test-writer.md +49 -0
  105. package/skills/characterization-test/rubrics/coverage-criteria.md +53 -0
  106. package/skills/characterization-test/templates/test-template.ts +101 -0
  107. package/skills/claude-md-guide/rubrics/anti-patterns.md +88 -0
  108. package/skills/claude-md-guide/templates/claude-md.md +54 -0
  109. package/skills/commerce-patterns/rubrics/checkout-flow.md +48 -0
  110. package/skills/commerce-patterns/templates/product-schema.md +85 -0
  111. package/skills/commit-push-pr/agents/change-analyzer.md +55 -0
  112. package/skills/commit-push-pr/agents/message-writer.md +50 -0
  113. package/skills/commit-push-pr/agents/pr-writer.md +58 -0
  114. package/skills/commit-push-pr/agents/reviewer.md +52 -0
  115. package/skills/commit-push-pr/rubrics/commit-message.md +73 -0
  116. package/skills/commit-push-pr/templates/pr-body.md +63 -0
  117. package/skills/context7-usage/rubrics/when-to-use.md +50 -0
  118. package/skills/create-prd/agents/edge-case-finder.md +48 -0
  119. package/skills/create-prd/agents/prioritizer.md +60 -0
  120. package/skills/create-prd/agents/requirements-writer.md +48 -0
  121. package/skills/create-prd/agents/researcher.md +55 -0
  122. package/skills/create-prd/agents/reviewer.md +54 -0
  123. package/skills/create-prd/frameworks/jobs-to-be-done.md +96 -0
  124. package/skills/create-prd/frameworks/rice-scoring.md +97 -0
  125. package/skills/create-prd/orchestrator.md +70 -0
  126. package/skills/create-prd/rubrics/completeness.md +58 -0
  127. package/skills/create-prd/templates/prd.md +139 -0
  128. package/skills/design-audit/agents/a11y-auditor.md +43 -0
  129. package/skills/design-audit/agents/performance-auditor.md +46 -0
  130. package/skills/design-audit/agents/responsive-auditor.md +46 -0
  131. package/skills/design-audit/agents/scorer.md +47 -0
  132. package/skills/design-audit/agents/slop-detector.md +47 -0
  133. package/skills/design-audit/frameworks/core-web-vitals.md +107 -0
  134. package/skills/design-audit/frameworks/wcag-checklist.md +64 -0
  135. package/skills/design-audit/orchestrator.md +64 -0
  136. package/skills/design-audit/rubrics/ai-slop-patterns.md +83 -0
  137. package/skills/design-audit/rubrics/scoring.md +63 -0
  138. package/skills/design-audit/templates/report.md +88 -0
  139. package/skills/design-critique/rubrics/ux-heuristics.md +143 -0
  140. package/skills/design-critique/templates/critique-report.md +86 -0
  141. package/skills/design-distill/templates/design-system.md +132 -0
  142. package/skills/design-normalize/rubrics/token-naming.md +117 -0
  143. package/skills/design-normalize/templates/token-audit.md +89 -0
  144. package/skills/design-polish/rubrics/polish-checklist.md +68 -0
  145. package/skills/design-polish/templates/polish-report.md +64 -0
  146. package/skills/design-teach/rubrics/brand-personality.md +73 -0
  147. package/skills/design-teach/templates/design-context.json +36 -0
  148. package/skills/e2e-commerce/templates/test-scenarios.md +170 -0
  149. package/skills/event-comms/templates/email-invite.md +99 -0
  150. package/skills/event-comms/templates/sns-post.md +133 -0
  151. package/skills/event-ops/rubrics/contingency.md +85 -0
  152. package/skills/event-ops/templates/d-day-checklist.md +65 -0
  153. package/skills/event-planning/rubrics/timeline.md +70 -0
  154. package/skills/event-planning/templates/event-plan.md +91 -0
  155. package/skills/exec-plan/agents/decomposer.md +47 -0
  156. package/skills/exec-plan/agents/dependency-mapper.md +44 -0
  157. package/skills/exec-plan/agents/estimator.md +43 -0
  158. package/skills/exec-plan/agents/validator.md +55 -0
  159. package/skills/exec-plan/orchestrator.md +70 -0
  160. package/skills/exec-plan/rubrics/complexity-scoring.md +75 -0
  161. package/skills/exec-plan/templates/plan.md +147 -0
  162. package/skills/git-worktree/rubrics/when-to-use.md +55 -0
  163. package/skills/handoff/agents/context-summarizer.md +51 -0
  164. package/skills/handoff/agents/document-writer.md +63 -0
  165. package/skills/handoff/agents/state-collector.md +53 -0
  166. package/skills/handoff/agents/verifier.md +48 -0
  167. package/skills/handoff/rubrics/completeness.md +62 -0
  168. package/skills/handoff/templates/handoff.md +107 -0
  169. package/skills/parallel-research/agents/best-practices.md +43 -0
  170. package/skills/parallel-research/agents/codebase-patterns.md +46 -0
  171. package/skills/parallel-research/agents/framework-docs.md +45 -0
  172. package/skills/parallel-research/agents/security-advisory.md +46 -0
  173. package/skills/parallel-research/agents/synthesizer.md +52 -0
  174. package/skills/parallel-research/experts/best-practices.md +50 -0
  175. package/skills/parallel-research/experts/codebase-patterns.md +70 -0
  176. package/skills/parallel-research/experts/framework-docs.md +65 -0
  177. package/skills/parallel-research/experts/security-advisory.md +69 -0
  178. package/skills/parallel-research/orchestrator.md +65 -0
  179. package/skills/parallel-research/templates/synthesis.md +101 -0
  180. package/skills/prioritization-frameworks/rubrics/frameworks.md +79 -0
  181. package/skills/prioritization-frameworks/templates/scoring-matrix.md +69 -0
  182. package/skills/priority-todos/rubrics/prioritization.md +70 -0
  183. package/skills/priority-todos/templates/todo-board.md +59 -0
  184. package/skills/seo-checklist/frameworks/structured-data.md +153 -0
  185. package/skills/seo-checklist/rubrics/content-seo.md +42 -0
  186. package/skills/seo-checklist/rubrics/technical-seo.md +48 -0
  187. package/skills/techdebt/agents/analyzer.md +50 -0
  188. package/skills/techdebt/agents/fixer.md +41 -0
  189. package/skills/techdebt/agents/reviewer.md +47 -0
  190. package/skills/techdebt/agents/scanner.md +44 -0
  191. package/skills/techdebt/orchestrator.md +70 -0
  192. package/skills/techdebt/rubrics/severity.md +51 -0
  193. package/skills/techdebt/scripts/scan.js +90 -0
  194. package/skills/techdebt/templates/report.md +86 -0
  195. package/skills/tool-fallback/rubrics/fallback-chain.md +58 -0
  196. package/skills/typescript-advanced-types/rubrics/type-patterns.md +109 -0
  197. package/skills/ui-ux-pro-max/rubrics/interaction-states.md +83 -0
  198. package/skills/ui-ux-pro-max/rubrics/responsive-breakpoints.md +99 -0
  199. package/skills/user-personas/rubrics/research-methods.md +56 -0
  200. package/skills/user-personas/templates/persona.md +89 -0
  201. package/skills/vercel-react-best-practices/rubrics/performance.md +82 -0
  202. package/skills/vercel-react-best-practices/rubrics/server-components.md +86 -0
  203. package/skills/vibe-docs/SKILL.md +171 -0
  204. package/skills/vibe-docs/templates/architecture.md +80 -0
  205. package/skills/vibe-docs/templates/readme.md +84 -0
  206. package/skills/vibe-docs/templates/release-notes.md +74 -0
  207. package/skills/vibe-figma/SKILL.md +122 -206
  208. package/skills/vibe-figma/rubrics/extraction-checklist.md +51 -0
  209. package/skills/vibe-figma/templates/figma-handoff.md +96 -0
  210. package/skills/vibe-figma-analyze/rubrics/analysis-dimensions.md +53 -0
  211. package/skills/vibe-figma-codegen/rubrics/code-quality.md +54 -0
  212. package/skills/vibe-figma-consolidate/templates/consolidation-report.md +95 -0
  213. package/skills/vibe-figma-convert/SKILL.md +13 -175
  214. package/skills/vibe-figma-convert/rubrics/conversion-rules.md +83 -0
  215. package/skills/vibe-figma-convert/templates/component.md +152 -0
  216. package/skills/vibe-figma-extract/rubrics/image-rules.md +67 -0
  217. package/skills/vibe-figma-frame/rubrics/frame-selection.md +55 -0
  218. package/skills/vibe-figma-pipeline/rubrics/pipeline-stages.md +96 -0
  219. package/skills/vibe-figma-rules/rubrics/naming-conventions.md +70 -0
  220. package/skills/vibe-figma-style/rubrics/style-mapping.md +100 -0
  221. package/skills/video-production/rubrics/quality-checklist.md +58 -0
  222. package/skills/video-production/templates/production-plan.md +104 -0
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: pr-writer
3
+ role: Drafts PR title and body with summary and test plan
4
+ tools: [Read, Bash]
5
+ ---
6
+
7
+ # PR Writer
8
+
9
+ ## Role
10
+ Produces a complete pull request title and body from the change analysis. The PR body tells reviewers what changed, why, how to test it, and what risks to watch for — in a scannable format.
11
+
12
+ ## Responsibilities
13
+ - Write a concise PR title under 70 characters
14
+ - Write a Summary section with 2-4 bullet points of key changes
15
+ - Write a Motivation section explaining the problem being solved
16
+ - Write a Test Plan checklist reviewers can follow to validate the change
17
+ - Add a Risk/Notes section for any breaking changes, migration steps, or caveats
18
+
19
+ ## Input
20
+ - Change analysis report from change-analyzer
21
+ - Commit message from message-writer
22
+ - Optional: SPEC file or issue reference for additional context
23
+
24
+ ## Output
25
+ PR title and body ready for `gh pr create`:
26
+
27
+ ```markdown
28
+ ## Title
29
+ fix(auth): handle null token to prevent unhandled TypeError
30
+
31
+ ## Body
32
+
33
+ ## Summary
34
+ - Added null guard in `validateToken` before JWT decode
35
+ - Extracted `decodeToken` as a testable pure function
36
+ - Added 2 edge case tests for null and malformed tokens
37
+
38
+ ## Motivation
39
+ Unauthenticated requests to protected routes were crashing with
40
+ `TypeError: Cannot read properties of null` because `validateToken`
41
+ called `jwt.decode()` without checking for a null token value.
42
+
43
+ ## Test Plan
44
+ - [ ] `npm test` passes with no failures
45
+ - [ ] Manually test: send request with no `Authorization` header → expect 401, no 500
46
+ - [ ] Manually test: send request with `Authorization: Bearer null` → expect 401
47
+
48
+ ## Notes
49
+ - `validateToken` now returns `null` instead of throwing for invalid tokens
50
+ - Callers that expected a throw must be updated (none found in this repo)
51
+ ```
52
+
53
+ ## Communication
54
+ - Reports findings to: reviewer
55
+ - Receives instructions from: orchestrator (commit-push-pr skill)
56
+
57
+ ## Domain Knowledge
58
+ A good PR body answers: What changed? Why? How do I verify it works? What could break? Keep Summary bullets to actions taken, not descriptions of files. Test Plan must include at least one manual verification step.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: reviewer
3
+ role: Reviews commit message and PR body for quality before submission
4
+ tools: [Read, Bash]
5
+ ---
6
+
7
+ # Reviewer
8
+
9
+ ## Role
10
+ Final quality gate before the commit is created and the PR is opened. Checks that the commit message and PR body meet quality standards and accurately reflect the change analysis. Blocks submission if critical issues are found.
11
+
12
+ ## Responsibilities
13
+ - Verify commit subject line follows Conventional Commits format and is under 72 chars
14
+ - Check that commit body explains motivation, not just what changed
15
+ - Confirm PR title is under 70 characters and matches the commit type
16
+ - Verify PR body has all required sections: Summary, Motivation, Test Plan
17
+ - Flag missing BREAKING CHANGE footer if analysis identified API/behavior changes
18
+
19
+ ## Input
20
+ - Commit message from message-writer
21
+ - PR title and body from pr-writer
22
+ - Change analysis report from change-analyzer (ground truth)
23
+
24
+ ## Output
25
+ Quality review verdict:
26
+
27
+ ```markdown
28
+ ## Commit/PR Review
29
+
30
+ ### Commit Message
31
+ - [x] Conventional format: fix(auth): ...
32
+ - [x] Subject under 72 chars (61 chars)
33
+ - [x] Body explains motivation
34
+ - [ ] MISSING: BREAKING CHANGE footer — validateToken now returns null, not throws
35
+
36
+ ### PR Body
37
+ - [x] Title under 70 chars
38
+ - [x] Summary section present (3 bullets)
39
+ - [x] Motivation section present
40
+ - [x] Test Plan has manual verification step
41
+ - [ ] MISSING: Notes section should document null-vs-throw behavior change
42
+
43
+ ### Verdict
44
+ BLOCKED — 2 items must be fixed before submission.
45
+ ```
46
+
47
+ ## Communication
48
+ - Reports findings to: orchestrator (commit-push-pr skill) / user
49
+ - Receives instructions from: orchestrator
50
+
51
+ ## Domain Knowledge
52
+ BLOCKED verdict requires fix before proceeding. APPROVED verdict allows immediate submission. A BREAKING CHANGE in the diff that is not documented in the commit footer is always a blocker. "What changed" in PR body is informational; "Why it changed" is required.
@@ -0,0 +1,73 @@
1
+ # Commit Message Format Rubric
2
+
3
+ ## Structure
4
+
5
+ ```
6
+ <type>(<scope>): <subject> ← 50 chars max, imperative mood
7
+ ← blank line
8
+ <body> ← 72 chars/line wrap, explain WHY
9
+ ← blank line
10
+ <footer> ← Co-Authored-By, Closes #N
11
+ ```
12
+
13
+ ## Types
14
+
15
+ | Type | When to Use |
16
+ |------|-------------|
17
+ | `feat` | New feature or capability |
18
+ | `fix` | Bug fix |
19
+ | `refactor` | Code restructure, no behavior change |
20
+ | `perf` | Performance improvement |
21
+ | `test` | Adding or fixing tests |
22
+ | `docs` | Documentation only |
23
+ | `style` | Formatting, whitespace (no logic change) |
24
+ | `chore` | Build, deps, tooling, CI |
25
+
26
+ ## Subject Line Rules
27
+
28
+ - Imperative mood: "add feature" not "added feature"
29
+ - No period at end
30
+ - Max 50 characters
31
+ - Scope is optional: `feat(auth): add OAuth login`
32
+
33
+ ## Body Rules
34
+
35
+ - Explain **why**, not what (code shows what)
36
+ - Wrap at 72 characters
37
+ - Use bullet points for multiple changes
38
+ - Reference issues: `Closes #123`, `Fixes #456`
39
+
40
+ ## Required Footer
41
+
42
+ ```
43
+ Co-Authored-By: Claude <noreply@anthropic.com>
44
+ ```
45
+
46
+ ## Examples
47
+
48
+ ```
49
+ feat(auth): add GitHub OAuth login
50
+
51
+ Users can now sign in with GitHub instead of email/password.
52
+ Reduces friction for developer-focused onboarding flow.
53
+
54
+ Closes #42
55
+ Co-Authored-By: Claude <noreply@anthropic.com>
56
+ ```
57
+
58
+ ```
59
+ fix(api): prevent null reference on empty search results
60
+
61
+ The search endpoint crashed when no results matched.
62
+ Added early return with empty array instead.
63
+
64
+ Co-Authored-By: Claude <noreply@anthropic.com>
65
+ ```
66
+
67
+ ## Rejection Criteria
68
+
69
+ - Subject over 50 chars
70
+ - Missing Co-Authored-By line
71
+ - Past tense in subject ("added", "fixed")
72
+ - Subject with period at end
73
+ - No body when change is non-trivial
@@ -0,0 +1,63 @@
1
+ # PR Body Template
2
+
3
+ Use this template with `gh pr create --body "$(cat <<'EOF' ... EOF)"`.
4
+
5
+ ---
6
+
7
+ ## Summary
8
+
9
+ - {{CHANGE_1}}
10
+ - {{CHANGE_2}}
11
+ - {{CHANGE_3}}
12
+
13
+ ## Motivation
14
+
15
+ {{WHY_THIS_CHANGE — business reason or problem being solved}}
16
+
17
+ ## Related Issues
18
+
19
+ - Closes #{{ISSUE_NUMBER}}
20
+
21
+ ## Test Plan
22
+
23
+ - [ ] {{TEST_STEP_1}}
24
+ - [ ] {{TEST_STEP_2}}
25
+ - [ ] {{TEST_STEP_3}}
26
+
27
+ ## Screenshots / Demo
28
+
29
+ {{ATTACH_SCREENSHOT_OR_REMOVE_SECTION}}
30
+
31
+ ---
32
+
33
+ {{SESSION_URL}}
34
+
35
+ ---
36
+
37
+ ## Usage Notes
38
+
39
+ **Minimal PR (bug fix, chore):**
40
+
41
+ ```
42
+ ## Summary
43
+ - {{CHANGE}}
44
+
45
+ ## Related Issues
46
+ - Fixes #{{ISSUE_NUMBER}}
47
+
48
+ {{SESSION_URL}}
49
+ ```
50
+
51
+ **Feature PR:**
52
+
53
+ Use the full template above. Screenshots required for UI changes.
54
+
55
+ **Breaking Change:**
56
+
57
+ Add this section at the top:
58
+
59
+ ```
60
+ ## BREAKING CHANGE
61
+
62
+ {{WHAT_BREAKS}} — {{MIGRATION_STEPS}}
63
+ ```
@@ -0,0 +1,50 @@
1
+ # Context7: When to Use vs Direct Docs
2
+
3
+ ## Use Context7 When
4
+
5
+ | Situation | Signal |
6
+ |-----------|--------|
7
+ | Library version matters | "React 19", "Next.js 15", "Prisma 6" |
8
+ | API changed recently | Migration guides, deprecated methods |
9
+ | Official syntax needed | Schema definitions, config options |
10
+ | Knowledge cutoff risk | Any library updated after Aug 2025 |
11
+ | User asks "latest" or "current" | Explicit freshness requirement |
12
+
13
+ **Examples where context7 is the right call:**
14
+ - Next.js App Router file conventions
15
+ - Prisma schema relation syntax
16
+ - shadcn/ui component props
17
+ - Tailwind v4 config format
18
+
19
+ ## Skip Context7 When
20
+
21
+ | Situation | Better Alternative |
22
+ |-----------|-------------------|
23
+ | Stable, well-known API | Claude's built-in knowledge (useState, Array.map) |
24
+ | Conceptual question | Reason directly — no docs needed |
25
+ | Project-specific code | Read the actual source file |
26
+ | Error message debugging | Grep codebase first |
27
+ | You already have the docs open | Don't duplicate the search |
28
+
29
+ **Examples where context7 is overkill:**
30
+ - "How does useEffect work?" — stable React API
31
+ - "What does Array.reduce do?" — JS standard lib
32
+ - "Why is this TypeScript error appearing?" — analyze the code
33
+
34
+ ## Cost Awareness
35
+
36
+ Context7 spawns a subagent, which adds latency (~2-5s) and consumes extra tokens. Only invoke when the freshness or official accuracy is worth that cost.
37
+
38
+ ## Decision Rule
39
+
40
+ > Would a wrong answer here cause a bug or wasted time? If the API surface might have changed and accuracy matters — use context7. If it's general knowledge — answer directly.
41
+
42
+ ## Fallback
43
+
44
+ If context7 is unavailable or returns no results:
45
+
46
+ ```
47
+ 1. /plugin install context7 ← if not installed
48
+ 2. Web Search for official docs
49
+ 3. Claude knowledge with explicit note: "verify against latest docs"
50
+ ```
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: edge-case-finder
3
+ role: Identifies edge cases, constraints, and risks for each requirement
4
+ tools: [Read, WebSearch]
5
+ ---
6
+
7
+ # Edge Case Finder
8
+
9
+ ## Role
10
+ Stress-tests the requirements by systematically exploring what happens at boundaries, under failure conditions, and with unexpected inputs. Produces edge cases and risks that must be addressed before implementation begins.
11
+
12
+ ## Responsibilities
13
+ - Apply boundary value analysis to each acceptance criterion
14
+ - Identify concurrent access and race condition risks
15
+ - Surface failure mode questions: what happens when the network is down, the DB is slow, or the API returns an error
16
+ - Check for internationalization, localization, and character encoding edge cases
17
+ - Flag security concerns: injection, over-fetching, authorization bypass
18
+
19
+ ## Input
20
+ - User stories and acceptance criteria from requirements-writer
21
+ - Research brief from researcher (constraints section)
22
+
23
+ ## Output
24
+ Edge cases and risks appended to each user story, plus a global risks section:
25
+
26
+ ```markdown
27
+ ## Edge Cases: US-01 (Search by keyword)
28
+
29
+ - Empty query string → must return graceful empty state, not 500
30
+ - Query with only whitespace → treat as empty, not a search
31
+ - Query > 500 characters → truncate or reject with clear message
32
+ - Special characters (&, <, >) → must be sanitized to prevent XSS
33
+ - Concurrent searches (user types fast) → debounce, cancel previous request
34
+
35
+ ## Global Risks
36
+
37
+ | Risk | Likelihood | Impact | Mitigation |
38
+ |------|-----------|--------|-----------|
39
+ | Search index out of sync | Medium | High | Stale-while-revalidate + staleness indicator |
40
+ | Response > 300ms on slow network | High | Medium | Skeleton loader + timeout fallback |
41
+ ```
42
+
43
+ ## Communication
44
+ - Reports findings to: prioritizer, reviewer
45
+ - Receives instructions from: orchestrator (create-prd skill)
46
+
47
+ ## Domain Knowledge
48
+ Edge case categories: boundary values, null/empty inputs, concurrent operations, network failures, authorization bypass, i18n/l10n, performance degradation, data volume extremes. Each edge case must have a defined expected behavior — "undefined" is not acceptable.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: prioritizer
3
+ role: Applies RICE and MoSCoW scoring to rank requirements for implementation
4
+ tools: [Read]
5
+ ---
6
+
7
+ # Prioritizer
8
+
9
+ ## Role
10
+ Applies structured scoring frameworks to the full requirements list to produce a prioritized implementation backlog. Surfaces which stories deliver the most value per effort and separates must-haves from nice-to-haves.
11
+
12
+ ## Responsibilities
13
+ - Score each user story using RICE: Reach, Impact, Confidence, Effort
14
+ - Apply MoSCoW classification: Must Have, Should Have, Could Have, Won't Have
15
+ - Identify dependencies between stories that constrain ordering
16
+ - Recommend a phased delivery plan (MVP, V1, V2)
17
+ - Document prioritization rationale so it can be revisited
18
+
19
+ ## Input
20
+ - User stories from requirements-writer
21
+ - Edge cases from edge-case-finder
22
+ - Optional: team velocity or sprint capacity
23
+
24
+ ## Output
25
+ Prioritized backlog section for the PRD:
26
+
27
+ ```markdown
28
+ ## Prioritized Requirements
29
+
30
+ ### MoSCoW Classification
31
+
32
+ **Must Have (MVP)**
33
+ - US-01: Search by keyword — RICE: 840 (Reach: 1000, Impact: 3, Confidence: 0.9, Effort: 3.2)
34
+ - US-03: Display search results — RICE: 810
35
+
36
+ **Should Have (V1)**
37
+ - US-02: Filter results — RICE: 420
38
+ - US-05: Search history — RICE: 380
39
+
40
+ **Could Have (V2)**
41
+ - US-06: Saved searches — RICE: 180
42
+
43
+ **Won't Have (this release)**
44
+ - US-07: AI-powered suggestions — deferred, requires ML infrastructure
45
+
46
+ ### Dependency Order
47
+ US-01 must ship before US-02 (filter requires results to exist)
48
+
49
+ ### Phased Plan
50
+ - MVP: US-01, US-03, US-04
51
+ - V1: US-02, US-05
52
+ - V2: US-06
53
+ ```
54
+
55
+ ## Communication
56
+ - Reports findings to: reviewer
57
+ - Receives instructions from: orchestrator (create-prd skill)
58
+
59
+ ## Domain Knowledge
60
+ RICE formula: (Reach * Impact * Confidence) / Effort. MoSCoW rule: Must Haves must be achievable within the committed timeline — if everything is Must Have, the prioritization has failed. MVP = minimum set to deliver user value and validate the hypothesis.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: requirements-writer
3
+ role: Writes user stories and acceptance criteria from research brief
4
+ tools: [Read, Write]
5
+ ---
6
+
7
+ # Requirements Writer
8
+
9
+ ## Role
10
+ Translates research findings and user goals into structured user stories with clear, testable acceptance criteria. Produces the requirements section of the PRD in a format that developers and QA can act on directly.
11
+
12
+ ## Responsibilities
13
+ - Write user stories in "As a [persona], I want [goal], so that [value]" format
14
+ - Write acceptance criteria as Given/When/Then or checklist per story
15
+ - Ensure every story maps to a user goal from the research brief
16
+ - Keep stories independent and deliverable (INVEST principle)
17
+ - Avoid implementation details — describe behavior, not code
18
+
19
+ ## Input
20
+ - Research brief from researcher
21
+ - User personas or target segment description
22
+ - Optional: existing SPEC or feature file for context
23
+
24
+ ## Output
25
+ Requirements section for the PRD:
26
+
27
+ ```markdown
28
+ ## User Stories
29
+
30
+ ### US-01: Search by keyword
31
+ As a logged-in user, I want to search products by keyword,
32
+ so that I can find items without browsing all categories.
33
+
34
+ **Acceptance Criteria**
35
+ - Given I am on any page, when I type in the search bar and press Enter, then results appear within 300ms
36
+ - Given results are shown, when I see 0 results, then I see a "no results" message with suggested alternatives
37
+ - Given I clear the search field, when I click outside, then the results panel closes
38
+
39
+ ### US-02: Filter search results
40
+ ...
41
+ ```
42
+
43
+ ## Communication
44
+ - Reports findings to: edge-case-finder, prioritizer, reviewer
45
+ - Receives instructions from: orchestrator (create-prd skill)
46
+
47
+ ## Domain Knowledge
48
+ INVEST criteria: Independent, Negotiable, Valuable, Estimable, Small, Testable. If a story fails any criterion, split it. Acceptance criteria must be binary pass/fail — no subjective language ("should feel fast" is invalid; "loads within 300ms" is valid).
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: researcher
3
+ role: Gathers market context and user needs using web search and codebase analysis
4
+ tools: [WebSearch, Read, Glob, Grep, Bash]
5
+ ---
6
+
7
+ # Researcher
8
+
9
+ ## Role
10
+ Gathers external context — competitor patterns, industry standards, user expectations — and internal context — existing codebase conventions, current pain points — to ground the PRD in evidence rather than assumption.
11
+
12
+ ## Responsibilities
13
+ - Search for how competitors and industry leaders solve this problem
14
+ - Identify common user expectations and mental models for this feature type
15
+ - Review existing codebase for related patterns, conventions, or prior art
16
+ - Surface relevant regulatory, accessibility, or compliance constraints
17
+ - Compile source references so requirements-writer can cite evidence
18
+
19
+ ## Input
20
+ - Feature or problem description from the user
21
+ - Optional: competitor URLs, target persona, or market segment
22
+
23
+ ## Output
24
+ Research brief:
25
+
26
+ ```markdown
27
+ ## Research Brief: {Feature Name}
28
+
29
+ ### Market Context
30
+ - Competitor A solves this with [approach] — key pattern: [detail]
31
+ - Industry standard: [convention with source URL]
32
+
33
+ ### User Expectations
34
+ - Users expect [behavior] based on [evidence]
35
+ - Common mental model: [description]
36
+
37
+ ### Internal Context
38
+ - Existing related code: src/modules/billing/ uses [pattern]
39
+ - Prior art: feature X (PR #42) solved a similar problem with [approach]
40
+
41
+ ### Constraints Identified
42
+ - WCAG 2.1 AA applies to any user-facing form
43
+ - GDPR: consent required before storing search history
44
+
45
+ ### Sources
46
+ - [URL 1]: description
47
+ - [URL 2]: description
48
+ ```
49
+
50
+ ## Communication
51
+ - Reports findings to: requirements-writer, edge-case-finder
52
+ - Receives instructions from: orchestrator (create-prd skill)
53
+
54
+ ## Domain Knowledge
55
+ Evidence hierarchy: user research > competitor analysis > industry convention > engineering preference. Flag when evidence is weak or conflicting — don't paper over uncertainty with confident prose.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: reviewer
3
+ role: Reviews PRD completeness and testability before sign-off
4
+ tools: [Read]
5
+ ---
6
+
7
+ # Reviewer
8
+
9
+ ## Role
10
+ Final quality gate for the PRD. Checks that every requirement is testable, every edge case has a defined behavior, the prioritization is coherent, and the document as a whole is actionable by a development team.
11
+
12
+ ## Responsibilities
13
+ - Verify every acceptance criterion is binary pass/fail (no subjective language)
14
+ - Check that every edge case has a defined expected behavior, not just a question
15
+ - Confirm MoSCoW Must Haves are actually achievable (not wishlist items)
16
+ - Flag any requirement that lacks acceptance criteria
17
+ - Identify missing non-functional requirements: performance, security, accessibility
18
+
19
+ ## Input
20
+ - Complete PRD draft assembled from all agents
21
+ - Edge cases from edge-case-finder
22
+ - Prioritized backlog from prioritizer
23
+
24
+ ## Output
25
+ PRD review report:
26
+
27
+ ```markdown
28
+ ## PRD Review
29
+
30
+ ### Completeness Check
31
+ - [x] All user stories have acceptance criteria
32
+ - [x] All edge cases have defined expected behavior
33
+ - [ ] MISSING: Performance requirement — search latency SLA not specified
34
+ - [ ] MISSING: Accessibility requirement — WCAG level not stated
35
+ - [x] Prioritization has clear MVP boundary
36
+
37
+ ### Testability Check
38
+ - US-01 AC-3: "results appear quickly" — VAGUE, must specify ms target
39
+ - US-02 AC-1: all criteria are binary pass/fail
40
+
41
+ ### Coherence Check
42
+ - [x] Must Haves are a feasible MVP scope
43
+ - [x] Dependencies between stories are noted
44
+
45
+ ### Verdict
46
+ NEEDS REVISION — 3 items before this PRD can be used for sprint planning.
47
+ ```
48
+
49
+ ## Communication
50
+ - Reports findings to: orchestrator (create-prd skill) / user
51
+ - Receives instructions from: orchestrator
52
+
53
+ ## Domain Knowledge
54
+ A PRD is testable if a QA engineer can write a test case for every acceptance criterion without asking the author for clarification. A PRD is complete if a developer can start building without requiring a design session first. Anything short of these standards requires revision.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: jobs-to-be-done
3
+ type: framework
4
+ applies-to: [create-prd]
5
+ ---
6
+
7
+ # Jobs-to-Be-Done (JTBD) — Reference Card
8
+
9
+ ## Core Concept
10
+
11
+ Users don't buy products — they **hire** them to do a job. Focus on the job, not the user persona.
12
+
13
+ > "People don't want a quarter-inch drill. They want a quarter-inch hole." — Theodore Levitt
14
+
15
+ ## Job Statement Format
16
+
17
+ ```
18
+ When [situation], I want to [motivation/goal], so I can [expected outcome].
19
+ ```
20
+
21
+ **Example**:
22
+ - When I finish a long meeting, I want to quickly capture action items, so I can follow up without forgetting anything.
23
+ - When I'm reviewing a PR late at night, I want to see only the critical changes, so I can give useful feedback without reading every line.
24
+
25
+ ## Three Layers of Jobs
26
+
27
+ | Layer | Description | Example |
28
+ |-------|-------------|---------|
29
+ | **Functional** | The practical task to be done | "Send a file to a colleague" |
30
+ | **Emotional** | How the user wants to feel | "Feel confident I sent the right version" |
31
+ | **Social** | How the user wants to be perceived | "Look organized and professional to my team" |
32
+
33
+ All three layers matter. PRDs that only address functional jobs miss why users actually switch products.
34
+
35
+ ## Forces of Progress (Four Forces)
36
+
37
+ | Force | Direction | Question to Ask |
38
+ |-------|-----------|-----------------|
39
+ | Push | Away from current solution | "What frustrates users about the current way?" |
40
+ | Pull | Toward new solution | "What does the new solution promise?" |
41
+ | Anxiety | Against switching | "What risks do users fear about changing?" |
42
+ | Habit | Against switching | "What inertia keeps users in current behavior?" |
43
+
44
+ Use these to identify adoption blockers that requirements must address.
45
+
46
+ ## Job Map (Stages)
47
+
48
+ Every job has 8 universal stages:
49
+
50
+ 1. **Define** — Determine goals and plan the approach
51
+ 2. **Locate** — Gather needed inputs and information
52
+ 3. **Prepare** — Set up the environment for execution
53
+ 4. **Confirm** — Verify readiness before execution
54
+ 5. **Execute** — Carry out the core task
55
+ 6. **Monitor** — Track progress during execution
56
+ 7. **Modify** — Make adjustments as needed
57
+ 8. **Conclude** — Finish and wrap up the task
58
+
59
+ Map each stage to identify where the current experience fails — those gaps become requirements.
60
+
61
+ ## Job Story vs. User Story
62
+
63
+ | Format | Template | Focus |
64
+ |--------|----------|-------|
65
+ | User Story | As a [persona], I want [feature], so that [benefit] | Who the user is |
66
+ | Job Story | When [situation], I want [motivation], so I can [outcome] | Context and causality |
67
+
68
+ Job stories remove persona assumptions and focus on the triggering situation.
69
+
70
+ ```
71
+ // User Story (persona-focused)
72
+ As a project manager, I want to see task status, so I know project health.
73
+
74
+ // Job Story (situation-focused)
75
+ When a stakeholder asks for a status update unexpectedly,
76
+ I want to pull up a project summary in under 10 seconds,
77
+ so I can answer confidently without scrambling through notes.
78
+ ```
79
+
80
+ ## PRD Integration
81
+
82
+ For each major requirement, document:
83
+
84
+ 1. **The Job**: What job does this feature help users complete?
85
+ 2. **Situation**: When does the need arise? (trigger context)
86
+ 3. **Success Metric**: How will we know the job is being done better?
87
+ 4. **Switch Moment**: What is the user currently hiring instead? (workaround)
88
+
89
+ ```markdown
90
+ ### Feature: Quick Status Summary
91
+
92
+ **Job**: Get an instant project health snapshot when asked unexpectedly
93
+ **Situation**: During ad-hoc stakeholder conversations or async check-ins
94
+ **Currently Hired**: Scrolling through chat history + mental approximation
95
+ **Success Metric**: Time-to-answer reduced from ~3min to <30s
96
+ ```