Context
Part of the ORB maintainer chat platform epic; implements the grounding side per the spec sub-issue's recorded decisions (do not start before that spec closes — the tool list below is the candidate set, and the spec may trim or extend it). Mirrors the contributor pattern of #6517: read-only, deterministic, JSON tool results that the chat model consumes — grounding, not generation.
Requirements
- A tool-registry module in
src/ exposing the spec-confirmed read-only tools over existing services (queue snapshot, per-PR status + gate verdict + blocker reasons, decision-record fetch, ledger-verify proxy, calibration summary, effective-config resolution, audit-event tail, repo-settings snapshot). Each tool wraps an existing service/module — no new data paths, no new SQL surfaces invented for chat.
- Authz on every call: per-repo maintainer verification through the existing helpers (the authz doc-comment over
src/api/routes.ts's helpers is the source of truth). Cross-repo access denies. Affiliation-tier behavior exactly as the spec decided.
- Redaction is structural: every tool response passes the existing public-safety redaction path before leaving the API; wallet/hotkey/reward/private-ranking/raw-trust fields are unreachable by construction (allowlisted response shapes, not blocklist filtering).
- Read-only is enforced, not promised: no tool may hold an installation Octokit in write mode; add a unit test asserting the registry performs zero GitHub writes (mirroring the
no-direct-octokit invariant style).
- Per-tool response token budgets and deterministic ordering (stable sort keys) so identical state produces identical grounding.
- Accuracy/calibration responses always carry coverage and confidence interval alongside any accuracy figure.
Deliverables
- The tool registry + route wiring on the protected API, feature-flagged off by default (
LOOPOVER_REVIEW_*-style flag, ships OFF).
- Unit tests: per-tool authz-deny (cross-repo actor), redaction shape tests, the zero-writes invariant test, determinism test (two identical calls, identical bytes).
- Docs: a short tool-catalog reference section (the spec's catalog, as-built).
Expected outcome
The chat backend can answer "what's blocking the queue?" and "why did the gate close #123?" from real ORB state, with authz and redaction guaranteed by tests rather than convention.
Context
Part of the ORB maintainer chat platform epic; implements the grounding side per the spec sub-issue's recorded decisions (do not start before that spec closes — the tool list below is the candidate set, and the spec may trim or extend it). Mirrors the contributor pattern of #6517: read-only, deterministic, JSON tool results that the chat model consumes — grounding, not generation.
Requirements
src/exposing the spec-confirmed read-only tools over existing services (queue snapshot, per-PR status + gate verdict + blocker reasons, decision-record fetch, ledger-verify proxy, calibration summary, effective-config resolution, audit-event tail, repo-settings snapshot). Each tool wraps an existing service/module — no new data paths, no new SQL surfaces invented for chat.src/api/routes.ts's helpers is the source of truth). Cross-repo access denies. Affiliation-tier behavior exactly as the spec decided.no-direct-octokitinvariant style).Deliverables
LOOPOVER_REVIEW_*-style flag, ships OFF).Expected outcome
The chat backend can answer "what's blocking the queue?" and "why did the gate close #123?" from real ORB state, with authz and redaction guaranteed by tests rather than convention.