{
  "answers": {
    "c00": {
      "noul": 0.92,
      "type": "noul"
    },
    "c01": {
      "noul": 0.52,
      "type": "noul"
    },
    "c02": {
      "noul": 0.55,
      "type": "noul"
    },
    "c03": {
      "noul": 0.05,
      "type": "noul"
    },
    "c04": {
      "noul": 0.94,
      "type": "noul"
    },
    "c05": {
      "noul": 0.97,
      "type": "noul"
    },
    "c06": {
      "noul": 0.95,
      "type": "noul"
    },
    "c07": {
      "noul": 0.94,
      "type": "noul"
    },
    "c08": {
      "noul": 0.03,
      "type": "noul"
    },
    "c09": {
      "noul": 0.01,
      "type": "noul"
    },
    "c10": {
      "noul": 0.99,
      "type": "noul"
    },
    "c11": {
      "noul": 0.92,
      "type": "noul"
    },
    "c12": {
      "noul": 0.89,
      "type": "noul"
    },
    "w00": {
      "noul": 0.98,
      "type": "noul"
    },
    "w01": {
      "noul": 0.93,
      "type": "noul"
    },
    "w02": {
      "noul": 0.91,
      "type": "noul"
    },
    "w03": {
      "noul": 0.97,
      "type": "noul"
    },
    "w04": {
      "noul": 0.98,
      "type": "noul"
    },
    "w05": {
      "noul": 0.98,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T05:43:17Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.92,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.52,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.55,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.05,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.94,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.97,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.95,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.94,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.03,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.01,
      "question": "c09"
    },
    {
      "call": 10,
      "noul": 0.99,
      "question": "c10"
    },
    {
      "call": 11,
      "noul": 0.92,
      "question": "c11"
    },
    {
      "call": 12,
      "noul": 0.89,
      "question": "c12"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 16556,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "diff_base": {}
          },
          "parameter": "diff_base",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "diff_base must be a git revision, not an option",
          "tool": "scan"
        },
        "type": "noul"
      },
      "c01": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "unknown rule (none); call list_rules for the ids",
          "tool": "explain"
        },
        "type": "noul"
      },
      "c02": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "rule": {}
          },
          "parameter": "rule",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "unknown rule {}; call list_rules for the ids",
          "tool": "explain"
        },
        "type": "noul"
      },
      "c03": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "query": {}
          },
          "parameter": "query",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "",
          "tool": "list_rules"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "diff_base": {}
          },
          "parameter": "diff_base",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "diff_base must be a git revision, not an option",
          "tool": "fix"
        },
        "type": "noul"
      },
      "c05": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "files": "not an array"
          },
          "parameter": "files",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "files must be a list of strings",
          "tool": "brief"
        },
        "type": "noul"
      },
      "c06": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "base": {}
          },
          "parameter": "base",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "base must be a git revision, not an option",
          "tool": "check"
        },
        "type": "noul"
      },
      "c07": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "diff_base": {}
          },
          "parameter": "diff_base",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "diff_base must be a git revision, not an option",
          "tool": "score"
        },
        "type": "noul"
      },
      "c08": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "root": {}
          },
          "parameter": "root",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "{\n  \"root\": \"/opt/server/{}\",\n  \"total_files\": 0,\n  \"seed_files\": [],\n  \"ranked_files\": []\n}",
          "tool": "map"
        },
        "type": "noul"
      },
      "c09": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "apply_fixes": "not a boolean"
          },
          "parameter": "apply_fixes",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "<brevio_heal_packet>\n### Brevio Autonomous Self-Healing Packet\nTarget: resolve 8 finding(s) and 11 gate failure(s).\nInstructions: No automatic edit is verified for these findings: repair each one by hand. Do NOT run noisy full-repo test suites.\n\n#### Remaining Findings:\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/code_rules/details.py:185: [R5.5] Unsafe `shell=True` subprocess or interpolated `os.system` call\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/code_rules/details.py:293: [R13.1] Hardcoded secret pattern detected in added code\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/core_cli.py:871: [R5.4] `except Exception` handler that only passes drops the error; log it, narrow it or re-raise it\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/core_memory.py:52: [R2.8] Unsafe `eval` or `exec` on a non-literal detected\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/gates/agent_skill.py:145: [R5.4] `except Exception` handler that only passes drops the error; log it, narrow it or re-raise it\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/gates/agent_skill.py:169: [R5.4] `except Exception` handler that only passes drops the error; log it, narrow it or re-raise it\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/gates/core_gates.py:258: [R19.3] Conversational AI marker detected in added code: `i hope this helps`\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/gates/guard_packs.py:124: [R13.1] Secret-named variable `NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY` is sent to the browser; keep the secret server-side and expose only a public value\n\n#### Gate Failures:\n- tools/brevio-core/lib/python3.13/site-packages/brevio/operator/mcp_cmd.py:610: [R19.2] Function `handle` has cyclomatic complexity 21 (limit 20)\n- tools/brevio-core/lib/python3.13/site-packages/brevio/pipeline/core_hook.py:249: [R19.2] Function `answer` has cyclomatic complex",
          "tool": "heal"
        },
        "type": "noul"
      },
      "c10": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "patch and path must be strings",
          "tool": "verify_edit"
        },
        "type": "noul"
      },
      "c11": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "patch": {}
          },
          "parameter": "patch",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "patch and path must be strings",
          "tool": "verify_edit"
        },
        "type": "noul"
      },
      "c12": {
        "criteria": {
          "false": "The reply does not say the tool is missing: for example a generic failure, a crash, or a normal answer.",
          "true": "The reply says the tool is unknown, not found, or does not exist."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` tell the caller that there is no tool named `tool`?",
          "reply": "unknown tool: didrun_unknown_tool",
          "tool": "didrun_unknown_tool"
        },
        "type": "noul"
      },
      "w00": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Available code rules\n\nThe rule-listing tool returned the following rules:\n\n### R1 — Frontend and user experience\n- **R1.1:** Mobile GPU budget\n- **R1.2:** SSR visibility resilience\n- **R1.3:** Third-party script deferral\n- **R1.4:** Flash-free theme bootstrap\n- **R1.5:** No dead controls\n- **R1.6:** Accessible switch geometry\n- **R1.7:** LCP asset priority\n- **R1.8:** Async polling hygiene\n\n### R2 — Security and tenant isolation\n- **R2.1:** Tenant context derivation\n- **R2.2:** Tenant-scoped data access\n- **R2.3:** Dual-key entity resolution\n- **R2.4:** Raw-body webhook verification\n- **R2.5:** Outbound SSRF and timeout guard\n- **R2.6:** Constant-time secret comparison\n- **R2.7:** Secure cookie and CORS hygiene\n- **R2.8:** No unsafe code or HTML sinks\n\n### R3 — Payments and external operations\n- **R3.1:** Idempotent webhook processing\n- **R3.2:** Monetary integer representation\n- **R3.3:** Gateway ID discrimination\n- **R3.4:** Pre-execution quota enforcement\n- **R3.5:** Transactional outbox\n\n### R4 — Database and migrations\n- **R4.1:** Expand-contract migrations\n- **R4.2:** Foreign-key and tenant composite indexing\n- **R4.3:** N+1 query prevention\n- **R4.4:** Ingestion FK pre-resolution\n- **R4.5:** Bounded pagination\n\n### R5 — Reliability and process safety\n- **R5.1:** Deterministic graceful fallbacks\n- **R5.2:** HTTP empty-body hygiene\n- **R5.3:** Bounded retry with jitter\n- **R5.4:** No silent exception swallowing\n- **R5.5:** Process safety\n\n### R6 — Testing\n- **R6.1:** Real production import gate\n- **R6.2:** Mutation side-effect assertions\n- **R6.3:** No fixed-length `waitForTimeout` in tests\n- **R6.4:** Hermetic test state isolation\n- **R6.5:** Post-incident regression crystallization\n\n### R7 — Contracts and architecture\n- **R7.1:** Contract-first monorepo changes\n- **R7.2:** Granular field validation\n- **R7.3:** Single canonical route per path\n- **R7.4:** Acyclic module layering\n- **R7.5:** Universal contracts purity\n\n### R8 — Content and analytics\n- **R8.1:",
          "done_when": "The transcript shows a nonempty rule list and the explanation of one listed rule, including bad and good examples.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "R1.1: Mobile GPU budget: scope blur >=40px to md:/lg: desktop viewports\nR1.2: SSR visibility resilience: leave no [data-reveal] at opacity:0 without a CSS animation fallback\nR1.3: Third-party script deferral: load GTM/GA4 with lazyOnload after hydration\nR1.4: Flash-free theme bootstrap: paired semantic tokens across light and dark modes\nR1.5: No dead controls: an interactive element wires a handler and loading and error feedback\nR1.6: Accessible switch geometry: inline-flex items-center shrink-0 on toggle tracks\nR1.7: LCP asset priority: priority/fetchpriority=high on hero LCP image, lazy below fold\nR1.8: Async polling hygiene: clear intervals on unmount and stop polling on terminal states\nR2.1: Tenant context derivation: derive tenant context from the verified session, not the client payload\nR2.2: Tenant-scoped data access: a DB read or write filters by the authenticated workspace scope\nR2.3: Dual-key entity resolution: discriminate UUID/CUID vs domain/slug before database query\nR2.4: Raw-body webhook verification: verify HMAC against raw request text before JSON parse\nR2.5: Outbound SSRF & timeout guard: validate URL host and set AbortSignal.timeout()\nR2.6: Constant-time secret comparison: use timingSafeEqual / compare_digest\nR2.7: Secure cookie & CORS hygiene: HttpOnly, Secure, SameSite, no wildcard CORS with credentials\nR2.8: No unsafe code or HTML sinks: eval or exec on a non-literal, new Function, unsanitised dangerouslySetInnerHTML, interpolated SQL strings and hidden control characters\nR3.1: Idempotent webhook processing: deduplicate event_id with monotonic state transitions\nR3.2: Monetary integer representation: store money as integer minor units (cents) + currency\nR3.3: Gateway ID discrimination: validate customer/subscription/checkout prefix before API call\nR3.4: Pre-execution quota enforcement: verify tier entitlement before paid LLM/API calls\nR3.5: Transactional outbox: persist DB state before enqueuing external side effects\nR4.1: Expand-contract migrations: additive nullable/default columns; no single-step drop/rename\nR4.2: Foreign-key & tenant composite indexing: index FKs and (tenant_id, created_at)\nR4.3: N+1 query prevention: batch queries with IN / joins instead of per-row loop queries\nR4.4: Ingestion FK pre-resolution: upsert or verify parent workspace before child rows\nR4.5: Bounded pagination: enforce a hard LIMIT (<=100) on list queries\nR5.1: Deterministic graceful fallbacks: return an explicit degraded status, not fabricated metrics\nR5.2: HTTP empty-body hygiene: 204 returns empty body; 200 JSON sets Content-Type\nR5.3: Bounded retry with jitter: retry only transient 429/502/503/504 with backoff + jitter\nR5.4: No silent exception swallowing: log or surface errors; empty catch blocks, bare except and except Exception: pass are flagged\nR5.5: Process safety: no subprocess call with shell=True and no os.system call built from an f-string\nR6.1: Real production import gate: tests must import and invoke real production code\nR6.2: Mutation side-effect assertions: assert persisted state or DOM changes, not just HTTP 200\nR6.3: No fixed-length waitForTimeout in tests: wait for a condition instead\nR6.4: Hermetic test state isolation: isolate DB/state paths per test in setUp/addCleanup\nR6.5: Post-incident regression crystallization: a bug fix comes with a failing-first test\nR7.1: Contract-first monorepo changes: update shared Zod/OpenAPI schema before consumers\nR7.2: Granular field validation: return field-level errors and preserve user form inputs\nR7.3: Single canonical route per path: no duplicate route group paths\nR7.4: Acyclic module layering: domain -> application -> adapters; no circular imports\nR7.5: Universal contracts purity: contracts barrels must not import Node built-ins (node:fs, node:path)\nR8.1: Anti-cloaking & markdown parity: serve identical facts to crawlers and browsers\nR8.2: Honest telemetry attribution: label synthetic or demo data and keep it apart from live metrics\nR8.3: Consent Mode v2 ordering: initialize default denied consent before analytics tags\nR9.1: No untyped escape hatches: no `as any` casts or `z.any()` schemas in production source\nR9.2: No silenced type errors: @ts-ignore is flagged; use @ts-expect-error and say why\nR9.3: Package-name imports: import workspace packages by name, not via ../../packages/ paths\nR10.1: Explicit HTTP request timeouts: Python requests calls pass timeout=\nR10.2: Idempotency key transmission: mutating external POST/PUT requests send Idempotency-Key\nR10.3: Rate-limit header handling: parse 429 Retry-After and respect backoff deadlines\nR10.4: Structured error envelope: error responses adhere to standard JSON error schema\nR10.5: Response size bounding: clamp response body reads to avoid unbounded buffer allocation\nR10.6: Content-Type negotiation: validate incoming request Accept / Content-Type headers\nR10.7: No unauthenticated admin endpoints: route middleware protects management routes\nR10.8: Strict HTTP verb mapping: GET requests are read-only and free of side effects\nR10.9: Timeouts on fetch and axios: a call with no options argument sets no timeout and no AbortSignal\nR11.1: Atomic read-modify-write: concurrent mutations use compare-and-swap or row locks\nR11.2: No dangling unawaited promises: promise chains either return or await explicitly\nR11.3: Race condition prevention: UI mutations abort pending conflicting requests via AbortController\nR11.4: Deterministic reducer purity: state reducers remain pure functions without side effects\nR11.5: Cache key stability: cache keys use sorted/normalized parameters to avoid fragmentation\nR11.6: Optimistic UI rollback: optimistic state updates retain rollback snapshot on failure\nR11.7: Bounded in-memory queues: memory queues specify max length and overflow policy\nR11.8: Thread-safe singleton initialization: singletons use atomic locks or double-checked init\nR12.1: Event listener teardown: addEventListener in useEffect/components pairs with removeEventListener\nR12.2: Timer lifecycle cleanup: setTimeout and setInterval handle IDs cleaned on component unmount\nR12.3: Stream disposal hygiene: open readable/writable streams explicitly call close() or pipe safely\nR12.4: WebSocket cleanup: client socket connections explicitly disconnect on navigation/unmount\nR12.5: Database connection pool hygiene: acquired pool clients release in finally blocks\nR12.6: Worker thread termination: spawn worker instances call terminate() upon task completion\nR12.7: Temp file deterministic deletion: scratch files in /tmp register unlink in finalizer\nR12.8: No unbounded collection growth: caches and registries specify TTL or LRU eviction\nR13.1: No hardcoded secrets: credentials stay out of source code and out of browser bundles\nR13.2: Structured JSON logging: application logs emit valid JSON key-value pairs with timestamps\nR13.3: Trace context propagation: distributed calls forward traceparent / correlation IDs\nR13.4: Metric label cardinality bounding: avoid dynamic user IDs or timestamps in metric labels\nR13.5: Standard log severity: use debug/info/warn/error appropriately without log spam\nR13.6: Audit event journaling: security-critical actions append an immutable audit record\nR13.7: Health check hermeticity: /healthz endpoints execute lightweight non-allocating probes\nR13.8: Exception traceback containment: sanitize public error responses to avoid leaking paths\nR14.1: Session token entropy: session identifiers contain at least 128 bits of cryptosecure random\nR14.2: Password hash modern algorithms: use Argon2id or bcrypt with appropriate work factor\nR14.3: Token expiration bounding: short-lived access tokens paired with rotating refresh tokens\nR14.4: CSRF token validation: state-changing forms and endpoints validate anti-CSRF token\nR14.5: No credentials in URLs: pass tokens, API keys and passwords outside query strings\nR14.6: Strict redirect URL allowlist: OAuth / login return URLs validated against domain allowlist\nR14.7: Brute-force throttle: login and reset-password r",
              "tool": "list_rules"
            },
            {
              "arguments": {
                "rule": "R9.2"
              },
              "reply": "# R9.2: No silenced type errors\n\n**Short answer:** @ts-ignore is flagged; use @ts-expect-error and say why. A silenced error hides a real bug, and nobody remembers why.\n\nGroup: Type safety. Status: stable. Generated from the rule definitions; do not edit by hand.\n\n## What it catches\n\nNo silenced type errors: @ts-ignore is flagged; use @ts-expect-error and say why.\n\n## Why\n\nA silenced error hides a real bug, and nobody remembers why.\n\n## A bad example\n\n```ts\n// @ts-ignore\nconst a = b.c;\n```\n\n## A good example\n\n```ts\n// @ts-expect-error -- the library types omit this field\nconst a = b.c;\n```\n\n## How it is checked\n\n- What it reads: JavaScript and TypeScript: @ts-ignore. The reason after @ts-expect-error is not checked.\n- `brevio-core scan` checks the lines you add for it.\n- `brevio-core brief` and the `brief` tool of `brevio-core mcp` print a one-line reminder of it for a file that matches.\n\n## Measured precision\n\n100% of 20 judged hits were real, on human-written code, one reviewer (corpus ts-react-oss, run on 2026-11-06). That is not how often the rule is right on code an agent wrote. See `docs/precision.md` in the brevio-core repository for the verdicts, the commands to run it again and how to dispute one.\n\n## How to silence it\n\nA person can silence one finding with `brevio-core: ignore R9.2 -- reason` on the line or the line above. Without the reason it does not count. An agent cannot silence it: the agent hook and the MCP tools never honour the comment, and a pull request that adds one is reported until a reviewer allows it. Fixing the code is still the better answer.\n\nA scan reads only the lines you add, so a line that was already in the file is not flagged.\n\nTo change what the rule flags, edit its check in the rule code of the package. That is a code change and is reviewed like one.\n\n## Related rules\n\n- [R9.3](R9.3.md) Package-name imports\n- [R9.1](R9.1.md) No untyped escape hatches\n- [Every rule](README.md)\n",
              "tool": "explain"
            },
            {
              "arguments": {
                "query": "R14"
              },
              "reply": "R14.1: Session token entropy: session identifiers contain at least 128 bits of cryptosecure random\nR14.2: Password hash modern algorithms: use Argon2id or bcrypt with appropriate work factor\nR14.3: Token expiration bounding: short-lived access tokens paired with rotating refresh tokens\nR14.4: CSRF token validation: state-changing forms and endpoints validate anti-CSRF token\nR14.5: No credentials in URLs: pass tokens, API keys and passwords outside query strings\nR14.6: Strict redirect URL allowlist: OAuth / login return URLs validated against domain allowlist\nR14.7: Brute-force throttle: login and reset-password routes rate-limited by IP and username\nR14.8: Role-based access control: enforce authorization check at controller/handler boundary",
              "tool": "list_rules"
            }
          ],
          "task": "List the available code rules, then explain one of the rule IDs returned, including its bad and good examples."
        },
        "type": "noul"
      },
      "w01": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Available code rules\n\nThe rule-list tool returned the following entries. Its response was **cut off during R14.7**, so the list below includes all complete entries it returned, but may not include every available rule.\n\n### UI and frontend\n- **R1.1** Mobile GPU budget\n- **R1.2** SSR visibility resilience\n- **R1.3** Third-party script deferral\n- **R1.4** Flash-free theme bootstrap\n- **R1.5** No dead controls\n- **R1.6** Accessible switch geometry\n- **R1.7** LCP asset priority\n- **R1.8** Async polling hygiene\n\n### Security and tenant isolation\n- **R2.1** Tenant context derivation\n- **R2.2** Tenant-scoped data access\n- **R2.3** Dual-key entity resolution\n- **R2.4** Raw-body webhook verification\n- **R2.5** Outbound SSRF and timeout guard\n- **R2.6** Constant-time secret comparison\n- **R2.7** Secure cookie and CORS hygiene\n- **R2.8** No unsafe code or HTML sinks\n\n### Payments and external side effects\n- **R3.1** Idempotent webhook processing\n- **R3.2** Monetary integer representation\n- **R3.3** Gateway ID discrimination\n- **R3.4** Pre-execution quota enforcement\n- **R3.5** Transactional outbox\n\n### Database\n- **R4.1** Expand-contract migrations\n- **R4.2** Foreign-key and tenant composite indexing\n- **R4.3** N+1 query prevention\n- **R4.4** Ingestion FK pre-resolution\n- **R4.5** Bounded pagination\n\n### Reliability and process safety\n- **R5.1** Deterministic graceful fallbacks\n- **R5.2** HTTP empty-body hygiene\n- **R5.3** Bounded retry with jitter\n- **R5.4** No silent exception swallowing\n- **R5.5** Process safety\n\n### Tests\n- **R6.1** Real production import gate\n- **R6.2** Mutation side-effect assertions\n- **R6.3** No fixed-length `waitForTimeout` in tests\n- **R6.4** Hermetic test state isolation\n- **R6.5** Post-incident regression crystallization\n\n### Architecture and contracts\n- **R7.1** Contract-first monorepo changes\n- **R7.2** Granular field validation\n- **R7.3** Single canonical route per path\n- **R7.4** Acyclic module layering\n- **R7.5** Universal contracts purity\n",
          "done_when": "The transcript shows a nonempty rule list and the explanation of one listed rule, including bad and good examples.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "R1.1: Mobile GPU budget: scope blur >=40px to md:/lg: desktop viewports\nR1.2: SSR visibility resilience: leave no [data-reveal] at opacity:0 without a CSS animation fallback\nR1.3: Third-party script deferral: load GTM/GA4 with lazyOnload after hydration\nR1.4: Flash-free theme bootstrap: paired semantic tokens across light and dark modes\nR1.5: No dead controls: an interactive element wires a handler and loading and error feedback\nR1.6: Accessible switch geometry: inline-flex items-center shrink-0 on toggle tracks\nR1.7: LCP asset priority: priority/fetchpriority=high on hero LCP image, lazy below fold\nR1.8: Async polling hygiene: clear intervals on unmount and stop polling on terminal states\nR2.1: Tenant context derivation: derive tenant context from the verified session, not the client payload\nR2.2: Tenant-scoped data access: a DB read or write filters by the authenticated workspace scope\nR2.3: Dual-key entity resolution: discriminate UUID/CUID vs domain/slug before database query\nR2.4: Raw-body webhook verification: verify HMAC against raw request text before JSON parse\nR2.5: Outbound SSRF & timeout guard: validate URL host and set AbortSignal.timeout()\nR2.6: Constant-time secret comparison: use timingSafeEqual / compare_digest\nR2.7: Secure cookie & CORS hygiene: HttpOnly, Secure, SameSite, no wildcard CORS with credentials\nR2.8: No unsafe code or HTML sinks: eval or exec on a non-literal, new Function, unsanitised dangerouslySetInnerHTML, interpolated SQL strings and hidden control characters\nR3.1: Idempotent webhook processing: deduplicate event_id with monotonic state transitions\nR3.2: Monetary integer representation: store money as integer minor units (cents) + currency\nR3.3: Gateway ID discrimination: validate customer/subscription/checkout prefix before API call\nR3.4: Pre-execution quota enforcement: verify tier entitlement before paid LLM/API calls\nR3.5: Transactional outbox: persist DB state before enqueuing external side effects\nR4.1: Expand-contract migrations: additive nullable/default columns; no single-step drop/rename\nR4.2: Foreign-key & tenant composite indexing: index FKs and (tenant_id, created_at)\nR4.3: N+1 query prevention: batch queries with IN / joins instead of per-row loop queries\nR4.4: Ingestion FK pre-resolution: upsert or verify parent workspace before child rows\nR4.5: Bounded pagination: enforce a hard LIMIT (<=100) on list queries\nR5.1: Deterministic graceful fallbacks: return an explicit degraded status, not fabricated metrics\nR5.2: HTTP empty-body hygiene: 204 returns empty body; 200 JSON sets Content-Type\nR5.3: Bounded retry with jitter: retry only transient 429/502/503/504 with backoff + jitter\nR5.4: No silent exception swallowing: log or surface errors; empty catch blocks, bare except and except Exception: pass are flagged\nR5.5: Process safety: no subprocess call with shell=True and no os.system call built from an f-string\nR6.1: Real production import gate: tests must import and invoke real production code\nR6.2: Mutation side-effect assertions: assert persisted state or DOM changes, not just HTTP 200\nR6.3: No fixed-length waitForTimeout in tests: wait for a condition instead\nR6.4: Hermetic test state isolation: isolate DB/state paths per test in setUp/addCleanup\nR6.5: Post-incident regression crystallization: a bug fix comes with a failing-first test\nR7.1: Contract-first monorepo changes: update shared Zod/OpenAPI schema before consumers\nR7.2: Granular field validation: return field-level errors and preserve user form inputs\nR7.3: Single canonical route per path: no duplicate route group paths\nR7.4: Acyclic module layering: domain -> application -> adapters; no circular imports\nR7.5: Universal contracts purity: contracts barrels must not import Node built-ins (node:fs, node:path)\nR8.1: Anti-cloaking & markdown parity: serve identical facts to crawlers and browsers\nR8.2: Honest telemetry attribution: label synthetic or demo data and keep it apart from live metrics\nR8.3: Consent Mode v2 ordering: initialize default denied consent before analytics tags\nR9.1: No untyped escape hatches: no `as any` casts or `z.any()` schemas in production source\nR9.2: No silenced type errors: @ts-ignore is flagged; use @ts-expect-error and say why\nR9.3: Package-name imports: import workspace packages by name, not via ../../packages/ paths\nR10.1: Explicit HTTP request timeouts: Python requests calls pass timeout=\nR10.2: Idempotency key transmission: mutating external POST/PUT requests send Idempotency-Key\nR10.3: Rate-limit header handling: parse 429 Retry-After and respect backoff deadlines\nR10.4: Structured error envelope: error responses adhere to standard JSON error schema\nR10.5: Response size bounding: clamp response body reads to avoid unbounded buffer allocation\nR10.6: Content-Type negotiation: validate incoming request Accept / Content-Type headers\nR10.7: No unauthenticated admin endpoints: route middleware protects management routes\nR10.8: Strict HTTP verb mapping: GET requests are read-only and free of side effects\nR10.9: Timeouts on fetch and axios: a call with no options argument sets no timeout and no AbortSignal\nR11.1: Atomic read-modify-write: concurrent mutations use compare-and-swap or row locks\nR11.2: No dangling unawaited promises: promise chains either return or await explicitly\nR11.3: Race condition prevention: UI mutations abort pending conflicting requests via AbortController\nR11.4: Deterministic reducer purity: state reducers remain pure functions without side effects\nR11.5: Cache key stability: cache keys use sorted/normalized parameters to avoid fragmentation\nR11.6: Optimistic UI rollback: optimistic state updates retain rollback snapshot on failure\nR11.7: Bounded in-memory queues: memory queues specify max length and overflow policy\nR11.8: Thread-safe singleton initialization: singletons use atomic locks or double-checked init\nR12.1: Event listener teardown: addEventListener in useEffect/components pairs with removeEventListener\nR12.2: Timer lifecycle cleanup: setTimeout and setInterval handle IDs cleaned on component unmount\nR12.3: Stream disposal hygiene: open readable/writable streams explicitly call close() or pipe safely\nR12.4: WebSocket cleanup: client socket connections explicitly disconnect on navigation/unmount\nR12.5: Database connection pool hygiene: acquired pool clients release in finally blocks\nR12.6: Worker thread termination: spawn worker instances call terminate() upon task completion\nR12.7: Temp file deterministic deletion: scratch files in /tmp register unlink in finalizer\nR12.8: No unbounded collection growth: caches and registries specify TTL or LRU eviction\nR13.1: No hardcoded secrets: credentials stay out of source code and out of browser bundles\nR13.2: Structured JSON logging: application logs emit valid JSON key-value pairs with timestamps\nR13.3: Trace context propagation: distributed calls forward traceparent / correlation IDs\nR13.4: Metric label cardinality bounding: avoid dynamic user IDs or timestamps in metric labels\nR13.5: Standard log severity: use debug/info/warn/error appropriately without log spam\nR13.6: Audit event journaling: security-critical actions append an immutable audit record\nR13.7: Health check hermeticity: /healthz endpoints execute lightweight non-allocating probes\nR13.8: Exception traceback containment: sanitize public error responses to avoid leaking paths\nR14.1: Session token entropy: session identifiers contain at least 128 bits of cryptosecure random\nR14.2: Password hash modern algorithms: use Argon2id or bcrypt with appropriate work factor\nR14.3: Token expiration bounding: short-lived access tokens paired with rotating refresh tokens\nR14.4: CSRF token validation: state-changing forms and endpoints validate anti-CSRF token\nR14.5: No credentials in URLs: pass tokens, API keys and passwords outside query strings\nR14.6: Strict redirect URL allowlist: OAuth / login return URLs validated against domain allowlist\nR14.7: Brute-force throttle: login and reset-password r",
              "tool": "list_rules"
            },
            {
              "arguments": {
                "rule": "R9.2"
              },
              "reply": "# R9.2: No silenced type errors\n\n**Short answer:** @ts-ignore is flagged; use @ts-expect-error and say why. A silenced error hides a real bug, and nobody remembers why.\n\nGroup: Type safety. Status: stable. Generated from the rule definitions; do not edit by hand.\n\n## What it catches\n\nNo silenced type errors: @ts-ignore is flagged; use @ts-expect-error and say why.\n\n## Why\n\nA silenced error hides a real bug, and nobody remembers why.\n\n## A bad example\n\n```ts\n// @ts-ignore\nconst a = b.c;\n```\n\n## A good example\n\n```ts\n// @ts-expect-error -- the library types omit this field\nconst a = b.c;\n```\n\n## How it is checked\n\n- What it reads: JavaScript and TypeScript: @ts-ignore. The reason after @ts-expect-error is not checked.\n- `brevio-core scan` checks the lines you add for it.\n- `brevio-core brief` and the `brief` tool of `brevio-core mcp` print a one-line reminder of it for a file that matches.\n\n## Measured precision\n\n100% of 20 judged hits were real, on human-written code, one reviewer (corpus ts-react-oss, run on 2026-11-06). That is not how often the rule is right on code an agent wrote. See `docs/precision.md` in the brevio-core repository for the verdicts, the commands to run it again and how to dispute one.\n\n## How to silence it\n\nA person can silence one finding with `brevio-core: ignore R9.2 -- reason` on the line or the line above. Without the reason it does not count. An agent cannot silence it: the agent hook and the MCP tools never honour the comment, and a pull request that adds one is reported until a reviewer allows it. Fixing the code is still the better answer.\n\nA scan reads only the lines you add, so a line that was already in the file is not flagged.\n\nTo change what the rule flags, edit its check in the rule code of the package. That is a code change and is reviewed like one.\n\n## Related rules\n\n- [R9.3](R9.3.md) Package-name imports\n- [R9.1](R9.1.md) No untyped escape hatches\n- [Every rule](README.md)\n",
              "tool": "explain"
            }
          ],
          "task": "List the available code rules, then explain one of the rule IDs returned, including its bad and good examples."
        },
        "type": "noul"
      },
      "w02": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Available code rules\n\nThe rule-listing tool returned the following rules. **Its response was truncated at R14.7**, so the list may be incomplete.\n\n- **R1 — Frontend and performance:** R1.1 Mobile GPU budget; R1.2 SSR visibility resilience; R1.3 Third-party script deferral; R1.4 Flash-free theme bootstrap; R1.5 No dead controls; R1.6 Accessible switch geometry; R1.7 LCP asset priority; R1.8 Async polling hygiene.\n- **R2 — Security and tenant isolation:** R2.1 Tenant context derivation; R2.2 Tenant-scoped data access; R2.3 Dual-key entity resolution; R2.4 Raw-body webhook verification; R2.5 Outbound SSRF and timeout guard; R2.6 Constant-time secret comparison; R2.7 Secure cookie and CORS hygiene; R2.8 No unsafe code or HTML sinks.\n- **R3 — Business operations:** R3.1 Idempotent webhook processing; R3.2 Monetary integer representation; R3.3 Gateway ID discrimination; R3.4 Pre-execution quota enforcement; R3.5 Transactional outbox.\n- **R4 — Database:** R4.1 Expand-contract migrations; R4.2 Foreign-key and tenant composite indexing; R4.3 N+1 query prevention; R4.4 Ingestion FK pre-resolution; R4.5 Bounded pagination.\n- **R5 — Reliability:** R5.1 Deterministic graceful fallbacks; R5.2 HTTP empty-body hygiene; R5.3 Bounded retry with jitter; R5.4 No silent exception swallowing; R5.5 Process safety.\n- **R6 — Testing:** R6.1 Real production import gate; R6.2 Mutation side-effect assertions; R6.3 No fixed-length `waitForTimeout` in tests; R6.4 Hermetic test state isolation; R6.5 Post-incident regression crystallization.\n- **R7 — Architecture and contracts:** R7.1 Contract-first monorepo changes; R7.2 Granular field validation; R7.3 Single canonical route per path; R7.4 Acyclic module layering; R7.5 Universal contracts purity.\n- **R8 — Content and telemetry:** R8.1 Anti-cloaking and markdown parity; R8.2 Honest telemetry attribution; R8.3 Consent Mode v2 ordering.\n- **R9 — Type safety and imports:** R9.1 No untyped escape hatches; R9.2 No silenced type errors; R9.3 Package-",
          "done_when": "The transcript shows a nonempty rule list and the explanation of one listed rule, including bad and good examples.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "R1.1: Mobile GPU budget: scope blur >=40px to md:/lg: desktop viewports\nR1.2: SSR visibility resilience: leave no [data-reveal] at opacity:0 without a CSS animation fallback\nR1.3: Third-party script deferral: load GTM/GA4 with lazyOnload after hydration\nR1.4: Flash-free theme bootstrap: paired semantic tokens across light and dark modes\nR1.5: No dead controls: an interactive element wires a handler and loading and error feedback\nR1.6: Accessible switch geometry: inline-flex items-center shrink-0 on toggle tracks\nR1.7: LCP asset priority: priority/fetchpriority=high on hero LCP image, lazy below fold\nR1.8: Async polling hygiene: clear intervals on unmount and stop polling on terminal states\nR2.1: Tenant context derivation: derive tenant context from the verified session, not the client payload\nR2.2: Tenant-scoped data access: a DB read or write filters by the authenticated workspace scope\nR2.3: Dual-key entity resolution: discriminate UUID/CUID vs domain/slug before database query\nR2.4: Raw-body webhook verification: verify HMAC against raw request text before JSON parse\nR2.5: Outbound SSRF & timeout guard: validate URL host and set AbortSignal.timeout()\nR2.6: Constant-time secret comparison: use timingSafeEqual / compare_digest\nR2.7: Secure cookie & CORS hygiene: HttpOnly, Secure, SameSite, no wildcard CORS with credentials\nR2.8: No unsafe code or HTML sinks: eval or exec on a non-literal, new Function, unsanitised dangerouslySetInnerHTML, interpolated SQL strings and hidden control characters\nR3.1: Idempotent webhook processing: deduplicate event_id with monotonic state transitions\nR3.2: Monetary integer representation: store money as integer minor units (cents) + currency\nR3.3: Gateway ID discrimination: validate customer/subscription/checkout prefix before API call\nR3.4: Pre-execution quota enforcement: verify tier entitlement before paid LLM/API calls\nR3.5: Transactional outbox: persist DB state before enqueuing external side effects\nR4.1: Expand-contract migrations: additive nullable/default columns; no single-step drop/rename\nR4.2: Foreign-key & tenant composite indexing: index FKs and (tenant_id, created_at)\nR4.3: N+1 query prevention: batch queries with IN / joins instead of per-row loop queries\nR4.4: Ingestion FK pre-resolution: upsert or verify parent workspace before child rows\nR4.5: Bounded pagination: enforce a hard LIMIT (<=100) on list queries\nR5.1: Deterministic graceful fallbacks: return an explicit degraded status, not fabricated metrics\nR5.2: HTTP empty-body hygiene: 204 returns empty body; 200 JSON sets Content-Type\nR5.3: Bounded retry with jitter: retry only transient 429/502/503/504 with backoff + jitter\nR5.4: No silent exception swallowing: log or surface errors; empty catch blocks, bare except and except Exception: pass are flagged\nR5.5: Process safety: no subprocess call with shell=True and no os.system call built from an f-string\nR6.1: Real production import gate: tests must import and invoke real production code\nR6.2: Mutation side-effect assertions: assert persisted state or DOM changes, not just HTTP 200\nR6.3: No fixed-length waitForTimeout in tests: wait for a condition instead\nR6.4: Hermetic test state isolation: isolate DB/state paths per test in setUp/addCleanup\nR6.5: Post-incident regression crystallization: a bug fix comes with a failing-first test\nR7.1: Contract-first monorepo changes: update shared Zod/OpenAPI schema before consumers\nR7.2: Granular field validation: return field-level errors and preserve user form inputs\nR7.3: Single canonical route per path: no duplicate route group paths\nR7.4: Acyclic module layering: domain -> application -> adapters; no circular imports\nR7.5: Universal contracts purity: contracts barrels must not import Node built-ins (node:fs, node:path)\nR8.1: Anti-cloaking & markdown parity: serve identical facts to crawlers and browsers\nR8.2: Honest telemetry attribution: label synthetic or demo data and keep it apart from live metrics\nR8.3: Consent Mode v2 ordering: initialize default denied consent before analytics tags\nR9.1: No untyped escape hatches: no `as any` casts or `z.any()` schemas in production source\nR9.2: No silenced type errors: @ts-ignore is flagged; use @ts-expect-error and say why\nR9.3: Package-name imports: import workspace packages by name, not via ../../packages/ paths\nR10.1: Explicit HTTP request timeouts: Python requests calls pass timeout=\nR10.2: Idempotency key transmission: mutating external POST/PUT requests send Idempotency-Key\nR10.3: Rate-limit header handling: parse 429 Retry-After and respect backoff deadlines\nR10.4: Structured error envelope: error responses adhere to standard JSON error schema\nR10.5: Response size bounding: clamp response body reads to avoid unbounded buffer allocation\nR10.6: Content-Type negotiation: validate incoming request Accept / Content-Type headers\nR10.7: No unauthenticated admin endpoints: route middleware protects management routes\nR10.8: Strict HTTP verb mapping: GET requests are read-only and free of side effects\nR10.9: Timeouts on fetch and axios: a call with no options argument sets no timeout and no AbortSignal\nR11.1: Atomic read-modify-write: concurrent mutations use compare-and-swap or row locks\nR11.2: No dangling unawaited promises: promise chains either return or await explicitly\nR11.3: Race condition prevention: UI mutations abort pending conflicting requests via AbortController\nR11.4: Deterministic reducer purity: state reducers remain pure functions without side effects\nR11.5: Cache key stability: cache keys use sorted/normalized parameters to avoid fragmentation\nR11.6: Optimistic UI rollback: optimistic state updates retain rollback snapshot on failure\nR11.7: Bounded in-memory queues: memory queues specify max length and overflow policy\nR11.8: Thread-safe singleton initialization: singletons use atomic locks or double-checked init\nR12.1: Event listener teardown: addEventListener in useEffect/components pairs with removeEventListener\nR12.2: Timer lifecycle cleanup: setTimeout and setInterval handle IDs cleaned on component unmount\nR12.3: Stream disposal hygiene: open readable/writable streams explicitly call close() or pipe safely\nR12.4: WebSocket cleanup: client socket connections explicitly disconnect on navigation/unmount\nR12.5: Database connection pool hygiene: acquired pool clients release in finally blocks\nR12.6: Worker thread termination: spawn worker instances call terminate() upon task completion\nR12.7: Temp file deterministic deletion: scratch files in /tmp register unlink in finalizer\nR12.8: No unbounded collection growth: caches and registries specify TTL or LRU eviction\nR13.1: No hardcoded secrets: credentials stay out of source code and out of browser bundles\nR13.2: Structured JSON logging: application logs emit valid JSON key-value pairs with timestamps\nR13.3: Trace context propagation: distributed calls forward traceparent / correlation IDs\nR13.4: Metric label cardinality bounding: avoid dynamic user IDs or timestamps in metric labels\nR13.5: Standard log severity: use debug/info/warn/error appropriately without log spam\nR13.6: Audit event journaling: security-critical actions append an immutable audit record\nR13.7: Health check hermeticity: /healthz endpoints execute lightweight non-allocating probes\nR13.8: Exception traceback containment: sanitize public error responses to avoid leaking paths\nR14.1: Session token entropy: session identifiers contain at least 128 bits of cryptosecure random\nR14.2: Password hash modern algorithms: use Argon2id or bcrypt with appropriate work factor\nR14.3: Token expiration bounding: short-lived access tokens paired with rotating refresh tokens\nR14.4: CSRF token validation: state-changing forms and endpoints validate anti-CSRF token\nR14.5: No credentials in URLs: pass tokens, API keys and passwords outside query strings\nR14.6: Strict redirect URL allowlist: OAuth / login return URLs validated against domain allowlist\nR14.7: Brute-force throttle: login and reset-password r",
              "tool": "list_rules"
            },
            {
              "arguments": {
                "rule": "R9.2"
              },
              "reply": "# R9.2: No silenced type errors\n\n**Short answer:** @ts-ignore is flagged; use @ts-expect-error and say why. A silenced error hides a real bug, and nobody remembers why.\n\nGroup: Type safety. Status: stable. Generated from the rule definitions; do not edit by hand.\n\n## What it catches\n\nNo silenced type errors: @ts-ignore is flagged; use @ts-expect-error and say why.\n\n## Why\n\nA silenced error hides a real bug, and nobody remembers why.\n\n## A bad example\n\n```ts\n// @ts-ignore\nconst a = b.c;\n```\n\n## A good example\n\n```ts\n// @ts-expect-error -- the library types omit this field\nconst a = b.c;\n```\n\n## How it is checked\n\n- What it reads: JavaScript and TypeScript: @ts-ignore. The reason after @ts-expect-error is not checked.\n- `brevio-core scan` checks the lines you add for it.\n- `brevio-core brief` and the `brief` tool of `brevio-core mcp` print a one-line reminder of it for a file that matches.\n\n## Measured precision\n\n100% of 20 judged hits were real, on human-written code, one reviewer (corpus ts-react-oss, run on 2026-11-06). That is not how often the rule is right on code an agent wrote. See `docs/precision.md` in the brevio-core repository for the verdicts, the commands to run it again and how to dispute one.\n\n## How to silence it\n\nA person can silence one finding with `brevio-core: ignore R9.2 -- reason` on the line or the line above. Without the reason it does not count. An agent cannot silence it: the agent hook and the MCP tools never honour the comment, and a pull request that adds one is reported until a reviewer allows it. Fixing the code is still the better answer.\n\nA scan reads only the lines you add, so a line that was already in the file is not flagged.\n\nTo change what the rule flags, edit its check in the rule code of the package. That is a code change and is reviewed like one.\n\n## Related rules\n\n- [R9.3](R9.3.md) Package-name imports\n- [R9.1](R9.1.md) No untyped escape hatches\n- [Every rule](README.md)\n",
              "tool": "explain"
            }
          ],
          "task": "List the available code rules, then explain one of the rule IDs returned, including its bad and good examples."
        },
        "type": "noul"
      },
      "w03": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "**Not allowed.** The check refused the edit because `.brevio/guards.json` is a protected file that controls what the gate or an agent does; a person must change it. No files were written.",
          "done_when": "The verify_edit reply refuses the proposed edit because it touches the protected guards file.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "patch": "diff --git a/.brevio/guards.json b/.brevio/guards.json\nnew file mode 100644\n--- /dev/null\n+++ b/.brevio/guards.json\n@@ -0,0 +1 @@\n+{}\n"
              },
              "reply": "refused:\n- .brevio/guards.json: protected, a file that sets what the gate or an agent does: a person changes it",
              "tool": "verify_edit"
            }
          ],
          "task": "Check this proposed edit without writing it, and tell me whether it is allowed:\n```diff\ndiff --git a/.brevio/guards.json b/.brevio/guards.json\nnew file mode 100644\n--- /dev/null\n+++ b/.brevio/guards.json\n@@ -0,0 +1 @@\n+{}\n```"
        },
        "type": "noul"
      },
      "w04": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "The proposed edit is **not allowed**. The check refused it because `.brevio/guards.json` is a protected file that sets what the gate or an agent does; it must be changed by a person. No file was written.",
          "done_when": "The verify_edit reply refuses the proposed edit because it touches the protected guards file.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "patch": "diff --git a/.brevio/guards.json b/.brevio/guards.json\nnew file mode 100644\n--- /dev/null\n+++ b/.brevio/guards.json\n@@ -0,0 +1 @@\n+{}\n"
              },
              "reply": "refused:\n- .brevio/guards.json: protected, a file that sets what the gate or an agent does: a person changes it",
              "tool": "verify_edit"
            }
          ],
          "task": "Check this proposed edit without writing it, and tell me whether it is allowed:\n```diff\ndiff --git a/.brevio/guards.json b/.brevio/guards.json\nnew file mode 100644\n--- /dev/null\n+++ b/.brevio/guards.json\n@@ -0,0 +1 @@\n+{}\n```"
        },
        "type": "noul"
      },
      "w05": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "The proposed edit is **not allowed**. The check refused it because `.brevio/guards.json` is a protected file that controls what the gate or an agent does; a person must change it.\n\nNo file was written.",
          "done_when": "The verify_edit reply refuses the proposed edit because it touches the protected guards file.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "patch": "diff --git a/.brevio/guards.json b/.brevio/guards.json\nnew file mode 100644\n--- /dev/null\n+++ b/.brevio/guards.json\n@@ -0,0 +1 @@\n+{}\n"
              },
              "reply": "refused:\n- .brevio/guards.json: protected, a file that sets what the gate or an agent does: a person changes it",
              "tool": "verify_edit"
            }
          ],
          "task": "Check this proposed edit without writing it, and tell me whether it is allowed:\n```diff\ndiff --git a/.brevio/guards.json b/.brevio/guards.json\nnew file mode 100644\n--- /dev/null\n+++ b/.brevio/guards.json\n@@ -0,0 +1 @@\n+{}\n```"
        },
        "type": "noul"
      }
    },
    "state": {
      "about": "Replies of an MCP server to tool calls that were sent with bad input on purpose, to see whether its error messages help a caller fix the call."
    }
  },
  "run_id": "01M83BR7SHC52X6JQ7STTHQGWY",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.98,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.93,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.91,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.97,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.98,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.98,
      "question": "w05"
    }
  ]
}
