@comfanion/workflow 4.39.0 ā 4.39.2
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/bin/cli.js +20 -110
- package/package.json +1 -1
- package/src/build-info.json +3 -3
- package/src/opencode/agents/analyst.md +1 -1
- package/src/opencode/agents/architect.md +19 -93
- package/src/opencode/agents/coder.md +19 -71
- package/src/opencode/agents/dev.md +32 -151
- package/src/opencode/agents/pm.md +13 -30
- package/src/opencode/agents/reviewer.md +1 -1
- package/src/opencode/commands/dev-story.md +6 -95
- package/src/opencode/dcp.jsonc +63 -0
- package/src/opencode/opencode.json +1 -1
- package/src/opencode/skills/dev-epic/SKILL.md +1 -8
- package/src/opencode/skills/dev-sprint/SKILL.md +3 -9
- package/src/opencode/skills/dev-story/SKILL.md +25 -122
- package/src/opencode/skills/story-writing/SKILL.md +57 -52
- package/src/opencode/vectorizer.yaml +0 -45
package/bin/cli.js
CHANGED
|
@@ -54,7 +54,6 @@ program
|
|
|
54
54
|
.option('--tdd', 'Use TDD methodology')
|
|
55
55
|
.option('--stub', 'Use STUB methodology')
|
|
56
56
|
.option('--full', 'Create full repo structure')
|
|
57
|
-
.option('--vectorizer', 'Install vectorizer for semantic code search')
|
|
58
57
|
.action(async (options) => {
|
|
59
58
|
console.log(chalk.blue.bold(`\nš OpenCode Workflow v${VERSION}\n`));
|
|
60
59
|
|
|
@@ -70,9 +69,6 @@ program
|
|
|
70
69
|
jira_url: 'https://your-domain.atlassian.net',
|
|
71
70
|
jira_project: 'PROJ',
|
|
72
71
|
create_repo_structure: false,
|
|
73
|
-
vectorizer_enabled: true,
|
|
74
|
-
vectorizer_auto_index: true,
|
|
75
|
-
vectorizer_model: 'Xenova/all-MiniLM-L6-v2',
|
|
76
72
|
project_name: path.basename(process.cwd())
|
|
77
73
|
};
|
|
78
74
|
|
|
@@ -99,19 +95,6 @@ program
|
|
|
99
95
|
if (jiraUrlMatch) config.jira_url = jiraUrlMatch[1];
|
|
100
96
|
if (jiraProjMatch) config.jira_project = jiraProjMatch[1];
|
|
101
97
|
|
|
102
|
-
// Parse vectorizer settings from vectorizer.yaml if exists
|
|
103
|
-
const vecPath = path.join(targetDir, 'vectorizer.yaml');
|
|
104
|
-
if (await fs.pathExists(vecPath)) {
|
|
105
|
-
const vecContent = await fs.readFile(vecPath, 'utf8');
|
|
106
|
-
const vEnabledMatch = vecContent.match(/enabled:\s*(true|false)/);
|
|
107
|
-
const vAutoMatch = vecContent.match(/auto_index:\s*(true|false)/);
|
|
108
|
-
const vModelMatch = vecContent.match(/model:\s*["']?([^"'\n]+)["']?/);
|
|
109
|
-
|
|
110
|
-
if (vEnabledMatch) config.vectorizer_enabled = vEnabledMatch[1] === 'true';
|
|
111
|
-
if (vAutoMatch) config.vectorizer_auto_index = vAutoMatch[1] === 'true';
|
|
112
|
-
if (vModelMatch) config.vectorizer_model = vModelMatch[1].trim();
|
|
113
|
-
}
|
|
114
|
-
|
|
115
98
|
isUpdate = true;
|
|
116
99
|
} catch (e) {
|
|
117
100
|
// Could not parse, use defaults
|
|
@@ -199,40 +182,6 @@ program
|
|
|
199
182
|
message: 'Create full repository structure (README, CONTRIBUTING, .gitignore, docs/)?',
|
|
200
183
|
default: options.full || false
|
|
201
184
|
},
|
|
202
|
-
{
|
|
203
|
-
type: 'confirm',
|
|
204
|
-
name: 'vectorizer_enabled',
|
|
205
|
-
message: 'Enable semantic code search (vectorizer)?',
|
|
206
|
-
default: true
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
type: 'list',
|
|
210
|
-
name: 'vectorizer_model',
|
|
211
|
-
message: 'Embedding model for semantic search:',
|
|
212
|
-
when: (answers) => answers.vectorizer_enabled,
|
|
213
|
-
choices: [
|
|
214
|
-
{
|
|
215
|
-
name: 'MiniLM-L6 (Fast) - ~10 files/10sec, 384 dims, good quality',
|
|
216
|
-
value: 'Xenova/all-MiniLM-L6-v2'
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
name: 'BGE-small (Balanced) - ~9 files/10sec, 384 dims, better quality',
|
|
220
|
-
value: 'Xenova/bge-small-en-v1.5'
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
name: 'BGE-base (Quality) - ~3 files/10sec, 768 dims, best quality',
|
|
224
|
-
value: 'Xenova/bge-base-en-v1.5'
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
default: config.vectorizer_model
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
type: 'confirm',
|
|
231
|
-
name: 'vectorizer_auto_index',
|
|
232
|
-
message: 'Enable auto-indexing? (reindex files on save)',
|
|
233
|
-
when: (answers) => answers.vectorizer_enabled,
|
|
234
|
-
default: true
|
|
235
|
-
},
|
|
236
185
|
{
|
|
237
186
|
type: 'checkbox',
|
|
238
187
|
name: 'mcp_servers',
|
|
@@ -259,7 +208,6 @@ program
|
|
|
259
208
|
if (options.stub) config.methodology = 'stub';
|
|
260
209
|
if (options.jira) config.jira_enabled = true;
|
|
261
210
|
if (options.full) config.create_repo_structure = true;
|
|
262
|
-
if (options.vectorizer) config.install_vectorizer = true;
|
|
263
211
|
}
|
|
264
212
|
|
|
265
213
|
const spinner = ora('Initializing OpenCode Workflow...').start();
|
|
@@ -324,7 +272,6 @@ program
|
|
|
324
272
|
// Update config.yaml with user values
|
|
325
273
|
spinner.text = 'Configuring...';
|
|
326
274
|
const configPath = path.join(targetDir, 'config.yaml');
|
|
327
|
-
const vecPath = path.join(targetDir, 'vectorizer.yaml');
|
|
328
275
|
let configContent;
|
|
329
276
|
|
|
330
277
|
// If we had existing config, use it as base (preserves comments and formatting)
|
|
@@ -354,19 +301,6 @@ program
|
|
|
354
301
|
|
|
355
302
|
await fs.writeFile(configPath, configContent);
|
|
356
303
|
|
|
357
|
-
// Update vectorizer.yaml
|
|
358
|
-
if (await fs.pathExists(vecPath)) {
|
|
359
|
-
let vecContent = await fs.readFile(vecPath, 'utf8');
|
|
360
|
-
vecContent = vecContent
|
|
361
|
-
.replace(/(enabled:)\s*(true|false)/, `$1 ${config.vectorizer_enabled}`)
|
|
362
|
-
.replace(/(auto_index:)\s*(true|false)/, `$1 ${config.vectorizer_auto_index}`);
|
|
363
|
-
|
|
364
|
-
if (config.vectorizer_model) {
|
|
365
|
-
vecContent = vecContent.replace(/(model:)\s*["']?[^"'\n]+["']?/, `$1 "${config.vectorizer_model}"`);
|
|
366
|
-
}
|
|
367
|
-
await fs.writeFile(vecPath, vecContent);
|
|
368
|
-
}
|
|
369
|
-
|
|
370
304
|
// Create docs structure (always)
|
|
371
305
|
spinner.text = 'Creating docs structure...';
|
|
372
306
|
await fs.ensureDir(path.join(process.cwd(), 'docs'));
|
|
@@ -476,24 +410,10 @@ program
|
|
|
476
410
|
console.log(chalk.gray(' Run manually: cd .opencode && bun install'));
|
|
477
411
|
}
|
|
478
412
|
|
|
479
|
-
// Show what was done
|
|
480
|
-
const vectorizerInstalled = await fs.pathExists(path.join(targetDir, 'vectorizer', 'node_modules'));
|
|
481
|
-
if (vectorizerInstalled) {
|
|
482
|
-
console.log(chalk.green('ā
Vectorizer installed (fresh dependencies)'));
|
|
483
|
-
} else if (config.vectorizer_enabled) {
|
|
484
|
-
console.log(chalk.yellow('ā ļø Vectorizer: run `npx @comfanion/workflow vectorizer install`'));
|
|
485
|
-
} else {
|
|
486
|
-
console.log(chalk.gray('ā¹ļø Vectorizer disabled (enable in config.yaml to use semantic search)'));
|
|
487
|
-
}
|
|
488
413
|
if (hadVectors) {
|
|
489
414
|
console.log(chalk.green('ā
Vector indexes preserved'));
|
|
490
415
|
}
|
|
491
416
|
|
|
492
|
-
// Install vectorizer if requested and failed above
|
|
493
|
-
if (config.install_vectorizer && !vectorizerInstalled) {
|
|
494
|
-
await installVectorizer(targetDir);
|
|
495
|
-
}
|
|
496
|
-
|
|
497
417
|
// Show summary
|
|
498
418
|
console.log(chalk.yellow('\nš Created structure:'));
|
|
499
419
|
console.log(`
|
|
@@ -559,9 +479,8 @@ program
|
|
|
559
479
|
|
|
560
480
|
program
|
|
561
481
|
.command('update')
|
|
562
|
-
.description('Update .opencode/ to latest version (preserves config.yaml and
|
|
482
|
+
.description('Update .opencode/ to latest version (preserves config.yaml and vector indexes)')
|
|
563
483
|
.option('--no-backup', 'Skip creating backup')
|
|
564
|
-
.option('--vectorizer', 'Update/install vectorizer too')
|
|
565
484
|
.action(async (options) => {
|
|
566
485
|
const spinner = ora('Updating OpenCode Workflow...').start();
|
|
567
486
|
|
|
@@ -762,27 +681,25 @@ program
|
|
|
762
681
|
console.log(chalk.gray(' ā Jira credentials not set'));
|
|
763
682
|
}
|
|
764
683
|
|
|
765
|
-
// Check
|
|
766
|
-
console.log(chalk.cyan('\
|
|
767
|
-
const vectorsExist = await fs.pathExists(path.join(process.cwd(), '.opencode', 'vectors', 'code', 'hashes.json'));
|
|
768
|
-
|
|
769
|
-
// Check vectorizer config
|
|
770
|
-
let vectorizerEnabled = true;
|
|
771
|
-
let autoIndexEnabled = true;
|
|
684
|
+
// Check Semantic Search plugin
|
|
685
|
+
console.log(chalk.cyan('\nSemantic search (@comfanion/usethis_search):'));
|
|
772
686
|
try {
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
687
|
+
const opcPath = path.join(process.cwd(), 'opencode.json');
|
|
688
|
+
if (await fs.pathExists(opcPath)) {
|
|
689
|
+
const opc = JSON.parse(await fs.readFile(opcPath, 'utf8'));
|
|
690
|
+
const plugins = opc.plugin || [];
|
|
691
|
+
if (plugins.includes('@comfanion/usethis_search')) {
|
|
692
|
+
console.log(chalk.green(' ā
Plugin registered in opencode.json'));
|
|
693
|
+
} else {
|
|
694
|
+
console.log(chalk.yellow(' ā ļø Plugin not in opencode.json (add "@comfanion/usethis_search" to plugin array)'));
|
|
695
|
+
}
|
|
696
|
+
} else {
|
|
697
|
+
console.log(chalk.gray(' ā No opencode.json found'));
|
|
698
|
+
}
|
|
699
|
+
} catch {
|
|
700
|
+
console.log(chalk.gray(' ā Could not check opencode.json'));
|
|
701
|
+
}
|
|
702
|
+
const vectorsExist = await fs.pathExists(path.join(process.cwd(), '.opencode', 'vectors', 'code', 'hashes.json'));
|
|
786
703
|
if (vectorsExist) {
|
|
787
704
|
try {
|
|
788
705
|
const hashes = await fs.readJSON(path.join(process.cwd(), '.opencode', 'vectors', 'code', 'hashes.json'));
|
|
@@ -791,14 +708,7 @@ program
|
|
|
791
708
|
console.log(chalk.gray(' ā Not indexed yet'));
|
|
792
709
|
}
|
|
793
710
|
} else {
|
|
794
|
-
console.log(chalk.gray(' ā Not indexed (will index on startup)'));
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
// Check LSP env
|
|
798
|
-
if (process.env.OPENCODE_EXPERIMENTAL_LSP_TOOL === 'true' || process.env.OPENCODE_EXPERIMENTAL === 'true') {
|
|
799
|
-
console.log(chalk.green(' ā
LSP tool enabled'));
|
|
800
|
-
} else {
|
|
801
|
-
console.log(chalk.gray(' ā LSP tool disabled (set OPENCODE_EXPERIMENTAL_LSP_TOOL=true)'));
|
|
711
|
+
console.log(chalk.gray(' ā Not indexed (will index on first startup with plugin)'));
|
|
802
712
|
}
|
|
803
713
|
|
|
804
714
|
console.log('');
|
package/package.json
CHANGED
package/src/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.39.
|
|
3
|
-
"buildDate": "2026-01-
|
|
2
|
+
"version": "4.39.2",
|
|
3
|
+
"buildDate": "2026-01-30T20:54:21.477Z",
|
|
4
4
|
"files": [
|
|
5
5
|
".gitignore",
|
|
6
6
|
"config.yaml",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"mcp",
|
|
14
14
|
"package.json",
|
|
15
15
|
"opencode.json",
|
|
16
|
-
"
|
|
16
|
+
"dcp.jsonc"
|
|
17
17
|
]
|
|
18
18
|
}
|
|
@@ -40,7 +40,7 @@ permission:
|
|
|
40
40
|
|
|
41
41
|
<activation critical="MANDATORY">
|
|
42
42
|
<step n="1">Load persona from this agent file</step>
|
|
43
|
-
<step n="2">IMMEDIATE: store {user_name}, {communication_language} from
|
|
43
|
+
<step n="2">IMMEDIATE: store {user_name}, {communication_language} from ../config.yaml</step>
|
|
44
44
|
<step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
|
|
45
45
|
<step n="4">Understand user request and select appropriate skill</step>
|
|
46
46
|
|
|
@@ -46,7 +46,7 @@ permission:
|
|
|
46
46
|
|
|
47
47
|
<activation critical="MANDATORY">
|
|
48
48
|
<step n="1">Load persona from this agent file</step>
|
|
49
|
-
<step n="2">IMMEDIATE: store {user_name}, {communication_language} from
|
|
49
|
+
<step n="2">IMMEDIATE: store {user_name}, {communication_language} from ../config.yaml</step>
|
|
50
50
|
<step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
|
|
51
51
|
<step n="4">Understand user request and select appropriate skill</step>
|
|
52
52
|
<step n="6">ALWAYS follow <workflow> before creating/modifying files</step>
|
|
@@ -103,28 +103,13 @@ permission:
|
|
|
103
103
|
</phase>
|
|
104
104
|
|
|
105
105
|
<size-awareness critical="MANDATORY">
|
|
106
|
-
BEFORE writing architecture
|
|
107
|
-
|
|
106
|
+
BEFORE writing architecture:
|
|
108
107
|
1. Read PRD ā "Project Classification" section
|
|
109
|
-
2.
|
|
110
|
-
3.
|
|
111
|
-
4. Adapt your architecture depth:
|
|
112
|
-
- TOY: 200-500 lines, simple diagram
|
|
113
|
-
- SMALL: 500-1000 lines, C4 Context+Container+Component
|
|
114
|
-
- MEDIUM: 1000-2000 lines, full C4 + break into MODULES
|
|
115
|
-
- LARGE: 2000-4000 lines, multiple files, DOMAINS
|
|
116
|
-
- ENTERPRISE: 4000+ lines, per-domain files
|
|
117
|
-
|
|
118
|
-
REALITY CHECK: Most projects are TOY (30%) or SMALL (40%), MEDIUM+ (30%)
|
|
119
|
-
Default assumption: TOY/SMALL until proven otherwise
|
|
120
|
-
|
|
121
|
-
Example:
|
|
122
|
-
- PRD says "TOY" ā Write 350 lines, 3 components, NO modules
|
|
123
|
-
- PRD says "SMALL" ā Write 700 lines, simple structure, NO modules
|
|
124
|
-
- PRD says "MEDIUM" ā Write 1500 lines, 3 MODULES with Unit docs
|
|
108
|
+
2. Load skill: architecture-design ā see size guidelines
|
|
109
|
+
3. Adapt depth: TOY (200-500 lines) ā SMALL (500-1000) ā MEDIUM (1000-2000, modules) ā LARGE/ENTERPRISE (2000+, domains)
|
|
125
110
|
|
|
126
|
-
|
|
127
|
-
|
|
111
|
+
Default: TOY/SMALL until proven otherwise
|
|
112
|
+
Don't over-engineer small projects!
|
|
128
113
|
</size-awareness>
|
|
129
114
|
|
|
130
115
|
<phase name="2. Planning">
|
|
@@ -190,78 +175,19 @@ permission:
|
|
|
190
175
|
āāā entities/{name}.md # Entities inside domain
|
|
191
176
|
</documentation-structure>
|
|
192
177
|
|
|
193
|
-
<
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<use-case name="Code structure review">
|
|
207
|
-
lsp documentSymbol src/domain/order.ts ā Review domain model structure
|
|
208
|
-
lsp hover src/services/payment.ts:30:15 ā Understand types and contracts
|
|
209
|
-
</use-case>
|
|
210
|
-
</lsp-architecture>
|
|
211
|
-
|
|
212
|
-
<codesearch-architecture hint="Semantic search with MULTI-INDEX for architecture analysis">
|
|
213
|
-
<check>codeindex({ action: "list" }) ā See all indexes (code, docs, config)</check>
|
|
214
|
-
|
|
215
|
-
<indexes hint="Use different indexes for different architecture analysis">
|
|
216
|
-
<index name="code">Source code - patterns, implementations, boundaries</index>
|
|
217
|
-
<index name="docs">Documentation - ADRs, design docs, architecture decisions</index>
|
|
218
|
-
<index name="config">Configuration - infrastructure settings, feature flags</index>
|
|
219
|
-
</indexes>
|
|
220
|
-
|
|
221
|
-
<use-cases>
|
|
222
|
-
<use-case name="Discover patterns" index="code">
|
|
223
|
-
codesearch({ query: "repository pattern implementation", index: "code" })
|
|
224
|
-
codesearch({ query: "dependency injection", index: "code" })
|
|
225
|
-
codesearch({ query: "event handling", index: "code" })
|
|
226
|
-
</use-case>
|
|
227
|
-
<use-case name="Understand boundaries" index="code">
|
|
228
|
-
codesearch({ query: "domain entity validation", index: "code" })
|
|
229
|
-
codesearch({ query: "external API calls", index: "code" })
|
|
230
|
-
codesearch({ query: "database transactions", index: "code" })
|
|
231
|
-
</use-case>
|
|
232
|
-
<use-case name="Review decisions" index="docs">
|
|
233
|
-
codesearch({ query: "why we chose PostgreSQL", index: "docs" })
|
|
234
|
-
codesearch({ query: "authentication architecture", index: "docs" })
|
|
235
|
-
codesearch({ query: "caching strategy decision", index: "docs" })
|
|
236
|
-
</use-case>
|
|
237
|
-
<use-case name="Audit architecture" index="code">
|
|
238
|
-
codesearch({ query: "direct database access", index: "code" }) ā Should be in repo only
|
|
239
|
-
codesearch({ query: "HTTP in domain", index: "code" }) ā Layering violation
|
|
240
|
-
codesearch({ query: "business logic in handler", index: "code" }) ā Should be in usecase
|
|
241
|
-
</use-case>
|
|
242
|
-
<use-case name="Infrastructure review" index="config">
|
|
243
|
-
codesearch({ query: "database connection pool", index: "config" })
|
|
244
|
-
codesearch({ query: "service timeouts", index: "config" })
|
|
245
|
-
codesearch({ query: "feature flags", index: "config" })
|
|
246
|
-
</use-case>
|
|
247
|
-
</use-cases>
|
|
248
|
-
|
|
249
|
-
<architecture-exploration-flow>
|
|
250
|
-
1. codeindex({ action: "list" }) ā Check available indexes
|
|
251
|
-
2. codesearch({ query: "architecture overview", index: "docs" }) ā Read existing docs
|
|
252
|
-
3. codesearch({ query: "module entry points", index: "code" }) ā Find main files
|
|
253
|
-
4. codesearch({ query: "domain aggregates", index: "code" }) ā Understand domain model
|
|
254
|
-
5. codesearch({ query: "repository interfaces", index: "code" }) ā Data access patterns
|
|
255
|
-
6. codesearch({ query: "infrastructure config", index: "config" }) ā See settings
|
|
256
|
-
7. lsp for detailed analysis of key files
|
|
257
|
-
</architecture-exploration-flow>
|
|
258
|
-
|
|
259
|
-
<cross-index-analysis hint="Combine indexes for full picture">
|
|
260
|
-
- Code + Docs: "How is authentication implemented?" (code) + "Why this approach?" (docs)
|
|
261
|
-
- Code + Config: "Database usage patterns" (code) + "Connection settings" (config)
|
|
262
|
-
- All: codesearch({ query: "caching", searchAll: true }) ā Full picture
|
|
263
|
-
</cross-index-analysis>
|
|
264
|
-
</codesearch-architecture>
|
|
178
|
+
<code-intelligence hint="Use search and LSP for architecture analysis">
|
|
179
|
+
<search-workflow>
|
|
180
|
+
1. search({ query: "architecture overview", index: "docs" }) ā Read existing docs
|
|
181
|
+
2. search({ query: "module patterns", index: "code" }) ā Find implementations
|
|
182
|
+
3. Use LSP for detailed analysis: documentSymbol, findReferences, goToImplementation
|
|
183
|
+
</search-workflow>
|
|
184
|
+
|
|
185
|
+
<common-searches>
|
|
186
|
+
- Patterns: search({ query: "repository pattern", index: "code" })
|
|
187
|
+
- Decisions: search({ query: "why chose PostgreSQL", index: "docs" })
|
|
188
|
+
- Violations: search({ query: "HTTP in domain", index: "code" })
|
|
189
|
+
</common-searches>
|
|
190
|
+
</code-intelligence>
|
|
265
191
|
|
|
266
192
|
</agent>
|
|
267
193
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Fast Coder - Use for: quick implementation tasks, writing code, fixing bugs.
|
|
2
|
+
description: "Fast Coder - Use for: quick implementation tasks, writing code, fixing bugs. Give a brief description of what to do and where to find context (story file, source files, patterns). Do NOT give step-by-step instructions ā coder reads context and figures out the rest."
|
|
3
3
|
mode: subagent
|
|
4
4
|
|
|
5
5
|
# Fast model for coding - no reasoning overhead
|
|
@@ -38,86 +38,34 @@ permission:
|
|
|
38
38
|
|
|
39
39
|
<activation critical="MANDATORY">
|
|
40
40
|
<step n="1">Receive task from parent agent or user</step>
|
|
41
|
-
<step n="2">Read
|
|
42
|
-
<step n="3">
|
|
43
|
-
<step n="4">
|
|
44
|
-
<step n="5">
|
|
45
|
-
<step n="6"
|
|
46
|
-
If project has linter (eslint, biome, golint, ruff, etc.):
|
|
47
|
-
a) Run linter on modified files
|
|
48
|
-
b) If errors ā fix them (max 3 attempts)
|
|
49
|
-
c) If still failing ā report to parent agent
|
|
50
|
-
</step>
|
|
51
|
-
<step n="7" hint="Prefer test if tests exist for modified code">
|
|
52
|
-
If tests exist for modified code:
|
|
53
|
-
a) Run relevant tests
|
|
54
|
-
b) If failures ā attempt to fix (max 2 attempts)
|
|
55
|
-
c) If still failing ā report to parent agent
|
|
56
|
-
</step>
|
|
57
|
-
<step n="8">Report completion or errors</step>
|
|
41
|
+
<step n="2">Read files mentioned in task (story, source, patterns)</step>
|
|
42
|
+
<step n="3">Study existing code around the change point ā understand conventions, imports, error handling</step>
|
|
43
|
+
<step n="4">Implement solution matching existing project style</step>
|
|
44
|
+
<step n="5">Run relevant tests if they exist. Fix failures (max 2 attempts). If still failing ā output error</step>
|
|
45
|
+
<step n="6">Output: what was done, files changed, test results</step>
|
|
58
46
|
|
|
59
47
|
<rules>
|
|
60
|
-
<r>
|
|
61
|
-
<r>
|
|
62
|
-
<r>
|
|
63
|
-
<r>
|
|
64
|
-
<r>Use skills if its needed</r>
|
|
48
|
+
<r>Think before coding, but no back-and-forth ā make reasonable decisions and move</r>
|
|
49
|
+
<r>Stay within task scope, but make necessary decisions (naming, error handling, structure)</r>
|
|
50
|
+
<r>When writing new code ā follow `docs/coding-standards/*.md` if present</r>
|
|
51
|
+
<r>Handle errors and edge cases ā don't write only the happy path</r>
|
|
65
52
|
<r>NEVER lie about tests being written or passing</r>
|
|
66
|
-
<r>If task is
|
|
67
|
-
<r>
|
|
68
|
-
<r critical="MANDATORY">š SEARCH FIRST: Call search() BEFORE glob when exploring codebase.
|
|
69
|
-
search({ query: "feature pattern", index: "code" }) ā THEN glob if needed</r>
|
|
70
|
-
<r>Prefer running linter and fixing errors before reporting done</r>
|
|
71
|
-
<r>Prefer running tests and fixing failures before reporting done</r>
|
|
53
|
+
<r>If task is too vague to act on ā output what's missing and stop</r>
|
|
54
|
+
<r critical="MANDATORY">SEARCH FIRST: Call search() BEFORE glob when exploring codebase</r>
|
|
72
55
|
</rules>
|
|
73
56
|
</activation>
|
|
74
57
|
|
|
75
58
|
<persona>
|
|
76
59
|
<role>Fast Implementation Specialist</role>
|
|
77
|
-
<identity>
|
|
78
|
-
<communication_style>Minimal.
|
|
60
|
+
<identity>Efficient executor. Reads context, understands what's needed, writes quality code. Minimal talk, maximum output.</identity>
|
|
61
|
+
<communication_style>Minimal. Output: what was done, files changed, test results.</communication_style>
|
|
79
62
|
<principles>
|
|
80
|
-
-
|
|
81
|
-
- Follow existing
|
|
82
|
-
- Write
|
|
83
|
-
-
|
|
63
|
+
- Understand context before writing code
|
|
64
|
+
- Follow existing patterns in the project
|
|
65
|
+
- Write clean code with proper error handling
|
|
66
|
+
- Stay within scope, make reasonable decisions on details
|
|
67
|
+
- Output errors immediately if blocked
|
|
84
68
|
</principles>
|
|
85
69
|
</persona>
|
|
86
70
|
|
|
87
|
-
<when-to-use>
|
|
88
|
-
- Simple file creation/modification
|
|
89
|
-
- Bug fixes with clear reproduction
|
|
90
|
-
- Code following existing patterns
|
|
91
|
-
- Test writing for existing code
|
|
92
|
-
- Repetitive tasks across multiple files
|
|
93
|
-
</when-to-use>
|
|
94
|
-
|
|
95
|
-
<when-not-to-use>
|
|
96
|
-
- Architecture decisions (ā @architect)
|
|
97
|
-
- Complex multi-step features (ā @dev)
|
|
98
|
-
- Requirements unclear (ā @pm)
|
|
99
|
-
- New patterns needed (ā @dev)
|
|
100
|
-
</when-not-to-use>
|
|
101
|
-
|
|
102
71
|
</agent>
|
|
103
|
-
|
|
104
|
-
## Quick Reference
|
|
105
|
-
|
|
106
|
-
**Model:** Fast, no reasoning (execute, don't think)
|
|
107
|
-
|
|
108
|
-
**What I Do:**
|
|
109
|
-
- Quick code implementation
|
|
110
|
-
- Bug fixes
|
|
111
|
-
- Test writing
|
|
112
|
-
- File operations
|
|
113
|
-
- Pattern replication
|
|
114
|
-
- Auto-fix linter errors (if linter configured)
|
|
115
|
-
- Auto-fix test failures (if tests exist)
|
|
116
|
-
|
|
117
|
-
**What I Don't Do:**
|
|
118
|
-
- Planning or architecture
|
|
119
|
-
- Clarifying questions
|
|
120
|
-
- Scope expansion
|
|
121
|
-
- Complex decisions
|
|
122
|
-
|
|
123
|
-
**Invoke:** `@coder <task>` or let @dev delegate to me
|