/cub-scout:scout-verifyfrom cub-scout
Produces typed, fingerprinted, immutable evidence artifacts (receipts) for Kubernetes resources using cub-scout. Creates tamper-evident records for CI/CD gates, audit trails, and postmortems.
Ships in cub-scout. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Verify verb group of cub-scout. Produces typed, fingerprinted, immutable evidence artifacts — receipts — wrapping cub-scout's existing field-level evidence into a verifiable record CI/CD gates, audit trails, postmortems, and acceptance-judge tooling can attach to a decision and later re-check for tampering.
A receipt is a stamped, hand-offable record of one verification: an in-toto Statement v1 envelope around a verdict, evidence, omissions, and optional upstream receipt references. Its proof is the verifiable integrity property created by the fingerprint: SHA-256 over RFC 8785 canonical JSON of the full Statement, with only
predicate.fingerprintremoved before hashing. Any third party can recompute that fingerprint to confirm the receipt has not been edited since it was stamped. That is tamper-evidence, not producer authentication or formal proof of truth. A receipt without proof is a claim; a receipt with proof is evidence.
Receipts are HISTORICAL records. Updates produce new receipts; old ones never mutate.
Explicit phrasings:
Implicit intents:
scout-compare is faster and the right shapescout-attributescout-observereceipt verify --predicate applied-matches-spec and --predicate no-manual-edits-since work without ConfigHub. The receipt records OmissionConfigHubUnitSubject to flag the missing connected-mode evidence.cub auth login): --predicate source-truth-pass --strategy <name> becomes available. Connected mode also adds the confighub-unit:// subject to every receipt when unit identity is available, anchoring it to the unit revision in addition to the live K8s digest. Single-resource receipt verify --with-confighub can attach object-correlated delivery evidence under predicate.evidence.deliveryEvidence; this is supporting evidence and does not change predicate verdict semantics.receipt show / receipt validate / receipt list all work on on-disk artifacts with no cluster and no ConfigHub. Useful in CI containers that received the receipt as an artifact from an upstream job.verify / show / validate / list); kubectl get/describe, kubectl get --show-managed-fields (for inspecting what no-manual-edits-since saw); cub <entity> get / list for the entities named in allowed-tools (connected); argocd app get, flux get (when building source-truth-pass evidence).kubectl apply/edit/patch/delete, argocd app sync (as mutation), flux reconcile --with-source, cub * create/update/delete. Receipts are evidence, never recommendations to mutate. FilterNextSteps (in pkg/agent/receipt_predicates.go) rejects mutating actionType / nextCommand at receipt-emit time as defense in depth.TestReceiptPackageReadOnlyClient: the static guard in cmd/cub-scout/receipt_readonly_test.go greps every receipt*.go source file and fails the build if any mutating K8s client method appears. Receipts are categorically read-only.| Question | Verb | Notes |
|---|---|---|
| "Produce a receipt about this resource" | cub-scout receipt verify <kind>/<name> -n <ns> | Auto-detects the predicate from owner + signals. Defaults to applied-matches-spec for Argo/Flux/ConfigHub-owned resources with a resolved git anchor. |
| "Preserve delivery/status feedback" | cub-scout receipt verify <kind>/<name> -n <ns> --with-confighub --confighub-space <space> | Single-resource only; freezes object-correlated deliveryEvidence inside the fingerprinted receipt. |
| "Render a saved receipt" | cub-scout receipt show <path> | ASCII or JSON. Does NOT verify the fingerprint — works on tampered receipts for forensic inspection. |
| "Has this receipt been tampered with?" | cub-scout receipt validate <path> | Recomputes the fingerprint and compares. Exit 0 OK / 1 mismatch / 2 I/O. JSON output for CI. |
| "What receipts do I have locally, and are TTL-backed ones still fresh?" | cub-scout receipt list --format json | Walks $CUB_SCOUT_RECEIPTS_DIR → $XDG_DATA_HOME/cub-scout/receipts → $HOME/.local/share/cub-scout/receipts. Newest first, with freshness.status as fresh, stale, not-declared, or invalid. |
cub-scout v1 ships three predicates. Each maps a required input signal to a receipt-level verdict:
| Predicate | Required signal | Verdict logic |
|---|---|---|
applied-matches-spec | Argo/Flux/ConfigHub owner + controller-resolved git anchor | PASS on controller-drift cause; BLOCK on manual-edit cause or anchor mismatch; INCONCLUSIVE on missing anchor or unknown cause. |
source-truth-pass | --strategy <name> (one of 9) + connected-mode ConfigHub auth | Mirrors compare source-truth Status → Verdict. Strategy mismatch between caller and evidence → BLOCK. |
no-manual-edits-since | --since <RFC3339> cutoff | PASS when no kubectl-* writer touched managedFields after the cutoff. BLOCK on any late interactive write. INCONCLUSIVE on missing managedFields or nil-Time entries (parse-don't-guess). |
cub-scout NEVER infers a strategy or a cutoff. source-truth-pass requires --strategy; no-manual-edits-since requires --since. Pass them or the CLI errors upfront.
Every receipt carries one of four:
| Verdict | Meaning |
|---|---|
PASS | Evidence supports the claim |
WATCH | Evidence is ambiguous; situation needs monitoring |
BLOCK | Evidence contradicts the claim |
INCONCLUSIVE | Evidence missing or unavailable; always carries one or more omissions[] entries |
INCONCLUSIVE is not failure — it's an honest "I don't have enough to claim PASS." Pilot and similar acceptance kernels treat it as ASK (need human or richer evidence).
applied-matches-spec (default for Argo/Flux/ConfigHub-owned resources with a resolved anchor). If the user mentions a delivery strategy, they want source-truth-pass. If they mention a freeze window or cutoff timestamp, they want no-manual-edits-since.confighub-unit:// subject + ConfigHub-side evidence. Source-truth-pass requires connected mode.--format json for CI / agent consumption. Use --save to land the artifact in the local store (immutable; refuses overwrite).omissions[] is the "what I deliberately did not claim" list. Empty omissions = comprehensive coverage. Non-empty = honest gaps.--out <path> writes a specific file; --save writes into the store under the canonical name. CI gates that need to attach the artifact to a build record use --out.cub skill (for ConfigHub state changes), at kubectl get --show-managed-fields (to investigate a manual-edit BLOCK), or at the original-author path (commit the change back to git).The default path for an Argo-owned Deployment. Works without ConfigHub auth.
$ cub-scout receipt verify deploy/api -n prod
Receipt: applied-matches-spec
Verdict: PASS
Claim: applied matches spec at apps/prod/api
Scope: Deployment/api in prod
By: cub-scout v2.3.0 at 2026-05-22T10:30:00Z
Spec: https://github.com/org/platform-config @abc123def456 path=apps/prod/api
Subjects
- k8s-live://apps/v1/Deployment/prod/api sha256:595f08ae073d…
Evidence (attribution)
cause: controller-drift
managerHint: argocd-controller
gitSource: https://github.com/org/platform-config @abc123def456 path=apps/prod/api
Omissions (deliberate non-claims)
- confighub-unit-subject — standalone-mode build; no ConfigHub auth available to fetch unit subject [info]
Next steps (read-only)
- [read-only] controller is reconciling; spec anchor matches the resolved git source
→ cub-scout explain
Fingerprint: sha256:252ef3104d0a3cc8ac62e7bde40cf6174b6f045d8ed2b97c6512781d8cb690f4
Save it to disk for a build record:
$ cub-scout receipt verify deploy/api -n prod --format json --out api-prod.receipt.json
Or land it in the local store for casual accumulation:
$ cub-scout receipt verify deploy/api -n prod --save
saved: /home/user/.local/share/cub-scout/receipts/2026-05-22T10-30-00Z__applied-matches-spec__Deployment-api__252ef3104d0a.receipt.json
$ cub-scout receipt verify deploy/api -n prod --strategy git-argo --format json
{
"_type": "https://in-toto.io/Statement/v1",
"subject": [
{"name": "k8s-live://apps/v1/Deployment/prod/api", "digest": {"sha256": "..."}},
{"name": "confighub-unit://payments-api@rev=42", "digest": {"sha256": "..."}}
],
"predicateType": "https://cub-scout.dev/receipt/v1",
"predicate": {
"predicateName": "source-truth-pass",
"verdict": "PASS",
"evidence": {
"sourceTruth": {
"declared_strategy": "Git -> Argo -> Kubernetes",
"status": "PASS",
"source_truth": "AGREED",
"surfaces": { ... }
}
},
"omissions": [],
"fingerprint": "sha256:..."
}
}
Strategy mismatch is BLOCK — never silently honor the caller's strategy over what the evidence records:
$ cub-scout receipt verify deploy/api -n prod --strategy git-argo
# ... evidence carries confighub-oci-argo, not git-argo ...
Verdict: BLOCK
Omissions
- strategy-mismatch — receipt was asked to verify under strategy "git-argo" but source-truth evidence carries "ConfigHub -> OCI -> Argo -> Kubernetes"
$ cub-scout receipt verify deploy/api -n prod --since 2026-05-22T00:00:00Z --save
saved: /home/user/.local/share/cub-scout/receipts/2026-05-22T10-30-00Z__no-manual-edits-since__Deployment-api__abc123.receipt.json
$ cub-scout receipt show ~/.local/share/cub-scout/receipts/2026-05-22T10-30-00Z__no-manual-edits-since__Deployment-api__abc123.receipt.json
Receipt: no-manual-edits-since
Verdict: PASS
Claim: no manual edits to Deployment/api in prod since 2026-05-22T00:00:00Z
A late kubectl edit produces BLOCK and names the offending writer:
Verdict: BLOCK
Next steps (read-only)
- [read-only] interactive writer wrote managedFields after the cutoff (2026-05-22T00:00:00Z): kubectl-edit@2026-05-22T12:00:00Z — investigate the unplanned edit before any apply
→ kubectl get --show-managed-fields
$ cub-scout receipt validate ./api-prod.receipt.json
Fingerprint OK: ./api-prod.receipt.json
sha256:252ef3104d0a3cc8ac62e7bde40cf6174b6f045d8ed2b97c6512781d8cb690f4
$ cub-scout receipt list
Store: /home/user/.local/share/cub-scout/receipts
VERDICT PREDICATE SCOPE VERIFIED-AT PATH
PASS applied-matches-spec Deployment/api in prod 2026-05-22T10:30:00Z 2026-05-22T10-30-00Z__applied-matches-spec__Deployment-api__252ef3104d0a.receipt.json
BLOCK no-manual-edits-since Deployment/api in prod 2026-05-22T08:00:00Z 2026-05-22T08-00-00Z__no-manual-edits-since__Deployment-api__abc123.receipt.json
JSON list output for CI consumption (filter by verdict):
$ cub-scout receipt list --format json | jq '.[] | select(.verdict == "BLOCK")'
What every receipt carries (the structured surface a downstream consumer pattern-matches on):
| Field | Meaning |
|---|---|
predicate.predicateName | One of applied-matches-spec / source-truth-pass / no-manual-edits-since |
predicate.verdict | One of PASS / WATCH / BLOCK / INCONCLUSIVE |
predicate.scope | kind / name / namespace / cluster |
predicate.verifier | {tool, version} — always cub-scout plus the build tag |
predicate.verifiedAt | RFC 3339 timestamp |
predicate.spec.anchor | Git repo + revision + path (applied-matches-spec only) |
predicate.evidence.attribution | cause / managerHint / gitSource — cub-scout's existing attribution layer |
predicate.evidence.sourceTruth | Source-truth derivation surfaces (source-truth-pass only) |
predicate.omissions[] | Structured list of what the receipt deliberately does NOT claim — empty array means comprehensive coverage |
predicate.nextSteps[] | Read-only follow-up hints (mutating verbs filtered at emit time) |
predicate.fingerprint | sha256: SHA-256 over RFC 8785 canonical JSON of the full Statement minus only this field |
The local receipt store is a flat directory of *.receipt.json files keyed by a deterministic sortable name:
<verifiedAt-rfc3339-safe>__<predicate>__<kind>-<name>__<short-fingerprint>.receipt.json
Resolved in priority order:
--save-dir <path> on verify, --dir <path> on list (explicit override)$CUB_SCOUT_RECEIPTS_DIR env var$XDG_DATA_HOME/cub-scout/receipts$HOME/.local/share/cub-scout/receiptsThe store is immutable: re-running verify on the same resource at the same instant with the same fingerprint produces the same canonical filename → "already saved" warning and exit 0. The on-disk artifact never changes.
Three v2 extensions layer on top of the v1 envelope without changing the wire format:
--fail-on <verdict-list> on receipt verify (#451) — exit non-zero (code 2) when the verdict matches. Accepts WATCH, BLOCK, INCONCLUSIVE (comma-separated) or the sugar any-non-pass. The receipt is still printed / saved / written to --out — the gate fires AFTER the artifact is durable.--input-attestation <path> chained receipts (#448 chained half) — repeatable; each referenced receipt is loaded + fingerprint-verified + attached to the new receipt's inputAttestations[]. Tampered references refused at chain-construction time. The downstream fingerprint covers the field by construction.cub-scout watch --emit-receipt-on <event-types> / cub-scout bot --emit-receipt-on <event-types> (#449) — attaches a receipt to each matching event payload inline (JSONL or webhook). All four known event types build receipts: drift.detected, ownership.changed, resource.discovered, and scan.finding; --emit-receipt-batch-cap bounds burst volume. Failures are non-fatal.# CI gate
./cub-scout receipt verify deploy/api -n prod --fail-on any-non-pass
# Chain a per-resource receipt with an upstream "release gate passed" one
./cub-scout receipt verify deploy/api -n prod \
--input-attestation ./release-gate.receipt.json \
--save
# Streaming acceptance: each drift event becomes a fingerprinted receipt
./cub-scout watch -n prod \
--output-file ./acceptance.jsonl \
--emit-receipt-on drift.detected,ownership.changed
Future directions worth flagging:
Shipping releases use fingerprint-only integrity; future hardening is honest about what's not yet there — the contract is in docs/reference/json-contracts.md § Receipt Contract.
docs/concepts/receipts-and-proofs.md — what "receipt" and "proof" mean, vs log / journal / record / ledger / provenancedocs/reference/json-contracts.md § Receipt Contractdocs/proposals/receipts-way-forward.mdexamples/receipts/ — 8 canonical receipts across the three predicates, generated deterministically by tools/gen-receipt-examplespkg/agent/receipt*.go, cmd/cub-scout/receipt*.goscout-attribute (companion evidence surface), scout-compare (live comparison sibling)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (confighub/cub-scout) — no native marketplace selected
npx claudepluginhub p/confighub-cub-scout35 skills in this plugin
/ai-agent-readonly-contextUse when the user is WIRING CUB-SCOUT INTO AN AI AGENT (Claude / Codex / a custom LLM workflow) and needs the patterns for read-only context, MCP gateway tools, deterministic context snapshots, and the prompt-shape that makes cub-scout's output reliable for LLMs. Natural phrasing: "set up cub-scout as a Claude tool", "expose cub-scout to my agent over MCP", "give the LLM a deterministic snapshot of this cluster", "what cub-scout patterns work well for AI agents?", "MCP config for cub-scout in Claude Code", "best practices for wiring cub-scout into Codex / Cursor / Continue", "AI-ready cluster context", "prompt template for cub-scout output". Composes `mcp serve` + `context-pack` + `--presentation ai` + the structured JSON contracts. Do NOT load for: a specific verb invocation (load the corresponding scout-* skill), authoring an MCP server in general (this is about wiring CUB-SCOUT specifically), or any mutating workflow (cub-scout never mutates; the read-only triad is the whole point of this skill)./audit-fleet-conformanceUse when the user wants to verify CONFORMANCE ACROSS A FLEET — multiple namespaces, multiple clusters, or a defined View scope. Natural phrasing: "which clusters are conformant?", "audit fleet conformance against this View", "show me all outliers in prod fleet", "compare every service against its source-truth strategy", "scope-wide three-way check for drift", "fleet-level compliance audit", "which deployments drift across the cluster?". Composes `compare three-way --view` + `compare source-truth` + `fleet outliers` for multi-resource / multi-cluster checks. Requires connected mode for the View + ConfigHub surfaces. Do NOT load for: a single resource (use investigate-drift), a triage (use triage-unhealthy-workload), incident evidence for one event (use operator-incident-evidence), or anything mutating./confighub-source-truthUse when the user wants a STRATEGY-TYPED, PILOT-ACCEPTANCE-SHAPED VERDICT about whether ConfigHub / controller / runtime agree under a declared delivery strategy — the `compare source-truth` workflow with the explicit `--strategy <name>` requirement. Natural phrasing: "give me a source-truth verdict for deploy/api", "verify under git-argo strategy that ConfigHub matches the cluster", "run the source-truth contract for upstream Pilot acceptance", "compare source-truth confighub-oci-flux strategy across the namespace", "produce strategy-relative correctness evidence", "show me where the strategy declaration is being violated". Composes `compare source-truth --strategy <s>` + the source-truth evidence contract + (optionally) `receipt verify --strategy <s>` for a fingerprinted version. Requires CONNECTED MODE. Do NOT load for: a single-resource live drift question without a declared strategy (use investigate-drift), a triage (use triage-unhealthy-workload), or a fleet-wide audit that doesn't need strategy framing (use audit-fleet-conformance). cub-scout NEVER infers a strategy — this skill enforces that boundary./cub-scoutUse when working in the cub-scout repo or when answering capability-assistant questions ("can cub-scout do X?", "should I use cub-scout or kubectl here?", "how does cub-scout differ from cub?"). This is the umbrella router — it points you at the verb-grouped scenario skills under `skills/scout-*/` and the workflow / observer / reference skills planned for batches 2–5. For a specific verb-group task (observe / diagnose / compare / attribute / adopt existing config / govern / integrate / verify) load the corresponding `scout-*` skill directly./investigate-driftUse when the user wants to compare live and desired state and inspect available manager and source evidence. Natural phrasing: "why is this Deployment different from the git manifest?", "which recognized manager is recorded for this path?", "controller-drift or interactive-manager evidence?", "compare three-way + attribution for deploy/api". Composes `compare three-way` + `compare drift` + the attribution layer (`cause` / `managerHint` / `gitSource` / `bindingSource`). Do NOT promise who changed the value or which manager wrote last: path-level manager evidence is not time-ordered, and resource-level `explain` evidence is not field-specific. Do NOT load for: a triage where the workload won't start (use triage-unhealthy-workload), pure inventory (use scout-observe), generating a fingerprinted evidence artifact (use scout-verify and the no-manual-edits-since predicate), or any mutating fix (cub-scout never mutates)./migrate-from-kubectlUse when the user is MIGRATING from ad-hoc `kubectl apply` toward GitOps (Argo / Flux / ConfigHub) — and needs to find the manual edits, decide what to do with each (revert / port to git / accept as canonical), and plan the transition. Natural phrasing: "find all the manual edits in this cluster", "we have years of kubectl-apply, help us move to GitOps", "which resources have been hand-edited?", "audit drift caused by humans not controllers", "port my cluster state to git", "show me everything kubectl-* has touched". Composes attribution layer (`cause: manual-edit`) + `map orphans` (resources without a controller owner) + `scan` (risk classification) + `snapshot` / `import --git-path` preview once a repo skeleton exists. Read-only throughout — the migration itself is user-driven. Do NOT load for: real-time triage (use triage-unhealthy-workload), single-resource drift question (use investigate-drift), a fleet conformance audit (use audit-fleet-conformance), or any mutating action.Other plugins' skills for the same job