{
  "checker": {
    "claims": [
      {
        "claim": "Each # heading in pi-warden.md is one rule that the rules guard judges",
        "command": "pi --no-extensions -e <guest-path> --mode rpc --no-session --offline",
        "evidence": "Rules in force: pi-warden.md (12 rules, 0 dropped)\\n1. no-console-output-in-library-code paths: src/**\\n2. todo-comments-need-a-reference paths: (all)\\n3. no-explicit-any paths: **/*.ts, **/*.tsx\\n4. exported-functions-declare-their-return-type paths: src/**/*.ts\\n5. errors-are-not-swallowed paths: (all)\\n6. switch-statements-have-a-default-case paths: (all)\\n7. no-hardcoded-secrets paths: (all)\\n8. boolean-names-read-as-a-question paths: (all)\\n9. new-exported-functions-get-a-test paths: src/**\\n10. comments-explain-why-not-what paths: (all)\\n11. no-commented-out-code paths: (all)\\n12. migrat",
        "expected": "the rules listing reports 12 rules",
        "input": "demo project with examples/pi-warden.md copied to pi-warden.md (12 headings)",
        "kind": "claim",
        "outcome": "Real input produced the expected result: Rules in force: pi-warden.md (12 rules, 0 dropped)",
        "returncode": 0,
        "source": "Each `#` heading is one rule.",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      },
      {
        "claim": "Destructive patterns are held with no key and no request",
        "command": "pi --no-extensions -e <guest-path> --mode rpc --no-session --offline",
        "evidence": "patterns: rm-recursive-dangerous-target \u00b7 confirm \u2014 destructive: recursive rm on an absolute, home, variable, or parent path (pattern checks only: TypeSafe judgments are not enabled or no key is configured)\",\"notifyType\":\"info\"}\n{\"type\":\"extension_ui_request\",\"id\":\"ad09dd56-ebd9-4d52-8d13-51b511d4eb09\",\"method\":\"notify\",\"message\":\"In steer mode a real call would be held and the agent would read: \\\"pi-warden held this bash call before it ran: destructive: recursive rm on an absolute, home, variable, or parent path. Do not retry it unchanged. Either (1) reach the goal with a recoverable alternat",
        "expected": "the offline pattern check flags rm-recursive-dangerous-target",
        "input": "/warden test with no TypeSafe key (synthetic rm -rf demo)",
        "kind": "claim",
        "outcome": "Real input produced the expected result: patterns: rm-recursive-dangerous-target",
        "returncode": 0,
        "source": "Holds destructive patterns (force push, `reset --hard`, `rm -rf` on a path outside scratch, `DROP`) with no key and no request",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      }
    ],
    "cycle_checks": [
      {
        "claim": "Scheduled or looping main behavior",
        "command": "",
        "evidence": "Entry points inspected: extensions/index.js, src/extension.ts and the README/docs. pi-warden runs per Pi event (tool calls, prompts, turn ends) and has no cron, scheduler, --once/--now, loop or webhook trigger. The only setTimeout/setInterval uses are per-call timeouts and throttles, so there is no product cycle to trigger by hand.",
        "expected": "identify the product trigger",
        "input": "source inspection",
        "kind": "cycle",
        "outcome": "Entry points inspected: extensions/index.js, src/extension.ts and the README/docs. pi-warden runs per Pi event (tool calls, prompts, turn ends) and has no cron, scheduler, --once/--now, loop or webhook trigger. The only setTimeout/setInterval uses are per-call timeouts and throttles, so there is no product cycle to trigger by hand.",
        "source": "repository entry points",
        "verdict": "yes"
      }
    ],
    "details": {
      "argv": [
        "pi",
        "--no-extensions",
        "-e",
        "<guest-path>",
        "--mode",
        "rpc",
        "--no-session",
        "--offline"
      ],
      "kind": "cli",
      "needs_browser": false,
      "needs_credentials": false,
      "returncode": 0,
      "scope": "product operation",
      "stderr": "",
      "stdout": "{\"type\":\"extension_ui_request\",\"id\":\"0fcee715-9473-407c-bc7d-9e2850954b13\",\"method\":\"setWidget\",\"widgetKey\":\"pi-warden\"}\n{\"type\":\"extension_ui_request\",\"id\":\"f63524b9-46e8-4ae5-92b7-254d8718f152\",\"method\":\"notify\",\"message\":\"Rules in force: pi-warden.md (12 rules, 0 dropped)\\n1. no-console-output-in-library-code paths: src/**\\n2. todo-comments-need-a-reference paths: (all)\\n3. no-explicit-any paths: **/*.ts, **/*.tsx\\n4. exported-functions-declare-their-return-type paths: src/**/*.ts\\n5. errors-are-not-swallowed paths: (all)\\n6. switch-statements-have-a-default-case paths: (all)\\n7. no-hardcoded-secrets paths: (all)\\n8. boolean-names-read-as-a-question paths: (all)\\n9. new-exported-functions-get-a-test paths: src/**\\n10. comments-explain-why-not-what paths: (all)\\n11. no-commented-out-code paths: (all)\\n12. migrations-are-reversible paths: **/migrations/**\",\"notifyType\":\"info\"}\n{\"id\":\"1\",\"type\":\"response\",\"command\":\"prompt\",\"success\":true}",
      "working": true
    },
    "evidence_strength": "readme_checked",
    "example_checks": [
      {
        "claim": "Copy pi-warden.md to the project root and /warden rules lists its rules",
        "command": "pi --no-extensions -e <guest-path> --mode rpc --no-session --offline",
        "deferred": false,
        "evidence": "reference paths: (all)\\n3. no-explicit-any paths: **/*.ts, **/*.tsx\\n4. exported-functions-declare-their-return-type paths: src/**/*.ts\\n5. errors-are-not-swallowed paths: (all)\\n6. switch-statements-have-a-default-case paths: (all)\\n7. no-hardcoded-secrets paths: (all)\\n8. boolean-names-read-as-a-question paths: (all)\\n9. new-exported-functions-get-a-test paths: src/**\\n10. comments-explain-why-not-what paths: (all)\\n11. no-commented-out-code paths: (all)\\n12. migrations-are-reversible paths: **/migrations/**\",\"notifyType\":\"info\"}\n{\"id\":\"1\",\"type\":\"response\",\"command\":\"prompt\",\"success\":true}",
        "expected": "12 rules listed from pi-warden.md",
        "input": "examples/pi-warden.md copied to <guest-path>, then /warden rules over RPC",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "examples/README.md",
        "verdict": "yes"
      },
      {
        "claim": "Type-check the TypeScript sources",
        "command": "npm run typecheck",
        "deferred": false,
        "evidence": "> pi-warden@2.0.0 typecheck\n> tsc --noEmit",
        "expected": "tsc exits 0",
        "input": "npm run typecheck (Development section)",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "README.md",
        "verdict": "yes"
      },
      {
        "claim": "Run the offline test suite",
        "command": "",
        "deferred": true,
        "evidence": "Deferred from the replay on purpose: full run is about 13 minutes and has timing-dependent tests that fail intermittently (1 to 24 failures across runs, each passing alone). Full result recorded in the report: 1735 of 1736 on the last run with HOME=<host-path> and make installed.",
        "expected": "offline tests pass",
        "input": "npm test (Development section)",
        "kind": "example",
        "outcome": "Deferred from the replay on purpose: full run is about 13 minutes and has timing-dependent tests that fail intermittently (1 to 24 failures across runs, each passing alone). Full result recorded in the report: 1735 of 1736 on the last run with HOME=<host-path> and make installed.",
        "source": "README.md",
        "verdict": "deferred"
      }
    ],
    "status": "PASS"
  },
  "deviations": [
    "Node was not installed in the guest (the README does not name it; package.json requires node >=22.19.0). Installed Node 22 via the NodeSource setup_22.x script, which is curl|sh with sudo, and apt. Ubuntu 24.04's default node is too old.",
    "The pi CLI was not on PATH. Installed it with sudo npm install -g @earendil-works/pi-coding-agent@0.87.0, matching the devDependency.",
    "First npm test: 24 failures. Cause is the guest, not the product: HOME was <guest-path>, which is under the temp root /tmp, so guard tests for ~/Library and $HOME/projects were treated as scratch and not held. Reran with HOME=<host-path> (passwd home): 2 failures.",
    "One failure was test 1110 (judge-input), which needs the make command. make was missing; installed it with sudo apt-get install -y make.",
    "Remaining full-suite failures vary between runs (1 to 2 per run, e.g. tests 720 and 770). Each passes when its file runs alone (extension.test.ts 299/299 on two reruns). These look like timing-dependent tests under load. The last full run was 1735 of 1736 passing. npm run check was not re-run as one command after the fixes; typecheck and build were run separately and both exited 0.",
    "pi -p (print mode) returned nothing for /warden commands. The working route was --mode rpc with JSON prompts on stdin. The README documents these commands inside the Pi TUI, not RPC, so the RPC invocation is my substitute.",
    "pi install npm:pi-warden installed the published npm package, not the pinned checkout. The probes and claims load the pinned checkout with --no-extensions -e <guest-path> The npm registry reported the latest published version as 1.14.0, while the pinned package.json says 2.0.0; I did not investigate this further.",
    "The README's /warden enable and Jev-judged features need a TypeSafe key, which I did not have, so they were not run. The inline node -e snippet in examples/README.md was not run (inline code is not a probe).",
    "No browser was used and no servers were started, so none needed stopping."
  ],
  "fault_owner": null,
  "main_blocker": null,
  "operation": "Run pi-warden (pinned commit f22c151) inside the Pi agent over RPC: /warden rules lists the rules from pi-warden.md, and /warden test runs the offline destructive-command check with no TypeSafe key.",
  "operation_scope": "Offline only. Needs Node >=22.19.0 (installed 22.23.4), the Pi CLI 0.87.0, and the checkout built with npm install and npm run build. No TypeSafe key, no browser, no Jev judgments. The Jev-judged rules guard, /warden enable, and the agent-driven commands (/warden improve, /warden audit) were not exercised.",
  "outcome": "working",
  "plain_failure": null,
  "steps": [
    "git init; git remote add origin https://github.com/DevMortimer/pi-warden; git fetch --depth 1 origin f22c15187766e8cd9bfa164625c8225f21e39e77; git reset --mixed FETCH_HEAD",
    "curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -; sudo apt-get install -y nodejs (Node v22.23.4, npm 10.9.9)",
    "npm install (README Development section)",
    "npm run typecheck (exit 0)",
    "npm run build (exit 0, writes dist/)",
    "npm test (README Development section; see deviations for the environment fixes)",
    "sudo npm install -g @earendil-works/pi-coding-agent@0.87.0 (Pi CLI, devDependency version)",
    "pi install npm:pi-warden (README Install section; installed the published npm package)",
    "pi --no-extensions -e <guest-path> --mode rpc --no-session --offline, stdin JSON prompt '/warden rules' (returns 'Rules in force: pi-warden.md (12 rules, 0 dropped)')",
    "same command with stdin prompt '/warden test' (returns 'patterns: rm-recursive-dangerous-target', held in steer mode)"
  ],
  "stuck_step": null,
  "suggested_fix": "None needed for the product. For the repo: the test suite should not depend on HOME sitting under /tmp, should document make as a prerequisite, and should fix the timing-dependent tests that fail intermittently under load."
}
