Files
agent-runtime-framework/task-templates/workflow/feature-delivery-loop@1.yaml
Paul O'Reilly 887578f0eb feat(templates): explicit cp_write on every kind: script node + audit test (WF-COMP-31d, item 26754227)
cp_write: true  -> state-tx (test-validate@1, frozen-fixture-emit@1) and, in
                   the archived bug-ancestor-auto-advance@1, tag-set + state-tx.
cp_write: false -> every other script node (verdict-gate, policy-pick,
                   preflight-*, frozen-fixture-emit, parent-link-check).
tests/invariants/test_cp_write_field_set_correctly.py pins the set.

HOLD: do not merge until the CP release that adds WorkflowNode.cp_write.
The current CP schema is extra="forbid" and rejects the new key
(verified: nodes.0.cp_write extra_forbidden), so on the old CP these
template edits are NOT inert.

Claude-Session: https://claude.ai/code/session_01N218bERyNeLhbLmDRDvbWF
2026-10-04 09:36:04 +13:00

38 lines
1.3 KiB
YAML

name: feature-delivery-loop
version: 1
description: |
Orchestrator workflow for delivering a feature-tagged item end-to-end. Reads
the item's workflow_state and workflow_history, lists eligible child workflows,
picks one via policy-pick, dispatches it, waits for completion, then loops.
Emits ACL request-handoff when policy-pick returns no match or when an outcome
triggers an escalation that is not yet implemented.
runtime: feature-delivery-loop
input:
state: ready
required_artifacts: []
output:
state: impl-green
scope_budget:
# The orchestrator runner does not directly modify code; child workflows do.
# The schema requires positive minimums, so set the loop's own budget to 1/1
# — child workflow scope budgets are enforced separately during their dispatch.
files_modified_max: 1
lines_diff_max: 1
wall_clock_seconds_max: 7200
nodes:
- id: policy-pick
kind: script
cmd: scripts/workflow/policy-pick
cp_write: false
on_fail: escalate
- id: agent
kind: agent
template: feature-delivery-loop
runtime_config:
runner: feature_delivery_loop
prompt: "Drive the eligibility-pick-dispatch-wait loop for item ${item.uuid} until it reaches a terminal state."
escalation:
policy_pick_no_match: blocked-pending-handoff
scope_exceeded: replan-spec-opus
agent_bailed: feature-delivery-loop