plugins/axiom-audit-pipelines/skills/using-audit-pipelines/SKILL.md
Use when a system makes procedural decisions that must be defensible after the fact — rule firings, governor decisions, state transitions, gate verdicts, eligibility determinations, automated approvals — and you need a verifiable provenance chain rather than ordinary observability. Use when an auditor, regulator, customer, or court might later ask "prove it" about a decision the system made. Use when retention, redaction, or right-to-be-forgotten obligations conflict naively with append-only storage. Do not use for ordinary observability or for system-level threat modelling.
npx skillsauth add tachyon-beep/skillpacks using-audit-pipelinesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Procedural decisions are first-class artifacts. Every decision has a verifiable provenance chain.
This pack treats the decision — not the log line that mentions it — as the unit of evidence. A decision-log entry binds together inputs, the rule or policy version, the code version, the output, and a timestamp; entries are canonically encoded, fingerprinted, and chained so that tampering, replay, partial deletion, or time-shift becomes detectable. Exports carry their own integrity proofs so a downstream consumer can verify a subset without re-trusting the producer.
This is the evidence counterpart to security architecture's controls:
ordis-security-architect answers what must be protected and how — threat models of the system, controls at trust boundaries, defense-in-depth design.axiom-audit-pipelines (this pack) answers what proves a decision happened, with what inputs, under which ruleset version and code version — and how that proof survives review, export, partial deletion, and adversarial scrutiny.ordis-security-architect. Cross-link the two; do not duplicate STRIDE tables.Use this pack when:
Do not use this pack when:
/security-architectaudit-aware-logging-vs-observability.md to understand why those are different problems, then use ordinary observability toolingIf your input is a system that already makes decisions and you have not run this pack before:
decision-log-architecture.md — define what counts as a decision in this system, choose entry shape, emit 00-scope-and-decisions.md and 01-decision-log-schema.md.canonical-encoding-for-fingerprinting.md — pick the canonicalisation form (RFC8785 JCS unless you can defend an alternative), enumerate float / map / timezone gotchas, emit 02-canonical-encoding-spec.md.fingerprint-chains-and-integrity.md — choose chain construction (linked hash vs Merkle), recovery-from-gaps strategy, partial-trust verification model, emit 03-chain-and-integrity-spec.md.99-audit-pipeline-specification.md ready.Steps 1–3 are the spike: if those three artifacts hold together, the rest is fill-in. If they don't, no later sheet can save you.
All reference sheets are in the same directory as this SKILL.md. When you see a link like [canonical-encoding-for-fingerprinting.md](canonical-encoding-for-fingerprinting.md), read the file from the same directory.
ordis-security-architect (controls) axiom-audit-pipelines (evidence)
threat-models the SYSTEM ←-cross-ref-→ threat-models the LOG
designs controls at boundaries designs canonical encoding,
chain, signing, retention
replay, perf budget
─────────────────────────────────────────────────────────────────────
↓
axiom-solution-architect picks up:
17-risk-register.md cites threats from BOTH packs
04-solution-overview.md cites the audit-pipeline spec
ADRs cite chain construction, canonical-encoding choice
The pack produces a numbered artifact set in an audit-pipeline/ workspace:
| # | Artifact | Producer skill |
|---|----------|----------------|
| 00 | scope-and-decisions.md | decision-log-architecture |
| 01 | decision-log-schema.md | decision-log-architecture |
| 02 | canonical-encoding-spec.md | canonical-encoding-for-fingerprinting |
| 03 | chain-and-integrity-spec.md | fingerprint-chains-and-integrity |
| 04 | signing-and-export-spec.md | signing-and-export-integrity |
| 05 | provenance-bindings.md | decision-provenance |
| 06 | storage-and-retention.md | immutable-storage-patterns + retention-expiry-and-rtbf |
| 07 | threat-model.md | threat-model-for-audit-logs |
| 08 | replay-capability.md | partial-replay-from-trail |
| 09 | audit-vs-observability-boundary.md | audit-aware-logging-vs-observability |
| 10 | performance-budget.md | performance-budget-for-audit-grade-pipelines |
| 99 | audit-pipeline-specification.md | router-owned consolidation (this SKILL.md) |
The numbered artifacts are not independent — changes propagate. Read this before editing any spec.
02-canonical-encoding-spec.md (the bytes)
│
▼
01-decision-log-schema.md (what fields, in what canonical bytes)
│
▼
03-chain-and-integrity-spec.md (hash over those bytes, chain construction)
│
▼
04-signing-and-export-spec.md (signature over hash, export format)
│
▼
05-provenance-bindings.md (input/ruleset/code closure over the entry)
│
▼
08-replay-capability.md (replay reads canonical bytes by version)
Coordinated re-emission rules:
| If you change | You also re-emit | Chain-breaking? |
|---------------|------------------|------------------|
| 02- canonicalisation rule | 01- (entry_version bump) and 03- (chain-breaking event note) | Yes |
| 01- mandatory field added/removed/renamed | 02- if encoding rule affected, 03- (chain-breaking event note) | Yes |
| 03- hash function changed | 01- if inputs_commitment.ref.hash was that function, 04- signature-over-hash recomputation | Yes |
| 03- chain construction changed (linked-hash → Merkle) | 04- export format, 08- replay traversal | Yes (with documented transition) |
| 04- signature scheme changed | 06- if signature material is held in storage, 07- adversary update | No (chain-side unaffected) |
| 06- retention class redrawn | 07- partial-deletion threat, 08- replay coverage shrinks | No |
A change not listed above is not exempt; it gets evaluated against the chain-breaking-event rule in 03- and against the consistency gate's affected checks. The default for ambiguity is "treat as chain-breaking" — it is cheap to over-document a transition and expensive to under-document one.
Every workflow is classified during decision-log-architecture and recorded in 00-scope-and-decisions.md. The tier determines which artifacts are required by the consistency gate.
| Tier | Trigger | Required artifacts |
|------|---------|--------------------|
| XS | Single decision type, single producer, no export, internal-only | 00, 01, 02, 03, 06; 99 is a one-page memo |
| S | Multiple decision types under one ruleset, no cross-system export | XS set + 04, 07, 09 |
| M | Decisions consumed by a downstream system or persisted across deploys | S set + 05, 08, 10 |
| L | Decisions are subject to regulatory audit, external export, or legal hold | M set + full 07-threat-model.md (not summary), explicit cryptographic agility plan in 04-, documented incident-response runbook in 06- |
| XL | Decisions feed an external regulator's pipeline, ATO/RMF process, or court evidence | L set + signed-export key-rotation runbook, third-party verifier compatibility statement, retention-vs-RTBF reconciliation memo with named legal authority |
Tier is authoritative. If any sheet's guidance forces an artifact above your declared tier, that artifact becomes required — this is a tier promotion, not a waiver.
decision-log-architecture → 00-, 01- (also classifies the tier)canonical-encoding-for-fingerprinting → 02-fingerprint-chains-and-integrity → 03-signing-and-export-integrity → 04- (S tier and above)decision-provenance → 05- (M tier and above)immutable-storage-patterns + retention-expiry-and-rtbf → 06-threat-model-for-audit-logs → 07- (always at least summary; full document at L+)partial-replay-from-trail → 08- (M tier and above)audit-aware-logging-vs-observability → 09- (the delineation sheet — write last)performance-budget-for-audit-grade-pipelines → 10- (M tier and above)99-audit-pipeline-specification.md and run the consistency gate below.Use the /verify-integrity slash command, which dispatches the integrity-auditor agent against an existing trail directory.
Use the audit-architecture-reviewer agent. Provide the system's design artifacts (a SAD, an HLD, or a code map) and it reports decision points lacking provenance, with severity.
Use the /scaffold-audit-trail slash command. It drops in canonical-encoding, chain, and storage scaffolding aligned to your declared tier; it does not replace the design artifacts above — it implements them.
Use the /design-decision-log slash command. It runs an interactive elicitation: which producers, which decision types, which fields are mandatory, where the boundary sits. Output feeds decision-log-architecture step 1.
agent: audit-architecture-reviewer — Reviews a system for decision points lacking provenance. Reads design artifacts, reports gaps with severity. Invoked via /scaffold-audit-trail's gap-analysis option or directly via the Task tool.agent: integrity-auditor — Runs verification on a real trail and reports gaps, signature mismatches, chain breaks, and recovery scope. Invoked via /verify-integrity.Agents vs. skills: Skills produce design artifacts (the spec). Agents audit or critique either a design or a running trail. Load a skill when designing; dispatch an agent when reviewing.
Run before emitting 99-audit-pipeline-specification.md. Each check produces a pass/fail line in the gate report. Failures must be addressed or recorded as explicit waivers (with reactivation conditions); silent drops are the failure mode this pack exists to prevent.
| # | Check | Question |
|---|-------|----------|
| 1 | Tier coverage | Every artifact required by the declared tier exists. |
| 2 | Schema completeness | Every field promised in 01-decision-log-schema.md is producible by the system as described in 00-scope-and-decisions.md. No "TBD" in mandatory fields. |
| 3 | Encoding determinism | 02- names the canonicalisation form (RFC8785 JCS or alternative with rationale), and addresses every gotcha class enumerated in canonical-encoding-for-fingerprinting.md: floats, map ordering, timezones, Unicode normalization, integer width. |
| 4 | Chain integrity | 03- specifies chain construction, gap-recovery procedure, partial-trust verification, and clock dependence — and 04- (if present) is consistent with 03- on signature granularity. |
| 5 | Provenance closure | 05- (M+) closes the loop: every output in the schema can be traced to its inputs, ruleset version, and code version. No dangling outputs. |
| 6 | Retention / RTBF reconciliation | 06- resolves the apparent contradiction between append-only and right-to-be-forgotten with a named mechanism (cryptographic erasure, redaction-with-witness, segregated PII, or legal-authority-recorded waiver). The mechanism is named, not hand-waved. |
| 7 | Threat coverage | 07- covers the standard adversaries (tamper, replay, time-shift, partial deletion, key compromise, insider). Each has a control or an explicit accepted-risk entry. |
| 8 | Replay scope honesty | 08- (M+) states what can and cannot be replayed from N entries, and where state outside the trail is required. No "fully replayable" claims without a state-coverage proof. |
| 9 | Boundary clarity | 09- distinguishes audit-grade events from ordinary observability events with a stable rule, not a slogan. The rule is testable: a developer reading it can correctly classify a new event class. |
| 10 | Performance honesty | 10- (M+) states amortisation strategy, write/read budgets, and the pipeline's behaviour under burst load. "Stream everything" or "batch everything" without numbers fails the check. |
| 11 | Cross-pack handoff | If ordis-security-architect artifacts exist for the same system, 07- cross-references the system threat model rather than duplicating it. If axiom-solution-architect artifacts exist, 99- is cited from 04-solution-overview.md and from any ADR that touches the audit subsystem. |
A 99-audit-pipeline-specification.md whose gate report is older than its latest numbered artifact is stale and must be re-gated before downstream citation.
| Change shape | Re-run | Re-gate |
|--------------|--------|---------|
| New decision type | 00-, 01-, 05- cross-ref | Checks 1, 2, 5 |
| New field on existing decision | 01-, 02- if encoding rule affected, 08- if replay-relevant | Checks 2, 3, 8 |
| Canonicalisation form change | 02-, 03- (chain re-verification on legacy entries), 04- | Checks 3, 4 |
| Chain construction change | 03-, 04-, 08-, migration plan in 99- | Checks 4, 8 |
| Key rotation event | 04-, 06- if rotation drives storage layout, 07- adversary update | Checks 4, 6, 7 |
| Retention policy change | 06-, 08- (replay coverage shrinks), 07- (partial-deletion threat) | Checks 6, 7, 8 |
| New regulator obligation | 00- tier may promote, 06-, 07- | Re-gate at promoted tier |
| New downstream consumer of exports | 04-, 05- (exposure surface), 09- (boundary may shift) | Checks 4, 5, 9 |
Bump the 99- semver on every re-emission. Re-gate before downstream citation.
| Condition | Response |
|-----------|----------|
| The system makes no decisions a regulator/auditor/customer would ask "prove it" about | Stop. The system needs ordinary observability, not an audit pipeline. Record the determination in a one-page memo. |
| Decisions are too low-level to log atomically (per-tick simulation, per-microsecond control loop) | Aggregate to the meaningful decision boundary (the trade, the verdict, the dispatch) and log there. Log the aggregation rule. Do not log every tick. |
| Append-only conflicts with regulator's RTBF requirement and legal authority is unclear | Stop at 06-. Escalate to legal/compliance owner. Do not improvise a redaction scheme. |
| Required cryptographic agility (post-quantum readiness) is unsettled | Record current choice in 04- with explicit crypto-agility-plan: deferred-to-vN+1, raise risk in 07-, proceed. Do not block on speculative cryptography. |
| Performance budget is impossible at the proposed entry shape | Return to 01- and consider summary entries with on-demand detail expansion, or per-class entry shapes. Do not silently drop entries to fit. |
Does the system make decisions someone might later need to verify?
├─ No → wrong pack; use ordinary observability
└─ Yes → Continue
Are decisions exposed to a regulator, auditor, or external party?
├─ No → tier XS or S likely
└─ Yes → tier M, L, or XL — full pipeline required
Is there an existing trail you need to verify, not design?
├─ Yes → /verify-integrity (integrity-auditor agent)
└─ No → Continue
Is there a system design you suspect is under-instrumented?
├─ Yes → audit-architecture-reviewer agent (gap report)
└─ No → /design-decision-log (interactive) → decision-log-architecture skill
ordis produces system threat model + control set
→ this pack reads them; threat-model-for-audit-logs cross-references rather than duplicates
→ this pack produces 07-threat-model.md (the log itself)
→ ordis can then add controls protecting log integrity (HSM, write-once media, signing service)
The boundary: ordis owns system threat modelling and control design; this pack owns audit-log threat modelling and the design of the evidence itself. They cross-link.
solution-architect's 04-solution-overview.md cites this pack's 99-
solution-architect's adrs/ cite specific choices (RFC8785, chain shape, signature scheme)
solution-architect's 17-risk-register.md cites threats from both this pack's 07- and ordis' threat model
If solution-architect is in play and the system has procedural decisions, this pack's 99- is a normal input to 04- and to ADRs.
axiom-determinism-and-replay designs replayable systems
(seeds, RNG isolation, snapshots, divergence detection)
→ this pack designs the audit trail of decisions made by such systems
→ replay-from-audit (this pack's 08-) reconstructs decisions from the trail
→ replay-for-debugging (determinism pack) reconstructs system state from inputs
→ different questions, different scopes, cross-link in 99-
The boundary: this pack records what was decided; the determinism pack arranges that, given recorded inputs, the system would behave the same way again. A system that uses both packs has evidence of decisions and reproducibility of behaviour, and the consistency between them is itself an audit-grade property.
this pack produces 99-audit-pipeline-specification.md
→ sdlc-engineering manages spec lifecycle (versioning, ADR for material changes,
retention policy of the spec itself separate from retention of the trail)
When a framework drives the requirement (SOC 2, HIPAA, PCI-DSS, GDPR, EU AI Act, NIS2), record the framework as the originating constraint in 00-scope-and-decisions.md. Trace it through 01- (which fields the framework requires), 06- (retention obligations), and 07- (the compliance-exposure threat).
Audit-grade pipelines and ordinary observability share infrastructure (storage, dashboards, alerts) but are different problems. Read 09-audit-vs-observability-boundary.md for the rule. Common failure mode: cramming audit obligations into the observability stack, or routing observability noise through the audit pipeline. Either kills both.
| Need | Use This |
|------|----------|
| Define what counts as a decision | decision-log-architecture |
| Pick canonical encoding (RFC8785 etc.) | canonical-encoding-for-fingerprinting |
| Construct the chain (linked vs Merkle) | fingerprint-chains-and-integrity |
| Sign exports / rotate keys / partial export | signing-and-export-integrity |
| Bind decision to inputs + ruleset + code | decision-provenance |
| Append-only storage at rest | immutable-storage-patterns |
| Distinguish audit from observability | audit-aware-logging-vs-observability |
| Threat-model the audit log itself | threat-model-for-audit-logs |
| Reconcile retention with right-to-be-forgotten | retention-expiry-and-rtbf |
| Replay state from N entries | partial-replay-from-trail |
| Decide stream vs amortise | performance-budget-for-audit-grade-pipelines |
| Verify an existing trail | agent: integrity-auditor (/verify-integrity) |
| Find decision points lacking provenance | agent: audit-architecture-reviewer |
| Drop in scaffolding for a new component | command: /scaffold-audit-trail |
| Interactive: what counts as a decision | command: /design-decision-log |
Decisions are evidence. Evidence is canonical bytes, chained fingerprints, signed exports, named retention, modelled adversaries, replayable scope, and budgeted performance — produced as a specification before code is written, gated for consistency before citation downstream.
After routing, load the appropriate specialist sheet for detailed guidance:
tools
Use when designing, implementing, or auditing an MCP (Model Context Protocol) server — tool API design, idempotency under agent retry, structured error envelopes agents can recover from, schema versioning across model drift, transport reliability (stdio / HTTP), output-shape and pagination discipline, and choosing between tools / resources / prompts / sampling. Also use when an MCP server's tools confuse agents, return unstructured errors, deadlock under concurrent calls, double-execute under retry, or lose state across reconnects. Do not use for general REST/GraphQL API design (use `/web-backend`), for client-side prompt engineering or tool-loop design (use `/llm-specialist`), for general in-process plugin architecture (use `/system-architect`), or for cryptographic-provenance audit trails (use `/audit-pipelines`).
development
Use when running **SQLite or DuckDB inside an application process** as the durable store — not as a development convenience but as the production database. Use when scaling an SQLite layer that worked at low concurrency and is now hitting SQLITE_BUSY, WAL bloat, lock contention, schema-migration ceremony, or correctness gaps under multi-process writers. Use when introducing DuckDB as an OLAP complement to an OLTP SQLite store, or when picking between the two for a new component. Pairs with `/web-backend` (the API surface above the DB) and `/audit-pipelines` (when the DB is also the audit trail). Do not load for server databases (Postgres, MySQL), key-value stores, or ORM choice in isolation.
development
Use when designing or critiquing the structure of a staged procedure — a wizard, configuration flow, troubleshooting tree, training curriculum, multi-stage approval pipeline, decision pipeline, or any decomposition of expert work into composable stages. Use for both producer work (build the decomposition) and critic work (audit a proposed decomposition). Use when reasoning about capacity, bottlenecks, or soundness of a procedural flow. Do not use for implementation-plan critique of code changes (use `/axiom-planning` instead), for execution-time dynamics (use `/simulation-foundations`), or for rendering an already-designed procedure as docs or UI (use `/technical-writer` or `/ux-designer`).
testing
Use when the user wants to draft fiction or creative nonfiction prose, get craft critique on prose they have written, or plan story structure, outline, or premise. Workshop-voiced. Three explicit modes (draft, critique, plan) and the router will refuse to begin work without a declared mode.