@su-record/vibe 3.2.1 → 3.2.2
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__/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/{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.run/SKILL.md +388 -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 +122 -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/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
|
@@ -26,7 +26,7 @@ user-invocable: true
|
|
|
26
26
|
↓
|
|
27
27
|
Input 분석 + Smart Resume
|
|
28
28
|
↓
|
|
29
|
-
|
|
29
|
+
Execute the bundled implementation below — 단일 패스: 컨텍스트 수집 → (필요시) 인라인 질문 → SPEC + Feature 작성 → 셀프 리뷰 1회
|
|
30
30
|
↓
|
|
31
31
|
SPEC 승인 (1회 — automationLevel: autonomous 면 생략)
|
|
32
32
|
↓
|
|
@@ -80,3 +80,124 @@ trace(`/vibe.trace`)·contract(`/vibe.contract`) 는 사용자가 요청하거
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
82
|
ARGUMENTS: $ARGUMENTS
|
|
83
|
+
|
|
84
|
+
## Bundled implementation
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# spec — Single-Pass SPEC
|
|
88
|
+
|
|
89
|
+
자연어 요구사항 하나를 받아 **한 번의 패스로** 실행 가능한 SPEC을 만든다. 별도의 interview → plan → review 단계는 없다 — 질문이 필요하면 이 패스 안에서 인라인으로 묻고, 리뷰는 셀프 리뷰 1회로 끝낸다. 완성된 SPEC의 승인이 loop-contract 가 정의하는 **유일한 의무적 사람 개입 지점**이다.
|
|
90
|
+
|
|
91
|
+
> 루프 시맨틱 SSOT: `vibe/rules/loop-contract.md`. SPEC = ANCHOR 아티팩트, Done Criteria = JUDGE 게이트.
|
|
92
|
+
|
|
93
|
+
## Input
|
|
94
|
+
|
|
95
|
+
| 입력 | 처리 |
|
|
96
|
+
|---|---|
|
|
97
|
+
| 자연어 요구사항 | 그대로 SPEC 패스의 주 입력 |
|
|
98
|
+
| 📎 첨부 (md/txt/pdf/이미지 등) | Read 도구로 분석 후 요구사항에 병합 |
|
|
99
|
+
| 파일 경로 인자 (PRD 등) | 존재 확인 후 Read — 첨부와 동일 취급 |
|
|
100
|
+
| **레거시 아티팩트** `.vibe/interviews/{feature}.md`, `.vibe/plans/{feature}.md` | 존재하면 **입력 컨텍스트로만** 읽는다. 절대 요구하거나 재생성하지 않는다 — 없어도 정상 경로 |
|
|
101
|
+
|
|
102
|
+
## Process
|
|
103
|
+
|
|
104
|
+
### 1. Git branch + pointer
|
|
105
|
+
|
|
106
|
+
- `git branch --show-current` — `main`/`master` 이면 `git checkout -b feature/{feature-name}` (소문자·하이픈). feature 브랜치면 그대로 진행.
|
|
107
|
+
- feature 이름 확정 즉시 `.vibe/.last-feature` 에 이름 한 줄 기록 (값이 같으면 no-op).
|
|
108
|
+
|
|
109
|
+
### 2. Project context
|
|
110
|
+
|
|
111
|
+
- `.vibe/config.json` 읽기 — `references.languages[]` 의 스택 가이드, `stacks` 확인.
|
|
112
|
+
- 기존 코드 파악이 필요하면 네이티브 Explore 서브에이전트에 위임 (main session 에서 프로젝트 파일을 훑지 않는다):
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
Task(subagent_type="Explore",
|
|
116
|
+
prompt="Find existing implementations related to [FEATURE]. Return: tech stack, relevant files, patterns. Under 200 tokens.")
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 3. Clarify — 진짜 모호할 때만
|
|
120
|
+
|
|
121
|
+
별도 인터뷰 단계가 아니다. 요구사항·첨부·레거시 아티팩트·코드베이스 컨텍스트로 답을 합리적으로 정할 수 있으면 **묻지 않는다**. 다음 조건을 모두 만족할 때만 질문한다:
|
|
122
|
+
|
|
123
|
+
- 답에 따라 Done Criteria 나 구현 방향이 실제로 갈라진다 (인증 방식, 데이터 모델의 필수 필드, 외부 연동 여부 등)
|
|
124
|
+
- 합리적 기본값을 SPEC 의 Assumptions 로 명시하는 것으로 대체할 수 없다
|
|
125
|
+
|
|
126
|
+
질문할 때는 **한 번에 묶어서** (번호 목록, 최대 5개), 각 질문에 제안 기본값을 붙인다. `automationLevel: autonomous` 면 질문 없이 기본값을 채택하고 전부 SPEC 의 Assumptions 섹션에 기록한다.
|
|
127
|
+
|
|
128
|
+
사소한 값(타임아웃, 페이지 크기, 재시도 횟수 등)은 묻지 말고 상식적 기본값을 채택 + Assumptions 에 기록.
|
|
129
|
+
|
|
130
|
+
### 4. Write SPEC — one pass
|
|
131
|
+
|
|
132
|
+
`vibe/templates/spec-template.md` 구조로 `.vibe/specs/{feature-name}.md` 를 작성한다. 핵심 요건:
|
|
133
|
+
|
|
134
|
+
- **Overview / Goal** — 무엇을, 왜. 1-3 문장.
|
|
135
|
+
- **Context Sources** — 입력으로 사용한 파일·문서·URL·관측 상태. 출처 없는 추정은 Assumptions 로 분리.
|
|
136
|
+
- **Requirements** — `REQ-{feature}-NNN` ID와 연결된 Done Criteria를 표로 명시.
|
|
137
|
+
- **Done Criteria** — 결정론적 게이트만. 각 항목은 "명령/관찰로 pass·fail 판정 가능"해야 한다 (테스트 exit code, 빌드 성공, 특정 동작 관찰). "잘 동작한다" 류 서술 금지 — 이것이 루프의 JUDGE 입력이 된다.
|
|
138
|
+
- **Evidence Required** — Done 을 증명할 명령 결과·테스트 리포트·로그·스크린샷·코드 위치.
|
|
139
|
+
- **Human Taste (Non-Blocking)** — UX·브랜드·제품 감각처럼 release 시 사람이 판단할 기준. 완료 게이트로 쓰지 않는다.
|
|
140
|
+
- **Scenarios** — Given-When-Then. Happy path + 주요 edge case. 각 시나리오는 Done Criteria 중 하나에 매핑.
|
|
141
|
+
- **Out of Scope** — 이번에 하지 않는 것을 명시 (비어 있으면 스코프 팽창 신호).
|
|
142
|
+
- **Assumptions** — 3단계에서 채택한 기본값 전부.
|
|
143
|
+
- **Constraints** — 구현·보안·호환성 경계. execution packet으로 압축돼도 반드시 보존한다.
|
|
144
|
+
- **API Contract** (해당 시에만) — 엔드포인트/요청/응답 형태. 이 섹션이 있으면 이후 `/vibe.contract` 가 drift 를 검사한다.
|
|
145
|
+
|
|
146
|
+
이어서 `.vibe/features/{feature-name}.feature` 를 생성한다: 시나리오 섹션을 gherkin 으로 변환 (Done Criteria ↔ Scenario 매핑 유지). `/vibe.run` 이 이 파일을 구현·검증 단위로 사용한다.
|
|
147
|
+
|
|
148
|
+
**Large scope** (5+ phases 또는 15+ 신규 파일 또는 4+ 독립 기능): 폴더 분할 — `.vibe/specs/{feature}/_index.md` + `phase-N-{name}.md`, feature 파일도 동일 구조로 매칭. 조용히 분할하고 결과만 보고한다.
|
|
149
|
+
|
|
150
|
+
**파일 규칙**: `.vibe/` 밖에 파일을 만들지 않는다. SPEC 파일마다 매칭되는 Feature 파일이 있어야 한다.
|
|
151
|
+
|
|
152
|
+
### 5. Self-review — once
|
|
153
|
+
|
|
154
|
+
작성 직후, 아래 체크리스트로 자기 SPEC 을 **1회** 점검하고 걸리는 항목을 즉시 고친다. 외부 LLM 리뷰 없음, 수렴 루프 없음 — 한 번 고치면 끝.
|
|
155
|
+
|
|
156
|
+
- [ ] 모든 Done Criteria 가 명령/관찰로 판정 가능한가 (모델 자기 보고가 아닌)
|
|
157
|
+
- [ ] Context Sources 와 Assumptions 가 분리됐고, 각 Done Criteria 의 Evidence Required 가 있는가
|
|
158
|
+
- [ ] Human Taste 가 결정론적 완료 게이트에 섞이지 않았는가
|
|
159
|
+
- [ ] 모든 시나리오가 Done Criteria 에 매핑되는가 (고아 시나리오 없음)
|
|
160
|
+
- [ ] 수치가 필요한 곳에 수치가 있는가 (제한·타임아웃·크기 — 없으면 기본값 + Assumptions)
|
|
161
|
+
- [ ] Out of Scope 가 비어 있지 않은가
|
|
162
|
+
- [ ] 요구사항에 있던 것 중 SPEC 에서 빠진 것이 없는가
|
|
163
|
+
|
|
164
|
+
### 6. Approval — the single gate
|
|
165
|
+
|
|
166
|
+
SPEC 요약(Goal, Done Criteria, 시나리오 수, Out of Scope, 열린 Assumptions)을 제시하고 승인을 받는다:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
📋 SPEC 준비 완료: {feature-name}
|
|
170
|
+
.vibe/specs/{feature-name}.md · .vibe/features/{feature-name}.feature
|
|
171
|
+
|
|
172
|
+
Goal: {1줄}
|
|
173
|
+
Done Criteria: {N}개 (전부 결정론 게이트)
|
|
174
|
+
Scenarios: {M}개 · Out of Scope: {K}항목
|
|
175
|
+
Assumptions: {요약 또는 "없음"}
|
|
176
|
+
|
|
177
|
+
승인하면 이 SPEC 이 루프의 Done 정의가 됩니다.
|
|
178
|
+
[1] 승인 → 구현 진행 [2] 수정 요청 [3] 중단
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
- 수정 요청 → 반영 후 재제시 (사용자 주도 반복 — 자동 루프 아님).
|
|
182
|
+
- `automationLevel: autonomous` → 승인 생략, 요약만 출력하고 진행.
|
|
183
|
+
- 승인 후 SPEC 변경은 코드 변경과 같은 커밋으로 (SPEC-First — `vibe.run` 참조).
|
|
184
|
+
|
|
185
|
+
## Output
|
|
186
|
+
|
|
187
|
+
| 파일 | 경로 |
|
|
188
|
+
|---|---|
|
|
189
|
+
| SPEC | `.vibe/specs/{feature-name}.md` (또는 분할 폴더) |
|
|
190
|
+
| Feature (BDD) | `.vibe/features/{feature-name}.feature` (또는 분할 폴더) |
|
|
191
|
+
| Pointer | `.vibe/.last-feature` |
|
|
192
|
+
|
|
193
|
+
승인된 SPEC 은 루프의 ANCHOR 로 쓰인다: `/vibe.run` 이 시나리오 단위로 구현·검증하고, `/vibe.verify` 가 Done Criteria 를 판정해 `.vibe/metrics/run-ledger.json` 의 `verifyPassed` 를 기록한다. 게이트 통과 여부는 항상 run-ledger·테스트 exit code 가 판정한다.
|
|
194
|
+
|
|
195
|
+
## Next Step
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
/vibe.run "{feature-name}"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
ARGUMENTS: $ARGUMENTS
|
|
@@ -32,12 +32,12 @@ Markdown summary is also printed to the console when the run finishes.
|
|
|
32
32
|
|
|
33
33
|
## Process
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Execute the bundled implementation below with target harness: `$ARGUMENTS`
|
|
36
36
|
|
|
37
37
|
- If `$ARGUMENTS` is empty, detect the current harness (CC vs Codex) and use that.
|
|
38
38
|
- If the target install dir is missing, exit cleanly with guidance (not an error).
|
|
39
39
|
|
|
40
|
-
See `skills/test/SKILL.md` for the probe spec and the report template.
|
|
40
|
+
See `skills/vibe.test/SKILL.md` for the probe spec and the report template.
|
|
41
41
|
|
|
42
42
|
## Done Criteria
|
|
43
43
|
|
|
@@ -49,3 +49,139 @@ See `skills/test/SKILL.md` for the probe spec and the report template.
|
|
|
49
49
|
---
|
|
50
50
|
|
|
51
51
|
ARGUMENTS: $ARGUMENTS
|
|
52
|
+
|
|
53
|
+
## Bundled implementation
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# test — Self-Test
|
|
57
|
+
|
|
58
|
+
Probe every shipped vibe surface in one install dir and emit a pass/fail report.
|
|
59
|
+
|
|
60
|
+
## Why this exists
|
|
61
|
+
|
|
62
|
+
When vibe ships new entry skills, skills, hooks, or agents, one side (CC or Codex) can end up out of sync with the other, frontmatter can drift, and hook tests can silently break. `vibe.test` is the single mechanical check: does every surface in the target install actually load and pass its own tests?
|
|
63
|
+
|
|
64
|
+
## Target harness
|
|
65
|
+
|
|
66
|
+
The argument selects which install dir to probe:
|
|
67
|
+
|
|
68
|
+
| Arg | Probed dir |
|
|
69
|
+
|---|---|
|
|
70
|
+
| (empty) | current harness — CC: `~/.claude/`, Codex: `~/.codex/` |
|
|
71
|
+
| `cc` | `~/.claude/` |
|
|
72
|
+
| `codex` | `~/.codex/` |
|
|
73
|
+
|
|
74
|
+
If the target dir does not exist, print a clear message and exit with guidance (not an error). Example:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
~/.codex/ not found — Codex isn't installed on this machine.
|
|
78
|
+
To install: npm i -g @openai/codex
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Probes
|
|
82
|
+
|
|
83
|
+
All probes are **structural or test-based** — no interactive command is ever actually invoked, and no LLM is called.
|
|
84
|
+
|
|
85
|
+
| Category | Source | Check |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| entry skills | `<install>/skills/vibe*/SKILL.md` | file readable · frontmatter parses · `name`, `description`, `user-invocable: true` present |
|
|
88
|
+
| skills | `<install>/skills/*/SKILL.md` | frontmatter parses · required fields (`name`, `description`) · body non-empty |
|
|
89
|
+
| hooks | repo `hooks/scripts/*.js` | for each script with a matching `__tests__/<name>.test.js`, run `npx vitest run <test> --reporter=json` and parse pass/fail counts |
|
|
90
|
+
| agents | `<install>/agents/*.md` | file readable · frontmatter parses · required fields (`name`, `description`) |
|
|
91
|
+
|
|
92
|
+
A probe's failure is captured in its `error` field; the overall run never halts because of one failure.
|
|
93
|
+
|
|
94
|
+
## Report template
|
|
95
|
+
|
|
96
|
+
Written to `~/.vibe/test-reports/<YYYYMMDD-HHmm>-<harness>.{json,md}`. Exact schema:
|
|
97
|
+
|
|
98
|
+
### JSON
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"harness": "cc",
|
|
103
|
+
"timestamp": "2026-04-16T18:30:00+09:00",
|
|
104
|
+
"vibe_version": "2.9.24",
|
|
105
|
+
"install_dir": "/Users/grove/.claude",
|
|
106
|
+
"summary": {
|
|
107
|
+
"total": 42,
|
|
108
|
+
"passed": 40,
|
|
109
|
+
"failed": 2
|
|
110
|
+
},
|
|
111
|
+
"probes": {
|
|
112
|
+
"entrySkills": [
|
|
113
|
+
{ "name": "vibe.spec", "status": "pass" },
|
|
114
|
+
{ "name": "vibe.test", "status": "pass" }
|
|
115
|
+
],
|
|
116
|
+
"skills": [
|
|
117
|
+
{ "name": "test", "status": "pass" },
|
|
118
|
+
{ "name": "spec", "status": "fail", "error": "invocation includes `auto` but triggers array is empty" }
|
|
119
|
+
],
|
|
120
|
+
"hooks": [
|
|
121
|
+
{ "name": "pre-tool-guard", "status": "pass", "tests": "38/38" },
|
|
122
|
+
{ "name": "scope-guard", "status": "pass", "tests": "12/12" }
|
|
123
|
+
],
|
|
124
|
+
"agents": [
|
|
125
|
+
{ "name": "implementer", "status": "pass" }
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"failed": [
|
|
129
|
+
{
|
|
130
|
+
"category": "skills",
|
|
131
|
+
"name": "spec",
|
|
132
|
+
"error": "frontmatter: triggers array is empty"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- `status`: `"pass"` | `"fail"`
|
|
139
|
+
- `error`: required when `status === "fail"`, omitted otherwise
|
|
140
|
+
- `tests` (hooks only): short `passed/total` string from the vitest JSON reporter
|
|
141
|
+
- `failed[]`: flat list of every failure for quick scanning — mirrors entries found across `probes.*`
|
|
142
|
+
|
|
143
|
+
### Markdown
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
# vibe self-test · cc · 2026-04-16 18:30
|
|
147
|
+
|
|
148
|
+
**Version**: 2.9.24 **Install**: /Users/grove/.claude
|
|
149
|
+
|
|
150
|
+
| Category | Pass | Fail |
|
|
151
|
+
|---|---:|---:|
|
|
152
|
+
| entry skills | 15 | 0 |
|
|
153
|
+
| skills | 17 | 1 |
|
|
154
|
+
| hooks | 6 | 0 |
|
|
155
|
+
| agents | 3 | 1 |
|
|
156
|
+
| **total**| **41** | **2** |
|
|
157
|
+
|
|
158
|
+
## Failures
|
|
159
|
+
|
|
160
|
+
- **skills / spec** — invocation includes `auto` but triggers array is empty
|
|
161
|
+
- **agents / implementer** — agent file not found
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
If `failed` is empty, replace the Failures section with `_All probes passed._`.
|
|
165
|
+
|
|
166
|
+
## Steps
|
|
167
|
+
|
|
168
|
+
1. **Resolve target**: argument (`cc` / `codex` / empty). Empty → detect current harness (`$CLAUDE_PROJECT_DIR` set → `cc`; else fall back to `cc`).
|
|
169
|
+
2. **Resolve install dir**: `cc` → `~/.claude`, `codex` → `~/.codex`. If missing → print guidance + exit.
|
|
170
|
+
3. **Read `vibe_version`** from `package.json` in the current repo.
|
|
171
|
+
4. **Walk each category**, run its check, append `{ name, status, error? }` to `probes.<category>`.
|
|
172
|
+
5. **Compute** `summary` counts and the flat `failed[]` list.
|
|
173
|
+
6. **Ensure** `~/.vibe/test-reports/` exists (`mkdir -p`, dir mode `0o700` — consistent with `~/.vibe/config.json`).
|
|
174
|
+
7. **Write** `<ts>-<harness>.json` and `<ts>-<harness>.md`.
|
|
175
|
+
8. **Print** the Markdown summary to the console.
|
|
176
|
+
9. **If `summary.failed > 0`**, load skill `vibe.regress` with `subcommand: register --from-test` and pass the failed entries. P1 = any probe with `status: fail`.
|
|
177
|
+
|
|
178
|
+
## Done Criteria
|
|
179
|
+
|
|
180
|
+
- [ ] No external LLM call — file reads + vitest runs only
|
|
181
|
+
- [ ] One probe failing never halts the overall run
|
|
182
|
+
- [ ] Target install dir missing → clean exit with guidance (not an error)
|
|
183
|
+
- [ ] JSON report matches the template above exactly (fields, types, naming)
|
|
184
|
+
- [ ] Markdown summary printed to console after the run
|
|
185
|
+
- [ ] Reports land in `~/.vibe/test-reports/`, never in project-local `.vibe/`
|
|
186
|
+
- [ ] `failed.length > 0` → auto-invokes `vibe.regress register --from-test`
|
|
187
|
+
- [ ] Entry skills are verified as user-invocable skill surfaces, not deprecated command files
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: ui-ux-pro-max
|
|
2
|
+
name: vibe.ui-ux-pro-max
|
|
3
3
|
user-invocable: true
|
|
4
4
|
invocation: [command]
|
|
5
5
|
tier: standard
|
|
@@ -94,21 +94,21 @@ Extract from user request: **product type**, **style keywords**, **industry**, *
|
|
|
94
94
|
### Step 2: Generate Design System (REQUIRED)
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
python3 skills/ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system [-p "Project Name"]
|
|
97
|
+
python3 skills/vibe.ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system [-p "Project Name"]
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
This searches 5 domains in parallel (product, style, color, landing, typography), applies reasoning rules, and returns complete design system.
|
|
101
101
|
|
|
102
102
|
**Persist for cross-session use:**
|
|
103
103
|
```bash
|
|
104
|
-
python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name"
|
|
104
|
+
python3 skills/vibe.ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name"
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
Creates `design-system/MASTER.md` (global) + optional `design-system/pages/<page>.md` (overrides).
|
|
108
108
|
|
|
109
109
|
**With page-specific override:**
|
|
110
110
|
```bash
|
|
111
|
-
python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Name" --page "dashboard"
|
|
111
|
+
python3 skills/vibe.ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Name" --page "dashboard"
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
**Hierarchical retrieval**: Page file overrides Master. No page file → Master exclusively.
|
|
@@ -116,7 +116,7 @@ python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persi
|
|
|
116
116
|
### Step 3: Detailed Searches (as needed)
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
|
-
python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
|
|
119
|
+
python3 skills/vibe.ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
Domains: `product`, `style`, `typography`, `color`, `landing`, `chart`, `ux`, `react`, `web`, `prompt`
|
|
@@ -124,7 +124,7 @@ Domains: `product`, `style`, `typography`, `color`, `landing`, `chart`, `ux`, `r
|
|
|
124
124
|
### Step 4: Stack Guidelines (default: html-tailwind)
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
|
-
python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
|
|
127
|
+
python3 skills/vibe.ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
Stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`, `shadcn`, `jetpack-compose`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: user-personas
|
|
2
|
+
name: vibe.user-personas
|
|
3
3
|
invocation: [auto, chain]
|
|
4
4
|
tier: standard
|
|
5
5
|
description: "Create refined user personas from research data — 3 personas with JTBD, pains, gains, and unexpected insights."
|
|
6
6
|
triggers: [persona, user persona, user profile, user segment, user research]
|
|
7
7
|
priority: 50
|
|
8
|
-
chain-next: [create-prd, prioritization
|
|
8
|
+
chain-next: [vibe.create-prd, vibe.prioritization]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# User Personas
|
|
@@ -82,7 +82,7 @@ One row per Done criterion: pass/fail + an evidence pointer (file:line, test nam
|
|
|
82
82
|
Before printing the failure summary, register each failed scenario as a regression bug so the same failure cannot silently slip through again:
|
|
83
83
|
|
|
84
84
|
```
|
|
85
|
-
Load skill `regress` with:
|
|
85
|
+
Load skill `vibe.regress` with:
|
|
86
86
|
subcommand: register --from-verify
|
|
87
87
|
feature: {feature} scenario: {scenario}
|
|
88
88
|
error: {error-summary} location: {file:line}
|
|
@@ -95,7 +95,7 @@ Load skill `regress` with:
|
|
|
95
95
|
After all criteria pass, if `.vibe/contracts/{feature}.md` exists:
|
|
96
96
|
|
|
97
97
|
```
|
|
98
|
-
Load skill `contract` with: check "{feature}"
|
|
98
|
+
Load skill `vibe.contract` with: check "{feature}"
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
- No drift → verify still passes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: video-production
|
|
2
|
+
name: vibe.video-production
|
|
3
3
|
invocation: [auto]
|
|
4
4
|
tier: standard
|
|
5
5
|
description: "Video processing gotchas — FFmpeg commands, transcoding pipelines, HLS/DASH streaming setup, subtitle embedding (SRT/VTT), and thumbnail extraction. Use when the project involves any video manipulation, media processing, or streaming infrastructure. Covers codec selection, bitrate optimization, and common FFmpeg pitfalls. Must use this skill when user works with video files, mentions FFmpeg, or needs media processing — even for simple tasks like 'generate a thumbnail'."
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: arch-guard
|
|
3
|
-
user-invocable: false
|
|
4
|
-
invocation: [auto]
|
|
5
|
-
tier: core
|
|
6
|
-
description: "Generate import-rule tests that mechanically enforce architecture layer constraints (e.g., 'UI must not import DB') — for new modules, layer refactors, or circular dependencies."
|
|
7
|
-
triggers: [arch guard, architecture test, layer test, boundary test, structural test, arch validation, layer enforcement, dependency rules, architectural boundaries, circular dependency]
|
|
8
|
-
priority: 60
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Arch Guard — Architecture Boundary Test Generator
|
|
12
|
-
|
|
13
|
-
> **Principle**: "Mechanical enforcement over documentation." If a rule exists only in docs, it will be violated. Turn architecture constraints into failing tests.
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
|
|
17
|
-
| Scenario | Signal |
|
|
18
|
-
|----------|--------|
|
|
19
|
-
| `vibe init` / `vibe update` | Auto-generate for detected stack |
|
|
20
|
-
| New layer/module added | Boundaries need enforcement |
|
|
21
|
-
| Architecture violation found in review | Prevent recurrence with test |
|
|
22
|
-
| "Services should not import UI" type rules | Turn into automated check |
|
|
23
|
-
|
|
24
|
-
## Core Flow
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
DETECT → INFER → GENERATE → VERIFY
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Step 1: DETECT — Identify Project Architecture
|
|
31
|
-
|
|
32
|
-
Analyze the project to determine its layer structure:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
Parallel exploration:
|
|
36
|
-
- Agent 1: Scan directory structure (src/, app/, lib/, etc.)
|
|
37
|
-
- Agent 2: Read existing architecture docs (CLAUDE.md, README, ADR)
|
|
38
|
-
- Agent 3: Analyze import graph (which files import what)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**Common patterns to detect:**
|
|
42
|
-
|
|
43
|
-
| Pattern | Layers | Typical Stacks |
|
|
44
|
-
|---------|--------|----------------|
|
|
45
|
-
| MVC | Controller → Service → Model | Rails, NestJS, Spring |
|
|
46
|
-
| Clean Architecture | UI → Application → Domain → Infrastructure | General |
|
|
47
|
-
| Feature-based | Feature A ↛ Feature B internals | Next.js, React |
|
|
48
|
-
| Hexagonal | Adapters → Ports → Domain | DDD projects |
|
|
49
|
-
| Component hierarchy | Page → Feature → Shared → UI Primitives | Frontend |
|
|
50
|
-
|
|
51
|
-
### Step 2: INFER — Define Boundary Rules
|
|
52
|
-
|
|
53
|
-
From detected structure, generate rules:
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
// Rule format
|
|
57
|
-
interface ArchRule {
|
|
58
|
-
name: string; // "service-no-ui-import"
|
|
59
|
-
from: string; // Glob pattern: "src/services/**"
|
|
60
|
-
cannotImport: string[]; // ["src/components/**", "src/pages/**"]
|
|
61
|
-
canImport: string[]; // ["src/models/**", "src/utils/**"]
|
|
62
|
-
reason: string; // "Services must be UI-agnostic"
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**Default rules by stack:**
|
|
67
|
-
|
|
68
|
-
| Stack | Rule |
|
|
69
|
-
|-------|------|
|
|
70
|
-
| Next.js / React | `components/` cannot import from `pages/` or `app/` |
|
|
71
|
-
| Next.js / React | `lib/` cannot import from `components/` |
|
|
72
|
-
| NestJS | `*.service.ts` cannot import from `*.controller.ts` |
|
|
73
|
-
| NestJS | `*.module.ts` is the only valid cross-boundary import |
|
|
74
|
-
| General TS | `src/domain/` cannot import from `src/infra/` |
|
|
75
|
-
| General TS | No circular dependencies between top-level dirs |
|
|
76
|
-
| Python Django | `models.py` cannot import from `views.py` |
|
|
77
|
-
| Python FastAPI | `schemas/` cannot import from `routers/` |
|
|
78
|
-
|
|
79
|
-
### Step 3: GENERATE — Create Test File
|
|
80
|
-
|
|
81
|
-
Output: `tests/arch-guard.test.ts` (or equivalent for stack)
|
|
82
|
-
|
|
83
|
-
```typescript
|
|
84
|
-
/**
|
|
85
|
-
* Architecture Boundary Tests
|
|
86
|
-
* Generated by arch-guard skill
|
|
87
|
-
*
|
|
88
|
-
* These tests enforce architectural constraints mechanically.
|
|
89
|
-
* If a test fails, it means an import violates the intended architecture.
|
|
90
|
-
*/
|
|
91
|
-
import { describe, it, expect } from 'vitest';
|
|
92
|
-
import fs from 'fs';
|
|
93
|
-
import path from 'path';
|
|
94
|
-
|
|
95
|
-
// Helper: extract imports from a file
|
|
96
|
-
function extractImports(filePath: string): string[] {
|
|
97
|
-
const content = fs.readFileSync(filePath, 'utf-8');
|
|
98
|
-
const importRegex = /(?:import|require)\s*\(?['"]([^'"]+)['"]\)?/g;
|
|
99
|
-
const imports: string[] = [];
|
|
100
|
-
let match;
|
|
101
|
-
while ((match = importRegex.exec(content)) !== null) {
|
|
102
|
-
imports.push(match[1]);
|
|
103
|
-
}
|
|
104
|
-
return imports;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Helper: resolve relative import to absolute path
|
|
108
|
-
function resolveImport(fromFile: string, importPath: string): string {
|
|
109
|
-
if (importPath.startsWith('.')) {
|
|
110
|
-
return path.resolve(path.dirname(fromFile), importPath);
|
|
111
|
-
}
|
|
112
|
-
return importPath; // external package
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// Helper: glob files matching pattern
|
|
116
|
-
function globFiles(pattern: string, baseDir: string): string[] {
|
|
117
|
-
// Use fast-glob or manual recursive scan
|
|
118
|
-
// Implementation depends on available dependencies
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
describe('Architecture Boundaries', () => {
|
|
122
|
-
// GENERATED RULES GO HERE
|
|
123
|
-
// Each rule becomes a test case:
|
|
124
|
-
|
|
125
|
-
it('services cannot import UI components', () => {
|
|
126
|
-
const serviceFiles = globFiles('src/services/**/*.ts', process.cwd());
|
|
127
|
-
const violations: string[] = [];
|
|
128
|
-
|
|
129
|
-
for (const file of serviceFiles) {
|
|
130
|
-
const imports = extractImports(file);
|
|
131
|
-
for (const imp of imports) {
|
|
132
|
-
const resolved = resolveImport(file, imp);
|
|
133
|
-
if (resolved.includes('/components/') || resolved.includes('/pages/')) {
|
|
134
|
-
violations.push(`${file} imports ${imp}`);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
expect(violations).toEqual([]);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Step 4: VERIFY — Run and Fix
|
|
145
|
-
|
|
146
|
-
1. Run the generated tests: `npx vitest run tests/arch-guard.test.ts`
|
|
147
|
-
2. If violations found:
|
|
148
|
-
- Report each violation with file:line
|
|
149
|
-
- Suggest fix (move shared code to appropriate layer)
|
|
150
|
-
- Do NOT auto-fix — violations need human review
|
|
151
|
-
|
|
152
|
-
## Output Files
|
|
153
|
-
|
|
154
|
-
| File | Purpose |
|
|
155
|
-
|------|---------|
|
|
156
|
-
| `tests/arch-guard.test.ts` | Executable boundary tests |
|
|
157
|
-
| `.vibe/arch-rules.json` | Machine-readable rules (for CI) |
|
|
158
|
-
|
|
159
|
-
## Customization
|
|
160
|
-
|
|
161
|
-
Users can add custom rules to `.vibe/arch-rules.json`:
|
|
162
|
-
|
|
163
|
-
```json
|
|
164
|
-
{
|
|
165
|
-
"rules": [
|
|
166
|
-
{
|
|
167
|
-
"name": "no-direct-db-in-handlers",
|
|
168
|
-
"from": "src/handlers/**",
|
|
169
|
-
"cannotImport": ["src/db/**"],
|
|
170
|
-
"reason": "Handlers must use services, not direct DB access"
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
The test generator reads this file and adds custom rules to the test suite.
|
|
177
|
-
|
|
178
|
-
## Integration
|
|
179
|
-
|
|
180
|
-
- `vibe init` → auto-detect and generate initial arch-guard tests
|
|
181
|
-
- `vibe update` → refresh rules if directory structure changed
|
|
182
|
-
- Pre-commit hook → run arch-guard tests before commit
|
|
183
|
-
- `vibe.review` (skill) → code-reviewer (focus: architecture) checks against arch-rules.json
|