@su-record/vibe 2.9.15 → 2.9.17

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 (41) hide show
  1. package/CLAUDE.md +100 -190
  2. package/README.ko.md +171 -171
  3. package/README.md +220 -220
  4. package/commands/vibe.docs.md +3 -2
  5. package/dist/cli/auth.d.ts.map +1 -1
  6. package/dist/cli/auth.js +3 -1
  7. package/dist/cli/auth.js.map +1 -1
  8. package/dist/cli/commands/info.d.ts.map +1 -1
  9. package/dist/cli/commands/info.js +7 -2
  10. package/dist/cli/commands/info.js.map +1 -1
  11. package/dist/cli/commands/init.d.ts +0 -10
  12. package/dist/cli/commands/init.d.ts.map +1 -1
  13. package/dist/cli/commands/init.js +6 -77
  14. package/dist/cli/commands/init.js.map +1 -1
  15. package/dist/cli/commands/update.d.ts.map +1 -1
  16. package/dist/cli/commands/update.js +6 -15
  17. package/dist/cli/commands/update.js.map +1 -1
  18. package/dist/cli/postinstall/index.d.ts +0 -4
  19. package/dist/cli/postinstall/index.d.ts.map +1 -1
  20. package/dist/cli/postinstall/index.js +0 -4
  21. package/dist/cli/postinstall/index.js.map +1 -1
  22. package/dist/cli/postinstall/main.d.ts.map +1 -1
  23. package/dist/cli/postinstall/main.js +2 -32
  24. package/dist/cli/postinstall/main.js.map +1 -1
  25. package/dist/cli/postinstall.d.ts +1 -1
  26. package/dist/cli/postinstall.d.ts.map +1 -1
  27. package/dist/cli/postinstall.js +1 -1
  28. package/dist/cli/postinstall.js.map +1 -1
  29. package/dist/cli/setup/ProjectSetup.d.ts +1 -16
  30. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
  31. package/dist/cli/setup/ProjectSetup.js +8 -161
  32. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  33. package/dist/cli/setup.d.ts +1 -1
  34. package/dist/cli/setup.d.ts.map +1 -1
  35. package/dist/cli/setup.js +1 -1
  36. package/dist/cli/setup.js.map +1 -1
  37. package/dist/cli/utils/cli-detector.d.ts +1 -1
  38. package/dist/cli/utils/cli-detector.js +1 -1
  39. package/package.json +1 -1
  40. package/skills/vibe-docs/SKILL.md +221 -171
  41. package/skills/vibe-docs/templates/behavioral-principles.md +47 -0
@@ -1,171 +1,221 @@
1
- ---
2
- name: vibe-docs
3
- tier: standard
4
- description: "Generate project documentation — README, architecture docs, user guide, release notes. Activates on docs, readme, documentation keywords."
5
- triggers: [vibe-docs, docs, documentation, readme, release notes, architecture doc]
6
- priority: 50
7
- ---
8
-
9
- # vibe.docs — Project Documentation Generator
10
-
11
- Generate or update project documentation by analyzing the actual codebase.
12
-
13
- ## Subcommands
14
-
15
- ### `/vibe.docs readme` — README Generation
16
-
17
- Analyze the codebase and generate a complete README.md:
18
-
19
- 1. **Detect project nature**: Read package.json, CLAUDE.md, existing README
20
- 2. **Extract key info**: Tech stack, installation, usage, API surface
21
- 3. **Generate sections**:
22
-
23
- ```markdown
24
- # Project Name
25
- > One-line description from package.json
26
-
27
- ## What is this?
28
- [2-3 sentences explaining the problem and solution]
29
-
30
- ## Quick Start
31
- [Installation + minimal usage example]
32
-
33
- ## Features
34
- [Auto-detected from codebase — exported functions, CLI commands, API endpoints]
35
-
36
- ## Architecture
37
- [High-level module diagram if 5+ source directories]
38
-
39
- ## Configuration
40
- [Detected config files and their purposes]
41
-
42
- ## Development
43
- [Build, test, lint commands from package.json scripts]
44
-
45
- ## License
46
- ```
47
-
48
- **Analysis approach:**
49
- ```
50
- Read: package.json → name, description, scripts, dependencies
51
- Glob: src/**/*.ts → module structure
52
- Grep: pattern="export (function|class|const)" → public API surface
53
- Grep: pattern="(app|router)\.(get|post|put|delete)" → API endpoints
54
- Read: CLAUDE.md → project conventions
55
- ```
56
-
57
- ### `/vibe.docs guide` — User Guide
58
-
59
- Generate a step-by-step user guide:
60
-
61
- 1. **Installation**: Detect package manager, prerequisites
62
- 2. **Configuration**: Find all config files, document each option
63
- 3. **Usage**: Extract CLI commands or API usage patterns
64
- 4. **FAQ**: Common issues from error handling patterns
65
- 5. **Troubleshooting**: Known edge cases from test files
66
-
67
- Output: `docs/GUIDE.md`
68
-
69
- **Analysis approach:**
70
- ```
71
- Read: package.json → bin, scripts, peerDependencies
72
- Glob: src/cli/commands/*.ts → CLI command list
73
- Grep: pattern="throw new|Error\(" → common error scenarios
74
- Grep: pattern="(process\.env|config)\.\w+" → configuration options
75
- ```
76
-
77
- ### `/vibe.docs arch` — Architecture Documentation
78
-
79
- Generate architecture overview with diagrams:
80
-
81
- 1. **Module map**: Directory structure → responsibility mapping
82
- 2. **Dependency graph**: Import analysis → Mermaid diagram
83
- 3. **Data flow**: Entry points → processing → output
84
- 4. **Key decisions**: Extract from CLAUDE.md and code comments
85
-
86
- Output: `docs/ARCHITECTURE.md`
87
-
88
- **Mermaid diagram generation:**
89
- ```
90
- Glob: src/**/ → module list
91
- Grep: pattern="^import .+ from" → dependency edges
92
- Read: CLAUDE.md → architecture notes
93
-
94
- Generate:
95
- graph TD
96
- CLI[CLI Commands] --> Core[Core Logic]
97
- Core --> Infra[Infrastructure]
98
- Infra --> DB[(Database)]
99
- Infra --> API[External APIs]
100
- ```
101
-
102
- ### `/vibe.docs release` — Release Notes
103
-
104
- Generate release notes from git history:
105
-
106
- 1. **Collect**: `git log` since last tag
107
- 2. **Classify**: feat/fix/refactor/docs/chore from commit messages
108
- 3. **Group**: By category with breaking changes highlighted
109
- 4. **Format**: Semantic versioning suggestion
110
-
111
- Output: `RELEASE_NOTES.md` or append to `CHANGELOG.md`
112
-
113
- **Output format:**
114
- ```markdown
115
- ## [x.y.z] - YYYY-MM-DD
116
-
117
- ### Breaking Changes
118
- - ...
119
-
120
- ### Features
121
- - feat: description (#PR)
122
-
123
- ### Bug Fixes
124
- - fix: description (#PR)
125
-
126
- ### Other
127
- - refactor/docs/chore items
128
- ```
129
-
130
- ## Pipeline Integration
131
-
132
- `/vibe.docs` completes the development pipeline:
133
-
134
- ```
135
- /vibe.spec → Design (what to build)
136
- /vibe.run Implement (build it)
137
- /vibe.trace → Verify (prove it works)
138
- /vibe.docs → Document (explain it)
139
- ```
140
-
141
- ### Auto-trigger after `/vibe.trace`
142
-
143
- When `/vibe.trace` completes with all scenarios passing, suggest:
144
- > "All scenarios verified. Run `/vibe.docs readme` to update documentation?"
145
-
146
- ## Guidelines
147
-
148
- ### DO
149
- - Read the actual codebase before generating — never guess
150
- - Preserve existing documentation that's still accurate
151
- - Include concrete code examples from the actual project
152
- - Keep language consistent with project (Korean/English based on CLAUDE.md)
153
- - Use changelog-writer agent for `/vibe.docs release`
154
- - Use api-documenter agent for API-heavy projects
155
- - Use diagrammer agent for `/vibe.docs arch` Mermaid generation
156
-
157
- ### DON'T
158
- - Don't generate placeholder text ("Lorem ipsum", "TODO: fill in")
159
- - Don't document internal implementation details in user-facing docs
160
- - Don't create files without reading existing ones first
161
- - Don't assume features — verify by reading code
162
-
163
- ## Quality Checklist
164
-
165
- Before finalizing any document:
166
-
167
- - [ ] All code examples are runnable (copy-paste ready)
168
- - [ ] Installation steps tested against package.json
169
- - [ ] Links and paths are valid
170
- - [ ] No placeholder text remaining
171
- - [ ] Consistent with project language (Korean/English)
1
+ ---
2
+ name: vibe-docs
3
+ tier: standard
4
+ description: "Generate project documentation — README, architecture docs, user guide, release notes. Activates on docs, readme, documentation keywords."
5
+ triggers: [vibe-docs, docs, documentation, readme, release notes, architecture doc]
6
+ priority: 50
7
+ ---
8
+
9
+ # vibe.docs — Project Documentation Generator
10
+
11
+ Generate or update project documentation by analyzing the actual codebase.
12
+
13
+ ## Subcommands
14
+
15
+ ### `/vibe.docs readme` — README Generation
16
+
17
+ Analyze the codebase and generate a complete README.md:
18
+
19
+ 1. **Detect project nature**: Read package.json, CLAUDE.md, existing README
20
+ 2. **Extract key info**: Tech stack, installation, usage, API surface
21
+ 3. **Generate sections**:
22
+
23
+ ```markdown
24
+ # Project Name
25
+ > One-line description from package.json
26
+
27
+ ## What is this?
28
+ [2-3 sentences explaining the problem and solution]
29
+
30
+ ## Quick Start
31
+ [Installation + minimal usage example]
32
+
33
+ ## Features
34
+ [Auto-detected from codebase — exported functions, CLI commands, API endpoints]
35
+
36
+ ## Architecture
37
+ [High-level module diagram if 5+ source directories]
38
+
39
+ ## Configuration
40
+ [Detected config files and their purposes]
41
+
42
+ ## Development
43
+ [Build, test, lint commands from package.json scripts]
44
+
45
+ ## License
46
+ ```
47
+
48
+ **Analysis approach:**
49
+ ```
50
+ Read: package.json → name, description, scripts, dependencies
51
+ Glob: src/**/*.ts → module structure
52
+ Grep: pattern="export (function|class|const)" → public API surface
53
+ Grep: pattern="(app|router)\.(get|post|put|delete)" → API endpoints
54
+ Read: CLAUDE.md → project conventions
55
+ ```
56
+
57
+ ### `/vibe.docs guide` — User Guide
58
+
59
+ Generate a step-by-step user guide:
60
+
61
+ 1. **Installation**: Detect package manager, prerequisites
62
+ 2. **Configuration**: Find all config files, document each option
63
+ 3. **Usage**: Extract CLI commands or API usage patterns
64
+ 4. **FAQ**: Common issues from error handling patterns
65
+ 5. **Troubleshooting**: Known edge cases from test files
66
+
67
+ Output: `docs/GUIDE.md`
68
+
69
+ **Analysis approach:**
70
+ ```
71
+ Read: package.json → bin, scripts, peerDependencies
72
+ Glob: src/cli/commands/*.ts → CLI command list
73
+ Grep: pattern="throw new|Error\(" → common error scenarios
74
+ Grep: pattern="(process\.env|config)\.\w+" → configuration options
75
+ ```
76
+
77
+ ### `/vibe.docs arch` — Architecture Documentation
78
+
79
+ Generate architecture overview with diagrams:
80
+
81
+ 1. **Module map**: Directory structure → responsibility mapping
82
+ 2. **Dependency graph**: Import analysis → Mermaid diagram
83
+ 3. **Data flow**: Entry points → processing → output
84
+ 4. **Key decisions**: Extract from CLAUDE.md and code comments
85
+
86
+ Output: `docs/ARCHITECTURE.md`
87
+
88
+ **Mermaid diagram generation:**
89
+ ```
90
+ Glob: src/**/ → module list
91
+ Grep: pattern="^import .+ from" → dependency edges
92
+ Read: CLAUDE.md → architecture notes
93
+
94
+ Generate:
95
+ graph TD
96
+ CLI[CLI Commands] --> Core[Core Logic]
97
+ Core --> Infra[Infrastructure]
98
+ Infra --> DB[(Database)]
99
+ Infra --> API[External APIs]
100
+ ```
101
+
102
+ ### `/vibe.docs agent` — Agent Instruction Files (CLAUDE.md / AGENTS.md)
103
+
104
+ **CLI file mapping:**
105
+
106
+ | CLI | File | Support |
107
+ |---|---|---|
108
+ | Claude Code | `CLAUDE.md` | 100% (Primary) |
109
+ | coco | `AGENTS.md` | 100% (Primary) |
110
+
111
+ Gemini CLI / Codex CLI / Cursor are not supported — do not generate or check `GEMINI.md`.
112
+
113
+ **Source of truth:**
114
+ - **`CLAUDE.md` is the content SSOT.** Always edit it first; `AGENTS.md` is a regenerated derivative.
115
+ - Behavioral block: `skills/vibe-docs/templates/behavioral-principles.md` (4 Karpathy principles, wrapped in `<!-- VIBE-BEHAVIORAL:START/END -->` markers).
116
+
117
+ **Procedure (applies to both creation and modification):**
118
+
119
+ 1. **Detect state** — check which of `CLAUDE.md` / `AGENTS.md` exist in project root. **`CLAUDE.md` is always the SSOT**; if missing, create it first (never derive from AGENTS.md).
120
+ 2. **For `AGENTS.md`**:
121
+ - **If missing** → create by cloning `CLAUDE.md` + applying CLI substitution (below).
122
+ - **If exists** → regenerate from current `CLAUDE.md` + substitution, preserving user-specific additions outside the VIBE block.
123
+ 3. **CLI substitution for `AGENTS.md`** (coco): `Claude Code` → `coco` · `~/.claude/` → `~/.coco/` · `.claude/` → `.coco/` · `CLAUDE.md` → `AGENTS.md`. `CLAUDE.md` itself gets no substitution.
124
+ 4. **Validate every touched file (whether newly created or modified)** via the `claude-md-guide` → `agents-md` skill chain — see validation block below. **Never write or save without running this step.**
125
+ 5. Report per file: created / updated / skipped / validation warnings.
126
+
127
+ **Idempotent:** Re-running re-syncs the behavioral block and re-applies substitutions without duplication.
128
+
129
+ **Mandatory validation (every create & every update) — invoke `claude-md-guide` → `agents-md`:**
130
+
131
+ 1. **`claude-md-guide`**:
132
+ - Size target 60–150 lines (Optimal). Warn at 200+, force split/trim at 300+.
133
+ - 4-question check per line (outside `VIBE-BEHAVIORAL` block):
134
+ - Would the agent make a mistake without this? (No → delete)
135
+ - Needed every session? (No → move to SPEC/plan)
136
+ - Can a linter/hook replace it? (Yes → move)
137
+ - Discoverable from code? (Yes delete)
138
+ - Lost-in-the-Middle: critical rules at top, frequently-violated rules at bottom.
139
+ 2. **`agents-md`**:
140
+ - Addy Osmani test: "Can the agent discover this by reading the code?" → Yes = delete.
141
+ - Strip tech-stack name-drops already stated in `package.json`.
142
+
143
+ Report line ranges to trim per file. Do not auto-delete; surface findings for user approval before finalizing.
144
+
145
+ **When to run:**
146
+ - After `vibe init` / `vibe update` if `CLAUDE.md` or `AGENTS.md` is missing or out of sync.
147
+ - After upgrading `@su-record/vibe` when the behavioral template changes.
148
+ - Whenever the SSOT file is edited — re-sync `AGENTS.md`.
149
+ - User explicitly asks to refresh agent instructions.
150
+
151
+ ### `/vibe.docs release` Release Notes
152
+
153
+ Generate release notes from git history:
154
+
155
+ 1. **Collect**: `git log` since last tag
156
+ 2. **Classify**: feat/fix/refactor/docs/chore from commit messages
157
+ 3. **Group**: By category with breaking changes highlighted
158
+ 4. **Format**: Semantic versioning suggestion
159
+
160
+ Output: `RELEASE_NOTES.md` or append to `CHANGELOG.md`
161
+
162
+ **Output format:**
163
+ ```markdown
164
+ ## [x.y.z] - YYYY-MM-DD
165
+
166
+ ### Breaking Changes
167
+ - ...
168
+
169
+ ### Features
170
+ - feat: description (#PR)
171
+
172
+ ### Bug Fixes
173
+ - fix: description (#PR)
174
+
175
+ ### Other
176
+ - refactor/docs/chore items
177
+ ```
178
+
179
+ ## Pipeline Integration
180
+
181
+ `/vibe.docs` completes the development pipeline:
182
+
183
+ ```
184
+ /vibe.spec → Design (what to build)
185
+ /vibe.run → Implement (build it)
186
+ /vibe.trace → Verify (prove it works)
187
+ /vibe.docs → Document (explain it)
188
+ ```
189
+
190
+ ### Auto-trigger after `/vibe.trace`
191
+
192
+ When `/vibe.trace` completes with all scenarios passing, suggest:
193
+ > "All scenarios verified. Run `/vibe.docs readme` to update documentation?"
194
+
195
+ ## Guidelines
196
+
197
+ ### DO
198
+ - Read the actual codebase before generating — never guess
199
+ - Preserve existing documentation that's still accurate
200
+ - Include concrete code examples from the actual project
201
+ - Keep language consistent with project (Korean/English based on CLAUDE.md)
202
+ - Use changelog-writer agent for `/vibe.docs release`
203
+ - Use api-documenter agent for API-heavy projects
204
+ - Use diagrammer agent for `/vibe.docs arch` Mermaid generation
205
+ - Use `claude-md-guide` → `agents-md` chain for `/vibe.docs agent` — applies equally to CLAUDE.md and AGENTS.md
206
+
207
+ ### DON'T
208
+ - Don't generate placeholder text ("Lorem ipsum", "TODO: fill in")
209
+ - Don't document internal implementation details in user-facing docs
210
+ - Don't create files without reading existing ones first
211
+ - Don't assume features — verify by reading code
212
+
213
+ ## Quality Checklist
214
+
215
+ Before finalizing any document:
216
+
217
+ - [ ] All code examples are runnable (copy-paste ready)
218
+ - [ ] Installation steps tested against package.json
219
+ - [ ] Links and paths are valid
220
+ - [ ] No placeholder text remaining
221
+ - [ ] Consistent with project language (Korean/English)
@@ -0,0 +1,47 @@
1
+ <!-- VIBE-BEHAVIORAL:START -->
2
+ ## Behavioral Principles (Karpathy-Inspired)
3
+
4
+ Derived from Andrej Karpathy's observations on LLM coding pitfalls.
5
+ Source: https://github.com/forrestchang/andrej-karpathy-skills
6
+
7
+ ### Think Before Coding
8
+
9
+ **Don't assume. Don't hide confusion. Surface tradeoffs.**
10
+
11
+ - State assumptions explicitly. If uncertain, ask rather than guess.
12
+ - Present multiple interpretations — don't pick silently when ambiguity exists.
13
+ - Push back when a simpler approach exists.
14
+ - Stop when confused. Name what's unclear. Ask.
15
+
16
+ ### Simplicity First
17
+
18
+ **Minimum code that solves the problem. Nothing speculative.**
19
+
20
+ - No features beyond what was asked.
21
+ - No abstractions for single-use code.
22
+ - No flexibility or configurability that wasn't requested.
23
+ - No error handling for impossible scenarios.
24
+ - If 200 lines could be 50, rewrite it.
25
+
26
+ ### Surgical Changes
27
+
28
+ **Touch only what you must. Clean up only your own mess.**
29
+
30
+ - Don't improve adjacent code, comments, or formatting.
31
+ - Don't refactor things that aren't broken.
32
+ - Match existing style, even if you'd do it differently.
33
+ - Remove orphans YOUR changes created — leave pre-existing dead code alone.
34
+ - Every changed line should trace to the user's request.
35
+
36
+ ### Goal-Driven Execution
37
+
38
+ **Define success criteria. Loop until verified.**
39
+
40
+ | Instead of | Transform to |
41
+ |------------|--------------|
42
+ | "Add validation" | "Write tests for invalid inputs, then make them pass" |
43
+ | "Fix the bug" | "Write a test that reproduces it, then make it pass" |
44
+ | "Refactor X" | "Ensure tests pass before and after" |
45
+
46
+ Strong success criteria enable independent looping. Weak criteria ("make it work") require constant clarification.
47
+ <!-- VIBE-BEHAVIORAL:END -->