@su-record/vibe 2.8.23 → 2.8.25

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 (223) hide show
  1. package/commands/vibe.figma.md +2 -2
  2. package/dist/cli/commands/config.d.ts +17 -0
  3. package/dist/cli/commands/config.d.ts.map +1 -0
  4. package/dist/cli/commands/config.js +207 -0
  5. package/dist/cli/commands/config.js.map +1 -0
  6. package/dist/cli/commands/index.d.ts +2 -0
  7. package/dist/cli/commands/index.d.ts.map +1 -1
  8. package/dist/cli/commands/index.js +2 -0
  9. package/dist/cli/commands/index.js.map +1 -1
  10. package/dist/cli/commands/info.d.ts.map +1 -1
  11. package/dist/cli/commands/info.js +2 -0
  12. package/dist/cli/commands/info.js.map +1 -1
  13. package/dist/cli/commands/init.d.ts.map +1 -1
  14. package/dist/cli/commands/init.js +78 -54
  15. package/dist/cli/commands/init.js.map +1 -1
  16. package/dist/cli/commands/stats.d.ts +13 -0
  17. package/dist/cli/commands/stats.d.ts.map +1 -0
  18. package/dist/cli/commands/stats.js +280 -0
  19. package/dist/cli/commands/stats.js.map +1 -0
  20. package/dist/cli/index.d.ts.map +1 -1
  21. package/dist/cli/index.js +33 -1
  22. package/dist/cli/index.js.map +1 -1
  23. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  24. package/dist/cli/postinstall/constants.js +1 -0
  25. package/dist/cli/postinstall/constants.js.map +1 -1
  26. package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
  27. package/dist/cli/setup/GlobalInstaller.js +7 -7
  28. package/dist/cli/setup/GlobalInstaller.js.map +1 -1
  29. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
  30. package/dist/cli/setup/ProjectSetup.js +18 -12
  31. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  32. package/dist/infra/lib/ContextCompressor.d.ts.map +1 -1
  33. package/dist/infra/lib/ContextCompressor.js +10 -4
  34. package/dist/infra/lib/ContextCompressor.js.map +1 -1
  35. package/dist/infra/lib/ProjectCache.d.ts +2 -2
  36. package/dist/infra/lib/ProjectCache.d.ts.map +1 -1
  37. package/dist/infra/lib/ProjectCache.js +4 -3
  38. package/dist/infra/lib/ProjectCache.js.map +1 -1
  39. package/dist/infra/lib/utils.d.ts +24 -0
  40. package/dist/infra/lib/utils.d.ts.map +1 -1
  41. package/dist/infra/lib/utils.js +41 -0
  42. package/dist/infra/lib/utils.js.map +1 -1
  43. package/dist/infra/orchestrator/SmartRouter.d.ts +3 -0
  44. package/dist/infra/orchestrator/SmartRouter.d.ts.map +1 -1
  45. package/dist/infra/orchestrator/SmartRouter.js +11 -1
  46. package/dist/infra/orchestrator/SmartRouter.js.map +1 -1
  47. package/dist/infra/orchestrator/SmartRouter.test.d.ts +5 -0
  48. package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +1 -0
  49. package/dist/infra/orchestrator/SmartRouter.test.js +457 -0
  50. package/dist/infra/orchestrator/SmartRouter.test.js.map +1 -0
  51. package/dist/tools/convention/analyzeComplexity.d.ts.map +1 -1
  52. package/dist/tools/convention/analyzeComplexity.js +18 -10
  53. package/dist/tools/convention/analyzeComplexity.js.map +1 -1
  54. package/dist/tools/convention/checkCouplingCohesion.d.ts.map +1 -1
  55. package/dist/tools/convention/checkCouplingCohesion.js +14 -6
  56. package/dist/tools/convention/checkCouplingCohesion.js.map +1 -1
  57. package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +1 -1
  58. package/dist/tools/semantic/analyzeDependencyGraph.js +1 -1
  59. package/dist/tools/semantic/analyzeDependencyGraph.js.map +1 -1
  60. package/dist/tools/semantic/findReferences.d.ts.map +1 -1
  61. package/dist/tools/semantic/findReferences.js +13 -13
  62. package/dist/tools/semantic/findReferences.js.map +1 -1
  63. package/dist/tools/semantic/findSymbol.d.ts.map +1 -1
  64. package/dist/tools/semantic/findSymbol.js +12 -13
  65. package/dist/tools/semantic/findSymbol.js.map +1 -1
  66. package/dist/tools/semantic/lsp.d.ts.map +1 -1
  67. package/dist/tools/semantic/lsp.js +22 -14
  68. package/dist/tools/semantic/lsp.js.map +1 -1
  69. package/hooks/hooks.json +29 -0
  70. package/hooks/scripts/__tests__/keyword-detector.test.js +199 -0
  71. package/hooks/scripts/__tests__/pre-tool-guard.test.js +286 -0
  72. package/hooks/scripts/__tests__/sentinel-guard.test.js +210 -0
  73. package/hooks/scripts/auto-commit.js +65 -0
  74. package/hooks/scripts/auto-format.js +64 -0
  75. package/hooks/scripts/auto-test.js +81 -0
  76. package/hooks/scripts/code-check.js +139 -0
  77. package/hooks/scripts/command-log.js +32 -0
  78. package/hooks/scripts/context-save.js +60 -6
  79. package/hooks/scripts/hud-status.js +32 -2
  80. package/hooks/scripts/llm-orchestrate.js +95 -17
  81. package/hooks/scripts/pr-test-gate.js +52 -0
  82. package/package.json +1 -1
  83. package/skills/agents-md/rubrics/what-to-keep.md +49 -0
  84. package/skills/agents-md/templates/agents-md.md +36 -0
  85. package/skills/arch-guard/agents/detector.md +48 -0
  86. package/skills/arch-guard/agents/reporter.md +48 -0
  87. package/skills/arch-guard/agents/rule-generator.md +49 -0
  88. package/skills/arch-guard/agents/violation-checker.md +51 -0
  89. package/skills/arch-guard/frameworks/clean-architecture.md +108 -0
  90. package/skills/arch-guard/frameworks/solid.md +102 -0
  91. package/skills/arch-guard/scripts/check-boundaries.js +90 -0
  92. package/skills/arch-guard/templates/arch-rules.json +47 -0
  93. package/skills/arch-guard/templates/violation-report.md +53 -0
  94. package/skills/brand-assets/rubrics/asset-checklist.md +98 -0
  95. package/skills/brand-assets/templates/brand-guide.md +161 -0
  96. package/skills/capability-loop/agents/capability-designer.md +61 -0
  97. package/skills/capability-loop/agents/failure-analyst.md +55 -0
  98. package/skills/capability-loop/agents/implementer.md +50 -0
  99. package/skills/capability-loop/agents/tester.md +53 -0
  100. package/skills/capability-loop/templates/capability-spec.md +118 -0
  101. package/skills/capability-loop/templates/failure-analysis.md +118 -0
  102. package/skills/characterization-test/agents/behavior-capturer.md +50 -0
  103. package/skills/characterization-test/agents/coverage-checker.md +54 -0
  104. package/skills/characterization-test/agents/reporter.md +50 -0
  105. package/skills/characterization-test/agents/test-writer.md +49 -0
  106. package/skills/characterization-test/rubrics/coverage-criteria.md +53 -0
  107. package/skills/characterization-test/templates/test-template.ts +101 -0
  108. package/skills/claude-md-guide/rubrics/anti-patterns.md +88 -0
  109. package/skills/claude-md-guide/templates/claude-md.md +54 -0
  110. package/skills/commerce-patterns/rubrics/checkout-flow.md +48 -0
  111. package/skills/commerce-patterns/templates/product-schema.md +85 -0
  112. package/skills/commit-push-pr/agents/change-analyzer.md +55 -0
  113. package/skills/commit-push-pr/agents/message-writer.md +50 -0
  114. package/skills/commit-push-pr/agents/pr-writer.md +58 -0
  115. package/skills/commit-push-pr/agents/reviewer.md +52 -0
  116. package/skills/commit-push-pr/rubrics/commit-message.md +73 -0
  117. package/skills/commit-push-pr/templates/pr-body.md +63 -0
  118. package/skills/context7-usage/rubrics/when-to-use.md +50 -0
  119. package/skills/create-prd/agents/edge-case-finder.md +48 -0
  120. package/skills/create-prd/agents/prioritizer.md +60 -0
  121. package/skills/create-prd/agents/requirements-writer.md +48 -0
  122. package/skills/create-prd/agents/researcher.md +55 -0
  123. package/skills/create-prd/agents/reviewer.md +54 -0
  124. package/skills/create-prd/frameworks/jobs-to-be-done.md +96 -0
  125. package/skills/create-prd/frameworks/rice-scoring.md +97 -0
  126. package/skills/create-prd/orchestrator.md +70 -0
  127. package/skills/create-prd/rubrics/completeness.md +58 -0
  128. package/skills/create-prd/templates/prd.md +139 -0
  129. package/skills/design-audit/agents/a11y-auditor.md +43 -0
  130. package/skills/design-audit/agents/performance-auditor.md +46 -0
  131. package/skills/design-audit/agents/responsive-auditor.md +46 -0
  132. package/skills/design-audit/agents/scorer.md +47 -0
  133. package/skills/design-audit/agents/slop-detector.md +47 -0
  134. package/skills/design-audit/frameworks/core-web-vitals.md +107 -0
  135. package/skills/design-audit/frameworks/wcag-checklist.md +64 -0
  136. package/skills/design-audit/orchestrator.md +64 -0
  137. package/skills/design-audit/rubrics/ai-slop-patterns.md +83 -0
  138. package/skills/design-audit/rubrics/scoring.md +63 -0
  139. package/skills/design-audit/templates/report.md +88 -0
  140. package/skills/design-critique/rubrics/ux-heuristics.md +143 -0
  141. package/skills/design-critique/templates/critique-report.md +86 -0
  142. package/skills/design-distill/templates/design-system.md +132 -0
  143. package/skills/design-normalize/rubrics/token-naming.md +117 -0
  144. package/skills/design-normalize/templates/token-audit.md +89 -0
  145. package/skills/design-polish/rubrics/polish-checklist.md +68 -0
  146. package/skills/design-polish/templates/polish-report.md +64 -0
  147. package/skills/design-teach/rubrics/brand-personality.md +73 -0
  148. package/skills/design-teach/templates/design-context.json +36 -0
  149. package/skills/e2e-commerce/templates/test-scenarios.md +170 -0
  150. package/skills/event-comms/templates/email-invite.md +99 -0
  151. package/skills/event-comms/templates/sns-post.md +133 -0
  152. package/skills/event-ops/rubrics/contingency.md +85 -0
  153. package/skills/event-ops/templates/d-day-checklist.md +65 -0
  154. package/skills/event-planning/rubrics/timeline.md +70 -0
  155. package/skills/event-planning/templates/event-plan.md +91 -0
  156. package/skills/exec-plan/agents/decomposer.md +47 -0
  157. package/skills/exec-plan/agents/dependency-mapper.md +44 -0
  158. package/skills/exec-plan/agents/estimator.md +43 -0
  159. package/skills/exec-plan/agents/validator.md +55 -0
  160. package/skills/exec-plan/orchestrator.md +70 -0
  161. package/skills/exec-plan/rubrics/complexity-scoring.md +75 -0
  162. package/skills/exec-plan/templates/plan.md +147 -0
  163. package/skills/git-worktree/rubrics/when-to-use.md +55 -0
  164. package/skills/handoff/agents/context-summarizer.md +51 -0
  165. package/skills/handoff/agents/document-writer.md +63 -0
  166. package/skills/handoff/agents/state-collector.md +53 -0
  167. package/skills/handoff/agents/verifier.md +48 -0
  168. package/skills/handoff/rubrics/completeness.md +62 -0
  169. package/skills/handoff/templates/handoff.md +107 -0
  170. package/skills/parallel-research/agents/best-practices.md +43 -0
  171. package/skills/parallel-research/agents/codebase-patterns.md +46 -0
  172. package/skills/parallel-research/agents/framework-docs.md +45 -0
  173. package/skills/parallel-research/agents/security-advisory.md +46 -0
  174. package/skills/parallel-research/agents/synthesizer.md +52 -0
  175. package/skills/parallel-research/experts/best-practices.md +50 -0
  176. package/skills/parallel-research/experts/codebase-patterns.md +70 -0
  177. package/skills/parallel-research/experts/framework-docs.md +65 -0
  178. package/skills/parallel-research/experts/security-advisory.md +69 -0
  179. package/skills/parallel-research/orchestrator.md +65 -0
  180. package/skills/parallel-research/templates/synthesis.md +101 -0
  181. package/skills/prioritization-frameworks/rubrics/frameworks.md +79 -0
  182. package/skills/prioritization-frameworks/templates/scoring-matrix.md +69 -0
  183. package/skills/priority-todos/rubrics/prioritization.md +70 -0
  184. package/skills/priority-todos/templates/todo-board.md +59 -0
  185. package/skills/seo-checklist/frameworks/structured-data.md +153 -0
  186. package/skills/seo-checklist/rubrics/content-seo.md +42 -0
  187. package/skills/seo-checklist/rubrics/technical-seo.md +48 -0
  188. package/skills/techdebt/agents/analyzer.md +50 -0
  189. package/skills/techdebt/agents/fixer.md +41 -0
  190. package/skills/techdebt/agents/reviewer.md +47 -0
  191. package/skills/techdebt/agents/scanner.md +44 -0
  192. package/skills/techdebt/orchestrator.md +70 -0
  193. package/skills/techdebt/rubrics/severity.md +51 -0
  194. package/skills/techdebt/scripts/scan.js +90 -0
  195. package/skills/techdebt/templates/report.md +86 -0
  196. package/skills/tool-fallback/rubrics/fallback-chain.md +58 -0
  197. package/skills/typescript-advanced-types/rubrics/type-patterns.md +109 -0
  198. package/skills/ui-ux-pro-max/rubrics/interaction-states.md +83 -0
  199. package/skills/ui-ux-pro-max/rubrics/responsive-breakpoints.md +99 -0
  200. package/skills/user-personas/rubrics/research-methods.md +56 -0
  201. package/skills/user-personas/templates/persona.md +89 -0
  202. package/skills/vercel-react-best-practices/rubrics/performance.md +82 -0
  203. package/skills/vercel-react-best-practices/rubrics/server-components.md +86 -0
  204. package/skills/vibe-docs/SKILL.md +171 -0
  205. package/skills/vibe-docs/templates/architecture.md +80 -0
  206. package/skills/vibe-docs/templates/readme.md +84 -0
  207. package/skills/vibe-docs/templates/release-notes.md +74 -0
  208. package/skills/vibe-figma/SKILL.md +173 -54
  209. package/skills/vibe-figma/rubrics/extraction-checklist.md +51 -0
  210. package/skills/vibe-figma/templates/figma-handoff.md +96 -0
  211. package/skills/vibe-figma-analyze/rubrics/analysis-dimensions.md +53 -0
  212. package/skills/vibe-figma-codegen/rubrics/code-quality.md +54 -0
  213. package/skills/vibe-figma-consolidate/templates/consolidation-report.md +95 -0
  214. package/skills/vibe-figma-convert/SKILL.md +176 -1
  215. package/skills/vibe-figma-convert/rubrics/conversion-rules.md +83 -0
  216. package/skills/vibe-figma-convert/templates/component.md +152 -0
  217. package/skills/vibe-figma-extract/rubrics/image-rules.md +67 -0
  218. package/skills/vibe-figma-frame/rubrics/frame-selection.md +55 -0
  219. package/skills/vibe-figma-pipeline/rubrics/pipeline-stages.md +96 -0
  220. package/skills/vibe-figma-rules/rubrics/naming-conventions.md +70 -0
  221. package/skills/vibe-figma-style/rubrics/style-mapping.md +100 -0
  222. package/skills/video-production/rubrics/quality-checklist.md +58 -0
  223. package/skills/video-production/templates/production-plan.md +104 -0
@@ -0,0 +1,161 @@
1
+ # Brand Guide: {{PROJECT_NAME}}
2
+
3
+ **Version**: {{VERSION}}
4
+ **Last Updated**: {{DATE}}
5
+ **Maintainer**: {{MAINTAINER}}
6
+
7
+ ---
8
+
9
+ ## Brand Identity
10
+
11
+ | Attribute | Value |
12
+ |-----------|-------|
13
+ | Product Name | {{PRODUCT_NAME}} |
14
+ | Tagline | {{TAGLINE}} |
15
+ | Category | {{CATEGORY}} (SaaS / Mobile App / Consumer / Developer Tool) |
16
+ | Personality | {{PERSONALITY_WORDS}} |
17
+ | Tone | {{TONE}} |
18
+
19
+ ---
20
+
21
+ ## Logo
22
+
23
+ | Asset | File | Usage |
24
+ |-------|------|-------|
25
+ | Primary logo (color) | `{{LOGO_COLOR_PATH}}` | Default usage on white/light backgrounds |
26
+ | Primary logo (white) | `{{LOGO_WHITE_PATH}}` | Dark backgrounds |
27
+ | Primary logo (dark) | `{{LOGO_DARK_PATH}}` | Light backgrounds where color logo lacks contrast |
28
+ | Icon only (color) | `{{ICON_COLOR_PATH}}` | App icons, favicons, small contexts |
29
+ | Icon only (mono) | `{{ICON_MONO_PATH}}` | Single-color contexts |
30
+ | Wordmark only | `{{WORDMARK_PATH}}` | When icon is shown separately |
31
+
32
+ ### Logo Clear Space
33
+
34
+ Maintain minimum clear space of **{{LOGO_CLEAR_SPACE}}** on all sides of the logo. No other elements within this zone.
35
+
36
+ ### Logo Minimum Size
37
+
38
+ | Context | Minimum Width |
39
+ |---------|--------------|
40
+ | Print | {{LOGO_MIN_PRINT}} |
41
+ | Digital | {{LOGO_MIN_DIGITAL}} |
42
+ | Favicon | 16px (icon only) |
43
+
44
+ ### Logo Misuse
45
+
46
+ - Do not stretch or distort the logo
47
+ - Do not apply drop shadows to the logo
48
+ - Do not place on busy backgrounds without a clear area
49
+ - Do not recreate with incorrect fonts or colors
50
+ - Do not use at sizes below minimum
51
+
52
+ ---
53
+
54
+ ## Color Palette
55
+
56
+ ### Primary Colors
57
+
58
+ | Name | Hex | RGB | HSL | Usage |
59
+ |------|-----|-----|-----|-------|
60
+ | {{PRIMARY_NAME}} | {{PRIMARY_HEX}} | {{PRIMARY_RGB}} | {{PRIMARY_HSL}} | Primary brand, CTAs |
61
+ | {{SECONDARY_NAME}} | {{SECONDARY_HEX}} | {{SECONDARY_RGB}} | {{SECONDARY_HSL}} | Secondary actions |
62
+
63
+ ### Neutral Colors
64
+
65
+ | Name | Hex | Usage |
66
+ |------|-----|-------|
67
+ | {{NEUTRAL_DARK}} | {{NEUTRAL_DARK_HEX}} | Primary text |
68
+ | {{NEUTRAL_MID}} | {{NEUTRAL_MID_HEX}} | Secondary text, borders |
69
+ | {{NEUTRAL_LIGHT}} | {{NEUTRAL_LIGHT_HEX}} | Backgrounds, dividers |
70
+
71
+ ### Semantic Colors
72
+
73
+ | Name | Hex | Usage |
74
+ |------|-----|-------|
75
+ | Error | {{ERROR_HEX}} | Error states, destructive actions |
76
+ | Success | {{SUCCESS_HEX}} | Confirmation, positive states |
77
+ | Warning | {{WARNING_HEX}} | Caution states |
78
+ | Info | {{INFO_HEX}} | Informational states |
79
+
80
+ ---
81
+
82
+ ## Typography
83
+
84
+ ### Typefaces
85
+
86
+ | Role | Font Family | Weight(s) | Source |
87
+ |------|------------|-----------|--------|
88
+ | Heading | {{HEADING_FONT}} | {{HEADING_WEIGHTS}} | {{HEADING_SOURCE}} |
89
+ | Body | {{BODY_FONT}} | {{BODY_WEIGHTS}} | {{BODY_SOURCE}} |
90
+ | Monospace | {{MONO_FONT}} | {{MONO_WEIGHTS}} | {{MONO_SOURCE}} |
91
+
92
+ ### Type Scale
93
+
94
+ | Level | Size | Weight | Line Height | Use |
95
+ |-------|------|--------|-------------|-----|
96
+ | Display | {{DISPLAY_SIZE}} | {{DISPLAY_WEIGHT}} | {{DISPLAY_LH}} | Hero text |
97
+ | H1 | {{H1_SIZE}} | {{H1_WEIGHT}} | {{H1_LH}} | Page titles |
98
+ | H2 | {{H2_SIZE}} | {{H2_WEIGHT}} | {{H2_LH}} | Section headings |
99
+ | H3 | {{H3_SIZE}} | {{H3_WEIGHT}} | {{H3_LH}} | Subsections |
100
+ | Body | {{BODY_SIZE}} | {{BODY_WEIGHT}} | {{BODY_LH}} | Paragraphs |
101
+ | Caption | {{CAPTION_SIZE}} | {{CAPTION_WEIGHT}} | {{CAPTION_LH}} | Labels, captions |
102
+
103
+ ---
104
+
105
+ ## Iconography
106
+
107
+ | Attribute | Value |
108
+ |-----------|-------|
109
+ | Icon library | {{ICON_LIBRARY}} |
110
+ | Icon style | {{ICON_STYLE}} (outline / solid / duotone) |
111
+ | Standard sizes | 16px, 20px, 24px |
112
+ | Stroke width | {{STROKE_WIDTH}} |
113
+ | Color usage | Match adjacent text or use `--color-primary` for emphasis |
114
+
115
+ ---
116
+
117
+ ## App Icons & Favicons
118
+
119
+ | Asset | Size | File | Format |
120
+ |-------|------|------|--------|
121
+ | Favicon | 16×16 | `public/favicon-16x16.png` | PNG |
122
+ | Favicon | 32×32 | `public/favicon-32x32.png` | PNG |
123
+ | Favicon bundle | 16/32/48 | `public/favicon.ico` | ICO |
124
+ | Apple Touch Icon | 180×180 | `public/apple-touch-icon.png` | PNG |
125
+ | Android Chrome | 192×192 | `public/android-chrome-192x192.png` | PNG |
126
+ | Android Chrome | 512×512 | `public/android-chrome-512x512.png` | PNG |
127
+
128
+ ---
129
+
130
+ ## Imagery & Illustration
131
+
132
+ | Attribute | Guideline |
133
+ |-----------|-----------|
134
+ | Photography style | {{PHOTO_STYLE}} |
135
+ | Illustration style | {{ILLUSTRATION_STYLE}} |
136
+ | Image treatment | {{IMAGE_TREATMENT}} |
137
+ | Avoid | {{IMAGE_AVOID}} |
138
+
139
+ ---
140
+
141
+ ## Motion
142
+
143
+ | Attribute | Value |
144
+ |-----------|-------|
145
+ | Default duration | 200ms |
146
+ | Fast duration | 150ms (micro-interactions) |
147
+ | Slow duration | 300ms (page transitions) |
148
+ | Default easing | `cubic-bezier(0.4, 0, 0.2, 1)` |
149
+ | Personality | {{MOTION_PERSONALITY}} (subtle / expressive / none) |
150
+
151
+ ---
152
+
153
+ ## Voice & Tone
154
+
155
+ | Context | Tone | Example |
156
+ |---------|------|---------|
157
+ | Marketing | {{MARKETING_TONE}} | {{MARKETING_EXAMPLE}} |
158
+ | UI labels | {{UI_TONE}} | {{UI_EXAMPLE}} |
159
+ | Error messages | {{ERROR_TONE}} | {{ERROR_EXAMPLE}} |
160
+ | Success messages | {{SUCCESS_TONE}} | {{SUCCESS_EXAMPLE}} |
161
+ | Empty states | {{EMPTY_TONE}} | {{EMPTY_EXAMPLE}} |
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: capability-designer
3
+ role: Designs the missing capability — hook, skill, or guard — based on root cause
4
+ tools: [Read, Glob, Grep]
5
+ ---
6
+
7
+ # Capability Designer
8
+
9
+ ## Role
10
+ Takes the root cause analysis and designs the correct capability to close the gap. Selects the right intervention type (hook, skill, guard, config) and produces a detailed spec for the implementer to build from.
11
+
12
+ ## Responsibilities
13
+ - Map root cause classification to the correct capability type
14
+ - Survey existing hooks, skills, and guards to avoid duplication
15
+ - Design the capability interface: trigger, input, logic, output, and failure behavior
16
+ - Specify integration points: where does it fit in the existing dispatch chain
17
+ - Define the acceptance test: how will we know the capability works
18
+
19
+ ## Input
20
+ - Root cause analysis from failure-analyst
21
+ - Existing hooks directory listing (hooks/scripts/)
22
+ - Existing skills list for context
23
+
24
+ ## Output
25
+ Capability design spec:
26
+
27
+ ```markdown
28
+ ## Capability Design: console-log-guard hook
29
+
30
+ ### Type
31
+ Pre-commit hook (PostToolUse / pre-commit shell script)
32
+
33
+ ### Trigger
34
+ Fires on every `git commit` attempt, after files are staged.
35
+
36
+ ### Logic
37
+ 1. Run `git diff --staged` to get staged file contents
38
+ 2. Scan for pattern: `console\.log\s*\(`
39
+ 3. If found: print file:line references and exit 1 (block commit)
40
+ 4. If clean: exit 0 (allow commit)
41
+
42
+ ### Integration Point
43
+ hooks/scripts/console-log-guard.sh — registered in .husky/pre-commit
44
+ or .claude/settings.local.json PostToolUse for Bash tool.
45
+
46
+ ### Failure Behavior
47
+ Block the commit with a clear error message listing offending lines.
48
+ Never silently pass.
49
+
50
+ ### Acceptance Test
51
+ 1. Stage a file with console.log → commit must be blocked
52
+ 2. Stage a file without console.log → commit must proceed
53
+ 3. Staged test file (*.test.ts) → still blocked (rule applies universally)
54
+ ```
55
+
56
+ ## Communication
57
+ - Reports findings to: implementer
58
+ - Receives instructions from: orchestrator (capability-loop skill)
59
+
60
+ ## Domain Knowledge
61
+ Capability selection guide: repeated failure → hook (enforce); missing workflow → skill (guide); Claude ignores rules → guard (validate output); wrong tool selected → config (constrain). Prefer hooks for enforcement over CLAUDE.md rules alone — documentation does not prevent behavior.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: failure-analyst
3
+ role: Analyzes failure transcripts to find the root cause of a missing capability
4
+ tools: [Read, Grep, Bash]
5
+ ---
6
+
7
+ # Failure Analyst
8
+
9
+ ## Role
10
+ Reads failure transcripts, error logs, or problem descriptions to identify the exact root cause. Distinguishes between symptoms and underlying gaps — whether the failure stems from a missing hook, an absent skill, an untrained behavior, or a guard that doesn't exist.
11
+
12
+ ## Responsibilities
13
+ - Read failure transcript or error description in full before diagnosing
14
+ - Classify failure type: hook gap, skill gap, behavior gap, guard gap, or config gap
15
+ - Identify the precise trigger point where the system failed or went off-track
16
+ - Rule out false positives: confirm this is a repeatable failure, not a one-off
17
+ - State the root cause as a falsifiable hypothesis with evidence
18
+
19
+ ## Input
20
+ - Failure transcript (conversation log, error output, or description)
21
+ - Optional: related hooks, skills, or config files for context
22
+
23
+ ## Output
24
+ Root cause analysis:
25
+
26
+ ```markdown
27
+ ## Failure Analysis
28
+
29
+ ### Symptom
30
+ Claude generated console.log statements in a commit even though this is
31
+ forbidden by project rules.
32
+
33
+ ### Root Cause
34
+ Hook gap: no pre-commit hook validates for console.log before commit.
35
+ The CLAUDE.md rule exists but there is no enforcement mechanism.
36
+
37
+ ### Evidence
38
+ - CLAUDE.md line 42: "No console.log in commits"
39
+ - git log shows 3 recent commits with console.log (commits abc, def, ghi)
40
+ - No hooks/scripts/ file performs this check
41
+
42
+ ### Classification
43
+ Hook gap — enforcement is missing, rule exists only as documentation.
44
+
45
+ ### Hypothesis
46
+ Adding a pre-commit hook that scans staged files for console.log will
47
+ prevent this failure class. Confidence: HIGH.
48
+ ```
49
+
50
+ ## Communication
51
+ - Reports findings to: capability-designer
52
+ - Receives instructions from: orchestrator (capability-loop skill)
53
+
54
+ ## Domain Knowledge
55
+ Failure taxonomy: hook gap (no enforcement), skill gap (no workflow guidance), behavior gap (Claude ignores instruction), guard gap (no validation after action), config gap (wrong model/tool/permission). Root cause must be one of these — not a symptom restatement.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: implementer
3
+ role: Builds the new capability from the design spec
4
+ tools: [Read, Write, Edit, Bash, Glob]
5
+ ---
6
+
7
+ # Implementer
8
+
9
+ ## Role
10
+ Builds the capability specified by capability-designer. Creates or modifies the necessary hook script, skill file, or config entry. Follows the existing project conventions exactly — no new patterns unless the design requires them.
11
+
12
+ ## Responsibilities
13
+ - Read the capability design spec fully before writing any code
14
+ - Check existing files in the target directory before creating new ones
15
+ - Implement the logic exactly as specified — no scope creep
16
+ - Register the capability in the correct integration point
17
+ - Run a smoke test to confirm basic functionality before handing off to tester
18
+
19
+ ## Input
20
+ - Capability design spec from capability-designer
21
+ - Target directory path (hooks/scripts/, skills/, agents/)
22
+ - Existing related files for convention reference
23
+
24
+ ## Output
25
+ Implementation summary:
26
+
27
+ ```markdown
28
+ ## Implementation: console-log-guard hook
29
+
30
+ ### Created Files
31
+ - hooks/scripts/console-log-guard.sh
32
+
33
+ ### Modified Files
34
+ - .husky/pre-commit (added console-log-guard invocation)
35
+
36
+ ### Smoke Test
37
+ - Staged file with console.log → hook blocked commit (exit 1) ✓
38
+ - Staged file without console.log → hook passed (exit 0) ✓
39
+
40
+ ### Notes
41
+ - Script uses grep -n for line numbers in error output
42
+ - Skips node_modules/ automatically via git's staging filter
43
+ ```
44
+
45
+ ## Communication
46
+ - Reports findings to: tester
47
+ - Receives instructions from: orchestrator (capability-loop skill)
48
+
49
+ ## Domain Knowledge
50
+ Follow CLAUDE.md complexity limits: functions ≤50 lines, nesting ≤3 levels. Hook scripts must be idempotent and exit cleanly. Skills must use the established SKILL.md frontmatter format. Never create a new integration pattern without checking existing hooks/scripts/ for the established approach.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: tester
3
+ role: Verifies the new capability prevents the original failure
4
+ tools: [Bash, Read, Write]
5
+ ---
6
+
7
+ # Tester
8
+
9
+ ## Role
10
+ Validates that the implemented capability closes the specific failure identified by failure-analyst. Runs both the original failure scenario and boundary cases to confirm the capability works and does not introduce regressions.
11
+
12
+ ## Responsibilities
13
+ - Reproduce the original failure condition before testing the fix
14
+ - Confirm the capability blocks or prevents the failure as designed
15
+ - Test boundary cases from the acceptance criteria in the design spec
16
+ - Verify the capability does not interfere with valid/normal workflow
17
+ - Report results with clear pass/fail evidence for each case
18
+
19
+ ## Input
20
+ - Implementation summary from implementer
21
+ - Capability design spec acceptance tests from capability-designer
22
+ - Original failure description from failure-analyst
23
+
24
+ ## Output
25
+ Test verification report:
26
+
27
+ ```markdown
28
+ ## Capability Test: console-log-guard hook
29
+
30
+ ### Original Failure Reproduction
31
+ - Staged file with console.log before fix → commit succeeded (failure confirmed)
32
+
33
+ ### Acceptance Tests
34
+ - [x] Staged file WITH console.log → commit blocked, shows file:line reference
35
+ - [x] Staged file WITHOUT console.log → commit proceeds normally
36
+ - [x] Multiple files staged, one has console.log → commit blocked, lists all violations
37
+ - [x] No staged files → hook exits 0, no error
38
+
39
+ ### Regression Check
40
+ - [x] Normal commit flow (clean code) → unaffected
41
+ - [x] Hook does not run on `git push` → correct, pre-commit only
42
+
43
+ ### Verdict
44
+ CAPABILITY VERIFIED — original failure class is now prevented.
45
+ Loop closed.
46
+ ```
47
+
48
+ ## Communication
49
+ - Reports findings to: orchestrator (capability-loop skill) / user
50
+ - Receives instructions from: orchestrator
51
+
52
+ ## Domain Knowledge
53
+ A capability is verified only when: (1) the original failure is reproduced without the fix, (2) the fix prevents the failure, and (3) normal workflow is unaffected. If step 1 cannot be reproduced, halt and re-examine the root cause — the failure may have been a false positive.
@@ -0,0 +1,118 @@
1
+ # Capability Spec: {{CAPABILITY_NAME}}
2
+
3
+ **Date**: {{DATE}}
4
+ **Origin**: {{FAILURE_ANALYSIS_FILE}}
5
+ **Category**: {{TOOL | GUARDRAIL | ABSTRACTION | DOCUMENTATION | FEEDBACK}}
6
+ **Priority**: {{P1 | P2 | P3}}
7
+
8
+ ---
9
+
10
+ ## Problem Statement
11
+
12
+ **Failure this solves**: {{FAILURE_DESCRIPTION}}
13
+
14
+ **Without this capability:**
15
+ {{WITHOUT_CAPABILITY_DESCRIPTION}}
16
+
17
+ **With this capability:**
18
+ {{WITH_CAPABILITY_DESCRIPTION}}
19
+
20
+ ---
21
+
22
+ ## Specification
23
+
24
+ ### What It Does
25
+
26
+ {{CAPABILITY_DESCRIPTION_DETAILED}}
27
+
28
+ ### Inputs
29
+
30
+ | Input | Type | Source | Required |
31
+ |-------|------|--------|----------|
32
+ | {{INPUT_1}} | {{TYPE_1}} | {{SOURCE_1}} | {{YES/NO}} |
33
+ | {{INPUT_2}} | {{TYPE_2}} | {{SOURCE_2}} | {{YES/NO}} |
34
+
35
+ ### Outputs
36
+
37
+ | Output | Type | Format | Notes |
38
+ |--------|------|--------|-------|
39
+ | {{OUTPUT_1}} | {{TYPE_1}} | {{FORMAT_1}} | {{NOTES_1}} |
40
+
41
+ ### Behavior
42
+
43
+ 1. {{BEHAVIOR_STEP_1}}
44
+ 2. {{BEHAVIOR_STEP_2}}
45
+ 3. {{BEHAVIOR_STEP_3}}
46
+
47
+ ### Error Cases
48
+
49
+ | Condition | Behavior |
50
+ |-----------|----------|
51
+ | {{ERROR_CASE_1}} | {{ERROR_BEHAVIOR_1}} |
52
+ | {{ERROR_CASE_2}} | {{ERROR_BEHAVIOR_2}} |
53
+
54
+ ---
55
+
56
+ ## Implementation Plan
57
+
58
+ ### Files to Create
59
+
60
+ - `{{NEW_FILE_1}}` — {{PURPOSE_1}}
61
+ - `{{NEW_FILE_2}}` — {{PURPOSE_2}}
62
+
63
+ ### Files to Modify
64
+
65
+ - `{{MODIFIED_FILE_1}}` — {{CHANGE_DESCRIPTION_1}}
66
+
67
+ ### Integration Points
68
+
69
+ - Triggers on: {{TRIGGER_CONDITION}}
70
+ - Called by: {{CALLER}}
71
+ - Calls into: {{DEPENDENCIES}}
72
+
73
+ ---
74
+
75
+ ## Acceptance Criteria
76
+
77
+ - [ ] {{ACCEPTANCE_CRITERION_1}}
78
+ - [ ] {{ACCEPTANCE_CRITERION_2}}
79
+ - [ ] {{ACCEPTANCE_CRITERION_3}}
80
+ - [ ] Original failure scenario no longer occurs
81
+ - [ ] Existing functionality unaffected (regression tests pass)
82
+
83
+ ---
84
+
85
+ ## Verification Plan
86
+
87
+ **Test to add**: `{{TEST_FILE}}` — `{{TEST_DESCRIPTION}}`
88
+
89
+ **Manual verification steps:**
90
+ 1. {{VERIFY_STEP_1}}
91
+ 2. {{VERIFY_STEP_2}}
92
+
93
+ ---
94
+
95
+ ## Persistence
96
+
97
+ After building, record in `.claude/vibe/capabilities-log.md`:
98
+
99
+ ```markdown
100
+ ## {{DATE}} — {{CAPABILITY_NAME}}
101
+
102
+ **Failure**: {{FAILURE_SHORT}}
103
+ **Missing**: {{MISSING_CAPABILITY_SHORT}}
104
+ **Built**: {{WHAT_WAS_BUILT}}
105
+ **Files**: {{FILES_LIST}}
106
+ **Prevents**: {{FAILURE_CLASS}}
107
+ ```
108
+
109
+ Save to memory:
110
+ ```
111
+ save_memory("capability-{{CAPABILITY_NAME}}", {
112
+ "failure": "{{FAILURE_SHORT}}",
113
+ "diagnosis": "{{MISSING_CAPABILITY_SHORT}}",
114
+ "category": "{{CATEGORY}}",
115
+ "solution": "{{WHAT_WAS_BUILT}}",
116
+ "files_changed": [{{FILES_LIST}}]
117
+ })
118
+ ```
@@ -0,0 +1,118 @@
1
+ # Failure Analysis: {{FAILURE_TITLE}}
2
+
3
+ **Date**: {{DATE}}
4
+ **Reporter**: {{REPORTER}}
5
+ **Occurrence count**: {{OCCURRENCE_COUNT}}
6
+ **First seen**: {{FIRST_SEEN_DATE}}
7
+
8
+ ---
9
+
10
+ ## Failure Description
11
+
12
+ **What happened:**
13
+ {{FAILURE_DESCRIPTION}}
14
+
15
+ **Expected behavior:**
16
+ {{EXPECTED_BEHAVIOR}}
17
+
18
+ **Actual behavior:**
19
+ {{ACTUAL_BEHAVIOR}}
20
+
21
+ **Reproduction steps:**
22
+ 1. {{STEP_1}}
23
+ 2. {{STEP_2}}
24
+ 3. {{STEP_3}}
25
+
26
+ ---
27
+
28
+ ## Diagnosis
29
+
30
+ Answer all five questions:
31
+
32
+ ### 1. Missing Tool?
33
+ > Did the agent lack a command, API, or utility to accomplish the task?
34
+
35
+ {{TOOL_DIAGNOSIS}}
36
+
37
+ - Missing: {{MISSING_TOOL_OR_NONE}}
38
+ - Where to build: {{TOOL_BUILD_LOCATION_OR_NA}}
39
+
40
+ ### 2. Missing Guardrail?
41
+ > Should the agent have been prevented from doing this?
42
+
43
+ {{GUARDRAIL_DIAGNOSIS}}
44
+
45
+ - Missing: {{MISSING_GUARDRAIL_OR_NONE}}
46
+ - Where to build: {{GUARDRAIL_BUILD_LOCATION_OR_NA}}
47
+
48
+ ### 3. Missing Abstraction?
49
+ > Was the agent repeating work that should be shared code?
50
+
51
+ {{ABSTRACTION_DIAGNOSIS}}
52
+
53
+ - Missing: {{MISSING_ABSTRACTION_OR_NONE}}
54
+ - Where to build: {{ABSTRACTION_BUILD_LOCATION_OR_NA}}
55
+
56
+ ### 4. Missing Documentation?
57
+ > Did the agent lack knowledge that should be discoverable?
58
+
59
+ {{DOCUMENTATION_DIAGNOSIS}}
60
+
61
+ - Missing: {{MISSING_DOC_OR_NONE}}
62
+ - Where to add: {{DOC_LOCATION_OR_NA}}
63
+
64
+ ### 5. Missing Feedback?
65
+ > Did the agent not know it was doing the wrong thing?
66
+
67
+ {{FEEDBACK_DIAGNOSIS}}
68
+
69
+ - Missing: {{MISSING_FEEDBACK_OR_NONE}}
70
+ - Where to add: {{FEEDBACK_LOCATION_OR_NA}}
71
+
72
+ ---
73
+
74
+ ## Root Cause
75
+
76
+ **Primary category**: {{TOOL | GUARDRAIL | ABSTRACTION | DOCUMENTATION | FEEDBACK}}
77
+
78
+ **Root cause statement**: {{ROOT_CAUSE_ONE_SENTENCE}}
79
+
80
+ **Contributing factors:**
81
+ - {{FACTOR_1}}
82
+ - {{FACTOR_2}}
83
+
84
+ ---
85
+
86
+ ## Capability to Build
87
+
88
+ **Capability name**: `{{CAPABILITY_NAME}}`
89
+
90
+ **What to build**: {{CAPABILITY_DESCRIPTION}}
91
+
92
+ **Build plan:**
93
+ 1. {{BUILD_STEP_1}}
94
+ 2. {{BUILD_STEP_2}}
95
+ 3. {{BUILD_STEP_3}}
96
+
97
+ **Files to create/modify:**
98
+ - `{{FILE_1}}` — {{FILE_1_PURPOSE}}
99
+ - `{{FILE_2}}` — {{FILE_2_PURPOSE}}
100
+
101
+ ---
102
+
103
+ ## Verification
104
+
105
+ - [ ] Original failure reproduced before fix
106
+ - [ ] New capability prevents the failure
107
+ - [ ] Existing tests still pass
108
+ - [ ] New test added that would catch this failure class
109
+
110
+ ---
111
+
112
+ ## Prevents
113
+
114
+ This capability prevents the following class of failures:
115
+
116
+ > {{FAILURE_CLASS_DESCRIPTION}}
117
+
118
+ Estimated recurrence if not built: {{HIGH | MEDIUM | LOW}}
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: behavior-capturer
3
+ role: Reads existing code and captures current input/output behavior for test generation
4
+ tools: [Read, Grep, Glob, Bash]
5
+ ---
6
+
7
+ # Behavior Capturer
8
+
9
+ ## Role
10
+ Explores target code modules to map their current observable behavior. Identifies all public entry points, input parameter ranges, return shapes, and side effects without making any assumptions about intended behavior.
11
+
12
+ ## Responsibilities
13
+ - Read target files and identify all exported functions, classes, and methods
14
+ - Map all branching paths (if/else, switch, try/catch, ternary chains)
15
+ - Catalog side effects: DB writes, file I/O, network calls, mutations
16
+ - Document edge-case inputs: null, undefined, empty string, boundary integers
17
+ - Record actual observed outputs, not expected outputs
18
+
19
+ ## Input
20
+ - Target file path(s) to analyze
21
+ - Optional: scope hint (e.g., "focus on the export layer" or "only public methods")
22
+
23
+ ## Output
24
+ Structured behavior manifest in this format:
25
+
26
+ ```markdown
27
+ ## Behavior Manifest: {ModuleName}
28
+
29
+ ### Public API Surface
30
+ - `functionName(param: Type): ReturnType` — brief description of what it does
31
+
32
+ ### Branching Paths
33
+ - `functionName`: path A (condition) → result X; path B (condition) → result Y
34
+
35
+ ### Side Effects
36
+ - DB: writes to `users` table on success
37
+ - Network: calls `/api/notify` on error
38
+
39
+ ### Edge Cases to Cover
40
+ - null input → throws TypeError
41
+ - empty array → returns []
42
+ - value > MAX_INT → clamps to MAX_INT
43
+ ```
44
+
45
+ ## Communication
46
+ - Reports findings to: orchestrator (characterization-test skill)
47
+ - Receives instructions from: orchestrator
48
+
49
+ ## Domain Knowledge
50
+ Focus on observable contracts, not implementation internals. Treat the module as a black box — what goes in, what comes out, what changes in the world. Use `toMatchSnapshot()` candidates for complex return shapes.