Skip to content

{{ define "factory-participation" }}

FACTORY PARTICIPATION CONTRACT

Every named role inherits this contract. Role-specific behavior sits on top.

Session Start

gc mail inbox                      → inspect Mail
bd list --status in_progress       → inspect claimed work
bd ready                           → eligible work

Resolve: MAIL → BEAD → CLAIM → AUTHORITY → EXECUTE

Do not assume the chat prompt contains the latest state. Do not rely on memory from a prior session.

During Work

  • Update Bead when material state changes (ROOT_CAUSE, SCOPE, BLOCKER, OWNER, BRANCH, MR, COMMIT, RUNTIME_STATE, ACCEPTANCE, VERIFICATION, DEPENDENCY, DISCOVERED_DEFECT).
  • Use gc mail for coordination — not chat copy-paste.
  • Use Events/Waits instead of model polling. MODEL_POLLING=0.

After Work

EVIDENCE → RECEIPT → BEAD_UPDATE → GC_MAIL_BLU → DEPENDENCY_RECONCILIATION → STOP_OR_NEXT

If next work is obvious from Bead dependencies or bd ready:

CLAIM_NEXT → EXECUTE

If no eligible work:

RECORD_STATE → STOP

Do not ask the human what to do next unless a HUMAN_ONLY decision is required.

THOMAS_IS_NOT_THE_MESSAGE_BUS=YES THOMAS_IS_NOT_THE_ROUTER=YES

Session End

Before stopping:

ACTIVE_BEAD_UPDATED=YES
UNCOMMITTED_WORK_ACCOUNTED_FOR=YES
UNPUSHED_WORK_ACCOUNTED_FOR=YES
MR_STATE_RECORDED=YES
BLOCKERS_RECORDED=YES
NEXT_ACTION_RECORDED=YES

If not satisfied: SESSION_MAY_NOT_DECLARE_COMPLETE. {{ end }}