@su-record/vibe 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CLAUDE.md +2 -2
  2. package/README.en.md +6 -4
  3. package/README.md +5 -3
  4. package/dist/__tests__/wiring-integrity.test.d.ts +2 -0
  5. package/dist/__tests__/wiring-integrity.test.d.ts.map +1 -0
  6. package/dist/__tests__/wiring-integrity.test.js +160 -0
  7. package/dist/__tests__/wiring-integrity.test.js.map +1 -0
  8. package/dist/cli/commands/info.d.ts.map +1 -1
  9. package/dist/cli/commands/info.js +2 -1
  10. package/dist/cli/commands/info.js.map +1 -1
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/commands/init.js +4 -2
  13. package/dist/cli/commands/init.js.map +1 -1
  14. package/dist/cli/index.js +102 -128
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
  17. package/dist/cli/postinstall/claude-agents.js +0 -5
  18. package/dist/cli/postinstall/claude-agents.js.map +1 -1
  19. package/dist/cli/postinstall/constants.d.ts +6 -0
  20. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  21. package/dist/cli/postinstall/constants.js +42 -60
  22. package/dist/cli/postinstall/constants.js.map +1 -1
  23. package/dist/cli/postinstall/inline-skills.js +2 -2
  24. package/dist/cli/postinstall/inline-skills.js.map +1 -1
  25. package/dist/cli/postinstall/main.d.ts.map +1 -1
  26. package/dist/cli/postinstall/main.js +2 -0
  27. package/dist/cli/postinstall/main.js.map +1 -1
  28. package/dist/cli/postinstall.d.ts +6 -1
  29. package/dist/cli/postinstall.d.ts.map +1 -1
  30. package/dist/cli/postinstall.js +6 -1
  31. package/dist/cli/postinstall.js.map +1 -1
  32. package/dist/cli/setup/GlobalInstaller.d.ts +1 -15
  33. package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
  34. package/dist/cli/setup/GlobalInstaller.js +16 -115
  35. package/dist/cli/setup/GlobalInstaller.js.map +1 -1
  36. package/dist/cli/setup/GlobalInstaller.test.d.ts +2 -0
  37. package/dist/cli/setup/GlobalInstaller.test.d.ts.map +1 -0
  38. package/dist/cli/setup/GlobalInstaller.test.js +16 -0
  39. package/dist/cli/setup/GlobalInstaller.test.js.map +1 -0
  40. package/dist/cli/setup/ProjectSetup.js +2 -2
  41. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  42. package/dist/cli/setup.d.ts +1 -1
  43. package/dist/cli/setup.d.ts.map +1 -1
  44. package/dist/cli/setup.js +1 -1
  45. package/dist/cli/setup.js.map +1 -1
  46. package/dist/infra/lib/SkillRepository.js +1 -1
  47. package/dist/infra/lib/evolution/__tests__/integration.test.js +0 -42
  48. package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
  49. package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -3
  50. package/hooks/scripts/__tests__/clone-behaviors.test.js +33 -1
  51. package/hooks/scripts/__tests__/code-check-memory-write.test.js +81 -0
  52. package/hooks/scripts/__tests__/step-counter.test.js +21 -0
  53. package/hooks/scripts/auto-format.js +2 -11
  54. package/hooks/scripts/auto-test.js +2 -11
  55. package/hooks/scripts/clone-extract.js +146 -10
  56. package/hooks/scripts/code-check.js +27 -55
  57. package/hooks/scripts/lib/glob.js +32 -0
  58. package/hooks/scripts/lib/hook-context.js +19 -2
  59. package/hooks/scripts/post-edit.js +2 -3
  60. package/hooks/scripts/prompt-dispatcher.js +1 -1
  61. package/hooks/scripts/scope-guard.js +3 -42
  62. package/hooks/scripts/sentinel-guard.js +5 -20
  63. package/hooks/scripts/session-start.js +2 -2
  64. package/hooks/scripts/step-counter.js +35 -57
  65. package/package.json +2 -3
  66. package/skills/clone/SKILL.md +10 -216
  67. package/skills/clone/references/capture-rules.md +48 -0
  68. package/skills/clone/references/legal-and-error-recovery.md +40 -0
  69. package/skills/clone/references/refine-rules.md +61 -0
  70. package/skills/clone/references/scaffold-phases.md +59 -0
  71. package/skills/clone/references/setup-and-layout.md +30 -0
  72. package/skills/docs/SKILL.md +39 -4
  73. package/skills/docs/references/api-docs-changelog.md +34 -0
  74. package/skills/docs/references/codemaps-output.md +23 -0
  75. package/{agents/diagrammer.md → skills/docs/references/diagram-spec.md} +2 -15
  76. package/skills/exec-plan/SKILL.md +1 -1
  77. package/skills/exec-plan/templates/plan.md +1 -1
  78. package/skills/handoff/SKILL.md +3 -3
  79. package/skills/handoff/templates/handoff.md +1 -1
  80. package/skills/vibe/SKILL.md +3 -2
  81. package/skills/vibe.analyze/SKILL.md +12 -249
  82. package/skills/vibe.analyze/references/output-templates.md +188 -0
  83. package/skills/vibe.analyze/references/quality-gate.md +93 -0
  84. package/skills/vibe.clone/SKILL.md +14 -1
  85. package/skills/vibe.continue/SKILL.md +32 -0
  86. package/skills/vibe.design/SKILL.md +23 -1
  87. package/skills/vibe.design/references/ui-preview.md +20 -0
  88. package/skills/vibe.docs/SKILL.md +4 -2
  89. package/skills/vibe.figma/SKILL.md +33 -260
  90. package/skills/vibe.figma/references/branch-phases.md +113 -0
  91. package/skills/vibe.figma/references/state-schema.md +42 -0
  92. package/skills/vibe.figma/references/step-algorithms.md +204 -0
  93. package/skills/vibe.image/SKILL.md +62 -0
  94. package/skills/vibe.image/references/image-generation-examples.md +39 -0
  95. package/skills/vibe.reason/SKILL.md +3 -183
  96. package/skills/vibe.reason/references/output-format-template.md +57 -0
  97. package/skills/vibe.reason/references/quality-rubrics.md +94 -0
  98. package/skills/vibe.reason/references/worked-example.md +45 -0
  99. package/skills/vibe.review/SKILL.md +13 -348
  100. package/skills/vibe.review/references/boundary-check.md +25 -0
  101. package/skills/vibe.review/references/output-template.md +74 -0
  102. package/skills/vibe.review/references/quality-gate.md +84 -0
  103. package/skills/vibe.review/references/race-mode.md +117 -0
  104. package/skills/vibe.review/references/worked-examples.md +94 -0
  105. package/vibe/templates/claudemd-template.md +1 -1
  106. package/agents/acceptance-tester.md +0 -56
  107. package/agents/documenter.md +0 -43
  108. package/agents/figma/figma-engineer.md +0 -76
  109. package/dist/cli/postinstall/index.d.ts +0 -23
  110. package/dist/cli/postinstall/index.d.ts.map +0 -1
  111. package/dist/cli/postinstall/index.js +0 -23
  112. package/dist/cli/postinstall/index.js.map +0 -1
  113. package/dist/cli/setup/index.d.ts +0 -9
  114. package/dist/cli/setup/index.d.ts.map +0 -1
  115. package/dist/cli/setup/index.js +0 -12
  116. package/dist/cli/setup/index.js.map +0 -1
  117. package/hooks/scripts/__tests__/.vibe/memories/memories.db +0 -0
  118. package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
  119. package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
  120. package/hooks/scripts/evolution-engine.js +0 -91
  121. package/hooks/scripts/hud-status.js +0 -321
  122. package/hooks/scripts/skill-injector.js +0 -83
  123. package/skills/vibe.utils/SKILL.md +0 -415
@@ -1,19 +1,6 @@
1
- # Diagrammer Agent
1
+ # docs — Diagram Generation Spec
2
2
 
3
- Diagram generation specialistrenders architecture, data models, and flows
4
- as Mermaid.
5
-
6
- ## Role
7
-
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
-
12
- ## Model
13
-
14
- **Haiku** — fast, structured output
15
-
16
- ## Goal
3
+ > Loaded by docs SKILL.md `diagram` mode Mermaid diagram generation rules (architecture, ERD, flowcharts, sequence).
17
4
 
18
5
  Produce a Mermaid diagram that reflects the actual code, not a generic
19
6
  picture. Ground it in sources first: folder structure and imports for
@@ -129,7 +129,7 @@ Ready to execute:
129
129
  /vibe.run "{feature-name}" ultrawork
130
130
 
131
131
  Or hand off to new session:
132
- /vibe.utils --continue
132
+ /vibe.continue
133
133
  → Load: .vibe/specs/{feature-name}-execplan.md
134
134
  ```
135
135
 
@@ -144,4 +144,4 @@ save_memory("execplan-{{FEATURE_NAME}}", {
144
144
  })
145
145
  ```
146
146
 
147
- Resume: `/vibe.utils --continue` → load this file.
147
+ Resume: `/vibe.continue` → load this file.
@@ -16,9 +16,9 @@ Record work status before session end so the next session can pick up immediatel
16
16
 
17
17
  A file that records the current work status before context reset. Reading this file in a new session allows immediate continuation.
18
18
 
19
- ### Difference from `/vibe.utils --continue`
19
+ ### Difference from `/vibe.continue`
20
20
 
21
- | Item | `/vibe.utils --continue` | Handoff |
21
+ | Item | `/vibe.continue` | Handoff |
22
22
  |------|--------------------------|---------|
23
23
  | Method | Automatic session context restore | Manual handover document |
24
24
  | Includes | Memory + session state | Work progress + notes + file list |
@@ -98,7 +98,7 @@ Read HANDOFF.md and continue working
98
98
  Or use alongside VIBE auto-restore:
99
99
 
100
100
  ```
101
- /vibe.utils --continue
101
+ /vibe.continue
102
102
  ```
103
103
 
104
104
  In this case, saved decisions are also restored via `core_recall_memory`.
@@ -86,7 +86,7 @@ Last commit: `{{LAST_COMMIT_HASH}}` — {{LAST_COMMIT_MESSAGE}}
86
86
 
87
87
  ```bash
88
88
  # 1. Load context
89
- /vibe.utils --continue
89
+ /vibe.continue
90
90
 
91
91
  # 2. Read this file if context is missing
92
92
  # cat HANDOFF.md
@@ -64,13 +64,14 @@ user-invocable: true
64
64
  | **regression fix** | "회귀", "테스트 깨졌", "다시 통과" | regress → run → verify |
65
65
  | **contract drift** | "API 변경", "계약 깨졌", "스펙 불일치" | contract → regress (P1만) |
66
66
  | **scaffold** | "프로젝트 만들기", "셋업", "초기 구조" | scaffold |
67
- | **docs sync** | "문서 갱신", "README", "AGENTS.md" | docs |
67
+ | **docs sync** | "문서 갱신", "README", "AGENTS.md", "다이어그램", "코드맵" | docs (diagram/codemaps 의도 포함) |
68
68
  | **analyze** | "분석", "조사", "이건 뭐야" + 파일/URL | analyze |
69
69
  | **reason** | "추론", "깊게 생각", "트레이드오프", "어떻게 접근" 등 복잡한 사고 요청 | reason |
70
70
  | **event** | "이벤트", "커뮤니티", "D-Day", "행사 자동화" | event |
71
71
  | **harness check** | "하네스", "환경 점검" | harness |
72
72
  | **test self** | "vibe 테스트", "CC ↔ Codex 비교" | test |
73
- | **utils** | "이어서", "메모리", "체크포인트" | utils |
73
+ | **session continue** | "이어서", "메모리", "체크포인트" | continue |
74
+ | **image generation** | "이미지 생성", "아이콘", "배너", "목업 이미지" | image |
74
75
 
75
76
  복수 의도면 우선순위: resume > figma-driven > new feature > 기타.
76
77
 
@@ -75,15 +75,9 @@ Extract keywords from the user request:
75
75
 
76
76
  #### 2. Understand Project Structure
77
77
 
78
- Read `CLAUDE.md`, `package.json`, `pyproject.toml`, etc. to identify tech stack:
78
+ Read `CLAUDE.md`, `package.json`, `pyproject.toml`, etc. to identify tech stack.
79
79
 
80
- **Backend:**
81
- - FastAPI/Django: `app/api/`, `app/services/`, `app/models/`
82
- - Express/NestJS: `src/controllers/`, `src/services/`, `src/models/`
83
-
84
- **Frontend:**
85
- - React/Next.js: `src/components/`, `src/pages/`, `src/hooks/`
86
- - Flutter: `lib/screens/`, `lib/services/`, `lib/providers/`
80
+ > Read `references/output-templates.md` for the full backend/frontend stack → directory mapping.
87
81
 
88
82
  #### 3. Explore Related Code (Parallel Sub-Agents)
89
83
 
@@ -105,15 +99,7 @@ Agent(subagent_type="Explore", model="haiku",
105
99
  prompt="Find all [FEATURE] related data models, schemas, and database queries. Document relationships and key fields.")
106
100
  ```
107
101
 
108
- **Scale for large projects (6+ related files):**
109
-
110
- ```text
111
- Agent(subagent_type="Explore", model="haiku",
112
- prompt="Find all test files related to [FEATURE]. Identify tested vs untested paths.")
113
-
114
- Agent(subagent_type="Explore", model="haiku",
115
- prompt="Analyze [FEATURE] configuration, environment variables, and external integrations.")
116
- ```
102
+ > Read `references/output-templates.md` for the additional "Scale for large projects (6+ related files)" agent prompts.
117
103
 
118
104
  **After all agents return:**
119
105
  - Synthesize results → proceed to Flow Analysis
@@ -138,62 +124,13 @@ Agent(subagent_type="Explore", model="haiku",
138
124
 
139
125
  #### 5. Output
140
126
 
141
- ```markdown
142
- ## [feature-name] Analysis Results
143
-
144
- ### Overview
145
- - **Feature**: [one-line summary]
146
- - **Status**: [Complete / In progress / Not implemented]
147
- - **Files**: N related files
148
-
149
- ### Structure
150
-
151
- #### API Endpoints
152
- | Method | Path | Description | Auth |
153
- |--------|------|-------------|------|
154
- | POST | /api/v1/auth/login | User login | None |
155
-
156
- #### Core Services
157
- - `auth_service.py`: Authentication logic
158
- - `login()`: Processes login
159
- - `verify_token()`: Validates JWT
160
-
161
- #### Data Models
162
- - `User`: User table
163
- - Key fields: id, email, password_hash
164
- - Relationships: Session (1:N)
165
-
166
- ### Reference Files
167
- - src/api/auth/router.py:L10-50
168
- - src/services/auth_service.py:L1-100
169
- ```
127
+ > Read `references/output-templates.md` for the full Mode 1 output format.
170
128
 
171
129
  #### 6. Next Steps
172
130
 
173
- After analysis, suggest mode-specific follow-up actions:
174
-
175
- **After code/feature analysis:**
176
-
177
- | Task Scope | Approach |
178
- |------------|----------|
179
- | Simple fix (1-2 files) | Plan Mode |
180
- | Complex feature (3+ files) | `/vibe.spec` |
181
-
182
- **After document analysis:**
183
-
184
- | Goal | Approach |
185
- |------|----------|
186
- | Apply findings to project | `/vibe.spec "feature-name"` |
187
- | Derive improvement direction | Plan Mode |
188
- | Compare with another source | `/vibe.analyze [other target]` |
131
+ After analysis, suggest mode-specific follow-up actions.
189
132
 
190
- **After website analysis:**
191
-
192
- | Goal | Approach |
193
- |------|----------|
194
- | Build similar product | `/vibe.spec` |
195
- | Improve existing UI | `/vibe.figma` |
196
- | Compare with another site | `/vibe.analyze [other URL]` |
133
+ > Read `references/output-templates.md` for the full Next Steps decision tables (code/feature, document, website).
197
134
 
198
135
  Wait for user's choice before proceeding.
199
136
 
@@ -218,13 +155,7 @@ Analyze document **structure, key content, quality, and applicability** to:
218
155
 
219
156
  #### 2. Classify Document Type
220
157
 
221
- | Type | Analysis Focus |
222
- |------|---------------|
223
- | Technical spec | API definitions, data models, sequence diagrams |
224
- | Presentation/slides | Key claims, frameworks, case studies |
225
- | PRD/requirements | User stories, acceptance criteria, scope |
226
- | Business document | Strategy, decision points, action items |
227
- | Research/academic | Methodology, conclusions, applicability |
158
+ > Read `references/output-templates.md` for the full document-type → analysis-focus table.
228
159
 
229
160
  #### 3. Analyze Content (Parallel Sub-Agents)
230
161
 
@@ -244,33 +175,7 @@ Agent(subagent_type="general-purpose", model="haiku",
244
175
 
245
176
  #### 5. Output
246
177
 
247
- ```markdown
248
- ## [Document Name] Analysis
249
-
250
- ### Overview
251
- - **Type**: [Presentation / Technical spec / PRD / ...]
252
- - **Topic**: [one-line summary]
253
- - **Pages/Sections**: N
254
- - **Audience**: [Developers / PMs / Executives / ...]
255
-
256
- ### Key Content
257
- 1. **[Concept 1]**: Description
258
- 2. **[Concept 2]**: Description
259
-
260
- ### Frameworks/Models (if any)
261
- - [Systematic structure presented in the document]
262
-
263
- ### Project Relevance
264
- | Recommendation | Current State | Gap |
265
- |----------------|---------------|-----|
266
- | ... | ... | ... |
267
-
268
- ### Key Insights
269
- - [Most important takeaway]
270
-
271
- ### Suggested Actions
272
- 1. ...
273
- ```
178
+ > Read `references/output-templates.md` for the full Mode 2 output format.
274
179
 
275
180
  #### Fallback
276
181
 
@@ -319,40 +224,7 @@ If a Figma URL is detected, switch to **Figma-specific analysis**:
319
224
 
320
225
  #### 4. Output
321
226
 
322
- ```markdown
323
- ## [URL] Analysis
324
-
325
- ### Overview
326
- - **Site type**: [SaaS / E-commerce / Portfolio / ...]
327
- - **Tech stack**: [Next.js, Tailwind, ...]
328
- - **Overall score**: N/100
329
-
330
- ### Technical Analysis
331
- | Area | Detection | Details |
332
- |------|-----------|---------|
333
- | Framework | React/Next.js | SSR enabled |
334
- | CSS | Tailwind CSS | v3.4 |
335
-
336
- ### UX/UI Analysis
337
- - **Navigation**: [assessment]
338
- - **CTA placement**: [assessment]
339
- - **Responsive design**: [assessment]
340
-
341
- ### SEO Analysis (N/100)
342
- | Element | Status | Recommendation |
343
- |---------|--------|----------------|
344
- | Title | Present | Appropriate length |
345
- | Meta Description | Missing | Add description |
346
-
347
- ### Accessibility (WCAG 2.1 AA)
348
- - **Semantic HTML**: [assessment]
349
- - **Keyboard navigation**: [assessment]
350
- - **Screen reader support**: [assessment]
351
-
352
- ### Improvement Suggestions
353
- 1. [highest priority]
354
- 2. ...
355
- ```
227
+ > Read `references/output-templates.md` for the full Mode 3 output format.
356
228
 
357
229
  #### Fallback
358
230
 
@@ -393,30 +265,7 @@ If `WebFetch` fails:
393
265
 
394
266
  Save to `.vibe/reports/analysis-{date}.md`:
395
267
 
396
- ```markdown
397
- # Project Analysis Report
398
-
399
- ## Overview
400
- - Analysis date: YYYY-MM-DD HH:MM
401
- - Scope: Full / Code / Deps / Arch
402
-
403
- ## Code Quality (N/100)
404
- - Average complexity: N (good/warning/critical)
405
- - High complexity files: N
406
-
407
- ## Dependencies (N/100)
408
- - Total packages: N
409
- - Updates needed: N
410
- - Security issues: N
411
-
412
- ## Architecture (N/100)
413
- - Circular dependencies: N found
414
- - Layer violations: N
415
-
416
- ## Improvement Suggestions
417
- 1. ...
418
- 2. ...
419
- ```
268
+ > Read `references/output-templates.md` for the full Mode 4 report format.
420
269
 
421
270
  ## Core Tools (Semantic Analysis)
422
271
 
@@ -438,95 +287,9 @@ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index
438
287
 
439
288
  ## Quality Gate (Mandatory)
440
289
 
441
- ### Mode-Specific Checklists
442
-
443
- **Code/Feature Analysis:**
444
-
445
- | Category | Check Item | Weight |
446
- |----------|------------|--------|
447
- | Completeness | All related files identified | 20% |
448
- | Completeness | All API endpoints documented | 15% |
449
- | Completeness | All data models mapped | 15% |
450
- | Accuracy | File paths verified to exist | 10% |
451
- | Accuracy | Line numbers accurate | 10% |
452
- | Depth | Business logic explained | 10% |
453
- | Depth | Dependencies mapped | 10% |
454
- | Actionability | Next steps clearly defined | 10% |
455
-
456
- **Document Analysis:**
457
-
458
- | Category | Check Item | Weight |
459
- |----------|------------|--------|
460
- | Completeness | Full document read | 20% |
461
- | Completeness | All key concepts extracted | 20% |
462
- | Structure | Section structure identified | 15% |
463
- | Depth | Project relevance analyzed | 15% |
464
- | Depth | Gap analysis performed | 15% |
465
- | Actionability | Specific follow-up actions suggested | 15% |
466
-
467
- **Website Analysis:**
468
-
469
- | Category | Check Item | Weight |
470
- |----------|------------|--------|
471
- | Completeness | HTML fetched and parsed | 15% |
472
- | Tech | Tech stack identified | 15% |
473
- | UX | UX/UI patterns analyzed | 15% |
474
- | SEO | SEO elements inspected | 15% |
475
- | A11y | Accessibility checked | 15% |
476
- | Performance | Performance hints analyzed | 10% |
477
- | Actionability | Improvements suggested | 15% |
478
-
479
- ### Score Calculation
480
-
481
- ```
482
- Score = sum(checked items * weight) / 100
483
-
484
- Grades:
485
- - 95-100: EXCELLENT — comprehensive analysis
486
- - 90-94: GOOD — minor gaps, additional exploration recommended
487
- - 80-89: FAIR — needs deeper exploration
488
- - 0-79: POOR — incomplete, re-analyze
489
- ```
490
-
491
- ### Depth Levels
492
-
493
- | Level | Scope | Output |
494
- |-------|-------|--------|
495
- | L1: Surface | File names, basic structure | File list |
496
- | L2: Structure | Functions, classes, imports | Structure map |
497
- | L3: Logic | Business logic, data flow | Flow analysis |
498
- | L4: Deep | Edge cases, dependencies, risks | Full analysis |
499
-
500
- **Minimum**: L3 for feature analysis, L2 for project overview.
501
-
502
- ### Forbidden Patterns
503
-
504
- | Pattern | Problem | Fix |
505
- |---------|---------|-----|
506
- | "and more..." | Incomplete | List all items |
507
- | "etc." | Vague | Be specific |
508
- | "related files" without paths | Missing detail | Provide file paths |
509
- | Missing line numbers | Hard to navigate | Use `:L10-50` format |
510
- | No auth info on endpoints | Security gap | Always specify auth |
511
-
512
- ### Quality Thresholds
513
-
514
- **Code (`--code`):**
515
-
516
- | Metric | Good | Warning | Critical |
517
- |--------|------|---------|----------|
518
- | Avg Complexity | ≤10 | 11-15 | >15 |
519
- | Max Function Length | ≤30 | 31-50 | >50 |
520
- | High Complexity Files | 0 | 1-3 | >3 |
521
- | Circular Dependencies | 0 | 1 | >1 |
522
-
523
- **Dependencies (`--deps`):**
290
+ Each mode has a weighted completeness checklist. Score = sum(checked items × weight) / 100. **Minimum depth: L3 for feature analysis, L2 for project overview.**
524
291
 
525
- | Metric | Good | Warning | Critical |
526
- |--------|------|---------|----------|
527
- | Outdated Packages | 0-3 | 4-10 | >10 |
528
- | Security Vulnerabilities | 0 | 1-2 (low) | Any high/critical |
529
- | Major Version Behind | 0 | 1-2 | >2 |
292
+ > Read `references/quality-gate.md` for the full mode-specific weighted checklists, score grades, depth-level table, forbidden-patterns table, and quality thresholds (code/deps).
530
293
 
531
294
  ---
532
295
 
@@ -0,0 +1,188 @@
1
+ # Analyze Output Templates — Full Reference
2
+
3
+ > Loaded by vibe.analyze SKILL.md for the Mode 1–4 output formats, the Mode 1 Next Steps decision tables, the Mode 1 stack directory mapping, and the Mode 2 document-type table.
4
+
5
+ ## Mode 1: Project Structure — Stack Directory Mapping
6
+
7
+ **Backend:**
8
+ - FastAPI/Django: `app/api/`, `app/services/`, `app/models/`
9
+ - Express/NestJS: `src/controllers/`, `src/services/`, `src/models/`
10
+
11
+ **Frontend:**
12
+ - React/Next.js: `src/components/`, `src/pages/`, `src/hooks/`
13
+ - Flutter: `lib/screens/`, `lib/services/`, `lib/providers/`
14
+
15
+ ## Mode 1: Scale for Large Projects (6+ related files) — Additional Agent Prompts
16
+
17
+ ```text
18
+ Agent(subagent_type="Explore", model="haiku",
19
+ prompt="Find all test files related to [FEATURE]. Identify tested vs untested paths.")
20
+
21
+ Agent(subagent_type="Explore", model="haiku",
22
+ prompt="Analyze [FEATURE] configuration, environment variables, and external integrations.")
23
+ ```
24
+
25
+ ## Mode 1: Feature/Module Analysis — Output
26
+
27
+ ```markdown
28
+ ## [feature-name] Analysis Results
29
+
30
+ ### Overview
31
+ - **Feature**: [one-line summary]
32
+ - **Status**: [Complete / In progress / Not implemented]
33
+ - **Files**: N related files
34
+
35
+ ### Structure
36
+
37
+ #### API Endpoints
38
+ | Method | Path | Description | Auth |
39
+ |--------|------|-------------|------|
40
+ | POST | /api/v1/auth/login | User login | None |
41
+
42
+ #### Core Services
43
+ - `auth_service.py`: Authentication logic
44
+ - `login()`: Processes login
45
+ - `verify_token()`: Validates JWT
46
+
47
+ #### Data Models
48
+ - `User`: User table
49
+ - Key fields: id, email, password_hash
50
+ - Relationships: Session (1:N)
51
+
52
+ ### Reference Files
53
+ - src/api/auth/router.py:L10-50
54
+ - src/services/auth_service.py:L1-100
55
+ ```
56
+
57
+ ## Mode 1: Next Steps — Decision Tables
58
+
59
+ After analysis, suggest mode-specific follow-up actions:
60
+
61
+ **After code/feature analysis:**
62
+
63
+ | Task Scope | Approach |
64
+ |------------|----------|
65
+ | Simple fix (1-2 files) | Plan Mode |
66
+ | Complex feature (3+ files) | `/vibe.spec` |
67
+
68
+ **After document analysis:**
69
+
70
+ | Goal | Approach |
71
+ |------|----------|
72
+ | Apply findings to project | `/vibe.spec "feature-name"` |
73
+ | Derive improvement direction | Plan Mode |
74
+ | Compare with another source | `/vibe.analyze [other target]` |
75
+
76
+ **After website analysis:**
77
+
78
+ | Goal | Approach |
79
+ |------|----------|
80
+ | Build similar product | `/vibe.spec` |
81
+ | Improve existing UI | `/vibe.figma` |
82
+ | Compare with another site | `/vibe.analyze [other URL]` |
83
+
84
+ ## Mode 2: Classify Document Type
85
+
86
+ | Type | Analysis Focus |
87
+ |------|---------------|
88
+ | Technical spec | API definitions, data models, sequence diagrams |
89
+ | Presentation/slides | Key claims, frameworks, case studies |
90
+ | PRD/requirements | User stories, acceptance criteria, scope |
91
+ | Business document | Strategy, decision points, action items |
92
+ | Research/academic | Methodology, conclusions, applicability |
93
+
94
+ ## Mode 2: Document Analysis — Output
95
+
96
+ ```markdown
97
+ ## [Document Name] Analysis
98
+
99
+ ### Overview
100
+ - **Type**: [Presentation / Technical spec / PRD / ...]
101
+ - **Topic**: [one-line summary]
102
+ - **Pages/Sections**: N
103
+ - **Audience**: [Developers / PMs / Executives / ...]
104
+
105
+ ### Key Content
106
+ 1. **[Concept 1]**: Description
107
+ 2. **[Concept 2]**: Description
108
+
109
+ ### Frameworks/Models (if any)
110
+ - [Systematic structure presented in the document]
111
+
112
+ ### Project Relevance
113
+ | Recommendation | Current State | Gap |
114
+ |----------------|---------------|-----|
115
+ | ... | ... | ... |
116
+
117
+ ### Key Insights
118
+ - [Most important takeaway]
119
+
120
+ ### Suggested Actions
121
+ 1. ...
122
+ ```
123
+
124
+ ## Mode 3: Website Analysis — Output
125
+
126
+ ```markdown
127
+ ## [URL] Analysis
128
+
129
+ ### Overview
130
+ - **Site type**: [SaaS / E-commerce / Portfolio / ...]
131
+ - **Tech stack**: [Next.js, Tailwind, ...]
132
+ - **Overall score**: N/100
133
+
134
+ ### Technical Analysis
135
+ | Area | Detection | Details |
136
+ |------|-----------|---------|
137
+ | Framework | React/Next.js | SSR enabled |
138
+ | CSS | Tailwind CSS | v3.4 |
139
+
140
+ ### UX/UI Analysis
141
+ - **Navigation**: [assessment]
142
+ - **CTA placement**: [assessment]
143
+ - **Responsive design**: [assessment]
144
+
145
+ ### SEO Analysis (N/100)
146
+ | Element | Status | Recommendation |
147
+ |---------|--------|----------------|
148
+ | Title | Present | Appropriate length |
149
+ | Meta Description | Missing | Add description |
150
+
151
+ ### Accessibility (WCAG 2.1 AA)
152
+ - **Semantic HTML**: [assessment]
153
+ - **Keyboard navigation**: [assessment]
154
+ - **Screen reader support**: [assessment]
155
+
156
+ ### Improvement Suggestions
157
+ 1. [highest priority]
158
+ 2. ...
159
+ ```
160
+
161
+ ## Mode 4: Project Quality Analysis — Report
162
+
163
+ Save to `.vibe/reports/analysis-{date}.md`:
164
+
165
+ ```markdown
166
+ # Project Analysis Report
167
+
168
+ ## Overview
169
+ - Analysis date: YYYY-MM-DD HH:MM
170
+ - Scope: Full / Code / Deps / Arch
171
+
172
+ ## Code Quality (N/100)
173
+ - Average complexity: N (good/warning/critical)
174
+ - High complexity files: N
175
+
176
+ ## Dependencies (N/100)
177
+ - Total packages: N
178
+ - Updates needed: N
179
+ - Security issues: N
180
+
181
+ ## Architecture (N/100)
182
+ - Circular dependencies: N found
183
+ - Layer violations: N
184
+
185
+ ## Improvement Suggestions
186
+ 1. ...
187
+ 2. ...
188
+ ```
@@ -0,0 +1,93 @@
1
+ # Analyze Quality Gate — Full Reference
2
+
3
+ > Loaded by vibe.analyze SKILL.md for the mode-specific weighted checklists, score calculation, depth levels, forbidden-patterns table, and quality thresholds.
4
+
5
+ ### Mode-Specific Checklists
6
+
7
+ **Code/Feature Analysis:**
8
+
9
+ | Category | Check Item | Weight |
10
+ |----------|------------|--------|
11
+ | Completeness | All related files identified | 20% |
12
+ | Completeness | All API endpoints documented | 15% |
13
+ | Completeness | All data models mapped | 15% |
14
+ | Accuracy | File paths verified to exist | 10% |
15
+ | Accuracy | Line numbers accurate | 10% |
16
+ | Depth | Business logic explained | 10% |
17
+ | Depth | Dependencies mapped | 10% |
18
+ | Actionability | Next steps clearly defined | 10% |
19
+
20
+ **Document Analysis:**
21
+
22
+ | Category | Check Item | Weight |
23
+ |----------|------------|--------|
24
+ | Completeness | Full document read | 20% |
25
+ | Completeness | All key concepts extracted | 20% |
26
+ | Structure | Section structure identified | 15% |
27
+ | Depth | Project relevance analyzed | 15% |
28
+ | Depth | Gap analysis performed | 15% |
29
+ | Actionability | Specific follow-up actions suggested | 15% |
30
+
31
+ **Website Analysis:**
32
+
33
+ | Category | Check Item | Weight |
34
+ |----------|------------|--------|
35
+ | Completeness | HTML fetched and parsed | 15% |
36
+ | Tech | Tech stack identified | 15% |
37
+ | UX | UX/UI patterns analyzed | 15% |
38
+ | SEO | SEO elements inspected | 15% |
39
+ | A11y | Accessibility checked | 15% |
40
+ | Performance | Performance hints analyzed | 10% |
41
+ | Actionability | Improvements suggested | 15% |
42
+
43
+ ### Score Calculation
44
+
45
+ ```
46
+ Score = sum(checked items * weight) / 100
47
+
48
+ Grades:
49
+ - 95-100: EXCELLENT — comprehensive analysis
50
+ - 90-94: GOOD — minor gaps, additional exploration recommended
51
+ - 80-89: FAIR — needs deeper exploration
52
+ - 0-79: POOR — incomplete, re-analyze
53
+ ```
54
+
55
+ ### Depth Levels
56
+
57
+ | Level | Scope | Output |
58
+ |-------|-------|--------|
59
+ | L1: Surface | File names, basic structure | File list |
60
+ | L2: Structure | Functions, classes, imports | Structure map |
61
+ | L3: Logic | Business logic, data flow | Flow analysis |
62
+ | L4: Deep | Edge cases, dependencies, risks | Full analysis |
63
+
64
+ **Minimum**: L3 for feature analysis, L2 for project overview.
65
+
66
+ ### Forbidden Patterns
67
+
68
+ | Pattern | Problem | Fix |
69
+ |---------|---------|-----|
70
+ | "and more..." | Incomplete | List all items |
71
+ | "etc." | Vague | Be specific |
72
+ | "related files" without paths | Missing detail | Provide file paths |
73
+ | Missing line numbers | Hard to navigate | Use `:L10-50` format |
74
+ | No auth info on endpoints | Security gap | Always specify auth |
75
+
76
+ ### Quality Thresholds
77
+
78
+ **Code (`--code`):**
79
+
80
+ | Metric | Good | Warning | Critical |
81
+ |--------|------|---------|----------|
82
+ | Avg Complexity | ≤10 | 11-15 | >15 |
83
+ | Max Function Length | ≤30 | 31-50 | >50 |
84
+ | High Complexity Files | 0 | 1-3 | >3 |
85
+ | Circular Dependencies | 0 | 1 | >1 |
86
+
87
+ **Dependencies (`--deps`):**
88
+
89
+ | Metric | Good | Warning | Critical |
90
+ |--------|------|---------|----------|
91
+ | Outdated Packages | 0-3 | 4-10 | >10 |
92
+ | Security Vulnerabilities | 0 | 1-2 (low) | Any high/critical |
93
+ | Major Version Behind | 0 | 1-2 | >2 |