@compilr-dev/agents-coding 0.1.1 → 0.2.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.
@@ -29,6 +29,16 @@ export declare const projectOnboardingSkill: Skill;
29
29
  * Code optimization skill
30
30
  */
31
31
  export declare const codeOptimizationSkill: Skill;
32
+ /**
33
+ * Build skill - Implement a backlog item end-to-end
34
+ * Moved from @compilr-dev/agents because it uses run_tests, run_lint
35
+ */
36
+ export declare const buildSkill: Skill;
37
+ /**
38
+ * Scaffold skill - Create project foundation based on tech stack
39
+ * Moved from @compilr-dev/agents because it uses detect_project
40
+ */
41
+ export declare const scaffoldSkill: Skill;
32
42
  /**
33
43
  * All coding skills
34
44
  */
@@ -305,6 +305,214 @@ export const codeOptimizationSkill = defineSkill({
305
305
  tags: ['performance', 'optimization', 'workflow'],
306
306
  version: '1.0.0',
307
307
  });
308
+ /**
309
+ * Build skill - Implement a backlog item end-to-end
310
+ * Moved from @compilr-dev/agents because it uses run_tests, run_lint
311
+ */
312
+ export const buildSkill = defineSkill({
313
+ name: 'build',
314
+ description: 'Implement a backlog item end-to-end',
315
+ tags: ['implementation', 'coding'],
316
+ prompt: `You are in BUILD MODE. Implement the specified backlog item.
317
+
318
+ ## CRITICAL: PROJECT DIRECTORY
319
+
320
+ **All files MUST be created/modified in: {{projectPath}}**
321
+
322
+ Use ABSOLUTE paths for ALL file operations. Example:
323
+ - write_file({ path: "{{projectPath}}/src/feature.ts", ... })
324
+ - edit({ path: "{{projectPath}}/src/index.ts", ... })
325
+
326
+ NEVER use relative paths. NEVER use process.cwd().
327
+
328
+ ## ITEM TO IMPLEMENT
329
+ - **ID:** {{item_id}}
330
+ - **Title:** {{item_title}}
331
+ - **Type:** {{item_type}}
332
+ - **Priority:** {{item_priority}}
333
+ - **Description:** {{item_description}}
334
+
335
+ ## BEFORE STARTING
336
+
337
+ 1. Show the item details to the user in a clear format
338
+ 2. Use ask_user_simple to confirm: "Proceed with implementation?"
339
+ - Options: "Yes, let's build it", "No, pick a different item", "Cancel"
340
+ 3. If there are dependency warnings, mention them and ask if user wants to proceed anyway
341
+
342
+ ## CONTEXT TO READ
343
+
344
+ Before implementing, read these files for context:
345
+ - **PRD.md** (if exists): Project vision and requirements
346
+ - **CLAUDE.md**: Coding standards and conventions
347
+ - **Existing code**: Understand patterns already in use
348
+
349
+ ## IMPLEMENTATION WORKFLOW
350
+
351
+ ### Phase 1: Plan
352
+ 1. Use todo_write to create implementation checklist:
353
+ - Break down the item into concrete tasks
354
+ - Identify files to create or modify
355
+ - Note any edge cases to handle
356
+ 2. Update backlog status to 🚧 using backlog_write
357
+
358
+ ### Phase 2: Implement
359
+ 1. Write code following project conventions from CLAUDE.md
360
+ 2. Add tests if the project has a test framework
361
+ 3. Keep changes focused on the backlog item scope
362
+ 4. Use todo_write to track progress through tasks
363
+
364
+ ### Phase 3: Verify
365
+ 1. Run tests with run_tests tool
366
+ 2. Run lint with run_lint tool
367
+ 3. If tests or lint fail:
368
+ - Analyze the error message
369
+ - Fix the issue
370
+ - Re-run verification
371
+ - Repeat up to 3 times
372
+ 4. If still failing after 3 attempts:
373
+ - Report the issue to user
374
+ - Keep status as 🚧
375
+ - Ask for guidance
376
+
377
+ ### Phase 4: Complete
378
+ 1. Update backlog status to ✅ using backlog_write
379
+ 2. Create git commit with message format:
380
+ - feat({{item_id}}): {{item_title}} - for features
381
+ - fix({{item_id}}): {{item_title}} - for bugs
382
+ - chore({{item_id}}): {{item_title}} - for chores
383
+ 3. Update backlog with the commit SHA
384
+ 4. Clear todos with todo_write
385
+ 5. Summarize what was implemented
386
+
387
+ ## RULES
388
+
389
+ - Follow coding standards from CLAUDE.md strictly
390
+ - Keep commits atomic - one backlog item per commit
391
+ - Ask user via ask_user_simple if you hit blockers
392
+ - Don't over-engineer - implement exactly what the item describes
393
+ - Don't add features beyond what was requested
394
+ - Use todo_write throughout to show progress
395
+ - Always run tests before marking complete`,
396
+ version: '1.0.0',
397
+ });
398
+ /**
399
+ * Scaffold skill - Create project foundation based on tech stack
400
+ * Moved from @compilr-dev/agents because it uses detect_project
401
+ */
402
+ export const scaffoldSkill = defineSkill({
403
+ name: 'scaffold',
404
+ description: 'Create project foundation based on tech stack',
405
+ tags: ['setup', 'foundation', 'scaffolding'],
406
+ prompt: `You are creating the PROJECT SCAFFOLD (foundation).
407
+
408
+ ## CRITICAL: PROJECT DIRECTORY
409
+
410
+ **All files MUST be created in: {{projectPath}}**
411
+
412
+ Use ABSOLUTE paths for ALL file operations. Example:
413
+ - write_file({ path: "{{projectPath}}/package.json", ... })
414
+ - write_file({ path: "{{projectPath}}/src/index.ts", ... })
415
+
416
+ NEVER use relative paths. NEVER use process.cwd().
417
+
418
+ ## PURPOSE
419
+
420
+ Create the base project structure that features will be built on top of.
421
+ This is the skeleton that makes feature implementation possible.
422
+
423
+ ## CONTEXT TO READ
424
+
425
+ Use project_document_get to read project documents from the database:
426
+ - PRD document for project vision and requirements
427
+ - Architecture documents if they exist
428
+
429
+ ## BEFORE STARTING
430
+
431
+ 1. Summarize the detected/specified tech stack
432
+ 2. Use ask_user_simple to confirm: "Create project scaffold with this stack?"
433
+ - Options: "Yes, create it", "No, let me specify", "Cancel"
434
+ 3. If user wants to specify, ask about tech stack preferences
435
+
436
+ ## SCAFFOLD BY PROJECT TYPE
437
+
438
+ ### Web Application (React/Vue/Svelte)
439
+
440
+ Create:
441
+ - \`src/\` folder structure:
442
+ - \`src/components/\` - Reusable components
443
+ - \`src/pages/\` or \`src/routes/\` - Page components
444
+ - \`src/lib/\` or \`src/utils/\` - Utility functions
445
+ - \`src/styles/\` - Global styles
446
+ - \`package.json\` with dependencies
447
+ - Build config (\`vite.config.ts\`, \`next.config.js\`, etc.)
448
+ - \`index.html\` entry point (if applicable)
449
+ - Basic App component with routing setup
450
+ - CSS/Tailwind configuration
451
+ - \`.gitignore\`
452
+ - \`README.md\` with setup instructions
453
+
454
+ ### API / Backend (Node/Python/Go)
455
+
456
+ Create:
457
+ - \`src/\` folder structure:
458
+ - \`src/routes/\` or \`src/api/\` - API endpoints
459
+ - \`src/services/\` - Business logic
460
+ - \`src/models/\` - Data models
461
+ - \`src/utils/\` - Utilities
462
+ - \`package.json\` / \`requirements.txt\` / \`go.mod\`
463
+ - Entry point (\`src/index.ts\`, \`main.py\`, \`main.go\`)
464
+ - Basic server setup (Express, FastAPI, Gin, etc.)
465
+ - Health check endpoint (\`GET /health\`)
466
+ - Environment config (\`.env.example\`)
467
+ - \`.gitignore\`
468
+ - \`README.md\` with setup instructions
469
+
470
+ ### CLI Tool (Node/Python/Rust)
471
+
472
+ Create:
473
+ - \`src/\` folder structure:
474
+ - \`src/commands/\` - Command handlers
475
+ - \`src/utils/\` - Utilities
476
+ - \`package.json\` with \`bin\` entry / \`setup.py\` / \`Cargo.toml\`
477
+ - Entry point with argument parsing
478
+ - Basic command structure (help, version)
479
+ - \`.gitignore\`
480
+ - \`README.md\` with usage instructions
481
+
482
+ ### Full-Stack Application
483
+
484
+ Create both frontend and backend structures:
485
+ - \`frontend/\` or \`client/\` - Web app scaffold
486
+ - \`backend/\` or \`server/\` - API scaffold
487
+ - Root \`package.json\` with workspace config (if monorepo)
488
+ - \`docker-compose.yml\` (optional)
489
+ - \`.gitignore\`
490
+ - \`README.md\` with setup instructions
491
+
492
+ ## POST-SCAFFOLD STEPS
493
+
494
+ 1. Install dependencies:
495
+ - \`npm install\` / \`pip install -r requirements.txt\` / etc.
496
+ 2. Run build to verify:
497
+ - \`npm run build\` / equivalent
498
+ 3. Run lint to verify:
499
+ - \`npm run lint\` / equivalent
500
+ 4. Create initial git commit:
501
+ - \`chore: initial project scaffold\`
502
+ 5. Update backlog:
503
+ - Mark scaffold CHORE as ✅ (if exists)
504
+
505
+ ## RULES
506
+
507
+ - Follow conventions from CLAUDE.md
508
+ - Use modern, widely-adopted patterns
509
+ - Keep it minimal - only what's needed to start
510
+ - Don't add features - just structure
511
+ - Ensure the project builds and lints clean
512
+ - Add helpful comments in config files
513
+ - Include TypeScript/type hints where applicable`,
514
+ version: '1.0.0',
515
+ });
308
516
  /**
309
517
  * All coding skills
310
518
  */
@@ -315,6 +523,8 @@ export const codingSkills = [
315
523
  prWorkflowSkill,
316
524
  projectOnboardingSkill,
317
525
  codeOptimizationSkill,
526
+ buildSkill,
527
+ scaffoldSkill,
318
528
  ];
319
529
  /**
320
530
  * Export individual skills for selective use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/agents-coding",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Coding-specific tools for @compilr-dev/agents - Git, project detection, smart runners, and code search",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -71,11 +71,11 @@
71
71
  "node": ">=18.0.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@compilr-dev/agents": "^0.2.0"
74
+ "@compilr-dev/agents": "^0.3.0"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@anthropic-ai/sdk": "^0.30.1",
78
- "@compilr-dev/agents": "^0.2.0",
78
+ "@compilr-dev/agents": "^0.3.0",
79
79
  "@eslint/js": "^9.39.1",
80
80
  "@types/node": "^24.10.1",
81
81
  "@vitest/coverage-v8": "^3.2.4",