{
  "id": "loop",
  "name": "loop",
  "version": "0.1.0",
  "defaultEnabled": true,
  "behaviorStatus": "active",
  "ownershipStatus": "compat-wrapper",
  "sourceMode": "omp-compatible-wrapper",
  "runtimeRequirements": [
    "Loaded by default through package.json#pi.extensions",
    "Bare /loop opens a typed editor for goal [focus] or workflow <runId> [focus]; invalid input is preserved and the editor reopens with a warning",
    "Cancelling bare /loop creates no continuation artifact and triggers no model turn",
    "/loop status reports idle/manual/blocked based on goal and workflow state",
    "/loop once goal coordinates with the existing /goal continue bounded-artifact contract",
    "/loop once workflow <runId> uses persisted workflow run metadata when present; otherwise fails closed with a clear reason",
    "Command-visible continuation output shows metadata/path and omits full prompt bodies from the widget",
    "Unsupported actions and sources fail closed with a clear reason",
    "No background auto-run or hidden agent_end follow-up is registered"
  ],
  "stateUsed": [
    ".locus/runtime/goal/state.json",
    ".locus/runtime/goal/continue.md",
    ".locus/runtime/workflows/<runId>/journal.ndjson",
    ".locus/runtime/workflows/<runId>/result.json",
    ".locus/runtime/loop/workflow/*.json"
  ],
  "tier": "core-owned",
  "provides": {
    "tools": ["loopControl"],
    "commands": ["loop"],
    "hooks": []
  },
  "uiLifecycle": {
    "commands": [
      {
        "name": "loop",
        "taxonomy": ["transient-widget", "status", "blocking-prompt", "artifact-write"],
        "transient": ["widget:loop", "status:locus (loop.manual contribution)"],
        "persistent": [".locus/runtime/goal/continue.md", ".locus/runtime/loop/**"]
      }
    ]
  },
  "permissions": {
    "filesystem": {
      "read": [".locus/runtime/goal/state.json", ".locus/runtime/workflows/**"],
      "write": [".locus/runtime/goal/continue.md", ".locus/runtime/loop/**"]
    },
    "subprocess": [],
    "network": [],
    "browser": false,
    "models": false,
    "ui": ["editor", "setWidget", "setStatus"]
  },
  "risk": "medium",
  "docsPath": "docs/extensions/active/loop.md",
  "sourceAuditPath": "https://github.com/kroffske/locus-pi/blob/main/docs/source-audit/loop.md",
  "tests": ["tests/extensions/loop/loop.test.ts", "tests/integration/public-registration.test.ts"],
  "review": {
    "status": "reviewed",
    "source": "copy-after-audit",
    "reviewedBy": "locus-pi",
    "reviewedAt": "2026-06-17"
  }
}
