{
  "objective": "Implement one authorized package change with read-only mapping, critique, serialized work, validation, and final review.",
  "library": {
    "sources": [
      "package"
    ]
  },
  "authority": {
    "allowFilesystemRead": true,
    "allowShellTools": true,
    "allowMutationTools": true
  },
  "steps": [
    {
      "id": "scope-map",
      "agent": {
        "ref": "package:scout"
      },
      "task": "Map the implementation scope, canonical owners, affected docs/tests/examples, and validation obligations. Do not edit."
    },
    {
      "id": "implementation-plan",
      "agent": {
        "ref": "package:planner"
      },
      "needs": [
        "scope-map"
      ],
      "task": "Design the smallest coherent change with owners, schemas, failure modes, tests, docs, and validation. Do not edit."
    },
    {
      "id": "premortem",
      "agent": {
        "ref": "package:critic"
      },
      "needs": [
        "implementation-plan"
      ],
      "task": "Stress-test the plan for coupling, trust, concurrency, data loss, stale docs, and missing proof. Do not edit."
    },
    {
      "id": "implementation-worker",
      "agent": {
        "ref": "package:worker"
      },
      "needs": [
        "premortem"
      ],
      "mutationScope": "REPLACE before start. Allowed files/globs: <exact package paths>. Allowed mutation class: <specific implementation edit type>. Explicit exclusions: <paths/actions not allowed>. Validation commands authorized: <exact commands or none>. Stop if broader than current parent authorization. mutationScope is not a sandbox; bash/edit/write are not path-confined, so stop rather than touch anything outside this authorization.",
      "task": "Use the premortem as evidence to verify before editing. If it reports BLOCK, NO-GO, an unresolved mandatory condition, a needed human approval checkpoint, or a scope/authority risk that this task and mutationScope do not explicitly resolve, do not edit; return the blocker and needed decision. If mutationScope is still a placeholder, missing, or broader than the parent authorization, do not edit. Otherwise implement only that authorized change across synchronized runtime, tests, docs, and examples. Keep ownership narrow and return changed paths plus validation commands run."
    },
    {
      "id": "validation-review",
      "agent": {
        "ref": "package:reviewer"
      },
      "needs": [
        "implementation-worker"
      ],
      "task": "Review the final diff and validation evidence returned by the worker. Do not run commands unless this step is explicitly changed to package:validator or granted a task-named command scope. Return findings first, new versus inherited failures, and ship/block recommendation."
    },
    {
      "id": "final-decision",
      "agent": {
        "ref": "package:synthesizer"
      },
      "after": [
        "scope-map",
        "implementation-plan",
        "premortem",
        "implementation-worker",
        "validation-review"
      ],
      "task": "Produce final status, changed paths, validation, blockers, residual risk, and exact next action after all lanes terminalize, including failed or blocked lane evidence. Do not invent validation."
    }
  ],
  "limits": {
    "concurrency": 1,
    "timeoutSecondsPerStep": 9000
  }
}
