@codihaus/claude-skills 1.6.5 → 1.6.7

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.
@@ -1,761 +1,284 @@
1
1
  ---
2
2
  name: dev-coding
3
- description: Implement features from specs with backend and frontend skills
4
- version: 1.7.0
3
+ description: Implement features as a Principal Engineering Developer
4
+ version: 2.0.0
5
5
  ---
6
6
 
7
7
  # /dev-coding - Implementation Skill
8
8
 
9
9
  > **Skill Awareness**: See `skills/_registry.md` for all available skills.
10
- > - **Before**: Ensure `/dev-specs` completed, `/dev-scout` for patterns
11
- > - **During**: Auto-loads `/dev-coding-backend`, `/dev-coding-frontend`
12
- > - **Reads**: `_quality-attributes.md` (Implementation Level)
10
+ > - **Before**: Ensure `/dev-specs` completed
11
+ > - **Reads**: Principles (references/), project specifics (tech-context.md), requirements (specs)
13
12
  > - **After**: Auto-triggers `/dev-test` to verify implementation
14
- > - **After test**: Suggest `/dev-review` for code review
13
+ > - **Review**: Suggest `/dev-review` for code review
15
14
 
16
- Implement features based on specs. Orchestrates backend and frontend work.
15
+ Work as a **Principal Engineering Developer**: apply universal principles with project-specific implementation.
17
16
 
18
17
  ## When to Use
19
18
 
20
- - Implement a use case from /dev-specs
21
- - Build feature end-to-end (API + UI)
22
- - Make changes defined in implementation plan
19
+ - Implement use case from specs
20
+ - Build feature (backend, frontend, or both)
21
+ - Apply project patterns to new code
23
22
 
24
23
  ## Usage
25
24
 
26
25
  ```
26
+ /dev-coding auth # Implement feature (will ask which UCs)
27
27
  /dev-coding UC-AUTH-001 # Implement specific UC
28
- /dev-coding auth # Implement all UCs for feature
29
- /dev-coding UC-AUTH-001 --backend # Backend only
30
- /dev-coding UC-AUTH-001 --frontend # Frontend only
31
28
  ```
32
29
 
33
- ## Prerequisites
34
-
35
- Before using, ensure:
36
- 1. `/debrief` completed → BRD exists
37
- 2. `/dev-specs` completed → Implementation plan exists
38
- 3. `/dev-scout` completed → Codebase patterns known
39
-
40
- ## Output
41
-
42
- Updates to codebase:
43
- - New/modified files
44
- - Tests (if required)
45
- - Updated docs-graph
46
-
47
- Updates to specs:
48
- - Task status in `plans/features/{feature}/specs/`
49
- - Implementation notes
50
-
51
- ## Workflow
52
-
53
- ### Phase 0: Determine Scope & Select UCs
54
-
55
- **Before starting, determine which use cases to implement.**
56
-
57
- ```
58
- Parse user input:
59
- - /dev-coding UC-AUTH-001 → Specific UC (skip to Phase 1)
60
- - /dev-coding auth → Feature-level (need UC selection)
61
- ```
62
-
63
- **If user specified feature name (not specific UC), show UC selection:**
64
-
65
- 1. **List available UCs:**
66
- ```
67
- Available Use Cases for auth:
68
- 1. UC-AUTH-001: User Login
69
- 2. UC-AUTH-002: User Signup
70
- 3. UC-AUTH-003: Password Reset
71
- 4. UC-AUTH-004: Email Verification
72
- 5. UC-AUTH-005: Two-Factor Authentication
73
- ```
74
-
75
- 2. **Ask implementation mode** (use AskUserQuestion):
76
- - **One by one (Recommended)**: Implement 1 UC, test, then ask for next
77
- - **Multiple (custom selection)**: Select specific UCs (e.g., "1,3-5,7")
78
- - **All at once**: Implement all UCs in sequence
79
-
80
- 3. **Process selection:**
81
- - **One by one**: Implement → Test → Ask to continue (safest, recommended)
82
- - **Multiple**: Implement → Test each UC → Auto-continue (no prompts between)
83
- - **All at once**: Implement → Test each UC → Auto-continue (no prompts)
84
-
85
- **Parsing examples:**
86
- | Input | Result |
87
- |-------|--------|
88
- | `1,3,5` | UCs 1, 3, 5 |
89
- | `1-3` | UCs 1, 2, 3 |
90
- | `1,3-5,7` | UCs 1, 3, 4, 5, 7 |
91
- | `all` | All UCs |
92
-
93
- **After selection, store plan:**
94
- ```
95
- implementationPlan = {
96
- mode: "one-by-one" | "multiple" | "all",
97
- ucs: [UC-AUTH-001, UC-AUTH-003, ...],
98
- currentIndex: 0
99
- }
100
- ```
101
-
102
- **Flow Visualization:**
103
-
104
- ```
105
- Mode: ONE BY ONE (Recommended)
106
- ─────────────────────────────
107
- UC #1: Implement → Test → ✓ Pass → [ASK USER: Continue?]
108
- ↓ Yes
109
- UC #2: Implement → Test → ✓ Pass → [ASK USER: Continue?]
110
- ↓ Yes
111
- UC #3: Implement → Test → ✓ Pass → Done
112
-
113
-
114
- Mode: MULTIPLE / ALL AT ONCE
115
- ────────────────────────────
116
- UC #1: Implement → Test → ✓ Pass → [Auto-continue]
117
-
118
- UC #2: Implement → Test → ✓ Pass → [Auto-continue]
119
-
120
- UC #3: Implement → Test → ✓ Pass → Done
121
- ```
122
-
123
- **Key Point:** Testing (Phase 7) is a checkpoint after each UC in ALL modes.
124
- - "One by one": Test passes → Ask user before next UC
125
- - "Multiple/All": Test passes → Automatically start next UC
126
-
127
- ### Phase 1: Load Context
128
-
129
- ```
130
- 1. Read UC spec
131
- → plans/features/{feature}/specs/{UC-ID}/README.md
132
-
133
- 2. Read scout for patterns
134
- → plans/features/{feature}/scout.md OR plans/scout/README.md
135
-
136
- 3. Read stack.md and stack knowledge (CRITICAL)
137
- → plans/scout/stack.md
138
- → Check "Stack Knowledge References" section
139
- → Read each referenced knowledge/stacks/*.md file
140
- → Use "For /dev-coding" sections for implementation patterns
141
-
142
- Examples:
143
- - Directus project → Read knowledge/stacks/directus/_index.md
144
- - Nuxt project → Read knowledge/stacks/nuxt/_index.md
145
- - Next.js project → Read knowledge/stacks/nextjs/_index.md
30
+ ## Role: Principal Engineering Developer
146
31
 
147
- 4. Read architecture decisions
148
- → plans/features/{feature}/architecture.md
32
+ You have universal engineering principles and apply them to this specific project.
149
33
 
150
- 5. Read quality attributes (Implementation Level)
151
- skills/_quality-attributes.md
152
- Focus on: query efficiency, memory, concurrency, error handling
34
+ **Workflow:**
35
+ 1. Load principles (references/) + project specifics (tech-context.md)
36
+ 2. Discover details just-in-time (Glob/Grep/Read as needed)
37
+ 3. Apply principles based on what requirement needs
38
+ 4. Validate against acceptance criteria
153
39
 
154
- 6. Read docs-graph for dependencies
155
- plans/docs-graph.json
156
-
157
- 7. Check: Are dependencies complete?
158
- → If UC depends on another UC, verify it's done
159
- → Warn if not, let user decide to proceed
160
- ```
161
-
162
- ### Phase 2: Determine Work Type
163
-
164
- Based on spec, determine what's needed:
165
-
166
- | Spec Contains | Work Type | Skill to Load |
167
- |---------------|-----------|---------------|
168
- | API endpoints, schema | Backend | dev-coding-backend |
169
- | UI components, pages | Frontend | dev-coding-frontend |
170
- | Both | Full-stack | Backend first, then Frontend |
171
-
172
- ```
173
- Read spec → Extract:
174
- - API changes needed?
175
- - Schema/DB changes needed?
176
- - UI components needed?
177
- - Pages/routes needed?
178
- ```
40
+ **Principles:**
41
+ - See `references/backend-principles.md` for API, data, security principles
42
+ - See `references/frontend-principles.md` for UI, component, state principles
43
+ - See `tech-context.md` for how THIS project implements them
179
44
 
180
- ### Phase 3: Load Sub-Skills
45
+ ## Prerequisites
181
46
 
182
- **If backend work needed:**
183
- ```
184
- Read: skills/dev-coding-backend/SKILL.md
185
- Read: skills/dev-coding-backend/references/{tech}.md (if exists)
47
+ 1. `/dev-specs {feature}` completed → specs exist
48
+ 2. `plans/brd/tech-context.md` exists → patterns known
49
+ 3. `plans/features/{feature}/codebase-context.md` exists (optional, helpful)
186
50
 
187
- Tech detected from scout:
188
- - directus → directus.md
189
- - node → node.md
190
- - prisma → prisma.md
191
- ```
51
+ ## Workflow
192
52
 
193
- **If frontend work needed:**
194
- ```
195
- Read: skills/dev-coding-frontend/SKILL.md
196
- Read: skills/dev-coding-frontend/references/{tech}.md (if exists)
53
+ ### Phase 0: UC Selection
197
54
 
198
- Tech detected from scout:
199
- - nextjs → nextjs.md
200
- - vue → vue.md
201
- - react → react.md
202
- ```
55
+ If user specifies feature name (not specific UC):
203
56
 
204
- ### Phase 4: Execute Backend (if needed)
57
+ 1. **List available UCs** from specs/README.md
58
+ 2. **Ask implementation mode:**
59
+ - One by one (Recommended): Implement → Test → Ask next
60
+ - Multiple: Select UCs (e.g., "1,3-5") → Implement all
61
+ - All at once: Implement all UCs
205
62
 
206
- Follow dev-coding-backend workflow:
63
+ 3. **Store plan** and proceed
207
64
 
208
- 1. **Schema changes** (if needed)
209
- - Create/modify collections, tables, models
210
- - Run migrations
211
- - Verify schema
65
+ If user specifies UC (e.g., UC-AUTH-001): skip to Phase 1
212
66
 
213
- 2. **API implementation**
214
- - Create endpoints per spec
215
- - Implement business logic
216
- - Add validation, error handling
67
+ ### Phase 1: Load Principles
217
68
 
218
- 3. **Backend verification**
219
- ```bash
220
- # Test API works
221
- curl -X POST http://localhost:3000/api/auth/login \
222
- -H "Content-Type: application/json" \
223
- -d '{"email":"test@test.com","password":"test"}'
224
- ```
69
+ **Load once, use throughout:**
225
70
 
226
- 4. **Document what was created**
227
- - Endpoints available
228
- - Request/response shapes
229
- - Auth requirements
71
+ 1. **Load universal principles** (optional, as needed)
72
+ - `references/backend-principles.md` (if doing API/data work)
73
+ - `references/frontend-principles.md` (if doing UI work)
74
+ - General software engineering wisdom
230
75
 
231
- ### Phase 5: Execute Frontend (if needed)
76
+ 2. **Read spec** (requirements)
77
+ - `plans/features/{feature}/specs/UC-*.md`
78
+ - Get: Requirements, acceptance criteria, files to modify
232
79
 
233
- Follow dev-coding-frontend workflow:
80
+ 3. **Read tech-context.md** (project specifics)
81
+ - `plans/brd/tech-context.md`
82
+ - Get: How THIS project implements patterns
83
+ - Project-specific rules and conventions
234
84
 
235
- 1. **Components** (if needed)
236
- - Create/modify UI components
237
- - Follow project conventions from scout
85
+ 4. **Read codebase-context.md** (existing code)
86
+ - `plans/features/{feature}/codebase-context.md`
87
+ - Get: How this feature currently works, entry points
238
88
 
239
- 2. **Pages/Routes** (if needed)
240
- - Create page files
241
- - Set up routing
89
+ 5. **Read architecture.md** (if exists)
90
+ - `plans/features/{feature}/architecture.md`
91
+ - Get: Feature-specific patterns
242
92
 
243
- 3. **API Integration**
244
- - Connect to backend (use info from Phase 3)
245
- - Handle loading, error states
93
+ 6. **Create TODO list** from spec requirements
94
+ - Each requirement = one TODO
95
+ - Mark first as in_progress
246
96
 
247
- 4. **Frontend verification**
248
- - Visual check (Playwright screenshot or manual)
249
- - Interaction test
97
+ ### Phase 2: Implement (Just-in-Time Discovery)
250
98
 
251
- ### Phase 6: Integration Test
99
+ For each requirement in TODO list:
252
100
 
253
- End-to-end verification:
101
+ #### Step 1: Understand Requirement
254
102
 
255
- ```
256
- 1. Start from UI
257
- 2. Perform user action
258
- 3. Verify API called correctly
259
- 4. Verify response handled
260
- 5. Verify UI updated
261
- ```
103
+ **From spec (already loaded):**
104
+ - What to build (requirement)
105
+ - Where to build it (technical constraints)
106
+ - Success criteria (acceptance criteria)
262
107
 
263
- **Methods:**
264
- - Playwright for automated
265
- - Manual walkthrough
266
- - curl + UI check
108
+ #### Step 2: Apply Principles
267
109
 
268
- ### Phase 6: Quality Checks
110
+ **Think (using loaded principles):**
269
111
 
270
- Run through `_quality-attributes.md` Implementation Level checklists:
112
+ Ask yourself what this requirement needs:
113
+ - API work? → Apply API principles + project's API pattern
114
+ - UI work? → Apply component principles + project's UI pattern
115
+ - Data work? → Apply data access principles + project's data pattern
116
+ - Form work? → Apply validation principles + project's validation pattern
117
+ - Full-stack? → Apply multiple principles as needed
271
118
 
272
- **From quality attributes:**
273
- ```
274
- [ ] Scalability
275
- - No N+1 queries (use joins/includes)
276
- - Select only needed fields
277
- - Limit result sets
278
- - Connection pooling used
279
-
280
- [ ] Maintainability
281
- - Functions do one thing
282
- - Names describe intent
283
- - No magic numbers/strings
284
-
285
- [ ] Performance
286
- - Database queries optimized
287
- - Heavy computation cached or async
288
- - No unnecessary re-renders (frontend)
289
-
290
- [ ] Security
291
- - All input validated
292
- - SQL injection prevented
293
- - XSS prevented
294
- - No hardcoded secrets
295
-
296
- [ ] Reliability
297
- - Errors caught and handled
298
- - User-friendly error messages
299
- - Timeouts on external calls
300
-
301
- [ ] Testability
302
- - Pure functions where possible
303
- - Dependencies injected
304
- ```
305
-
306
- **Project-specific:**
307
- ```
308
- [ ] Code follows project conventions (from scout)
309
- [ ] No linting errors
310
- [ ] No type errors
311
- [ ] Tests pass (if project has tests)
312
- [ ] No console.log / debug code left
313
- ```
119
+ **You already know:**
120
+ - Universal principles (from references/)
121
+ - How THIS project works (from tech-context.md)
314
122
 
315
- ### Phase 7: Auto-Test
123
+ #### Step 3: Discover Details (As Needed)
316
124
 
317
- **CRITICAL: Testing runs after EVERY UC implementation (all modes).**
318
-
319
- Testing verifies each UC before proceeding to the next:
125
+ **Just-in-time discovery:**
320
126
 
321
127
  ```
322
- 1. Load dev-test skill
323
- Read skills/dev-test/SKILL.md
324
-
325
- 2. Determine test URL
326
- From project config or spec
327
- → Default: http://localhost:3000/{path}
328
-
329
- 3. Run E2E test for CURRENT UC
330
- → Navigate to page
331
- → Execute user flow from spec
332
- → Capture errors
333
-
334
- 4. Run regression tests (if previous UCs exist)
335
- → Quick smoke test of previously completed UCs
336
- → Ensures new UC didn't break existing functionality
337
- → Example: UC-AUTH-002 (Signup) shouldn't break UC-AUTH-001 (Login)
338
-
339
- Regression approach:
340
- - If only 1-2 previous UCs: Full test
341
- - If 3+ previous UCs: Critical path only (login flow, main actions)
342
- - Skip if UCs are completely independent
343
-
344
- 5. Analyze results
345
- → Console errors?
346
- → Network failures?
347
- → Visual issues?
348
- → Regression failures?
349
-
350
- 6. Handle results:
351
- - All pass (current + regression) → Proceed to Phase 8 (Complete)
352
- - Current UC fails → Fix current UC and re-test
353
- - Regression fails → Fix regression issue (may need to update previous UC)
354
-
355
- IMPORTANT: Do NOT proceed to next UC until:
356
- - Current UC passes all tests
357
- - Previous UCs still work (regression pass)
358
- This ensures quality and prevents cascading failures.
128
+ Need to find something? Use tools:
129
+ - Where's the pattern used? Grep for it
130
+ - Where does similar code live? → Glob pattern
131
+ - How does this work? → Read the file
132
+ - How did we do X before? → Search for example
359
133
  ```
360
134
 
361
- **Test Flow:**
135
+ **Examples:**
136
+ - "Where's the API wrapper?" → Glob: `**/api.*`, `**/request.*`
137
+ - "Where are schemas?" → Remember from tech-context.md: `schemas/`
138
+ - "How did we validate before?" → Read: `schemas/user.ts` for pattern
139
+ - "Where's the auth composable?" → Glob: `composables/use-auth.*`
362
140
 
363
- ```typescript
364
- // 1. Navigate
365
- await mcp__playwright__browser_navigate({ url: testUrl });
141
+ **Don't:**
142
+ - Pre-load all files (wasteful)
143
+ - ❌ List all components (discover when needed)
366
144
 
367
- // 2. Execute user flow
368
- // (based on UC spec steps)
145
+ #### Step 4: Implement
369
146
 
370
- // 3. Collect errors
371
- const consoleErrors = await mcp__playwright__browser_console_messages({
372
- level: 'error'
373
- });
374
- const networkRequests = await mcp__playwright__browser_network_requests({});
147
+ 1. Create/modify files (from spec checklist)
148
+ 2. Apply principles (from references/ + tech-context.md)
149
+ 3. Use discovered details (function names, locations)
150
+ 4. Follow conventions (from tech-context.md)
375
151
 
376
- // 4. Report or fix
377
- if (hasErrors) {
378
- // Fix and re-test (max 3 iterations)
379
- }
380
- ```
152
+ #### Step 5: Validate
381
153
 
382
- **On Test Failure:**
154
+ **Check against acceptance criteria:**
155
+ - [ ] Happy path works?
156
+ - [ ] Error cases handled?
157
+ - [ ] Edge cases covered?
383
158
 
384
- ```markdown
385
- ⚠️ **Testing found issues:**
159
+ **If passes:** Mark TODO completed, move to next
160
+ **If fails:** Fix issues, re-validate
386
161
 
387
- 1. [Console] TypeError in LoginForm.tsx:45
388
- 2. [Network] POST /api/auth/login returned 500
162
+ #### Step 6: Self-Test (Optional)
389
163
 
390
- **Auto-fixing...** (if straightforward)
391
- **Or reporting for manual fix** (if complex)
392
- ```
164
+ If requirement is testable:
165
+ - Write/update tests
166
+ - Run tests
167
+ - Fix failures
393
168
 
394
- ### Phase 8: Complete
395
-
396
- **This phase runs after each UC is implemented AND tested.**
397
-
398
- 1. **Update spec status**
399
- ```markdown
400
- <!-- In specs/{UC-ID}/README.md -->
401
- > **Status**: Complete
402
- > **Completed**: {date}
403
- > **Tested**: ✓ Pass (Phase 7)
404
- ```
405
-
406
- 2. **Document changes**
407
- ```markdown
408
- ## Implementation Notes
409
-
410
- ### Files Changed
411
- - `src/api/auth/login.ts` - Created login endpoint
412
- - `src/components/LoginForm.tsx` - Created form component
413
-
414
- ### Deviations from Spec
415
- - Added rate limiting (not in spec, but security best practice)
416
-
417
- ### Test Results
418
- - E2E flow: ✓ Pass
419
- - Console errors: None
420
- - API responses: All 2xx
421
-
422
- ### Next Steps
423
- - UC-AUTH-002 can now proceed (depends on this)
424
- ```
425
-
426
- 3. **Update docs-graph** (automatic via hook)
427
-
428
- 4. **Continue with next UC (if applicable)**
429
- ```
430
- IMPORTANT: This step only runs if Phase 7 (Testing) passed.
431
- If tests fail, fix issues and re-test before continuing.
432
-
433
- Check implementationPlan from Phase 0:
434
-
435
- If more UCs remaining:
436
- Mode "one-by-one":
437
- → Show: "✓ UC-AUTH-001 implemented and tested successfully!"
438
- → Show: "Remaining: UC-AUTH-002, UC-AUTH-003, UC-AUTH-004"
439
- → Ask (AskUserQuestion): "Continue with UC-AUTH-002?"
440
- Options:
441
- - Yes (continue with next UC)
442
- - No (stop here, can resume later)
443
- - Select different UCs (return to Phase 0)
444
- → Yes: currentIndex++, restart from Phase 1
445
- → No: Show summary, stop
446
- → Select: Return to Phase 0 for new selection
447
-
448
- Mode "multiple" or "all":
449
- → Show: "✓ UC-AUTH-001 implemented and tested successfully!"
450
- → Automatically: currentIndex++
451
- → Restart from Phase 1 with next UC
452
- → No user prompt until all selected UCs complete
453
-
454
- If all UCs complete:
455
- → Show summary (see below)
456
- → Suggest /dev-review {feature}
457
- ```
458
-
459
- **Summary Output (all UCs complete):**
460
- ```markdown
461
- ✅ All Use Cases Implemented
462
-
463
- **Completed:**
464
- - UC-AUTH-001: User Login ✓
465
- - UC-AUTH-003: Password Reset ✓
466
- - UC-AUTH-004: Email Verification ✓
467
-
468
- **Stats:**
469
- - Files changed: 12
470
- - Tests: All passing
471
- - Duration: ~45 minutes
472
-
473
- **Next Steps:**
474
- - Run `/dev-review auth` for code review
475
- - Create PR when ready
476
- ```
169
+ ### Phase 3: Complete UC
477
170
 
478
- ## Communication Protocol
171
+ After all requirements implemented:
479
172
 
480
- ### When to Ask
173
+ 1. **Final validation:**
174
+ - Review all acceptance criteria
175
+ - Check file checklist completed
176
+ - Verify patterns followed
481
177
 
482
- | Situation | Action |
483
- |-----------|--------|
484
- | Spec unclear | Ask for clarification |
485
- | Multiple valid approaches | Present options, ask preference |
486
- | Stuck > 15 min | Document attempts, ask for help |
487
- | Spec seems wrong | Flag it, propose alternative |
488
- | Scope creep detected | Stop, suggest CR |
178
+ 2. **Update spec:**
179
+ - Mark requirements completed
180
+ - Add implementation notes if deviated
181
+ - Update status
489
182
 
490
- ### How to Ask
183
+ 3. **Git commit** (if user requests)
184
+ - Follow git conventions from tech-context.md
185
+ - Reference UC in commit message
491
186
 
492
- ```markdown
493
- **Blocker**: {What's blocking}
187
+ 4. **Next UC:**
188
+ - If "one by one": Ask user to continue
189
+ - If "multiple" or "all": Auto-continue to next UC
494
190
 
495
- **Tried**:
496
- 1. {Attempt 1} → {Result}
497
- 2. {Attempt 2} → {Result}
191
+ ### Phase 4: Run Tests
498
192
 
499
- **Options**:
500
- A) {Option A} - {Tradeoff}
501
- B) {Option B} - {Tradeoff}
193
+ After all UCs in plan completed:
502
194
 
503
- **Recommendation**: {Your suggestion}
504
- ```
505
-
506
- ### Scope Creep Protocol
195
+ 1. **Auto-trigger `/dev-test`** (if available)
196
+ - Runs test suite
197
+ - Reports results
507
198
 
508
- | Deviation | Action |
509
- |-----------|--------|
510
- | Tiny (typo) | Fix silently |
511
- | Small (edge case) | Ask + proceed |
512
- | Medium (new field) | Document + ask |
513
- | Large (approach wrong) | Stop + create CR |
199
+ 2. **If tests fail:**
200
+ - Review failures
201
+ - Fix issues
202
+ - Re-run tests
514
203
 
515
- ## Dependency Handling
204
+ 3. **If tests pass:**
205
+ - Suggest `/dev-review` for code review
516
206
 
517
- When UC depends on another:
207
+ ## How Principles Work
518
208
 
519
209
  ```
520
- 1. Check docs-graph for dependencies
521
- 2. For each dependency:
522
- - Is UC marked complete? → OK
523
- - Is code actually there? → Check (more reliable)
524
- 3. If dependency missing:
525
- - Warn user
526
- - Ask: Proceed anyway? / Do dependency first?
210
+ Universal Principles (references/)
211
+ +
212
+ Project Specifics (tech-context.md)
213
+ =
214
+ Implementation
527
215
  ```
528
216
 
529
- ## Tools Used
530
-
531
- | Tool | Purpose |
532
- |------|---------|
533
- | `Read` | Load specs, scout, sub-skills |
534
- | `Write` | Create new files |
535
- | `Edit` | Modify existing files |
536
- | `Bash` | Run commands, curl tests |
537
- | `Glob` | Find files |
538
- | `Grep` | Search code |
539
- | `mcp__playwright__*` | UI verification |
540
- | `Context7` | Look up library documentation |
541
-
542
- ### Context7 for Implementation
217
+ **Apply what the requirement needs:**
218
+ - API work → backend-principles.md + tech-context.md
219
+ - UI work frontend-principles.md + tech-context.md
220
+ - Both → use both references + tech-context.md
543
221
 
544
- When coding, use Context7 to look up library APIs:
222
+ ## Example Flow
545
223
 
546
- ```
547
- 1. Resolve library
548
- → mcp__context7__resolve-library-id({
549
- libraryName: "zod",
550
- query: "form validation schema"
551
- })
552
-
553
- 2. Query specific API
554
- → mcp__context7__query-docs({
555
- libraryId: "/colinhacks/zod",
556
- query: "custom error messages"
557
- })
558
- ```
224
+ **Requirement:** "Add password reset endpoint"
559
225
 
560
- **Use for:**
561
- - Library APIs you're less familiar with
562
- - Framework-specific patterns
563
- - Error handling approaches
564
- - Best practices
226
+ 1. **Think:** API work → backend-principles.md (validation, security) + tech-context.md (how we do APIs)
227
+ 2. **Discover:** Where are endpoints? Glob, Read similar endpoint
228
+ 3. **Implement:** Follow pattern + apply principles
229
+ 4. **Validate:** Check acceptance criteria
565
230
 
566
- ## Integration
231
+ ## Quality
567
232
 
568
- | Skill | Relationship |
569
- |-------|--------------|
570
- | `/dev-specs` | Reads implementation plan from |
571
- | `/dev-scout` | Reads patterns/conventions from |
572
- | `/dev-coding-backend` | Loads for API/schema work |
573
- | `/dev-coding-frontend` | Loads for UI work |
574
- | `/dev-test` | Auto-triggers after implementation |
575
- | `/utils/docs-graph` | Auto-updates on file changes |
576
- | `/dev-review` | Review after testing passes |
233
+ Apply principles from references/ during implementation. See `_quality-attributes.md` for project-specific quality checklists.
577
234
 
578
- ## Example Flows
579
-
580
- ### Example 1: Specific UC (Skip Selection)
581
- ```
582
- User: /dev-coding UC-AUTH-001
583
-
584
- 1. Load UC-AUTH-001 spec
585
- → Backend: POST /api/auth/login
586
- → Frontend: LoginForm component, /login page
587
-
588
- 2. Check dependencies
589
- → None for UC-AUTH-001 (it's first)
590
-
591
- 3. Load dev-coding-backend
592
- → Create login endpoint
593
- → Test with curl ✓
594
-
595
- 4. Load dev-coding-frontend
596
- → Create LoginForm component
597
- → Create /login page
598
- → Connect to API
599
-
600
- 5. Integration test
601
- → Fill form → Submit → Verify redirect ✓
602
-
603
- 6. Quality checks
604
- → Lint ✓, Types ✓, No debug code ✓
605
-
606
- 7. Auto-test (dev-test)
607
- → Navigate to /login
608
- → Fill form, submit
609
- → Check console: No errors ✓
610
- → Check network: All 2xx ✓
611
- → Visual check: Form renders ✓
612
-
613
- 8. Complete
614
- → Update spec status (with test results)
615
- → Document changes
616
- → Suggest: "Run /dev-review before committing"
617
- → Note: "UC-AUTH-002 (Signup) is now unblocked"
618
- ```
235
+ ## Tools
619
236
 
620
- ### Example 2: One by One Mode (Recommended)
621
- ```
622
- User: /dev-coding auth
623
-
624
- 📋 Available Use Cases for auth:
625
- 1. UC-AUTH-001: User Login
626
- 2. UC-AUTH-002: User Signup
627
- 3. UC-AUTH-003: Password Reset
628
-
629
- ? Which use cases would you like to implement?
630
- ◉ One by one (Recommended) ← User selects this
631
- ○ Multiple (custom selection)
632
- ○ All at once
633
-
634
- ───────────────────────────────────────────────
635
- 🔨 UC-AUTH-001: User Login
636
- ───────────────────────────────────────────────
637
-
638
- Phase 1-6: Implement backend + frontend
639
- Phase 7: Auto-test
640
- ✓ Navigate to /login
641
- ✓ Fill form and submit
642
- ✓ No console errors
643
- ✓ API returns 200
644
- ✓ Redirect to /dashboard works
645
-
646
- Phase 8: Complete
647
- ✓ UC-AUTH-001 implemented and tested successfully!
648
-
649
- Remaining: UC-AUTH-002, UC-AUTH-003
650
-
651
- ? Continue with UC-AUTH-002? ← Prompt after testing passes
652
- ◉ Yes (continue)
653
- ○ No (stop here)
654
- ○ Select different UCs
655
-
656
- User selects: Yes
657
-
658
- ───────────────────────────────────────────────
659
- 🔨 UC-AUTH-002: User Signup
660
- ───────────────────────────────────────────────
661
-
662
- Phase 1-6: Implement backend + frontend
663
- Phase 7: Auto-test
664
- ✓ Navigate to /signup
665
- ✓ Fill registration form
666
- ✓ Submit and verify
667
- ✗ Console error: "Email validation failed"
668
-
669
- ⚠️ Tests failed. Fixing...
670
- → Updated validation logic
671
- → Re-testing...
672
- ✓ All tests pass
673
-
674
- Phase 8: Complete
675
- ✓ UC-AUTH-002 implemented and tested successfully!
676
-
677
- Remaining: UC-AUTH-003
678
-
679
- ? Continue with UC-AUTH-003?
680
- ◉ Yes
681
- ○ No (stop here)
682
- ○ Select different UCs
683
-
684
- User selects: No
685
-
686
- ───────────────────────────────────────────────
687
- Summary
688
- ───────────────────────────────────────────────
689
- ✅ Completed:
690
- - UC-AUTH-001: User Login ✓
691
- - UC-AUTH-002: User Signup ✓
692
-
693
- ⏸️ Pending:
694
- - UC-AUTH-003: Password Reset
695
-
696
- 💡 Next steps:
697
- - Run /dev-review auth
698
- - Resume later with: /dev-coding UC-AUTH-003
699
- ```
237
+ | Tool | Purpose | When |
238
+ |------|---------|------|
239
+ | `Read` | Load spec, tech-context.md, files | Phase 1, as needed |
240
+ | `Glob` | Find files by pattern | Just-in-time discovery |
241
+ | `Grep` | Search for code patterns | Just-in-time discovery |
242
+ | `Edit` | Modify existing files | Implementation |
243
+ | `Write` | Create new files | Implementation |
244
+ | `Bash` | Run tests, git commands | Testing, committing |
245
+ | `TodoWrite` | Track implementation progress | Throughout |
700
246
 
701
- **Key Points in "One by One" Mode:**
702
- 1. Each UC is **fully implemented** (Phases 1-6)
703
- 2. Each UC is **fully tested** (Phase 7) before prompting
704
- 3. User gets a **checkpoint** to review/test manually if desired
705
- 4. User **chooses** whether to continue or stop
706
- 5. If tests fail, they're **fixed before** asking to continue
707
- 6. Can **resume later** from any UC
247
+ ## Anti-Patterns
708
248
 
709
- ### Potential Issues with "One by One" Testing
249
+ Reading every file upfront (discover as needed)
250
+ ❌ Categorizing work as "backend" or "frontend" (just apply what's needed)
251
+ ❌ Memorizing function names (look them up when needed)
252
+ ❌ Ignoring principles (universal + project-specific)
253
+ ❌ Not validating against acceptance criteria (that's success)
254
+ ❌ Pre-loading all components (wasteful, discover when needed)
710
255
 
711
- While "one by one" is the safest mode, be aware of these considerations:
256
+ ## Edge Cases
712
257
 
713
- | Issue | Description | Mitigation |
714
- |-------|-------------|------------|
715
- | **Integration gaps** | UCs tested individually might miss cross-UC interactions | After all UCs complete, run full integration test |
716
- | **Shared state** | Later UCs might depend on state from earlier UCs | Use cumulative testing (don't reset DB between UCs) |
717
- | **Conflicting changes** | UC #3 might need different approach than UC #1 implemented | May need to refactor earlier UCs (acceptable tradeoff) |
718
- | **Performance at scale** | Individual UCs work, but all together cause issues | Final integration test should include load testing |
719
- | **Git commit strategy** | Should each UC be committed separately? | Depends on team workflow (see below) |
258
+ **No tech-context.md:**
259
+ - Error: "Run /dev-scout first to document patterns"
720
260
 
721
- **Best Practice - Cumulative Testing:**
722
- ```
723
- UC #1: Test in isolation ✓
724
- UC #2: Test UC #2 + verify UC #1 still works ✓
725
- UC #3: Test UC #3 + verify UC #1, UC #2 still work ✓
726
- ```
261
+ **No spec:**
262
+ - Error: "Run /dev-specs {feature} first to create implementation plan"
727
263
 
728
- This ensures each UC works both **independently** and **together**.
264
+ **Spec references non-existent pattern:**
265
+ - Discover pattern via Grep/Glob
266
+ - If truly doesn't exist, implement following best practices
267
+ - Note deviation in implementation notes
729
268
 
730
- **Implementation in Phase 7:**
731
- ```javascript
732
- // For UC #2 onwards, add regression checks
733
- Phase 7: Auto-Test
734
- 1. Test current UC (UC-AUTH-002: Signup) ✓
735
- 2. Regression: Quick test of previous UCs
736
- → UC-AUTH-001 (Login) still works? ✓
737
- 3. All pass → Continue
738
- ```
269
+ ## Success Criteria
739
270
 
740
- **Git Strategy for "One by One":**
271
+ Implementation successful when:
272
+ - ✅ All acceptance criteria met
273
+ - ✅ All files from checklist created/modified
274
+ - ✅ Patterns from tech-context.md followed
275
+ - ✅ Tests passing (if applicable)
276
+ - ✅ Code quality checks passed
277
+ - ✅ No security vulnerabilities
741
278
 
742
- | Strategy | When to Use | Commits |
743
- |----------|-------------|---------|
744
- | **Commit each UC** | When UCs are independent, team reviews incrementally | 1 commit per UC |
745
- | **Commit all together** | When UCs are tightly coupled, want atomic feature | 1 commit after all UCs |
746
- | **Hybrid** | Mix of both - commit stable UCs, batch dependent ones | Flexible |
279
+ ## References
747
280
 
748
- **Recommended Git Flow:**
749
- ```
750
- One by One Mode:
751
- UC #1 complete → Commit → Continue?
752
- UC #2 complete → Commit → Continue?
753
- UC #3 complete → Commit → Done
754
-
755
- Multiple/All Mode:
756
- UC #1 complete → Auto-continue (no commit)
757
- UC #2 complete → Auto-continue (no commit)
758
- UC #3 complete → Single commit for all → Done
759
- ```
281
+ - `references/backend-principles.md` - Universal API, data, security principles
282
+ - `references/frontend-principles.md` - Universal UI, component, state principles
760
283
 
761
- This gives "one by one" the advantage of **incremental commits** that are easier to review and revert.
284
+ These provide general software engineering wisdom. Combine with tech-context.md for project-specific implementation.