@codihaus/claude-skills 1.0.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.
Files changed (46) hide show
  1. package/README.md +167 -0
  2. package/bin/cli.js +58 -0
  3. package/package.json +46 -0
  4. package/skills/_quality-attributes.md +392 -0
  5. package/skills/_registry.md +189 -0
  6. package/skills/debrief/SKILL.md +647 -0
  7. package/skills/debrief/references/change-request-template.md +124 -0
  8. package/skills/debrief/references/file-patterns.md +173 -0
  9. package/skills/debrief/references/group-codes.md +72 -0
  10. package/skills/debrief/references/research-queries.md +106 -0
  11. package/skills/debrief/references/use-case-template.md +141 -0
  12. package/skills/debrief/scripts/generate_questionnaire.py +195 -0
  13. package/skills/dev-arch/SKILL.md +747 -0
  14. package/skills/dev-changelog/SKILL.md +378 -0
  15. package/skills/dev-coding/SKILL.md +470 -0
  16. package/skills/dev-coding-backend/SKILL.md +361 -0
  17. package/skills/dev-coding-frontend/SKILL.md +534 -0
  18. package/skills/dev-coding-frontend/references/nextjs.md +477 -0
  19. package/skills/dev-review/SKILL.md +548 -0
  20. package/skills/dev-scout/SKILL.md +723 -0
  21. package/skills/dev-scout/references/feature-patterns.md +210 -0
  22. package/skills/dev-scout/references/file-patterns.md +252 -0
  23. package/skills/dev-scout/references/tech-detection.md +211 -0
  24. package/skills/dev-scout/scripts/scout-analyze.sh +280 -0
  25. package/skills/dev-specs/SKILL.md +577 -0
  26. package/skills/dev-specs/references/checklist.md +176 -0
  27. package/skills/dev-specs/references/spec-templates.md +460 -0
  28. package/skills/dev-test/SKILL.md +364 -0
  29. package/skills/utils/diagram/SKILL.md +205 -0
  30. package/skills/utils/diagram/references/common-errors.md +305 -0
  31. package/skills/utils/diagram/references/diagram-types.md +636 -0
  32. package/skills/utils/docs-graph/SKILL.md +204 -0
  33. package/skills/utils/gemini/SKILL.md +292 -0
  34. package/skills/utils/gemini/scripts/gemini-scan.py +340 -0
  35. package/skills/utils/gemini/scripts/setup.sh +169 -0
  36. package/src/commands/add.js +64 -0
  37. package/src/commands/doctor.js +179 -0
  38. package/src/commands/init.js +251 -0
  39. package/src/commands/list.js +88 -0
  40. package/src/commands/remove.js +60 -0
  41. package/src/commands/update.js +72 -0
  42. package/src/index.js +26 -0
  43. package/src/utils/config.js +272 -0
  44. package/src/utils/deps.js +599 -0
  45. package/src/utils/skills.js +253 -0
  46. package/templates/CLAUDE.md.template +58 -0
@@ -0,0 +1,470 @@
1
+ ---
2
+ name: dev-coding
3
+ description: Implement features from specs with backend and frontend skills
4
+ version: 1.2.0
5
+ ---
6
+
7
+ # /dev-coding - Implementation Skill
8
+
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)
13
+ > - **After**: Auto-triggers `/dev-test` to verify implementation
14
+ > - **After test**: Suggest `/dev-review` for code review
15
+
16
+ Implement features based on specs. Orchestrates backend and frontend work.
17
+
18
+ ## When to Use
19
+
20
+ - Implement a use case from /dev-specs
21
+ - Build feature end-to-end (API + UI)
22
+ - Make changes defined in implementation plan
23
+
24
+ ## Usage
25
+
26
+ ```
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
+ ```
32
+
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: Load Context
54
+
55
+ ```
56
+ 1. Read UC spec
57
+ → plans/features/{feature}/specs/{UC-ID}/README.md
58
+
59
+ 2. Read scout for patterns
60
+ → plans/features/{feature}/scout.md OR plans/scout/README.md
61
+
62
+ 3. Read architecture decisions
63
+ → plans/features/{feature}/architecture.md
64
+
65
+ 4. Read quality attributes (Implementation Level)
66
+ → skills/_quality-attributes.md
67
+ → Focus on: query efficiency, memory, concurrency, error handling
68
+
69
+ 5. Read docs-graph for dependencies
70
+ → plans/docs-graph.json
71
+
72
+ 6. Check: Are dependencies complete?
73
+ → If UC depends on another UC, verify it's done
74
+ → Warn if not, let user decide to proceed
75
+ ```
76
+
77
+ ### Phase 1: Determine Work Type
78
+
79
+ Based on spec, determine what's needed:
80
+
81
+ | Spec Contains | Work Type | Skill to Load |
82
+ |---------------|-----------|---------------|
83
+ | API endpoints, schema | Backend | dev-coding-backend |
84
+ | UI components, pages | Frontend | dev-coding-frontend |
85
+ | Both | Full-stack | Backend first, then Frontend |
86
+
87
+ ```
88
+ Read spec → Extract:
89
+ - API changes needed?
90
+ - Schema/DB changes needed?
91
+ - UI components needed?
92
+ - Pages/routes needed?
93
+ ```
94
+
95
+ ### Phase 2: Load Sub-Skills
96
+
97
+ **If backend work needed:**
98
+ ```
99
+ Read: skills/dev-coding-backend/SKILL.md
100
+ Read: skills/dev-coding-backend/references/{tech}.md (if exists)
101
+
102
+ Tech detected from scout:
103
+ - directus → directus.md
104
+ - node → node.md
105
+ - prisma → prisma.md
106
+ ```
107
+
108
+ **If frontend work needed:**
109
+ ```
110
+ Read: skills/dev-coding-frontend/SKILL.md
111
+ Read: skills/dev-coding-frontend/references/{tech}.md (if exists)
112
+
113
+ Tech detected from scout:
114
+ - nextjs → nextjs.md
115
+ - vue → vue.md
116
+ - react → react.md
117
+ ```
118
+
119
+ ### Phase 3: Execute Backend (if needed)
120
+
121
+ Follow dev-coding-backend workflow:
122
+
123
+ 1. **Schema changes** (if needed)
124
+ - Create/modify collections, tables, models
125
+ - Run migrations
126
+ - Verify schema
127
+
128
+ 2. **API implementation**
129
+ - Create endpoints per spec
130
+ - Implement business logic
131
+ - Add validation, error handling
132
+
133
+ 3. **Backend verification**
134
+ ```bash
135
+ # Test API works
136
+ curl -X POST http://localhost:3000/api/auth/login \
137
+ -H "Content-Type: application/json" \
138
+ -d '{"email":"test@test.com","password":"test"}'
139
+ ```
140
+
141
+ 4. **Document what was created**
142
+ - Endpoints available
143
+ - Request/response shapes
144
+ - Auth requirements
145
+
146
+ ### Phase 4: Execute Frontend (if needed)
147
+
148
+ Follow dev-coding-frontend workflow:
149
+
150
+ 1. **Components** (if needed)
151
+ - Create/modify UI components
152
+ - Follow project conventions from scout
153
+
154
+ 2. **Pages/Routes** (if needed)
155
+ - Create page files
156
+ - Set up routing
157
+
158
+ 3. **API Integration**
159
+ - Connect to backend (use info from Phase 3)
160
+ - Handle loading, error states
161
+
162
+ 4. **Frontend verification**
163
+ - Visual check (Playwright screenshot or manual)
164
+ - Interaction test
165
+
166
+ ### Phase 5: Integration Test
167
+
168
+ End-to-end verification:
169
+
170
+ ```
171
+ 1. Start from UI
172
+ 2. Perform user action
173
+ 3. Verify API called correctly
174
+ 4. Verify response handled
175
+ 5. Verify UI updated
176
+ ```
177
+
178
+ **Methods:**
179
+ - Playwright for automated
180
+ - Manual walkthrough
181
+ - curl + UI check
182
+
183
+ ### Phase 6: Quality Checks
184
+
185
+ Run through `_quality-attributes.md` Implementation Level checklists:
186
+
187
+ **From quality attributes:**
188
+ ```
189
+ [ ] Scalability
190
+ - No N+1 queries (use joins/includes)
191
+ - Select only needed fields
192
+ - Limit result sets
193
+ - Connection pooling used
194
+
195
+ [ ] Maintainability
196
+ - Functions do one thing
197
+ - Names describe intent
198
+ - No magic numbers/strings
199
+
200
+ [ ] Performance
201
+ - Database queries optimized
202
+ - Heavy computation cached or async
203
+ - No unnecessary re-renders (frontend)
204
+
205
+ [ ] Security
206
+ - All input validated
207
+ - SQL injection prevented
208
+ - XSS prevented
209
+ - No hardcoded secrets
210
+
211
+ [ ] Reliability
212
+ - Errors caught and handled
213
+ - User-friendly error messages
214
+ - Timeouts on external calls
215
+
216
+ [ ] Testability
217
+ - Pure functions where possible
218
+ - Dependencies injected
219
+ ```
220
+
221
+ **Project-specific:**
222
+ ```
223
+ [ ] Code follows project conventions (from scout)
224
+ [ ] No linting errors
225
+ [ ] No type errors
226
+ [ ] Tests pass (if project has tests)
227
+ [ ] No console.log / debug code left
228
+ ```
229
+
230
+ ### Phase 7: Auto-Test
231
+
232
+ **Automatically run testing to verify implementation:**
233
+
234
+ ```
235
+ 1. Load dev-test skill
236
+ → Read skills/dev-test/SKILL.md
237
+
238
+ 2. Determine test URL
239
+ → From project config or spec
240
+ → Default: http://localhost:3000/{path}
241
+
242
+ 3. Run E2E test
243
+ → Navigate to page
244
+ → Execute user flow from spec
245
+ → Capture errors
246
+
247
+ 4. Analyze results
248
+ → Console errors?
249
+ → Network failures?
250
+ → Visual issues?
251
+
252
+ 5. Handle results:
253
+ - All pass → Proceed to Phase 8
254
+ - Issues found → Report and fix
255
+ ```
256
+
257
+ **Test Flow:**
258
+
259
+ ```typescript
260
+ // 1. Navigate
261
+ await mcp__playwright__browser_navigate({ url: testUrl });
262
+
263
+ // 2. Execute user flow
264
+ // (based on UC spec steps)
265
+
266
+ // 3. Collect errors
267
+ const consoleErrors = await mcp__playwright__browser_console_messages({
268
+ level: 'error'
269
+ });
270
+ const networkRequests = await mcp__playwright__browser_network_requests({});
271
+
272
+ // 4. Report or fix
273
+ if (hasErrors) {
274
+ // Fix and re-test (max 3 iterations)
275
+ }
276
+ ```
277
+
278
+ **On Test Failure:**
279
+
280
+ ```markdown
281
+ ⚠️ **Testing found issues:**
282
+
283
+ 1. [Console] TypeError in LoginForm.tsx:45
284
+ 2. [Network] POST /api/auth/login returned 500
285
+
286
+ **Auto-fixing...** (if straightforward)
287
+ **Or reporting for manual fix** (if complex)
288
+ ```
289
+
290
+ ### Phase 8: Complete
291
+
292
+ 1. **Update spec status**
293
+ ```markdown
294
+ <!-- In specs/{UC-ID}/README.md -->
295
+ > **Status**: Complete
296
+ > **Completed**: {date}
297
+ > **Tested**: ✓ Pass
298
+ ```
299
+
300
+ 2. **Document changes**
301
+ ```markdown
302
+ ## Implementation Notes
303
+
304
+ ### Files Changed
305
+ - `src/api/auth/login.ts` - Created login endpoint
306
+ - `src/components/LoginForm.tsx` - Created form component
307
+
308
+ ### Deviations from Spec
309
+ - Added rate limiting (not in spec, but security best practice)
310
+
311
+ ### Test Results
312
+ - E2E flow: ✓ Pass
313
+ - Console errors: None
314
+ - API responses: All 2xx
315
+
316
+ ### Next Steps
317
+ - UC-AUTH-002 can now proceed (depends on this)
318
+ ```
319
+
320
+ 3. **Update docs-graph** (automatic via hook)
321
+
322
+ 4. **Suggest next action**
323
+ ```markdown
324
+ ✅ **Implementation complete and tested.**
325
+
326
+ 💡 **Suggestions:**
327
+ - Run `/dev-review` to review changes before commit
328
+ - UC-AUTH-002 (Signup) is now unblocked
329
+ ```
330
+
331
+ ## Communication Protocol
332
+
333
+ ### When to Ask
334
+
335
+ | Situation | Action |
336
+ |-----------|--------|
337
+ | Spec unclear | Ask for clarification |
338
+ | Multiple valid approaches | Present options, ask preference |
339
+ | Stuck > 15 min | Document attempts, ask for help |
340
+ | Spec seems wrong | Flag it, propose alternative |
341
+ | Scope creep detected | Stop, suggest CR |
342
+
343
+ ### How to Ask
344
+
345
+ ```markdown
346
+ **Blocker**: {What's blocking}
347
+
348
+ **Tried**:
349
+ 1. {Attempt 1} → {Result}
350
+ 2. {Attempt 2} → {Result}
351
+
352
+ **Options**:
353
+ A) {Option A} - {Tradeoff}
354
+ B) {Option B} - {Tradeoff}
355
+
356
+ **Recommendation**: {Your suggestion}
357
+ ```
358
+
359
+ ### Scope Creep Protocol
360
+
361
+ | Deviation | Action |
362
+ |-----------|--------|
363
+ | Tiny (typo) | Fix silently |
364
+ | Small (edge case) | Ask + proceed |
365
+ | Medium (new field) | Document + ask |
366
+ | Large (approach wrong) | Stop + create CR |
367
+
368
+ ## Dependency Handling
369
+
370
+ When UC depends on another:
371
+
372
+ ```
373
+ 1. Check docs-graph for dependencies
374
+ 2. For each dependency:
375
+ - Is UC marked complete? → OK
376
+ - Is code actually there? → Check (more reliable)
377
+ 3. If dependency missing:
378
+ - Warn user
379
+ - Ask: Proceed anyway? / Do dependency first?
380
+ ```
381
+
382
+ ## Tools Used
383
+
384
+ | Tool | Purpose |
385
+ |------|---------|
386
+ | `Read` | Load specs, scout, sub-skills |
387
+ | `Write` | Create new files |
388
+ | `Edit` | Modify existing files |
389
+ | `Bash` | Run commands, curl tests |
390
+ | `Glob` | Find files |
391
+ | `Grep` | Search code |
392
+ | `mcp__playwright__*` | UI verification |
393
+ | `Context7` | Look up library documentation |
394
+
395
+ ### Context7 for Implementation
396
+
397
+ When coding, use Context7 to look up library APIs:
398
+
399
+ ```
400
+ 1. Resolve library
401
+ → mcp__context7__resolve-library-id({
402
+ libraryName: "zod",
403
+ query: "form validation schema"
404
+ })
405
+
406
+ 2. Query specific API
407
+ → mcp__context7__query-docs({
408
+ libraryId: "/colinhacks/zod",
409
+ query: "custom error messages"
410
+ })
411
+ ```
412
+
413
+ **Use for:**
414
+ - Library APIs you're less familiar with
415
+ - Framework-specific patterns
416
+ - Error handling approaches
417
+ - Best practices
418
+
419
+ ## Integration
420
+
421
+ | Skill | Relationship |
422
+ |-------|--------------|
423
+ | `/dev-specs` | Reads implementation plan from |
424
+ | `/dev-scout` | Reads patterns/conventions from |
425
+ | `/dev-coding-backend` | Loads for API/schema work |
426
+ | `/dev-coding-frontend` | Loads for UI work |
427
+ | `/dev-test` | Auto-triggers after implementation |
428
+ | `/utils/docs-graph` | Auto-updates on file changes |
429
+ | `/dev-review` | Review after testing passes |
430
+
431
+ ## Example Flow
432
+
433
+ ```
434
+ User: /dev-coding UC-AUTH-001
435
+
436
+ 1. Load UC-AUTH-001 spec
437
+ → Backend: POST /api/auth/login
438
+ → Frontend: LoginForm component, /login page
439
+
440
+ 2. Check dependencies
441
+ → None for UC-AUTH-001 (it's first)
442
+
443
+ 3. Load dev-coding-backend
444
+ → Create login endpoint
445
+ → Test with curl ✓
446
+
447
+ 4. Load dev-coding-frontend
448
+ → Create LoginForm component
449
+ → Create /login page
450
+ → Connect to API
451
+
452
+ 5. Integration test
453
+ → Fill form → Submit → Verify redirect ✓
454
+
455
+ 6. Quality checks
456
+ → Lint ✓, Types ✓, No debug code ✓
457
+
458
+ 7. Auto-test (dev-test)
459
+ → Navigate to /login
460
+ → Fill form, submit
461
+ → Check console: No errors ✓
462
+ → Check network: All 2xx ✓
463
+ → Visual check: Form renders ✓
464
+
465
+ 8. Complete
466
+ → Update spec status (with test results)
467
+ → Document changes
468
+ → Suggest: "Run /dev-review before committing"
469
+ → Note: "UC-AUTH-002 (Signup) is now unblocked"
470
+ ```