moicle 2.0.0 → 2.1.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.
- package/README.md +13 -7
- package/assets/architecture/_shared/severity-levels.md +34 -0
- package/assets/architecture/_shared/stack-detection.md +34 -0
- package/assets/commands/marketing.md +7 -7
- package/assets/skills/docs/sync/SKILL.md +159 -519
- package/assets/skills/docs/write/SKILL.md +89 -186
- package/assets/skills/feature/new/SKILL.md +152 -192
- package/assets/skills/feature/refactor/SKILL.md +152 -233
- package/assets/skills/fix/hotfix/SKILL.md +139 -305
- package/assets/skills/fix/incident/SKILL.md +107 -19
- package/assets/skills/fix/pr-comment/SKILL.md +98 -224
- package/assets/skills/fix/root-cause/SKILL.md +161 -104
- package/assets/skills/{docs → marketing}/content/SKILL.md +4 -4
- package/assets/skills/marketing/logo/SKILL.md +252 -0
- package/assets/skills/marketing/seo-blog/SKILL.md +367 -0
- package/assets/skills/marketing/video/SKILL.md +258 -0
- package/assets/skills/research/onboarding/SKILL.md +127 -510
- package/assets/skills/research/spike/SKILL.md +128 -436
- package/assets/skills/research/web/SKILL.md +124 -83
- package/assets/skills/review/architect/SKILL.md +157 -306
- package/assets/skills/review/branch/SKILL.md +153 -208
- package/assets/skills/review/pr/SKILL.md +129 -519
- package/assets/skills/review/tdd/SKILL.md +108 -69
- package/package.json +1 -1
- package/assets/skills/docs/logo/SKILL.md +0 -492
- package/assets/skills/docs/video/SKILL.md +0 -666
|
@@ -5,15 +5,19 @@ description: Documentation workflow for authoring project documentation manually
|
|
|
5
5
|
|
|
6
6
|
# Documentation Workflow
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Hand-author project docs (README, API.md, ARCHITECTURE.md, CONTRIBUTING.md) with full control over voice and structure. For automated batch generation of a whole `docs/` tree with a review loop, use `/docs:sync` instead.
|
|
9
9
|
|
|
10
10
|
## When to use this skill
|
|
11
11
|
|
|
12
|
-
- ✅ Authoring or updating a specific document
|
|
13
|
-
- ✅ Need
|
|
12
|
+
- ✅ Authoring or updating a specific document
|
|
13
|
+
- ✅ Need opinionated prose, not just structure
|
|
14
14
|
- ✅ Doc is small / scoped — a single file or section
|
|
15
|
-
- ❌ Want
|
|
16
|
-
- ❌ Just need API reference from OpenAPI
|
|
15
|
+
- ❌ Want automated multi-doc generation → use `/docs:sync`
|
|
16
|
+
- ❌ Just need API reference from OpenAPI → use `/feature:api` Phase 4
|
|
17
|
+
|
|
18
|
+
## Read Architecture First
|
|
19
|
+
|
|
20
|
+
Detect stack via `~/.claude/architecture/_shared/stack-detection.md`. Read `ddd-architecture.md` + stack doc. Docs must reflect the architecture, not contradict it.
|
|
17
21
|
|
|
18
22
|
---
|
|
19
23
|
|
|
@@ -23,98 +27,71 @@ Author project documentation manually following stack conventions. **Use this wh
|
|
|
23
27
|
SCAN → ANALYZE → GENERATE → REVIEW (loop)
|
|
24
28
|
```
|
|
25
29
|
|
|
26
|
-
## Read Architecture First
|
|
27
|
-
|
|
28
|
-
Before writing, read:
|
|
29
|
-
1. `~/.claude/architecture/ddd-architecture.md` (core)
|
|
30
|
-
2. Stack-specific doc (see Stack Detection below)
|
|
31
|
-
3. `.claude/architecture/` for project overrides (if any)
|
|
32
|
-
|
|
33
|
-
**Documentation must accurately reflect the architecture and patterns used in the codebase.**
|
|
34
|
-
|
|
35
|
-
### Stack Detection
|
|
36
|
-
| File | Doc |
|
|
37
|
-
|------|-----|
|
|
38
|
-
| `go.mod` | `go-backend.md` |
|
|
39
|
-
| `package.json` + NestJS dep | `nodejs-nestjs.md` |
|
|
40
|
-
| `package.json` + Vite config | `react-frontend.md` |
|
|
41
|
-
| `remix.config.*` | `remix-fullstack.md` |
|
|
42
|
-
| `composer.json` | `laravel-backend.md` |
|
|
43
|
-
| `pubspec.yaml` | `flutter-mobile.md` |
|
|
44
|
-
|
|
45
30
|
---
|
|
46
31
|
|
|
47
32
|
## Phase 1: SCAN
|
|
48
33
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- ARCHITECTURE (system design, layer rules)
|
|
62
|
-
- CONTRIBUTING (dev setup, PR flow, conventions)
|
|
63
|
-
- Setup / deployment guides
|
|
64
|
-
- Database schema
|
|
65
|
-
- Configuration reference
|
|
34
|
+
```bash
|
|
35
|
+
tree -L 3 -I 'node_modules|vendor|dist|build'
|
|
36
|
+
find . -maxdepth 3 -name "*.md" -o -name "README*"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Identify what needs work:
|
|
40
|
+
- README (project overview)
|
|
41
|
+
- API.md (endpoints, schemas)
|
|
42
|
+
- ARCHITECTURE.md (system design)
|
|
43
|
+
- CONTRIBUTING.md (dev setup, PR flow)
|
|
44
|
+
- Setup / deployment / runbook
|
|
45
|
+
- DB schema, config reference
|
|
66
46
|
|
|
67
47
|
### Gate
|
|
68
48
|
- [ ] Architecture doc read
|
|
69
49
|
- [ ] Existing docs inventoried
|
|
70
|
-
- [ ] Gaps identified
|
|
71
|
-
- [ ] Priorities set (high → low)
|
|
50
|
+
- [ ] Gaps identified, priorities set
|
|
72
51
|
|
|
73
52
|
---
|
|
74
53
|
|
|
75
54
|
## Phase 2: ANALYZE
|
|
76
55
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- **
|
|
81
|
-
- **Audience** — new contributor / API consumer / ops team?
|
|
82
|
-
- **Source** — which files / sections of the codebase feed this doc?
|
|
56
|
+
For each doc define:
|
|
57
|
+
- **Purpose** — what problem does this solve?
|
|
58
|
+
- **Audience** — new contributor / API consumer / on-call?
|
|
59
|
+
- **Source** — which files / sections of the code feed this doc?
|
|
83
60
|
|
|
84
61
|
### Required sections per doc type
|
|
85
62
|
|
|
86
|
-
**README.md**
|
|
63
|
+
**README.md**
|
|
87
64
|
- One-line description + badges
|
|
88
|
-
- Quick start (
|
|
65
|
+
- Quick start (≤5 commands)
|
|
89
66
|
- Tech stack (link to architecture)
|
|
90
67
|
- Common commands (build / test / lint / dev)
|
|
91
68
|
- Project structure (top 2 levels only)
|
|
92
|
-
- Link to ARCHITECTURE.md
|
|
69
|
+
- Link to ARCHITECTURE.md / CONTRIBUTING.md / API.md
|
|
93
70
|
|
|
94
|
-
**API.md**
|
|
95
|
-
- Auth method
|
|
71
|
+
**API.md**
|
|
72
|
+
- Auth method + how to obtain credentials
|
|
96
73
|
- Base URL per environment
|
|
97
|
-
-
|
|
74
|
+
- Per endpoint: method, path, request, response, errors, example
|
|
98
75
|
- Pagination convention (one block, not per endpoint)
|
|
99
76
|
- Error response format (one block, not per endpoint)
|
|
100
77
|
- Rate limits, versioning policy
|
|
101
78
|
|
|
102
|
-
**ARCHITECTURE.md**
|
|
103
|
-
-
|
|
104
|
-
- Domain list with 1-line responsibility
|
|
79
|
+
**ARCHITECTURE.md**
|
|
80
|
+
- One mermaid layer diagram
|
|
81
|
+
- Domain list with 1-line responsibility
|
|
105
82
|
- Cross-domain communication pattern (events)
|
|
106
|
-
- Key tech decisions (
|
|
107
|
-
- Link to stack
|
|
83
|
+
- Key tech decisions (DB, queue, auth) with rationale
|
|
84
|
+
- Link to `~/.claude/architecture/<stack>.md` for layer rules
|
|
108
85
|
|
|
109
|
-
**CONTRIBUTING.md**
|
|
86
|
+
**CONTRIBUTING.md**
|
|
110
87
|
- Local dev setup (prerequisites + ≤5 steps)
|
|
111
|
-
- Branch
|
|
88
|
+
- Branch + commit conventions
|
|
112
89
|
- PR flow + review expectations
|
|
113
90
|
- Test commands + coverage expectations
|
|
114
91
|
- Where to ask for help
|
|
115
92
|
|
|
116
93
|
### Gate
|
|
117
|
-
- [ ] Each doc has
|
|
94
|
+
- [ ] Each doc has purpose, audience, source
|
|
118
95
|
- [ ] Required sections listed
|
|
119
96
|
- [ ] Aligned with architecture doc
|
|
120
97
|
|
|
@@ -122,83 +99,50 @@ For each doc:
|
|
|
122
99
|
|
|
123
100
|
## Phase 3: GENERATE
|
|
124
101
|
|
|
125
|
-
**Goal:** write each doc using actual code examples from the codebase.
|
|
126
|
-
|
|
127
102
|
### Rules
|
|
128
103
|
- **Use real code from the repo** — never invent examples
|
|
129
104
|
- **Link to architecture docs**, don't duplicate them
|
|
130
105
|
- **Code blocks must be runnable** — copy verbatim from working files
|
|
131
|
-
- **Diagrams** —
|
|
132
|
-
- **Tables** for any list with >3
|
|
106
|
+
- **Diagrams** — mermaid; one per major concept
|
|
107
|
+
- **Tables** for any list with >3 parallel items (endpoints, env vars, commands)
|
|
133
108
|
|
|
134
|
-
###
|
|
109
|
+
### Minimal skeletons
|
|
135
110
|
|
|
111
|
+
Use these as starting points. For full templates, see `/docs:sync` (which generates the full set).
|
|
112
|
+
|
|
113
|
+
**README.md** (≤80 lines for most projects)
|
|
136
114
|
```markdown
|
|
137
115
|
# {Project Name}
|
|
138
116
|
|
|
139
117
|
> One-line value proposition.
|
|
140
118
|
|
|
141
|
-
[](link) [](link)
|
|
142
|
-
|
|
143
119
|
## Quick Start
|
|
144
|
-
|
|
145
120
|
```bash
|
|
146
121
|
{install}
|
|
147
122
|
{run}
|
|
148
123
|
```
|
|
149
124
|
|
|
150
125
|
## Tech Stack
|
|
126
|
+
- {language + version}, {framework}, {DB / queue}
|
|
151
127
|
|
|
152
|
-
|
|
153
|
-
- {framework}
|
|
154
|
-
- {DB / queue / cache}
|
|
155
|
-
|
|
156
|
-
See [ARCHITECTURE.md](./ARCHITECTURE.md) for layer structure.
|
|
157
|
-
|
|
158
|
-
## Common Commands
|
|
128
|
+
See [ARCHITECTURE.md](./ARCHITECTURE.md).
|
|
159
129
|
|
|
130
|
+
## Commands
|
|
160
131
|
| Command | Purpose |
|
|
161
132
|
|---------|---------|
|
|
162
|
-
| `{cmd}` | {what
|
|
163
|
-
|
|
164
|
-
## Project Structure
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
{top 2 levels only}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Documentation
|
|
133
|
+
| `{cmd}` | {what} |
|
|
171
134
|
|
|
172
|
-
|
|
173
|
-
- [ARCHITECTURE.md](./ARCHITECTURE.md)
|
|
174
|
-
- [CONTRIBUTING.md](./CONTRIBUTING.md) — dev guide
|
|
135
|
+
## Docs
|
|
136
|
+
- [API.md](./API.md) · [ARCHITECTURE.md](./ARCHITECTURE.md) · [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
175
137
|
```
|
|
176
138
|
|
|
177
|
-
|
|
178
|
-
|
|
139
|
+
**API.md** (per-endpoint block)
|
|
179
140
|
```markdown
|
|
180
|
-
# API Reference
|
|
181
|
-
|
|
182
|
-
**Base URL:** `https://api.example.com/v1`
|
|
183
|
-
**Auth:** Bearer token in `Authorization` header
|
|
184
|
-
|
|
185
|
-
## Errors
|
|
186
|
-
|
|
187
|
-
All errors return JSON:
|
|
188
|
-
```json
|
|
189
|
-
{ "error": { "code": "STRING", "message": "STRING", "details": {} } }
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Pagination
|
|
193
|
-
|
|
194
|
-
Cursor-based: `?cursor=<opaque>&limit=<int, default 20, max 100>`.
|
|
195
|
-
Response includes `pagination.next_cursor` (null if last page).
|
|
196
|
-
|
|
197
|
-
## Endpoints
|
|
198
|
-
|
|
199
141
|
### POST /resource
|
|
200
142
|
|
|
201
|
-
Create a resource.
|
|
143
|
+
Create a resource. Idempotent via `Idempotency-Key` header.
|
|
144
|
+
|
|
145
|
+
**Auth:** Bearer
|
|
202
146
|
|
|
203
147
|
**Request**
|
|
204
148
|
```json
|
|
@@ -210,115 +154,75 @@ Create a resource.
|
|
|
210
154
|
{ "id": "...", "field": "value" }
|
|
211
155
|
```
|
|
212
156
|
|
|
213
|
-
**Errors:** 400
|
|
157
|
+
**Errors:** `invalid_field` 400 · `unauthorized` 401 · `already_exists` 409
|
|
214
158
|
```
|
|
215
159
|
|
|
216
|
-
|
|
217
|
-
|
|
160
|
+
**ARCHITECTURE.md** opener
|
|
218
161
|
```markdown
|
|
219
162
|
# Architecture
|
|
220
163
|
|
|
221
164
|
## Overview
|
|
222
|
-
|
|
223
165
|
{1-2 paragraphs: what this system does, key constraints}
|
|
224
166
|
|
|
225
|
-
##
|
|
226
|
-
|
|
167
|
+
## Layers
|
|
227
168
|
```mermaid
|
|
228
169
|
graph TD
|
|
229
170
|
App[Application] --> Domain
|
|
230
171
|
Domain --> Infra[Infrastructure]
|
|
231
172
|
```
|
|
232
|
-
|
|
233
|
-
See [DDD architecture reference](~/.claude/architecture/ddd-architecture.md) for layer rules.
|
|
173
|
+
See [DDD rules](~/.claude/architecture/ddd-architecture.md) for layer details.
|
|
234
174
|
|
|
235
175
|
## Domains
|
|
236
|
-
|
|
237
176
|
| Domain | Responsibility |
|
|
238
|
-
|
|
177
|
+
|--------|---------------|
|
|
239
178
|
| {name} | {one line} |
|
|
240
|
-
|
|
241
|
-
## Cross-Domain Communication
|
|
242
|
-
|
|
243
|
-
Domains communicate via **domain events** (no direct imports).
|
|
244
|
-
|
|
245
|
-
```mermaid
|
|
246
|
-
sequenceDiagram
|
|
247
|
-
DomainA->>EventBus: raises Event
|
|
248
|
-
EventBus->>DomainB: Listener consumes
|
|
249
179
|
```
|
|
250
180
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
| Decision | Rationale |
|
|
254
|
-
|----------|-----------|
|
|
255
|
-
| {tech / pattern} | {why} |
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### Skeleton — CONTRIBUTING.md
|
|
259
|
-
|
|
181
|
+
**CONTRIBUTING.md** opener
|
|
260
182
|
```markdown
|
|
261
183
|
# Contributing
|
|
262
184
|
|
|
263
|
-
## Prerequisites
|
|
264
|
-
- {runtime + version}
|
|
265
|
-
- {DB / service}
|
|
266
|
-
|
|
267
185
|
## Setup
|
|
268
186
|
```bash
|
|
269
187
|
{1-5 commands}
|
|
270
188
|
```
|
|
271
189
|
|
|
272
|
-
## Branch
|
|
190
|
+
## Branch + Commits
|
|
273
191
|
- Branch: `{prefix}/{ticket}-{slug}`
|
|
274
|
-
- Commit: Conventional Commits
|
|
192
|
+
- Commit: Conventional Commits
|
|
275
193
|
|
|
276
194
|
## PR Flow
|
|
277
|
-
1. Open PR
|
|
278
|
-
2. CI
|
|
279
|
-
3.
|
|
195
|
+
1. Open PR vs `{base}`
|
|
196
|
+
2. CI green
|
|
197
|
+
3. ≥1 review approval
|
|
280
198
|
4. Squash merge
|
|
281
|
-
|
|
282
|
-
## Tests
|
|
283
|
-
```bash
|
|
284
|
-
{test command}
|
|
285
|
-
```
|
|
286
|
-
Coverage target: {N}%
|
|
287
|
-
|
|
288
|
-
## Help
|
|
289
|
-
- {Slack / issue / discussion link}
|
|
290
199
|
```
|
|
291
200
|
|
|
292
201
|
### Gate
|
|
293
202
|
- [ ] All planned docs drafted
|
|
294
|
-
- [ ] Code examples taken from real files
|
|
295
|
-
- [ ] Diagrams render
|
|
203
|
+
- [ ] Code examples taken from real files
|
|
204
|
+
- [ ] Diagrams render
|
|
296
205
|
- [ ] Cross-links between docs work
|
|
297
206
|
|
|
298
207
|
---
|
|
299
208
|
|
|
300
209
|
## Phase 4: REVIEW
|
|
301
210
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
### Review checklist per doc
|
|
305
|
-
|
|
211
|
+
### Per-doc checklist
|
|
306
212
|
- [ ] Reflects current architecture (not outdated)
|
|
307
213
|
- [ ] All commands run as written (try them)
|
|
308
214
|
- [ ] All file paths exist
|
|
309
215
|
- [ ] All endpoints / functions referenced still exist
|
|
310
|
-
- [ ]
|
|
216
|
+
- [ ] Internal + external links resolve
|
|
311
217
|
- [ ] Code blocks compile / are valid syntax
|
|
312
218
|
- [ ] Diagrams match actual code structure
|
|
313
219
|
|
|
314
220
|
### Cross-doc consistency
|
|
315
|
-
|
|
316
|
-
- [ ] README references match other docs' content
|
|
317
|
-
- [ ] Same terminology used everywhere (e.g., "domain" vs "module")
|
|
221
|
+
- [ ] Same terminology everywhere (e.g., "domain" vs "module")
|
|
318
222
|
- [ ] No duplicated info — link instead
|
|
319
223
|
|
|
320
224
|
### Loop
|
|
321
|
-
If any issue
|
|
225
|
+
If any issue → return to Phase 3 for that doc, fix, re-review.
|
|
322
226
|
|
|
323
227
|
---
|
|
324
228
|
|
|
@@ -327,19 +231,12 @@ If any issue found → go back to **Phase 3** for that doc, fix, re-review.
|
|
|
327
231
|
```markdown
|
|
328
232
|
## Documentation Update
|
|
329
233
|
|
|
330
|
-
### Files
|
|
234
|
+
### Files
|
|
331
235
|
- `README.md` — {changes}
|
|
332
236
|
- `API.md` — {changes}
|
|
333
237
|
- `ARCHITECTURE.md` — {changes}
|
|
334
238
|
- `CONTRIBUTING.md` — {changes}
|
|
335
239
|
|
|
336
|
-
### Coverage
|
|
337
|
-
- [x] Project overview
|
|
338
|
-
- [x] API reference
|
|
339
|
-
- [x] Architecture
|
|
340
|
-
- [x] Contributing guide
|
|
341
|
-
- [ ] Deployment (out of scope)
|
|
342
|
-
|
|
343
240
|
### Verification
|
|
344
241
|
- [x] All commands tested
|
|
345
242
|
- [x] All links resolve
|
|
@@ -348,24 +245,30 @@ If any issue found → go back to **Phase 3** for that doc, fix, re-review.
|
|
|
348
245
|
|
|
349
246
|
---
|
|
350
247
|
|
|
248
|
+
## Hard Rules
|
|
249
|
+
|
|
250
|
+
- **Real examples only** — invented code drifts and lies
|
|
251
|
+
- **Link, don't duplicate** — refer to architecture docs, don't restate rules
|
|
252
|
+
- **Test every command** before publishing
|
|
253
|
+
- **Update the doc when you change the code** — stale docs are worse than no docs
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
351
257
|
## Related Skills
|
|
352
258
|
|
|
353
259
|
| When | Use |
|
|
354
260
|
|------|-----|
|
|
355
|
-
| Generate full doc site from codebase
|
|
356
|
-
| Document a newly added API endpoint | `/feature:api`
|
|
357
|
-
| Onboard
|
|
358
|
-
| Write
|
|
359
|
-
|
|
360
|
-
---
|
|
261
|
+
| Generate full doc site from codebase | `/docs:sync` |
|
|
262
|
+
| Document a newly added API endpoint | `/feature:api` Phase 4 |
|
|
263
|
+
| Onboard self / new dev | `/research:onboarding` |
|
|
264
|
+
| Write blog / social content | `/marketing:content` |
|
|
361
265
|
|
|
362
266
|
## Recommended Agents
|
|
363
267
|
|
|
364
268
|
| Phase | Agent | Purpose |
|
|
365
269
|
|-------|-------|---------|
|
|
366
|
-
| SCAN | `@clean-architect` | Identify doc needs
|
|
270
|
+
| SCAN | `@clean-architect` | Identify doc needs |
|
|
367
271
|
| ANALYZE (API) | `@api-designer` | API doc structure |
|
|
368
272
|
| ANALYZE (DB) | `@db-designer` | Database doc structure |
|
|
369
273
|
| GENERATE | `@docs-writer` | Write all docs |
|
|
370
|
-
| REVIEW | `@code-reviewer` | Verify accuracy
|
|
371
|
-
| REVIEW | Stack-specific dev agent | Stack-specific review |
|
|
274
|
+
| REVIEW | `@code-reviewer` | Verify accuracy vs code |
|