moicle 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -9
- 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/bin/cli.js +2 -2
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +176 -8
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +31 -1
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +30 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +64 -8
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/utils/symlink.d.ts +1 -0
- package/dist/utils/symlink.d.ts.map +1 -1
- package/dist/utils/symlink.js +8 -6
- package/dist/utils/symlink.js.map +1 -1
- package/package.json +1 -1
- package/assets/skills/docs/logo/SKILL.md +0 -492
- package/assets/skills/docs/video/SKILL.md +0 -666
|
@@ -5,7 +5,7 @@ description: Codebase onboarding workflow for understanding new projects. Use wh
|
|
|
5
5
|
|
|
6
6
|
# Codebase Onboarding Workflow
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Ramp up on a new codebase quickly: structure, conventions, where things live, how to make a first change.
|
|
9
9
|
|
|
10
10
|
## When to use this skill
|
|
11
11
|
|
|
@@ -18,572 +18,189 @@ Complete workflow for understanding and navigating new codebases effectively.
|
|
|
18
18
|
|
|
19
19
|
## Read Architecture First
|
|
20
20
|
|
|
21
|
-
Read `ddd-architecture.md` + stack
|
|
21
|
+
Detect stack with `~/.claude/architecture/_shared/stack-detection.md`. Read `ddd-architecture.md` + the stack doc. Architecture context speeds up everything below by 10x.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
24
26
|
|
|
25
27
|
```
|
|
26
|
-
|
|
27
|
-
│ 1. SCAN │──▶│ 2. ANALYZE──▶│ 3. EXPLAIN──▶│ 4. GUIDE │
|
|
28
|
-
└──────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
29
|
-
│ │ │ │
|
|
30
|
-
└──────────────┴───────────────┴──────────────┘
|
|
31
|
-
Comprehensive Understanding
|
|
28
|
+
SCAN → ANALYZE → EXPLAIN → GUIDE (first commit checklist)
|
|
32
29
|
```
|
|
33
30
|
|
|
34
31
|
---
|
|
35
32
|
|
|
36
|
-
## Phase 1: SCAN
|
|
37
|
-
|
|
38
|
-
**Goal**: Get a quick overview of project structure and tech stack
|
|
39
|
-
|
|
40
|
-
### Actions
|
|
41
|
-
1. Identify project type and stack:
|
|
42
|
-
```bash
|
|
43
|
-
# Check package files
|
|
44
|
-
ls -la | grep -E "package.json|pubspec.yaml|go.mod|composer.json|requirements.txt"
|
|
45
|
-
|
|
46
|
-
# Check framework markers
|
|
47
|
-
ls -la | grep -E "next.config|vite.config|angular.json|remix.config"
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
2. **Identify and read the appropriate architecture doc** based on stack
|
|
51
|
-
|
|
52
|
-
3. Scan directory structure:
|
|
53
|
-
```bash
|
|
54
|
-
tree -L 2 -I 'node_modules|vendor|dist|build|.git'
|
|
55
|
-
# or
|
|
56
|
-
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g'
|
|
57
|
-
```
|
|
33
|
+
## Phase 1: SCAN (10-20 min)
|
|
58
34
|
|
|
59
|
-
|
|
60
|
-
- `package.json` (Node.js/JS)
|
|
61
|
-
- `pubspec.yaml` (Flutter)
|
|
62
|
-
- `go.mod` (Go)
|
|
63
|
-
- `composer.json` (PHP/Laravel)
|
|
64
|
-
- `requirements.txt` (Python)
|
|
35
|
+
**Goal:** map the territory before reading any business code.
|
|
65
36
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- docs/ directory
|
|
70
|
-
- .claude/architecture/ (project-specific)
|
|
37
|
+
```bash
|
|
38
|
+
# Structure
|
|
39
|
+
tree -L 2 -I 'node_modules|vendor|dist|build|.git'
|
|
71
40
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## Project Scan Results
|
|
41
|
+
# Tech surface
|
|
42
|
+
ls -la | grep -E "package.json|pubspec.yaml|go.mod|composer.json|Dockerfile|Makefile"
|
|
75
43
|
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
- **Framework**: [React/Flutter/Gin/Laravel/Django/etc]
|
|
79
|
-
- **Architecture Doc**: [path to applicable architecture reference]
|
|
80
|
-
- **Build Tool**: [Vite/Webpack/Maven/Gradle/etc]
|
|
81
|
-
- **Package Manager**: [npm/bun/yarn/pub/go mod/composer]
|
|
44
|
+
# Existing docs
|
|
45
|
+
find . -maxdepth 3 -name "README*" -o -name "CONTRIBUTING*" -o -name "ARCHITECTURE*"
|
|
82
46
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
├── src/ # [description based on architecture doc]
|
|
87
|
-
├── tests/ # [testing structure]
|
|
88
|
-
├── config/ # [configuration]
|
|
89
|
-
└── docs/ # [documentation]
|
|
47
|
+
# Activity
|
|
48
|
+
git log --oneline -20
|
|
49
|
+
git shortlog -sn --since=3months | head -10
|
|
90
50
|
```
|
|
91
51
|
|
|
92
|
-
###
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Documentation Available
|
|
98
|
-
- [ ] README.md
|
|
99
|
-
- [ ] Architecture docs (.claude/architecture/)
|
|
100
|
-
- [ ] API documentation
|
|
101
|
-
- [ ] Contributing guide
|
|
102
|
-
```
|
|
52
|
+
### Capture
|
|
53
|
+
- Top-level layout (≤2 levels)
|
|
54
|
+
- Tech stack + main dependencies (5-10 biggest)
|
|
55
|
+
- Existing docs found (read in next phase)
|
|
56
|
+
- Active contributors + recent commit themes
|
|
103
57
|
|
|
104
58
|
### Gate
|
|
105
|
-
- [ ] Stack
|
|
106
|
-
- [ ]
|
|
107
|
-
- [ ]
|
|
108
|
-
- [ ] Dependencies listed
|
|
59
|
+
- [ ] Stack detected (or asked user if ambiguous)
|
|
60
|
+
- [ ] Top-level structure understood
|
|
61
|
+
- [ ] Existing docs inventoried
|
|
109
62
|
|
|
110
63
|
---
|
|
111
64
|
|
|
112
|
-
## Phase 2: ANALYZE
|
|
113
|
-
|
|
114
|
-
**Goal**: Deep dive into architecture, patterns, and conventions
|
|
115
|
-
|
|
116
|
-
### Actions
|
|
117
|
-
1. **Analyze architecture based on the reference doc**:
|
|
118
|
-
- Identify layers (from architecture doc)
|
|
119
|
-
- Find data flow patterns (from architecture doc)
|
|
120
|
-
- Map dependency injection patterns (from architecture doc)
|
|
65
|
+
## Phase 2: ANALYZE (30-60 min)
|
|
121
66
|
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# Find main entry points
|
|
125
|
-
grep -r "main\|index\|app" --include="*.{js,ts,dart,go,php,py}"
|
|
67
|
+
**Goal:** understand layer boundaries, conventions, and the "shape" of code.
|
|
126
68
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
3. **Analyze configuration**:
|
|
135
|
-
- Environment variables (.env, .env.example)
|
|
136
|
-
- Config files (config/, .config/)
|
|
137
|
-
- Build configuration
|
|
138
|
-
|
|
139
|
-
4. **Check testing setup**:
|
|
140
|
-
- Test framework (Jest, Vitest, PHPUnit, Go test)
|
|
141
|
-
- Test directory structure
|
|
142
|
-
- Coverage setup
|
|
143
|
-
|
|
144
|
-
5. **Review code quality setup**:
|
|
145
|
-
- Linter configuration (.eslintrc, analysis_options.yaml)
|
|
146
|
-
- Formatter (prettier, gofmt, php-cs-fixer)
|
|
147
|
-
- Pre-commit hooks
|
|
148
|
-
|
|
149
|
-
### Analysis Output
|
|
150
|
-
```markdown
|
|
151
|
-
## Architecture Analysis
|
|
152
|
-
|
|
153
|
-
### Reference Document
|
|
154
|
-
**Architecture Doc**: [path]
|
|
155
|
-
**Pattern**: [Clean Architecture/MVVM/MVC/etc]
|
|
156
|
-
|
|
157
|
-
### Layer Structure (from architecture doc)
|
|
158
|
-
1. **[Layer 1 - e.g., Presentation]**
|
|
159
|
-
- Location: [directory path]
|
|
160
|
-
- Responsibilities: [from doc]
|
|
161
|
-
- Key files: [list]
|
|
162
|
-
|
|
163
|
-
2. **[Layer 2 - e.g., Domain]**
|
|
164
|
-
- Location: [directory path]
|
|
165
|
-
- Responsibilities: [from doc]
|
|
166
|
-
- Key files: [list]
|
|
167
|
-
|
|
168
|
-
3. **[Layer 3 - e.g., Data]**
|
|
169
|
-
- Location: [directory path]
|
|
170
|
-
- Responsibilities: [from doc]
|
|
171
|
-
- Key files: [list]
|
|
172
|
-
|
|
173
|
-
### Data Flow (from architecture doc)
|
|
174
|
-
```
|
|
175
|
-
[User Input] → [Presentation] → [Domain] → [Data] → [External APIs/DB]
|
|
176
|
-
← ← ←
|
|
177
|
-
```
|
|
69
|
+
### Read in this order
|
|
70
|
+
1. `README.md` — purpose + setup
|
|
71
|
+
2. `ARCHITECTURE.md` / `CONTRIBUTING.md` if present
|
|
72
|
+
3. **One existing module end-to-end** — pick the smallest with a full layer stack (e.g., `domain/user/`). Trace: entity → port → usecase → handler → test.
|
|
73
|
+
4. Cross-domain wiring (event bus / DI / router registration)
|
|
74
|
+
5. CI config (`.github/workflows/`, `Makefile`) — what's enforced?
|
|
178
75
|
|
|
179
|
-
###
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
### Naming Conventions
|
|
187
|
-
- **Files**: [convention - kebab-case, snake_case, PascalCase]
|
|
188
|
-
- **Classes**: [convention]
|
|
189
|
-
- **Functions**: [convention]
|
|
190
|
-
- **Constants**: [convention]
|
|
191
|
-
|
|
192
|
-
### Code Quality
|
|
193
|
-
- **Linter**: [ESLint/Dart Analyzer/golangci-lint/etc]
|
|
194
|
-
- **Formatter**: [Prettier/dartfmt/gofmt/etc]
|
|
195
|
-
- **Testing**: [Jest/PHPUnit/Go test/etc]
|
|
196
|
-
- **Coverage Target**: [percentage if specified]
|
|
197
|
-
|
|
198
|
-
### Configuration
|
|
199
|
-
- **Environment Variables**: [.env location and key vars]
|
|
200
|
-
- **Config Files**: [list important configs]
|
|
201
|
-
- **Build Config**: [description]
|
|
202
|
-
```
|
|
76
|
+
### Capture
|
|
77
|
+
- Architecture pattern (DDD / MVC / clean / hexagonal — match against `ddd-architecture.md`)
|
|
78
|
+
- Naming conventions (file, function, test)
|
|
79
|
+
- Where business logic lives (usecase vs service vs handler)
|
|
80
|
+
- How errors are returned (typed, panics, error wrapping)
|
|
81
|
+
- Test framework + folder convention
|
|
82
|
+
- How code reaches prod (CI checks, release process)
|
|
203
83
|
|
|
204
84
|
### Gate
|
|
205
|
-
- [ ]
|
|
206
|
-
- [ ]
|
|
207
|
-
- [ ]
|
|
208
|
-
- [ ] Testing setup understood
|
|
85
|
+
- [ ] One module read end-to-end
|
|
86
|
+
- [ ] Layer boundaries understood
|
|
87
|
+
- [ ] Test + CI conventions known
|
|
209
88
|
|
|
210
89
|
---
|
|
211
90
|
|
|
212
91
|
## Phase 3: EXPLAIN
|
|
213
92
|
|
|
214
|
-
**Goal
|
|
215
|
-
|
|
216
|
-
### Actions
|
|
217
|
-
1. **Create architectural overview** following the reference doc
|
|
218
|
-
2. **Document key components** in each layer
|
|
219
|
-
3. **Map common workflows** (how data flows through layers)
|
|
220
|
-
4. **List important files** and their purposes
|
|
221
|
-
5. **Document setup process**
|
|
93
|
+
**Goal:** produce a 1-page mental model that someone else can read.
|
|
222
94
|
|
|
223
|
-
### Explanation Template
|
|
224
95
|
```markdown
|
|
225
|
-
##
|
|
96
|
+
## Project: {name}
|
|
226
97
|
|
|
227
|
-
###
|
|
228
|
-
|
|
229
|
-
**Purpose**: [what it does]
|
|
230
|
-
**Stack**: [tech stack]
|
|
231
|
-
**Architecture**: [pattern - with reference to doc]
|
|
232
|
-
|
|
233
|
-
---
|
|
98
|
+
### Purpose
|
|
99
|
+
{1-2 sentences: what business problem this solves}
|
|
234
100
|
|
|
235
|
-
###
|
|
101
|
+
### Stack
|
|
102
|
+
- Language: {go 1.22 / node 20 / dart 3.x / ...}
|
|
103
|
+
- Framework: {gin / nestjs / remix / flutter ...}
|
|
104
|
+
- DB: {postgres + sqlc / prisma / eloquent ...}
|
|
105
|
+
- Infra: {docker, k8s on GKE, redis, kafka ...}
|
|
236
106
|
|
|
237
|
-
|
|
107
|
+
### Architecture
|
|
108
|
+
{1 sentence: e.g., "DDD with hexagonal — domain-pure, infra implements ports"}
|
|
238
109
|
|
|
239
|
-
#### Directory Structure Explained
|
|
240
110
|
```
|
|
241
|
-
|
|
242
|
-
├── [layer1]/ # [Purpose based on architecture doc]
|
|
243
|
-
│ ├── [component]/ # [Specific purpose]
|
|
244
|
-
│ └── [component]/ # [Specific purpose]
|
|
245
|
-
├── [layer2]/ # [Purpose based on architecture doc]
|
|
246
|
-
│ ├── [component]/ # [Specific purpose]
|
|
247
|
-
│ └── [component]/ # [Specific purpose]
|
|
248
|
-
└── [layer3]/ # [Purpose based on architecture doc]
|
|
249
|
-
├── [component]/ # [Specific purpose]
|
|
250
|
-
└── [component]/ # [Specific purpose]
|
|
111
|
+
{ascii or mermaid: top-level layer diagram}
|
|
251
112
|
```
|
|
252
113
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
#### 1. [Component Name]
|
|
258
|
-
- **Location**: [path]
|
|
259
|
-
- **Layer**: [which layer from architecture doc]
|
|
260
|
-
- **Purpose**: [what it does]
|
|
261
|
-
- **Key Files**:
|
|
262
|
-
- `[file1]` - [purpose]
|
|
263
|
-
- `[file2]` - [purpose]
|
|
264
|
-
- **Dependencies**: [what it depends on]
|
|
114
|
+
### Domains
|
|
115
|
+
| Domain | Responsibility |
|
|
116
|
+
|--------|----------------|
|
|
117
|
+
| {name} | {one line} |
|
|
265
118
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
119
|
+
### Where to find things
|
|
120
|
+
| If you need to... | Look in |
|
|
121
|
+
|-------------------|---------|
|
|
122
|
+
| Add a route | `application/ports/http/<domain>_handler` |
|
|
123
|
+
| Add business logic | `domain/<domain>/usecases` |
|
|
124
|
+
| Add a DB query | `infrastructure/database/<domain>_store` |
|
|
125
|
+
| Add a domain event | `domain/<domain>/events` + register in event bus |
|
|
126
|
+
| Add a test | `*_test.go` next to the source file |
|
|
274
127
|
|
|
275
|
-
|
|
128
|
+
### Conventions
|
|
129
|
+
- Error handling: {pattern}
|
|
130
|
+
- Logging: {library + level convention}
|
|
131
|
+
- Config: {env vars / yaml / both}
|
|
132
|
+
- Branch / commit: {convention}
|
|
276
133
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
### Common Workflows
|
|
280
|
-
|
|
281
|
-
#### Workflow 1: [e.g., User Authentication]
|
|
282
|
-
```
|
|
283
|
-
1. User enters credentials in [Presentation Layer Component]
|
|
284
|
-
2. [UseCase/Service] validates input
|
|
285
|
-
3. [Repository/Data Source] calls API
|
|
286
|
-
4. Response flows back through layers
|
|
287
|
-
5. UI updates with result
|
|
134
|
+
### Gotchas
|
|
135
|
+
- {anything surprising — e.g., "cache TTL is 30s, not 5 min like the comment says"}
|
|
288
136
|
```
|
|
289
137
|
|
|
290
|
-
|
|
291
|
-
- [
|
|
292
|
-
- [
|
|
293
|
-
- [
|
|
294
|
-
|
|
295
|
-
#### Workflow 2: [e.g., Data Fetching]
|
|
296
|
-
```
|
|
297
|
-
[Describe step by step following architecture layers]
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
**Files Involved**:
|
|
301
|
-
- [file1] - [role]
|
|
302
|
-
- [file2] - [role]
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
### Important Files Reference
|
|
307
|
-
|
|
308
|
-
#### Core Files
|
|
309
|
-
- `[file]` - [purpose]
|
|
310
|
-
- `[file]` - [purpose]
|
|
311
|
-
|
|
312
|
-
#### Configuration
|
|
313
|
-
- `[file]` - [purpose]
|
|
314
|
-
- `[file]` - [purpose]
|
|
315
|
-
|
|
316
|
-
#### Entry Points
|
|
317
|
-
- `[file]` - [main entry]
|
|
318
|
-
- `[file]` - [test entry]
|
|
138
|
+
### Gate
|
|
139
|
+
- [ ] 1-page mental model written
|
|
140
|
+
- [ ] "Where to find things" table covers ≥5 common tasks
|
|
141
|
+
- [ ] At least 1 gotcha documented (every codebase has them)
|
|
319
142
|
|
|
320
143
|
---
|
|
321
144
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
#### Installation
|
|
325
|
-
```bash
|
|
326
|
-
# [step-by-step installation based on project]
|
|
327
|
-
```
|
|
145
|
+
## Phase 4: GUIDE — first commit checklist
|
|
328
146
|
|
|
329
|
-
|
|
330
|
-
```bash
|
|
331
|
-
# Start dev server
|
|
332
|
-
[command]
|
|
147
|
+
**Goal:** unblock the first real change. The fastest ramp-up is shipping code.
|
|
333
148
|
|
|
334
|
-
|
|
335
|
-
|
|
149
|
+
### Pick a "quick win" task
|
|
150
|
+
- ≤30 min change (typo, comment, missing test, small UX nit)
|
|
151
|
+
- Touches one layer only
|
|
152
|
+
- Has a clear success criterion
|
|
336
153
|
|
|
337
|
-
|
|
338
|
-
[
|
|
154
|
+
### First commit checklist
|
|
155
|
+
- [ ] Local env runs: build + lint + tests all green from a fresh clone
|
|
156
|
+
- [ ] Made the change in the right layer (per Phase 3 table)
|
|
157
|
+
- [ ] Added or updated 1 test
|
|
158
|
+
- [ ] Followed naming + error-handling conventions
|
|
159
|
+
- [ ] Commit message matches project style (`git log --oneline`)
|
|
160
|
+
- [ ] PR description follows template (check `.github/PULL_REQUEST_TEMPLATE.md`)
|
|
161
|
+
- [ ] Self-reviewed with `/review:branch` before opening PR
|
|
339
162
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
#### Environment Variables
|
|
345
|
-
Required variables (see .env.example):
|
|
346
|
-
- `[VAR]` - [purpose]
|
|
347
|
-
- `[VAR]` - [purpose]
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
### Testing Strategy
|
|
352
|
-
- **Unit Tests**: [location and pattern]
|
|
353
|
-
- **Integration Tests**: [location and pattern]
|
|
354
|
-
- **E2E Tests**: [location and pattern if available]
|
|
355
|
-
- **Run Tests**: `[command]`
|
|
356
|
-
|
|
357
|
-
---
|
|
358
|
-
|
|
359
|
-
### Code Style & Conventions
|
|
360
|
-
- **Code Style**: [description]
|
|
361
|
-
- **Naming**: [conventions]
|
|
362
|
-
- **Comments**: [when and how]
|
|
363
|
-
- **Linting**: [configuration]
|
|
364
|
-
```
|
|
163
|
+
### Who to ask
|
|
164
|
+
- Architecture / "why is it like this": {tech lead from git shortlog}
|
|
165
|
+
- Domain knowledge for area X: {recent committer to that domain}
|
|
166
|
+
- Infra / deploy: {ops contact from README}
|
|
365
167
|
|
|
366
168
|
### Gate
|
|
367
|
-
- [ ]
|
|
368
|
-
- [ ]
|
|
369
|
-
- [ ]
|
|
370
|
-
- [ ] Setup instructions provided
|
|
169
|
+
- [ ] Local env verified
|
|
170
|
+
- [ ] First "quick win" task picked
|
|
171
|
+
- [ ] First-commit checklist printed
|
|
371
172
|
|
|
372
173
|
---
|
|
373
174
|
|
|
374
|
-
##
|
|
375
|
-
|
|
376
|
-
**Goal**: Create a practical navigation guide for common tasks
|
|
175
|
+
## Final Report
|
|
377
176
|
|
|
378
|
-
### Actions
|
|
379
|
-
1. **Create task-based guides** (how to add features, fix bugs)
|
|
380
|
-
2. **Document where to find things** (quick reference)
|
|
381
|
-
3. **List common gotchas** and solutions
|
|
382
|
-
4. **Provide quick wins** (easy first tasks)
|
|
383
|
-
|
|
384
|
-
### Guide Template
|
|
385
177
|
```markdown
|
|
386
|
-
##
|
|
387
|
-
|
|
388
|
-
### How to Add a New Feature
|
|
389
|
-
|
|
390
|
-
Following the **[architecture pattern from doc]**, here's the step-by-step:
|
|
391
|
-
|
|
392
|
-
1. **Define in Domain Layer** (if applicable):
|
|
393
|
-
- Create entity: `[path]/entities/`
|
|
394
|
-
- Create use case: `[path]/usecases/`
|
|
395
|
-
|
|
396
|
-
2. **Implement in Data Layer**:
|
|
397
|
-
- Create repository: `[path]/repositories/`
|
|
398
|
-
- Create data source: `[path]/datasources/`
|
|
178
|
+
## Onboarding Complete: {project}
|
|
399
179
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
180
|
+
### Mental Model
|
|
181
|
+
- Stack: {...}
|
|
182
|
+
- Architecture: {...}
|
|
183
|
+
- {N} domains identified
|
|
403
184
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
185
|
+
### Output
|
|
186
|
+
- Saved 1-page overview to {path}
|
|
187
|
+
- "Where to find things" table → {path}
|
|
188
|
+
- Gotchas list → {path}
|
|
407
189
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
### How to Fix a Bug
|
|
413
|
-
|
|
414
|
-
1. **Locate the Layer** (use architecture doc):
|
|
415
|
-
- UI bug? → Check Presentation layer at `[path]`
|
|
416
|
-
- Business logic bug? → Check Domain layer at `[path]`
|
|
417
|
-
- Data bug? → Check Data layer at `[path]`
|
|
418
|
-
|
|
419
|
-
2. **Find Related Files**:
|
|
420
|
-
- Search by feature: `grep -r "[feature_name]" [layer_path]`
|
|
421
|
-
- Check recent changes: `git log --oneline [file]`
|
|
422
|
-
|
|
423
|
-
3. **Fix Following Patterns** (from architecture doc)
|
|
424
|
-
|
|
425
|
-
4. **Test**:
|
|
426
|
-
- Run existing tests: `[command]`
|
|
427
|
-
- Add regression test
|
|
428
|
-
|
|
429
|
-
### Where to Find Things
|
|
430
|
-
|
|
431
|
-
| What | Where |
|
|
432
|
-
|------|-------|
|
|
433
|
-
| API endpoints | `[path]` |
|
|
434
|
-
| Database models | `[path]` |
|
|
435
|
-
| UI components | `[path]` |
|
|
436
|
-
| Business logic | `[path]` |
|
|
437
|
-
| State management | `[path]` |
|
|
438
|
-
| Constants | `[path]` |
|
|
439
|
-
| Utils/Helpers | `[path]` |
|
|
440
|
-
| Config | `[path]` |
|
|
441
|
-
| Tests | `[path]` |
|
|
442
|
-
| Types/Interfaces | `[path]` |
|
|
443
|
-
|
|
444
|
-
### Common Tasks Quick Reference
|
|
445
|
-
|
|
446
|
-
#### Add a new API endpoint
|
|
447
|
-
```bash
|
|
448
|
-
1. Define route in [path]
|
|
449
|
-
2. Create controller in [path]
|
|
450
|
-
3. Add service logic in [path]
|
|
451
|
-
4. Update types in [path]
|
|
452
|
-
5. Test with [command]
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
#### Add a new UI component
|
|
456
|
-
```bash
|
|
457
|
-
1. Create component in [path]
|
|
458
|
-
2. Add styles in [path]
|
|
459
|
-
3. Export from [path]
|
|
460
|
-
4. Use in [path]
|
|
190
|
+
### First Commit
|
|
191
|
+
- Task: {quick-win}
|
|
192
|
+
- Local env: ✅ build / ✅ lint / ✅ tests
|
|
193
|
+
- PR will follow: {project PR template}
|
|
461
194
|
```
|
|
462
195
|
|
|
463
|
-
#### Add a new database table/model
|
|
464
|
-
```bash
|
|
465
|
-
1. Create migration in [path]
|
|
466
|
-
2. Define model in [path]
|
|
467
|
-
3. Add repository in [path]
|
|
468
|
-
4. Run migration: [command]
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
### Common Gotchas & Solutions
|
|
472
|
-
|
|
473
|
-
1. **[Gotcha 1]**
|
|
474
|
-
- Problem: [description]
|
|
475
|
-
- Solution: [how to fix]
|
|
476
|
-
|
|
477
|
-
2. **[Gotcha 2]**
|
|
478
|
-
- Problem: [description]
|
|
479
|
-
- Solution: [how to fix]
|
|
480
|
-
|
|
481
|
-
3. **[Gotcha 3]**
|
|
482
|
-
- Problem: [description]
|
|
483
|
-
- Solution: [how to fix]
|
|
484
|
-
|
|
485
|
-
### Quick Wins (Easy First Tasks)
|
|
486
|
-
|
|
487
|
-
Good first issues to familiarize yourself:
|
|
488
|
-
|
|
489
|
-
1. **Fix a typo or improve documentation**
|
|
490
|
-
- Files: README.md, comments
|
|
491
|
-
- Impact: Low risk, good learning
|
|
492
|
-
|
|
493
|
-
2. **Add a simple utility function**
|
|
494
|
-
- Location: `[path]/utils/`
|
|
495
|
-
- Pattern: [describe pattern]
|
|
496
|
-
|
|
497
|
-
3. **Add a test for existing code**
|
|
498
|
-
- Location: `[path]/test/`
|
|
499
|
-
- Framework: [test framework]
|
|
500
|
-
|
|
501
|
-
4. **Improve error messages**
|
|
502
|
-
- Location: `[path]/errors/`
|
|
503
|
-
- Pattern: [describe pattern]
|
|
504
|
-
|
|
505
|
-
### Git Workflow
|
|
506
|
-
|
|
507
|
-
```bash
|
|
508
|
-
# Create feature branch
|
|
509
|
-
git checkout -b feature/[name]
|
|
510
|
-
|
|
511
|
-
# Make changes following architecture
|
|
512
|
-
|
|
513
|
-
# Commit (follow conventional commits)
|
|
514
|
-
git commit -m "[type]: [description]"
|
|
515
|
-
|
|
516
|
-
# Push and create PR
|
|
517
|
-
git push origin feature/[name]
|
|
518
|
-
gh pr create
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### Getting Help
|
|
522
|
-
|
|
523
|
-
- **Architecture Reference**: `~/.claude/architecture/[stack].md`
|
|
524
|
-
- **Project Docs**: `docs/` or `README.md`
|
|
525
|
-
- **Code Comments**: Well-documented files in `[path]`
|
|
526
|
-
- **Tests as Examples**: `[path]/test/` shows usage patterns
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
### Gate
|
|
530
|
-
- [ ] Task guides created
|
|
531
|
-
- [ ] Navigation reference provided
|
|
532
|
-
- [ ] Common gotchas documented
|
|
533
|
-
- [ ] Quick wins identified
|
|
534
|
-
|
|
535
196
|
---
|
|
536
197
|
|
|
537
|
-
##
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
| Flutter | `flutter-mobile.md` |
|
|
544
|
-
| React | `react-frontend.md` |
|
|
545
|
-
| Go | `go-backend.md` |
|
|
546
|
-
| Laravel | `laravel-backend.md` |
|
|
547
|
-
| Remix | `remix-fullstack.md` |
|
|
548
|
-
| Monorepo | `monorepo.md` |
|
|
549
|
-
|
|
550
|
-
### Phase Summary
|
|
551
|
-
| Phase | Key Actions | Output |
|
|
552
|
-
|-------|-------------|--------|
|
|
553
|
-
| SCAN | Identify stack, read arch doc, map structure | Project overview |
|
|
554
|
-
| ANALYZE | Deep dive into layers, patterns, conventions | Architecture analysis |
|
|
555
|
-
| EXPLAIN | Document components, workflows, setup | Comprehensive guide |
|
|
556
|
-
| GUIDE | Create task guides, navigation, quick wins | Practical handbook |
|
|
557
|
-
|
|
558
|
-
### Onboarding Checklist
|
|
559
|
-
|
|
560
|
-
After completing this workflow, you should understand:
|
|
561
|
-
- [ ] Project tech stack and dependencies
|
|
562
|
-
- [ ] Architecture pattern and layers
|
|
563
|
-
- [ ] Directory structure and where to find things
|
|
564
|
-
- [ ] How to add new features (following architecture)
|
|
565
|
-
- [ ] How to fix bugs (following architecture)
|
|
566
|
-
- [ ] Testing strategy and how to run tests
|
|
567
|
-
- [ ] Development workflow and commands
|
|
568
|
-
- [ ] Common patterns and conventions
|
|
569
|
-
- [ ] Where to get help
|
|
570
|
-
|
|
571
|
-
### Success Criteria
|
|
572
|
-
|
|
573
|
-
Onboarding is complete when you can:
|
|
574
|
-
1. Explain the project architecture (based on reference doc)
|
|
575
|
-
2. Locate any component or feature quickly
|
|
576
|
-
3. Add a simple feature following the architecture
|
|
577
|
-
4. Run tests and understand the output
|
|
578
|
-
5. Navigate the codebase confidently
|
|
579
|
-
|
|
580
|
-
### Next Steps After Onboarding
|
|
581
|
-
|
|
582
|
-
1. **Pick a Quick Win** - Complete an easy first task
|
|
583
|
-
2. **Read Architecture Doc** - Deep dive into the specific patterns
|
|
584
|
-
3. **Pair with Code** - Review existing features to learn patterns
|
|
585
|
-
4. **Ask Questions** - Clarify anything unclear
|
|
586
|
-
5. **Start Contributing** - Begin with small features following the architecture
|
|
198
|
+
## Hard Rules
|
|
199
|
+
|
|
200
|
+
- **Read one module end-to-end before reading 10 partially** — the trace teaches more than skimming
|
|
201
|
+
- **Capture gotchas as you find them** — they vanish from memory in days
|
|
202
|
+
- **First commit ≤30 min** — bigger first changes get rabbit-holed
|
|
203
|
+
- **Don't refactor on day 1** — earn context before changing conventions
|
|
587
204
|
|
|
588
205
|
---
|
|
589
206
|
|
|
@@ -591,8 +208,8 @@ Onboarding is complete when you can:
|
|
|
591
208
|
|
|
592
209
|
| When | Use |
|
|
593
210
|
|------|-----|
|
|
594
|
-
| Generate full
|
|
595
|
-
| Build first feature after onboarding | `/feature:new` |
|
|
211
|
+
| Generate full doc site after onboarding | `/docs:sync` |
|
|
212
|
+
| Build first real feature after onboarding | `/feature:new` |
|
|
596
213
|
| First bug fix to learn the codebase | `/fix:hotfix` |
|
|
597
214
|
| Author / update the onboarding doc itself | `/docs:write` |
|
|
598
215
|
|
|
@@ -600,9 +217,9 @@ Onboarding is complete when you can:
|
|
|
600
217
|
|
|
601
218
|
| Phase | Agent | Purpose |
|
|
602
219
|
|-------|-------|---------|
|
|
603
|
-
| SCAN | `@clean-architect` | Identify architecture
|
|
604
|
-
| ANALYZE | `@clean-architect` | Layer
|
|
605
|
-
| ANALYZE | `@code-reviewer` |
|
|
220
|
+
| SCAN | `@clean-architect` | Identify architecture pattern |
|
|
221
|
+
| ANALYZE | `@clean-architect` | Layer + boundary analysis |
|
|
222
|
+
| ANALYZE | `@code-reviewer` | Conventions + smell check |
|
|
606
223
|
| ANALYZE | `@security-audit` | Security patterns |
|
|
607
|
-
| EXPLAIN | `@docs-writer` |
|
|
608
|
-
| GUIDE | `@docs-writer` |
|
|
224
|
+
| EXPLAIN | `@docs-writer` | 1-page overview |
|
|
225
|
+
| GUIDE | `@docs-writer` | First-commit checklist |
|