devflow_token_emit
After a discipline-skill completes, emit an HMAC-signed token as proof to authorize flow state transitions under agent_with_discipline policy.
Instructions
Emit a discipline-token for a flow + skill (DF-289 backend, DF-292 gate-check).
A discipline-token is an HMAC-signed proof that a discipline-skill ran successfully. The signed token is returned ONLY once — the backend stores only the hash. Keep the signed token in session memory.
Use this at the END of a discipline-skill run (devflow-tdd, devflow-verification-gate, devflow-adr-compliance, devflow-collision-acknowledged, ...) once all iron-laws of the skill are satisfied.
Pass the token later to flow_update when transitioning under agent_with_discipline policy:
flow_update({ flowId, currentState: 'done', selfApproved: true, disciplineTokens: [token] })
The backend verifies all required tokens before allowing the transition. Without an opt-in project (project_configs.allow_agent_self_approval=1) and matching pipeline_steps.required_skills, the gate-check rejects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flowId | Yes | Flow id this token belongs to | |
| skillName | Yes | Discipline-skill name (e.g. "devflow-verification-gate") | |
| evidence | No | Optional structured evidence (cycles, hashes, criteria results — kept verbatim for audit) |