devflow_token_emit
Emit an HMAC-signed discipline-token to prove a skill ran successfully. Use at skill completion to authorize flow state transitions under disciplined policies.
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 | |
| evidence | No | Structured evidence, validated against the per-skill schema (DF-417/DF-438; warn-mode today, hard 400 under DEVFLOW_EVIDENCE_STRICT). Required shapes: devflow-verification-gate: { acVerification: [{acId, command, output}] } devflow-plan-reconciliation: { perAcStatus: [{acId, status: done|partial|missing|extra}] } devflow-tdd: { testFirstPerPackage: [{package, redCommit, greenCommit}] } ODER plan-level { testStrategy, checkedAt } devflow-collision-acknowledged: { totals, checkedAt } devflow-knowledge-completer: { gapsResolved: [], checkedAt } (leeres Array ist gültig) devflow-pattern-reuse: { patternsReferenced: [≥1] } devflow-adr-compliance: { filesChanged: [≥1], compliant: true } | |
| skillName | Yes | Discipline-skill name (e.g. "devflow-verification-gate") |