autofeat docs
Use autofeat

Reading the state comment

How to read the sticky comment, the state values, and check run conclusions.

Each turn updates one pull request comment in place. The body starts with the marker <!-- autofeat:state -->. The author is autofeat-axc[bot].

Find it with the comments API, or read the journal. The recipe is on State schema.

Banners

Zero, one, or two banner lines sit above the table. They use GitHub alert syntax.

BannerWhen
> [!CAUTION]A budget alert fired on the last run, or the state is failed.
> [!WARNING]ledger.alert_fired is true: spend reached budget.alert_usd.

No banner means neither of those fired. A warning is not a hard stop. A caution on a budget alert means the run is red.

Table

The human-readable part is a two-column table.

FieldValue
stateCurrent state name. List below.
turnLoop turn counter.
spendusd=<n> tokens=<n> minutes=<n> runs=<n> from the ledger.
last_run_idId of the latest run, or -.
head_shaHead SHA this state applies to, or -.
policy_shaDefault-branch commit whose config judged the run, or -.

Example shape:

<!-- autofeat:state -->

> [!WARNING]
> **autofeat spend alert: usd=10.0 reached budget.alert_usd**

| Field | Value |
| --- | --- |
| state | reviewing |
| turn | 2 |
| spend | usd=10.0 tokens=400000 minutes=12.0 runs=2 |
| last_run_id | 01JABC... |
| head_sha | abcdef1234567890 |
| policy_sha | fedcba0987654321 |

Under the table, an HTML comment holds a json fence. That object is the RunState. Do not edit it. The signature covers that object. Field list: State schema.

State values

StateMeaning
queuedAccepted. A stage has not started.
planningplan is in progress.
speccedplan finished.
implementingimplement is in progress.
testingtest is in progress, or implement finished and test is next.
reviewingreview is in progress.
gatinggate is in progress, or review finished and gate is next.
waiting_for_authorThe run stopped for the author. Not terminal. Push a new head.
approvedapprove_only finished an approval and did not merge. Not terminal.
readyWaiting for a human merge. Autofeat sets autofeat:ready. Not terminal.
mergingMerge is in progress.
mergedMerge completed. Terminal.
doneTerminal finished state in the schema. The merge path records ready or merged.
haltedA halt action finished. Terminal.
failedThe stage failed. Not terminal. Push a new head to try again.
budget_exceededA hard budget ceiling stopped the run. Terminal until you raise budget.* or an operator reconciles.

Terminal states have no legal next state: done, merged, halted, budget_exceeded.

review_only (the default) uses review, gate, merge, and halt. You will not see planning, implementing, or testing unless policy.mode is full.

Check run conclusions

Each stage writes one check run named autofeat/<action> on the head SHA. Status moves queued -> in_progress -> completed.

ConclusionMeaning
successThe stage succeeded and writes ran.
neutralDry run (summary starts with Dry run), or the run is waiting for the author.
failurePolicy or guard refusal, failed stage, crash, or a blocking budget alert.
cancelledOperator stop or cancel.

Filter names you will see on a review_only repository: autofeat/review, autofeat/gate, autofeat/merge.

On this page