@su-record/vibe 2.9.2 → 2.9.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 +30 -10
- package/README.ko.md +90 -25
- package/README.md +139 -25
- package/agents/teams/figma/figma-builder.md +29 -1
- package/agents/teams/review-debate-team.md +1 -1
- package/commands/vibe.analyze.md +324 -170
- package/commands/vibe.figma.md +549 -34
- package/commands/vibe.harness.md +177 -0
- package/commands/vibe.run.md +44 -27
- package/commands/vibe.scaffold.md +195 -0
- package/commands/vibe.spec.md +375 -947
- package/commands/vibe.trace.md +17 -0
- package/commands/vibe.verify.md +19 -10
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +29 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +4 -2
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +6 -1
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/setup/ProjectSetup.d.ts +12 -1
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +259 -72
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/hooks/scripts/figma-guard.js +220 -0
- package/package.json +1 -1
- package/skills/arch-guard/SKILL.md +1 -1
- package/skills/capability-loop/SKILL.md +106 -2
- package/skills/chub-usage/SKILL.md +43 -43
- package/skills/claude-md-guide/SKILL.md +175 -175
- package/skills/design-teach/SKILL.md +33 -33
- package/skills/devlog/SKILL.md +38 -38
- package/skills/event-comms/SKILL.md +23 -13
- package/skills/event-ops/SKILL.md +28 -19
- package/skills/event-planning/SKILL.md +13 -1
- package/skills/priority-todos/SKILL.md +1 -1
- package/skills/vibe.figma/SKILL.md +234 -154
- package/skills/vibe.figma.convert/SKILL.md +123 -112
- package/skills/vibe.figma.extract/SKILL.md +141 -129
- package/skills/vibe.interview/SKILL.md +358 -0
- package/skills/vibe.interview/checklists/api.md +101 -0
- package/skills/vibe.interview/checklists/feature.md +88 -0
- package/skills/vibe.interview/checklists/library.md +95 -0
- package/skills/vibe.interview/checklists/mobile.md +89 -0
- package/skills/vibe.interview/checklists/webapp.md +97 -0
- package/skills/vibe.interview/checklists/website.md +99 -0
- package/skills/vibe.plan/SKILL.md +216 -0
- package/skills/vibe.spec/SKILL.md +1155 -0
- package/{commands/vibe.spec.review.md → skills/vibe.spec.review/SKILL.md} +269 -108
- package/vibe/templates/claudemd-template.md +74 -0
- package/vibe/templates/constitution-template.md +15 -0
- package/vibe/templates/plan-template.md +194 -0
package/commands/vibe.analyze.md
CHANGED
|
@@ -1,54 +1,72 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Analyze
|
|
3
|
-
argument-hint: "feature-name" or --code or --deps or --arch
|
|
2
|
+
description: Analyze any target — code, document, website, or Figma design
|
|
3
|
+
argument-hint: "feature-name" or file.pdf or https://... or --code or --deps or --arch
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /vibe.analyze
|
|
7
7
|
|
|
8
|
-
Analyze
|
|
8
|
+
Analyze any target: source code, documents, websites, or Figma designs.
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
```
|
|
13
13
|
/vibe.analyze # Full project quality analysis
|
|
14
|
-
/vibe.analyze "login" #
|
|
14
|
+
/vibe.analyze "login" # Feature/module code exploration + context collection
|
|
15
15
|
/vibe.analyze --code # Code quality analysis only
|
|
16
16
|
/vibe.analyze --deps # Dependency analysis only
|
|
17
17
|
/vibe.analyze --arch # Architecture analysis only
|
|
18
|
+
/vibe.analyze report.pdf # Document analysis (PDF, markdown, slides)
|
|
19
|
+
/vibe.analyze https://example.com # Website analysis (UX, tech, SEO, accessibility)
|
|
20
|
+
/vibe.analyze https://figma.com/design/... # Figma design analysis
|
|
18
21
|
```
|
|
19
22
|
|
|
23
|
+
## Input Type Auto-Detection
|
|
24
|
+
|
|
25
|
+
Determine analysis mode from the argument pattern:
|
|
26
|
+
|
|
27
|
+
| Pattern | Mode | Description |
|
|
28
|
+
|---------|------|-------------|
|
|
29
|
+
| `*.pdf`, `*.docx`, `*.pptx`, `*.md` (file path) | **Document** | Structure, content, quality, applicability |
|
|
30
|
+
| `http(s)://figma.com/*` | **Figma** | Design structure, components, tokens |
|
|
31
|
+
| `http(s)://*` | **Website** | UX, tech stack, SEO, accessibility |
|
|
32
|
+
| `--code`, `--deps`, `--arch` | **Project Quality** | Code quality, dependencies, architecture |
|
|
33
|
+
| String (feature name) | **Feature/Module** | Source code exploration + flow analysis |
|
|
34
|
+
| No argument | **Project Quality** | Full project analysis |
|
|
35
|
+
|
|
36
|
+
**Detection order**: file extension → URL pattern → flag → string.
|
|
37
|
+
|
|
20
38
|
## File Reading Policy (Mandatory)
|
|
21
39
|
|
|
22
|
-
- **SPEC/Feature
|
|
23
|
-
-
|
|
24
|
-
- **Grep
|
|
25
|
-
-
|
|
26
|
-
-
|
|
40
|
+
- **SPEC/Feature files**: Always use `Read` tool for the full file (never Grep for content)
|
|
41
|
+
- **Source files**: Read the entire file before analyzing (no partial reads)
|
|
42
|
+
- **Grep restriction**: Use only for locating files, not for understanding content
|
|
43
|
+
- **Agent prompts**: Always include "Read target files in full before analyzing"
|
|
44
|
+
- **No partial analysis**: Never judge a file by a few lines around a Grep match
|
|
27
45
|
|
|
28
46
|
## Context Reset
|
|
29
47
|
|
|
30
48
|
**When this command runs, previous conversation is ignored.**
|
|
31
|
-
- Explore and analyze
|
|
32
|
-
- Base
|
|
49
|
+
- Explore and analyze from scratch like a new session
|
|
50
|
+
- Base analysis only on newly collected information
|
|
33
51
|
|
|
34
52
|
---
|
|
35
53
|
|
|
36
|
-
>
|
|
54
|
+
> **Timer**: Record start time at the beginning. Include elapsed time in the final report.
|
|
37
55
|
|
|
38
56
|
## Mode 1: Feature/Module Analysis (`/vibe.analyze "feature-name"`)
|
|
39
57
|
|
|
40
58
|
### Goal
|
|
41
59
|
|
|
42
|
-
|
|
60
|
+
Explore all source code related to the requested feature/module and analyze flow to:
|
|
43
61
|
1. Understand current implementation status
|
|
44
|
-
2.
|
|
45
|
-
3. Build context for
|
|
62
|
+
2. Map code structure and dependencies
|
|
63
|
+
3. Build context for future development/modification requests
|
|
46
64
|
|
|
47
65
|
### Process
|
|
48
66
|
|
|
49
67
|
#### 1. Request Analysis
|
|
50
68
|
|
|
51
|
-
Extract
|
|
69
|
+
Extract keywords from the user request:
|
|
52
70
|
- Feature name (e.g., login, feed, payment)
|
|
53
71
|
- Action (e.g., create, read, update, delete)
|
|
54
72
|
- Scope (e.g., backend only, frontend only, full)
|
|
@@ -70,36 +88,34 @@ Read `CLAUDE.md`, `package.json`, `pyproject.toml`, etc. to identify tech stack:
|
|
|
70
88
|
**MANDATORY: Always use explorer sub-agents. Never explore in main session.**
|
|
71
89
|
|
|
72
90
|
> Why: 3 explorer-low agents return ~600 tokens of summaries to main session.
|
|
73
|
-
> Direct Glob/Grep/Read in main session would add 5-15K tokens of raw
|
|
91
|
+
> Direct Glob/Grep/Read in main session would add 5-15K tokens of raw content.
|
|
74
92
|
|
|
75
|
-
**Parallel exploration (ALL
|
|
93
|
+
**Parallel exploration (ALL in ONE message):**
|
|
76
94
|
|
|
77
95
|
```text
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
prompt="Find all [FEATURE] related API endpoints in this project. List file paths, HTTP methods, routes, and auth requirements.")
|
|
96
|
+
Agent(subagent_type="explorer-low", model="haiku",
|
|
97
|
+
prompt="Find all [FEATURE] related API endpoints. List file paths, HTTP methods, routes, and auth requirements.")
|
|
81
98
|
|
|
82
|
-
|
|
83
|
-
prompt="Find all [FEATURE] related services, business logic, and utility functions. Map dependencies
|
|
99
|
+
Agent(subagent_type="explorer-low", model="haiku",
|
|
100
|
+
prompt="Find all [FEATURE] related services, business logic, and utility functions. Map dependencies.")
|
|
84
101
|
|
|
85
|
-
|
|
102
|
+
Agent(subagent_type="explorer-low", model="haiku",
|
|
86
103
|
prompt="Find all [FEATURE] related data models, schemas, and database queries. Document relationships and key fields.")
|
|
87
104
|
```
|
|
88
105
|
|
|
89
|
-
**
|
|
106
|
+
**Scale for large projects (6+ related files):**
|
|
90
107
|
|
|
91
108
|
```text
|
|
92
|
-
|
|
93
|
-
Task(subagent_type="explorer-low", model="haiku",
|
|
109
|
+
Agent(subagent_type="explorer-low", model="haiku",
|
|
94
110
|
prompt="Find all test files related to [FEATURE]. Identify tested vs untested paths.")
|
|
95
111
|
|
|
96
|
-
|
|
112
|
+
Agent(subagent_type="explorer-low", model="haiku",
|
|
97
113
|
prompt="Analyze [FEATURE] configuration, environment variables, and external integrations.")
|
|
98
114
|
```
|
|
99
115
|
|
|
100
116
|
**After all agents return:**
|
|
101
|
-
- Synthesize results → proceed to Flow Analysis
|
|
102
|
-
- Only Read specific files in main session when agent
|
|
117
|
+
- Synthesize results → proceed to Flow Analysis
|
|
118
|
+
- Only Read specific files in main session when agent summaries need clarification
|
|
103
119
|
|
|
104
120
|
#### 4. Flow Analysis
|
|
105
121
|
|
|
@@ -109,7 +125,7 @@ Task(subagent_type="explorer-low", model="haiku",
|
|
|
109
125
|
- Authentication/authorization requirements
|
|
110
126
|
|
|
111
127
|
**Business Logic:**
|
|
112
|
-
- Core methods and roles
|
|
128
|
+
- Core methods and their roles
|
|
113
129
|
- Validation rules
|
|
114
130
|
- External service integrations
|
|
115
131
|
|
|
@@ -118,244 +134,384 @@ Task(subagent_type="explorer-low", model="haiku",
|
|
|
118
134
|
- Relationships (1:N, N:M)
|
|
119
135
|
- Key query patterns
|
|
120
136
|
|
|
121
|
-
#### 5. Output
|
|
137
|
+
#### 5. Output
|
|
122
138
|
|
|
123
139
|
```markdown
|
|
124
140
|
## [feature-name] Analysis Results
|
|
125
141
|
|
|
126
142
|
### Overview
|
|
127
|
-
- **Feature
|
|
128
|
-
- **
|
|
129
|
-
- **
|
|
143
|
+
- **Feature**: [one-line summary]
|
|
144
|
+
- **Status**: [Complete / In progress / Not implemented]
|
|
145
|
+
- **Files**: N related files
|
|
130
146
|
|
|
131
147
|
### Structure
|
|
132
148
|
|
|
133
149
|
#### API Endpoints
|
|
134
150
|
| Method | Path | Description | Auth |
|
|
135
151
|
|--------|------|-------------|------|
|
|
136
|
-
| POST | /api/v1/auth/login |
|
|
152
|
+
| POST | /api/v1/auth/login | User login | None |
|
|
137
153
|
|
|
138
154
|
#### Core Services
|
|
139
155
|
- `auth_service.py`: Authentication logic
|
|
140
|
-
- `login()`:
|
|
141
|
-
- `verify_token()`:
|
|
156
|
+
- `login()`: Processes login
|
|
157
|
+
- `verify_token()`: Validates JWT
|
|
142
158
|
|
|
143
159
|
#### Data Models
|
|
144
160
|
- `User`: User table
|
|
145
161
|
- Key fields: id, email, password_hash
|
|
146
162
|
- Relationships: Session (1:N)
|
|
147
163
|
|
|
148
|
-
### Reference
|
|
164
|
+
### Reference Files
|
|
149
165
|
- src/api/auth/router.py:L10-50
|
|
150
166
|
- src/services/auth_service.py:L1-100
|
|
151
167
|
```
|
|
152
168
|
|
|
153
|
-
#### 6.
|
|
169
|
+
#### 6. Next Steps
|
|
170
|
+
|
|
171
|
+
After analysis, suggest mode-specific follow-up actions:
|
|
172
|
+
|
|
173
|
+
**After code/feature analysis:**
|
|
174
|
+
|
|
175
|
+
| Task Scope | Approach |
|
|
176
|
+
|------------|----------|
|
|
177
|
+
| Simple fix (1-2 files) | Plan Mode |
|
|
178
|
+
| Complex feature (3+ files) | `/vibe.spec` |
|
|
179
|
+
|
|
180
|
+
**After document analysis:**
|
|
181
|
+
|
|
182
|
+
| Goal | Approach |
|
|
183
|
+
|------|----------|
|
|
184
|
+
| Apply findings to project | `/vibe.spec "feature-name"` |
|
|
185
|
+
| Derive improvement direction | Plan Mode |
|
|
186
|
+
| Compare with another source | `/vibe.analyze [other target]` |
|
|
187
|
+
|
|
188
|
+
**After website analysis:**
|
|
189
|
+
|
|
190
|
+
| Goal | Approach |
|
|
191
|
+
|------|----------|
|
|
192
|
+
| Build similar product | `/vibe.spec` |
|
|
193
|
+
| Improve existing UI | `/vibe.figma` |
|
|
194
|
+
| Compare with another site | `/vibe.analyze [other URL]` |
|
|
195
|
+
|
|
196
|
+
Wait for user's choice before proceeding.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Mode 2: Document Analysis (PDF, Markdown, Slides)
|
|
201
|
+
|
|
202
|
+
### Goal
|
|
203
|
+
|
|
204
|
+
Analyze document **structure, key content, quality, and applicability** to:
|
|
205
|
+
1. Extract and organize information from the document
|
|
206
|
+
2. Map relevance to the current project
|
|
207
|
+
3. Suggest follow-up actions (development, improvement, application)
|
|
208
|
+
|
|
209
|
+
### Process
|
|
210
|
+
|
|
211
|
+
#### 1. Read Document
|
|
212
|
+
|
|
213
|
+
- **PDF**: Use `Read` tool with `pages` parameter (split large documents into chunks of 20 pages)
|
|
214
|
+
- **Markdown/Text**: Use `Read` tool for the full file
|
|
215
|
+
- **Image-heavy documents**: Analyze visual elements (slides, diagrams) alongside text
|
|
216
|
+
|
|
217
|
+
#### 2. Classify Document Type
|
|
218
|
+
|
|
219
|
+
| Type | Analysis Focus |
|
|
220
|
+
|------|---------------|
|
|
221
|
+
| Technical spec | API definitions, data models, sequence diagrams |
|
|
222
|
+
| Presentation/slides | Key claims, frameworks, case studies |
|
|
223
|
+
| PRD/requirements | User stories, acceptance criteria, scope |
|
|
224
|
+
| Business document | Strategy, decision points, action items |
|
|
225
|
+
| Research/academic | Methodology, conclusions, applicability |
|
|
226
|
+
|
|
227
|
+
#### 3. Analyze Content (Parallel Sub-Agents)
|
|
228
|
+
|
|
229
|
+
```text
|
|
230
|
+
Agent(subagent_type="general-purpose", model="haiku",
|
|
231
|
+
prompt="Read the document at [PATH] and extract: 1) Section structure / table of contents 2) Key concepts and definitions 3) Main arguments or claims. Use the Read tool with pages parameter for PDFs.")
|
|
232
|
+
|
|
233
|
+
Agent(subagent_type="general-purpose", model="haiku",
|
|
234
|
+
prompt="Read the document at [PATH] and extract: 1) Actionable recommendations 2) Data points, metrics, examples 3) References to external resources. Use the Read tool with pages parameter for PDFs.")
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### 4. Project Relevance Analysis
|
|
238
|
+
|
|
239
|
+
- Map how document content applies to the current project
|
|
240
|
+
- Check if patterns/tools/techniques mentioned are already implemented
|
|
241
|
+
- Gap analysis: document recommendations vs current project state
|
|
154
242
|
|
|
155
|
-
|
|
156
|
-
1. Output analysis summary (include `⏱️ Started: {start_time}` and `⏱️ Completed: {getCurrentTime 결과}`)
|
|
157
|
-
2. **Ask user to choose workflow** when development is requested:
|
|
243
|
+
#### 5. Output
|
|
158
244
|
|
|
245
|
+
```markdown
|
|
246
|
+
## [Document Name] Analysis
|
|
247
|
+
|
|
248
|
+
### Overview
|
|
249
|
+
- **Type**: [Presentation / Technical spec / PRD / ...]
|
|
250
|
+
- **Topic**: [one-line summary]
|
|
251
|
+
- **Pages/Sections**: N
|
|
252
|
+
- **Audience**: [Developers / PMs / Executives / ...]
|
|
253
|
+
|
|
254
|
+
### Key Content
|
|
255
|
+
1. **[Concept 1]**: Description
|
|
256
|
+
2. **[Concept 2]**: Description
|
|
257
|
+
|
|
258
|
+
### Frameworks/Models (if any)
|
|
259
|
+
- [Systematic structure presented in the document]
|
|
260
|
+
|
|
261
|
+
### Project Relevance
|
|
262
|
+
| Recommendation | Current State | Gap |
|
|
263
|
+
|----------------|---------------|-----|
|
|
264
|
+
| ... | ... | ... |
|
|
265
|
+
|
|
266
|
+
### Key Insights
|
|
267
|
+
- [Most important takeaway]
|
|
268
|
+
|
|
269
|
+
### Suggested Actions
|
|
270
|
+
1. ...
|
|
159
271
|
```
|
|
160
|
-
## Next Steps
|
|
161
272
|
|
|
162
|
-
|
|
273
|
+
#### Fallback
|
|
163
274
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
275
|
+
If `Read` fails for a document format:
|
|
276
|
+
1. Check file extension and try alternative parsing
|
|
277
|
+
2. If binary format is unsupported, inform user and suggest converting to PDF/markdown
|
|
278
|
+
3. Never produce an analysis based on partial or failed reads
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Mode 3: Website Analysis (URL)
|
|
283
|
+
|
|
284
|
+
### Goal
|
|
168
285
|
|
|
169
|
-
|
|
170
|
-
|
|
286
|
+
Analyze website **tech stack, UX/UI, SEO, accessibility, and performance** to:
|
|
287
|
+
1. Understand technical implementation
|
|
288
|
+
2. Identify improvement opportunities
|
|
289
|
+
3. Collect benchmarking insights
|
|
171
290
|
|
|
172
|
-
|
|
291
|
+
### Process
|
|
292
|
+
|
|
293
|
+
#### 1. Fetch Website
|
|
294
|
+
|
|
295
|
+
- Use `WebFetch` tool to retrieve HTML
|
|
296
|
+
- Fetch key pages (home, main feature pages, login, etc.)
|
|
297
|
+
|
|
298
|
+
#### 2. Analyze (Parallel Sub-Agents)
|
|
299
|
+
|
|
300
|
+
```text
|
|
301
|
+
Agent(subagent_type="general-purpose", model="haiku",
|
|
302
|
+
prompt="Analyze the HTML from [URL] (use WebFetch). Extract: 1) Tech stack (framework, meta tags, scripts) 2) Page structure (header, nav, main sections, footer) 3) SEO elements (title, meta description, OG tags, structured data)")
|
|
303
|
+
|
|
304
|
+
Agent(subagent_type="general-purpose", model="haiku",
|
|
305
|
+
prompt="Analyze the HTML from [URL] (use WebFetch). Extract: 1) Accessibility (ARIA labels, semantic HTML, alt texts, heading hierarchy) 2) Performance hints (script loading, image optimization) 3) Mobile responsiveness (viewport meta, media queries)")
|
|
306
|
+
|
|
307
|
+
Agent(subagent_type="general-purpose", model="haiku",
|
|
308
|
+
prompt="Analyze the HTML from [URL] (use WebFetch). Extract: 1) UX patterns (navigation, CTA placement, form design) 2) Design system hints (CSS variables, component patterns) 3) Content strategy (copywriting tone, information hierarchy)")
|
|
173
309
|
```
|
|
174
310
|
|
|
175
|
-
3.
|
|
176
|
-
|
|
177
|
-
|
|
311
|
+
#### 3. Figma URL Handling
|
|
312
|
+
|
|
313
|
+
If a Figma URL is detected, switch to **Figma-specific analysis**:
|
|
314
|
+
- Use `get_design_context` or `get_screenshot` to collect design data
|
|
315
|
+
- Analyze component structure, design tokens, layout patterns
|
|
316
|
+
- Compare design intent with current project code
|
|
317
|
+
|
|
318
|
+
#### 4. Output
|
|
319
|
+
|
|
320
|
+
```markdown
|
|
321
|
+
## [URL] Analysis
|
|
322
|
+
|
|
323
|
+
### Overview
|
|
324
|
+
- **Site type**: [SaaS / E-commerce / Portfolio / ...]
|
|
325
|
+
- **Tech stack**: [Next.js, Tailwind, ...]
|
|
326
|
+
- **Overall score**: N/100
|
|
327
|
+
|
|
328
|
+
### Technical Analysis
|
|
329
|
+
| Area | Detection | Details |
|
|
330
|
+
|------|-----------|---------|
|
|
331
|
+
| Framework | React/Next.js | SSR enabled |
|
|
332
|
+
| CSS | Tailwind CSS | v3.4 |
|
|
333
|
+
|
|
334
|
+
### UX/UI Analysis
|
|
335
|
+
- **Navigation**: [assessment]
|
|
336
|
+
- **CTA placement**: [assessment]
|
|
337
|
+
- **Responsive design**: [assessment]
|
|
338
|
+
|
|
339
|
+
### SEO Analysis (N/100)
|
|
340
|
+
| Element | Status | Recommendation |
|
|
341
|
+
|---------|--------|----------------|
|
|
342
|
+
| Title | Present | Appropriate length |
|
|
343
|
+
| Meta Description | Missing | Add description |
|
|
344
|
+
|
|
345
|
+
### Accessibility (WCAG 2.1 AA)
|
|
346
|
+
- **Semantic HTML**: [assessment]
|
|
347
|
+
- **Keyboard navigation**: [assessment]
|
|
348
|
+
- **Screen reader support**: [assessment]
|
|
349
|
+
|
|
350
|
+
### Improvement Suggestions
|
|
351
|
+
1. [highest priority]
|
|
352
|
+
2. ...
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
#### Fallback
|
|
356
|
+
|
|
357
|
+
If `WebFetch` fails:
|
|
358
|
+
1. Retry once with a simplified URL (strip query params)
|
|
359
|
+
2. If still failing, inform user of the error (timeout, DNS, etc.)
|
|
360
|
+
3. Suggest user provide HTML file directly: `/vibe.analyze page.html`
|
|
178
361
|
|
|
179
362
|
---
|
|
180
363
|
|
|
181
|
-
## Mode
|
|
364
|
+
## Mode 4: Project Quality Analysis (--code/--deps/--arch)
|
|
182
365
|
|
|
183
|
-
###
|
|
366
|
+
### Scope
|
|
184
367
|
|
|
185
368
|
- **Default** (`/vibe.analyze`): Full analysis (code + dependencies + architecture)
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
369
|
+
- `--code`: Code quality only
|
|
370
|
+
- `--deps`: Dependency analysis only
|
|
371
|
+
- `--arch`: Architecture analysis only
|
|
189
372
|
|
|
190
|
-
### Code Quality
|
|
373
|
+
### Code Quality (--code)
|
|
191
374
|
|
|
192
|
-
-
|
|
375
|
+
- Cyclomatic complexity analysis
|
|
193
376
|
- Code quality validation
|
|
194
|
-
- Coupling/cohesion
|
|
377
|
+
- Coupling/cohesion assessment
|
|
195
378
|
|
|
196
|
-
###
|
|
379
|
+
### Dependencies (--deps)
|
|
197
380
|
|
|
198
381
|
- Read `package.json` / `pyproject.toml` / `pubspec.yaml`
|
|
199
|
-
-
|
|
382
|
+
- Detect version conflicts, security vulnerabilities, outdated packages
|
|
200
383
|
|
|
201
|
-
### Architecture
|
|
384
|
+
### Architecture (--arch)
|
|
202
385
|
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
- Detect circular dependencies
|
|
386
|
+
- Identify core modules
|
|
387
|
+
- Map module dependencies
|
|
388
|
+
- Detect circular dependencies and layer violations
|
|
206
389
|
|
|
207
|
-
###
|
|
390
|
+
### Report
|
|
208
391
|
|
|
209
|
-
`.claude/vibe/reports/analysis-{date}.md`:
|
|
392
|
+
Save to `.claude/vibe/reports/analysis-{date}.md`:
|
|
210
393
|
|
|
211
394
|
```markdown
|
|
212
395
|
# Project Analysis Report
|
|
213
396
|
|
|
214
397
|
## Overview
|
|
215
|
-
- Analysis date:
|
|
216
|
-
-
|
|
398
|
+
- Analysis date: YYYY-MM-DD HH:MM
|
|
399
|
+
- Scope: Full / Code / Deps / Arch
|
|
217
400
|
|
|
218
|
-
## Code Quality (
|
|
219
|
-
- Average complexity:
|
|
220
|
-
- High complexity files:
|
|
401
|
+
## Code Quality (N/100)
|
|
402
|
+
- Average complexity: N (good/warning/critical)
|
|
403
|
+
- High complexity files: N
|
|
221
404
|
|
|
222
|
-
## Dependencies (
|
|
223
|
-
- Total packages:
|
|
224
|
-
- Updates needed:
|
|
405
|
+
## Dependencies (N/100)
|
|
406
|
+
- Total packages: N
|
|
407
|
+
- Updates needed: N
|
|
408
|
+
- Security issues: N
|
|
225
409
|
|
|
226
|
-
## Architecture (
|
|
227
|
-
- Circular dependencies:
|
|
228
|
-
- Layer violations:
|
|
410
|
+
## Architecture (N/100)
|
|
411
|
+
- Circular dependencies: N found
|
|
412
|
+
- Layer violations: N
|
|
229
413
|
|
|
230
414
|
## Improvement Suggestions
|
|
231
|
-
1.
|
|
232
|
-
2.
|
|
415
|
+
1. ...
|
|
416
|
+
2. ...
|
|
233
417
|
```
|
|
234
418
|
|
|
235
419
|
## Core Tools (Semantic Analysis)
|
|
236
420
|
|
|
237
421
|
### Tool Invocation
|
|
238
422
|
|
|
239
|
-
All tools are called via:
|
|
240
|
-
|
|
241
423
|
```bash
|
|
242
424
|
node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.TOOL_NAME({...args}).then(r => console.log(r.content[0].text)))"
|
|
243
425
|
```
|
|
244
426
|
|
|
245
|
-
###
|
|
427
|
+
### Available Tools
|
|
246
428
|
|
|
247
429
|
| Tool | Purpose | When to Use |
|
|
248
430
|
|------|---------|-------------|
|
|
249
431
|
| `findSymbol` | Find symbol definitions | Locate function/class implementations |
|
|
250
432
|
| `findReferences` | Find all references | Track usage patterns |
|
|
251
|
-
| `analyzeComplexity` | Complexity analysis | Measure
|
|
433
|
+
| `analyzeComplexity` | Complexity analysis | Measure complexity metrics |
|
|
252
434
|
| `validateCodeQuality` | Quality validation | Check code quality standards |
|
|
253
|
-
| `saveMemory` | Save analysis results |
|
|
254
|
-
|
|
255
|
-
### Example Tool Usage in Analysis
|
|
256
|
-
|
|
257
|
-
**1. Find function definition:**
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.findSymbol({symbolName: 'login', searchPath: 'src/'}).then(r => console.log(r.content[0].text)))"
|
|
261
|
-
```
|
|
435
|
+
| `saveMemory` | Save analysis results | Persist findings for future sessions |
|
|
262
436
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.analyzeComplexity({targetPath: 'src/services/', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
**3. Validate code quality:**
|
|
437
|
+
---
|
|
270
438
|
|
|
271
|
-
|
|
272
|
-
node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.validateCodeQuality({targetPath: 'src/', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
|
|
273
|
-
```
|
|
439
|
+
## Quality Gate (Mandatory)
|
|
274
440
|
|
|
275
|
-
|
|
441
|
+
### Mode-Specific Checklists
|
|
276
442
|
|
|
277
|
-
|
|
278
|
-
node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.saveMemory({key: 'analysis-login-module', value: 'Found 5 related files, complexity avg 6.2', category: 'analysis', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
|
|
279
|
-
```
|
|
443
|
+
**Code/Feature Analysis:**
|
|
280
444
|
|
|
281
|
-
|
|
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% |
|
|
282
455
|
|
|
283
|
-
|
|
456
|
+
**Document Analysis:**
|
|
284
457
|
|
|
285
|
-
|
|
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% |
|
|
286
466
|
|
|
287
|
-
|
|
467
|
+
**Website Analysis:**
|
|
288
468
|
|
|
289
469
|
| Category | Check Item | Weight |
|
|
290
470
|
|----------|------------|--------|
|
|
291
|
-
|
|
|
292
|
-
|
|
|
293
|
-
|
|
|
294
|
-
|
|
|
295
|
-
|
|
|
296
|
-
|
|
|
297
|
-
|
|
|
298
|
-
| **Actionability** | Next steps clearly defined | 10% |
|
|
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% |
|
|
299
478
|
|
|
300
|
-
###
|
|
479
|
+
### Score Calculation
|
|
301
480
|
|
|
302
481
|
```
|
|
303
|
-
Score =
|
|
482
|
+
Score = sum(checked items * weight) / 100
|
|
304
483
|
|
|
305
484
|
Grades:
|
|
306
|
-
- 95-100:
|
|
307
|
-
- 90-94:
|
|
308
|
-
- 80-89:
|
|
309
|
-
- 0-79:
|
|
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
|
|
310
489
|
```
|
|
311
490
|
|
|
312
|
-
###
|
|
491
|
+
### Depth Levels
|
|
313
492
|
|
|
314
493
|
| Level | Scope | Output |
|
|
315
494
|
|-------|-------|--------|
|
|
316
|
-
|
|
|
317
|
-
|
|
|
318
|
-
|
|
|
319
|
-
|
|
|
320
|
-
|
|
321
|
-
**Minimum required: L3 for feature analysis, L2 for project overview**
|
|
322
|
-
|
|
323
|
-
### Analysis Output Requirements
|
|
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 |
|
|
324
499
|
|
|
325
|
-
|
|
500
|
+
**Minimum**: L3 for feature analysis, L2 for project overview.
|
|
326
501
|
|
|
327
|
-
|
|
328
|
-
- Feature description (1 sentence)
|
|
329
|
-
- Implementation status (Complete/In progress/Not implemented)
|
|
330
|
-
- Related file count
|
|
502
|
+
### Forbidden Patterns
|
|
331
503
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
- Absolute or relative paths
|
|
339
|
-
- Line number ranges for key sections
|
|
340
|
-
- Brief description per file
|
|
341
|
-
|
|
342
|
-
4. **Next Steps**
|
|
343
|
-
- Workflow choice prompt (Plan Mode vs VIBE)
|
|
344
|
-
- Specific action items if applicable
|
|
345
|
-
|
|
346
|
-
### Forbidden Incomplete Patterns
|
|
347
|
-
|
|
348
|
-
| Pattern | Issue | Required Fix |
|
|
349
|
-
|---------|-------|--------------|
|
|
350
|
-
| "and more..." | Incomplete list | List all items |
|
|
351
|
-
| "etc." | Vague scope | Be specific |
|
|
352
|
-
| "related files" without list | Missing details | Provide file paths |
|
|
353
|
-
| Missing line numbers | Hard to navigate | Add `:L10-50` format |
|
|
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 |
|
|
354
510
|
| No auth info on endpoints | Security gap | Always specify auth |
|
|
355
511
|
|
|
356
|
-
###
|
|
512
|
+
### Quality Thresholds
|
|
357
513
|
|
|
358
|
-
|
|
514
|
+
**Code (`--code`):**
|
|
359
515
|
|
|
360
516
|
| Metric | Good | Warning | Critical |
|
|
361
517
|
|--------|------|---------|----------|
|
|
@@ -364,9 +520,7 @@ When running `--code` analysis:
|
|
|
364
520
|
| High Complexity Files | 0 | 1-3 | >3 |
|
|
365
521
|
| Circular Dependencies | 0 | 1 | >1 |
|
|
366
522
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
When running `--deps` analysis:
|
|
523
|
+
**Dependencies (`--deps`):**
|
|
370
524
|
|
|
371
525
|
| Metric | Good | Warning | Critical |
|
|
372
526
|
|--------|------|---------|----------|
|