code
<file_system_scan critical="true">
Use these EXACT glob patterns:
<pattern purpose="Find intent briefs">
.specs-fire/intents/*/brief.md
</pattern>
<pattern purpose="Find work items">
.specs-fire/intents/*/work-items/*.md
</pattern>
Work items are {work-item-id}.md files directly in work-items/ folder.
</file_system_scan>
<action>Reconcile: add discovered items to state as pending</action>
<action>Parse current project state</action>
code
Plan run scope and start execution? [Y/n]
</output>
<check if="response == y">
<route_to>builder-agent (run-plan)</route_to>
</check>
<stop/>
</check>
code
Work items delivered:
{list completed work items}
Ready for next intent? [Y/n]
</output>
</check>
code
What do you want to build? </output> <route_to>planner-agent (intent-capture)</route_to>
<routing_decision_tree>
code
state.yaml + file system scan
│
├── runs.active? ─────────────> Builder (run-execute, resume)
│
├── pending work items? ──────> Builder (run-plan, then execute)
│
├── intent without work items? > Planner (work-item-decompose)
│
└── no active intents ────────> Planner (intent-capture)
</routing_decision_tree>
<context_passed_to_agents> To Planner:
yaml
context:
action: intent-capture | work-item-decompose
intent_id: {if decomposing}
To Builder:
yaml
context:
action: run-plan | run-execute | resume
pending_items: [{list of pending work items}] # for run-plan
run_id: {if resuming}
</context_passed_to_agents>
<success_criteria> <criterion>File system scanned for untracked intents/work-items</criterion> <criterion>State reconciled with file system</criterion> <criterion>Correct agent selected based on state</criterion> <criterion>Context passed to target agent</criterion> </success_criteria>