@su-record/vibe 3.2.1 → 3.2.3
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/CLAUDE.md +1 -1
- package/README.en.md +4 -4
- package/README.md +4 -4
- package/dist/__tests__/skill-namespace.test.d.ts +2 -0
- package/dist/__tests__/skill-namespace.test.d.ts.map +1 -0
- package/dist/__tests__/skill-namespace.test.js +60 -0
- package/dist/__tests__/skill-namespace.test.js.map +1 -0
- package/dist/__tests__/stakes-contract.test.d.ts +2 -0
- package/dist/__tests__/stakes-contract.test.d.ts.map +1 -0
- package/dist/__tests__/stakes-contract.test.js +110 -0
- package/dist/__tests__/stakes-contract.test.js.map +1 -0
- package/dist/__tests__/wiring-integrity.test.js +5 -5
- package/dist/__tests__/wiring-integrity.test.js.map +1 -1
- package/dist/cli/generate-release-notes.d.ts +3 -0
- package/dist/cli/generate-release-notes.d.ts.map +1 -0
- package/dist/cli/generate-release-notes.js +47 -0
- package/dist/cli/generate-release-notes.js.map +1 -0
- package/dist/cli/postinstall/constants.d.ts +6 -6
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +114 -46
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/fs-utils.d.ts +1 -0
- package/dist/cli/postinstall/fs-utils.d.ts.map +1 -1
- package/dist/cli/postinstall/fs-utils.js +25 -0
- package/dist/cli/postinstall/fs-utils.js.map +1 -1
- package/dist/cli/postinstall/fs-utils.test.js +46 -11
- package/dist/cli/postinstall/fs-utils.test.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +3 -2
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/tests/curated-release-notes.test.d.ts +2 -0
- package/dist/tests/curated-release-notes.test.d.ts.map +1 -0
- package/dist/tests/curated-release-notes.test.js +106 -0
- package/dist/tests/curated-release-notes.test.js.map +1 -0
- package/dist/tools/release/releaseNotes.d.ts +21 -0
- package/dist/tools/release/releaseNotes.d.ts.map +1 -0
- package/dist/tools/release/releaseNotes.js +105 -0
- package/dist/tools/release/releaseNotes.js.map +1 -0
- package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -3
- package/package.json +2 -2
- package/skills/vibe/SKILL.md +14 -0
- package/skills/{agents-md → vibe.agents-md}/SKILL.md +1 -1
- package/skills/{brand-assets → vibe.brand-assets}/SKILL.md +1 -1
- package/skills/{capability-loop → vibe.capability-loop}/SKILL.md +1 -1
- package/skills/{chub-usage → vibe.chub-usage}/SKILL.md +1 -1
- package/skills/vibe.clone/SKILL.md +295 -3
- package/skills/{commerce-patterns → vibe.commerce-patterns}/SKILL.md +1 -1
- package/skills/{commit-push-pr → vibe.commit-push-pr}/SKILL.md +2 -2
- package/skills/{context7-usage → vibe.context7-usage}/SKILL.md +1 -1
- package/skills/vibe.contract/SKILL.md +162 -1
- package/skills/{create-prd → vibe.create-prd}/SKILL.md +2 -2
- package/skills/{design-refine → vibe.design-refine}/SKILL.md +1 -1
- package/skills/{design-review → vibe.design-review}/SKILL.md +1 -1
- package/skills/{design-teach → vibe.design-teach}/SKILL.md +1 -1
- package/skills/{devlog → vibe.devlog}/SKILL.md +1 -1
- package/skills/vibe.docs/SKILL.md +256 -1
- package/skills/{e2e-commerce → vibe.e2e-commerce}/SKILL.md +1 -1
- package/skills/vibe.educational-content/SKILL.md +157 -0
- package/skills/vibe.educational-content/references/learning-design.md +81 -0
- package/skills/vibe.educational-content/references/output-patterns.md +109 -0
- package/skills/vibe.educational-content/references/source-method.md +40 -0
- package/skills/{event-comms → vibe.event-comms}/SKILL.md +1 -1
- package/skills/{event-ops → vibe.event-ops}/SKILL.md +1 -1
- package/skills/{event-planning → vibe.event-planning}/SKILL.md +1 -1
- package/skills/vibe.figma/SKILL.md +473 -21
- package/skills/vibe.figma/references/branch-phases.md +1 -1
- package/skills/{git-worktree → vibe.git-worktree}/SKILL.md +1 -1
- package/skills/{handoff → vibe.handoff}/SKILL.md +1 -1
- package/skills/{parallel-research → vibe.parallel-research}/SKILL.md +2 -2
- package/skills/{presentation → vibe.presentation}/SKILL.md +1 -1
- package/skills/{prioritization-frameworks → vibe.prioritization}/SKILL.md +2 -2
- package/skills/{priority-todos → vibe.priority-todos}/SKILL.md +1 -1
- package/skills/{vercel-react-best-practices → vibe.react-best-practices}/SKILL.md +1 -1
- package/skills/vibe.regress/SKILL.md +182 -2
- package/skills/vibe.review/SKILL.md +8 -0
- package/skills/vibe.run/SKILL.md +392 -1
- package/skills/{arch-guard → vibe.run/internal/arch-guard}/templates/violation-report.md +1 -1
- package/skills/{seo-checklist → vibe.seo-checklist}/SKILL.md +1 -1
- package/skills/vibe.spec/SKILL.md +123 -1
- package/skills/vibe.test/SKILL.md +138 -2
- package/skills/{tool-fallback → vibe.tool-fallback}/SKILL.md +1 -1
- package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/SKILL.md +6 -6
- package/skills/{user-personas → vibe.user-personas}/SKILL.md +2 -2
- package/skills/vibe.verify/SKILL.md +2 -2
- package/skills/{video-production → vibe.video-production}/SKILL.md +1 -1
- package/vibe/rules/loop-contract.md +18 -0
- package/skills/arch-guard/SKILL.md +0 -183
- package/skills/clone/SKILL.md +0 -296
- package/skills/contract/SKILL.md +0 -165
- package/skills/docs/SKILL.md +0 -259
- package/skills/exec-plan/SKILL.md +0 -151
- package/skills/figma/SKILL.md +0 -456
- package/skills/regress/SKILL.md +0 -184
- package/skills/restraint/SKILL.md +0 -72
- package/skills/spec/SKILL.md +0 -125
- package/skills/test/SKILL.md +0 -140
- /package/skills/{agents-md → vibe.agents-md}/rubrics/what-to-keep.md +0 -0
- /package/skills/{agents-md → vibe.agents-md}/templates/agents-md.md +0 -0
- /package/skills/{agents-md → vibe.agents-md}/templates/claude-md.md +0 -0
- /package/skills/{brand-assets → vibe.brand-assets}/rubrics/asset-checklist.md +0 -0
- /package/skills/{brand-assets → vibe.brand-assets}/templates/brand-guide.md +0 -0
- /package/skills/{capability-loop → vibe.capability-loop}/agents/capability-designer.md +0 -0
- /package/skills/{capability-loop → vibe.capability-loop}/agents/failure-analyst.md +0 -0
- /package/skills/{capability-loop → vibe.capability-loop}/agents/implementer.md +0 -0
- /package/skills/{capability-loop → vibe.capability-loop}/agents/tester.md +0 -0
- /package/skills/{capability-loop → vibe.capability-loop}/templates/capability-spec.md +0 -0
- /package/skills/{capability-loop → vibe.capability-loop}/templates/failure-analysis.md +0 -0
- /package/skills/{clone → vibe.clone}/references/capture-rules.md +0 -0
- /package/skills/{clone → vibe.clone}/references/legal-and-error-recovery.md +0 -0
- /package/skills/{clone → vibe.clone}/references/refine-rules.md +0 -0
- /package/skills/{clone → vibe.clone}/references/scaffold-phases.md +0 -0
- /package/skills/{clone → vibe.clone}/references/setup-and-layout.md +0 -0
- /package/skills/{commerce-patterns → vibe.commerce-patterns}/rubrics/checkout-flow.md +0 -0
- /package/skills/{commerce-patterns → vibe.commerce-patterns}/templates/product-schema.md +0 -0
- /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/change-analyzer.md +0 -0
- /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/message-writer.md +0 -0
- /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/pr-writer.md +0 -0
- /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/reviewer.md +0 -0
- /package/skills/{commit-push-pr → vibe.commit-push-pr}/rubrics/commit-message.md +0 -0
- /package/skills/{commit-push-pr → vibe.commit-push-pr}/templates/pr-body.md +0 -0
- /package/skills/{context7-usage → vibe.context7-usage}/rubrics/when-to-use.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/agents/edge-case-finder.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/agents/prioritizer.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/agents/requirements-writer.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/agents/researcher.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/agents/reviewer.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/frameworks/jobs-to-be-done.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/frameworks/rice-scoring.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/orchestrator.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/rubrics/completeness.md +0 -0
- /package/skills/{create-prd → vibe.create-prd}/templates/prd.md +0 -0
- /package/skills/{design-refine → vibe.design-refine}/rubrics/polish-checklist.md +0 -0
- /package/skills/{design-refine → vibe.design-refine}/rubrics/token-naming.md +0 -0
- /package/skills/{design-refine → vibe.design-refine}/templates/design-system.md +0 -0
- /package/skills/{design-refine → vibe.design-refine}/templates/polish-report.md +0 -0
- /package/skills/{design-refine → vibe.design-refine}/templates/token-audit.md +0 -0
- /package/skills/{design-review → vibe.design-review}/agents/a11y-auditor.md +0 -0
- /package/skills/{design-review → vibe.design-review}/agents/performance-auditor.md +0 -0
- /package/skills/{design-review → vibe.design-review}/agents/responsive-auditor.md +0 -0
- /package/skills/{design-review → vibe.design-review}/agents/scorer.md +0 -0
- /package/skills/{design-review → vibe.design-review}/agents/slop-detector.md +0 -0
- /package/skills/{design-review → vibe.design-review}/frameworks/core-web-vitals.md +0 -0
- /package/skills/{design-review → vibe.design-review}/frameworks/wcag-checklist.md +0 -0
- /package/skills/{design-review → vibe.design-review}/orchestrator.md +0 -0
- /package/skills/{design-review → vibe.design-review}/rubrics/ai-slop-patterns.md +0 -0
- /package/skills/{design-review → vibe.design-review}/rubrics/scoring.md +0 -0
- /package/skills/{design-review → vibe.design-review}/rubrics/ux-heuristics.md +0 -0
- /package/skills/{design-review → vibe.design-review}/templates/critique-report.md +0 -0
- /package/skills/{design-review → vibe.design-review}/templates/report.md +0 -0
- /package/skills/{design-teach → vibe.design-teach}/rubrics/brand-personality.md +0 -0
- /package/skills/{design-teach → vibe.design-teach}/templates/design-context.json +0 -0
- /package/skills/{docs → vibe.docs}/references/api-docs-changelog.md +0 -0
- /package/skills/{docs → vibe.docs}/references/codemaps-output.md +0 -0
- /package/skills/{docs → vibe.docs}/references/diagram-spec.md +0 -0
- /package/skills/{docs → vibe.docs}/templates/architecture.md +0 -0
- /package/skills/{docs → vibe.docs}/templates/behavioral-principles.md +0 -0
- /package/skills/{docs → vibe.docs}/templates/readme.md +0 -0
- /package/skills/{docs → vibe.docs}/templates/release-notes.md +0 -0
- /package/skills/{e2e-commerce → vibe.e2e-commerce}/templates/test-scenarios.md +0 -0
- /package/skills/{event-comms → vibe.event-comms}/templates/email-invite.md +0 -0
- /package/skills/{event-comms → vibe.event-comms}/templates/sns-post.md +0 -0
- /package/skills/{event-ops → vibe.event-ops}/rubrics/contingency.md +0 -0
- /package/skills/{event-ops → vibe.event-ops}/templates/d-day-checklist.md +0 -0
- /package/skills/{event-planning → vibe.event-planning}/rubrics/timeline.md +0 -0
- /package/skills/{event-planning → vibe.event-planning}/templates/event-plan.md +0 -0
- /package/skills/{figma → vibe.figma}/rubrics/conversion-rules.md +0 -0
- /package/skills/{figma → vibe.figma}/rubrics/css-mapping.md +0 -0
- /package/skills/{figma → vibe.figma}/rubrics/extraction-checklist.md +0 -0
- /package/skills/{figma → vibe.figma}/rubrics/image-rules.md +0 -0
- /package/skills/{figma → vibe.figma}/templates/component-index.md +0 -0
- /package/skills/{figma → vibe.figma}/templates/component-spec.md +0 -0
- /package/skills/{figma → vibe.figma}/templates/component.md +0 -0
- /package/skills/{figma → vibe.figma}/templates/figma-handoff.md +0 -0
- /package/skills/{figma → vibe.figma}/templates/remapped-tree.md +0 -0
- /package/skills/{git-worktree → vibe.git-worktree}/rubrics/when-to-use.md +0 -0
- /package/skills/{handoff → vibe.handoff}/agents/context-summarizer.md +0 -0
- /package/skills/{handoff → vibe.handoff}/agents/document-writer.md +0 -0
- /package/skills/{handoff → vibe.handoff}/agents/state-collector.md +0 -0
- /package/skills/{handoff → vibe.handoff}/agents/verifier.md +0 -0
- /package/skills/{handoff → vibe.handoff}/rubrics/completeness.md +0 -0
- /package/skills/{handoff → vibe.handoff}/templates/handoff.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/agents/best-practices.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/agents/codebase-patterns.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/agents/framework-docs.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/agents/security-advisory.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/agents/synthesizer.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/experts/best-practices.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/experts/codebase-patterns.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/experts/framework-docs.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/experts/security-advisory.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/orchestrator.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/templates/awesome-list.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/templates/paper.md +0 -0
- /package/skills/{parallel-research → vibe.parallel-research}/templates/synthesis.md +0 -0
- /package/skills/{presentation → vibe.presentation}/references/style-presets.md +0 -0
- /package/skills/{prioritization-frameworks → vibe.prioritization}/rubrics/frameworks.md +0 -0
- /package/skills/{prioritization-frameworks → vibe.prioritization}/templates/scoring-matrix.md +0 -0
- /package/skills/{priority-todos → vibe.priority-todos}/rubrics/prioritization.md +0 -0
- /package/skills/{priority-todos → vibe.priority-todos}/templates/todo-board.md +0 -0
- /package/skills/{vercel-react-best-practices → vibe.react-best-practices}/rubrics/performance.md +0 -0
- /package/skills/{vercel-react-best-practices → vibe.react-best-practices}/rubrics/server-components.md +0 -0
- /package/skills/{regress → vibe.regress}/templates/bug.md +0 -0
- /package/skills/{regress → vibe.regress}/templates/test-jest.md +0 -0
- /package/skills/{regress → vibe.regress}/templates/test-vitest.md +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/detector.md +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/reporter.md +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/rule-generator.md +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/violation-checker.md +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/frameworks/clean-architecture.md +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/frameworks/solid.md +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/scripts/check-boundaries.js +0 -0
- /package/skills/{arch-guard → vibe.run/internal/arch-guard}/templates/arch-rules.json +0 -0
- /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/decomposer.md +0 -0
- /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/dependency-mapper.md +0 -0
- /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/estimator.md +0 -0
- /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/validator.md +0 -0
- /package/skills/{exec-plan → vibe.run/internal/exec-plan}/orchestrator.md +0 -0
- /package/skills/{exec-plan → vibe.run/internal/exec-plan}/rubrics/complexity-scoring.md +0 -0
- /package/skills/{exec-plan → vibe.run/internal/exec-plan}/templates/plan.md +0 -0
- /package/skills/{seo-checklist → vibe.seo-checklist}/frameworks/structured-data.md +0 -0
- /package/skills/{seo-checklist → vibe.seo-checklist}/rubrics/content-seo.md +0 -0
- /package/skills/{seo-checklist → vibe.seo-checklist}/rubrics/technical-seo.md +0 -0
- /package/skills/{tool-fallback → vibe.tool-fallback}/rubrics/fallback-chain.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/color-and-contrast.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/interaction-design.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/motion-design.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/responsive-design.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/spatial-design.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/typography.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/ux-writing.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/rubrics/interaction-states.md +0 -0
- /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/rubrics/responsive-breakpoints.md +0 -0
- /package/skills/{user-personas → vibe.user-personas}/rubrics/research-methods.md +0 -0
- /package/skills/{user-personas → vibe.user-personas}/templates/persona.md +0 -0
- /package/skills/{video-production → vibe.video-production}/rubrics/quality-checklist.md +0 -0
- /package/skills/{video-production → vibe.video-production}/templates/production-plan.md +0 -0
|
@@ -28,11 +28,11 @@ user-invocable: true
|
|
|
28
28
|
|
|
29
29
|
## Process
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Execute the bundled implementation below with subcommand: `$ARGUMENTS`
|
|
32
32
|
|
|
33
33
|
The `regress` skill performs registration, generation, and clustering.
|
|
34
34
|
|
|
35
|
-
**Core steps** (see `skills/regress/SKILL.md` for details):
|
|
35
|
+
**Core steps** (see `skills/vibe.regress/SKILL.md` for details):
|
|
36
36
|
|
|
37
37
|
1. Parse subcommand
|
|
38
38
|
2. Read/write `.vibe/regressions/<slug>.md` (frontmatter schema enforced)
|
|
@@ -73,3 +73,183 @@ feature: login
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
75
|
ARGUMENTS: $ARGUMENTS
|
|
76
|
+
|
|
77
|
+
## Bundled implementation
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# vibe.regress — Regression Auto-Evolution
|
|
81
|
+
|
|
82
|
+
**Purpose**: never fix the same bug twice. Each fix grows a preventive test.
|
|
83
|
+
|
|
84
|
+
## Why this exists
|
|
85
|
+
|
|
86
|
+
A classic vibe-coding weakness: LLMs reintroduce bugs of the same class. Regression tests are the only mechanical defense. But if the human has to write the test every time, it gets skipped — so automate.
|
|
87
|
+
|
|
88
|
+
## Characterization — lock behavior first
|
|
89
|
+
|
|
90
|
+
Before modifying legacy or untested code whose behavior is uncertain (large files without tests, complex branching, API contracts), **lock current behavior first, then change**:
|
|
91
|
+
|
|
92
|
+
1. Generate characterization tests over the public surface — snapshot the **actual** output (`toMatchSnapshot()`), not what you think it should be. Do NOT fix bugs while locking: a wrong value gets locked as-is; the goal is regression detection, not correctness.
|
|
93
|
+
2. Run them — all must pass against the unmodified code. A failure means the characterization is wrong: fix the test, never the code.
|
|
94
|
+
3. Make the change incrementally, re-running after each step. Unexpected failure = regression, stop and investigate.
|
|
95
|
+
4. Reconcile: update snapshots only for **intentionally** changed behavior, and add new tests for the new behavior.
|
|
96
|
+
|
|
97
|
+
Skip this for code you just wrote, already-well-tested code, or trivial changes — write regular unit tests instead. Test file naming/stack detection follows `generate` (below).
|
|
98
|
+
|
|
99
|
+
## Storage Contract
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
.vibe/regressions/
|
|
103
|
+
<bug-slug>.md # one file per bug
|
|
104
|
+
_cluster-<tag>.md # shared-test design produced by `cluster`
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Frontmatter schema (strict)
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
slug: string # kebab-case, globally unique
|
|
111
|
+
symptom: string # one line, user-facing
|
|
112
|
+
root-cause-tag: enum # only the allowed tags below
|
|
113
|
+
fix-commit: string # git hash (or "pending")
|
|
114
|
+
test-path: string # generated test file path (or "pending")
|
|
115
|
+
status: open | test-generated | resolved
|
|
116
|
+
registered: YYYY-MM-DD
|
|
117
|
+
feature: string # related feature name (matches SPEC)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Allowed `root-cause-tag` values
|
|
121
|
+
|
|
122
|
+
Clustering depends on this, so use **only the predefined set**:
|
|
123
|
+
|
|
124
|
+
- `timezone` — timezone / DST / off-by-one in time
|
|
125
|
+
- `nullability` — null / undefined / empty handling
|
|
126
|
+
- `concurrency` — race conditions
|
|
127
|
+
- `boundary` — off-by-one, edge values
|
|
128
|
+
- `encoding` — charset, URL encoding, escaping
|
|
129
|
+
- `validation` — missing input validation
|
|
130
|
+
- `auth` — authn/authz logic
|
|
131
|
+
- `state-sync` — client/server state mismatch
|
|
132
|
+
- `integration` — external API call failure
|
|
133
|
+
- `type-narrow` — TypeScript type narrowing mistake
|
|
134
|
+
- `other` — when nothing fits (add new tags later)
|
|
135
|
+
|
|
136
|
+
**Rule**: if a new tag is needed, do not force-fit into an existing one — register as `other`. Once `other` reaches 3 entries, propose adding a new tag.
|
|
137
|
+
|
|
138
|
+
## Subcommands
|
|
139
|
+
|
|
140
|
+
### 1. `register "<symptom>"` — manual registration
|
|
141
|
+
|
|
142
|
+
Most calls are automatic; manual use is rare (bugs found outside `/vibe.verify`, or production incidents).
|
|
143
|
+
|
|
144
|
+
**Steps**:
|
|
145
|
+
1. `getCurrentTime` for today's date
|
|
146
|
+
2. `git log -1 --format=%H` for current commit hash (fix-commit candidate)
|
|
147
|
+
3. Conversation extracts:
|
|
148
|
+
- Reproduction steps (Given/When/Then)
|
|
149
|
+
- Root-cause paragraph
|
|
150
|
+
- Fix description
|
|
151
|
+
4. `root-cause-tag` is **inferred from the allowed set, then confirmed with the user**. If unclear → `other`.
|
|
152
|
+
5. Generate slug: kebab-case keywords from the symptom; on collision append `-2`
|
|
153
|
+
6. Write `.vibe/regressions/<slug>.md` (status: `open`)
|
|
154
|
+
|
|
155
|
+
### 2. `generate <slug>` — generate preventive test
|
|
156
|
+
|
|
157
|
+
**Steps**:
|
|
158
|
+
1. Read bug file
|
|
159
|
+
2. Detect test stack:
|
|
160
|
+
- From `package.json` `devDependencies`: prefer `vitest` over `jest`
|
|
161
|
+
- If neither → **ask user, then stop**
|
|
162
|
+
3. Decide test location:
|
|
163
|
+
- Sibling `__tests__/` next to the implementation file, OR
|
|
164
|
+
- The project's existing test dir (vitest config `test.include`)
|
|
165
|
+
4. File name: `<original-file>.regression.test.ts`
|
|
166
|
+
5. Body: render `templates/test-vitest.md` or `templates/test-jest.md`
|
|
167
|
+
6. Update bug frontmatter: `test-path`, `status: test-generated`
|
|
168
|
+
7. **Run the test immediately** — should fail (if not yet fixed) or pass (if fixed). Record outcome in frontmatter.
|
|
169
|
+
|
|
170
|
+
### 3. `list` — open items
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
/vibe.regress list # status != resolved
|
|
174
|
+
/vibe.regress list --feature login # filter by feature
|
|
175
|
+
/vibe.regress list --tag timezone # filter by tag
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Terminal table:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
SLUG FEATURE TAG STATUS AGE
|
|
182
|
+
login-jwt-expiry-off-by-one login timezone test-generated 3d
|
|
183
|
+
cart-stock-race-double-deduct cart concurrency open 1d
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### 4. `import` — backfill from git log
|
|
187
|
+
|
|
188
|
+
**Steps**:
|
|
189
|
+
1. `git log --grep='^fix:' --format='%H|%s|%ci' --since=<last-import-date>`
|
|
190
|
+
- `last-import-date` lives in `.vibe/regressions/.import-cursor` (defaults to 90 days ago)
|
|
191
|
+
2. For each commit:
|
|
192
|
+
- If a bug file with the same `fix-commit` already exists → **skip**
|
|
193
|
+
- Otherwise infer symptom + root-cause-tag from message/diff (LLM call)
|
|
194
|
+
- Write a new bug file (status: `resolved` — already fixed)
|
|
195
|
+
3. Update `.import-cursor`
|
|
196
|
+
4. Suggest `generate` for newly imported entries
|
|
197
|
+
|
|
198
|
+
**Note**: only `fix:` commits are considered. Projects not using Conventional Commits can override with `--grep-pattern`.
|
|
199
|
+
|
|
200
|
+
### 5. `cluster` — promote recurring patterns
|
|
201
|
+
|
|
202
|
+
**Steps**:
|
|
203
|
+
1. Aggregate `root-cause-tag` across all bug files
|
|
204
|
+
2. **A tag with ≥3 entries** becomes a cluster candidate
|
|
205
|
+
3. For each candidate:
|
|
206
|
+
- Feed the 3 reproductions to an LLM to extract the common cause and shared test cases
|
|
207
|
+
- Write `_cluster-<tag>.md` (links to the original bug slugs)
|
|
208
|
+
- Propose a shared test skeleton at `<project-test-dir>/_cluster-<tag>.regression.test.ts` (create only with user approval)
|
|
209
|
+
4. Original bug files are **not deleted** — history preserved
|
|
210
|
+
|
|
211
|
+
**Important**: `cluster` is never automatic. Users invoke it explicitly to avoid premature abstraction.
|
|
212
|
+
|
|
213
|
+
## Integration with /vibe.verify
|
|
214
|
+
|
|
215
|
+
When `/vibe.verify` fails it calls:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
Load skill `vibe.regress` with: register --from-verify
|
|
219
|
+
<feature>: {feature-name}
|
|
220
|
+
<scenario>: {failed-scenario}
|
|
221
|
+
<error>: {error-message}
|
|
222
|
+
<location>: {file:line}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
`--from-verify` behavior:
|
|
226
|
+
- symptom = scenario name + error summary
|
|
227
|
+
- feature = forwarded feature name
|
|
228
|
+
- root-cause-tag = inferred from error pattern (default `other` if unclear)
|
|
229
|
+
- status = `open`
|
|
230
|
+
- **Skip user confirmation** — the user is already attentive in a verify-failure context, and friction must be minimized
|
|
231
|
+
|
|
232
|
+
## Integration with /vibe.run
|
|
233
|
+
|
|
234
|
+
At the start of `/vibe.run "<feature>"`:
|
|
235
|
+
|
|
236
|
+
1. Filter `.vibe/regressions/*.md` for `feature: <feature-name>` + `status != resolved`
|
|
237
|
+
2. If any open items:
|
|
238
|
+
```
|
|
239
|
+
⚠️ Open regressions for this feature:
|
|
240
|
+
- login-jwt-expiry-off-by-one (timezone, 3d old)
|
|
241
|
+
- login-session-leak (auth, 1w old)
|
|
242
|
+
|
|
243
|
+
Fix these before adding new behavior? [y/N]
|
|
244
|
+
```
|
|
245
|
+
3. `y` → chain to `/vibe.regress generate` for items not yet test-generated
|
|
246
|
+
4. `N` → continue (ultrawork mode auto-`N`, records TODO)
|
|
247
|
+
|
|
248
|
+
## Done Criteria
|
|
249
|
+
|
|
250
|
+
- [ ] Subcommand-less invocation prints usage
|
|
251
|
+
- [ ] Frontmatter schema strictly enforced (missing fields rejected)
|
|
252
|
+
- [ ] `root-cause-tag` outside the allowed set → warn + force `other`
|
|
253
|
+
- [ ] After `generate`, the test is **actually run** to verify
|
|
254
|
+
- [ ] `import` deduplicates by `fix-commit` hash
|
|
255
|
+
- [ ] `cluster` does nothing under 3 entries (false-positive guard)
|
|
@@ -105,6 +105,14 @@ Detect project tech stack FIRST before launching reviewers.
|
|
|
105
105
|
|
|
106
106
|
### Phase 2: Parallel Agent Review (STACK-AWARE)
|
|
107
107
|
|
|
108
|
+
**리뷰어 스케일링 (stakes × 변경 파일 수)** — stakes 정의 SSOT: `vibe/rules/loop-contract.md` Stakes 표. 위임(서브에이전트)마다 컨텍스트 재주입 비용이 발생하므로, 리뷰어 수는 태스크 무게에 비례시킨다:
|
|
109
|
+
|
|
110
|
+
| stakes | 변경 파일 | 리뷰어 셋 |
|
|
111
|
+
|---|---|---|
|
|
112
|
+
| demo | ≤5 | correctness + security **2종만** |
|
|
113
|
+
| demo / prototype | >5 또는 prototype | correctness + security + data-integrity **3종** |
|
|
114
|
+
| production | 무관 | 아래 Core Reviewers 전체 (기존 기본 동작 — 불변) |
|
|
115
|
+
|
|
108
116
|
**Spawn the reviewers as concurrent native subagents in ONE message** — one `code-reviewer` instance per focus plus `security-reviewer`, each scoped to the changed files:
|
|
109
117
|
|
|
110
118
|
```
|
package/skills/vibe.run/SKILL.md
CHANGED
|
@@ -46,7 +46,7 @@ Execute **Scenario-Driven Implementation** with automatic quality verification.
|
|
|
46
46
|
### Pre-Run Regression Check (MANDATORY, before implementation starts)
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
Load skill `regress` with: list --feature "{feature-name}"
|
|
49
|
+
Load skill `vibe.regress` with: list --feature "{feature-name}"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
- Open regressions exist → automationLevel confirm: ask user; autonomous: auto-invoke `/vibe.regress generate <slug>`
|
|
@@ -135,6 +135,10 @@ Scenario verification failed
|
|
|
135
135
|
- PASS → 다음 scenario
|
|
136
136
|
- stuck (같은 failure가 이전 라운드와 동일, `loop-ledger.js check-stuck`) → automationLevel confirm: 사용자 질문; autonomous: TODO + next scenario
|
|
137
137
|
|
|
138
|
+
**Stakes 프로파일 (SSOT: `vibe/rules/loop-contract.md` Stakes 표):**
|
|
139
|
+
- `demo`/`prototype` → max_iterations 1, 리뷰 1패스, **검증 스크립트 신규 생성 금지** — 검증은 기존 테스트 러너·브라우저 게이트만 사용한다. 새 verify_*.py / 검증 전용 스크립트 파일을 만들지 않는다.
|
|
140
|
+
- JUDGE 검증 산출물 절제 (모든 stakes): 이번 feature 신규 검증 코드 바이트 합이 신규 구현 코드 바이트 합을 초과하면 (`git diff --numstat` 기준) P2 경고를 run-ledger 에 기록한다. advisory — 게이트 통과 여부는 불변.
|
|
141
|
+
|
|
138
142
|
---
|
|
139
143
|
|
|
140
144
|
## **ULTRAWORK Mode** (ulw) — deprecated alias
|
|
@@ -452,3 +456,390 @@ Keep under 20 lines. Save key lessons via `core_save_memory`. Update `claude-pro
|
|
|
452
456
|
---
|
|
453
457
|
|
|
454
458
|
ARGUMENTS: $ARGUMENTS
|
|
459
|
+
|
|
460
|
+
## Bundled internal: arch-guard
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
# Arch Guard — Architecture Boundary Test Generator
|
|
464
|
+
|
|
465
|
+
> **Principle**: "Mechanical enforcement over documentation." If a rule exists only in docs, it will be violated. Turn architecture constraints into failing tests.
|
|
466
|
+
|
|
467
|
+
## When to Use
|
|
468
|
+
|
|
469
|
+
| Scenario | Signal |
|
|
470
|
+
|----------|--------|
|
|
471
|
+
| `vibe init` / `vibe update` | Auto-generate for detected stack |
|
|
472
|
+
| New layer/module added | Boundaries need enforcement |
|
|
473
|
+
| Architecture violation found in review | Prevent recurrence with test |
|
|
474
|
+
| "Services should not import UI" type rules | Turn into automated check |
|
|
475
|
+
|
|
476
|
+
## Core Flow
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
DETECT → INFER → GENERATE → VERIFY
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Step 1: DETECT — Identify Project Architecture
|
|
483
|
+
|
|
484
|
+
Analyze the project to determine its layer structure:
|
|
485
|
+
|
|
486
|
+
```
|
|
487
|
+
Parallel exploration:
|
|
488
|
+
- Agent 1: Scan directory structure (src/, app/, lib/, etc.)
|
|
489
|
+
- Agent 2: Read existing architecture docs (CLAUDE.md, README, ADR)
|
|
490
|
+
- Agent 3: Analyze import graph (which files import what)
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Common patterns to detect:**
|
|
494
|
+
|
|
495
|
+
| Pattern | Layers | Typical Stacks |
|
|
496
|
+
|---------|--------|----------------|
|
|
497
|
+
| MVC | Controller → Service → Model | Rails, NestJS, Spring |
|
|
498
|
+
| Clean Architecture | UI → Application → Domain → Infrastructure | General |
|
|
499
|
+
| Feature-based | Feature A ↛ Feature B internals | Next.js, React |
|
|
500
|
+
| Hexagonal | Adapters → Ports → Domain | DDD projects |
|
|
501
|
+
| Component hierarchy | Page → Feature → Shared → UI Primitives | Frontend |
|
|
502
|
+
|
|
503
|
+
### Step 2: INFER — Define Boundary Rules
|
|
504
|
+
|
|
505
|
+
From detected structure, generate rules:
|
|
506
|
+
|
|
507
|
+
```typescript
|
|
508
|
+
// Rule format
|
|
509
|
+
interface ArchRule {
|
|
510
|
+
name: string; // "service-no-ui-import"
|
|
511
|
+
from: string; // Glob pattern: "src/services/**"
|
|
512
|
+
cannotImport: string[]; // ["src/components/**", "src/pages/**"]
|
|
513
|
+
canImport: string[]; // ["src/models/**", "src/utils/**"]
|
|
514
|
+
reason: string; // "Services must be UI-agnostic"
|
|
515
|
+
}
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**Default rules by stack:**
|
|
519
|
+
|
|
520
|
+
| Stack | Rule |
|
|
521
|
+
|-------|------|
|
|
522
|
+
| Next.js / React | `components/` cannot import from `pages/` or `app/` |
|
|
523
|
+
| Next.js / React | `lib/` cannot import from `components/` |
|
|
524
|
+
| NestJS | `*.service.ts` cannot import from `*.controller.ts` |
|
|
525
|
+
| NestJS | `*.module.ts` is the only valid cross-boundary import |
|
|
526
|
+
| General TS | `src/domain/` cannot import from `src/infra/` |
|
|
527
|
+
| General TS | No circular dependencies between top-level dirs |
|
|
528
|
+
| Python Django | `models.py` cannot import from `views.py` |
|
|
529
|
+
| Python FastAPI | `schemas/` cannot import from `routers/` |
|
|
530
|
+
|
|
531
|
+
### Step 3: GENERATE — Create Test File
|
|
532
|
+
|
|
533
|
+
Output: `tests/arch-guard.test.ts` (or equivalent for stack)
|
|
534
|
+
|
|
535
|
+
```typescript
|
|
536
|
+
/**
|
|
537
|
+
* Architecture Boundary Tests
|
|
538
|
+
* Generated by arch-guard skill
|
|
539
|
+
*
|
|
540
|
+
* These tests enforce architectural constraints mechanically.
|
|
541
|
+
* If a test fails, it means an import violates the intended architecture.
|
|
542
|
+
*/
|
|
543
|
+
import { describe, it, expect } from 'vitest';
|
|
544
|
+
import fs from 'fs';
|
|
545
|
+
import path from 'path';
|
|
546
|
+
|
|
547
|
+
// Helper: extract imports from a file
|
|
548
|
+
function extractImports(filePath: string): string[] {
|
|
549
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
550
|
+
const importRegex = /(?:import|require)\s*\(?['"]([^'"]+)['"]\)?/g;
|
|
551
|
+
const imports: string[] = [];
|
|
552
|
+
let match;
|
|
553
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
554
|
+
imports.push(match[1]);
|
|
555
|
+
}
|
|
556
|
+
return imports;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// Helper: resolve relative import to absolute path
|
|
560
|
+
function resolveImport(fromFile: string, importPath: string): string {
|
|
561
|
+
if (importPath.startsWith('.')) {
|
|
562
|
+
return path.resolve(path.dirname(fromFile), importPath);
|
|
563
|
+
}
|
|
564
|
+
return importPath; // external package
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// Helper: glob files matching pattern
|
|
568
|
+
function globFiles(pattern: string, baseDir: string): string[] {
|
|
569
|
+
// Use fast-glob or manual recursive scan
|
|
570
|
+
// Implementation depends on available dependencies
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
describe('Architecture Boundaries', () => {
|
|
574
|
+
// GENERATED RULES GO HERE
|
|
575
|
+
// Each rule becomes a test case:
|
|
576
|
+
|
|
577
|
+
it('services cannot import UI components', () => {
|
|
578
|
+
const serviceFiles = globFiles('src/services/**/*.ts', process.cwd());
|
|
579
|
+
const violations: string[] = [];
|
|
580
|
+
|
|
581
|
+
for (const file of serviceFiles) {
|
|
582
|
+
const imports = extractImports(file);
|
|
583
|
+
for (const imp of imports) {
|
|
584
|
+
const resolved = resolveImport(file, imp);
|
|
585
|
+
if (resolved.includes('/components/') || resolved.includes('/pages/')) {
|
|
586
|
+
violations.push(`${file} imports ${imp}`);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
expect(violations).toEqual([]);
|
|
592
|
+
});
|
|
593
|
+
});
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Step 4: VERIFY — Run and Fix
|
|
597
|
+
|
|
598
|
+
1. Run the generated tests: `npx vitest run tests/arch-guard.test.ts`
|
|
599
|
+
2. If violations found:
|
|
600
|
+
- Report each violation with file:line
|
|
601
|
+
- Suggest fix (move shared code to appropriate layer)
|
|
602
|
+
- Do NOT auto-fix — violations need human review
|
|
603
|
+
|
|
604
|
+
## Output Files
|
|
605
|
+
|
|
606
|
+
| File | Purpose |
|
|
607
|
+
|------|---------|
|
|
608
|
+
| `tests/arch-guard.test.ts` | Executable boundary tests |
|
|
609
|
+
| `.vibe/arch-rules.json` | Machine-readable rules (for CI) |
|
|
610
|
+
|
|
611
|
+
## Customization
|
|
612
|
+
|
|
613
|
+
Users can add custom rules to `.vibe/arch-rules.json`:
|
|
614
|
+
|
|
615
|
+
```json
|
|
616
|
+
{
|
|
617
|
+
"rules": [
|
|
618
|
+
{
|
|
619
|
+
"name": "no-direct-db-in-handlers",
|
|
620
|
+
"from": "src/handlers/**",
|
|
621
|
+
"cannotImport": ["src/db/**"],
|
|
622
|
+
"reason": "Handlers must use services, not direct DB access"
|
|
623
|
+
}
|
|
624
|
+
]
|
|
625
|
+
}
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
The test generator reads this file and adds custom rules to the test suite.
|
|
629
|
+
|
|
630
|
+
## Integration
|
|
631
|
+
|
|
632
|
+
- `vibe init` → auto-detect and generate initial arch-guard tests
|
|
633
|
+
- `vibe update` → refresh rules if directory structure changed
|
|
634
|
+
- Pre-commit hook → run arch-guard tests before commit
|
|
635
|
+
- `vibe.review` (skill) → code-reviewer (focus: architecture) checks against arch-rules.json
|
|
636
|
+
|
|
637
|
+
## Bundled internal: exec-plan
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
# ExecPlan — Self-Contained Execution Plan Generator
|
|
641
|
+
|
|
642
|
+
> **Principle**: "If the agent can't see it, it doesn't exist." Every decision, file path, pattern, and verification step must be explicit in the plan — no implicit knowledge allowed.
|
|
643
|
+
|
|
644
|
+
## When to Use
|
|
645
|
+
|
|
646
|
+
Before `/vibe.run`, generate an ExecPlan to make execution deterministic:
|
|
647
|
+
|
|
648
|
+
| Scenario | Signal |
|
|
649
|
+
|----------|--------|
|
|
650
|
+
| Complex SPEC (3+ phases) | Agent needs long autonomous execution |
|
|
651
|
+
| Team/multi-agent execution | Multiple agents need shared understanding |
|
|
652
|
+
| Context window pressure | Plan survives `/new` session handoff |
|
|
653
|
+
| Unfamiliar codebase | Agent can't rely on implicit knowledge |
|
|
654
|
+
|
|
655
|
+
## Core Flow
|
|
656
|
+
|
|
657
|
+
```
|
|
658
|
+
SPEC + Feature → ANALYZE → RESOLVE → GENERATE → PERSIST
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### Step 1: ANALYZE — Extract Everything Needed
|
|
662
|
+
|
|
663
|
+
Read the SPEC and Feature files, then extract:
|
|
664
|
+
|
|
665
|
+
```
|
|
666
|
+
For each Phase → For each Scenario:
|
|
667
|
+
1. Requirements (REQ-* IDs)
|
|
668
|
+
2. Given/When/Then conditions
|
|
669
|
+
3. Affected files (MUST exist — verify with Glob)
|
|
670
|
+
4. Dependencies (imports, packages)
|
|
671
|
+
5. Existing patterns to follow (read actual code, don't assume)
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
**Parallel exploration** (3+ agents):
|
|
675
|
+
- Agent 1: Map all file paths mentioned/implied in SPEC → verify they exist
|
|
676
|
+
- Agent 2: For each affected file, extract current interfaces/types/exports
|
|
677
|
+
- Agent 3: Find existing patterns (naming conventions, error handling, test structure)
|
|
678
|
+
|
|
679
|
+
### Step 2: RESOLVE — Eliminate All Ambiguity
|
|
680
|
+
|
|
681
|
+
For every decision point in the SPEC, resolve it NOW:
|
|
682
|
+
|
|
683
|
+
| Ambiguity | Resolution |
|
|
684
|
+
|-----------|------------|
|
|
685
|
+
| "Add validation" | → Which fields? What rules? What error messages? |
|
|
686
|
+
| "Handle errors" | → Which error codes? What response format? |
|
|
687
|
+
| "Follow existing pattern" | → Copy the ACTUAL pattern code into the plan |
|
|
688
|
+
| "Update tests" | → Which test file? What test framework? What assertions? |
|
|
689
|
+
|
|
690
|
+
**Rule**: If you'd need to "figure it out later", resolve it now. The plan must be executable by an agent with ZERO codebase knowledge.
|
|
691
|
+
|
|
692
|
+
### Step 3: GENERATE — Write the ExecPlan
|
|
693
|
+
|
|
694
|
+
Output format: `.vibe/specs/{feature-name}-execplan.md`
|
|
695
|
+
|
|
696
|
+
```markdown
|
|
697
|
+
# ExecPlan: {feature-name}
|
|
698
|
+
|
|
699
|
+
## Meta
|
|
700
|
+
- SPEC: .vibe/specs/{name}.md
|
|
701
|
+
- Feature: .vibe/features/{name}.feature
|
|
702
|
+
- Generated: {timestamp}
|
|
703
|
+
- Phases: {count}
|
|
704
|
+
- Scenarios: {count}
|
|
705
|
+
|
|
706
|
+
## Pre-flight Checks
|
|
707
|
+
- [ ] `npm run build` passes
|
|
708
|
+
- [ ] `npx vitest run` passes (baseline)
|
|
709
|
+
- [ ] Required files exist: {list}
|
|
710
|
+
|
|
711
|
+
## Phase {N}: {phase-name}
|
|
712
|
+
|
|
713
|
+
### Environment
|
|
714
|
+
- Files to modify: {exact paths}
|
|
715
|
+
- Files to create: {exact paths}
|
|
716
|
+
- Dependencies to add: {package@version}
|
|
717
|
+
- Patterns to follow: (inline code snippets from codebase)
|
|
718
|
+
|
|
719
|
+
### Scenario {N}.{M}: {scenario-name}
|
|
720
|
+
|
|
721
|
+
**Given**: {precondition}
|
|
722
|
+
→ Setup: {exact code/commands to establish precondition}
|
|
723
|
+
|
|
724
|
+
**When**: {action}
|
|
725
|
+
→ Implement: {step-by-step implementation instructions}
|
|
726
|
+
- File: {path}
|
|
727
|
+
- Location: after line containing `{anchor text}`
|
|
728
|
+
- Code: (inline snippet)
|
|
729
|
+
- Imports needed: {list}
|
|
730
|
+
|
|
731
|
+
**Then**: {expected result}
|
|
732
|
+
→ Verify:
|
|
733
|
+
- Command: `{test command}`
|
|
734
|
+
- Expected: {output/behavior}
|
|
735
|
+
- Fallback: {what to do if verification fails}
|
|
736
|
+
|
|
737
|
+
### Phase {N} Gate
|
|
738
|
+
- [ ] Build: `npm run build`
|
|
739
|
+
- [ ] Tests: `npx vitest run {relevant-test-files}`
|
|
740
|
+
- [ ] Type check: `npx tsc --noEmit`
|
|
741
|
+
|
|
742
|
+
## Completion Criteria
|
|
743
|
+
- Coverage threshold: ≥95%
|
|
744
|
+
- All scenarios passing
|
|
745
|
+
- No regressions in existing tests
|
|
746
|
+
- RTM: `generateTraceabilityMatrix("{feature-name}")`
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
### Step 4: PERSIST — Save and Link
|
|
750
|
+
|
|
751
|
+
1. Save ExecPlan to `.vibe/specs/{feature-name}-execplan.md`
|
|
752
|
+
2. Save session context: `save_memory("execplan-{feature}", {summary})`
|
|
753
|
+
3. Output execution command:
|
|
754
|
+
|
|
755
|
+
```
|
|
756
|
+
Ready to execute:
|
|
757
|
+
/vibe.run "{feature-name}" ultrawork
|
|
758
|
+
|
|
759
|
+
Or hand off to new session:
|
|
760
|
+
/vibe.continue
|
|
761
|
+
→ Load: .vibe/specs/{feature-name}-execplan.md
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
## Quality Checks
|
|
765
|
+
|
|
766
|
+
| Check | Criteria |
|
|
767
|
+
|-------|----------|
|
|
768
|
+
| No implicit knowledge | Every file path verified with Glob |
|
|
769
|
+
| No "figure it out" | Every decision resolved with actual code |
|
|
770
|
+
| Survives handoff | Plan readable without any prior context |
|
|
771
|
+
| Inline patterns | Actual code snippets, not "follow existing pattern" |
|
|
772
|
+
| Verification steps | Every scenario has a concrete verification command |
|
|
773
|
+
|
|
774
|
+
## Anti-patterns
|
|
775
|
+
|
|
776
|
+
- "See the existing implementation" → Copy the relevant code inline
|
|
777
|
+
- "Follow the pattern in X" → Show the actual pattern
|
|
778
|
+
- "Standard error handling" → Specify exact error codes and messages
|
|
779
|
+
- "Update tests accordingly" → Name the test file, framework, and assertions
|
|
780
|
+
|
|
781
|
+
## Bundled internal: restraint
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
# Restraint — Don't Write It, Don't Tune It (Yet)
|
|
785
|
+
|
|
786
|
+
Two constraints, one gate:
|
|
787
|
+
|
|
788
|
+
- **No premature code.** New abstractions must be *pulled* by a demonstrated
|
|
789
|
+
need, never pushed by "might need it later." Once the code exists, deleting
|
|
790
|
+
it costs more than never writing it.
|
|
791
|
+
- **No premature optimization.** Performance work must be *pulled* by a
|
|
792
|
+
measurement, never by a hunch.
|
|
793
|
+
|
|
794
|
+
## The YAGNI Ladder (code axis)
|
|
795
|
+
|
|
796
|
+
Satisfy the need at the **highest** rung that covers it; lower rungs are
|
|
797
|
+
blocked while a higher one applies:
|
|
798
|
+
|
|
799
|
+
1. **Not needed** — the requirement doesn't ask for it → don't build it
|
|
800
|
+
2. **Stdlib / built-ins** already do it (`crypto`, `Intl`, `pathlib`, …)
|
|
801
|
+
3. **Native platform feature** does it (`<input type="date">`, CSS `:has()`, DB constraints)
|
|
802
|
+
4. **Already-installed dependency** covers it — check the lockfile, don't guess
|
|
803
|
+
5. **One line** — a single expression; no new file, no class
|
|
804
|
+
6. **Minimal code** — only now, and nothing for "later"
|
|
805
|
+
|
|
806
|
+
Tie-break: native beats a one-liner; stdlib beats a dependency. Generalize
|
|
807
|
+
only when a *second* caller exists.
|
|
808
|
+
|
|
809
|
+
## Pike's Rules (optimization axis)
|
|
810
|
+
|
|
811
|
+
- You can't tell where a program spends its time — bottlenecks surprise.
|
|
812
|
+
**Measure; don't guess.**
|
|
813
|
+
- Don't tune until one part *measurably* overwhelms the rest.
|
|
814
|
+
- Fancy algorithms are slow when n is small — and n is usually small.
|
|
815
|
+
Ask "what's n?" before "what's the Big-O?"
|
|
816
|
+
- Simple algorithms + the right data structures beat clever code. Data dominates.
|
|
817
|
+
|
|
818
|
+
Optimization is justified only when ALL hold: a measured bottleneck exists →
|
|
819
|
+
it dominates runtime → the fix is the simplest change addressing it → you
|
|
820
|
+
re-measure after.
|
|
821
|
+
|
|
822
|
+
## Blocked Impulses
|
|
823
|
+
|
|
824
|
+
| Impulse | Constraint | Counter |
|
|
825
|
+
|---|---|---|
|
|
826
|
+
| helper / utility / wrapper / manager class | rungs 1–5 | a stdlib call or one line usually suffices |
|
|
827
|
+
| config system for one value | rung 1 | a `const` is the config |
|
|
828
|
+
| generic `Processor(strategy, validator…)` | rung 1 | one concrete function until a second caller exists |
|
|
829
|
+
| "add a cache here" / "parallelize this" | measure first | is this path even hot? Often it's I/O |
|
|
830
|
+
| swap in a B-tree / trie / skip list | what's n? | O(n²) with n=100 is microseconds |
|
|
831
|
+
| "this loop looks slow" | measure first | the bottleneck is probably elsewhere |
|
|
832
|
+
|
|
833
|
+
## Overrides — Restraint Never Erodes These
|
|
834
|
+
|
|
835
|
+
1. **Security and trust-boundary work are requirements**, not optional
|
|
836
|
+
complexity. Input validation, auth checks, escaping stay in — "one line"
|
|
837
|
+
is no excuse to drop them.
|
|
838
|
+
2. **Deliberate simplifications get a comment + upgrade path**, so the next
|
|
839
|
+
reader sees a *choice*, not an oversight:
|
|
840
|
+
|
|
841
|
+
```ts
|
|
842
|
+
// Global lock is enough at current throughput.
|
|
843
|
+
// Switch to per-account locking if write contention shows up.
|
|
844
|
+
const lock = new Mutex();
|
|
845
|
+
```
|
|
@@ -48,6 +48,6 @@ For each violation, choose one:
|
|
|
48
48
|
## Next Steps
|
|
49
49
|
|
|
50
50
|
1. Fix all violations in the table above
|
|
51
|
-
2. Re-run: `node skills/arch-guard/scripts/check-boundaries.js {{RULES_FILE}} {{SRC_DIR}}`
|
|
51
|
+
2. Re-run: `node skills/vibe.arch-guard/scripts/check-boundaries.js {{RULES_FILE}} {{SRC_DIR}}`
|
|
52
52
|
3. Commit clean state: `git commit -m "fix: resolve arch-guard boundary violations"`
|
|
53
53
|
4. Add to CI: run check-boundaries.js in pre-commit or CI pipeline
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: seo-checklist
|
|
2
|
+
name: vibe.seo-checklist
|
|
3
3
|
invocation: [auto]
|
|
4
4
|
tier: core
|
|
5
5
|
description: "SEO gotchas for web development — easy-to-miss items that hurt search ranking. Covers meta tags, Open Graph, structured data (JSON-LD), sitemap, robots.txt, canonical URLs, and Naver/Google-specific requirements. Use when building or reviewing any public-facing web page, landing page, or marketing site. Must use this skill when user mentions SEO, search ranking, meta tags, or when deploying a web app that needs to be discoverable."
|