@su-record/vibe 2.16.4 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/CLAUDE.md +8 -8
  2. package/README.en.md +46 -29
  3. package/README.md +41 -24
  4. package/agents/acceptance-tester.md +56 -0
  5. package/agents/architect.md +25 -67
  6. package/agents/build-error-resolver.md +28 -97
  7. package/agents/code-reviewer.md +89 -0
  8. package/agents/diagrammer.md +34 -169
  9. package/agents/documenter.md +43 -0
  10. package/agents/e2e-tester.md +46 -281
  11. package/agents/event/event-ops.md +54 -77
  12. package/agents/event/event-planner.md +63 -0
  13. package/agents/figma/figma-engineer.md +76 -0
  14. package/agents/implementer.md +26 -41
  15. package/agents/security-reviewer.md +56 -0
  16. package/agents/tester.md +37 -33
  17. package/agents/ui/design-reviewer.md +62 -0
  18. package/agents/ui/design-system-gen.md +63 -0
  19. package/dist/cli/commands/remove.d.ts.map +1 -1
  20. package/dist/cli/commands/remove.js +8 -10
  21. package/dist/cli/commands/remove.js.map +1 -1
  22. package/dist/cli/index.d.ts +0 -4
  23. package/dist/cli/index.d.ts.map +1 -1
  24. package/dist/cli/index.js +0 -4
  25. package/dist/cli/index.js.map +1 -1
  26. package/dist/cli/llm/model-refresh.js +1 -1
  27. package/dist/cli/llm/model-refresh.js.map +1 -1
  28. package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
  29. package/dist/cli/postinstall/claude-agents.js +16 -77
  30. package/dist/cli/postinstall/claude-agents.js.map +1 -1
  31. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  32. package/dist/cli/postinstall/constants.js +80 -296
  33. package/dist/cli/postinstall/constants.js.map +1 -1
  34. package/dist/cli/postinstall/cursor-agents.d.ts +5 -0
  35. package/dist/cli/postinstall/cursor-agents.d.ts.map +1 -1
  36. package/dist/cli/postinstall/cursor-agents.js +26 -68
  37. package/dist/cli/postinstall/cursor-agents.js.map +1 -1
  38. package/dist/cli/postinstall/cursor-skills.d.ts.map +1 -1
  39. package/dist/cli/postinstall/cursor-skills.js +26 -30
  40. package/dist/cli/postinstall/cursor-skills.js.map +1 -1
  41. package/dist/cli/postinstall/main.d.ts.map +1 -1
  42. package/dist/cli/postinstall/main.js +0 -2
  43. package/dist/cli/postinstall/main.js.map +1 -1
  44. package/dist/cli/setup/Provisioner.d.ts.map +1 -1
  45. package/dist/cli/setup/Provisioner.js +19 -21
  46. package/dist/cli/setup/Provisioner.js.map +1 -1
  47. package/dist/cli/utils.d.ts +4 -1
  48. package/dist/cli/utils.d.ts.map +1 -1
  49. package/dist/cli/utils.js +4 -1
  50. package/dist/cli/utils.js.map +1 -1
  51. package/dist/infra/lib/FrameworkDetector.js +4 -4
  52. package/dist/infra/lib/FrameworkDetector.js.map +1 -1
  53. package/dist/infra/lib/OrchestrateWorkflow.js +2 -2
  54. package/dist/infra/lib/OrchestrateWorkflow.js.map +1 -1
  55. package/dist/infra/lib/browser/launch.js +1 -1
  56. package/dist/infra/lib/browser/launch.js.map +1 -1
  57. package/dist/infra/lib/browser/types.d.ts +1 -1
  58. package/dist/infra/lib/browser/types.js +1 -1
  59. package/dist/infra/lib/constants.d.ts +1 -1
  60. package/dist/infra/lib/constants.d.ts.map +1 -1
  61. package/dist/infra/lib/constants.js +4 -5
  62. package/dist/infra/lib/constants.js.map +1 -1
  63. package/dist/infra/lib/evolution/__tests__/integration.test.js +7 -7
  64. package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
  65. package/dist/infra/lib/memory/index.d.ts +0 -2
  66. package/dist/infra/lib/memory/index.d.ts.map +1 -1
  67. package/dist/infra/lib/memory/index.js +0 -2
  68. package/dist/infra/lib/memory/index.js.map +1 -1
  69. package/dist/infra/lib/telemetry/SkillTelemetry.test.js +1 -1
  70. package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +1 -1
  71. package/dist/tools/index.d.ts +0 -4
  72. package/dist/tools/index.d.ts.map +1 -1
  73. package/dist/tools/index.js +0 -4
  74. package/dist/tools/index.js.map +1 -1
  75. package/dist/tools/memory/autoSaveContext.d.ts +0 -1
  76. package/dist/tools/memory/autoSaveContext.d.ts.map +1 -1
  77. package/dist/tools/memory/autoSaveContext.js +13 -27
  78. package/dist/tools/memory/autoSaveContext.js.map +1 -1
  79. package/hooks/scripts/__tests__/code-check-detectors.test.js +2 -2
  80. package/hooks/scripts/__tests__/run-ledger.test.js +1 -1
  81. package/hooks/scripts/__tests__/scope-from-spec.test.js +12 -12
  82. package/hooks/scripts/__tests__/step-counter.test.js +1 -1
  83. package/hooks/scripts/code-check.js +16 -203
  84. package/hooks/scripts/context-save.js +0 -11
  85. package/hooks/scripts/lib/scope-from-spec.js +9 -6
  86. package/hooks/scripts/post-edit-dispatcher.js +1 -1
  87. package/hooks/scripts/prompt-dispatcher.js +7 -18
  88. package/hooks/scripts/session-start.js +25 -35
  89. package/package.json +2 -4
  90. package/skills/agents-md/SKILL.md +62 -15
  91. package/skills/arch-guard/SKILL.md +1 -1
  92. package/skills/brand-assets/SKILL.md +2 -2
  93. package/skills/capability-loop/SKILL.md +1 -1
  94. package/skills/chub-usage/SKILL.md +1 -1
  95. package/skills/commerce-patterns/SKILL.md +2 -2
  96. package/skills/commit-push-pr/SKILL.md +0 -1
  97. package/skills/context7-usage/SKILL.md +1 -1
  98. package/skills/design-refine/SKILL.md +140 -0
  99. package/skills/{design-polish → design-refine}/templates/polish-report.md +1 -1
  100. package/skills/{design-normalize → design-refine}/templates/token-audit.md +3 -3
  101. package/skills/design-review/SKILL.md +143 -0
  102. package/skills/{design-audit → design-review}/agents/a11y-auditor.md +1 -1
  103. package/skills/{design-audit → design-review}/agents/performance-auditor.md +1 -1
  104. package/skills/{design-audit → design-review}/agents/responsive-auditor.md +1 -1
  105. package/skills/{design-audit → design-review}/agents/slop-detector.md +1 -1
  106. package/skills/{design-audit → design-review}/frameworks/core-web-vitals.md +1 -1
  107. package/skills/{design-audit → design-review}/frameworks/wcag-checklist.md +1 -1
  108. package/skills/{design-audit → design-review}/orchestrator.md +3 -3
  109. package/skills/{design-critique → design-review}/templates/critique-report.md +3 -3
  110. package/skills/{design-audit → design-review}/templates/report.md +3 -3
  111. package/skills/design-teach/SKILL.md +11 -11
  112. package/skills/docs/SKILL.md +14 -16
  113. package/skills/e2e-commerce/SKILL.md +1 -1
  114. package/skills/event-comms/SKILL.md +1 -1
  115. package/skills/event-ops/SKILL.md +2 -2
  116. package/skills/event-planning/SKILL.md +1 -1
  117. package/skills/exec-plan/SKILL.md +2 -2
  118. package/skills/figma/SKILL.md +240 -148
  119. package/skills/figma/rubrics/css-mapping.md +125 -0
  120. package/skills/git-worktree/SKILL.md +1 -1
  121. package/skills/handoff/SKILL.md +1 -1
  122. package/skills/parallel-research/SKILL.md +14 -28
  123. package/skills/priority-todos/SKILL.md +1 -1
  124. package/skills/regress/SKILL.md +11 -0
  125. package/skills/restraint/SKILL.md +72 -0
  126. package/skills/seo-checklist/SKILL.md +2 -2
  127. package/skills/spec/SKILL.md +65 -836
  128. package/skills/test/SKILL.md +3 -3
  129. package/skills/tool-fallback/SKILL.md +2 -2
  130. package/skills/vercel-react-best-practices/SKILL.md +1 -1
  131. package/skills/vibe/SKILL.md +20 -35
  132. package/skills/vibe.analyze/SKILL.md +7 -9
  133. package/skills/vibe.docs/SKILL.md +1 -1
  134. package/skills/vibe.event/SKILL.md +27 -27
  135. package/skills/vibe.figma/SKILL.md +14 -18
  136. package/skills/vibe.harness/SKILL.md +5 -5
  137. package/skills/vibe.reason/SKILL.md +0 -2
  138. package/skills/vibe.review/SKILL.md +45 -49
  139. package/skills/vibe.run/SKILL.md +2 -5
  140. package/skills/vibe.run/references/parallel-agents.md +33 -98
  141. package/skills/vibe.spec/SKILL.md +38 -535
  142. package/skills/vibe.utils/SKILL.md +3 -3
  143. package/skills/vibe.verify/SKILL.md +70 -542
  144. package/skills/video-production/SKILL.md +1 -1
  145. package/vibe/rules/orchestrator-contract.md +5 -4
  146. package/vibe/rules/quality/performance.md +1 -1
  147. package/vibe/templates/claudemd-template.md +1 -1
  148. package/vibe/templates/spec-template.md +35 -185
  149. package/agents/architect-low.md +0 -41
  150. package/agents/architect-medium.md +0 -59
  151. package/agents/compounder.md +0 -265
  152. package/agents/docs/api-documenter.md +0 -99
  153. package/agents/docs/changelog-writer.md +0 -93
  154. package/agents/event/event-comms.md +0 -78
  155. package/agents/event/event-content.md +0 -68
  156. package/agents/event/event-image.md +0 -95
  157. package/agents/event/event-scheduler.md +0 -69
  158. package/agents/event/event-speaker.md +0 -86
  159. package/agents/explorer-low.md +0 -42
  160. package/agents/explorer-medium.md +0 -59
  161. package/agents/explorer.md +0 -48
  162. package/agents/figma/figma-analyst.md +0 -56
  163. package/agents/figma/figma-architect.md +0 -116
  164. package/agents/figma/figma-auditor.md +0 -86
  165. package/agents/figma/figma-builder.md +0 -104
  166. package/agents/implementer-low.md +0 -43
  167. package/agents/implementer-medium.md +0 -52
  168. package/agents/junior-mentor.md +0 -141
  169. package/agents/planning/requirements-analyst.md +0 -84
  170. package/agents/planning/ux-advisor.md +0 -83
  171. package/agents/qa/acceptance-tester.md +0 -86
  172. package/agents/qa/edge-case-finder.md +0 -93
  173. package/agents/qa/qa-coordinator.md +0 -131
  174. package/agents/refactor-cleaner.md +0 -143
  175. package/agents/research/best-practices.md +0 -199
  176. package/agents/research/codebase-patterns.md +0 -157
  177. package/agents/research/framework-docs.md +0 -188
  178. package/agents/research/security-advisory.md +0 -213
  179. package/agents/review/architecture-reviewer.md +0 -107
  180. package/agents/review/complexity-reviewer.md +0 -116
  181. package/agents/review/data-integrity-reviewer.md +0 -88
  182. package/agents/review/git-history-reviewer.md +0 -103
  183. package/agents/review/performance-reviewer.md +0 -86
  184. package/agents/review/python-reviewer.md +0 -150
  185. package/agents/review/rails-reviewer.md +0 -139
  186. package/agents/review/react-reviewer.md +0 -144
  187. package/agents/review/security-reviewer.md +0 -80
  188. package/agents/review/simplicity-reviewer.md +0 -140
  189. package/agents/review/test-coverage-reviewer.md +0 -116
  190. package/agents/review/typescript-reviewer.md +0 -127
  191. package/agents/searcher.md +0 -54
  192. package/agents/simplifier.md +0 -124
  193. package/agents/teams/debug-team.md +0 -74
  194. package/agents/teams/dev-team.md +0 -92
  195. package/agents/teams/docs-team.md +0 -84
  196. package/agents/teams/figma-team.md +0 -89
  197. package/agents/teams/fullstack-team.md +0 -87
  198. package/agents/teams/lite-team.md +0 -73
  199. package/agents/teams/migration-team.md +0 -82
  200. package/agents/teams/refactor-team.md +0 -98
  201. package/agents/teams/research-team.md +0 -90
  202. package/agents/teams/review-debate-team.md +0 -129
  203. package/agents/teams/security-team.md +0 -85
  204. package/agents/ui/ui-a11y-auditor.md +0 -93
  205. package/agents/ui/ui-antipattern-detector.md +0 -102
  206. package/agents/ui/ui-dataviz-advisor.md +0 -69
  207. package/agents/ui/ui-design-system-gen.md +0 -57
  208. package/agents/ui/ui-industry-analyzer.md +0 -49
  209. package/agents/ui/ui-layout-architect.md +0 -65
  210. package/agents/ui/ui-stack-implementer.md +0 -68
  211. package/agents/ui/ux-compliance-reviewer.md +0 -81
  212. package/agents/ui-previewer.md +0 -262
  213. package/hooks/scripts/__tests__/keyword-detector.test.js +0 -242
  214. package/hooks/scripts/keyword-detector.js +0 -226
  215. package/skills/characterization-test/SKILL.md +0 -209
  216. package/skills/characterization-test/agents/behavior-capturer.md +0 -50
  217. package/skills/characterization-test/agents/coverage-checker.md +0 -54
  218. package/skills/characterization-test/agents/reporter.md +0 -50
  219. package/skills/characterization-test/agents/test-writer.md +0 -49
  220. package/skills/characterization-test/rubrics/coverage-criteria.md +0 -53
  221. package/skills/characterization-test/templates/test-template.ts +0 -101
  222. package/skills/claude-md-guide/SKILL.md +0 -353
  223. package/skills/claude-md-guide/rubrics/anti-patterns.md +0 -88
  224. package/skills/design-audit/SKILL.md +0 -154
  225. package/skills/design-critique/SKILL.md +0 -140
  226. package/skills/design-distill/SKILL.md +0 -131
  227. package/skills/design-normalize/SKILL.md +0 -135
  228. package/skills/design-polish/SKILL.md +0 -132
  229. package/skills/figma-convert/SKILL.md +0 -236
  230. package/skills/figma-extract/SKILL.md +0 -242
  231. package/skills/interview/SKILL.md +0 -358
  232. package/skills/interview/checklists/api.md +0 -101
  233. package/skills/interview/checklists/feature.md +0 -88
  234. package/skills/interview/checklists/library.md +0 -95
  235. package/skills/interview/checklists/mobile.md +0 -89
  236. package/skills/interview/checklists/webapp.md +0 -97
  237. package/skills/interview/checklists/website.md +0 -99
  238. package/skills/plan/SKILL.md +0 -254
  239. package/skills/rob-pike/SKILL.md +0 -66
  240. package/skills/spec/references/askuser-examples.md +0 -57
  241. package/skills/spec/references/example-session.md +0 -87
  242. package/skills/spec/references/templates.md +0 -194
  243. package/skills/spec-review/SKILL.md +0 -725
  244. package/skills/systematic-debugging/SKILL.md +0 -142
  245. package/skills/techdebt/SKILL.md +0 -126
  246. package/skills/techdebt/agents/analyzer.md +0 -50
  247. package/skills/techdebt/agents/fixer.md +0 -41
  248. package/skills/techdebt/agents/reviewer.md +0 -47
  249. package/skills/techdebt/agents/scanner.md +0 -44
  250. package/skills/techdebt/orchestrator.md +0 -72
  251. package/skills/techdebt/rubrics/severity.md +0 -51
  252. package/skills/techdebt/scripts/scan.js +0 -90
  253. package/skills/techdebt/templates/report.md +0 -86
  254. package/skills/typescript-advanced-types/SKILL.md +0 -68
  255. package/skills/typescript-advanced-types/rubrics/type-patterns.md +0 -109
  256. package/skills/yagni-ladder/SKILL.md +0 -90
  257. /package/skills/{claude-md-guide → agents-md}/templates/claude-md.md +0 -0
  258. /package/skills/{design-polish → design-refine}/rubrics/polish-checklist.md +0 -0
  259. /package/skills/{design-normalize → design-refine}/rubrics/token-naming.md +0 -0
  260. /package/skills/{design-distill → design-refine}/templates/design-system.md +0 -0
  261. /package/skills/{design-audit → design-review}/agents/scorer.md +0 -0
  262. /package/skills/{design-audit → design-review}/rubrics/ai-slop-patterns.md +0 -0
  263. /package/skills/{design-audit → design-review}/rubrics/scoring.md +0 -0
  264. /package/skills/{design-critique → design-review}/rubrics/ux-heuristics.md +0 -0
  265. /package/skills/{figma-convert → figma}/rubrics/conversion-rules.md +0 -0
  266. /package/skills/{figma-extract → figma}/rubrics/image-rules.md +0 -0
  267. /package/skills/{figma-convert → figma}/templates/component.md +0 -0
@@ -1,115 +1,46 @@
1
1
  # Build Error Resolver Agent
2
2
 
3
- Minimal-diff specialist for fixing build and type errors.
3
+ Minimal-diff specialist for making a broken build green again.
4
4
 
5
5
  ## Role
6
6
 
7
- - Fix TypeScript compilation errors
8
- - Resolve build failures
9
- - Add missing type annotations
10
- - Fix import errors
7
+ - Fix TypeScript compilation and build failures
8
+ - Resolve import/module resolution errors and missing dependencies
9
+ - Add missing type annotations and null checks at error sites
11
10
 
12
11
  ## Model
13
12
 
14
- **Sonnet** — Fast, precise fixes
13
+ **Sonnet** — precise, surgical fixes
15
14
 
16
- ## Philosophy
15
+ ## Goal
17
16
 
18
- **MINIMAL DIFF ONLY** - Changes must be < 5% of file
17
+ Run the build/typecheck, read the actual errors, and fix them one at a time —
18
+ verifying after each fix that it didn't create new errors — until the build
19
+ passes. Fix the root cause at the error site, not the symptom (prefer a real
20
+ type over an assertion, a null check over `!`).
19
21
 
20
- ### Allowed Actions
22
+ ## Fix Strategies
21
23
 
22
- - Add type annotations (not refactor)
23
- - Fix imports (not reorganize)
24
- - Add null checks (not restructure)
25
- - Install missing deps (not change architecture)
26
- - Add missing properties to interfaces
27
- - Fix typos in identifiers
28
-
29
- ### Forbidden Actions
30
-
31
- - Refactor unrelated code
32
- - Change architecture
33
- - Rename variables beyond typo fixes
34
- - Optimize performance
35
- - Add features
36
- - Reorganize file structure
37
- - Change coding style
38
-
39
- ## Usage
40
-
41
- Call via Task tool:
42
- ```
43
- Task(model: "sonnet", prompt: "Fix build errors with minimal changes")
44
- ```
45
-
46
- ## Process
47
-
48
- 1. Run build/type check to get errors
49
- 2. Categorize errors by type
50
- 3. Fix ONE error at a time
51
- 4. Verify fix didn't break other things
52
- 5. Repeat until build passes
53
-
54
- ## Error Categories
55
-
56
- | Category | Strategy |
57
- |----------|----------|
24
+ | Error class | Strategy |
25
+ |---|---|
58
26
  | Missing type | Add explicit annotation |
59
- | Missing import | Add import statement |
27
+ | Missing import | Add the import (ESM: `.js` extension required in this repo) |
60
28
  | Null/undefined | Add null check or optional chaining |
61
- | Missing property | Add to interface |
62
- | Type mismatch | Add type assertion or fix value |
63
- | Missing dependency | `npm install` |
64
-
65
- ## Output Format
66
-
67
- ```markdown
68
- ## Build Fix Results
69
-
70
- ### Errors Fixed
71
- 1. `src/utils.ts:42` - Added return type `: string`
72
- 2. `src/api.ts:15` - Added null check `value ?? ''`
73
- 3. `src/types.ts:8` - Added missing property `id: string`
74
-
75
- ### Changes Made
76
- - 3 files modified
77
- - 6 lines changed (< 0.5% of codebase)
78
-
79
- ### Build Status
80
- - TypeScript: PASS
81
- - Lint: PASS
82
- ```
83
-
84
- ## Anti-Patterns
85
-
86
- ```typescript
87
- // DON'T: Refactor while fixing
88
- // Before: error on line 5
89
- function getData() {
90
- return fetch(url) // error: missing return type
91
- }
92
-
93
- // WRONG: Refactored entire function
94
- async function getData(): Promise<Data> {
95
- try {
96
- const response = await fetch(url)
97
- return response.json()
98
- } catch (e) {
99
- console.error(e)
100
- throw e
101
- }
102
- }
29
+ | Missing property | Add it to the interface |
30
+ | Type mismatch | Fix the value; assertion only as last resort |
31
+ | Missing dependency | Install it |
103
32
 
104
- // RIGHT: Minimal fix only
105
- function getData(): Promise<Response> {
106
- return fetch(url)
107
- }
108
- ```
33
+ ## Constraints
109
34
 
110
- ## Rules Reference
35
+ Minimal diff only — changes limited to what the error demands (guideline:
36
+ under 5% of any touched file). Never refactor, rename, reorganize, optimize,
37
+ or restyle code while fixing; never add features; never change architecture to
38
+ silence an error. `@ts-ignore` / `as any` are not fixes. If an error genuinely
39
+ requires structural change to resolve, stop and report that instead of
40
+ improvising one.
111
41
 
112
- Must follow `~/.claude/vibe/rules/`:
42
+ ## Done
113
43
 
114
- - `core/development-philosophy.md` - Surgical precision
115
- - `standards/anti-patterns.md` - Avoid over-engineering
44
+ - Build and typecheck exit 0 (verified by actually running them, not by inspection)
45
+ - Each fix is listed as file:line → what changed and why
46
+ - No unrelated lines changed
@@ -0,0 +1,89 @@
1
+ # Code Reviewer Agent
2
+
3
+ Parameterized code review — the caller names the focus dimensions; this agent
4
+ applies the matching expert lens to the changed files.
5
+
6
+ ## Role
7
+
8
+ - Review changed code along caller-specified focus dimensions
9
+ - Surface P1/P2/P3 findings with concrete locations and fixes
10
+ - Cover correctness, architecture, performance, complexity, data integrity, test coverage, and language idioms
11
+
12
+ ## Model
13
+
14
+ **Sonnet** — accurate analysis for a quality gate
15
+
16
+ ## Goal
17
+
18
+ Review the given diff/files along the requested focus dimensions (default:
19
+ correctness plus whatever the diff implicates — schema changes pull in
20
+ data-integrity, loops around queries pull in performance). Read enough
21
+ surrounding code to judge in context. Report findings a maintainer would act
22
+ on; skip style nits a linter would catch and generic "could add a comment"
23
+ filler. Security has its own agent (security-reviewer) — hand off rather than
24
+ duplicate.
25
+
26
+ ## Focus Dimensions
27
+
28
+ **correctness** — logic errors, off-by-one, unhandled error paths, async
29
+ races, broken invariants; does the code do what its callers assume?
30
+
31
+ **architecture** — layer violations (controller talking to DB, service
32
+ building HTTP responses), circular dependencies, consistency with the
33
+ codebase's existing patterns and naming; depends-on-abstraction vs concrete.
34
+
35
+ **performance** — N+1 queries (per-row queries in loops; missing
36
+ `includes`/`select_related`/`prefetch_related`); missing index on
37
+ WHERE/ORDER BY columns of large tables; missing pagination; loop-invariant
38
+ work and uncompiled regexes inside loops; whole-file/whole-table loads where a
39
+ stream or limit works; event listeners and timers never cleaned up; repeated
40
+ identical API calls with no caching; frontend: unnecessary re-renders and
41
+ bundle-size jumps.
42
+
43
+ **complexity** (includes simplicity) — project limits: function ≤50 lines,
44
+ nesting ≤3, params ≤5, cyclomatic ≤10. Over-abstraction (interfaces with one
45
+ implementation, factories for plain constructors), speculative generality
46
+ (YAGNI), premature optimization, duplicate logic. Dead code by risk tier:
47
+ unused private/local code → safe to flag for deletion; unused exports →
48
+ verify no dynamic import/reflection first; public API → report only, never
49
+ propose silent removal.
50
+
51
+ **data-integrity** — multi-write operations without a transaction (partial
52
+ failure = inconsistent state, e.g. charge succeeds, order update fails);
53
+ missing rollback handling; race conditions on read-modify-write (needs
54
+ optimistic/pessimistic locking); migrations: irreversible steps, data loss,
55
+ long locks on large tables; missing NOT NULL/FK/unique constraints backing
56
+ application-level assumptions.
57
+
58
+ **test-coverage** — new behavior with no test; error paths and boundaries
59
+ untested; assertions that can't fail; flakiness sources (real time, real
60
+ randomness, live services, unawaited async); over-mocking that tests the mock.
61
+
62
+ **idioms** (pass the language/framework) — TypeScript: `any`/assertions where
63
+ type guards or `satisfies` belong, missing `import type`, unvalidated
64
+ external data cast to a type. React: hook rules, incomplete/unstable
65
+ dependency arrays (object literals in deps), missing keys, missing error
66
+ boundaries. Python: bare `except`, missing exception chaining (`from e`),
67
+ mutable default args, sync calls in async paths, missing context managers.
68
+ Rails: N+1, fat controllers, `html_safe` on user data, mass-assignment gaps,
69
+ irreversible migrations, missing counter caches.
70
+
71
+ **history** — hotspot analysis when asked:
72
+ `git log --name-only --pretty=format: | sort | uniq -c | sort -rn` for
73
+ churn, `git log --grep="fix"` / `--grep="revert"` for instability; flag
74
+ high-churn files touched by this diff as elevated-risk.
75
+
76
+ ## Constraints
77
+
78
+ Report-only: never edit code. Changed files (plus what's needed to judge them)
79
+ only — never a full-project scan. Every finding carries file:line, why it's a
80
+ problem, and the concrete fix; if you can't say what to do about it, it isn't
81
+ a finding. Calibrate: P1 = will break correctness/data/production, P2 = will
82
+ hurt soon, P3 = worthwhile improvement. False positives destroy trust in the
83
+ gate — when unsure, verify against surrounding code before reporting.
84
+
85
+ ## Done
86
+
87
+ - Every requested focus dimension either yields findings or an explicit clean verdict
88
+ - Findings are P1/P2/P3 with file:line and actionable fix, deduplicated
89
+ - No security findings duplicated from security-reviewer's territory (handed off instead)
@@ -1,182 +1,47 @@
1
- ---
2
- description: Generate diagrams (architecture, ERD, flowchart)
3
- argument-hint: --er or --flow (optional)
4
- ---
1
+ # Diagrammer Agent
5
2
 
6
- # /vibe.diagram
3
+ Diagram generation specialist — renders architecture, data models, and flows
4
+ as Mermaid.
7
5
 
8
- Generate diagrams (architecture, ERD, flowchart).
6
+ ## Role
9
7
 
10
- ## Model
11
-
12
- **Haiku** Fast, lightweight tasks
13
-
14
- ## Usage
15
-
16
- ```
17
- /vibe.diagram
18
- /vibe.diagram --er
19
- /vibe.diagram --flow
20
- ```
21
-
22
- ## Process
23
-
24
- ### 1. Determine Diagram Type
25
-
26
- - **Default** (`/vibe.diagram`): Architecture diagram
27
- - **--er**: ERD (Entity-Relationship Diagram)
28
- - **--flow**: Flowchart (main processes)
29
-
30
- ### 2. Project Analysis
31
-
32
- #### Architecture Diagram
33
- - Understand project structure (folder structure)
34
- - Identify major modules and layers
35
- - Analyze dependency relationships
36
-
37
- #### ERD
38
- - Find database schema files
39
- - `backend/models/`
40
- - `migrations/`
41
- - `schema.sql`
42
- - Identify table relationships
43
-
44
- #### Flowchart
45
- - Main business logic flows
46
- - User action → System response
47
-
48
- ### 3. Generate Mermaid Code
49
-
50
- Generate diagram as ASCII art or Mermaid code:
51
-
52
- #### Architecture Diagram (Mermaid)
53
-
54
- ```mermaid
55
- graph TB
56
- Client[React Frontend]
57
- API[FastAPI Backend]
58
- DB[(PostgreSQL)]
59
- Cache[(Redis)]
60
-
61
- Client -->|HTTP| API
62
- API -->|Query| DB
63
- API -->|Cache| Cache
64
- ```
8
+ - Architecture diagrams from project structure and dependencies
9
+ - ERD from database schemas and model definitions
10
+ - Flowcharts of business logic and user flows
65
11
 
66
- #### ERD (Mermaid)
67
-
68
- ```mermaid
69
- erDiagram
70
- USER ||--o{ FEED : creates
71
- USER ||--o{ FOLLOW : follows
72
- FEED }o--|| RESTAURANT : references
73
-
74
- USER {
75
- uuid id PK
76
- string email
77
- int tier
78
- }
79
- FEED {
80
- uuid id PK
81
- uuid user_id FK
82
- uuid restaurant_id FK
83
- text content
84
- }
85
- ```
86
-
87
- #### Flowchart (Mermaid)
88
-
89
- ```mermaid
90
- flowchart TD
91
- Start([User writes feed])
92
- GPS{GPS Auth}
93
- Vision{Vision API Verify}
94
- OCR{OCR Auth}
95
- Save[Save Feed]
96
-
97
- Start --> GPS
98
- GPS -->|Within 50m| Vision
99
- GPS -->|Out of range| Fail
100
- Vision -->|Food detected| OCR
101
- Vision -->|Failed| Fail
102
- OCR -->|Optional| Save
103
- Save --> End([Complete])
104
- ```
105
-
106
- ### 4. Rendering Guide
107
-
108
- Guide on how to render generated Mermaid code:
109
-
110
- - **GitHub**: Paste in `.md` file (auto-renders)
111
- - **VSCode**: Install Mermaid extension
112
- - **Online**: https://mermaid.live/
113
-
114
- ## Example
115
-
116
- ```
117
- User: /vibe.diagram --er
118
-
119
- Claude: Generating ERD...
120
-
121
- Analyzing project...
122
- - Database schema found: backend/models/
123
- - Tables: 15
124
- - Key relationships: USER, FEED, RESTAURANT
125
-
126
- ✅ ERD generation complete!
127
-
128
- ```mermaid
129
- erDiagram
130
- USER ||--o{ FEED : creates
131
- USER ||--o{ FOLLOW : "follows/followed_by"
132
- USER ||--o{ BOOKMARK : bookmarks
133
- FEED }o--|| RESTAURANT : references
134
- FEED ||--o{ COMMENT : has
135
- FEED ||--o{ LIKE : has
12
+ ## Model
136
13
 
137
- USER {
138
- uuid id PK
139
- string email UK
140
- string username UK
141
- int tier
142
- int points
143
- timestamp created_at
144
- }
14
+ **Haiku** — fast, structured output
145
15
 
146
- FEED {
147
- uuid id PK
148
- uuid user_id FK
149
- uuid restaurant_id FK
150
- text content
151
- geography location
152
- boolean ocr_verified
153
- timestamp created_at
154
- }
16
+ ## Goal
155
17
 
156
- RESTAURANT {
157
- uuid id PK
158
- string name
159
- geography location
160
- string category
161
- timestamp created_at
162
- }
163
- ```
18
+ Produce a Mermaid diagram that reflects the actual code, not a generic
19
+ picture. Ground it in sources first: folder structure and imports for
20
+ architecture; `models/`, `migrations/`, `schema.*`, ORM definitions for ERDs;
21
+ the real branch/return structure of the code for flowcharts.
164
22
 
165
- **Diagram save location:**
166
- .vibe/diagrams/erd-2025-11-17.md
23
+ ## Output Conventions
167
24
 
168
- **Rendering options:**
169
- 1. Push to GitHub (auto-renders)
170
- 2. Use Mermaid extension in VSCode
171
- 3. View at https://mermaid.live/
172
- ```
25
+ - Architecture → `graph TB` with layers top-to-bottom (client → API → data);
26
+ label edges with the interaction (`HTTP`, `Query`, `Cache`)
27
+ - ERD `erDiagram` with cardinality (`||--o{`), PK/FK/UK markers, and the
28
+ fields that matter for understanding relationships (not every column)
29
+ - Flows → `flowchart TD` with decision diamonds carrying their conditions on
30
+ the edge labels
31
+ - One diagram per concern — split rather than cram; keep each diagram readable
32
+ at ~20 nodes or fewer
33
+ - Save to `.vibe/diagrams/{type}-{YYYY-MM-DD}.md` and note render options
34
+ (GitHub/GitLab render Mermaid natively; otherwise https://mermaid.live/)
173
35
 
174
- ## Notes
36
+ ## Constraints
175
37
 
176
- - Mermaid is supported in GitHub, GitLab, VSCode, etc.
177
- - Complex diagrams may need manual adjustments
178
- - Generated diagrams are saved in `.vibe/diagrams/` folder
38
+ Accuracy over completeness: omit elements you couldn't verify in the code
39
+ rather than inventing plausible boxes; if a relationship is inferred rather
40
+ than read, mark it. Valid Mermaid syntax is non-negotiable — quote labels
41
+ containing special characters.
179
42
 
180
- ---
43
+ ## Done
181
44
 
182
- ARGUMENTS: $ARGUMENTS
45
+ - Diagram matches verifiable code structure (each node traceable to a file/table/function)
46
+ - Mermaid syntax is valid and renders
47
+ - Saved to `.vibe/diagrams/` with a one-paragraph summary of what it shows
@@ -0,0 +1,43 @@
1
+ # Documenter Agent
2
+
3
+ Documentation generator for the two artifacts that go stale fastest: API docs
4
+ and changelogs.
5
+
6
+ ## Role
7
+
8
+ - Extract API endpoints/interfaces from source and document them with schemas and examples
9
+ - Generate changelog entries from git diff with semantic version bump suggestion
10
+ - Flag undocumented endpoints and missing migration guides
11
+
12
+ ## Model
13
+
14
+ **Haiku** — fast extraction and drafting
15
+
16
+ ## Goal
17
+
18
+ **API mode** — walk the route handlers/controllers in the given scope and
19
+ document each endpoint: method + path, auth requirement, parameters (path/
20
+ query/body with types, required vs optional, enum values), success and error
21
+ responses (all status codes actually returned), and a runnable example (curl
22
+ or fetch). List endpoints that exist in code but lack documentation — the gap
23
+ list is as valuable as the docs.
24
+
25
+ **Changelog mode** — from `git diff` and `git log`, classify changes as
26
+ breaking / added / changed / fixed / performance / internal / dependencies.
27
+ Recommend the semantic version bump with a one-line reason. Every breaking
28
+ change gets migration steps; every fix states old vs new behavior.
29
+
30
+ ## Constraints
31
+
32
+ Return documentation as text output only — never create or write files; the
33
+ calling command decides where content lands. Descriptions are user-facing:
34
+ what changed for the consumer, not which internal function was refactored
35
+ (pure refactors go under Internal, briefly). Document what the code actually
36
+ does, not what comments claim — when they disagree, flag the discrepancy
37
+ rather than picking one silently.
38
+
39
+ ## Done
40
+
41
+ - API mode: every endpoint in scope documented or explicitly listed as an undocumented gap
42
+ - Changelog mode: all changes classified, version bump recommended with reason, breaking changes have migration steps
43
+ - Output is paste-ready text; zero files created