{
  "title": "AI Task Lifecycle",
  "description": "From a shared goal to an accepted result, with explicit permission, bounded retries and a human review loop.",
  "graph": {
    "direction": "LR",
    "nodes": [
      {
        "id": "goal",
        "type": "terminal",
        "label": "Goal received",
        "description": "A person defines the intended outcome, constraints and a clear stop condition. A request to plan is not permission to execute.",
        "group": "",
        "groupId": "direction",
        "category": "frontend",
        "position": {
          "x": 80,
          "y": 160
        },
        "basis": "unknown",
        "sources": [
          {
            "repository": "",
            "path": "",
            "revision": "",
            "note": "Authored reference workflow for human-directed AI work. This is a process design, not a record of an executed agent run or production telemetry."
          }
        ]
      },
      {
        "id": "plan",
        "type": "process",
        "label": "Draft the plan",
        "description": "The AI proposes bounded steps, required tools, expected outputs and acceptance criteria. Unresolved choices stay visible.",
        "group": "",
        "groupId": "direction",
        "category": "backend",
        "position": {
          "x": 80,
          "y": 350
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "permission",
        "type": "decision",
        "label": "Work approved?",
        "description": "The person authorizes this specific scope. Rejection ends this attempt; a later changed plan requires a new decision.",
        "group": "",
        "groupId": "direction",
        "category": "frontend",
        "position": {
          "x": 60,
          "y": 570
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "cancelled",
        "type": "terminal",
        "label": "Cancelled",
        "description": "Permission was declined before execution. No tool action is started by this route. Existing work remains available for later review.",
        "group": "",
        "groupId": "direction",
        "category": "frontend",
        "position": {
          "x": 80,
          "y": 830
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "execute",
        "type": "process",
        "label": "Execute a step",
        "description": "Carry out the next authorized step. Respect the approved scope and stop boundary instead of silently expanding the task.",
        "group": "",
        "groupId": "execution",
        "category": "backend",
        "position": {
          "x": 700,
          "y": 160
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "tool",
        "type": "io",
        "label": "Call the right tool",
        "description": "Use the selected tool with the permissions already granted. Tool results become evidence; they do not authorize unrelated actions.",
        "group": "",
        "groupId": "execution",
        "category": "external",
        "position": {
          "x": 695,
          "y": 350
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "evidence",
        "type": "process",
        "label": "Collect the result",
        "description": "Capture the returned output and relevant observations. Keep failures visible so the next decision can use the actual result.",
        "group": "",
        "groupId": "execution",
        "category": "backend",
        "position": {
          "x": 700,
          "y": 570
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "revise",
        "type": "process",
        "label": "Revise the scope",
        "description": "Changes requested at final review go back into a new plan. This branch does not resume execution until the new scope is approved.",
        "group": "",
        "groupId": "execution",
        "category": "backend",
        "position": {
          "x": 700,
          "y": 830
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "criteria",
        "type": "decision",
        "label": "Criteria met?",
        "description": "Compare the collected result with the approved acceptance criteria. A permitted bounded retry may repeat a step; exhausted retries stop for a revised plan.",
        "group": "",
        "groupId": "review",
        "category": "backend",
        "position": {
          "x": 1300,
          "y": 160
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "accept",
        "type": "decision",
        "label": "Accept the result?",
        "description": "The person reviews the completed artifact and supporting evidence. Acceptance finishes the task; changes return to planning.",
        "group": "",
        "groupId": "review",
        "category": "frontend",
        "position": {
          "x": 1300,
          "y": 490
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "complete",
        "type": "terminal",
        "label": "Completed",
        "description": "The result meets the agreed criteria and has been accepted. Preserve the artifact and evidence so another person or AI can continue later.",
        "group": "",
        "groupId": "review",
        "category": "neutral",
        "position": {
          "x": 1320,
          "y": 830
        },
        "basis": "unknown",
        "sources": []
      }
    ],
    "edges": [
      {
        "id": "goal-plan",
        "source": "goal",
        "target": "plan",
        "label": "",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "plan-permission",
        "source": "plan",
        "target": "permission",
        "label": "",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "permission-execute",
        "source": "permission",
        "target": "execute",
        "label": "Approved",
        "description": "Only the approved scope crosses into execution.",
        "sourceHandle": "right",
        "targetHandle": "left",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "permission-cancel",
        "source": "permission",
        "target": "cancelled",
        "label": "Declined",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "labelOffset": {
          "x": 95,
          "y": 0
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "execute-tool",
        "source": "execute",
        "target": "tool",
        "label": "",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "tool-evidence",
        "source": "tool",
        "target": "evidence",
        "label": "",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "evidence-criteria",
        "source": "evidence",
        "target": "criteria",
        "label": "Evaluate",
        "description": "",
        "sourceHandle": "right",
        "targetHandle": "left",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "criteria-retry",
        "source": "criteria",
        "target": "execute",
        "label": "Bounded retry",
        "description": "Repeat only while the original permission and retry allowance remain valid.",
        "sourceHandle": "left",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "criteria-review",
        "source": "criteria",
        "target": "accept",
        "label": "Met",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "criteria-revise",
        "source": "criteria",
        "target": "revise",
        "label": "Needs new scope",
        "description": "A retry budget or scope boundary was reached; return to planning rather than retry indefinitely.",
        "sourceHandle": "right",
        "targetHandle": "right",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "review-complete",
        "source": "accept",
        "target": "complete",
        "label": "Accepted",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "review-revise",
        "source": "accept",
        "target": "revise",
        "label": "Changes requested",
        "description": "",
        "sourceHandle": "left",
        "targetHandle": "right",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "revise-plan",
        "source": "revise",
        "target": "plan",
        "label": "Replan",
        "description": "Revised work re-enters the approval gate before further execution.",
        "sourceHandle": "left",
        "targetHandle": "left",
        "basis": "unknown",
        "sources": []
      }
    ],
    "groups": [
      {
        "id": "direction",
        "label": "Direction & permission",
        "description": "Define the work and decide whether execution may begin."
      },
      {
        "id": "execution",
        "label": "Execution & evidence",
        "description": "Use tools within scope and preserve the resulting evidence."
      },
      {
        "id": "review",
        "label": "Verification & handoff",
        "description": "Check the result, request changes or accept the finished artifact."
      }
    ]
  },
  "investigation": null
}
