100%

impl_hygiene_review_runtime tier-restructure

Goal

Replace the file x batch matrix (the abandoned approach) with the descriptor-driven tier engine the rules JSON drives, and slim the skill body (script-first). The engine iterates RULES, not files.

Implementation Sketch

Tier engine reads every descriptor; runs graph-native (auto-emit verified), graph-assist (batched cheap verify), consumes Phase-0 ast-lint output, dispatches LLM ONLY on graph-narrowed candidates. Preserve verify-gate, degradation, and the caller-compatible exit-state schema.

Spec References

.claude/rules/script-first.md §1/§3; workflow-ownership.md; impl_hygiene_review_runtime/{dispatch,gates,state}.py; impl-hygiene-review/SKILL.md + phase docs.

Work Items

  • Tier engine: read every rule’s detection descriptor; run graph-native detectors (auto-emit verified), graph-assist (batched cheap verify), consume Phase-0 ast-lint output, dispatch LLM ONLY on graph-narrowed candidates for llm-only rules.
  • Remove the scope_files x RULE_BATCHES cell matrix + the per-cell file-walk dispatch; the engine iterates RULES, not files.
  • Preserve the verify-gate (drop-unless-verified) + graceful degradation + the structured exit-state schema (caller-compatible: /continue-roadmap, /fix-bug Phase 4).
  • Slim SKILL.md body to the descriptor-driven dispatch (script-first §1/§3); remove matrix-walk prose; @-include compliance.
  • Tests: tier-engine dispatch routing; —self-test; skill_audit script_first_audit clean.

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “graph-driven-hygiene/s-a795e9ad” }, “generated_at”: “2026-06-22T05:54:23.188609+00:00”, “graph_state”: { “head_sha”: “9e4174b6”, “last_code_import_at”: “2026-06-22T05:33:59.274Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:graph-driven-hygiene/s-a795e9ad] 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/graph-driven-hygiene” } } }

(full dossier: runtime-restructure—s-a795e9ad.intel.json)