@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,65 @@
1
+ # Expert Persona: Framework Documentation Specialist
2
+
3
+ ## Identity
4
+
5
+ You are a **technical documentation expert** who has read the official docs and changelog for most major frameworks and libraries. You know how to find the canonical answer — not blog posts that may be outdated.
6
+
7
+ ## Objective
8
+
9
+ Extract precise, version-specific information from official documentation. Provide the exact API, configuration options, and constraints the framework imposes.
10
+
11
+ ## Research Approach
12
+
13
+ 1. **Go to the official source first** — docs.framework.dev, GitHub README, or changelog
14
+ 2. **Check the current version** — note the version and whether it differs from LTS
15
+ 3. **Find the specific API** — not conceptual overviews; find the actual function signatures
16
+ 4. **Read the migration guides** — breaking changes between versions are often the root cause of bugs
17
+ 5. **Check "Gotchas" / "Pitfalls" sections** — framework authors document known sharp edges
18
+
19
+ ## Output Format
20
+
21
+ ```markdown
22
+ ## Framework Docs: {{FRAMEWORK}} — {{TOPIC}}
23
+
24
+ ### Current Version: {{VERSION}} (LTS: {{LTS_VERSION}})
25
+
26
+ ### Relevant API
27
+
28
+ \`\`\`typescript
29
+ // Exact signature from docs
30
+ {{API_SIGNATURE}}
31
+ \`\`\`
32
+
33
+ ### Configuration Options
34
+ | Option | Type | Default | Description |
35
+ |--------|------|---------|-------------|
36
+ | {{OPTION}} | {{TYPE}} | {{DEFAULT}} | {{DESC}} |
37
+
38
+ ### Official Recommendation
39
+ > [direct quote or close paraphrase from docs]
40
+
41
+ ### Known Limitations
42
+ - [Limitation 1]
43
+ - [Limitation 2]
44
+
45
+ ### Version Differences
46
+ - v{{OLD}}: [old behavior]
47
+ - v{{NEW}}: [new behavior / breaking change]
48
+
49
+ ### Source
50
+ [URL to official docs page]
51
+ ```
52
+
53
+ ## Scope Boundaries
54
+
55
+ - Do NOT summarize — extract exact API details
56
+ - Flag when the question is about an undocumented internal API
57
+ - Flag when docs conflict with observed community behavior
58
+ - Note if the feature is experimental or unstable
59
+
60
+ ## Quality Signal
61
+
62
+ A good framework docs finding:
63
+ - Links directly to the official source
64
+ - Specifies the exact version the information applies to
65
+ - Includes the actual type signatures, not paraphrases
@@ -0,0 +1,69 @@
1
+ # Expert Persona: Security Advisory Analyst
2
+
3
+ ## Identity
4
+
5
+ You are a **security-focused engineer** who reviews features for vulnerabilities, data exposure risks, and compliance implications. You think like an attacker and a regulator simultaneously.
6
+
7
+ ## Objective
8
+
9
+ Identify security risks, known CVEs, and compliance concerns related to the given feature or technology choice. Surface what must be handled, not just what could go wrong theoretically.
10
+
11
+ ## Research Approach
12
+
13
+ 1. **Search for known CVEs** — search `site:nvd.nist.gov` or `site:cve.mitre.org` for the library/pattern
14
+ 2. **Check OWASP Top 10 relevance** — which OWASP categories apply to this feature?
15
+ 3. **Look for supply chain risks** — check npm audit history, GitHub security advisories
16
+ 4. **Review authentication/authorization implications** — who can access what?
17
+ 5. **Check data handling** — PII exposure, logging of sensitive data, encryption at rest/transit
18
+
19
+ ## Output Format
20
+
21
+ ```markdown
22
+ ## Security Advisory: {{TOPIC}}
23
+
24
+ ### Risk Level: {{CRITICAL | HIGH | MEDIUM | LOW}}
25
+
26
+ ### Applicable OWASP Categories
27
+ - [A01:2021 Broken Access Control] — [relevance]
28
+ - [A03:2021 Injection] — [relevance]
29
+
30
+ ### Known CVEs / Advisories
31
+ | CVE | Severity | Affected Versions | Description |
32
+ |-----|----------|-------------------|-------------|
33
+ | {{CVE_ID}} | {{SEVERITY}} | {{VERSIONS}} | {{DESCRIPTION}} |
34
+
35
+ ### Required Mitigations (must implement)
36
+ 1. [Mitigation 1] — prevents [attack vector]
37
+ 2. [Mitigation 2] — prevents [attack vector]
38
+
39
+ ### Recommended Mitigations (should implement)
40
+ 1. [Mitigation 1]
41
+
42
+ ### Data Handling Concerns
43
+ - PII involved: {{YES/NO}} — [fields]
44
+ - Encrypted at rest: {{REQUIRED/OPTIONAL}}
45
+ - Logged (must NOT log): {{SENSITIVE_FIELDS}}
46
+
47
+ ### Compliance Implications
48
+ - GDPR: [relevant article, if any]
49
+ - HIPAA: [relevant rule, if any]
50
+ - SOC 2: [relevant control, if any]
51
+
52
+ ### Sources
53
+ - [Source 1]
54
+ - [Source 2]
55
+ ```
56
+
57
+ ## Scope Boundaries
58
+
59
+ - Flag issues that MUST be addressed before shipping (required mitigations)
60
+ - Do not block on theoretical risks with no practical exploit path
61
+ - Always distinguish between "must fix" and "should fix"
62
+ - If no significant security concerns found, state this explicitly (do not invent risks)
63
+
64
+ ## Quality Signal
65
+
66
+ A good security finding:
67
+ - Links to the specific CVE or advisory (not generic warnings)
68
+ - Specifies which exact version of the library is affected
69
+ - Provides a concrete mitigation, not just "be careful with this"
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: parallel-research-orchestrator
3
+ type: orchestrator
4
+ agents: [best-practices, framework-docs, codebase-patterns, security-advisory, synthesizer]
5
+ ---
6
+
7
+ # Parallel Research Orchestrator
8
+
9
+ ## Workflow
10
+
11
+ ### Phase 1: Launch Research Agents
12
+ - **Agent**: best-practices, framework-docs, codebase-patterns, security-advisory
13
+ - **Input**: Research topic + technology context (stack, framework versions)
14
+ - **Output**: Per-agent findings `{source, findings[], confidence}`
15
+ - **Parallel**: yes — all 4 agents run simultaneously
16
+ - **Timeout**: 60s per agent (agents that exceed timeout are marked `timed-out`)
17
+
18
+ ### Phase 2: Wait and Collect
19
+ - **Agent**: orchestrator (self)
20
+ - **Input**: Streams from all 4 agents
21
+ - **Output**: Collected results map `{agentName: result | "timed-out"}`
22
+ - **Parallel**: no — barrier synchronization point
23
+
24
+ ### Phase 3: Synthesize
25
+ - **Agent**: synthesizer
26
+ - **Input**: All collected results from Phase 2
27
+ - **Output**: Merged, deduplicated findings with source attribution and conflict flags
28
+ - **Parallel**: no — sequential merge and deduplication
29
+
30
+ ### Phase 4: Rank and Output
31
+ - **Agent**: orchestrator (self)
32
+ - **Input**: Synthesized findings from Phase 3
33
+ - **Output**: Ranked recommendations ordered by confidence and relevance
34
+ - **Parallel**: no
35
+
36
+ ## DAG (Dependency Graph)
37
+
38
+ ```mermaid
39
+ graph TD
40
+ A[Phase 1a: best-practices] --> C[Phase 2: Collect]
41
+ B[Phase 1b: framework-docs] --> C
42
+ D[Phase 1c: codebase-patterns] --> C
43
+ E[Phase 1d: security-advisory] --> C
44
+ C --> F[Phase 3: Synthesizer]
45
+ F --> G[Phase 4: Ranked Output]
46
+ ```
47
+
48
+ ## Error Handling
49
+
50
+ | Phase | Failure Mode | Strategy |
51
+ |-------|-------------|----------|
52
+ | Phase 1 | Agent times out (>60s) | Mark as `timed-out`, continue with remaining results |
53
+ | Phase 1 | Agent returns empty results | Mark as `no-findings`, note in output |
54
+ | Phase 1 | All 4 agents fail | Escalate — prompt user to retry or narrow topic |
55
+ | Phase 2 | <2 agents return results | Warn user, proceed with partial synthesis |
56
+ | Phase 3 | Conflicting recommendations | Flag conflict explicitly, present both sides |
57
+ | Phase 4 | 0 actionable recommendations | Fallback — return raw findings without ranking |
58
+
59
+ ## Scalability Modes
60
+
61
+ | Mode | When | Agents Used |
62
+ |------|------|-------------|
63
+ | Full | Normal operation | All 4 research agents + synthesizer |
64
+ | Reduced | Time pressure | best-practices + codebase-patterns only |
65
+ | Single | Quick lookup | codebase-patterns only — check existing patterns first |
@@ -0,0 +1,101 @@
1
+ # Research Synthesis: {{RESEARCH_TOPIC}}
2
+
3
+ **Date**: {{DATE}}
4
+ **Technology**: {{TECHNOLOGY_STACK}}
5
+ **Question**: {{RESEARCH_QUESTION}}
6
+
7
+ ---
8
+
9
+ ## Executive Summary
10
+
11
+ {{ONE_PARAGRAPH_SUMMARY}}
12
+
13
+ **Recommended approach**: {{RECOMMENDATION}}
14
+
15
+ ---
16
+
17
+ ## Findings by Agent
18
+
19
+ ### 1. Best Practices
20
+
21
+ {{BEST_PRACTICES_SUMMARY}}
22
+
23
+ Key insight: {{BEST_PRACTICES_KEY_INSIGHT}}
24
+
25
+ ### 2. Framework Documentation
26
+
27
+ {{FRAMEWORK_DOCS_SUMMARY}}
28
+
29
+ Key constraint: {{FRAMEWORK_CONSTRAINT}}
30
+ Relevant API: `{{RELEVANT_API}}`
31
+
32
+ ### 3. Codebase Patterns
33
+
34
+ {{CODEBASE_PATTERNS_SUMMARY}}
35
+
36
+ Follow this existing pattern: `{{PATTERN_FILE}}:{{PATTERN_LINE}}`
37
+
38
+ ### 4. Security Advisory
39
+
40
+ Risk level: **{{RISK_LEVEL}}**
41
+
42
+ {{SECURITY_SUMMARY}}
43
+
44
+ Required mitigations: {{REQUIRED_MITIGATIONS_COUNT}}
45
+
46
+ ---
47
+
48
+ ## Conflicts and Resolutions
49
+
50
+ | Conflict | Agent A says | Agent B says | Resolution |
51
+ |----------|-------------|-------------|------------|
52
+ | {{CONFLICT_1}} | {{A_POSITION}} | {{B_POSITION}} | {{RESOLUTION}} |
53
+
54
+ ---
55
+
56
+ ## Actionable Recommendations
57
+
58
+ ### Must Do (before implementation)
59
+ 1. {{MUST_DO_1}}
60
+ 2. {{MUST_DO_2}}
61
+
62
+ ### Should Do (best practice)
63
+ 1. {{SHOULD_DO_1}}
64
+ 2. {{SHOULD_DO_2}}
65
+
66
+ ### Avoid
67
+ 1. {{AVOID_1}} — reason: {{AVOID_REASON_1}}
68
+ 2. {{AVOID_2}} — reason: {{AVOID_REASON_2}}
69
+
70
+ ---
71
+
72
+ ## Impact on SPEC / Implementation Plan
73
+
74
+ Add to SPEC Context section:
75
+
76
+ ```markdown
77
+ ## Context (from parallel research)
78
+
79
+ - Best practice: {{SPEC_BEST_PRACTICE_NOTE}}
80
+ - Framework constraint: {{SPEC_CONSTRAINT_NOTE}}
81
+ - Security requirement: {{SPEC_SECURITY_NOTE}}
82
+ - Existing pattern to follow: {{SPEC_PATTERN_NOTE}}
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Unanswered Questions
88
+
89
+ - [ ] {{OPEN_QUESTION_1}} — investigate before Phase {{PHASE}}
90
+ - [ ] {{OPEN_QUESTION_2}} — can proceed without answer
91
+
92
+ ---
93
+
94
+ ## Sources
95
+
96
+ | Agent | Source | Confidence |
97
+ |-------|--------|-----------|
98
+ | Best Practices | {{SOURCE_1}} | {{CONFIDENCE_1}} |
99
+ | Framework Docs | {{SOURCE_2}} | {{CONFIDENCE_2}} |
100
+ | Codebase | `{{SOURCE_3}}` | High |
101
+ | Security | {{SOURCE_4}} | {{CONFIDENCE_4}} |
@@ -0,0 +1,79 @@
1
+ # Prioritization Frameworks Rubric
2
+
3
+ ## RICE
4
+
5
+ **Formula**: `(Reach × Impact × Confidence) / Effort`
6
+
7
+ | Factor | Scale | Example |
8
+ |--------|-------|---------|
9
+ | Reach | Users/month (absolute) | 5,000 users |
10
+ | Impact | Opportunity Score 0.0–1.0 | 0.7 |
11
+ | Confidence | 0–100% | 80% = 0.8 |
12
+ | Effort | Person-months | 2 |
13
+
14
+ **Example**: `(5000 × 0.7 × 0.8) / 2 = 1400` — higher score = prioritize first.
15
+
16
+ **When to use**: Large teams with data. Separates audience size (Reach) from value per user (Impact).
17
+
18
+ **Watch out for**: Effort estimates are often optimistic — apply a 1.5x buffer.
19
+
20
+ ---
21
+
22
+ ## ICE
23
+
24
+ **Formula**: `Impact × Confidence × Ease`
25
+
26
+ | Factor | Scale | Example |
27
+ |--------|-------|---------|
28
+ | Impact | 1–10 (or Opportunity Score × Users) | 8 |
29
+ | Confidence | 1–10 | 7 |
30
+ | Ease | 1–10 (inverse of effort) | 5 |
31
+
32
+ **Example**: `8 × 7 × 5 = 280` — higher score = prioritize first.
33
+
34
+ **When to use**: Quick ranking of ideas/initiatives. Faster than RICE, good for early-stage decisions.
35
+
36
+ **Watch out for**: "Ease" is subjective — calibrate across team before scoring.
37
+
38
+ ---
39
+
40
+ ## MoSCoW
41
+
42
+ **Categories**:
43
+
44
+ | Category | Meaning | Guideline |
45
+ |----------|---------|-----------|
46
+ | **Must** | Cannot launch without | Max 60% of scope |
47
+ | **Should** | High value, not critical | Next priority after Must |
48
+ | **Could** | Nice to have | Include only if capacity allows |
49
+ | **Won't** | Explicitly deferred | Documents what is NOT in scope |
50
+
51
+ **When to use**: Scoping a release. Good for stakeholder alignment conversations.
52
+
53
+ **Watch out for**: Stakeholders inflate "Must" — challenge each Must with "What happens if we skip this for V1?". MoSCoW is a scoping tool, not a discovery tool.
54
+
55
+ ---
56
+
57
+ ## Opportunity Score
58
+
59
+ **Formula**: `Importance × (1 − Satisfaction)` (normalize both to 0–1 scale)
60
+
61
+ **Example**:
62
+ - Importance: 0.9, Satisfaction: 0.3 → Score: `0.9 × 0.7 = 0.63` (high opportunity)
63
+ - Importance: 0.9, Satisfaction: 0.9 → Score: `0.9 × 0.1 = 0.09` (already solved)
64
+
65
+ **When to use**: Prioritizing customer problems before deciding on solutions. Prevents building features customers already find satisfactory.
66
+
67
+ **Watch out for**: Survey sample must be representative. Low sample size inflates confidence.
68
+
69
+ ---
70
+
71
+ ## Choosing the Right Framework
72
+
73
+ | Situation | Recommended Framework |
74
+ |-----------|----------------------|
75
+ | "Which customer problems matter most?" | Opportunity Score |
76
+ | "Which features should we build this sprint?" | ICE |
77
+ | "How do we rank initiatives across a large team?" | RICE |
78
+ | "What goes into V1 vs. later?" | MoSCoW |
79
+ | "Stakeholders disagree on priorities?" | Weighted Decision Matrix |
@@ -0,0 +1,69 @@
1
+ # Prioritization Scoring Matrix Template
2
+
3
+ ## Project / Sprint: {{PROJECT_OR_SPRINT_NAME}}
4
+
5
+ **Framework selected**: {{FRAMEWORK}} (RICE / ICE / MoSCoW / Opportunity Score)
6
+ **Date**: {{DATE}}
7
+ **Scored by**: {{SCORER_NAMES}}
8
+
9
+ ---
10
+
11
+ ## RICE Scoring Matrix
12
+
13
+ | Item | Reach (users/mo) | Impact (0–1) | Confidence (%) | Effort (person-mo) | RICE Score | Priority |
14
+ |------|-----------------|--------------|----------------|--------------------|------------|----------|
15
+ | {{ITEM_1}} | {{R}} | {{I}} | {{C}} | {{E}} | `=(R×I×C)/E` | — |
16
+ | {{ITEM_2}} | {{R}} | {{I}} | {{C}} | {{E}} | `=(R×I×C)/E` | — |
17
+ | {{ITEM_3}} | {{R}} | {{I}} | {{C}} | {{E}} | `=(R×I×C)/E` | — |
18
+
19
+ ---
20
+
21
+ ## ICE Scoring Matrix
22
+
23
+ | Item | Impact (1–10) | Confidence (1–10) | Ease (1–10) | ICE Score | Priority |
24
+ |------|---------------|-------------------|-------------|-----------|----------|
25
+ | {{ITEM_1}} | {{I}} | {{C}} | {{E}} | `=I×C×E` | — |
26
+ | {{ITEM_2}} | {{I}} | {{C}} | {{E}} | `=I×C×E` | — |
27
+ | {{ITEM_3}} | {{I}} | {{C}} | {{E}} | `=I×C×E` | — |
28
+
29
+ ---
30
+
31
+ ## MoSCoW Categorization
32
+
33
+ | Item | Category | Rationale | Owner |
34
+ |------|----------|-----------|-------|
35
+ | {{ITEM_1}} | Must / Should / Could / Won't | {{REASON}} | {{OWNER}} |
36
+ | {{ITEM_2}} | Must / Should / Could / Won't | {{REASON}} | {{OWNER}} |
37
+ | {{ITEM_3}} | Must / Should / Could / Won't | {{REASON}} | {{OWNER}} |
38
+
39
+ **Must count**: {{X}} / {{TOTAL}} — keep Must ≤ 60% of total scope.
40
+
41
+ ---
42
+
43
+ ## Opportunity Score Matrix
44
+
45
+ | Customer Need | Importance (0–1) | Satisfaction (0–1) | Opportunity Score | Action |
46
+ |--------------|------------------|---------------------|-------------------|--------|
47
+ | {{NEED_1}} | {{I}} | {{S}} | `=I×(1-S)` | Invest / Monitor / Maintain |
48
+ | {{NEED_2}} | {{I}} | {{S}} | `=I×(1-S)` | Invest / Monitor / Maintain |
49
+ | {{NEED_3}} | {{I}} | {{S}} | `=I×(1-S)` | Invest / Monitor / Maintain |
50
+
51
+ Score > 0.5 = strong opportunity. Score < 0.1 = already solved.
52
+
53
+ ---
54
+
55
+ ## Final Ranked Backlog
56
+
57
+ | Rank | Item | Framework Score | Decision | Notes |
58
+ |------|------|-----------------|----------|-------|
59
+ | 1 | {{ITEM}} | {{SCORE}} | Build / Defer / Drop | {{NOTES}} |
60
+ | 2 | {{ITEM}} | {{SCORE}} | Build / Defer / Drop | {{NOTES}} |
61
+ | 3 | {{ITEM}} | {{SCORE}} | Build / Defer / Drop | {{NOTES}} |
62
+
63
+ ---
64
+
65
+ ## Scoring Notes
66
+
67
+ - {{ASSUMPTION_OR_CAVEAT_1}}
68
+ - {{ASSUMPTION_OR_CAVEAT_2}}
69
+ - Next review date: {{REVIEW_DATE}}
@@ -0,0 +1,70 @@
1
+ # TODO Prioritization Rubric
2
+
3
+ Use these criteria to assign P1, P2, or P3 to any TODO item.
4
+
5
+ ## P1 — Blocks Merge
6
+
7
+ Assign P1 when ANY of the following is true:
8
+
9
+ | Criterion | Example |
10
+ |-----------|---------|
11
+ | Security vulnerability | SQL injection, XSS, unprotected endpoint, leaked secret |
12
+ | Data loss or corruption risk | Missing transaction, overwrite without backup |
13
+ | Type safety bypass | `: any`, `as any`, `@ts-ignore` hiding a real error |
14
+ | Production breakage | Throws uncaught exception on valid input |
15
+ | Broken CI/test | Failing test committed (not pre-existing) |
16
+ | Missing auth/authz check | Unauthenticated access to protected resource |
17
+ | Regulatory non-compliance | GDPR PII without consent, HIPAA violation |
18
+
19
+ **Decision rule**: Would this cause an incident if it shipped? → P1
20
+
21
+ ---
22
+
23
+ ## P2 — Fix Before PR
24
+
25
+ Assign P2 when ANY of the following is true AND it is not P1:
26
+
27
+ | Criterion | Example |
28
+ |-----------|---------|
29
+ | Performance regression | O(n²) loop, N+1 query, synchronous blocking call |
30
+ | Missing test coverage | New feature with no tests |
31
+ | Architecture violation | Layer boundary crossed (service imports UI) |
32
+ | `console.log` in committed code | Debug output in production path |
33
+ | Function > 50 lines | Complexity limit exceeded |
34
+ | Nesting depth > 4 | Readability and test difficulty |
35
+ | Duplicate logic across 2+ files | Maintenance hazard; divergence risk |
36
+ | TODO/FIXME without tracking ticket | Ambiguous ownership |
37
+
38
+ **Decision rule**: Would a reviewer request changes on this in a PR review? → P2
39
+
40
+ ---
41
+
42
+ ## P3 — Backlog
43
+
44
+ Assign P3 when the issue is real but has no immediate consequence:
45
+
46
+ | Criterion | Example |
47
+ |-----------|---------|
48
+ | Style inconsistency | Different quote styles, inconsistent naming |
49
+ | Magic numbers with low risk | Timeout values, display constants |
50
+ | Commented-out code | Dead code left behind |
51
+ | Missing JSDoc on internal helpers | Not public API |
52
+ | File nearing complexity limit | 150–200 lines, not there yet |
53
+ | Refactoring opportunity | Could be cleaner but works correctly |
54
+
55
+ **Decision rule**: Could this be deferred a week without risk? → P3
56
+
57
+ ---
58
+
59
+ ## Upgrade / Downgrade Rules
60
+
61
+ | Situation | Action |
62
+ |-----------|--------|
63
+ | P3 item appears in 3+ files | Upgrade to P2 (systemic issue) |
64
+ | P2 item has no fix path identified | Keep P2, add a note |
65
+ | P1 item is in dead code (never executed) | Downgrade to P2 with justification |
66
+ | P2 item found in P1 audit | Upgrade to P1 if it compounds the P1 issue |
67
+
68
+ ## When Uncertain
69
+
70
+ Default to the higher priority. It is cheaper to over-prioritize than to ship a P1 labeled as P3.
@@ -0,0 +1,59 @@
1
+ # TODO Board: {{PROJECT_OR_FEATURE_NAME}}
2
+
3
+ **Updated**: {{DATE}}
4
+ **Branch**: {{GIT_BRANCH}}
5
+ **Total open**: {{TOTAL_OPEN}} | P1: {{P1_COUNT}} | P2: {{P2_COUNT}} | P3: {{P3_COUNT}}
6
+
7
+ ---
8
+
9
+ ## P1 — Blocks Merge ({{P1_COUNT}} open)
10
+
11
+ > All P1 items must be resolved before this branch can be merged.
12
+
13
+ | ID | Title | File:Line | Assigned | Status |
14
+ |----|-------|-----------|----------|--------|
15
+ | P1-{{ID_1}} | {{TITLE_1}} | `{{FILE_1}}:{{LINE_1}}` | {{ASSIGNEE_1}} | {{STATUS_1}} |
16
+ | P1-{{ID_2}} | {{TITLE_2}} | `{{FILE_2}}:{{LINE_2}}` | {{ASSIGNEE_2}} | {{STATUS_2}} |
17
+
18
+ {{#if P1_EMPTY}}
19
+ _No P1 items. Merge is unblocked._
20
+ {{/if}}
21
+
22
+ ---
23
+
24
+ ## P2 — Fix Before PR ({{P2_COUNT}} open)
25
+
26
+ > P2 items should be resolved before PR review. Warning only — does not block merge.
27
+
28
+ | ID | Title | File:Line | Assigned | Status |
29
+ |----|-------|-----------|----------|--------|
30
+ | P2-{{ID_1}} | {{TITLE_1}} | `{{FILE_1}}:{{LINE_1}}` | {{ASSIGNEE_1}} | {{STATUS_1}} |
31
+ | P2-{{ID_2}} | {{TITLE_2}} | `{{FILE_2}}:{{LINE_2}}` | {{ASSIGNEE_2}} | {{STATUS_2}} |
32
+
33
+ ---
34
+
35
+ ## P3 — Backlog ({{P3_COUNT}} open)
36
+
37
+ > P3 items do not block merge. Address during scheduled cleanup sessions.
38
+
39
+ | ID | Title | File:Line | Notes |
40
+ |----|-------|-----------|-------|
41
+ | P3-{{ID_1}} | {{TITLE_1}} | `{{FILE_1}}:{{LINE_1}}` | {{NOTES_1}} |
42
+ | P3-{{ID_2}} | {{TITLE_2}} | `{{FILE_2}}:{{LINE_2}}` | {{NOTES_2}} |
43
+
44
+ ---
45
+
46
+ ## Completed (archived)
47
+
48
+ | ID | Title | Resolved | PR/Commit |
49
+ |----|-------|----------|-----------|
50
+ | {{DONE_ID_1}} | {{DONE_TITLE_1}} | {{DONE_DATE_1}} | {{DONE_REF_1}} |
51
+
52
+ ---
53
+
54
+ ## Merge Checklist
55
+
56
+ - [ ] P1 count = 0
57
+ - [ ] P2 items reviewed (resolved or documented)
58
+ - [ ] index.md reflects current state
59
+ - [ ] Completed items archived to `done/`