Skip to content

[EPIC] Wave 1 — make the corpus machine-readable and self-validating #1

Description

@rxavier1979

Epic. Children carry Refs #1; none of them Closes this.

Status: not started. Scoped from a four-pass analysis plus two full-corpus static diagnostic sweeps run 2026-08-20 against a7d7649.

Verified this session: every claim in the tables below was measured, not estimated. The diagnostic scripts are attached to issue #5.

Not verified: behavior on macOS; whether any past compression run was actually corrupted by the symlink defect (#3) — the released files are byte-identical to the workbench copies, so no evidence of damage exists and the exposure is prospective.

Goal

The corpus has no machine-readable surface. Every downstream capability — routing, measurement, enforcement, citation, telemetry, cross-domain forks — is blocked on that one fact.

Wave 1 produces dist/rules.json, dist/compatibility.json, and a lint that keeps them honest, plus the three hygiene fixes that would otherwise corrupt the output.

Wave 1 is additive-only: no file under the 14 book directories or docs/ changes except by generated-block insertion. This preserves the tracking-fork posture against mattpocock/agent-rules-books (decision 0001, issue #9).

What the diagnostic sweeps established

Clean — no work needed:

Check Result
H1 conformance (# OBEY …) 42/42 pass
mini/nano canonical 5-section shape 28/28 pass, zero deviation
Compatibility pair files present (C(14,2)) 91/91, zero missing, zero extra
Compatibility structural conformance 91/91 pass
Compatibility scores machine-extractable 91/91, zero parse failures
README local links resolve 64/64
COMPATIBILITY.md matrix links resolve 91/91
Workbench mini/nano vs released 0/28 diverged — byte-identical
Rule-count convention reproducibility deterministic; reproduced for 42/42

Defects — all in Wave 1 scope:

Finding Scale Issue
Working tree is CRLF; no .gitattributes; core.autocrlf=true 42/42 released files #2
_rule-workbench/*/full.md are 30-byte path stubs, not resolved symlinks 14/14 books #3
implementing-domain-driven-design mini traceability does not reconcile 18 decision-IDs vs 19 bullets; 12 trigger-IDs vs 10 bullets #4
refactoring-guru mini traceability does not reconcile 20 trigger-IDs vs 14 bullets #4
No NOTICE; CHANGELOG links resolve to ciembor/agent-rules-books 5 links #9
No AGENTS.md / CLAUDE.md in a repo about agent rules #10

Corpus scale: 3,421 full + 492 mini + 273 nano = 4,186 rules.

The correction worth reading before starting

An earlier analysis pass claimed the README release matrix had drifted from the actual files. It has not. A naive byte comparison reports 42/42 mismatches; every one is the CR bytes. All 42 reconcile exactly once normalized to LF, as do all 42 line counts and all 42 rule counts.

The README is correct as published. Do not "fix" it. See #2.

Dependency order

#1  epic
 ├─ #2  gitattributes + CRLF          <- blocks all byte-metric work
 ├─ #3  symlink removal               <- blocks workbench re-runs
 ├─ #4  traceability reconciliation   <- blocks #6
 ├─ #5  rules_lint.py                 <- encodes invariants; catches #2,#3,#4 mechanically
 ├─ #6  rule IDs in released files    <- depends #4
 ├─ #7  rules_build.py -> rules.json  <- depends #6
 ├─ #8  compatibility.json            <- independent, start anytime
 ├─ #9  NOTICE + changelog repoint    <- independent
 └─ #10 AGENTS.md + CLAUDE.md         <- independent

Critical path is #2#3#4#5. Issues #8, #9, #10 have no dependencies and can run in parallel from day one.

Review model for this wave

Single-operator repo. Per the operator's solution-delivery methodology, the documented light path (companion review only, no independent adversarial round) is taken for the doc-only and hygiene issues — #2, #3, #4, #9, #10 — and recorded here rather than left silent.

The issues that ship executable code — #5, #7, #8 — take the full loop: builder opens a PR and never merges, followed by an independent second-model adversarial audit before the merge decision. The auditor is never the model that built the artifact.

Exit criteria

Out of scope

full-tier rule IDs (222 distinct H2 headings across 14 files — needs its own normalization decision), the distillation-kit extraction (deferred until a second consumer exists), the router, telemetry, evals, and every domain fork.

Metadata

Metadata

Assignees

Labels

epicTracking issue with childrenwave:1Wave 1 — foundations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions