Content migration — all categories + guidance
Goal
Migrate the entire ## Finding Categories taxonomy (all 26 top-level categories + every subcat) and the 38 guidance ## sections from impl-hygiene.md prose into impl-hygiene-rules.json. Tokens are an API contract: every category token and every normalized subcat token MUST be byte-stable (tests pin INVERTED-TDD:positive-test-modification, SCOPE_EXPANSION_FAILURE:litter-pickup, LEAK:algorithmic-duplication, etc.). Guidance sections become scoped records with their prose preserved in guidance.
Implementation Sketch
For each of the 26 categories, author its JSON record from the live markdown (severity_default from the Dflt: line; subcats from the - **Name** bullets normalized via the same lower+hyphen rule the parser uses; detect/cure/banned_phrases lifted from prose). For each of the 38 guidance sections, author a guidance record with scope set (most -> review; authoring-relevant ones -> both/authoring per §05). Verify against the live parser: the JSON-derived token set MUST equal _parse_impl_hygiene_categories(live impl-hygiene.md) exactly.
Spec References
.claude/rules/impl-hygiene.md (the source corpus); scripts/tpr_review_runtime/reviewer_history.py:100-102 (_normalize_subcat); test pins in scripts/tpr_review_runtime/tests/test_reviewer_history.py:80-115.
Work Items
- Migrate all 26 Finding Categories (tokens, subcats, severity_default, detect, cure, banned_phrases) into impl-hygiene-rules.json.
- Migrate the 38 guidance ## sections into scoped guidance records (guidance prose preserved verbatim).
- Token byte-stability test: JSON-derived token set == _parse_impl_hygiene_categories(live impl-hygiene.md); every pinned token present.
Success Criteria
- [sc-927a90a6] All 26 categories + every pinned subcat token present byte-stable in impl-hygiene-rules.json. (probe:
pytest scripts/impl_hygiene_rules_runtime/tests/test_token_stability.py -q; expect: passed)
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “impl-hygiene-rules-as-data/s-800e53e8” }, “generated_at”: “2026-06-21T05:01:37.442585+00:00”, “graph_state”: { “head_sha”: “b0bd51a8”, “last_code_import_at”: “2026-06-21T04:58:25.128Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:impl-hygiene-rules-as-data/s-800e53e8] 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-rules-as-data” } } }
(full dossier: content-migration—s-800e53e8.intel.json)