100%

Section 01 — rules-md-and-parser

Goal

Install the approved 460-rule impl-hygiene.md and a parser that enforces the PREFIX-NN schema as an invariant.

Implementation Sketch

Install materials/impl-hygiene-proposed.md as .claude/rules/impl-hygiene.md (frontmatter paths + H1 + 13 prefix headers + PREFIX-NN bullets). Build a parser: ## PREFIX — Title -> category, - PREFIX-NN[ (was ...)]: text -> rule. Validator rejects any non-conforming line and asserts every category prefix matches its header; expose the parsed rule set as the SOLE rule source.

Spec References

The approved schema at materials/impl-hygiene-proposed.md + materials/impl-hygiene-mapping-report.md; routing.md §1.0 (rule file is not a plan artifact).

Work Items

  • Install the approved impl-hygiene.md schema as the rule SSOT
  • Build the markdown parser (headers->categories, bullets->rules) returning the structured rule set
  • Build the PREFIX-NN schema-invariant validator (every bullet conforms; prefix matches header; pytest coverage)

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “impl-hygiene-rewrite-v3/s-cc065627” }, “generated_at”: “2026-06-23T02:43:52.439593+00:00”, “graph_state”: { “head_sha”: “ddf60faa”, “last_code_import_at”: “2026-06-23T02:43:45.2Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:impl-hygiene-rewrite-v3/s-cc065627] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/impl-hygiene-rewrite-v3” } } }

(full dossier: rules-md-and-parser—s-cc065627.intel.json)