@su-record/vibe 2.9.1 → 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 +31 -10
- package/README.ko.md +90 -25
- package/README.md +139 -25
- package/agents/teams/debug-team.md +70 -0
- package/agents/teams/dev-team.md +88 -0
- package/agents/teams/docs-team.md +80 -0
- package/agents/teams/figma/figma-analyst.md +52 -0
- package/agents/teams/figma/figma-architect.md +112 -0
- package/agents/teams/figma/figma-auditor.md +82 -0
- package/agents/teams/figma/figma-builder.md +100 -0
- package/agents/teams/figma-team.md +85 -0
- package/agents/teams/fullstack-team.md +83 -0
- package/agents/teams/lite-team.md +69 -0
- package/agents/teams/migration-team.md +78 -0
- package/agents/teams/refactor-team.md +94 -0
- package/agents/teams/research-team.md +86 -0
- package/agents/teams/review-debate-team.md +125 -0
- package/agents/teams/security-team.md +81 -0
- package/commands/vibe.analyze.md +324 -170
- package/commands/vibe.figma.md +549 -34
- package/commands/vibe.harness.md +177 -0
- package/commands/vibe.review.md +1 -63
- package/commands/vibe.run.md +52 -403
- package/commands/vibe.scaffold.md +195 -0
- package/commands/vibe.spec.md +373 -1003
- 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/hooks/scripts/figma-refine.js +315 -0
- package/hooks/scripts/figma-to-scss.js +394 -0
- package/hooks/scripts/figma-validate.js +353 -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 +263 -115
- package/skills/vibe.figma/templates/component-spec.md +168 -0
- package/skills/vibe.figma.convert/SKILL.md +131 -84
- package/skills/vibe.figma.convert/rubrics/conversion-rules.md +12 -0
- package/skills/vibe.figma.extract/SKILL.md +148 -108
- package/skills/vibe.figma.extract/rubrics/image-rules.md +15 -3
- 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} +272 -155
- package/vibe/templates/claudemd-template.md +74 -0
- package/vibe/templates/constitution-template.md +15 -0
- package/vibe/templates/plan-template.md +194 -0
|
@@ -7,189 +7,189 @@ priority: 55
|
|
|
7
7
|
chain-next: [agents-md]
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# claude-md-guide — CLAUDE.md
|
|
10
|
+
# claude-md-guide — CLAUDE.md Writing Guide
|
|
11
11
|
|
|
12
|
-
>
|
|
12
|
+
> **Principle**: "Would the agent make a mistake without this?" → If No, delete it. If Yes, keep it.
|
|
13
13
|
|
|
14
14
|
## Why This Matters
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Research shows that LLM compliance drops **exponentially** as the number of instructions increases (Curse of Instructions):
|
|
17
17
|
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
| 1
|
|
21
|
-
| 5
|
|
22
|
-
| 10
|
|
23
|
-
| 15
|
|
18
|
+
| Instructions | GPT-4o Compliance | Claude Sonnet Compliance |
|
|
19
|
+
|-------------|------------------|--------------------------|
|
|
20
|
+
| 1 | ~85% | ~90% |
|
|
21
|
+
| 5 | ~44% | ~59% |
|
|
22
|
+
| 10 | ~15% | ~44% |
|
|
23
|
+
| 15+ | ~5% | ~15% |
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
**Conclusion**: Every line has a cost. A short, precise CLAUDE.md is better than a long, comprehensive one.
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
## Step 1:
|
|
29
|
+
## Step 1: Project Exploration — Auto-Collect
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Explore the project before writing CLAUDE.md:
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
Glob: pattern="package.json" →
|
|
35
|
-
Glob: pattern="*.config.*" →
|
|
36
|
-
Glob: pattern="tsconfig.json" → TypeScript
|
|
37
|
-
Glob: pattern=".env.example" →
|
|
38
|
-
Glob: pattern="Makefile" →
|
|
39
|
-
Glob: pattern="docker-compose.*" →
|
|
40
|
-
Glob: pattern="CLAUDE.md" →
|
|
41
|
-
Glob: pattern="AGENTS.md" →
|
|
34
|
+
Glob: pattern="package.json" → Check stack and scripts
|
|
35
|
+
Glob: pattern="*.config.*" → Build/lint configuration
|
|
36
|
+
Glob: pattern="tsconfig.json" → TypeScript configuration
|
|
37
|
+
Glob: pattern=".env.example" → Environment variable structure
|
|
38
|
+
Glob: pattern="Makefile" → Build system
|
|
39
|
+
Glob: pattern="docker-compose.*" → Infrastructure structure
|
|
40
|
+
Glob: pattern="CLAUDE.md" → Check for existing file
|
|
41
|
+
Glob: pattern="AGENTS.md" → Check for compatible file
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Summarize the collected information for the user, then ask about any missing context.
|
|
45
45
|
|
|
46
|
-
## Step 2:
|
|
46
|
+
## Step 2: Interview — Extract Non-Discoverable Information
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Only ask about information that cannot be found through auto-exploration. **One question at a time, multiple-choice when possible:**
|
|
49
49
|
|
|
50
|
-
###
|
|
50
|
+
### Question Categories
|
|
51
51
|
|
|
52
|
-
**1.
|
|
53
|
-
-
|
|
54
|
-
-
|
|
52
|
+
**1. Runtime Traps**
|
|
53
|
+
- Are there runtime differences not visible in the code? (e.g., Bun vs Node, ESM vs CJS)
|
|
54
|
+
- Are there bugs that only occur in certain environments?
|
|
55
55
|
|
|
56
|
-
**2.
|
|
57
|
-
-
|
|
58
|
-
-
|
|
56
|
+
**2. Forbidden Patterns**
|
|
57
|
+
- Are there libraries/patterns that must never be used?
|
|
58
|
+
- Are there approaches that caused problems in the past?
|
|
59
59
|
|
|
60
|
-
**3.
|
|
61
|
-
-
|
|
62
|
-
-
|
|
60
|
+
**3. Non-standard Conventions**
|
|
61
|
+
- Are there naming/structure rules that differ from standards?
|
|
62
|
+
- Are there special workflows agreed upon by the team?
|
|
63
63
|
|
|
64
|
-
**4.
|
|
65
|
-
-
|
|
66
|
-
-
|
|
64
|
+
**4. Architecture Decisions**
|
|
65
|
+
- Are there design reasons that can't be inferred from the code alone?
|
|
66
|
+
- Is there business context behind why certain patterns were chosen?
|
|
67
67
|
|
|
68
|
-
**5.
|
|
69
|
-
-
|
|
70
|
-
-
|
|
68
|
+
**5. Boundaries**
|
|
69
|
+
- Are there files/directories the agent must never touch?
|
|
70
|
+
- Are there areas that require approval before changes are made?
|
|
71
71
|
|
|
72
|
-
## Step 3:
|
|
72
|
+
## Step 3: Structure Design — 3-Layer Architecture
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Separate the collected information into 3 layers:
|
|
75
75
|
|
|
76
|
-
### Layer 1: CLAUDE.md (
|
|
76
|
+
### Layer 1: CLAUDE.md (Project Constitution)
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
**Auto-loaded every session** → only universal, stable information.
|
|
79
79
|
|
|
80
80
|
```markdown
|
|
81
|
-
# {
|
|
81
|
+
# {Project Name}
|
|
82
82
|
|
|
83
|
-
{
|
|
83
|
+
{1-2 sentences on what the project is. Only if the purpose isn't clear from the code.}
|
|
84
84
|
|
|
85
85
|
## Tech Stack
|
|
86
|
-
{
|
|
86
|
+
{Only what can't be inferred immediately from package.json. e.g., "Bun runtime (not Node)"}
|
|
87
87
|
|
|
88
88
|
## Commands
|
|
89
|
-
{package.json scripts
|
|
90
|
-
- `npm run build && npx vitest run` —
|
|
89
|
+
{Only what's missing from package.json scripts or non-intuitive}
|
|
90
|
+
- `npm run build && npx vitest run` — build then test (order matters)
|
|
91
91
|
|
|
92
92
|
## Conventions
|
|
93
|
-
{
|
|
93
|
+
{Only what the linter can't catch}
|
|
94
94
|
- ESM only — imports need `.js` extension
|
|
95
|
-
- {
|
|
95
|
+
- {Any non-standard naming rules}
|
|
96
96
|
|
|
97
97
|
## Gotchas
|
|
98
|
-
{
|
|
99
|
-
- **{
|
|
98
|
+
{Things the agent will repeatedly get wrong}
|
|
99
|
+
- **{Trap title}.** {Specific do/don't explanation}
|
|
100
100
|
|
|
101
101
|
## Boundaries
|
|
102
|
-
✅ Always: {
|
|
103
|
-
⚠️ Ask first: {
|
|
104
|
-
🚫 Never: {
|
|
102
|
+
✅ Always: {things to always do}
|
|
103
|
+
⚠️ Ask first: {things requiring approval first}
|
|
104
|
+
🚫 Never: {absolute prohibitions}
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
### Layer 2: SPEC.md (
|
|
107
|
+
### Layer 2: SPEC.md (Per-Feature Design Document)
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
**Loaded only when working on a specific feature** → focus on what and why, leave how to the agent.
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
Storage location: `.claude/vibe/specs/YYYY-MM-DD-{topic}.md`
|
|
112
112
|
|
|
113
113
|
```markdown
|
|
114
|
-
# {
|
|
114
|
+
# {Feature Name} SPEC
|
|
115
115
|
|
|
116
|
-
##
|
|
117
|
-
##
|
|
118
|
-
##
|
|
119
|
-
##
|
|
120
|
-
##
|
|
116
|
+
## Purpose (Why)
|
|
117
|
+
## Requirements (What)
|
|
118
|
+
## Success Criteria (Acceptance Criteria)
|
|
119
|
+
## Technical Constraints (Constraints)
|
|
120
|
+
## Boundaries (Out of Scope)
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
### Layer 3: plan.md (
|
|
123
|
+
### Layer 3: plan.md (Execution Plan)
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
**Per-session task list** → 2-5 minute units, with file paths specified.
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
Storage location: `.claude/vibe/specs/{name}-execplan.md`
|
|
128
128
|
|
|
129
129
|
```markdown
|
|
130
130
|
# Execution Plan
|
|
131
131
|
|
|
132
|
-
## Task 1: {
|
|
132
|
+
## Task 1: {Title}
|
|
133
133
|
- Files: `src/foo.ts`, `src/foo.test.ts`
|
|
134
|
-
- Action: {
|
|
134
|
+
- Action: {Specific change}
|
|
135
135
|
- Verify: `npm test src/foo.test.ts`
|
|
136
136
|
|
|
137
137
|
## Task 2: ...
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
## Step 4:
|
|
140
|
+
## Step 4: Writing — Apply Evidence-Based Principles
|
|
141
141
|
|
|
142
|
-
###
|
|
142
|
+
### Size Limits
|
|
143
143
|
|
|
144
|
-
|
|
|
145
|
-
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
144
|
+
| Grade | Lines | When Appropriate |
|
|
145
|
+
|-------|-------|-----------------|
|
|
146
|
+
| Optimal | 60-150 | Most projects |
|
|
147
|
+
| Acceptable | 150-200 | Complex monorepos |
|
|
148
|
+
| Warning | 200-300 | Separation needed |
|
|
149
|
+
| Danger | 300+ | Agent ignores half of it |
|
|
150
150
|
|
|
151
|
-
###
|
|
151
|
+
### Attention Distribution by Position (Lost in the Middle Effect)
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
LLMs focus on the **beginning and end** of a document and **ignore the middle**:
|
|
154
154
|
|
|
155
155
|
```
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
Attention: ████████░░░░░░░░████████
|
|
157
|
+
^start ^middle(↓20-40%) ^end
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
160
|
+
**Countermeasures**:
|
|
161
|
+
- **Most important rules** → place at the top of the document
|
|
162
|
+
- **Frequently violated rules** → place at the bottom (end) of the document
|
|
163
|
+
- **Background information** → place in the middle (OK if ignored)
|
|
164
164
|
|
|
165
|
-
###
|
|
165
|
+
### Include vs Exclude Checklist
|
|
166
166
|
|
|
167
|
-
**✅
|
|
167
|
+
**✅ Include (non-discoverable, operationally important)**
|
|
168
168
|
|
|
169
|
-
|
|
|
170
|
-
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
| SSOT
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
169
|
+
| Type | Example |
|
|
170
|
+
|------|---------|
|
|
171
|
+
| Runtime traps | "Bun runtime, not Node" |
|
|
172
|
+
| Forbidden patterns | "Never use `any`, use `unknown` + type guards" |
|
|
173
|
+
| SSOT location | "Only edit `constants.ts` for stack mapping" |
|
|
174
|
+
| Order invariants | "Build before test, always" |
|
|
175
|
+
| Non-standard commands | Compound commands, special flags |
|
|
176
|
+
| Security rules | Auth, path traversal prevention, etc. |
|
|
177
177
|
|
|
178
|
-
**❌
|
|
178
|
+
**❌ Exclude (discoverable or delegate to other tools)**
|
|
179
179
|
|
|
180
|
-
|
|
|
181
|
-
|
|
182
|
-
|
|
|
183
|
-
|
|
|
184
|
-
|
|
|
185
|
-
| API
|
|
186
|
-
|
|
|
187
|
-
| API
|
|
188
|
-
|
|
|
180
|
+
| Type | Reason | Alternative |
|
|
181
|
+
|------|--------|-------------|
|
|
182
|
+
| Directory structure | Discoverable via `ls` | The code itself |
|
|
183
|
+
| Tech stack list | In `package.json` | The code itself |
|
|
184
|
+
| Code style (indentation, semicolons) | Linter catches it | ESLint, Prettier |
|
|
185
|
+
| API documentation | Readable from code | Swagger, JSDoc |
|
|
186
|
+
| General best practices | LLM already knows | Unnecessary |
|
|
187
|
+
| API keys, secrets | Goes stale quickly | `.env`, vault |
|
|
188
|
+
| Per-feature detailed instructions | Move to Layer 2 | SPEC.md |
|
|
189
189
|
|
|
190
|
-
###
|
|
190
|
+
### Emphasis Techniques
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
Use these when important rules keep getting ignored:
|
|
193
193
|
|
|
194
194
|
```markdown
|
|
195
195
|
**IMPORTANT**: {critical rule}
|
|
@@ -197,11 +197,11 @@ LLM은 문서의 **처음과 끝**에 집중하고 **중간을 무시**합니다
|
|
|
197
197
|
**NEVER**: {absolute prohibition}
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
However, adding emphasis to every line **nullifies the emphasis**. Use only for P1 rules.
|
|
201
201
|
|
|
202
|
-
### Progressive Disclosure
|
|
202
|
+
### Progressive Disclosure
|
|
203
203
|
|
|
204
|
-
CLAUDE.md
|
|
204
|
+
Don't put everything in CLAUDE.md — reference it:
|
|
205
205
|
|
|
206
206
|
```markdown
|
|
207
207
|
# Architecture
|
|
@@ -211,124 +211,124 @@ See @docs/ARCHITECTURE.md for design decisions.
|
|
|
211
211
|
@.claude/rules/security.md
|
|
212
212
|
```
|
|
213
213
|
|
|
214
|
-
Claude Code
|
|
214
|
+
Claude Code follows `@` references and loads them only when needed.
|
|
215
215
|
|
|
216
|
-
## Step 5:
|
|
216
|
+
## Step 5: Validation — Writing Quality Check
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
Validate the written CLAUDE.md:
|
|
219
219
|
|
|
220
|
-
###
|
|
220
|
+
### Line-by-Line Validation
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
4 questions for every line:
|
|
223
223
|
|
|
224
|
-
1.
|
|
225
|
-
2.
|
|
226
|
-
3.
|
|
227
|
-
4.
|
|
224
|
+
1. **Would the agent make a mistake without this?** → If No, delete
|
|
225
|
+
2. **Is it needed in every session?** → If No, move to Layer 2/3
|
|
226
|
+
3. **Can a linter/hook replace it?** → If Yes, move to linter/hook
|
|
227
|
+
4. **Is it discoverable from code?** → If Yes, delete
|
|
228
228
|
|
|
229
|
-
###
|
|
229
|
+
### Anchoring Warning
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
- ❌ "We use React" →
|
|
233
|
-
- ✅ "Never use jQuery, even for legacy code" →
|
|
231
|
+
Mentioning a technology name biases the agent toward it:
|
|
232
|
+
- ❌ "We use React" → unnecessary (it's in package.json)
|
|
233
|
+
- ✅ "Never use jQuery, even for legacy code" → useful (prevents a trap)
|
|
234
234
|
|
|
235
|
-
###
|
|
235
|
+
### Token Efficiency
|
|
236
236
|
|
|
237
|
-
|
|
|
238
|
-
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
|
|
|
237
|
+
| Problem | Example | Improvement |
|
|
238
|
+
|---------|---------|-------------|
|
|
239
|
+
| Verbose explanation | "Please always make sure to..." | "Always:" |
|
|
240
|
+
| Duplication | Same rule repeated in different wording | State it once |
|
|
241
|
+
| Unnecessary context | "As we discussed..." | Delete |
|
|
242
242
|
|
|
243
|
-
## Step 6:
|
|
243
|
+
## Step 6: Maintenance — A Living Document
|
|
244
244
|
|
|
245
|
-
###
|
|
245
|
+
### Incremental Addition Pattern
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
Don't try to write it perfectly from the start:
|
|
248
248
|
|
|
249
249
|
```
|
|
250
|
-
1.
|
|
251
|
-
2.
|
|
252
|
-
3.
|
|
253
|
-
4. 2-3
|
|
250
|
+
1. Start with a minimal CLAUDE.md (30-50 lines)
|
|
251
|
+
2. Observe where the agent makes mistakes
|
|
252
|
+
3. Only add rules for recurring mistakes
|
|
253
|
+
4. Clean up unnecessary lines every 2-3 weeks
|
|
254
254
|
```
|
|
255
255
|
|
|
256
|
-
### Reflection Loop (Addy Osmani
|
|
256
|
+
### Reflection Loop (Addy Osmani Pattern)
|
|
257
257
|
|
|
258
258
|
```
|
|
259
|
-
|
|
260
|
-
→ "
|
|
261
|
-
→
|
|
262
|
-
→
|
|
259
|
+
Agent task complete
|
|
260
|
+
→ Ask "What was different from expectations?"
|
|
261
|
+
→ When a recurring pattern is found, add 1 line to CLAUDE.md
|
|
262
|
+
→ If the root cause is code structure, fix the code and don't add a rule
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
###
|
|
265
|
+
### Warning Signs
|
|
266
266
|
|
|
267
|
-
|
|
|
268
|
-
|
|
269
|
-
| 300
|
|
270
|
-
|
|
|
271
|
-
|
|
|
272
|
-
|
|
|
267
|
+
| Signal | Meaning | Response |
|
|
268
|
+
|--------|---------|----------|
|
|
269
|
+
| Over 300 lines | Information overload | Split or trim |
|
|
270
|
+
| Same mistake repeats | Rule is lost in noise | Emphasize or consolidate |
|
|
271
|
+
| Adding rules has no effect | File is too long | Fix root cause |
|
|
272
|
+
| Team ignores rules | Discoverable information | Delete |
|
|
273
273
|
|
|
274
274
|
---
|
|
275
275
|
|
|
276
|
-
## Quick Reference:
|
|
276
|
+
## Quick Reference: Guide by Project Scale
|
|
277
277
|
|
|
278
|
-
###
|
|
278
|
+
### Small (fewer than 10 files)
|
|
279
279
|
|
|
280
280
|
```markdown
|
|
281
|
-
# {
|
|
281
|
+
# {Project Name}
|
|
282
282
|
|
|
283
283
|
## Commands
|
|
284
|
-
- `{build}` — {
|
|
285
|
-
- `{test}` — {
|
|
284
|
+
- `{build}` — {description}
|
|
285
|
+
- `{test}` — {description}
|
|
286
286
|
|
|
287
287
|
## Gotchas
|
|
288
|
-
- **{
|
|
289
|
-
- **{
|
|
288
|
+
- **{Trap 1}.** {description}
|
|
289
|
+
- **{Trap 2}.** {description}
|
|
290
290
|
|
|
291
291
|
## Never
|
|
292
|
-
- 🚫 {
|
|
292
|
+
- 🚫 {prohibited item}
|
|
293
293
|
```
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
**Target: 20-30 lines**
|
|
296
296
|
|
|
297
|
-
###
|
|
297
|
+
### Medium (10-50 files)
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
Above + add Conventions and Boundaries sections.
|
|
300
300
|
|
|
301
|
-
|
|
301
|
+
**Target: 60-150 lines**
|
|
302
302
|
|
|
303
|
-
###
|
|
303
|
+
### Large (50+ files, monorepo)
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
Root CLAUDE.md (shared rules) + CLAUDE.md per subdirectory.
|
|
306
306
|
|
|
307
307
|
```
|
|
308
308
|
project/
|
|
309
|
-
├── CLAUDE.md ←
|
|
310
|
-
├── packages/api/CLAUDE.md ← API
|
|
311
|
-
├── packages/web/CLAUDE.md ←
|
|
312
|
-
└── .claude/rules/ ←
|
|
309
|
+
├── CLAUDE.md ← shared (60 lines)
|
|
310
|
+
├── packages/api/CLAUDE.md ← API-specific (30 lines)
|
|
311
|
+
├── packages/web/CLAUDE.md ← web-specific (30 lines)
|
|
312
|
+
└── .claude/rules/ ← path-specific rules
|
|
313
313
|
├── security.md
|
|
314
314
|
└── testing.md
|
|
315
315
|
```
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
**Target: root 100 lines + each subdirectory 30 lines**
|
|
318
318
|
|
|
319
319
|
---
|
|
320
320
|
|
|
321
|
-
##
|
|
321
|
+
## Session Separation Principle
|
|
322
322
|
|
|
323
|
-
CLAUDE.md
|
|
323
|
+
Splitting CLAUDE.md writing into separate sessions improves quality:
|
|
324
324
|
|
|
325
|
-
|
|
|
326
|
-
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
|
|
|
325
|
+
| Session | Goal | Output |
|
|
326
|
+
|---------|------|--------|
|
|
327
|
+
| Session 1 | Project exploration + interview | Draft |
|
|
328
|
+
| Session 2 | Validation + optimization | Final version |
|
|
329
|
+
| Ongoing | Incremental maintenance | Continuous improvement |
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
After writing: run `→ /agents-md` skill for optimization validation.
|
|
332
332
|
|
|
333
333
|
---
|
|
334
334
|
|
|
@@ -69,20 +69,20 @@ Write gathered context to `.claude/vibe/design-context.json` using the Write too
|
|
|
69
69
|
"createdAt": "ISO-8601",
|
|
70
70
|
"updatedAt": "ISO-8601",
|
|
71
71
|
"audience": {
|
|
72
|
-
"primary": "
|
|
73
|
-
"context": "
|
|
74
|
-
"expertise": "
|
|
72
|
+
"primary": "Description of target users",
|
|
73
|
+
"context": "Usage environment (desktop/mobile/mixed)",
|
|
74
|
+
"expertise": "Technical level (beginner/intermediate/expert)"
|
|
75
75
|
},
|
|
76
76
|
"brand": {
|
|
77
|
-
"personality": ["
|
|
78
|
-
"tone": "formal | casual | playful | professional (
|
|
79
|
-
"existingAssets": "
|
|
77
|
+
"personality": ["3-5 adjectives"],
|
|
78
|
+
"tone": "formal | casual | playful | professional (guideline, free text allowed)",
|
|
79
|
+
"existingAssets": "Path to existing brand guidelines (optional)"
|
|
80
80
|
},
|
|
81
81
|
"aesthetic": {
|
|
82
|
-
"style": "minimal | bold | elegant | playful | corporate (
|
|
83
|
-
"colorMood": "warm | cool | neutral | vibrant | muted (
|
|
84
|
-
"typographyMood": "modern | classic | geometric | humanist (
|
|
85
|
-
"references": ["
|
|
82
|
+
"style": "minimal | bold | elegant | playful | corporate (guideline, free text allowed)",
|
|
83
|
+
"colorMood": "warm | cool | neutral | vibrant | muted (guideline, free text allowed)",
|
|
84
|
+
"typographyMood": "modern | classic | geometric | humanist (guideline, free text allowed)",
|
|
85
|
+
"references": ["Reference site/app URLs"]
|
|
86
86
|
},
|
|
87
87
|
"constraints": {
|
|
88
88
|
"accessibility": "AA | AAA",
|
|
@@ -91,56 +91,56 @@ Write gathered context to `.claude/vibe/design-context.json` using the Write too
|
|
|
91
91
|
"devices": ["mobile", "tablet", "desktop"]
|
|
92
92
|
},
|
|
93
93
|
"detectedStack": {
|
|
94
|
-
"framework": "
|
|
95
|
-
"componentLibrary": "
|
|
96
|
-
"styling": "
|
|
97
|
-
"fonts": ["
|
|
94
|
+
"framework": "Detected framework",
|
|
95
|
+
"componentLibrary": "Detected component library",
|
|
96
|
+
"styling": "Detected styling approach",
|
|
97
|
+
"fonts": ["Detected fonts"]
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
> **Note**: `tone`, `style`, `colorMood`, `typographyMood`
|
|
102
|
+
> **Note**: `tone`, `style`, `colorMood`, `typographyMood` values are suggestions, not closed enums. Users can enter free text.
|
|
103
103
|
|
|
104
|
-
> **Size limit**: design-context.json
|
|
104
|
+
> **Size limit**: design-context.json should not exceed 10KB. The `references` array is capped at 5 items.
|
|
105
105
|
|
|
106
106
|
### Step 4: Rerun Semantics
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
When `/design-teach` is run again and `design-context.json` already exists:
|
|
109
109
|
|
|
110
|
-
1.
|
|
111
|
-
2.
|
|
112
|
-
3.
|
|
113
|
-
4.
|
|
114
|
-
5. `createdAt
|
|
110
|
+
1. Read the existing file with the Read tool
|
|
111
|
+
2. **Show existing values as defaults** for each question ("Current: professional, clean — do you want to change this?")
|
|
112
|
+
3. User replies "keep" or leaves blank → that field is preserved
|
|
113
|
+
4. New value entered → only that field is replaced (**field-level replacement, not merge**)
|
|
114
|
+
5. `createdAt` is always preserved; only `updatedAt` is updated to the current time
|
|
115
115
|
|
|
116
116
|
### Step 5: Other Skills Reference This Context
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Each design-* skill does the following when it runs:
|
|
119
119
|
|
|
120
120
|
```
|
|
121
121
|
1. Read `.claude/vibe/design-context.json`
|
|
122
|
-
2.
|
|
123
|
-
3.
|
|
124
|
-
4.
|
|
122
|
+
2. File not found → print "Run /design-teach first for better results" → continue with defaults
|
|
123
|
+
3. Parse failure (invalid JSON) → warn "design-context.json parse failed" + continue with defaults → recommend re-running /design-teach
|
|
124
|
+
4. Success → apply context to analysis criteria
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
## Design Workflow Integration
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
Design skills are integrated into 3 phases of the vibe workflow:
|
|
130
130
|
|
|
131
131
|
```
|
|
132
132
|
SPEC Phase:
|
|
133
|
-
① design-context.json
|
|
133
|
+
① Check design-context.json (recommend /design-teach if missing)
|
|
134
134
|
② ui-industry-analyzer → ui-design-system-gen → ui-layout-architect
|
|
135
135
|
|
|
136
136
|
REVIEW Phase:
|
|
137
|
-
③ /design-audit (
|
|
138
|
-
④ /design-critique (UX
|
|
139
|
-
⑤ ui-antipattern-detector (AI slop +
|
|
137
|
+
③ /design-audit (technical quality check)
|
|
138
|
+
④ /design-critique (UX review)
|
|
139
|
+
⑤ ui-antipattern-detector (AI slop + pattern detection)
|
|
140
140
|
|
|
141
141
|
PRE-SHIP Phase:
|
|
142
|
-
⑥ /design-normalize (
|
|
143
|
-
⑦ /design-polish (
|
|
142
|
+
⑥ /design-normalize (design system alignment)
|
|
143
|
+
⑦ /design-polish (final pass)
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
## How Other Skills Use This
|