Skip to content

The analyzer as a harness

The analyzer calls a model, but the model is the smallest part of what makes it safe. Around it is a harness: code and rules that decide what the model is told, what it sees, what it can touch and how its work is checked. The model reasons. Nothing it says is authorization: its only output is a proposal, and a deterministic policy check outside the model decides whether it goes any further (invariant 1).

The analyzer as a harness around the model. In the middle, the model proposes only. Guides, what it follows: the analysis prompt and output schema, the invariants and ADRs, the closed action catalog with bounded parameters. Context, what it sees: the context builder with redacted, bounded, delimited blocks from pod logs, Prometheus metrics and the Incident, which is made from Events, the allow-listed fields of a KEDA ScaledObject that is the subject, and the bounds of the policy that will decide a proposal. Tools, what it touches: read-only tools such as list_events, read_git_file (planned), the analyzer's RBAC (read-only on the cluster, writes only its Incidents, budget and proposals), the analysis budget and time limit. Checks, how it is checked: malformed output refused, the evaluation harness and injection corpus, OpenTelemetry traces, analysis records. Below, outside the model: the RemediationRequest proposal, the policy check with the plan digest, the executor's GitOps pull request, a person merges, Flux deploys, and the verifier samples the pods and writes a report only for requests in Verifying, which needs the executor flag --verify-outcomes, off by default; the executor reads the report as untrusted evidence and decides whether the symptom cleared).

Dashed boxes are designed, not built. The teal box is GitHub, outside the cluster; Flux runs in the cluster. For a reader-level view of the model and its harness, see Working with models.

Where each box is described

Box Status Design section or code
Prompt and output schema built 3.3, the prompt and the result; internal/analysis/prompts
Invariants and ADRs built 10. Security, ADR-0003, ADR-0023
Action catalog built 10.4, bounded actions; policy.CheckAction
Context builder built 3.3, the context builder; internal/incidentcontext, internal/redact
Pod logs, metrics, the Incident (made from Events) built 3.1, 4.1, 4.2
Read-only tools built 4. Tools; internal/tools
read_git_file planned 4. Tools, #373
Analyzer RBAC built 10.1, 10.11
Budget and time limit built 3.2, the analysis budget, the loop and its limits
Malformed output refused built 3.3, the prompt and the result; internal/analysis/result.go
Eval harness and injection corpus built, the analyzer's own gate planned 11.2, evaluation gate, evaluation; test/eval
OpenTelemetry traces built, off by default Traces reference
Analysis records built, with a record store ADR-0015; internal/analysis/record.go
Scoring of records outside the cluster built as a command that scores one record file; the job and its trigger planned ADR-0047, scoring intake; cmd/intake, internal/intake
Proposal, policy check, GitOps PR built, up to Merged, then WaitingForDelivery and Verifying ending Failed or Inconclusive behind --verify-outcomes (off by default) 6. Reconciliation, 8. GitOps on GitHub
Person merges (GitHub), Flux deploys (in the cluster) not part of Shadewright 8. GitOps on GitHub
Step log and replay by step planned Working with models
One bounded extra round when the answer names missing data a tool can fetch planned Working with models
Verifier built, writes reports only with --verify-outcomes on (off by default); the executor reads them as untrusted evidence and decides Cleared (built, #683) 10.9, verification