name: scope-decompose-sonnet version: 1 description: Scope and decompose a spec into tagged tasks using Sonnet planning runtime: spec-writing-airouter-repo input: state: spec-reviewed-arch tags_forbidden: [] required_artifacts: [] output: state: scoped-tagged scope_budget: files_modified_max: 10 lines_diff_max: 500 wall_clock_seconds_max: 2400 nodes: - id: agent kind: agent template: spec-writing-airouter-repo cli: agentic model: Qwen3.6 labels: [airouter] runtime_env: AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git" AGENT_BRANCH: "spec/auto-draft" CP_URL: "http://controlplane.agent-runtimes.svc.cluster.local:8100" prompt: | The agent-runtimes project repo is cloned at /workspace/project. Change to that directory before doing any work. Find the spec file in /workspace/project/spec/ (the spec was written in an earlier pipeline stage — look for a file whose name matches the concept title '${item.title}' as a slug, e.g. spec/.md). Read that spec carefully. Write a decomposition plan to /workspace/.agent-output/decompose.json with exactly this structure: { "project_id": "${item.project_id}", "space_id": "${item.space_id}", "parent_item_uuid": "${item.uuid}", "tasks": [ { "title": "...", "description": "...", "flow_state": "needs-tests", "spec_ids": ["WT-EVAL-1", "..."], "test_files": ["tests/triggers/test_schema.py", "..."], "tags": ["airouter-eligible"] } ] } Include "airouter-eligible" in tags only for single-file, self-contained tasks that Qwen3.6 can handle alone. Omit tags for complex multi-file tasks. After writing decompose.json, run this Python command to create the work items: python3 -c " import sys, os sys.path.insert(0, '/opt/agent') cp_url = os.environ.get('CP_URL', 'http://controlplane.agent-runtimes.svc.cluster.local:8100').rstrip('/') from actions.decompose_work_items import decompose_work_items_action decompose_work_items_action( {'cp_url': cp_url, 'plan_path': '/workspace/.agent-output/decompose.json'}, {} ) print('decompose_work_items: done') "