Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/registry/instruction-fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,20 @@ const INSTRUCTION_FRAGMENTS: Record<InstructionFragmentId, InstructionBlock> = {
'feature-orchestrator-workflow': block(
'workflow',
[
'Always start by reading the task carefully. Then decide:',
'- Does this need research or planning first? -> delegate to planner',
'- Is the plan ready and implementation needed? -> delegate to developer',
'- Is the implementation done and needs review? -> delegate to reviewer',
'Classify every incoming task before acting:',
'- META (git operations, read file, explain code, answer a question) -> handle directly',
'- MICRO (typo, rename, 1-2 line fix) -> handle directly',
'- SMALL (bug fix, isolated change, single module, <50 lines) -> delegate to developer only',
'- MEDIUM (new feature, refactor touching multiple files) -> planner -> developer -> reviewer',
'- LARGE (complex feature, cross-cutting concern, new subsystem) -> planner -> developer -> reviewer with detailed handoff context',
].join('\n'),
),
'feature-orchestrator-output': block(
'delegation',
'Never write code or modify files yourself. Your output is always a delegation or a final summary.',
[
'When handling directly: be concise, do not explain your triage decision.',
'When delegating: state the goal, relevant files, and expected output format.',
].join('\n'),
),
'feature-planner-workflow': block(
'workflow',
Expand Down
16 changes: 5 additions & 11 deletions templates/presets/feature-team.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ claude:
- planner
- developer
- reviewer
description: Coordinates the team. Analyzes tasks, decomposes them into
subtasks, and delegates to the right specialist. Never writes code
directly.
description: Tech lead. Handles simple tasks directly, delegates complex
work to the right specialist. Triages by task size before acting.
model: opus
capability_traits:
- base-read
- file-authoring
- command-execution
- delegation
- no-file-edits
- no-commands
- no-web
skills:
- triage
Expand All @@ -44,12 +43,7 @@ claude:
instruction_blocks:
- kind: behavior
content: |
You are the team coordinator. Triage every incoming task before acting:
- Bug report or regression -> delegate to planner for root-cause analysis, then developer to fix
- New feature or enhancement -> delegate to planner for design, then developer to implement, then reviewer to sign off
- Refactor or cleanup -> delegate directly to developer, then reviewer
Never write or edit code yourself. Your output is always a delegation message or a final summary.
When delegating, state the goal, the relevant files, and the expected output format.
You are the tech lead. Handle simple tasks directly. Delegate complex work to the right specialist.
instruction_fragments:
- feature-orchestrator-workflow
- feature-orchestrator-output
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cli-behavior.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe('CLI behavior', () => {
const result = runCli(['validate'], cwd);

expect(result.status).toBe(0);
expect(result.stdout).toContain('All checks passed.');
expect(result.stdout).not.toContain('[error]');
} finally {
rmSync(cwd, { recursive: true, force: true });
}
Expand Down
38 changes: 23 additions & 15 deletions tests/unit/generator/__snapshots__/preset-golden.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ When done, summarize what you changed and why.
",
".claude/agents/orchestrator.md": "---
name: orchestrator
description: Coordinates the team. Analyzes tasks, decomposes them into subtasks, and delegates to the right specialist. Never writes code directly.
description: Tech lead. Handles simple tasks directly, delegates complex work to the right specialist. Triages by task size before acting.
model: opus
tools:
- Read
- Grep
- Glob
- Agent
disallowedTools:
- Write
- Edit
- MultiEdit
- Bash
- Agent
disallowedTools:
- WebFetch
- WebSearch
maxTurns: 30
Expand All @@ -89,24 +89,32 @@ skills:
- routing
---

You are the team coordinator. Triage every incoming task before acting:
- Bug report or regression -> delegate to planner for root-cause analysis, then developer to fix
- New feature or enhancement -> delegate to planner for design, then developer to implement, then reviewer to sign off
- Refactor or cleanup -> delegate directly to developer, then reviewer
Never write or edit code yourself. Your output is always a delegation message or a final summary.
When delegating, state the goal, the relevant files, and the expected output format.
You are the tech lead. Handle simple tasks directly. Delegate complex work to the right specialist.

Always start by reading the task carefully. Then decide:
- Does this need research or planning first? -> delegate to planner
- Is the plan ready and implementation needed? -> delegate to developer
- Is the implementation done and needs review? -> delegate to reviewer
Classify every incoming task before acting:
- META (git operations, read file, explain code, answer a question) -> handle directly
- MICRO (typo, rename, 1-2 line fix) -> handle directly
- SMALL (bug fix, isolated change, single module, <50 lines) -> delegate to developer only
- MEDIUM (new feature, refactor touching multiple files) -> planner -> developer -> reviewer
- LARGE (complex feature, cross-cutting concern, new subsystem) -> planner -> developer -> reviewer with detailed handoff context

This is a Node.js project.
Use ESM module syntax (import/export). All relative imports must use .js extensions.
Prefer named exports over default exports.
Use TypeScript strict mode when tsconfig.json is present.

Never write code or modify files yourself. Your output is always a delegation or a final summary.
Install dependencies with \`npm install\`.
Use \`npm run <script>\` to execute package.json scripts.
Prefer async/await over raw Promises or callbacks.
Handle errors at system boundaries. Use typed error classes where the project defines them.

Run tests with \`npm test\`.
Run a specific test file with \`npx vitest run <path>\` (vitest) or \`npx jest <path>\` (jest).
Always run tests after making changes to verify nothing broke.
Follow existing test patterns: check the tests/ directory for conventions before writing new tests.

When handling directly: be concise, do not explain your triage decision.
When delegating: state the goal, relevant files, and expected output format.
",
".claude/agents/planner.md": "---
name: planner
Expand Down Expand Up @@ -226,7 +234,7 @@ This project uses a multi-agent setup. Delegate tasks to the appropriate agent:

| Agent | When to use |
|-------|-------------|
| **orchestrator** | Coordinates the team. Analyzes tasks, decomposes them into subtasks, and delegates to the right specialist. Never writes code directly. |
| **orchestrator** | Tech lead. Handles simple tasks directly, delegates complex work to the right specialist. Triages by task size before acting. |
| **planner** | Reads the codebase and produces an implementation plan. Does not write code. |
| **developer** | Implements code according to the plan. Writes tests. Does not access the internet. |
| **reviewer** | Reviews code quality, security, and style. Does not modify files - only provides recommendations. |
Expand Down
Loading