Institute of English Studies · University of Łódź
The auditing capability did not originate from a design document. It emerged from a failed first attempt and from successive discoveries of failure modes in other team systems. Between 2026-04-01 and 2026-05-12, the practice developed from ad-hoc file review into a systematic discipline with defined audit types, control families, risk codes, and a reproducible report format. This document records that evolution and the current state of the auditing system.
The first audit failed. The internal auditor went overdue by more than an hour, and the orchestrator agent had to complete the work emergently. The only structural rule that emerged was the Time-Boxed Delivery Rule: when a deadline approaches, deliver partial findings with a revised ETA rather than letting perfection block delivery.
Two audits on the same day established the first repeatable patterns. A CLAUDE.md audit revealed that the router file had become an encyclopedia — 42,000+ characters with duplicated blocks — producing the principle that long-form protocols belong in workflow files. A mining workflow audit revealed that a data-flow rewrite had not been propagated to dependent files, producing the migration checklist pattern: list every file that references a changed concept, then verify each.
A series of deep technical audits transformed practice from spot-checking into systematic discipline. Key methodologies that emerged:
grep-based extraction and diff for large-file audits — efficient for cross-referencing claims against sources at scale.By the end of this phase, the auditor's memory contained codified Proven Patterns: a Migration Audit Protocol, KB Health Check Indicators, and Efficient File Comparison techniques.
The auditing system upgraded to cross-system verification with two major additions:
Key lessons from this phase:
Audits are triggered by specific events:
The auditing skill (.claude/skills/auditing/SKILL.md, version 1.0) is the canonical operational document that governs how the internal auditor conducts every audit. It is loaded at the start of every audit task.
| Type | Scope | Trigger |
|---|---|---|
| Internal | Files, profiles, workflows, configurations within the workspace | Profile change, CLAUDE.md change, workflow change, folder change, or ad-hoc owner request |
| External Benchmark | Internal systems compared against external standards or frameworks | Audit scope explicitly requires industry benchmarking, or owner requests external comparison |
| Cross-System | Systems spanning multiple agents, workflows, or handoff points | Audit covers 2+ agents or their interactions, or owner requests cross-system review |
Eight control families govern the scope of audit coverage:
CLAUDE.md, settings, agent definitions, and workflows aligned. No silent divergence.Fourteen risk codes map to the control families:
| Code | Risk Name | Control Family |
|---|---|---|
| R-01 | Orphaned Cross-Reference | KB Integrity |
| R-02 | Undocumented Handoff | Workflow Handoff Safety |
| R-03 | Permission Escalation | Agent Governance |
| R-04 | Token Limit Mismatch | Configuration Consistency |
| R-05 | Skill Injection Vulnerability | Skill Security |
| R-06 | Configuration Drift | Configuration Consistency |
| R-07 | Silent Failure Continuation | Workflow Handoff Safety |
| R-08 | Broken Source Key Reference | KB Integrity |
| R-09 | ID Gap / Out-of-Sequence | KB Integrity |
| R-10 | Backup Convention Violation | Memory Hygiene |
| R-11 | Direct Quote Misclassification | Citation Accuracy |
| R-12 | Stale Cross-Reference | Configuration Consistency |
| R-13 | Missing Confirmation Gate | Workflow Handoff Safety |
| R-14 | Nested Ghost Directory | Memory Hygiene |
grep for pattern verification. Use wc, diff, hash comparison for file identity checks.CLAUDE.md, workflows, and profiles against actual file content. Record: implemented, partial, missing, contradicted.CLAUDE.md is implemented identically across all affected files. A single deviation is a typo; deviations across all instances are a structural problem.When auditing any skill file, check for:
eval, exec, dynamic code generationGrade each skill: PASS (no issues), WARN (minor issue, documented), FAIL (critical issue, immediate remediation).
File-State Sampling:
grep to locate target patterns before reading segments.Reproducibility Metadata Template:
Every audit report must include:
git rev-parse HEADsha256sum or md5sum)When audit scope requires external benchmarking:
The auditing system supports three audit types, eight control families, fourteen risk codes, and a reproducible six-section report format. Operational methodology includes the Five-Question Checklist, Consistency Matrix, Cross-System Methodology (Handoff Tracing, Session Verification, Multi-Agent Consistency, Red-Team Challenge Phase), Consultation Panels, External Benchmark Integration, and mandatory Reproducibility Metadata. A Skill Security Audit Gate grades skills PASS / WARN / FAIL. The internal auditor reports directly to the owner, preserving independence from the orchestrator agent.
The internal auditor has no execution authority: it only produces reports; remediation depends on the configuration agent, the orchestrator agent, or owner action. It conducts no external research directly; all external benchmarking routes through the researcher agent. It modifies no file except its own audit reports. Its workload analysis is observational, not predictive.
Owner's Inbox/.Every significant system overhaul left stale references behind. The lesson was learned incrementally and codified as the Migration Audit Protocol (five steps: grep -r for old pattern, categorise hits, update all active files, document historical hits, verify no critical paths stale). Yet the protocol was not always applied to the most consequential migrations. The gap between codified lessons and applied practice is itself a recurring theme.
A schema deviation found across multiple files would have been missed by sampling. A grep-based extraction of all source keys and IDs was necessary to catch orphan headers and broken references. The standing rule is explicit: "Read every instance, never spot-check." This represents a shift from sampling to census.
The absence of one quotation-mark verification rule in a mining skill produced a 76% false-positive rate across thousands of claims. The remediation philosophy shifted from per-claim correction to bulk-reclass + skill amendment: a single-rule omission with wide effect requires systemic remediation, not piecemeal editing. This pattern reappears in migration audits, where a single unpropagated path change breaks multiple operational files.
Early audits used qualitative language ("~6 large blocks", "~70% is rarely-needed"). Later audits used wc, diff, and exact line counts. The KISS audit established the first quantitative baseline (agent line counts, workflow line counts, skill line counts). The progression shows a shift from qualitative intuition to metric-driven assessment.
Folder overhauls consistently leave residue: ghost directories, stale references, orphaned files, empty sentinel files, binary debris. The standing rule: "Any future structural overhaul must include a final-sweep step verified by the internal auditor before declaring complete."
From the first audit, reports were intended for the owner directly. The current profile formalises this: The internal auditor reports directly to the owner. The orchestrator agent notifies the internal auditor of auditable events but does not filter, prioritise, or suppress findings. The external audit pipeline reinforces this separation: the researcher agent provides research, the internal auditor judges; neither makes the other's findings.
The 2026-04-01 overdue incident was the only audit ever marked failed. It directly caused the Time-Boxed Delivery Rule. No subsequent audit has failed to deliver. Early failures, when honestly recorded and structurally addressed, produce more durable improvements than incremental successes.
Cross-system audits consistently reveal that boundary files (agent profiles, skill files) accumulate redundancy because they are edited incrementally without a canonical source. This explains why multiple agents carry near-identical blocks, why profiles duplicate skills, and why index tables require manual curation. The recommended fix — dynamic index generation, canonical boilerplate files — has been proposed but not implemented.
Early audits used approximations. By mid-2026, audits included exact line counts, file hashes, commit SHAs, and exact line references. The KISS audit even included a self-applied red-team challenge asking whether quantitative miscounts undermine findings.
Each major methodological upgrade was a direct response to a failure detected in another team system. The auditing system is essentially a compendium of every other system's failure modes, reverse-engineered into checklists. This is not a weakness; it is the reason the methodology is grounded in verified incidents rather than abstract theory.
Source material includes internal audit reports, profile definitions, and skill files from April–May 2026.