Skip to content

Commit 1e49d15

Browse files
TabishBBalancor
authored andcommitted
fix(opencode): remove hardcoded agent field from slash commands (Fission-AI#335)
Remove the `agent: build` field from OpenCode slash command templates to allow OpenCode to use the current/custom agent instead of requiring the build agent to be available. Fixes Fission-AI#334
1 parent b2ab170 commit 1e49d15

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/core/configurators/slash/opencode.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
1111

1212
const FRONTMATTER: Record<SlashCommandId, string> = {
1313
proposal: `---
14-
agent: build
1514
description: Scaffold a new OpenSpec change and validate strictly.
1615
---
1716
The user has requested the following change proposal. Use the openspec instructions to create their change proposal.
@@ -20,7 +19,6 @@ The user has requested the following change proposal. Use the openspec instructi
2019
</UserRequest>
2120
`,
2221
apply: `---
23-
agent: build
2422
description: Implement an approved OpenSpec change and keep tasks in sync.
2523
---
2624
The user has requested to implement the following change proposal. Find the change proposal and follow the instructions below. If you're not sure or if ambiguous, ask for clarification from the user.
@@ -29,7 +27,6 @@ The user has requested to implement the following change proposal. Find the chan
2927
</UserRequest>
3028
`,
3129
archive: `---
32-
agent: build
3330
description: Archive a deployed OpenSpec change and update specs.
3431
---
3532
<ChangeId>

test/core/init.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,21 +492,21 @@ describe('InitCommand', () => {
492492
expect(await fileExists(openCodeArchive)).toBe(true);
493493

494494
const proposalContent = await fs.readFile(openCodeProposal, 'utf-8');
495-
expect(proposalContent).toContain('agent: build');
495+
expect(proposalContent).not.toContain('agent:');
496496
expect(proposalContent).toContain(
497497
'description: Scaffold a new OpenSpec change and validate strictly.'
498498
);
499499
expect(proposalContent).toContain('<!-- OPENSPEC:START -->');
500500

501501
const applyContent = await fs.readFile(openCodeApply, 'utf-8');
502-
expect(applyContent).toContain('agent: build');
502+
expect(applyContent).not.toContain('agent:');
503503
expect(applyContent).toContain(
504504
'description: Implement an approved OpenSpec change and keep tasks in sync.'
505505
);
506506
expect(applyContent).toContain('Work through tasks sequentially');
507507

508508
const archiveContent = await fs.readFile(openCodeArchive, 'utf-8');
509-
expect(archiveContent).toContain('agent: build');
509+
expect(archiveContent).not.toContain('agent:');
510510
expect(archiveContent).toContain(
511511
'description: Archive a deployed OpenSpec change and update specs.'
512512
);

0 commit comments

Comments
 (0)