[factory] p7: scope single|workflow|team driven by issue labels
Merged
KH
6mo ago+1141+1141+0123456789012345678901234567890123456789-70-70-01234567890123456789
Summary
Three-value scope knob bound to agent:single/workflow/team labels, with tiered inference + Slack clarification fallback. Emits specs into cloud's existing execution paths.
Factory issue p7 (label-scope). Built autonomously via the relayflows factory squad loop (standard review).
Spec: factory/planning/linear-issue-factory-cloud-p7-label-scope.md
Review
- single-pass implement (impl-codex)
- Claude fresh-eyes review/fix loop
- deterministic acceptance: npm run build --if-present 2>&1 | tail -40 && npm test --if-present 2>&1 | tail -40
Summary by cubic
Adds label-driven scope selection for issues with agent:single, agent:workflow, or agent:team, making scope deterministic (Linear p7) and enabling a single workflow:run spawn in dispatch. Adds workflow:run support to the CLI/fleet path.
-
New Features
- Map
agent:single|workflow|teamlabels to scope; explicit labels override inference and are ignored for repo routing. workflowscope emits one workflow agent (roleworkflow, capabilityworkflow:run) with route-derived inputs; dispatch passesworkflowandinputsthrough and updates the summary comment.- Relax the “too many labels” check only for
team;single/workflowproceed even if repo labels exceed the cap, with tests added to pin both cases. - Wire
workflow:runinto fleet/CLI (advertised capability,relayflowscommand, safe default names); types/schema/LLM prompt updated for theworkflowrole.
- Map
-
Migration
- To opt in, add one of:
agent:single,agent:workflow,agent:teamon the Linear issue. - Ensure
workflows/factory/linear-issue.tsexists (or remap downstream). - No config changes required; repo label routing and
triage.maxImplementersare unchanged.
- To opt in, add one of: