/agent-almanac:verify-agent-outputfrom agent-almanac
Validates deliverables and builds evidence trails for multi-agent handoffs. Covers outcome specification, structured evidence, external validation, completion receipts, fidelity checks, trust boundaries, and disagreement reporting.
Ships in agent-almanac. 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.
Read when SKILL.md points to them.
Establish verifiable delivery between agents. When one agent produces output that another agent consumes — or that a human relies on — the handoff needs more than "looks good." This skill codifies the practice of defining checkable expectations before work begins, generating evidence as a side effect of doing the work, and validating deliverables against external anchors rather than self-assessment. The core principle: fidelity cannot be measured internally. An agent cannot reliably verify its own compressed output; verification requires an external reference point.
cross-agent, external-facing, internal)spot-check, full, sample-based)Before execution begins, write down what "done" looks like as a set of concrete, checkable conditions. Avoid subjective criteria ("good quality") in favor of verifiable assertions.
Categories of checkable conditions:
Example specification:
expected_outcome:
existence:
- path: "output/report.html"
- path: "output/data.csv"
shape:
- file: "output/data.csv"
columns: ["id", "name", "score", "grade"]
min_rows: 100
content:
- file: "output/data.csv"
column: "score"
range: [0, 100]
- file: "output/report.html"
contains: ["Summary", "Methodology", "Results"]
behavior:
- command: "Rscript -e 'testthat::test_dir(\"tests\")'"
exit_code: 0
consistency:
- check: "row_count"
source: "input/raw.csv"
target: "output/data.csv"
tolerance: 0
Expected: A written specification with at least one checkable condition per deliverable. Every condition is machine-verifiable (can be checked by a script or command, not just by reading and judging).
On failure: If the expected outcome cannot be stated concretely, the task itself is underspecified. Push back on the task definition before proceeding — vague expectations produce unverifiable work.
As the work proceeds, emit structured evidence as a side effect of doing the work. The evidence trail is not a separate verification step — it is produced by the execution itself.
Evidence types to capture:
evidence:
timing:
started_at: "2026-03-12T10:00:00Z"
completed_at: "2026-03-12T10:04:32Z"
duration_seconds: 272
checksums:
- file: "output/data.csv"
sha256: "a1b2c3..."
- file: "output/report.html"
sha256: "d4e5f6..."
test_results:
total: 24
passed: 24
failed: 0
skipped: 0
diff_summary:
files_changed: 3
insertions: 47
deletions: 12
tool_versions:
r: "4.5.2"
testthat: "3.2.1"
Practical commands for generating each kind of evidence are in references/EXAMPLES.md.
Expected: An evidence/ directory (or structured log) containing at least checksums and timing for every produced artifact. Evidence is generated as part of the work, not reconstructed after the fact.
On failure: If evidence generation interferes with execution, capture what you can without blocking the work. At minimum, record file checksums after completion — this enables later verification even if real-time evidence was not captured.
After execution, check the deliverable against the specification from Step 1. Use external anchors — test suites, schema validators, checksums, row counts — rather than asking the producing agent "is this correct?"
Commands for each category are in references/EXAMPLES.md.
Expected: All checks pass. Results are recorded as structured output (PASS/FAIL per condition) alongside the evidence trail from Step 2.
On failure: Do not silently accept partial passes. Any FAIL triggers the structured disagreement process in Step 6. Record which checks passed and which failed — partial results are still valuable evidence.
When the deliverable is a change in another system, there is no file to hash, and a successful tool response proves only that the request was accepted. Treat every external action as two phases: the write, and an independent read of the resulting state through the surface the next actor will use.
target_level: visible or usable_by_actor, never accepted, by its trust boundary in Step 5), and name the next actor, the surface that rung is read through, and the failure domain the read must be independent from (writer path, read path, shared dependencies).intent_hash: a hash of the canonical fields you meant to write, normalized to the destination's schema.canonical_hash). Equal hashes mean the destination holds what was intended.claim_level, and what the latest read found as the check.| Rung | Means | Reached only by |
|---|---|---|
accepted | The transport returned success | The write receipt |
visible | The object and its canonical fields exist at the destination | An independent read through a named observer surface |
usable_by_actor | The next actor's own surface shows it | A read through that actor's surface |
Check outcomes. What a record claims and what checking that claim found are separate fields. The check is recorded with one of five outcomes, the same in verify-agent-output and record-negative-evidence:
outcome | Meaning |
|---|---|
verified | The check ran and found positive evidence for the claim |
failed | The check ran and found evidence that contradicts the claim |
unresolvable | The check ran but could not resolve what the record names (an id, a surface, a rule) |
absent | The check ran in the named place and found nothing |
not_checked | No check against a source outside the actor's own account has run |
check:
outcome: not_checked # verified | failed | unresolvable | absent | not_checked
checked_by: null # who ran the check
at: null # when it ran
evidence: null # the value or line the outcome rests on
What counts is where the evidence comes from, not who reads it: verified, failed, unresolvable, and absent rest on a source outside the actor's own account (the destination read back, a gate's log, a scheduler ledger), and what the actor reports about itself (its own log, memory, or summary) is not_checked. A verified needs something seen, so a confirmed absence is absent, never verified; for a removal, the destination's direct answer that this id is gone is that positive evidence: a 410 or a revocation entry, or a 404 from a read path that answers 404 only for missing ids, never for refused access. Never fold absent or not_checked into failed or verified: finding nothing contradicts nothing, and an unchecked claim has not passed.
These five values, kept apart from what a record claims, follow a list proposed in a comment on agent-almanac issue #649.
claim_level rises to a rung only on a verified read of that rung, and the receipt is done when it equals target_level. Until then the receipt is in the state written_pending_observer_visibility: the check reads not_checked or absent (or verified through a path that is not independent, per the On failure below), and the receipt carries a deadline (expires_at) and an expiry_action: observe again, draft a correction, ask a human, or abort, never a blind re-write.
On a receipt, each outcome has one handling. absent inside the window is pending: a 404 on the written id, or a lagging replica that still shows the prior state, is absent, not failed, unless the receipt's effect is removal (the rule above). failed is a state lag cannot explain (wrong content, wrong destination, the prior state after expires_at): stop and report it (Step 6). unresolvable means the read could not be made at all (a malformed id, a surface that errors or refuses access): report it as the meta-failure of Step 6, not as pending. A receipt still absent or not_checked at expires_at runs its expiry_action, and the report says which of the two it was.
completion_receipt:
intended_effect: "publish comment on post 4711"
effect: write # write | removal
next_actor: "human reader of the thread"
observer_surface: "GET /posts/4711/comments (public read path)"
witness_failure_domain:
writer_path: "POST /comments (authenticated session)"
read_path: "public CDN read"
shared_dependencies: ["API gateway"]
write_receipt: {id: "c-123", returned_at: "2026-08-18T12:19:41Z"}
intent_hash: "sha256:..."
canonical_hash: "sha256:..."
target_level: visible # visible | usable_by_actor
claim_level: visible # the rung reached so far
check:
outcome: verified
checked_by: "orchestrator"
at: "2026-08-18T12:20:00Z"
evidence: "c-123 listed; canonical fields match the intent"
expires_at: "2026-08-18T12:25:00Z"
expiry_action: ask # observe | draft | ask | abort
Witness independence. A read is independent only of the failure domain you named. Use a witness outside the platform when a fault shared across its own surfaces could fake completion of a money movement, an irreversible deletion, an identity or access change, or a public commitment. The test: if the platform lied consistently across its own surfaces, could you still retry or undo safely?
Retry discipline. Retry the observation freely inside the window. Retry the write only with fresh authorization or an idempotency proof. When expires_at passes, run the expiry_action instead of re-sending. Worked examples: references/EXAMPLES.md.
Expected: Every external side effect has a receipt naming its next actor, observer surface, and failure domain, with target_level, claim_level, and check recorded separately.
On failure: If no independent read path exists, a read through the writer's own path still records what it found as the check, but claim_level stays accepted, because a rung needs an independent read. Never report the effect as done, and name the missing surface in the structured disagreement (Step 6).
When an agent summarizes, compresses, or transforms data, the output is smaller than the input by design. A summary cannot be verified by reading the summary alone — you must compare it against the source. Use sample-based spot checks to verify fidelity.
Procedure:
# Example: verify a summary report against source data
# 1. Select random rows from source
shuf -n 5 input/raw.csv > /tmp/sample.csv
# 2. For each sampled row, verify it appears correctly in the output
while IFS=, read -r id name score grade; do
grep -q "$id" output/report.html && echo "PASS: $id found in report" || echo "FAIL: $id missing from report"
done < /tmp/sample.csv
# 3. Check for fabricated IDs in the output
# Extract IDs from output, verify each exists in source
grep -oP 'id="[^"]*"' output/report.html | while read -r output_id; do
grep -q "$output_id" input/raw.csv && echo "PASS: $output_id has source" || echo "FAIL: $output_id fabricated"
done
For text summaries where exact matching is not possible, verify key claims:
Expected: All sampled items are accurately represented. No fabricated content detected. Key statistics in the summary match computed values from the source.
On failure: If fidelity checks fail, the summary cannot be trusted. Report the specific discrepancies using the structured disagreement format in Step 6. The producing agent must re-derive the summary from source, not patch the existing output.
Not everything needs verification. Over-verification is its own cost — it slows execution, increases complexity, and can create false confidence in the verification process itself. Classify outputs by trust level to focus verification effort where it matters.
Trust boundary classification:
| Boundary | Verification Required | Examples |
|---|---|---|
| Cross-agent handoff | Yes — always | Agent A produces data that Agent B consumes; team member passes deliverable to lead |
| External-facing output | Yes — always | Reports delivered to humans, deployed code, published packages, API responses |
| External side effect, reversible | Yes — completion receipt | A draft saved, a label added, a reaction posted |
| External side effect, irreversible | Yes — receipt with an outside witness | Money moved, data deleted, access granted, a public commitment |
| Compressed/summarized | Yes — sample-based | Any output that is smaller than its input by design (summaries, aggregations, extracts) |
| Internal intermediate | No — trust with checksums | Temporary files, intermediate computation results, internal state between steps |
| Idempotent operations | No — verify once | Config file writes, deterministic transforms, pure functions with known inputs |
Apply verification proportionally:
visible and read back the id and one critical field; if irreversible, target usable_by_actor and read back the destination, content hash, actor-visible state, and timestamp, through an outside witnessExpected: Each deliverable in the workflow is classified into one of the trust boundary categories. Verification effort is concentrated on cross-agent and external-facing boundaries.
On failure: When in doubt, verify. The cost of false trust (accepting bad output) almost always exceeds the cost of unnecessary verification. Default to verification and relax only when you have evidence that a boundary is safe.
When verification fails, produce a structured disagreement rather than silently accepting or silently rejecting the output. A structured disagreement makes the failure actionable — it tells the producing agent (or the human) exactly what was expected, what was received, and where the gap is.
Disagreement format:
verification_result: FAIL
deliverable: "output/data.csv"
timestamp: "2026-03-12T10:04:32Z"
failures:
- check: "row_count"
expected: 500
actual: 487
severity: warning
note: "13 rows dropped — investigate filter logic"
- check: "score_range"
expected: "[0, 100]"
actual: "[-3, 100]"
severity: error
note: "3 negative scores found — data validation missing"
- check: "column_presence"
expected: "grade"
actual: null
severity: error
note: "grade column missing from output"
passes:
- check: "file_exists"
- check: "checksum_stable"
- check: "test_suite"
recommendation: >
Re-run with input validation enabled. The score_range and column_presence
failures suggest the transform step is not handling edge cases. Do not
patch the output — fix the transform and re-execute from source.
Key principles for disagreement reporting:
error (blocks acceptance), warning (accept with caveat), info (noted for the record)Expected: Every verification failure produces a structured disagreement with at least: the check that failed, the expected value, the actual value, and a severity classification.
On failure: If the verification process itself fails (e.g., the validation script errors out), report that as a meta-failure. The inability to verify is itself a finding — it means the deliverable is unverifiable in its current form, which is worse than a known failure.
accepted is claimed without a verified checkRscript may resolve to a cross-platform wrapper instead of native R. Check with which Rscript && Rscript --version. Prefer the native R binary (e.g., /usr/local/bin/Rscript on Linux/WSL) for reliability. See Setting Up Your Environment for R path configuration.intent_hash covers the fields you meant to write and canonical_hash the same fields read back from the destination, both normalized the same way; only the second is evidence of the effect.not_checked.fail-early-pattern — complementary: fail-early catches bad input at the start; verify-agent-output catches bad output at the endsecurity-audit-codebase — overlapping concern: security audits verify that code meets security expectations, a specific case of deliverable validationhonesty-humility — complementary: honest agents acknowledge uncertainty, making verification gaps visible rather than hiding themreview-skill-format — verify-agent-output can validate that a produced SKILL.md meets format requirements, a concrete instance of deliverable validationcreate-team — teams that coordinate multiple agents benefit from structured handoff validation at each coordination steptest-team-coordination — tests whether team handoffs produce verifiable deliverables, exercising this skill's procedures end to endrecord-negative-evidence — the mirror image: records an action an agent did not take, with the same check outcomes as Step 3.5circuit-breaker-pattern — complementary: degrades gracefully when a tool call fails; a completion receipt confirms a call that reported successWhat SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (pjt222/agent-almanac) — no native marketplace selected
npx claudepluginhub p/pjt222-agent-almanac377 skills in this plugin
/adapt-architectureExecute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
/adapticMaster skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
/add-puzzle-typeScaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
Other plugins' skills for the same job