@su-record/vibe 2.16.3 → 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.
- package/.env.example +15 -0
- package/CLAUDE.md +8 -8
- package/README.en.md +46 -29
- package/README.md +41 -24
- package/agents/acceptance-tester.md +56 -0
- package/agents/architect.md +25 -67
- package/agents/build-error-resolver.md +28 -97
- package/agents/code-reviewer.md +89 -0
- package/agents/diagrammer.md +34 -165
- package/agents/documenter.md +43 -0
- package/agents/e2e-tester.md +46 -277
- package/agents/event/event-ops.md +54 -77
- package/agents/event/event-planner.md +63 -0
- package/agents/figma/figma-engineer.md +76 -0
- package/agents/implementer.md +26 -41
- package/agents/security-reviewer.md +56 -0
- package/agents/tester.md +37 -33
- package/agents/ui/design-reviewer.md +62 -0
- package/agents/ui/design-system-gen.md +63 -0
- package/dist/__tests__/agent-model-sync.test.d.ts +2 -0
- package/dist/__tests__/agent-model-sync.test.d.ts.map +1 -0
- package/dist/__tests__/agent-model-sync.test.js +71 -0
- package/dist/__tests__/agent-model-sync.test.js.map +1 -0
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +8 -1
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +2 -0
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/llm.d.ts +11 -0
- package/dist/cli/commands/llm.d.ts.map +1 -0
- package/dist/cli/commands/llm.js +62 -0
- package/dist/cli/commands/llm.js.map +1 -0
- package/dist/cli/commands/remove.d.ts.map +1 -1
- package/dist/cli/commands/remove.js +8 -10
- package/dist/cli/commands/remove.js.map +1 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +35 -1
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/index.d.ts +0 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +59 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/llm/config.d.ts.map +1 -1
- package/dist/cli/llm/config.js +7 -0
- package/dist/cli/llm/config.js.map +1 -1
- package/dist/cli/llm/index.d.ts +1 -0
- package/dist/cli/llm/index.d.ts.map +1 -1
- package/dist/cli/llm/index.js +1 -0
- package/dist/cli/llm/index.js.map +1 -1
- package/dist/cli/llm/model-refresh.d.ts +29 -0
- package/dist/cli/llm/model-refresh.d.ts.map +1 -0
- package/dist/cli/llm/model-refresh.js +139 -0
- package/dist/cli/llm/model-refresh.js.map +1 -0
- package/dist/cli/llm/zai-commands.d.ts +15 -0
- package/dist/cli/llm/zai-commands.d.ts.map +1 -0
- package/dist/cli/llm/zai-commands.js +64 -0
- package/dist/cli/llm/zai-commands.js.map +1 -0
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +16 -77
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +81 -296
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/cursor-agents.d.ts +5 -0
- package/dist/cli/postinstall/cursor-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/cursor-agents.js +26 -68
- package/dist/cli/postinstall/cursor-agents.js.map +1 -1
- package/dist/cli/postinstall/cursor-skills.d.ts.map +1 -1
- package/dist/cli/postinstall/cursor-skills.js +26 -30
- package/dist/cli/postinstall/cursor-skills.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +0 -2
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/setup/Provisioner.d.ts.map +1 -1
- package/dist/cli/setup/Provisioner.js +19 -21
- package/dist/cli/setup/Provisioner.js.map +1 -1
- package/dist/cli/types.d.ts +15 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/utils.d.ts +4 -1
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/cli/utils.js +4 -1
- package/dist/cli/utils.js.map +1 -1
- package/dist/infra/lib/FrameworkDetector.js +4 -4
- package/dist/infra/lib/FrameworkDetector.js.map +1 -1
- package/dist/infra/lib/OrchestrateWorkflow.js +2 -2
- package/dist/infra/lib/OrchestrateWorkflow.js.map +1 -1
- package/dist/infra/lib/browser/launch.js +1 -1
- package/dist/infra/lib/browser/launch.js.map +1 -1
- package/dist/infra/lib/browser/types.d.ts +1 -1
- package/dist/infra/lib/browser/types.js +1 -1
- package/dist/infra/lib/config/GlobalConfigManager.d.ts +2 -0
- package/dist/infra/lib/config/GlobalConfigManager.d.ts.map +1 -1
- package/dist/infra/lib/config/GlobalConfigManager.js +6 -0
- package/dist/infra/lib/config/GlobalConfigManager.js.map +1 -1
- package/dist/infra/lib/constants.d.ts +1 -1
- package/dist/infra/lib/constants.d.ts.map +1 -1
- package/dist/infra/lib/constants.js +4 -5
- package/dist/infra/lib/constants.js.map +1 -1
- package/dist/infra/lib/evolution/__tests__/integration.test.js +7 -7
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
- package/dist/infra/lib/llm-availability.d.ts +4 -0
- package/dist/infra/lib/llm-availability.d.ts.map +1 -1
- package/dist/infra/lib/llm-availability.js +9 -1
- package/dist/infra/lib/llm-availability.js.map +1 -1
- package/dist/infra/lib/memory/index.d.ts +0 -2
- package/dist/infra/lib/memory/index.d.ts.map +1 -1
- package/dist/infra/lib/memory/index.js +0 -2
- package/dist/infra/lib/memory/index.js.map +1 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js +1 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +1 -1
- package/dist/infra/lib/zai/client.d.ts +30 -0
- package/dist/infra/lib/zai/client.d.ts.map +1 -0
- package/dist/infra/lib/zai/client.js +124 -0
- package/dist/infra/lib/zai/client.js.map +1 -0
- package/dist/infra/lib/zai/index.d.ts +11 -0
- package/dist/infra/lib/zai/index.d.ts.map +1 -0
- package/dist/infra/lib/zai/index.js +10 -0
- package/dist/infra/lib/zai/index.js.map +1 -0
- package/dist/infra/lib/zai/orchestration.d.ts +15 -0
- package/dist/infra/lib/zai/orchestration.d.ts.map +1 -0
- package/dist/infra/lib/zai/orchestration.js +54 -0
- package/dist/infra/lib/zai/orchestration.js.map +1 -0
- package/dist/infra/lib/zai/types.d.ts +40 -0
- package/dist/infra/lib/zai/types.d.ts.map +1 -0
- package/dist/infra/lib/zai/types.js +5 -0
- package/dist/infra/lib/zai/types.js.map +1 -0
- package/dist/infra/orchestrator/SmartRouter.d.ts.map +1 -1
- package/dist/infra/orchestrator/SmartRouter.js +16 -34
- package/dist/infra/orchestrator/SmartRouter.js.map +1 -1
- package/dist/infra/orchestrator/index.d.ts +1 -0
- package/dist/infra/orchestrator/index.d.ts.map +1 -1
- package/dist/infra/orchestrator/index.js +11 -9
- package/dist/infra/orchestrator/index.js.map +1 -1
- package/dist/infra/orchestrator/types.d.ts +32 -9
- package/dist/infra/orchestrator/types.d.ts.map +1 -1
- package/dist/infra/orchestrator/types.js +68 -37
- package/dist/infra/orchestrator/types.js.map +1 -1
- package/dist/infra/orchestrator/types.test.d.ts +2 -0
- package/dist/infra/orchestrator/types.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/types.test.js +57 -0
- package/dist/infra/orchestrator/types.test.js.map +1 -0
- package/dist/tools/index.d.ts +0 -4
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +0 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/memory/autoSaveContext.d.ts +0 -1
- package/dist/tools/memory/autoSaveContext.d.ts.map +1 -1
- package/dist/tools/memory/autoSaveContext.js +13 -27
- package/dist/tools/memory/autoSaveContext.js.map +1 -1
- package/hooks/scripts/__tests__/code-check-detectors.test.js +2 -2
- package/hooks/scripts/__tests__/run-ledger.test.js +1 -1
- package/hooks/scripts/__tests__/scope-from-spec.test.js +12 -12
- package/hooks/scripts/__tests__/step-counter.test.js +1 -1
- package/hooks/scripts/code-check.js +16 -203
- package/hooks/scripts/context-save.js +0 -11
- package/hooks/scripts/lib/scope-from-spec.js +9 -6
- package/hooks/scripts/llm-orchestrate.js +49 -0
- package/hooks/scripts/post-edit-dispatcher.js +1 -1
- package/hooks/scripts/prompt-dispatcher.js +7 -18
- package/hooks/scripts/session-start.js +25 -35
- package/package.json +4 -4
- package/skills/agents-md/SKILL.md +62 -15
- package/skills/arch-guard/SKILL.md +1 -1
- package/skills/brand-assets/SKILL.md +2 -2
- package/skills/capability-loop/SKILL.md +1 -1
- package/skills/chub-usage/SKILL.md +1 -1
- package/skills/commerce-patterns/SKILL.md +2 -2
- package/skills/commit-push-pr/SKILL.md +0 -1
- package/skills/context7-usage/SKILL.md +1 -1
- package/skills/create-prd/agents/edge-case-finder.md +4 -4
- package/skills/create-prd/agents/prioritizer.md +4 -4
- package/skills/create-prd/agents/requirements-writer.md +3 -3
- package/skills/create-prd/agents/researcher.md +3 -3
- package/skills/create-prd/agents/reviewer.md +3 -3
- package/skills/create-prd/orchestrator.md +2 -0
- package/skills/design-refine/SKILL.md +140 -0
- package/skills/{design-polish → design-refine}/templates/polish-report.md +1 -1
- package/skills/{design-normalize → design-refine}/templates/token-audit.md +3 -3
- package/skills/design-review/SKILL.md +143 -0
- package/skills/{design-audit → design-review}/agents/a11y-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/performance-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/responsive-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/slop-detector.md +1 -1
- package/skills/{design-audit → design-review}/frameworks/core-web-vitals.md +1 -1
- package/skills/{design-audit → design-review}/frameworks/wcag-checklist.md +1 -1
- package/skills/{design-audit → design-review}/orchestrator.md +5 -3
- package/skills/{design-critique → design-review}/templates/critique-report.md +3 -3
- package/skills/{design-audit → design-review}/templates/report.md +3 -3
- package/skills/design-teach/SKILL.md +11 -11
- package/skills/docs/SKILL.md +14 -16
- package/skills/e2e-commerce/SKILL.md +1 -1
- package/skills/event-comms/SKILL.md +1 -1
- package/skills/event-ops/SKILL.md +2 -2
- package/skills/event-planning/SKILL.md +1 -1
- package/skills/exec-plan/SKILL.md +2 -2
- package/skills/exec-plan/orchestrator.md +2 -0
- package/skills/figma/SKILL.md +240 -148
- package/skills/figma/rubrics/css-mapping.md +125 -0
- package/skills/git-worktree/SKILL.md +1 -1
- package/skills/handoff/SKILL.md +1 -1
- package/skills/parallel-research/SKILL.md +14 -28
- package/skills/parallel-research/orchestrator.md +2 -0
- package/skills/priority-todos/SKILL.md +1 -1
- package/skills/regress/SKILL.md +11 -0
- package/skills/restraint/SKILL.md +72 -0
- package/skills/seo-checklist/SKILL.md +2 -2
- package/skills/spec/SKILL.md +65 -836
- package/skills/test/SKILL.md +3 -3
- package/skills/tool-fallback/SKILL.md +2 -2
- package/skills/vercel-react-best-practices/SKILL.md +1 -1
- package/skills/vibe/SKILL.md +20 -35
- package/skills/vibe.analyze/SKILL.md +7 -9
- package/skills/vibe.docs/SKILL.md +1 -1
- package/skills/vibe.event/SKILL.md +27 -27
- package/skills/vibe.figma/SKILL.md +14 -18
- package/skills/vibe.harness/SKILL.md +5 -5
- package/skills/vibe.llm/SKILL.md +50 -0
- package/skills/vibe.reason/SKILL.md +0 -2
- package/skills/vibe.review/SKILL.md +45 -49
- package/skills/vibe.run/SKILL.md +2 -5
- package/skills/vibe.run/references/parallel-agents.md +33 -98
- package/skills/vibe.spec/SKILL.md +38 -535
- package/skills/vibe.utils/SKILL.md +3 -3
- package/skills/vibe.verify/SKILL.md +70 -542
- package/skills/video-production/SKILL.md +1 -1
- package/vibe/rules/orchestrator-contract.md +57 -0
- package/vibe/rules/quality/performance.md +1 -1
- package/vibe/templates/claudemd-template.md +1 -1
- package/vibe/templates/spec-template.md +35 -185
- package/agents/architect-low.md +0 -41
- package/agents/architect-medium.md +0 -59
- package/agents/compounder.md +0 -261
- package/agents/docs/api-documenter.md +0 -99
- package/agents/docs/changelog-writer.md +0 -93
- package/agents/event/event-comms.md +0 -78
- package/agents/event/event-content.md +0 -68
- package/agents/event/event-image.md +0 -95
- package/agents/event/event-scheduler.md +0 -69
- package/agents/event/event-speaker.md +0 -86
- package/agents/explorer-low.md +0 -42
- package/agents/explorer-medium.md +0 -59
- package/agents/explorer.md +0 -48
- package/agents/figma/figma-analyst.md +0 -52
- package/agents/figma/figma-architect.md +0 -112
- package/agents/figma/figma-auditor.md +0 -82
- package/agents/figma/figma-builder.md +0 -100
- package/agents/implementer-low.md +0 -43
- package/agents/implementer-medium.md +0 -52
- package/agents/junior-mentor.md +0 -141
- package/agents/planning/requirements-analyst.md +0 -84
- package/agents/planning/ux-advisor.md +0 -83
- package/agents/qa/acceptance-tester.md +0 -86
- package/agents/qa/edge-case-finder.md +0 -93
- package/agents/qa/qa-coordinator.md +0 -131
- package/agents/refactor-cleaner.md +0 -143
- package/agents/research/best-practices.md +0 -199
- package/agents/research/codebase-patterns.md +0 -157
- package/agents/research/framework-docs.md +0 -188
- package/agents/research/security-advisory.md +0 -213
- package/agents/review/architecture-reviewer.md +0 -107
- package/agents/review/complexity-reviewer.md +0 -116
- package/agents/review/data-integrity-reviewer.md +0 -88
- package/agents/review/git-history-reviewer.md +0 -103
- package/agents/review/performance-reviewer.md +0 -86
- package/agents/review/python-reviewer.md +0 -150
- package/agents/review/rails-reviewer.md +0 -139
- package/agents/review/react-reviewer.md +0 -144
- package/agents/review/security-reviewer.md +0 -80
- package/agents/review/simplicity-reviewer.md +0 -140
- package/agents/review/test-coverage-reviewer.md +0 -116
- package/agents/review/typescript-reviewer.md +0 -127
- package/agents/searcher.md +0 -54
- package/agents/simplifier.md +0 -120
- package/agents/teams/debug-team.md +0 -70
- package/agents/teams/dev-team.md +0 -88
- package/agents/teams/docs-team.md +0 -80
- package/agents/teams/figma-team.md +0 -85
- package/agents/teams/fullstack-team.md +0 -83
- package/agents/teams/lite-team.md +0 -69
- package/agents/teams/migration-team.md +0 -78
- package/agents/teams/refactor-team.md +0 -94
- package/agents/teams/research-team.md +0 -86
- package/agents/teams/review-debate-team.md +0 -125
- package/agents/teams/security-team.md +0 -81
- package/agents/ui/ui-a11y-auditor.md +0 -93
- package/agents/ui/ui-antipattern-detector.md +0 -102
- package/agents/ui/ui-dataviz-advisor.md +0 -69
- package/agents/ui/ui-design-system-gen.md +0 -57
- package/agents/ui/ui-industry-analyzer.md +0 -49
- package/agents/ui/ui-layout-architect.md +0 -65
- package/agents/ui/ui-stack-implementer.md +0 -68
- package/agents/ui/ux-compliance-reviewer.md +0 -81
- package/agents/ui-previewer.md +0 -258
- package/hooks/scripts/__tests__/keyword-detector.test.js +0 -242
- package/hooks/scripts/keyword-detector.js +0 -226
- package/skills/characterization-test/SKILL.md +0 -209
- package/skills/characterization-test/agents/behavior-capturer.md +0 -50
- package/skills/characterization-test/agents/coverage-checker.md +0 -54
- package/skills/characterization-test/agents/reporter.md +0 -50
- package/skills/characterization-test/agents/test-writer.md +0 -49
- package/skills/characterization-test/rubrics/coverage-criteria.md +0 -53
- package/skills/characterization-test/templates/test-template.ts +0 -101
- package/skills/claude-md-guide/SKILL.md +0 -353
- package/skills/claude-md-guide/rubrics/anti-patterns.md +0 -88
- package/skills/design-audit/SKILL.md +0 -154
- package/skills/design-critique/SKILL.md +0 -140
- package/skills/design-distill/SKILL.md +0 -131
- package/skills/design-normalize/SKILL.md +0 -135
- package/skills/design-polish/SKILL.md +0 -132
- package/skills/figma-convert/SKILL.md +0 -236
- package/skills/figma-extract/SKILL.md +0 -242
- package/skills/interview/SKILL.md +0 -358
- package/skills/interview/checklists/api.md +0 -101
- package/skills/interview/checklists/feature.md +0 -88
- package/skills/interview/checklists/library.md +0 -95
- package/skills/interview/checklists/mobile.md +0 -89
- package/skills/interview/checklists/webapp.md +0 -97
- package/skills/interview/checklists/website.md +0 -99
- package/skills/plan/SKILL.md +0 -254
- package/skills/rob-pike/SKILL.md +0 -66
- package/skills/spec/references/askuser-examples.md +0 -57
- package/skills/spec/references/example-session.md +0 -87
- package/skills/spec/references/templates.md +0 -194
- package/skills/spec-review/SKILL.md +0 -725
- package/skills/systematic-debugging/SKILL.md +0 -142
- package/skills/techdebt/SKILL.md +0 -126
- package/skills/techdebt/agents/analyzer.md +0 -50
- package/skills/techdebt/agents/fixer.md +0 -41
- package/skills/techdebt/agents/reviewer.md +0 -47
- package/skills/techdebt/agents/scanner.md +0 -44
- package/skills/techdebt/orchestrator.md +0 -70
- package/skills/techdebt/rubrics/severity.md +0 -51
- package/skills/techdebt/scripts/scan.js +0 -90
- package/skills/techdebt/templates/report.md +0 -86
- package/skills/typescript-advanced-types/SKILL.md +0 -68
- package/skills/typescript-advanced-types/rubrics/type-patterns.md +0 -109
- package/skills/yagni-ladder/SKILL.md +0 -90
- /package/skills/{claude-md-guide → agents-md}/templates/claude-md.md +0 -0
- /package/skills/{design-polish → design-refine}/rubrics/polish-checklist.md +0 -0
- /package/skills/{design-normalize → design-refine}/rubrics/token-naming.md +0 -0
- /package/skills/{design-distill → design-refine}/templates/design-system.md +0 -0
- /package/skills/{design-audit → design-review}/agents/scorer.md +0 -0
- /package/skills/{design-audit → design-review}/rubrics/ai-slop-patterns.md +0 -0
- /package/skills/{design-audit → design-review}/rubrics/scoring.md +0 -0
- /package/skills/{design-critique → design-review}/rubrics/ux-heuristics.md +0 -0
- /package/skills/{figma-convert → figma}/rubrics/conversion-rules.md +0 -0
- /package/skills/{figma-extract → figma}/rubrics/image-rules.md +0 -0
- /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
|
|
3
|
+
Minimal-diff specialist for making a broken build green again.
|
|
4
4
|
|
|
5
5
|
## Role
|
|
6
6
|
|
|
7
|
-
- Fix TypeScript compilation
|
|
8
|
-
- Resolve
|
|
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
|
|
13
|
+
**Sonnet** — precise, surgical fixes
|
|
15
14
|
|
|
16
|
-
##
|
|
15
|
+
## Goal
|
|
17
16
|
|
|
18
|
-
|
|
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
|
-
|
|
22
|
+
## Fix Strategies
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
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 |
|
|
63
|
-
| Missing dependency |
|
|
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
|
-
|
|
105
|
-
function getData(): Promise<Response> {
|
|
106
|
-
return fetch(url)
|
|
107
|
-
}
|
|
108
|
-
```
|
|
33
|
+
## Constraints
|
|
109
34
|
|
|
110
|
-
|
|
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
|
-
|
|
42
|
+
## Done
|
|
113
43
|
|
|
114
|
-
-
|
|
115
|
-
-
|
|
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)
|
package/agents/diagrammer.md
CHANGED
|
@@ -1,178 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
description: Generate diagrams (architecture, ERD, flowchart)
|
|
3
|
-
argument-hint: --er or --flow (optional)
|
|
4
|
-
---
|
|
1
|
+
# Diagrammer Agent
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
Diagram generation specialist — renders architecture, data models, and flows
|
|
4
|
+
as Mermaid.
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
## Role
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
- Architecture diagrams from project structure and dependencies
|
|
9
|
+
- ERD from database schemas and model definitions
|
|
10
|
+
- Flowcharts of business logic and user flows
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
/vibe.diagram
|
|
14
|
-
/vibe.diagram --er
|
|
15
|
-
/vibe.diagram --flow
|
|
16
|
-
```
|
|
12
|
+
## Model
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
**Haiku** — fast, structured output
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
## Goal
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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.
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
## Output Conventions
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
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/)
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
- Find database schema files
|
|
35
|
-
- `backend/models/`
|
|
36
|
-
- `migrations/`
|
|
37
|
-
- `schema.sql`
|
|
38
|
-
- Identify table relationships
|
|
36
|
+
## Constraints
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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.
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
## Done
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```mermaid
|
|
51
|
-
graph TB
|
|
52
|
-
Client[React Frontend]
|
|
53
|
-
API[FastAPI Backend]
|
|
54
|
-
DB[(PostgreSQL)]
|
|
55
|
-
Cache[(Redis)]
|
|
56
|
-
|
|
57
|
-
Client -->|HTTP| API
|
|
58
|
-
API -->|Query| DB
|
|
59
|
-
API -->|Cache| Cache
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### ERD (Mermaid)
|
|
63
|
-
|
|
64
|
-
```mermaid
|
|
65
|
-
erDiagram
|
|
66
|
-
USER ||--o{ FEED : creates
|
|
67
|
-
USER ||--o{ FOLLOW : follows
|
|
68
|
-
FEED }o--|| RESTAURANT : references
|
|
69
|
-
|
|
70
|
-
USER {
|
|
71
|
-
uuid id PK
|
|
72
|
-
string email
|
|
73
|
-
int tier
|
|
74
|
-
}
|
|
75
|
-
FEED {
|
|
76
|
-
uuid id PK
|
|
77
|
-
uuid user_id FK
|
|
78
|
-
uuid restaurant_id FK
|
|
79
|
-
text content
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
#### Flowchart (Mermaid)
|
|
84
|
-
|
|
85
|
-
```mermaid
|
|
86
|
-
flowchart TD
|
|
87
|
-
Start([User writes feed])
|
|
88
|
-
GPS{GPS Auth}
|
|
89
|
-
Vision{Vision API Verify}
|
|
90
|
-
OCR{OCR Auth}
|
|
91
|
-
Save[Save Feed]
|
|
92
|
-
|
|
93
|
-
Start --> GPS
|
|
94
|
-
GPS -->|Within 50m| Vision
|
|
95
|
-
GPS -->|Out of range| Fail
|
|
96
|
-
Vision -->|Food detected| OCR
|
|
97
|
-
Vision -->|Failed| Fail
|
|
98
|
-
OCR -->|Optional| Save
|
|
99
|
-
Save --> End([Complete])
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### 4. Rendering Guide
|
|
103
|
-
|
|
104
|
-
Guide on how to render generated Mermaid code:
|
|
105
|
-
|
|
106
|
-
- **GitHub**: Paste in `.md` file (auto-renders)
|
|
107
|
-
- **VSCode**: Install Mermaid extension
|
|
108
|
-
- **Online**: https://mermaid.live/
|
|
109
|
-
|
|
110
|
-
## Example
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
User: /vibe.diagram --er
|
|
114
|
-
|
|
115
|
-
Claude: Generating ERD...
|
|
116
|
-
|
|
117
|
-
Analyzing project...
|
|
118
|
-
- Database schema found: backend/models/
|
|
119
|
-
- Tables: 15
|
|
120
|
-
- Key relationships: USER, FEED, RESTAURANT
|
|
121
|
-
|
|
122
|
-
✅ ERD generation complete!
|
|
123
|
-
|
|
124
|
-
```mermaid
|
|
125
|
-
erDiagram
|
|
126
|
-
USER ||--o{ FEED : creates
|
|
127
|
-
USER ||--o{ FOLLOW : "follows/followed_by"
|
|
128
|
-
USER ||--o{ BOOKMARK : bookmarks
|
|
129
|
-
FEED }o--|| RESTAURANT : references
|
|
130
|
-
FEED ||--o{ COMMENT : has
|
|
131
|
-
FEED ||--o{ LIKE : has
|
|
132
|
-
|
|
133
|
-
USER {
|
|
134
|
-
uuid id PK
|
|
135
|
-
string email UK
|
|
136
|
-
string username UK
|
|
137
|
-
int tier
|
|
138
|
-
int points
|
|
139
|
-
timestamp created_at
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
FEED {
|
|
143
|
-
uuid id PK
|
|
144
|
-
uuid user_id FK
|
|
145
|
-
uuid restaurant_id FK
|
|
146
|
-
text content
|
|
147
|
-
geography location
|
|
148
|
-
boolean ocr_verified
|
|
149
|
-
timestamp created_at
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
RESTAURANT {
|
|
153
|
-
uuid id PK
|
|
154
|
-
string name
|
|
155
|
-
geography location
|
|
156
|
-
string category
|
|
157
|
-
timestamp created_at
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
**Diagram save location:**
|
|
162
|
-
.vibe/diagrams/erd-2025-11-17.md
|
|
163
|
-
|
|
164
|
-
**Rendering options:**
|
|
165
|
-
1. Push to GitHub (auto-renders)
|
|
166
|
-
2. Use Mermaid extension in VSCode
|
|
167
|
-
3. View at https://mermaid.live/
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Notes
|
|
171
|
-
|
|
172
|
-
- Mermaid is supported in GitHub, GitLab, VSCode, etc.
|
|
173
|
-
- Complex diagrams may need manual adjustments
|
|
174
|
-
- Generated diagrams are saved in `.vibe/diagrams/` folder
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
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
|