Most AI agent demos stop at a green dashboard. That works until an auditor asks two harder questions:
- Has anything in the audit log been changed since it was written?
- Did every action that should have left a record actually leave one?
If the dashboard reads the same database table an administrator can edit, a green checkmark proves nothing. And if an outage drops a role grant from the audit stream, an immutable-looking hash chain only proves that an incomplete record wasn't altered later.
For Kiroween 2026, I built Anchora (https://tradexy.github.io/reliquary/ | repo: https://github.com/tradexy/reliquary) in the Skeleton Crew category: one reusable TypeScript evidence skeleton (@anchora/core) powering two distinct client-side applications (Seal and Witness), an offline verifier CLI, and a stdio Kiro MCP server.
Why Spec-First With Kiro Changed Everything
Before writing a single line of cryptography, I wrote four steering files (.kiro/steering/) locking down the non-negotiable promises:
- "The verifier is the product." If an outsider can't re-check the claim with one file and one command, don't make it.
- "Never overstate." Say tamper-evident, never "tamper-proof" or "immutable". Label every simulated boundary (
simulatedbadges) and publishdocs/limits.md. - "Lawful change is classified, not concealed." GDPR erasure and retention checkpoints shouldn't masquerade as clean logs or trigger false tampering alarms.
- "Zero runtime network calls." Everything runs sealed (
connect-src 'none'CSP, system fonts, zero backend).
From there, Kiro generated 15 EARS requirements, a canonical preimage & verification design doc, and 16 scoped task groups. Every task ran behind three automated Kiro hooks:
-
security-on-write.json(PostToolUseonwrite): blockseval,innerHTML, web storage, external CDN/font URLs, secrets, and banned overclaims on every edit. -
contract-on-core-change.json(PostFileSaveoncrypto/chain/capture): immediately runs Vitest on core changes. -
verify-on-stop.json(Stop): refuses to end any agent turn unless TypeScript strict mode (4projects), the static security scan, and all199unit &fast-checkproperty-based tests pass.
What the Skeleton Produces
Both applications import @anchora/core without duplicating a single line of crypto:
- Seal (Integrity Vault): Hash-chains
500deterministic events over one canonical serialiser (anchora/1), seals heads with@noble/ed25519, and writes create-only (wx) anchors. Editseq 217(a £2,000,000 AI commercial loan decision flipped fromapprovedtodeclined) and the SVG chain visualizer fractures atHASH_MISMATCH, showingfirstDivergence: 217. Click Rewrite chain from here to recompute every downstream hash217→500— every link looks consistent, and Seal still catches it atseq 240(SEAL_INVALID/ANCHOR_MISSING) because the external seal & anchor were already written. - Witness (Capture Registry): Classifies
15auditable actions asfail-closed(widening actions likeroles.grantoragents.guardrail.ceiling.raiserefuse withaudit-unavailablewhen the audit store is down) orqueue(tightening actions likeroles.revokeoragents.disablecomplete and queue durably). A coverage build guard fails CI if any catalogued action lacks a test, and SOC 2, ISO 27001, and EU AI Act controls link directly back to supporting events in Seal.
Custom Agents, Offline MCP, and Self-Auditing
To make Kiro verify its own work directly inside the repo, I added:
- An offline stdio MCP server (
tools/mcp/server.ts, registered in.kiro/settings/mcp.json) exposingverify_bundle,inspect_seq,check_coverage, andcheck_compliancewith zero extra dependencies and zero network calls. - Two validated Kiro custom agents (
.kiro/agents/security-auditor.jsonandevidence-builder.json, verified viakiro-cli agent validate). - An installable Kiro Power (
.kiro/powers/anchora/POWER.md) so developers can extend@anchora/coreinto a third domain app in three steps. - A verifiable Kiro Build Trail (
packages/core/data/kiro-audit.bundle.json), recording Anchora's own build milestones in the exact same Ed25519-sealed format.
Running kiro-cli chat --agent security-auditor verified both bundle.json (500 events, PASS) and kiro-audit.bundle.json (24 events, PASS) plus 0 coverage gaps via MCP — and cleanly refused to claim results for a shell command blocked by non-interactive permissions.
What Kiro Caught vs. What Humans Caught
Kiro's hook loop caught its own fast-check v3 API mistake immediately by executing the suite instead of guessing. Meanwhile, human review caught a subtle semantic bug: an in-place lawful erasure that re-hashes its row leaves a matching hash, so the verifier had to report declared lawful markers independently of the mismatch loop.
Both the demo and the offline CLI (npm run verify:bundle -- packages/core/data/bundle.json) are MIT-licensed and open to inspect — no login, no server, just arithmetic you can re-run yourself.
