Add write-code-simple workflow: narrow airouter single-test impl

Single-node airouter workflow for one-requirement/one-test tasks.
Optional test_target param focuses the agent on a specific pytest
node ID. Cost-optimised: labels=[airouter], cost_efficiency≥9.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul O'Reilly
2026-04-28 17:15:10 +12:00
parent 906de0954d
commit a89829e31d

View File

@@ -0,0 +1,61 @@
name: write-code-simple
version: 1
description: >
Single-node airouter workflow for narrow implementation tasks: write just enough
code to make one specific test pass. Optimised for cost and speed — use for
single-requirement, single-file, or single-test work items.
Hard cap: 3 concurrent airouter tasks. No web search available in container.
params:
required:
task_description:
type: string
description: "What to implement — be specific about which test must pass"
project_id:
type: string
description: "Project identifier for task grouping"
repo_url:
type: string
description: "Git repo URL for the agent to clone"
agent_repo_url:
type: string
description: "Agent repo URL for branch-per-task persistence"
optional:
test_target:
type: string
default: ""
description: "Specific test file or node ID to run (e.g. tests/test_foo.py::test_bar). Leave blank if specified in task_description."
harness:
type: string
default: "code-airouter-repo/v1"
description: "Harness to use (default: code-airouter-repo/v1)"
space_id:
type: string
default: "default"
description: "Space identifier"
nodes:
agent:
name: "agent"
prompt: |
{{ task_description }}
{% if test_target %}
## Target test
Your work is complete when this test passes:
```
python -m pytest {{ test_target }} -v
```
Do not modify the test file. Write only the source code needed to make it pass.
{% endif %}
harness: "{{ harness }}"
requirements:
labels: [airouter]
min_scores:
cost_efficiency: 9
on_success:
- type: commit_pr
params:
repo_url: "{{ repo_url }}"
agent_repo_url: "{{ agent_repo_url }}"