{
  "protocol": "sg-ai-workflow-builder",
  "version": "1.2.0",
  "workflowId": "example-task-family-v1",
  "scope": "Replace with a reusable task family, not an individual's project",
  "objective": "Describe the reusable outcome",
  "status": "not_started",
  "mode": "new",
  "requiredInputs": [
    {
      "key": "project_description",
      "description": "A project goal or completed example",
      "required": true
    }
  ],
  "optionalInputs": [],
  "acceptanceCriteria": [
    "Result is supported by observable evidence",
    "The workflow can be rerun with different project data"
  ],
  "permissionBoundaries": [
    "Ask before external messages, production deployment, spending, submissions or irreversible actions"
  ],
  "stages": [
    {
      "id": "scope",
      "title": "Define scope and success",
      "status": "not_started",
      "dependencies": [],
      "tools": [],
      "inputs": [
        "project_description"
      ],
      "deliverables": [
        "work-contract"
      ],
      "checks": [
        "Constraints and acceptance criteria defined"
      ],
      "evidence": [],
      "humanApproval": "if_material_change",
      "nextAction": "Inspect project inputs"
    },
    {
      "id": "execute",
      "title": "Execute authorized work",
      "status": "not_started",
      "dependencies": [
        "scope"
      ],
      "tools": [
        "available authorized tools"
      ],
      "inputs": [
        "work-contract"
      ],
      "deliverables": [
        "actual project artifacts"
      ],
      "checks": [
        "Artifacts exist and meet task-specific checks"
      ],
      "evidence": [],
      "humanApproval": "for_external_or_sensitive_actions",
      "nextAction": "Use only available tools"
    },
    {
      "id": "generalize",
      "title": "Extract and pilot the reusable method",
      "status": "not_started",
      "dependencies": [
        "execute"
      ],
      "tools": [
        "AI reasoning and appropriate tests"
      ],
      "inputs": [
        "observed work and corrections"
      ],
      "deliverables": [
        "WORKFLOW.md",
        "RUN_PROMPT.md",
        "CHECKPOINT.json",
        "QA_REPORT.md",
        "LESSONS.md"
      ],
      "checks": [
        "No private hardcoded data",
        "Distinct-case pilot or clearly marked untested"
      ],
      "evidence": [],
      "humanApproval": "before_public_export",
      "nextAction": "Prepare a portable package"
    }
  ],
  "decisions": [],
  "blockers": [],
  "artifacts": [],
  "qa": {
    "status": "not_started",
    "checks": []
  },
  "humanApprovals": [],
  "lessons": [],
  "nextAction": "Inspect the new project's inputs and define success; do not assume work occurred",
  "updatedAt": null,
  "executionPolicy": {
    "id": "sg-autonomous-execution",
    "version": "1.0.0",
    "executionMode": "chatgpt_work_handoff",
    "backendEnabled": false,
    "reevaluateAfterEveryTask": true,
    "checkpointAfterEveryMeaningfulTask": true,
    "advanceIndependentTasksOnBlock": true,
    "stopOnlyWhen": [
      "no_useful_authorized_work_feasible",
      "essential_user_decision_or_approval",
      "session_or_tool_execution_limit"
    ],
    "onStop": "Persist permitted real artifacts and report blocker, verification status, remaining tasks and exact continuation command"
  },
  "stopReason": null,
  "unresolvedDefects": [],
  "nextActionVerification": "not_started"
}
