The workflow

The template has two stages: project planning and feature development.

First, you describe what you want to build. Agents help turn that description into requirements, an architecture, and a roadmap, which you review and approve. Then each feature moves through implementation, automated checks, an independent code review, and a pull request.

If the requirements change later, you update the plan through a separate review and approval process.

The diagram shows the complete workflow, from planning a project to merging a feature. Play the walkthrough to follow one example, including what happens when a test fails or a review finds an issue.

Click any step to learn what happens and which script is responsible, or a stage to see all its steps. The same information is on this page, below the diagram.

One feature, from idea to merge A route through the two stages. Planning: requirements that you approve, a plan, an independent review with a revision, and your approval. Feature: an issue, the implementation, checks that fail once and are repaired, an independent review with one finding that you decide to fix, a second review, a commit, a pull request with CI, and your merge. Stage 1 · Plan the project Stage 2 · Build each feature revise fix and review again Implementation done Requirements approved ◆ you approve Plan roadmap ready Plan review 0 findings Approval recorded ◆ you approve Feature issue created Checks passed Review 0 findings Findings resolved ◆ you decide ● an agent decides Commit recorded Pull request open CI green Merge merged ◆ you merge
One feature, from idea to merge A route through the two stages. Planning: requirements that you approve, a plan, an independent review with a revision, and your approval. Feature: an issue, the implementation, checks that fail once and are repaired, an independent review with one finding that you decide to fix, a second review, a commit, a pull request with CI, and your merge. Stage 1 · Plan the project Stage 2 · Build each feature Implementation done Requirements approved ◆ you approve Plan roadmap ready Plan review 0 findings Approval recorded ◆ you approve Feature issue created Checks passed Review 0 findings Findings resolved ◆ you decide ● an agent decides Commit recorded Pull request open CI green Merge merged ◆ you merge
An example: one feature, from idea to merge what happens at each step
  1. start-planning.shquestions about goals, users, and scope
  2. youapprove the requirements
  3. planning agentwrites the architecture and the roadmap
  4. review-planning.sh2 findings: the plan is revised and reviewed again
  5. youapprove the plan; the approval is linked to this version
  6. create-feature-issue.shroadmap feature F01 becomes a GitHub issue
  7. start-feature.shthe implementer works in its own branch and worktree
  8. verify.sh1 check fails: the implementer repairs it, then all pass
  9. review-feature.shthe independent reviewer reports 1 finding
  10. youtriage agentdecide: fix it nowdecides: fix it now. You read this afterward
  11. apply-triage.shfixed; the second review has 0 findings
  12. finish-feature.shcommit, with the checks and the review recorded
  13. publish-feature.shpull request opened; CI passes
  14. youmerge
  • You give input or approve
  • An AI agent plans, builds, or reviews
  • A script checks or records

The two stages, step by step

After a merge you can start the next feature. If the plan needs to change, return to the planning process.

How you can run it

Step by step

Run each script yourself and look at the result before you move on. This suits a feature that is complex, risky, or unfamiliar.

One command per feature

Run ./scripts/run-feature.sh <issue>. The workflow handles implementation, verification, review, fixes, and the pull request without interrupting you for routine decisions. It stops if an agent needs your input, if a step keeps failing, or when the maximum number of review rounds is reached.

Important: in an unattended run an agent decides what to do with the review findings, without your approval. Read those decisions and the pull request afterward. The command does not merge the pull request.

Step by stepUnattended (run-feature.sh)
Review findingsYou review and approve the proposed decisionsAn agent decides and records its decisions; you read them afterward
InterruptionsYou can step in between any two stepsThe run retries a temporary failure, lets the implementer repair a failing check, and stops when it cannot safely continue
ResultYou move through the steps yourselfAn open pull request, or an explanation of why the run stopped. Never a merge
MergingBy your repository's permissions and branch rulesThe same: an unattended run does not change who may merge

Experimental: several features together

We have also tried a supervising agent that coordinates several feature runs. This is not part of the template. It needs extra coordination: what to do about conflicts between features, failed runs, and merges. A built-in task queue and parallel execution are among the possible improvements.

Situations the workflow handles

The plan has to change
You do not edit an approved plan by hand. A change request goes through review and approval again: update an approved plan.
A run is interrupted
The implementer keeps a handoff note with what is done and what remains, so the work continues without the earlier conversation: start-feature.sh <issue> --resume, or run-feature.sh <issue> again. An unattended run retries a temporary failure itself. When an agent needs a decision from you, it stops and leaves its question in the note.
Results are no longer current
A verification result belongs to the exact content that was checked: change the code and the checks run again. A review belongs to the content that was reviewed: when that changes, the scripts ask for a new review. If the base branch was merged into the feature in the meantime, a later review has to cover the complete feature, not only the recent changes. The approval of the plan lapses in the same way when the requirements or the roadmap change. See project checks and workflow checks for the details.
An agent hits a usage limit
When the provider of an agent refuses a session because a usage or rate limit is reached, the script shows the provider's own message and says that it is a usage limit, not a defect: run the step again after the time the provider names. An unattended run retries the step and writes the limit into its log, so you can see afterward why it stopped.
The network fails while a feature starts
Reading the issue is tried again when the connection or GitHub fails for a moment; an issue that does not exist, or a refusal, stops at once with its reason. An unattended run tries the start again, like any other temporary failure.
The base branch moved after a feature was finished
Merge the base branch into the feature branch and publish again: git merge origin/main, then ./scripts/publish-feature.sh <issue>. The pull request is still described by the commit of the finished feature and still closes the issue. Any other commit after the finish needs a new finish first.
A review has findings
Each finding gets one of three recorded decisions: fix it now (FIX_NOW), defer it to a follow-up issue (DEFER), or accept it with a reason (ACCEPT). See decide what to do with review findings.
You need a review although a check fails
review-feature.sh <issue> --unverified "<reason>" reviews work whose verification fails, and records the reason. It is an exception, not a pass: the checks still count as failed, and the feature cannot be committed until they pass.
Your checks, and the checks of the workflow
Your project's tests and linters are one list; the tests of the workflow scripts are another. See project checks and workflow checks.

Learning from your runs

Every run leaves a record of what it took, so that you can see where the time and the tokens go, and which problems keep coming back. The scripts and the agent adapter keep it; no agent estimates anything, and nothing leaves your machine unless you ask for it (what is recorded on your machine).

WhatHow you see itWhat it tells you
Run records: per run the duration of every step, the tokens of every agent call per role and model, the verifications, and your approvals./scripts/report-runs.sh <issue>, several features side by side, a period, or --split <date> for before and after a change; --json for your own toolsWhat a feature cost, how many review and repair rounds it needed, and which steps take the longest
Experience records: per run what happened, derived by a script from the reviews, the triage, the verifications, and why a run stopped; the implementer may add notes of its own./scripts/show-experience.sh <issue>The findings and stops of a feature, each with a reference to its evidence
An analysis of several features by a read-only agent, the analyst./scripts/analyze-runs.sh <issue>..., --since <date>, or --last <n>Recurring problems and what worked, with proposals in order of priority

Some care is built in, so that the numbers do not mislead:

An analysis changes nothing in your repository. Each proposal says where it belongs: a decision record, an agent instruction, a skill, the documentation, a check in a script, an issue, or the workflow template. A project cannot repair the workflow scripts itself, because it takes them over from the template; a proposal about them is an issue for the template. You decide what to do with a proposal, and it goes through the review that applies there. Records and analyses never stop a feature: a record that cannot be written is reported, and the work goes on.

Every step in detail

Stage 1 · Plan the project

Describe the idea

Start with a short description of your project. You do not need every detail worked out: the next step helps find what is missing.

Who
You
Input
PROJECT_DESCRIPTION.md, written by you
Result
A starting point for the planning
Important
Agents do not overwrite your description

Clarify the requirements (Project Grill)

The planning agent asks questions about the goals, the users, the scope, and the constraints of the project. We call this round the Project Grill. It then writes a requirements document for you to review. Planning continues after you approve it.

Who
You and the planning agent
Script
./scripts/start-planning.sh <name>
Input
The project description and your answers
Result
docs/PROJECT_REQUIREMENTS.md in the planning worktree, a separate working copy of the repository
Your approval
You approve the requirements

Create the project plan

From the approved requirements, the planning agent proposes an architecture, a roadmap of features with IDs and dependencies, and a record of each important technical decision.

Who
Planning agent
Script
The same run of start-planning.sh
Result
docs/architecture.md, docs/roadmap.md, docs/decisions/
Blocked if
The agent needs you to make a decision

Review the plan

A separate agent that cannot edit files checks the plan for missing requirements, inconsistent decisions, and risks. It records its findings in a format the workflow can validate.

Who
Independent planning reviewer
Script
./scripts/review-planning.sh
Result
A review report with findings grouped by severity
Next
Address the findings, or go on to the approval when there are none

Address the review findings

The planning agent proposes what to do with each finding: adopt it, reject it, defer it, or escalate it to you. You approve those decisions. If the plan changes, the reviewer checks the new version again.

Who
You and the planning agent
Script
./scripts/revise-planning.sh
Your approval
You approve the decisions; an escalated finding needs your answer
Repeat
Review again after every change, until a round changes nothing

Approve the plan

The workflow records your approval together with a fingerprint: a checksum that identifies the exact version of the requirements and the roadmap you approved. If either document changes later, the approval no longer applies.

Who
You
Script
./scripts/finish-planning.sh
Result
docs/PLANNING_APPROVAL.md and the planning commit
Blocked if
The review is outdated or a required decision is missing

Merge the planning pull request

The approved planning documents are merged into main. Feature development starts from that version of the plan.

Who
Repository maintainer
Result
The approved plan on main

Update an approved plan

When the requirements or the direction of the project change, write a short change request. The planning agent updates the documents the request touches, and the changes go through review and approval again. A lighter process exists for a small change to the architecture or to a decision record.

Who
You and the planning agents
Script
./scripts/start-planning.sh <name> --change <file>
Optional
--grill when the requirements need clarification
Small amendments
./scripts/finish-planning.sh --amend
Important
Feature IDs stay the same, and a replaced decision stays traceable

Stage 2 · Build each feature

Create a feature issue

Create a GitHub issue for the roadmap feature you are ready to build. Creating it at that moment keeps it in line with the current requirements and architecture.

Who
Script, started by you
Script
./scripts/create-feature-issue.sh F01
Input
The approved roadmap entry
Result
A GitHub issue
Blocked if
The approval of the plan is no longer valid

Implement the feature

The implementer works in a separate branch and worktree. It reads the feature issue and the approved project documents, writes the code and the tests, and leaves notes so that the work can be resumed. Before it ends, it records how far the issue is done: complete, awaiting evidence, partial, or blocked, with evidence for each acceptance criterion. Evidence that cannot exist yet, such as the CI result of a pull request that is not published or a check of the default branch after the merge, is recorded as pending at its gate, and the status is then awaiting evidence.

Who
Implementer agent
Script
./scripts/start-feature.sh <issue>
Resume
./scripts/start-feature.sh <issue> --resume
Result
Changes in the feature worktree, and a completion record
Not done if
The record does not say complete or awaiting evidence, or the notes list remaining work. A session that ends is not a finished feature: the workflow continues to the review only when the record says complete, or awaiting evidence for a later gate
Blocked if
The agent needs a decision from you

Run verification

Run the tests, lint checks, and build commands configured for the project. A successful run is recorded, so it can be reused while the checked code does not change.

Who
Verification script
Script
./scripts/verify.sh
Configuration
scripts/verify.conf
Rule
Verification has to pass before a feature is reviewed and before it is committed
Exception
review-feature.sh <issue> --unverified "<reason>" reviews work whose verification fails. The review records the reason; the checks still count as failed, and the commit still requires them to pass

Review the implementation

An independent agent that cannot edit files compares the change with the feature's requirements. It reports problems with their severity and says how much the change affects the architecture.

Who
Reviewer agent
Script
./scripts/review-feature.sh <issue>
Option
--changes for a follow-up review of the recent fixes only. The review before the commit always covers the complete feature
Checks
Every acceptance criterion of the issue against the code and the tests. The implementer's completion record is a claim; the reviewer reports a claim the code does not support
Result
A review tied to the current version of the code. If the code changes afterward, another review is required
Next
Decide on the findings, or commit when there are none

Decide what to do with review findings

For each finding, decide whether to fix it now, defer it to a follow-up issue, or accept it with a reason. This step is called triage.

Who
You, step by step. An agent, in an unattended run
Script
./scripts/triage-review.sh <review>
Result
Recorded decisions, published on the feature issue
Your approval
Step by step, you approve the decisions. In an unattended run an agent decides without you: read its decisions afterward

Apply fixes and review again

The implementer fixes only the findings that were selected in the triage, and the checks run again. The code has changed, so another review is required: run the review again, until a review has nothing left to fix.

Who
Implementer agent
Script
./scripts/apply-triage.sh <triage>
Result
Verified fixes that wait for another review
Next
./scripts/review-feature.sh <issue> --changes to confirm the fixes, then ./scripts/review-feature.sh <issue> for the complete feature

Commit the feature

Before committing, the script checks that the feature is complete, that verification passed, and that the latest review is still valid and covers the complete feature. The commit message records all three, and whether the change needs additional approval.

Who
Script
Script
./scripts/finish-feature.sh <issue> "<summary>"
Result
A commit with the completion, verification, and review information
Refuses if
The implementer's completion record is missing or does not say complete or awaiting evidence. --partial commits unfinished work as your explicit choice
Important
This step does not push or merge

Open the pull request

Push the feature branch and open a pull request linked to its GitHub issue. CI runs the project's checks again. The pull request closes the issue only when the feature is complete; unfinished work becomes a draft that leaves the issue open. A feature that waits for a check of the default branch after the merge is ready for review, but leaves the issue open until ./scripts/record-post-merge.sh records that evidence.

Who
Script
Script
./scripts/publish-feature.sh <issue>
Result
An open pull request with the verification and review details

Review and merge

Check the pull request, the test results, and the required approvals before you merge. The workflow points out changes that need the owner's attention. To enforce those rules for everyone, configure permissions and branch protection in GitHub: the scripts alone cannot do that.

Who
Authorized repository maintainer
Script
./scripts/check-guardrails.sh lists what needs the owner
After the merge
./scripts/cleanup-worktree.sh <issue>

Run a feature unattended

One command coordinates implementation, verification, review, triage, fixes, the commit, and the pull request. It retries a temporary failure and stops when it cannot safely continue.

Who
Script that coordinates the agents
Script
./scripts/run-feature.sh <issue>
Limit
Up to five review rounds
Result
An open pull request, or an explanation of why the run stopped
Important
The command does not merge

Reference documentation