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.
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 review labels with approved labels or add approved
labels while leaving review labels in place. Patchmill tolerates both and
removes stale spec-* and plan-* workflow labels as it advances.
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.