Workflow labels
Patchmill uses labels for two related purposes:
- triage labels classify whether an issue is ready for automation;
- workflow approval labels control when
run-oncemay continue through spec and plan gates.
Triage state map
Section titled “Triage state map”Use triage.stateMap to map repository labels into Patchmill’s canonical triage
buckets. Keep the dashed labels["in-progress"] key exactly as shown in JSON.
triage.stateMap keys are repository label names. Values are limited to:
agent-readyneeds-infoagent-unsuitableblocked
The configured labels.ready label must map to agent-ready.
Approval labels
Section titled “Approval labels”workflow.specApproval and workflow.planApproval configure approval labels
that control when patchmill run-once may proceed. These are workflow signals,
not triage buckets, so they are not nested under labels and are not added to
triage.stateMap.
run-once treats the configured ready label, spec-approved label, and
plan-approved label as actionable workflow states. Review labels without
matching approved labels are waiting states for human review.
Approved labels are durable facts about the current resolvable artifacts. Patchmill preserves them through claim, implementation, failure, resume, and successful completion. Review, ready, in-progress, needs-info, and done labels continue to represent transient workflow or lifecycle state.
An approved label requires its corresponding artifact to resolve. If
spec-approved has no valid spec, or plan-approved has no valid plan,
run-once stops with a safety error before claiming the issue or invoking Pi.
Remove approval explicitly before replacing an approved artifact.
Approval flows
Section titled “Approval flows”When both spec and plan approval are required:
When spec approval is required and plan approval is not required:
When spec approval is not required and plan approval is required:
When neither approval is required:
Humans may either replace a review label with its approved label or leave both
in place. Approval wins over review for the same stage; a later-stage review,
such as plan-review, wins over durable approval from an earlier stage.
projectPolicy.planRequiresApproval remains as a compatibility alias. If
workflow.planApproval.required is omitted, Patchmill derives plan approval
from projectPolicy.planRequiresApproval. If both are present,
workflow.planApproval.required wins.
Blocked triage state
Section titled “Blocked triage state”blocked means the issue is clear and suitable for automation but must wait for
specific same-repository issues to close. The triage agent records those
blockers as issue numbers in blockedBy and in a comment line such as:
Later triage runs re-check those blocker issues. When all blockers are closed, Patchmill removes the blocked label, adds the ready label, and posts an unblock comment.