{
  "schema_version": 1,
  "workflow_id": "development",
  "revision": 1,
  "name": "Development",
  "status": "proposed-definition",
  "topology": "ordered",
  "inputs": ["request_text", "request_reference"],
  "input_rule": "at-least-one-request-input",
  "steps": [
    {
      "id": "plan",
      "name": "Plan",
      "depends_on": [],
      "allowed_actor_kinds": ["human", "agent"],
      "eligible_roles": ["admin", "contributor", "reviewer"],
      "instructions": "State the scope, acceptance checklist, and required verification checks. Submit for the designated owner's decision before implementation.",
      "skill_ref": null,
      "required_outputs": [
        { "name": "scope", "type": "text" },
        { "name": "acceptance_criteria", "type": "text-list" },
        { "name": "required_checks", "type": "check-definition-list", "minimum_items": 1 }
      ],
      "acceptance": { "mode": "human_decision", "assignee": "designated_owner" },
      "candidate_bound": false
    },
    {
      "id": "implement",
      "name": "Implement",
      "depends_on": ["plan"],
      "allowed_actor_kinds": ["human", "agent"],
      "eligible_roles": ["admin", "contributor"],
      "instructions": "Implement the accepted plan in the existing development environment. Submit an exact candidate reference, a summary, and handoff notes. Coordinate actual writers before any handoff.",
      "skill_ref": null,
      "required_outputs": [
        { "name": "candidate_ref", "type": "candidate-reference" },
        { "name": "summary", "type": "text" },
        { "name": "handoff_notes", "type": "text" }
      ],
      "acceptance": { "mode": "required_outputs" },
      "candidate_bound": true
    },
    {
      "id": "verify",
      "name": "Verify",
      "depends_on": ["implement"],
      "allowed_actor_kinds": ["human", "system"],
      "eligible_roles": ["admin", "reviewer"],
      "instructions": "Report every check declared in the accepted plan against the current candidate. Preserve failures and explicitly record unavailable checks.",
      "skill_ref": null,
      "required_outputs": [
        { "name": "check_results", "type": "check-result-list" }
      ],
      "acceptance": { "mode": "all_required_checks_pass", "check_source": "accepted_plan.required_checks" },
      "candidate_bound": true
    },
    {
      "id": "review",
      "name": "Independent review",
      "depends_on": ["verify"],
      "allowed_actor_kinds": ["human", "agent"],
      "eligible_roles": ["admin", "reviewer"],
      "instructions": "Review the current candidate and verification evidence against the accepted plan. Report all blocking findings in one verdict. The implementation performer cannot satisfy this gate using the same identity or agent session.",
      "skill_ref": null,
      "required_outputs": [
        { "name": "candidate_ref", "type": "candidate-reference" },
        { "name": "verdict", "type": "verification-verdict" },
        { "name": "findings", "type": "text-list" }
      ],
      "acceptance": { "mode": "independent_review_pass", "independent_of": "implement" },
      "candidate_bound": true
    },
    {
      "id": "accept",
      "name": "Human acceptance",
      "depends_on": ["review"],
      "allowed_actor_kinds": ["human"],
      "eligible_roles": ["admin", "reviewer"],
      "instructions": "Inspect the current candidate and evidence. Record acceptance or request rework with a reason. A personal agent credential cannot make this human decision.",
      "skill_ref": null,
      "required_outputs": [
        { "name": "candidate_ref", "type": "candidate-reference" },
        { "name": "qa_notes", "type": "text" }
      ],
      "acceptance": { "mode": "human_decision", "assignee": "designated_reviewer" },
      "candidate_bound": true
    },
    {
      "id": "handoff",
      "name": "Handoff",
      "depends_on": ["accept"],
      "allowed_actor_kinds": ["human", "agent"],
      "eligible_roles": ["admin", "contributor", "reviewer"],
      "instructions": "Record the accepted candidate's delivery reference and concise summary, including remaining limitations. Do not claim merge or deployment without external evidence.",
      "skill_ref": null,
      "required_outputs": [
        { "name": "candidate_ref", "type": "candidate-reference" },
        { "name": "delivery_ref", "type": "text" },
        { "name": "summary", "type": "text" }
      ],
      "acceptance": { "mode": "required_outputs" },
      "candidate_bound": true
    }
  ],
  "rework": {
    "authorized_roles": ["admin", "reviewer"],
    "target_step": "implement",
    "preserve_plan_unless_explicitly_revised": true,
    "invalidate_all_candidate_dependent_evidence": true,
    "preserve_attempt_history": true
  },
  "terminal_outcome": "accepted-and-ready-for-handoff"
}
