{
  "antiPatterns": [
    "Treating the caller-supplied actor label as shared-service authentication.",
    "Treating skipped or untrusted evaluations as verified passes."
  ],
  "api": {
    "contractRef": "schemas/cli-envelope.v1.json",
    "entrypoint": "ancrel_rsi_studio_template.cli:main"
  },
  "constraints": [
    "Run the offline demonstration on a trusted loopback host.",
    "Pin the draft, evidence and target digest before reviewer approval."
  ],
  "docs": "raw/backend/rsi-studio-template.md",
  "examples": [
    {
      "code": "#!/bin/sh\n# Run against a fresh local host. Every mutation travels through its HTTP client.\nset -eu\ncli() { ancrel-prompt-studio \"$@\" --json; }\ndraft=$(cli draft open)\ndraft_id=$(printf '%s\\n' \"$draft\" | jq -er '.data.draft_id')\nbase=$(printf '%s\\n' \"$draft\" | jq -er '.data.base_revision')\npayload=$(printf '%s\\n' \"$draft\" | jq -c '{bundle:.data.bundle}')\ncandidate=$(cli prompt synthesize_candidate --body \"$payload\" | jq -ec '.data')\ncli draft patch \"$draft_id\" --base-revision \"$base\" --expected-draft-revision 1 --body \"$candidate\" >/dev/null\ncli draft diff \"$draft_id\" | jq -r '.data.diff'\ncode=0\nwaiting=$(cli eval run --draft-id \"$draft_id\" --ask) || code=$?\ntest \"$code\" -eq 1\nprintf '%s\\n' \"$waiting\" | jq -e '.error.code == \"WAITING_INPUT\"' >/dev/null\nquestion=$(printf '%s\\n' \"$waiting\" | jq -er '.data.intervention_id')\ntarget=$(printf '%s\\n' \"$waiting\" | jq -er '.data.target_revision')\nresult=$(cli intervention respond \"$question\" --target-revision \"$target\" --response continue --actor reviewer)\nprintf '%s\\n' \"$result\" | jq -e '.data.evaluation | .verdict == \"passed\" and .unique_case_count == 12' >/dev/null\neval_id=$(printf '%s\\n' \"$result\" | jq -er '.data.evaluation.eval_run_id')\ntask_id=$(printf '%s\\n' \"$result\" | jq -er '.receipt.task_id')\ncli task events \"$task_id\" --follow\npreview=$(cli release preview --draft-id \"$draft_id\" --eval-run-id \"$eval_id\")\npreview_id=$(printf '%s\\n' \"$preview\" | jq -er '.data.preview_id')\ncli release publish --preview-id \"$preview_id\" --actor reviewer --reason 'Reviewed twelve synthetic summaries'\n",
      "command": "sh examples/be.rsi-studio-template/walkthrough.sh",
      "entry": "examples/be.rsi-studio-template/walkthrough.sh",
      "fixture": "examples/be.rsi-studio-template/",
      "id": "walkthrough"
    }
  ],
  "id": "be.rsi-studio-template",
  "kind": "service-template",
  "language": "python",
  "layer": "backend",
  "owner": "backend-infra",
  "package": {
    "ecosystem": "pypi",
    "name": "ancrel-rsi-studio-template",
    "version": "0.3.0"
  },
  "provenance": {
    "mode": "original",
    "origin": "ancrel",
    "references": [
      {
        "commit": "cf2c47642e0bffc8fc52cf955dc34150a9cfa69e",
        "note": "Architecture reference for the revision and approval boundaries.",
        "path": "docs/PHASE1_RSI_CONTRACT.md",
        "repo": "rule-studio"
      },
      {
        "commit": "cf2c47642e0bffc8fc52cf955dc34150a9cfa69e",
        "note": "Design reference for the agent-facing command workflow.",
        "path": "skills/rule-studio-optimization/SKILL.md",
        "repo": "rule-studio"
      }
    ]
  },
  "schemaVersion": 1,
  "stability": "experimental",
  "summary": "Run a synthetic support-summary review through an HTTP agent CLI, event stream and reviewer console."
}
