Rails Boss Execute Workflow
You are the Boss.
You read the source documents.
You build the queue.
You spawn the workers.
You verify the result.
You update the progress file.
You mark source stories complete.
You repeat.
Do not silently skip the worker step.
Do not silently skip the commit step.
Do not silently skip the progress update step.
Do not silently skip the story-marking step.
Purpose
- Use this workflow when the user wants implementation work done from one or more design documents, milestone documents, story documents, or implementation-plan documents.
- Use this workflow when the work should be done through subagents instead of one large direct implementation pass.
- Use this workflow when the work is naturally split into stories, checklist items, milestones, or ordered plan slices.
- Use this workflow for a single story, a short ordered set of stories, or a larger multi-document delivery pass.
Artifact root (target repository)
All paths are relative to the target repository root (the project being implemented, not necessarily this tooling repository).
Path conventions below follow the Agentic Rails context structure. If the target repository uses different context or documentation folder conventions, adjust these paths before dispatching workers and record the chosen path in briefing.md.
| Path |
Role |
context/rails-boss-execute/briefing.md |
Durable summary of source documents, extracted constraints, required persona, and ordered story/work queue |
context/rails-boss-execute/progress.md |
Durable execution queue and current state |
context/rails-boss-execute/logs/ |
Blocked notes, worker failures, recovery notes |
Create these directories and files on first run.
Do not delete them on resume unless the user explicitly asks for a clean run.
Plan path convention
Implementation plans this workflow consumes live at:
context/implementation-plans/<milestone-slug>/<story-slug>/plan.md
plan.md is the one primary artifact per story. Do not expect every plan folder to also contain implementation-log.md, completion-review.md, questions.md, evidence.md, or complaining.md — those stay opt-in per rails-planning conventions, and a plan's own ## Execution Log and ## Completion Review sections are frequently where that information already lives. If a worker needs to record what actually happened during execution, prefer appending to plan.md's ## Execution Log section over inventing a new sidecar file, unless the story is large or phased enough that a standalone log was explicitly requested.
Skills and agent contracts
| Role |
Path from this repository root |
| Commit wording skill for every worker |
skills/commit-log/SKILL.md |
| Optional specialist worker contract |
agents/<agent-name>/AGENT.md |
| Example specialist worker contract |
agents/wpf-persona/AGENT.md |
Supporting reference: state transitions: references/state-model.md.
Invocation
The user passes the work request in the message. The message may include source document paths, plan paths, story ids, story ranges, or ordered stories.
Examples:
/rails-boss-execute review [context/design.md] [context/milestones/milestone-1.md] then follow [context/implementation-plans/milestone-1/feature-slug/plan.md] with subagents
/rails-boss-execute implement STORY 1.2 and then STORY 1.3 with subagents and mark them off as you go
/rails-boss-execute read these design docs first, then implement the requested plan steps with workers
Interpret the message literally.
If the user names files, read those files first.
If the user names stories, keep that story order.
If the user names a plan file, extract stories or plan slices from that plan file.
If the user names both source docs and plan docs, read the source docs first and the plan docs second.
Non-negotiable rules
- Read every user-listed design, milestone, story, and plan document before dispatching the first worker.
- Build or refresh
briefing.md before dispatching the first worker.
- Build or refresh
progress.md before dispatching the first worker.
- Spawn at least one subagent for each story or tightly-bound plan slice. Do not replace that worker step with Boss implementation.
- Default to one story per worker. Only batch multiple items into one worker when they are tightly bound, in the same file area, and clearly intended to land together.
- If the source material says a specialist agent persona must be used, that instruction is mandatory. Pass that agent contract path to every relevant worker. Do not omit it.
- If the source material says to use the WPF agent persona, use
agents/wpf-persona/AGENT.md. Do not omit it.
- Every worker must load
skills/commit-log/SKILL.md before finishing.
- Every worker that made changes must make a real commit before returning. The commit message must come from the
commit-log skill contract. Do not skip the real commit.
- Do not accept a worker as complete if it changed files and did not make a real commit.
- After every successful worker completion, update
progress.md.
- After every successful worker completion, mark the corresponding story complete in the source plan or backlog file when that file uses checkboxes or explicit story status markers.
- If a story is blocked, mark it blocked in
progress.md, write a note under logs/, and do not pretend the story is done.
- Before dispatching workers, state the selected parallelism level to the user as a concrete maximum number of concurrent subagents.
Story extraction rules
- If the plan document already has named stories, steps, milestones, or checklist items, preserve those identifiers exactly.
- If the user explicitly requested a subset of stories, queue only that subset.
- If the source documents define dependencies or order, preserve that order.
- If no explicit story ids exist, create stable synthetic ids such as
STEP-001, STEP-002, and STEP-003.
- If both a design document and a plan document exist, the design document provides context and constraints while the plan document provides the execution order unless the user says otherwise.
Briefing file
Write or refresh context/rails-boss-execute/briefing.md with:
- The exact source documents read for this run
- A short note for each source document describing why it matters
- Any mandatory specialist agent persona named by the user or the source documents
- The selected parallelism level and why that level was chosen
- The ordered list of stories or plan slices selected for this run
- Any hard constraints, acceptance notes, or sequencing rules extracted from the documents
Keep briefing.md concise.
briefing.md is a durable run summary, not a replacement for the source documents.
Progress file
Write or refresh context/rails-boss-execute/progress.md as a table like this:
| Status |
Story |
Source |
Persona |
Commit |
Notes |
| TODO |
STORY 1.2 |
context/implementation-plans/milestone-1/story-1-2-slug/plan.md |
agents/wpf-persona/AGENT.md |
|
queued |
Use the status values from references/state-model.md.
Only the Boss updates the Status column.
Use the Commit column for the worker's actual commit SHA after success.
Execution loop
Init
Ensure context/, context/rails-boss-execute/, progress.md, briefing.md, and logs/ exist on the target repository.
Read source documents
Read every source document the user named. Read design and milestone context first. Read plan and implementation files second. Do not dispatch a worker before this step is complete.
Extract constraints and stories
Determine:
- the ordered stories for this run
- any mandatory agent persona
- any sequencing constraints
- any explicit user requirement to update source checklists or story markers
- the requested or safest parallelism level
Write durable state
Refresh briefing.md. Refresh or initialize progress.md. Resume from existing progress.md if a run is already in flight.
Announce parallelism
Tell the user the selected parallelism level before dispatching workers. Use a concrete form such as Parallelism: 0 (serial, max 1 active subagent) or Parallelism: 4 (max 4 active subagents).
Select next story
Pick the next TODO story whose dependencies are satisfied. If the user requested a specific order, honor that order exactly.
Dispatch worker or worker batch
Select up to the announced maximum number of eligible TODO rows. Set selected rows to DOING in progress.md, then spawn one subagent per selected story or tightly-bound plan slice. Pass each worker its required source docs, story id, required persona, commit requirement, and return format. Do not skip the worker.
Review worker result
Confirm the worker:
- stayed inside the assigned story
- used the required specialist persona if one was mandatory
- ran whatever validation was reasonable for the assigned change
- made a real commit if files changed
- returned the commit SHA, changed files, tests run, and blockers
Update state
- Success: set the row to
DONE, record the commit SHA, keep a brief note.
- Blocked: set the row to
BLOCKED, add a brief note, and write a log file under logs/.
- Missing commit after changed files: do not mark success. Send the work back or mark blocked.
Mark source stories complete
If the source plan or backlog file uses checkboxes, mark the completed item checked only after the worker is truly DONE.
If the source plan uses another explicit status marker, update that status only after the worker is truly DONE.
Repeat
Continue until there are no TODO rows left for the requested scope or until the remaining stories are blocked.
Report
Tell the user where briefing.md and progress.md live, the parallelism level used, which stories are done, which stories are blocked, and which commits landed.
Worker dispatch requirements
Every worker prompt must include all of the following:
- The exact story id or step id to implement
- The exact source document paths to read before coding
- A plain statement that the worker must implement only the assigned story or tightly-bound slice
- The exact specialist agent contract path to use, or an explicit statement that no specialist agent contract is required
- The exact path
skills/commit-log/SKILL.md
- A plain statement that the worker must load
commit-log, generate the commit message from that skill, and make a real commit before returning if files changed
- A plain statement that the worker must report commit SHA, changed files, tests run, and blockers
- A plain statement that the worker must not silently skip the commit
Use concrete language.
Repeat the critical requirements in the worker prompt.
Recommended worker wording:
Read the listed source documents before making changes.
Implement only STORY X.Y.
Use this specialist agent contract if required: agents/wpf-persona/AGENT.md.
Before you finish, load skills/commit-log/SKILL.md, generate the commit message from that skill, and make a real commit if you changed files.
Return the commit SHA, files changed, tests run, and blockers.
Parallelism
The Boss must state the selected parallelism level to the user before worker dispatch and again in the final report. State it as a concrete maximum number of concurrently active subagents.
Default behavior: use judgment. Choose the safest useful level after reading the source material, dependency order, file ownership, commit requirements, and user instructions.
Use these terms:
Parallelism: 0 means serial execution. Run exactly one active subagent at a time, despite the numeric level being zero.
Parallelism: N means run up to N active subagents concurrently.
Zero Parallelism
If the user asks for zero parallelism, no parallelism, serial execution, Ralph-loop style execution, or one worker at a time, use Parallelism: 0.
In zero-parallelism mode:
- Spawn one subagent for the next eligible story.
- Let that subagent finish its assigned story completely.
- Require validation and the real commit, if files changed, before accepting the worker.
- Dispose of that subagent's context by ending that worker interaction before starting the next worker.
- Update
progress.md, source story markers, and logs before spawning the next subagent.
- Repeat for as many stories as needed, even if the run spans dozens of stories and takes hours.
This mode intentionally trades wall-clock speed for clean context windows, simpler review, and lower merge or commit risk.
Heavy Parallelism
If the user asks for heavy parallelism, high parallelism, maximum safe parallelism, or many workers at once, the Boss must work harder before dispatch:
- Build the full queue before worker dispatch.
- Identify dependencies, strict ordering constraints, shared files, shared tests, shared documentation checkboxes, and likely merge conflicts.
- Partition stories into safe concurrent batches.
- Choose the maximum number of active subagents that can run without violating dependencies, file ownership, checklist updates, or commit cleanliness.
- State that maximum to the user before dispatch.
- Keep Boss-owned state updates (
progress.md, source checklist/status updates, and run logs) serialized even when workers run concurrently.
Only run multiple workers concurrently when all of the following are true:
- the stories are clearly independent
- the file ownership is disjoint or otherwise safe
- the plan document does not require strict serial order
- each worker can still make its own real commit cleanly
If those conditions are not clearly true, lower the parallelism level. If uncertainty remains material, use Parallelism: 0.
Recovery policy
BLOCKED is durable state.
- Do not silently requeue a blocked story.
- If the user asks to retry, rewrite
BLOCKED back to TODO intentionally and note the retry in logs/.
- If the worker reports that no code change was needed, capture that in
Notes and only mark DONE when the story really was satisfied.
Standalone uses
This workflow can be used for:
- one explicitly named story
- an ordered list of stories
- a full implementation plan
- a design-doc-plus-plan sequence
- milestone-driven delivery where each milestone expands into concrete stories
1---2name: rails-boss-execute-workflow3description: Use this orchestration skill when implementing work from design documents, milestone documents, backlog stories, or implementation plans. The Boss reads the supplied documents, builds a durable story/work queue, dispatches one subagent per story or tightly bound plan slice, enforces specialist agents when required, updates progress, and repeats until the requested work is done or blocked.4---56# Rails Boss Execute Workflow78You are the **Boss**.910You read the source documents.11You build the queue.12You spawn the workers.13You verify the result.14You update the progress file.15You mark source stories complete.16You repeat.1718Do not silently skip the worker step.19Do not silently skip the commit step.20Do not silently skip the progress update step.21Do not silently skip the story-marking step.2223## Purpose2425- Use this workflow when the user wants implementation work done from one or more design documents, milestone documents, story documents, or implementation-plan documents.26- Use this workflow when the work should be done through subagents instead of one large direct implementation pass.27- Use this workflow when the work is naturally split into stories, checklist items, milestones, or ordered plan slices.28- Use this workflow for a single story, a short ordered set of stories, or a larger multi-document delivery pass.2930## Artifact root (target repository)3132All paths are relative to the **target** repository root (the project being implemented, not necessarily this tooling repository).3334Path conventions below follow the Agentic Rails context structure. If the target repository uses different context or documentation folder conventions, adjust these paths before dispatching workers and record the chosen path in `briefing.md`.3536| Path | Role |37| --- | --- |38| `context/rails-boss-execute/briefing.md` | Durable summary of source documents, extracted constraints, required persona, and ordered story/work queue |39| `context/rails-boss-execute/progress.md` | Durable execution queue and current state |40| `context/rails-boss-execute/logs/` | Blocked notes, worker failures, recovery notes |4142Create these directories and files on first run.43Do not delete them on resume unless the user explicitly asks for a clean run.4445## Plan path convention4647Implementation plans this workflow consumes live at:4849```text50context/implementation-plans/<milestone-slug>/<story-slug>/plan.md51```5253`plan.md` is the one primary artifact per story. Do not expect every plan folder to also contain `implementation-log.md`, `completion-review.md`, `questions.md`, `evidence.md`, or `complaining.md` — those stay opt-in per `rails-planning` conventions, and a plan's own `## Execution Log` and `## Completion Review` sections are frequently where that information already lives. If a worker needs to record what actually happened during execution, prefer appending to `plan.md`'s `## Execution Log` section over inventing a new sidecar file, unless the story is large or phased enough that a standalone log was explicitly requested.5455## Skills and agent contracts5657| Role | Path from this repository root |58| --- | --- |59| Commit wording skill for every worker | `skills/commit-log/SKILL.md` |60| Optional specialist worker contract | `agents/<agent-name>/AGENT.md` |61| Example specialist worker contract | `agents/wpf-persona/AGENT.md` |6263Supporting reference: **state transitions**: [references/state-model.md](references/state-model.md).6465## Invocation6667The user passes the work request in the message. The message may include source document paths, plan paths, story ids, story ranges, or ordered stories.6869Examples:7071- `/rails-boss-execute review [context/design.md] [context/milestones/milestone-1.md] then follow [context/implementation-plans/milestone-1/feature-slug/plan.md] with subagents`72- `/rails-boss-execute implement STORY 1.2 and then STORY 1.3 with subagents and mark them off as you go`73- `/rails-boss-execute read these design docs first, then implement the requested plan steps with workers`7475Interpret the message literally.76If the user names files, read those files first.77If the user names stories, keep that story order.78If the user names a plan file, extract stories or plan slices from that plan file.79If the user names both source docs and plan docs, read the source docs first and the plan docs second.8081## Non-negotiable rules8283- Read every user-listed design, milestone, story, and plan document before dispatching the first worker.84- Build or refresh `briefing.md` before dispatching the first worker.85- Build or refresh `progress.md` before dispatching the first worker.86- Spawn at least one subagent for each story or tightly-bound plan slice. Do not replace that worker step with Boss implementation.87- Default to one story per worker. Only batch multiple items into one worker when they are tightly bound, in the same file area, and clearly intended to land together.88- If the source material says a specialist agent persona must be used, that instruction is mandatory. Pass that agent contract path to every relevant worker. Do not omit it.89- If the source material says to use the WPF agent persona, use `agents/wpf-persona/AGENT.md`. Do not omit it.90- Every worker must load `skills/commit-log/SKILL.md` before finishing.91- Every worker that made changes must make a real commit before returning. The commit message must come from the `commit-log` skill contract. Do not skip the real commit.92- Do not accept a worker as complete if it changed files and did not make a real commit.93- After every successful worker completion, update `progress.md`.94- After every successful worker completion, mark the corresponding story complete in the source plan or backlog file when that file uses checkboxes or explicit story status markers.95- If a story is blocked, mark it blocked in `progress.md`, write a note under `logs/`, and do not pretend the story is done.96- Before dispatching workers, state the selected parallelism level to the user as a concrete maximum number of concurrent subagents.9798## Story extraction rules99100- If the plan document already has named stories, steps, milestones, or checklist items, preserve those identifiers exactly.101- If the user explicitly requested a subset of stories, queue only that subset.102- If the source documents define dependencies or order, preserve that order.103- If no explicit story ids exist, create stable synthetic ids such as `STEP-001`, `STEP-002`, and `STEP-003`.104- If both a design document and a plan document exist, the design document provides context and constraints while the plan document provides the execution order unless the user says otherwise.105106## Briefing file107108Write or refresh `context/rails-boss-execute/briefing.md` with:109110- The exact source documents read for this run111- A short note for each source document describing why it matters112- Any mandatory specialist agent persona named by the user or the source documents113- The selected parallelism level and why that level was chosen114- The ordered list of stories or plan slices selected for this run115- Any hard constraints, acceptance notes, or sequencing rules extracted from the documents116117Keep `briefing.md` concise.118`briefing.md` is a durable run summary, not a replacement for the source documents.119120## Progress file121122Write or refresh `context/rails-boss-execute/progress.md` as a table like this:123124| Status | Story | Source | Persona | Commit | Notes |125| --- | --- | --- | --- | --- | --- |126| TODO | STORY 1.2 | `context/implementation-plans/milestone-1/story-1-2-slug/plan.md` | `agents/wpf-persona/AGENT.md` | | queued |127128Use the status values from [references/state-model.md](references/state-model.md).129Only the Boss updates the `Status` column.130Use the `Commit` column for the worker's actual commit SHA after success.131132## Execution loop1331341. **Init** 135 Ensure `context/`, `context/rails-boss-execute/`, `progress.md`, `briefing.md`, and `logs/` exist on the target repository.1361372. **Read source documents** 138 Read every source document the user named. Read design and milestone context first. Read plan and implementation files second. Do not dispatch a worker before this step is complete.1391403. **Extract constraints and stories**141 Determine:142 - the ordered stories for this run143 - any mandatory agent persona144 - any sequencing constraints145 - any explicit user requirement to update source checklists or story markers146 - the requested or safest parallelism level1471484. **Write durable state** 149 Refresh `briefing.md`. Refresh or initialize `progress.md`. Resume from existing `progress.md` if a run is already in flight.1501515. **Announce parallelism**152 Tell the user the selected parallelism level before dispatching workers. Use a concrete form such as `Parallelism: 0 (serial, max 1 active subagent)` or `Parallelism: 4 (max 4 active subagents)`.1531546. **Select next story**155 Pick the next `TODO` story whose dependencies are satisfied. If the user requested a specific order, honor that order exactly.1561577. **Dispatch worker or worker batch** 158 Select up to the announced maximum number of eligible `TODO` rows. Set selected rows to `DOING` in `progress.md`, then spawn one subagent per selected story or tightly-bound plan slice. Pass each worker its required source docs, story id, required persona, commit requirement, and return format. Do not skip the worker.1591608. **Review worker result** 161 Confirm the worker:162 - stayed inside the assigned story163 - used the required specialist persona if one was mandatory164 - ran whatever validation was reasonable for the assigned change165 - made a real commit if files changed166 - returned the commit SHA, changed files, tests run, and blockers1671689. **Update state** 169 - Success: set the row to `DONE`, record the commit SHA, keep a brief note.170 - Blocked: set the row to `BLOCKED`, add a brief note, and write a log file under `logs/`.171 - Missing commit after changed files: do not mark success. Send the work back or mark blocked.17217310. **Mark source stories complete**174 If the source plan or backlog file uses checkboxes, mark the completed item checked only after the worker is truly `DONE`.175 If the source plan uses another explicit status marker, update that status only after the worker is truly `DONE`.17617711. **Repeat** 178 Continue until there are no `TODO` rows left for the requested scope or until the remaining stories are blocked.17918012. **Report** 181 Tell the user where `briefing.md` and `progress.md` live, the parallelism level used, which stories are done, which stories are blocked, and which commits landed.182183## Worker dispatch requirements184185Every worker prompt must include all of the following:186187- The exact story id or step id to implement188- The exact source document paths to read before coding189- A plain statement that the worker must implement only the assigned story or tightly-bound slice190- The exact specialist agent contract path to use, or an explicit statement that no specialist agent contract is required191- The exact path `skills/commit-log/SKILL.md`192- A plain statement that the worker must load `commit-log`, generate the commit message from that skill, and make a real commit before returning if files changed193- A plain statement that the worker must report commit SHA, changed files, tests run, and blockers194- A plain statement that the worker must not silently skip the commit195196Use concrete language.197Repeat the critical requirements in the worker prompt.198199Recommended worker wording:200201> Read the listed source documents before making changes. 202> Implement only STORY X.Y.203> Use this specialist agent contract if required: `agents/wpf-persona/AGENT.md`. 204> Before you finish, load `skills/commit-log/SKILL.md`, generate the commit message from that skill, and make a real commit if you changed files. 205> Return the commit SHA, files changed, tests run, and blockers.206207## Parallelism208209The Boss must state the selected parallelism level to the user before worker dispatch and again in the final report. State it as a concrete maximum number of concurrently active subagents.210211Default behavior: use judgment. Choose the safest useful level after reading the source material, dependency order, file ownership, commit requirements, and user instructions.212213Use these terms:214215- `Parallelism: 0` means serial execution. Run exactly one active subagent at a time, despite the numeric level being zero.216- `Parallelism: N` means run up to `N` active subagents concurrently.217218## Zero Parallelism219220If the user asks for zero parallelism, no parallelism, serial execution, Ralph-loop style execution, or one worker at a time, use `Parallelism: 0`.221222In zero-parallelism mode:223224- Spawn one subagent for the next eligible story.225- Let that subagent finish its assigned story completely.226- Require validation and the real commit, if files changed, before accepting the worker.227- Dispose of that subagent's context by ending that worker interaction before starting the next worker.228- Update `progress.md`, source story markers, and logs before spawning the next subagent.229- Repeat for as many stories as needed, even if the run spans dozens of stories and takes hours.230231This mode intentionally trades wall-clock speed for clean context windows, simpler review, and lower merge or commit risk.232233## Heavy Parallelism234235If the user asks for heavy parallelism, high parallelism, maximum safe parallelism, or many workers at once, the Boss must work harder before dispatch:236237- Build the full queue before worker dispatch.238- Identify dependencies, strict ordering constraints, shared files, shared tests, shared documentation checkboxes, and likely merge conflicts.239- Partition stories into safe concurrent batches.240- Choose the maximum number of active subagents that can run without violating dependencies, file ownership, checklist updates, or commit cleanliness.241- State that maximum to the user before dispatch.242- Keep Boss-owned state updates (`progress.md`, source checklist/status updates, and run logs) serialized even when workers run concurrently.243244Only run multiple workers concurrently when all of the following are true:245246- the stories are clearly independent247- the file ownership is disjoint or otherwise safe248- the plan document does not require strict serial order249- each worker can still make its own real commit cleanly250251If those conditions are not clearly true, lower the parallelism level. If uncertainty remains material, use `Parallelism: 0`.252253## Recovery policy254255- `BLOCKED` is durable state.256- Do not silently requeue a blocked story.257- If the user asks to retry, rewrite `BLOCKED` back to `TODO` intentionally and note the retry in `logs/`.258- If the worker reports that no code change was needed, capture that in `Notes` and only mark `DONE` when the story really was satisfied.259260## Standalone uses261262This workflow can be used for:263264- one explicitly named story265- an ordered list of stories266- a full implementation plan267- a design-doc-plus-plan sequence268- milestone-driven delivery where each milestone expands into concrete stories