@compilr-dev/agents 0.2.1 → 0.3.1

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.
@@ -172,93 +172,439 @@ export const builtinSkills = [
172
172
  defineSkill({
173
173
  name: 'code-review',
174
174
  description: 'Perform a thorough code review',
175
- prompt: `You are now in code review mode. When reviewing code:
175
+ prompt: `You are now in CODE REVIEW MODE.
176
176
 
177
- 1. **Security**: Check for vulnerabilities (injection, XSS, auth issues)
178
- 2. **Performance**: Identify bottlenecks and optimization opportunities
179
- 3. **Maintainability**: Evaluate code clarity, naming, and structure
180
- 4. **Best Practices**: Check for anti-patterns and code smells
181
- 5. **Testing**: Assess test coverage and edge cases
177
+ ## Purpose
178
+ Perform a thorough, actionable code review.
182
179
 
183
- Provide specific, actionable feedback with line references.
184
- Format: List issues by severity (Critical, High, Medium, Low).`,
180
+ ## When to Use
181
+ - User asks to review code, PR, or changes
182
+ - Before merging a feature branch
183
+ - After implementing a feature
184
+
185
+ ## When NOT to Use
186
+ - User just wants to understand code → use explain skill
187
+ - Code is already in production and can't change
188
+ - User wants security-specific review → use security-review skill
189
+
190
+ ## Workflow
191
+
192
+ ### Phase 1: Understand Context
193
+ 1. Read the files being reviewed
194
+ 2. Check git status for what changed
195
+ 3. Review the diff to see actual changes
196
+
197
+ ### Phase 2: Review by Severity
198
+
199
+ **Critical** (must fix before merge):
200
+ - Security vulnerabilities (injection, XSS, auth bypass)
201
+ - Data loss risks
202
+ - Breaking changes to public APIs
203
+
204
+ **High** (should fix):
205
+ - Logic errors / bugs
206
+ - Missing error handling for likely cases
207
+ - Performance issues (N+1 queries, unbounded loops)
208
+
209
+ **Medium** (consider fixing):
210
+ - Code clarity / naming issues
211
+ - Missing tests for new code
212
+ - Inconsistent patterns
213
+
214
+ **Low** (optional):
215
+ - Style preferences
216
+ - Minor optimizations
217
+
218
+ ### Phase 3: Report
219
+ Format findings with file:line references:
220
+ \`\`\`
221
+ ## Code Review: [file/feature]
222
+
223
+ ### Critical Issues
224
+ - **src/auth.ts:42**: SQL injection risk → use parameterized query
225
+
226
+ ### High Priority
227
+ - **src/api.ts:15**: Missing null check → add guard
228
+
229
+ ### Suggestions
230
+ - Consider extracting duplicate logic
231
+
232
+ ### What's Good
233
+ - Clear naming, good test coverage
234
+ \`\`\`
235
+
236
+ ## Rules
237
+ - Read the code before reviewing - never review blind
238
+ - Be specific with line references
239
+ - Suggest fixes, not just problems
240
+ - Distinguish blocking vs non-blocking issues
241
+ - Don't nitpick style if code works
242
+
243
+ ## Completion Criteria
244
+ ✓ All changed files reviewed
245
+ ✓ Issues categorized by severity
246
+ ✓ Actionable suggestions provided`,
185
247
  tags: ['development', 'review'],
186
248
  }),
187
249
  defineSkill({
188
250
  name: 'debug',
189
251
  description: 'Systematic debugging approach',
190
- prompt: `You are now in debugging mode. Follow this systematic approach:
191
-
192
- 1. **Reproduce**: Ensure the issue can be consistently reproduced
193
- 2. **Isolate**: Narrow down the scope to specific components
194
- 3. **Analyze**: Examine logs, stack traces, and state
195
- 4. **Hypothesize**: Form theories about root cause
196
- 5. **Test**: Verify hypotheses with targeted tests
197
- 6. **Fix**: Implement and validate the fix
198
- 7. **Document**: Note the issue and solution for future reference
199
-
200
- Be methodical and avoid jumping to conclusions.`,
252
+ prompt: `You are now in DEBUG MODE.
253
+
254
+ ## Purpose
255
+ Systematically investigate and fix issues.
256
+
257
+ ## When to Use
258
+ - User reports a bug or error
259
+ - Tests are failing
260
+ - Unexpected behavior occurs
261
+
262
+ ## When NOT to Use
263
+ - User wants to add a feature → use build skill
264
+ - User wants to understand code → use explain skill
265
+ - User wants code improvements → use refactor skill
266
+
267
+ ## Workflow
268
+
269
+ ### Phase 1: Reproduce
270
+ 1. Understand expected vs actual behavior
271
+ 2. Get error messages/stack traces if available
272
+ 3. Identify steps to reproduce
273
+
274
+ ### Phase 2: Isolate
275
+ 1. Find relevant code using grep or glob
276
+ 2. Read the suspected files
277
+ 3. Narrow down to specific function/line
278
+
279
+ ### Phase 3: Hypothesize
280
+ Form theories about root cause:
281
+ - Input validation issue?
282
+ - State management bug?
283
+ - Race condition?
284
+ - Missing error handling?
285
+ - Wrong assumption about data?
286
+
287
+ ### Phase 4: Verify
288
+ 1. Add logging/checks to confirm hypothesis
289
+ 2. Run tests to validate
290
+ 3. If hypothesis wrong, return to Phase 2
291
+
292
+ ### Phase 5: Fix
293
+ 1. Make minimal change to fix the issue
294
+ 2. Run tests to confirm fix works
295
+ 3. Check for regressions
296
+
297
+ ### Phase 6: Document
298
+ - Add test case for the bug if missing
299
+ - Add comment if fix is non-obvious
300
+
301
+ ## Common Patterns
302
+
303
+ | Symptom | Likely Cause |
304
+ |---------|--------------|
305
+ | "undefined is not a function" | Missing import, typo |
306
+ | "Cannot read property of null" | Unhandled null case |
307
+ | "Network error" | API/CORS issue |
308
+ | Works locally, fails in CI | Environment difference |
309
+
310
+ ## Rules
311
+ - Read the code before suggesting fixes
312
+ - Don't guess - investigate systematically
313
+ - Make minimal changes - fix the bug, don't refactor
314
+ - Verify the fix actually works
315
+
316
+ ## Completion Criteria
317
+ ✓ Bug is reproduced and understood
318
+ ✓ Root cause identified
319
+ ✓ Fix implemented and tested
320
+ ✓ No regressions introduced`,
201
321
  tags: ['development', 'troubleshooting'],
202
322
  }),
203
323
  defineSkill({
204
324
  name: 'explain',
205
325
  description: 'Explain code or concepts clearly',
206
- prompt: `You are now in explanation mode. When explaining:
207
-
208
- 1. Start with a high-level overview
209
- 2. Break down complex concepts into smaller parts
210
- 3. Use analogies and examples where helpful
211
- 4. Highlight key points and takeaways
212
- 5. Provide context for why things work the way they do
213
- 6. Tailor complexity to the audience level
214
-
215
- Be clear, concise, and avoid unnecessary jargon.`,
326
+ prompt: `You are now in EXPLAIN MODE.
327
+
328
+ ## Purpose
329
+ Clearly explain code, concepts, or architecture.
330
+
331
+ ## When to Use
332
+ - User asks "what does X do?"
333
+ - User asks "how does X work?"
334
+ - User is learning the codebase
335
+
336
+ ## When NOT to Use
337
+ - User wants to change the code → use appropriate skill (refactor, debug, build)
338
+ - User wants a code review → use code-review skill
339
+ - User wants security analysis → use security-review skill
340
+
341
+ ## Approach
342
+
343
+ ### For Code Explanation
344
+ 1. Read the actual code first - never explain from memory
345
+ 2. Start with high-level purpose (1-2 sentences)
346
+ 3. Walk through key parts with line references (file.ts:42)
347
+ 4. Explain non-obvious logic
348
+ 5. Note dependencies and side effects
349
+
350
+ ### For Concept Explanation
351
+ 1. Start with simple definition
352
+ 2. Use analogies if helpful
353
+ 3. Show concrete example
354
+ 4. Mention common pitfalls
355
+
356
+ ### For Architecture Explanation
357
+ 1. Start with component overview
358
+ 2. Explain data flow
359
+ 3. Note key decisions and trade-offs
360
+ 4. Reference relevant files
361
+
362
+ ## Rules
363
+ - Read the actual code - don't explain from memory
364
+ - Use line references: src/auth.ts:42
365
+ - Match complexity to user's apparent level
366
+ - Avoid jargon unless necessary
367
+ - If you don't know, say so
368
+
369
+ ## Completion Criteria
370
+ ✓ User's question is answered
371
+ ✓ Explanation is grounded in actual code
372
+ ✓ Complex parts are broken down clearly`,
216
373
  tags: ['education', 'documentation'],
217
374
  }),
218
375
  defineSkill({
219
376
  name: 'refactor',
220
377
  description: 'Guide code refactoring',
221
- prompt: `You are now in refactoring mode. When refactoring:
222
-
223
- 1. **Understand**: Fully understand existing behavior before changing
224
- 2. **Test First**: Ensure tests exist to catch regressions
225
- 3. **Small Steps**: Make incremental, reversible changes
226
- 4. **Single Purpose**: Each refactor should have one clear goal
227
- 5. **Preserve Behavior**: No functional changes during refactoring
228
- 6. **Clean Up**: Remove dead code, simplify complexity
229
-
230
- Follow established patterns and maintain consistency with the codebase.`,
378
+ prompt: `You are now in REFACTOR MODE.
379
+
380
+ ## Purpose
381
+ Safely restructure code without changing behavior.
382
+
383
+ ## When to Use
384
+ - Code is hard to understand/maintain
385
+ - Preparing code for a new feature
386
+ - Reducing duplication
387
+ - Improving performance
388
+
389
+ ## When NOT to Use
390
+ - Adding new features → use build skill
391
+ - Fixing bugs → use debug skill (behavior change)
392
+ - Just cosmetic changes → not worth the risk
393
+ - No tests exist → add tests first
394
+
395
+ ## Workflow
396
+
397
+ ### Phase 1: Understand
398
+ 1. Read the code to refactor
399
+ 2. Identify what calls this code (find references)
400
+ 3. Check for existing tests
401
+
402
+ ### Phase 2: Ensure Safety
403
+ 1. Run existing tests first
404
+ 2. If no tests, consider adding them first
405
+ 3. Note the current behavior precisely
406
+
407
+ ### Phase 3: Plan
408
+ Identify the specific refactoring:
409
+ - Extract function/method
410
+ - Rename for clarity
411
+ - Reduce duplication
412
+ - Simplify conditionals
413
+ - Split large file
414
+
415
+ ### Phase 4: Execute
416
+ 1. Make ONE refactoring at a time
417
+ 2. Run tests after each change
418
+ 3. If tests fail, revert and try smaller step
419
+
420
+ ### Phase 5: Verify
421
+ 1. Run full test suite
422
+ 2. Run linter
423
+ 3. Review the diff
424
+
425
+ ## Red Flags - Stop and Reconsider
426
+ - No tests exist for this code
427
+ - You're tempted to add features
428
+ - The change touches many files
429
+ - You don't fully understand the code
430
+
431
+ ## Rules
432
+ - NEVER change behavior during refactoring
433
+ - Make small, reversible changes
434
+ - Test after every change
435
+ - Read the code before changing it
436
+ - If also fixing bugs, do that separately
437
+
438
+ ## Completion Criteria
439
+ ✓ Code is improved (clearer, simpler, less duplication)
440
+ ✓ Behavior is unchanged (tests pass)
441
+ ✓ No new warnings/errors introduced`,
231
442
  tags: ['development', 'improvement'],
232
443
  }),
233
444
  defineSkill({
234
445
  name: 'planning',
235
446
  description: 'Help plan and structure work',
236
- prompt: `You are now in planning mode. When planning:
447
+ prompt: `You are now in PLANNING MODE.
448
+
449
+ ## Purpose
450
+ Break down work into clear, actionable steps.
451
+
452
+ ## When to Use
453
+ - Complex feature with multiple parts
454
+ - User asks "how should I approach X?"
455
+ - Before starting significant work
456
+
457
+ ## When NOT to Use
458
+ - Simple, obvious tasks → just do them
459
+ - User already has a clear plan
460
+ - Pure research questions → use explain skill
461
+
462
+ ## Workflow
463
+
464
+ ### Phase 1: Clarify Goals
465
+ 1. What is the desired outcome?
466
+ 2. What are the constraints?
467
+ 3. What's out of scope?
468
+
469
+ If unclear, ask the user to clarify.
470
+
471
+ ### Phase 2: Assess Current State
472
+ 1. Read relevant code
473
+ 2. Check project structure
474
+ 3. Identify what exists vs needs to be built
475
+
476
+ ### Phase 3: Break Down
477
+ Create actionable items:
478
+ - Each item completable in one session
479
+ - Items have clear completion criteria
480
+ - Order by dependencies (what blocks what?)
237
481
 
238
- 1. **Clarify Goals**: Understand the desired outcome
239
- 2. **Break Down**: Divide into manageable tasks
240
- 3. **Dependencies**: Identify task dependencies and order
241
- 4. **Risks**: Anticipate potential blockers
242
- 5. **Milestones**: Define checkpoints to measure progress
243
- 6. **Resources**: Identify what's needed
482
+ ### Phase 4: Identify Risks
483
+ - What could go wrong?
484
+ - What unknowns need investigation?
485
+ - What dependencies might cause issues?
244
486
 
245
- Provide actionable plans with clear next steps.`,
487
+ ### Phase 5: Present Plan
488
+ Format as:
489
+ \`\`\`
490
+ ## Plan: [Feature Name]
491
+
492
+ ### Goal
493
+ [1-2 sentences]
494
+
495
+ ### Steps
496
+ 1. [ ] [Task] - [brief description]
497
+ 2. [ ] [Task] - [brief description]
498
+ ...
499
+
500
+ ### Risks
501
+ - [Risk]: [mitigation]
502
+
503
+ ### Open Questions
504
+ - [Question needing user input]
505
+ \`\`\`
506
+
507
+ ## Rules
508
+ - Don't plan trivial tasks - just do them
509
+ - Be specific - "implement auth" is too vague
510
+ - Consider dependencies between steps
511
+ - Include verification steps (tests, manual check)
512
+ - Don't give time estimates
513
+
514
+ ## Completion Criteria
515
+ ✓ Goal is clear
516
+ ✓ Steps are actionable and ordered
517
+ ✓ Risks are identified
518
+ ✓ User agrees with the approach`,
246
519
  tags: ['project-management', 'organization'],
247
520
  }),
248
521
  defineSkill({
249
522
  name: 'security-review',
250
523
  description: 'Focus on security aspects',
251
- prompt: `You are now in security review mode. Focus on:
524
+ prompt: `You are now in SECURITY REVIEW MODE.
525
+
526
+ ## Purpose
527
+ Identify security vulnerabilities in code.
528
+
529
+ ## When to Use
530
+ - Before deploying to production
531
+ - Reviewing authentication/authorization code
532
+ - Handling user input or sensitive data
533
+ - Third-party integration code
252
534
 
253
- 1. **Authentication**: Verify proper auth mechanisms
254
- 2. **Authorization**: Check access control at every level
255
- 3. **Input Validation**: Look for injection vulnerabilities
256
- 4. **Data Protection**: Ensure sensitive data is protected
257
- 5. **Dependencies**: Check for known vulnerabilities
258
- 6. **Configuration**: Review security settings
259
- 7. **Logging**: Verify security events are logged
535
+ ## When NOT to Use
536
+ - General code quality issues use code-review skill
537
+ - Performance issues use code-optimization skill
538
+ - Just want to understand code use explain skill
260
539
 
261
- Apply OWASP guidelines and security best practices.`,
540
+ ## Workflow
541
+
542
+ ### Phase 1: Identify Attack Surface
543
+ 1. Find entry points: APIs, forms, file uploads
544
+ 2. Find data flows: user input → storage → output
545
+ 3. Find sensitive operations: auth, payments, admin
546
+
547
+ ### Phase 2: Check OWASP Top 10
548
+
549
+ **1. Injection (SQL, Command, XSS)**
550
+ - Is user input sanitized before queries?
551
+ - Are parameterized queries used?
552
+ - Is output encoded/escaped?
553
+
554
+ **2. Broken Authentication**
555
+ - Are passwords hashed properly (bcrypt, argon2)?
556
+ - Are sessions managed securely?
557
+ - Is MFA available for sensitive ops?
558
+
559
+ **3. Sensitive Data Exposure**
560
+ - Is data encrypted in transit (HTTPS)?
561
+ - Are secrets in environment variables (not code)?
562
+ - Is sensitive data logged?
563
+
564
+ **4. Broken Access Control**
565
+ - Are authorization checks on every endpoint?
566
+ - Can users access other users' data?
567
+ - Are admin functions protected?
568
+
569
+ **5. Security Misconfiguration**
570
+ - Are default credentials changed?
571
+ - Are error messages generic (no stack traces)?
572
+ - Are unnecessary features disabled?
573
+
574
+ **6. Using Vulnerable Components**
575
+ - Run findVulnerabilities() or npm audit
576
+ - Check for outdated dependencies
577
+
578
+ ### Phase 3: Report Findings
579
+
580
+ Format as:
581
+ \`\`\`
582
+ ## Security Review: [component]
583
+
584
+ ### Critical (immediate action)
585
+ - **file:line**: [vulnerability]
586
+ Risk: [impact]
587
+ Fix: [solution]
588
+
589
+ ### High (fix before deploy)
590
+ ...
591
+
592
+ ### Recommendations
593
+ - [proactive improvements]
594
+ \`\`\`
595
+
596
+ ## Rules
597
+ - Be specific about the vulnerability
598
+ - Explain the real-world impact
599
+ - Provide actionable fix suggestions
600
+ - Don't cry wolf - prioritize real risks
601
+ - Check for existing security controls first
602
+
603
+ ## Completion Criteria
604
+ ✓ Attack surface identified
605
+ ✓ OWASP categories checked
606
+ ✓ Findings prioritized by severity
607
+ ✓ Fix suggestions provided`,
262
608
  tags: ['security', 'review'],
263
609
  }),
264
610
  defineSkill({
@@ -266,6 +612,16 @@ Apply OWASP guidelines and security best practices.`,
266
612
  description: 'Guide user through project design and requirements gathering',
267
613
  prompt: `You are in DESIGN MODE. Your goal is to gather enough information to populate the project backlog with 5-15 actionable items.
268
614
 
615
+ ## When to Use
616
+ - Starting a new project from scratch
617
+ - User has an idea but no clear requirements
618
+ - Need to create initial backlog
619
+
620
+ ## When NOT to Use
621
+ - Project already has requirements → use refine skill
622
+ - Quick project outline needed → use sketch skill
623
+ - Just need to update PRD → use prd skill
624
+
269
625
  ## PHASES
270
626
 
271
627
  ### Phase 1: Vision (3-5 questions)
@@ -333,6 +689,17 @@ When you have enough information:
333
689
  description: 'Iteratively refine and expand project requirements',
334
690
  prompt: `You are in REFINE MODE. Your goal is to deepen and expand existing requirements based on user feedback.
335
691
 
692
+ ## When to Use
693
+ - Backlog items are too vague
694
+ - Need to add acceptance criteria
695
+ - Reprioritizing existing items
696
+ - Adding missing items to backlog
697
+
698
+ ## When NOT to Use
699
+ - No backlog exists yet → use design skill
700
+ - Quick outline needed → use sketch skill
701
+ - Refining single item → use refine-item skill
702
+
336
703
  ## STARTUP
337
704
 
338
705
  1. Use todo_write to create a task list:
@@ -400,6 +767,16 @@ For complex features:
400
767
  description: 'Quick project outline with simple questions',
401
768
  prompt: `You are in SKETCH MODE. Ask 6 quick questions, then create backlog items.
402
769
 
770
+ ## When to Use
771
+ - Quick project kickoff
772
+ - User wants fast outline without deep dive
773
+ - Initial brainstorming session
774
+
775
+ ## When NOT to Use
776
+ - Detailed requirements needed → use design skill
777
+ - Project already has backlog → use refine skill
778
+ - Single item focus → use refine-item skill
779
+
403
780
  STEPS:
404
781
  1. Use todo_write with 6 tasks (one per question)
405
782
  2. Ask each question using ask_user_simple tool
@@ -429,6 +806,16 @@ RULES:
429
806
  description: 'Focused refinement of a specific backlog item',
430
807
  prompt: `You are in FOCUSED REFINE MODE. Your goal is to refine a specific backlog item.
431
808
 
809
+ ## When to Use
810
+ - User wants to work on a specific backlog item
811
+ - Item needs more detail or breakdown
812
+ - Changing priority of specific item
813
+
814
+ ## When NOT to Use
815
+ - Multiple items need refinement → use refine skill
816
+ - No items exist yet → use design or sketch skill
817
+ - Ready to implement → use build skill
818
+
432
819
  ## STARTUP
433
820
 
434
821
  1. Use backlog_read with id parameter to get the specific item
@@ -487,6 +874,17 @@ Based on user's choice:
487
874
  description: 'Create architecture documentation (ADRs, diagrams, data models, API designs)',
488
875
  prompt: `You are in ARCHITECTURE MODE. Your goal is to create architecture documentation.
489
876
 
877
+ ## When to Use
878
+ - Creating ADRs (Architecture Decision Records)
879
+ - Documenting system diagrams
880
+ - Designing data models or API specs
881
+ - Recording technical decisions
882
+
883
+ ## When NOT to Use
884
+ - Need product requirements → use design or prd skill
885
+ - Need to implement features → use build skill
886
+ - Just want to understand existing code → use explain skill
887
+
490
888
  ## DOCUMENT TYPE: {{doc_type}}
491
889
  {{#if custom_topic}}Custom Topic: {{custom_topic}}{{/if}}
492
890
 
@@ -621,6 +1019,16 @@ Generate appropriate documentation.
621
1019
  description: 'Amend or enhance the Product Requirements Document',
622
1020
  prompt: `You are in PRD MODE. Your goal is to update or enhance the existing Product Requirements Document.
623
1021
 
1022
+ ## When to Use
1023
+ - Updating existing PRD sections
1024
+ - Adding new requirements to PRD
1025
+ - Refining vision or scope
1026
+
1027
+ ## When NOT to Use
1028
+ - No PRD exists yet → use design skill first
1029
+ - Need architecture docs → use architecture skill
1030
+ - Need session summary → use session-notes skill
1031
+
624
1032
  ## STARTUP
625
1033
 
626
1034
  1. Use todo_write to track your progress:
@@ -693,6 +1101,16 @@ Based on section selected:
693
1101
  description: 'Create structured session notes capturing work done and decisions made',
694
1102
  prompt: `You are in SESSION NOTES MODE. Your goal is to create a structured summary of the current session.
695
1103
 
1104
+ ## When to Use
1105
+ - End of a work session
1106
+ - User asks to document what was done
1107
+ - Need to capture decisions for future reference
1108
+
1109
+ ## When NOT to Use
1110
+ - Need product requirements → use prd skill
1111
+ - Need architecture docs → use architecture skill
1112
+ - In the middle of active work
1113
+
696
1114
  ## STARTUP
697
1115
 
698
1116
  1. Use todo_write to track your progress:
@@ -773,185 +1191,8 @@ Create the directory if it doesn't exist.
773
1191
  ✓ User has reviewed the note`,
774
1192
  tags: ['documentation', 'session'],
775
1193
  }),
776
- defineSkill({
777
- name: 'build',
778
- description: 'Implement a backlog item end-to-end',
779
- tags: ['implementation', 'coding'],
780
- prompt: `You are in BUILD MODE. Implement the specified backlog item.
781
-
782
- ## ITEM TO IMPLEMENT
783
- - **ID:** {{item_id}}
784
- - **Title:** {{item_title}}
785
- - **Type:** {{item_type}}
786
- - **Priority:** {{item_priority}}
787
- - **Description:** {{item_description}}
788
-
789
- ## BEFORE STARTING
790
-
791
- 1. Show the item details to the user in a clear format
792
- 2. Use ask_user_simple to confirm: "Proceed with implementation?"
793
- - Options: "Yes, let's build it", "No, pick a different item", "Cancel"
794
- 3. If there are dependency warnings, mention them and ask if user wants to proceed anyway
795
-
796
- ## CONTEXT TO READ
797
-
798
- Before implementing, read these files for context:
799
- - **PRD.md** (if exists): Project vision and requirements
800
- - **CLAUDE.md**: Coding standards and conventions
801
- - **Existing code**: Understand patterns already in use
802
-
803
- ## IMPLEMENTATION WORKFLOW
804
-
805
- ### Phase 1: Plan
806
- 1. Use todo_write to create implementation checklist:
807
- - Break down the item into concrete tasks
808
- - Identify files to create or modify
809
- - Note any edge cases to handle
810
- 2. Update backlog status to 🚧 using backlog_write
811
-
812
- ### Phase 2: Implement
813
- 1. Write code following project conventions from CLAUDE.md
814
- 2. Add tests if the project has a test framework
815
- 3. Keep changes focused on the backlog item scope
816
- 4. Use todo_write to track progress through tasks
817
-
818
- ### Phase 3: Verify
819
- 1. Run tests with run_tests tool
820
- 2. Run lint with run_lint tool
821
- 3. If tests or lint fail:
822
- - Analyze the error message
823
- - Fix the issue
824
- - Re-run verification
825
- - Repeat up to 3 times
826
- 4. If still failing after 3 attempts:
827
- - Report the issue to user
828
- - Keep status as 🚧
829
- - Ask for guidance
830
-
831
- ### Phase 4: Complete
832
- 1. Update backlog status to ✅ using backlog_write
833
- 2. Create git commit with message format:
834
- - feat({{item_id}}): {{item_title}} - for features
835
- - fix({{item_id}}): {{item_title}} - for bugs
836
- - chore({{item_id}}): {{item_title}} - for chores
837
- 3. Update backlog with the commit SHA
838
- 4. Clear todos with todo_write
839
- 5. Summarize what was implemented
840
-
841
- ## RULES
842
-
843
- - Follow coding standards from CLAUDE.md strictly
844
- - Keep commits atomic - one backlog item per commit
845
- - Ask user via ask_user_simple if you hit blockers
846
- - Don't over-engineer - implement exactly what the item describes
847
- - Don't add features beyond what was requested
848
- - Use todo_write throughout to show progress
849
- - Always run tests before marking complete`,
850
- }),
851
- defineSkill({
852
- name: 'scaffold',
853
- description: 'Create project foundation based on tech stack',
854
- tags: ['setup', 'foundation', 'scaffolding'],
855
- prompt: `You are creating the PROJECT SCAFFOLD (foundation).
856
-
857
- ## PURPOSE
858
-
859
- Create the base project structure that features will be built on top of.
860
- This is the skeleton that makes feature implementation possible.
861
-
862
- ## CONTEXT TO READ
863
-
864
- First, read these files to understand what to build:
865
- - **CLAUDE.md**: Tech stack, coding standards, project type
866
- - **PRD.md** (if exists): Project vision and requirements
867
- - **Existing files**: What already exists (if anything)
868
-
869
- ## BEFORE STARTING
870
-
871
- 1. Summarize the detected/specified tech stack
872
- 2. Use ask_user_simple to confirm: "Create project scaffold with this stack?"
873
- - Options: "Yes, create it", "No, let me specify", "Cancel"
874
- 3. If user wants to specify, ask about tech stack preferences
875
-
876
- ## SCAFFOLD BY PROJECT TYPE
877
-
878
- ### Web Application (React/Vue/Svelte)
879
-
880
- Create:
881
- - \`src/\` folder structure:
882
- - \`src/components/\` - Reusable components
883
- - \`src/pages/\` or \`src/routes/\` - Page components
884
- - \`src/lib/\` or \`src/utils/\` - Utility functions
885
- - \`src/styles/\` - Global styles
886
- - \`package.json\` with dependencies
887
- - Build config (\`vite.config.ts\`, \`next.config.js\`, etc.)
888
- - \`index.html\` entry point (if applicable)
889
- - Basic App component with routing setup
890
- - CSS/Tailwind configuration
891
- - \`.gitignore\`
892
- - \`README.md\` with setup instructions
893
-
894
- ### API / Backend (Node/Python/Go)
895
-
896
- Create:
897
- - \`src/\` folder structure:
898
- - \`src/routes/\` or \`src/api/\` - API endpoints
899
- - \`src/services/\` - Business logic
900
- - \`src/models/\` - Data models
901
- - \`src/utils/\` - Utilities
902
- - \`package.json\` / \`requirements.txt\` / \`go.mod\`
903
- - Entry point (\`src/index.ts\`, \`main.py\`, \`main.go\`)
904
- - Basic server setup (Express, FastAPI, Gin, etc.)
905
- - Health check endpoint (\`GET /health\`)
906
- - Environment config (\`.env.example\`)
907
- - \`.gitignore\`
908
- - \`README.md\` with setup instructions
909
-
910
- ### CLI Tool (Node/Python/Rust)
911
-
912
- Create:
913
- - \`src/\` folder structure:
914
- - \`src/commands/\` - Command handlers
915
- - \`src/utils/\` - Utilities
916
- - \`package.json\` with \`bin\` entry / \`setup.py\` / \`Cargo.toml\`
917
- - Entry point with argument parsing
918
- - Basic command structure (help, version)
919
- - \`.gitignore\`
920
- - \`README.md\` with usage instructions
921
-
922
- ### Full-Stack Application
923
-
924
- Create both frontend and backend structures:
925
- - \`frontend/\` or \`client/\` - Web app scaffold
926
- - \`backend/\` or \`server/\` - API scaffold
927
- - Root \`package.json\` with workspace config (if monorepo)
928
- - \`docker-compose.yml\` (optional)
929
- - \`.gitignore\`
930
- - \`README.md\` with setup instructions
931
-
932
- ## POST-SCAFFOLD STEPS
933
-
934
- 1. Install dependencies:
935
- - \`npm install\` / \`pip install -r requirements.txt\` / etc.
936
- 2. Run build to verify:
937
- - \`npm run build\` / equivalent
938
- 3. Run lint to verify:
939
- - \`npm run lint\` / equivalent
940
- 4. Create initial git commit:
941
- - \`chore: initial project scaffold\`
942
- 5. Update backlog:
943
- - Mark scaffold CHORE as ✅ (if exists)
944
-
945
- ## RULES
946
-
947
- - Follow conventions from CLAUDE.md
948
- - Use modern, widely-adopted patterns
949
- - Keep it minimal - only what's needed to start
950
- - Don't add features - just structure
951
- - Ensure the project builds and lints clean
952
- - Add helpful comments in config files
953
- - Include TypeScript/type hints where applicable`,
954
- }),
1194
+ // NOTE: 'build' and 'scaffold' skills moved to @compilr-dev/agents-coding
1195
+ // because they depend on coding-specific tools (run_tests, run_lint, detect_project)
955
1196
  ];
956
1197
  /**
957
1198
  * Default skill registry with built-in skills