@compilr-dev/agents-coding 0.2.1 → 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.
- package/LICENSE +21 -0
- package/dist/core.d.ts +7 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +7 -0
- package/dist/core.js.map +1 -0
- package/dist/dispatcher.d.ts +27 -0
- package/dist/dispatcher.d.ts.map +1 -0
- package/dist/dispatcher.js +68 -0
- package/dist/dispatcher.js.map +1 -0
- package/dist/index.d.ts +77 -31
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +157 -67
- package/dist/index.js.map +1 -0
- package/package.json +26 -30
- package/README.md +0 -788
- package/dist/skills/index.d.ts +0 -49
- package/dist/skills/index.js +0 -532
- package/dist/tools/git/branch.d.ts +0 -17
- package/dist/tools/git/branch.js +0 -264
- package/dist/tools/git/commit.d.ts +0 -23
- package/dist/tools/git/commit.js +0 -280
- package/dist/tools/git/diff.d.ts +0 -19
- package/dist/tools/git/diff.js +0 -221
- package/dist/tools/git/index.d.ts +0 -10
- package/dist/tools/git/index.js +0 -11
- package/dist/tools/git/log.d.ts +0 -19
- package/dist/tools/git/log.js +0 -235
- package/dist/tools/git/stash.d.ts +0 -17
- package/dist/tools/git/stash.js +0 -294
- package/dist/tools/git/status.d.ts +0 -19
- package/dist/tools/git/status.js +0 -160
- package/dist/tools/git/types.d.ts +0 -293
- package/dist/tools/git/types.js +0 -4
- package/dist/tools/git/utils.d.ts +0 -58
- package/dist/tools/git/utils.js +0 -197
- package/dist/tools/index.d.ts +0 -5
- package/dist/tools/index.js +0 -5
- package/dist/tools/project/detect.d.ts +0 -19
- package/dist/tools/project/detect.js +0 -341
- package/dist/tools/project/find-root.d.ts +0 -21
- package/dist/tools/project/find-root.js +0 -239
- package/dist/tools/project/index.d.ts +0 -6
- package/dist/tools/project/index.js +0 -5
- package/dist/tools/project/types.d.ts +0 -83
- package/dist/tools/project/types.js +0 -4
- package/dist/tools/runners/build.d.ts +0 -19
- package/dist/tools/runners/build.js +0 -306
- package/dist/tools/runners/format.d.ts +0 -19
- package/dist/tools/runners/format.js +0 -376
- package/dist/tools/runners/index.d.ts +0 -9
- package/dist/tools/runners/index.js +0 -9
- package/dist/tools/runners/lint.d.ts +0 -19
- package/dist/tools/runners/lint.js +0 -356
- package/dist/tools/runners/test.d.ts +0 -19
- package/dist/tools/runners/test.js +0 -386
- package/dist/tools/runners/types.d.ts +0 -97
- package/dist/tools/runners/types.js +0 -4
- package/dist/tools/runners/utils.d.ts +0 -69
- package/dist/tools/runners/utils.js +0 -179
- package/dist/tools/search/definition.d.ts +0 -19
- package/dist/tools/search/definition.js +0 -305
- package/dist/tools/search/index.d.ts +0 -8
- package/dist/tools/search/index.js +0 -8
- package/dist/tools/search/references.d.ts +0 -19
- package/dist/tools/search/references.js +0 -179
- package/dist/tools/search/todos.d.ts +0 -19
- package/dist/tools/search/todos.js +0 -269
- package/dist/tools/search/types.d.ts +0 -132
- package/dist/tools/search/types.js +0 -4
- package/dist/tools/search/utils.d.ts +0 -45
- package/dist/tools/search/utils.js +0 -152
package/dist/skills/index.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coding-specific Skills for @compilr-dev/agents-coding
|
|
3
|
-
*
|
|
4
|
-
* These skills are designed to work with the coding tools and provide
|
|
5
|
-
* specialized guidance for common development workflows.
|
|
6
|
-
*/
|
|
7
|
-
import { type Skill } from '@compilr-dev/agents';
|
|
8
|
-
/**
|
|
9
|
-
* Git workflow skill - Safe git operations with proper verification
|
|
10
|
-
*/
|
|
11
|
-
export declare const gitWorkflowSkill: Skill;
|
|
12
|
-
/**
|
|
13
|
-
* Test-driven development skill
|
|
14
|
-
*/
|
|
15
|
-
export declare const testDrivenSkill: Skill;
|
|
16
|
-
/**
|
|
17
|
-
* Code navigation skill
|
|
18
|
-
*/
|
|
19
|
-
export declare const codeNavigationSkill: Skill;
|
|
20
|
-
/**
|
|
21
|
-
* Pull request workflow skill
|
|
22
|
-
*/
|
|
23
|
-
export declare const prWorkflowSkill: Skill;
|
|
24
|
-
/**
|
|
25
|
-
* Project onboarding skill
|
|
26
|
-
*/
|
|
27
|
-
export declare const projectOnboardingSkill: Skill;
|
|
28
|
-
/**
|
|
29
|
-
* Code optimization skill
|
|
30
|
-
*/
|
|
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;
|
|
42
|
-
/**
|
|
43
|
-
* All coding skills
|
|
44
|
-
*/
|
|
45
|
-
export declare const codingSkills: Skill[];
|
|
46
|
-
/**
|
|
47
|
-
* Export individual skills for selective use
|
|
48
|
-
*/
|
|
49
|
-
export { defineSkill, type Skill } from '@compilr-dev/agents';
|
package/dist/skills/index.js
DELETED
|
@@ -1,532 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coding-specific Skills for @compilr-dev/agents-coding
|
|
3
|
-
*
|
|
4
|
-
* These skills are designed to work with the coding tools and provide
|
|
5
|
-
* specialized guidance for common development workflows.
|
|
6
|
-
*/
|
|
7
|
-
import { defineSkill } from '@compilr-dev/agents';
|
|
8
|
-
/**
|
|
9
|
-
* Git workflow skill - Safe git operations with proper verification
|
|
10
|
-
*/
|
|
11
|
-
export const gitWorkflowSkill = defineSkill({
|
|
12
|
-
name: 'git-workflow',
|
|
13
|
-
description: 'Best practices for git operations with safety checks',
|
|
14
|
-
prompt: `You are now in git workflow mode. Follow these practices:
|
|
15
|
-
|
|
16
|
-
## Before Any Destructive Operation
|
|
17
|
-
1. **Always check status first**: Use gitStatus to see current state
|
|
18
|
-
2. **Review changes**: Use gitDiff to understand what will be affected
|
|
19
|
-
3. **Verify branch**: Confirm you're on the correct branch
|
|
20
|
-
|
|
21
|
-
## Safe Commit Workflow
|
|
22
|
-
1. Check status: gitStatus to see staged/unstaged files
|
|
23
|
-
2. Review diff: gitDiff to verify changes are intentional
|
|
24
|
-
3. Stage selectively: Only commit related changes together
|
|
25
|
-
4. Write clear message: Describe WHY, not just WHAT
|
|
26
|
-
|
|
27
|
-
## Branch Operations
|
|
28
|
-
1. Never delete the current branch
|
|
29
|
-
2. Check for uncommitted changes before switching
|
|
30
|
-
3. Use descriptive branch names: feat/, fix/, chore/
|
|
31
|
-
|
|
32
|
-
## Danger Zones - ALWAYS VERIFY
|
|
33
|
-
- git reset --hard: Will lose uncommitted changes
|
|
34
|
-
- git checkout -- <file>: Will discard local changes
|
|
35
|
-
- git clean: Will delete untracked files
|
|
36
|
-
- Force push: Can overwrite remote history
|
|
37
|
-
|
|
38
|
-
## Recovery
|
|
39
|
-
- Use gitStash before risky operations
|
|
40
|
-
- Check gitLog to find previous states
|
|
41
|
-
- Stashed changes can be recovered with stash pop/apply
|
|
42
|
-
|
|
43
|
-
When in doubt, stash your changes first.`,
|
|
44
|
-
tags: ['git', 'workflow', 'safety'],
|
|
45
|
-
version: '1.0.0',
|
|
46
|
-
});
|
|
47
|
-
/**
|
|
48
|
-
* Test-driven development skill
|
|
49
|
-
*/
|
|
50
|
-
export const testDrivenSkill = defineSkill({
|
|
51
|
-
name: 'test-driven',
|
|
52
|
-
description: 'Test-driven development workflow with smart runners',
|
|
53
|
-
prompt: `You are now in test-driven development mode. Follow the TDD cycle:
|
|
54
|
-
|
|
55
|
-
## Red-Green-Refactor Cycle
|
|
56
|
-
1. **Red**: Write a failing test first
|
|
57
|
-
2. **Green**: Write minimal code to pass the test
|
|
58
|
-
3. **Refactor**: Clean up while keeping tests green
|
|
59
|
-
|
|
60
|
-
## Using the Tools
|
|
61
|
-
1. **runTests**: Run tests frequently, after every small change
|
|
62
|
-
2. **runLint**: Check for code style issues before committing
|
|
63
|
-
3. **runBuild**: Verify the build passes before pushing
|
|
64
|
-
4. **runFormat**: Auto-format code to maintain consistency
|
|
65
|
-
|
|
66
|
-
## Workflow
|
|
67
|
-
\`\`\`
|
|
68
|
-
1. Write test → runTests (should fail)
|
|
69
|
-
2. Implement feature → runTests (should pass)
|
|
70
|
-
3. Refactor → runTests (should still pass)
|
|
71
|
-
4. Clean up → runLint + runFormat
|
|
72
|
-
5. Final check → runBuild
|
|
73
|
-
6. Commit
|
|
74
|
-
\`\`\`
|
|
75
|
-
|
|
76
|
-
## Best Practices
|
|
77
|
-
- Test one thing per test case
|
|
78
|
-
- Use descriptive test names that explain the expected behavior
|
|
79
|
-
- Test edge cases and error conditions
|
|
80
|
-
- Keep tests fast - mock external dependencies
|
|
81
|
-
- Run the full test suite before pushing
|
|
82
|
-
|
|
83
|
-
## When Tests Fail
|
|
84
|
-
1. Read the error message carefully
|
|
85
|
-
2. Check if the test itself is correct
|
|
86
|
-
3. Isolate the failure to specific code
|
|
87
|
-
4. Fix incrementally and re-run
|
|
88
|
-
|
|
89
|
-
Never commit with failing tests.`,
|
|
90
|
-
tags: ['testing', 'tdd', 'workflow'],
|
|
91
|
-
version: '1.0.0',
|
|
92
|
-
});
|
|
93
|
-
/**
|
|
94
|
-
* Code navigation skill
|
|
95
|
-
*/
|
|
96
|
-
export const codeNavigationSkill = defineSkill({
|
|
97
|
-
name: 'code-navigation',
|
|
98
|
-
description: 'Effectively navigate and understand codebases',
|
|
99
|
-
prompt: `You are now in code navigation mode. Use these strategies:
|
|
100
|
-
|
|
101
|
-
## Finding Code
|
|
102
|
-
1. **findDefinition**: Locate where a symbol is defined
|
|
103
|
-
- Functions, classes, interfaces, types, constants
|
|
104
|
-
- Supports: TypeScript, JavaScript, Python, Rust, Go, Java, Kotlin
|
|
105
|
-
|
|
106
|
-
2. **findReferences**: Find all usages of a symbol
|
|
107
|
-
- Use excludeDefinitions: true to see only usages
|
|
108
|
-
- Helps understand impact of changes
|
|
109
|
-
|
|
110
|
-
3. **findTodos**: Locate technical debt and work items
|
|
111
|
-
- Types: TODO, FIXME, HACK, XXX, NOTE, BUG, WARN
|
|
112
|
-
- Use includeAuthor: true to see who added them
|
|
113
|
-
|
|
114
|
-
## Understanding a New Codebase
|
|
115
|
-
1. Start with detectProject to understand the tech stack
|
|
116
|
-
2. Find entry points (main, index, app files)
|
|
117
|
-
3. Trace the flow from entry point using findReferences
|
|
118
|
-
4. Look at TODOs to understand known issues
|
|
119
|
-
|
|
120
|
-
## Before Making Changes
|
|
121
|
-
1. Find the symbol definition
|
|
122
|
-
2. Find all references to understand impact
|
|
123
|
-
3. Check for TODOs/FIXMEs in related code
|
|
124
|
-
4. Understand the patterns used nearby
|
|
125
|
-
|
|
126
|
-
## Search Strategies
|
|
127
|
-
- Start broad, then narrow with fileType filter
|
|
128
|
-
- Use excludeDefinitions to focus on usages
|
|
129
|
-
- Check multiple related symbols
|
|
130
|
-
- Look at import statements to understand dependencies
|
|
131
|
-
|
|
132
|
-
## Common Patterns
|
|
133
|
-
- "Where is X defined?" → findDefinition
|
|
134
|
-
- "What uses X?" → findReferences with excludeDefinitions
|
|
135
|
-
- "What needs work?" → findTodos
|
|
136
|
-
- "What's the tech stack?" → detectProject`,
|
|
137
|
-
tags: ['navigation', 'search', 'understanding'],
|
|
138
|
-
version: '1.0.0',
|
|
139
|
-
});
|
|
140
|
-
/**
|
|
141
|
-
* Pull request workflow skill
|
|
142
|
-
*/
|
|
143
|
-
export const prWorkflowSkill = defineSkill({
|
|
144
|
-
name: 'pr-workflow',
|
|
145
|
-
description: 'Pull request creation and review workflow',
|
|
146
|
-
prompt: `You are now in pull request workflow mode.
|
|
147
|
-
|
|
148
|
-
## Creating a PR
|
|
149
|
-
1. **Prepare the branch**
|
|
150
|
-
- gitStatus: Ensure all changes are committed
|
|
151
|
-
- gitLog: Review commits that will be in the PR
|
|
152
|
-
- gitDiff main...HEAD: See full diff against base
|
|
153
|
-
|
|
154
|
-
2. **Pre-flight checks**
|
|
155
|
-
- runTests: All tests must pass
|
|
156
|
-
- runLint: No lint errors
|
|
157
|
-
- runBuild: Build must succeed
|
|
158
|
-
- findTodos: No critical TODOs in changed code
|
|
159
|
-
|
|
160
|
-
3. **Write the PR description**
|
|
161
|
-
- Summary: What does this PR do?
|
|
162
|
-
- Why: What problem does it solve?
|
|
163
|
-
- How: Brief technical approach
|
|
164
|
-
- Testing: How was it tested?
|
|
165
|
-
- Screenshots: If UI changes
|
|
166
|
-
|
|
167
|
-
## Reviewing a PR
|
|
168
|
-
1. **Understand context**
|
|
169
|
-
- Read the PR description
|
|
170
|
-
- Check linked issues
|
|
171
|
-
- gitLog to see commit history
|
|
172
|
-
|
|
173
|
-
2. **Review the code**
|
|
174
|
-
- gitDiff to see all changes
|
|
175
|
-
- findDefinition for unfamiliar symbols
|
|
176
|
-
- findReferences to check impact
|
|
177
|
-
|
|
178
|
-
3. **Check quality**
|
|
179
|
-
- runTests: Do tests pass?
|
|
180
|
-
- runLint: Any new lint issues?
|
|
181
|
-
- findTodos: Any new TODOs without context?
|
|
182
|
-
|
|
183
|
-
4. **Provide feedback**
|
|
184
|
-
- Be specific with line references
|
|
185
|
-
- Suggest alternatives, not just problems
|
|
186
|
-
- Distinguish blocking vs. non-blocking comments
|
|
187
|
-
|
|
188
|
-
## Before Merging
|
|
189
|
-
- [ ] All CI checks pass
|
|
190
|
-
- [ ] No unresolved comments
|
|
191
|
-
- [ ] Documentation updated if needed
|
|
192
|
-
- [ ] Changelog updated if needed`,
|
|
193
|
-
tags: ['git', 'pr', 'review', 'workflow'],
|
|
194
|
-
version: '1.0.0',
|
|
195
|
-
});
|
|
196
|
-
/**
|
|
197
|
-
* Project onboarding skill
|
|
198
|
-
*/
|
|
199
|
-
export const projectOnboardingSkill = defineSkill({
|
|
200
|
-
name: 'project-onboarding',
|
|
201
|
-
description: 'Quickly understand and navigate a new project',
|
|
202
|
-
prompt: `You are now in project onboarding mode. Use this systematic approach:
|
|
203
|
-
|
|
204
|
-
## Step 1: Project Overview
|
|
205
|
-
1. **detectProject**: Identify technology stack
|
|
206
|
-
- Project type (Node, Python, Rust, Go, etc.)
|
|
207
|
-
- Package manager
|
|
208
|
-
- Test framework
|
|
209
|
-
- Linter and formatter
|
|
210
|
-
|
|
211
|
-
2. **findProjectRoot**: Locate project boundaries
|
|
212
|
-
- Find the root directory
|
|
213
|
-
- Identify monorepo structure if present
|
|
214
|
-
|
|
215
|
-
## Step 2: Architecture
|
|
216
|
-
1. Look for README, ARCHITECTURE, or CLAUDE.md files
|
|
217
|
-
2. Check directory structure for patterns
|
|
218
|
-
3. Identify entry points (main, index, app)
|
|
219
|
-
4. Find configuration files
|
|
220
|
-
|
|
221
|
-
## Step 3: Key Components
|
|
222
|
-
1. **findDefinition** on main exports
|
|
223
|
-
2. **findReferences** to understand dependencies
|
|
224
|
-
3. Check for interfaces/types that define contracts
|
|
225
|
-
|
|
226
|
-
## Step 4: Development Workflow
|
|
227
|
-
1. Check package.json scripts or Makefile
|
|
228
|
-
2. Identify how to:
|
|
229
|
-
- Run locally (dev server)
|
|
230
|
-
- Run tests
|
|
231
|
-
- Build for production
|
|
232
|
-
- Lint and format
|
|
233
|
-
|
|
234
|
-
## Step 5: Code Quality
|
|
235
|
-
1. **findTodos** to see known issues
|
|
236
|
-
2. Check for TODOs with your name/team
|
|
237
|
-
3. Look at recent git log for activity areas
|
|
238
|
-
|
|
239
|
-
## Quick Reference Questions
|
|
240
|
-
| Question | Tool |
|
|
241
|
-
|----------|------|
|
|
242
|
-
| What tech stack? | detectProject |
|
|
243
|
-
| Where's the root? | findProjectRoot |
|
|
244
|
-
| Where is X defined? | findDefinition |
|
|
245
|
-
| What uses X? | findReferences |
|
|
246
|
-
| What needs work? | findTodos |
|
|
247
|
-
| What changed? | gitLog, gitDiff |
|
|
248
|
-
|
|
249
|
-
## Red Flags to Note
|
|
250
|
-
- Many FIXME/HACK comments
|
|
251
|
-
- Outdated dependencies
|
|
252
|
-
- Missing tests
|
|
253
|
-
- No documentation`,
|
|
254
|
-
tags: ['onboarding', 'navigation', 'understanding'],
|
|
255
|
-
version: '1.0.0',
|
|
256
|
-
});
|
|
257
|
-
/**
|
|
258
|
-
* Code optimization skill
|
|
259
|
-
*/
|
|
260
|
-
export const codeOptimizationSkill = defineSkill({
|
|
261
|
-
name: 'code-optimization',
|
|
262
|
-
description: 'Performance optimization workflow',
|
|
263
|
-
prompt: `You are now in code optimization mode.
|
|
264
|
-
|
|
265
|
-
## Before Optimizing
|
|
266
|
-
1. **Measure first**: Never optimize without benchmarks
|
|
267
|
-
2. **Profile**: Identify actual bottlenecks
|
|
268
|
-
3. **Set targets**: Define acceptable performance
|
|
269
|
-
|
|
270
|
-
## Finding Optimization Targets
|
|
271
|
-
1. **findTodos**: Search for 'TODO.*perf' or 'TODO.*optim'
|
|
272
|
-
2. **findReferences**: Check how often a function is called
|
|
273
|
-
3. **Look for patterns**:
|
|
274
|
-
- Loops with database calls
|
|
275
|
-
- Repeated calculations
|
|
276
|
-
- Large object copies
|
|
277
|
-
- Synchronous I/O
|
|
278
|
-
|
|
279
|
-
## Safe Optimization Process
|
|
280
|
-
1. Write performance test/benchmark
|
|
281
|
-
2. Measure current performance
|
|
282
|
-
3. Make ONE change at a time
|
|
283
|
-
4. Measure again - verify improvement
|
|
284
|
-
5. runTests - ensure no regressions
|
|
285
|
-
6. Document the optimization
|
|
286
|
-
|
|
287
|
-
## Common Optimizations
|
|
288
|
-
- **Caching**: Memoize expensive calculations
|
|
289
|
-
- **Batching**: Combine multiple operations
|
|
290
|
-
- **Lazy loading**: Defer until needed
|
|
291
|
-
- **Pagination**: Don't load everything at once
|
|
292
|
-
- **Indexing**: Ensure database queries are indexed
|
|
293
|
-
|
|
294
|
-
## After Optimizing
|
|
295
|
-
1. runTests: No functionality broken
|
|
296
|
-
2. runBuild: Build still works
|
|
297
|
-
3. Document: Add comments explaining why
|
|
298
|
-
4. Monitor: Verify improvement in production
|
|
299
|
-
|
|
300
|
-
## Avoid
|
|
301
|
-
- Premature optimization
|
|
302
|
-
- Optimizing without measuring
|
|
303
|
-
- Sacrificing readability for micro-optimizations
|
|
304
|
-
- Assuming - always measure`,
|
|
305
|
-
tags: ['performance', 'optimization', 'workflow'],
|
|
306
|
-
version: '1.0.0',
|
|
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
|
-
});
|
|
516
|
-
/**
|
|
517
|
-
* All coding skills
|
|
518
|
-
*/
|
|
519
|
-
export const codingSkills = [
|
|
520
|
-
gitWorkflowSkill,
|
|
521
|
-
testDrivenSkill,
|
|
522
|
-
codeNavigationSkill,
|
|
523
|
-
prWorkflowSkill,
|
|
524
|
-
projectOnboardingSkill,
|
|
525
|
-
codeOptimizationSkill,
|
|
526
|
-
buildSkill,
|
|
527
|
-
scaffoldSkill,
|
|
528
|
-
];
|
|
529
|
-
/**
|
|
530
|
-
* Export individual skills for selective use
|
|
531
|
-
*/
|
|
532
|
-
export { defineSkill } from '@compilr-dev/agents';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git Branch Tool
|
|
3
|
-
* List, create, delete, switch, and rename branches
|
|
4
|
-
*/
|
|
5
|
-
import type { Tool } from '@compilr-dev/agents';
|
|
6
|
-
import type { GitBranchInput } from './types.js';
|
|
7
|
-
/**
|
|
8
|
-
* Git branch tool
|
|
9
|
-
*/
|
|
10
|
-
export declare const gitBranchTool: Tool<GitBranchInput>;
|
|
11
|
-
/**
|
|
12
|
-
* Factory function to create git branch tool with custom options
|
|
13
|
-
*/
|
|
14
|
-
export declare function createGitBranchTool(options?: {
|
|
15
|
-
/** Base directory for relative paths */
|
|
16
|
-
baseDir?: string;
|
|
17
|
-
}): Tool<GitBranchInput>;
|