100%

Authoring view + scope split

Goal

Deliver right-rule-at-right-time: every rule record carries scope (authoring|review|both); generate a SECOND view impl-hygiene-authoring.md containing only authoring/both rules, carrying paths: compiler_repo/compiler/** frontmatter so it auto-loads during compiler-source authoring; and move the full review catalog off compiler-source autoload (today impl-hygiene.md itself auto-loads its full 1,334 lines on every .rs edit).

Implementation Sketch

Audit each record’s scope (default review; promote authoring-relevant positive-guidance rules to authoring/both). Author generator.py:render_authoring_md() emitting only scope in {authoring, both} with paths: frontmatter. Change the generated impl-hygiene.md frontmatter so the full catalog no longer carries the compiler-source paths: glob (the review catalog loads at review time / explicit @-include, not on every authoring edit). Test: authoring view excludes every review-only rule; authoring view has the compiler paths: block; review catalog does not auto-load on compiler source.

Spec References

.claude/rules/impl-hygiene.md:1-8 (current paths: frontmatter that over-loads authoring context); scripts/prose-lint.py:54-63 (path->context mapping precedent); native paths: autoload behavior (.claude/rules/aot.md exemplar).

Work Items

  • Tag every rule record with scope: authoring|review|both (default review; positive-guidance rules promoted).
  • Author render_authoring_md(): authoring/both rules only + paths: compiler_repo/compiler/** frontmatter.
  • Remove the compiler-source paths: glob from the generated review catalog; test scope partition + autoload split.

Success Criteria

  • [sc-19356461] Authoring view carries only authoring-scoped rules + compiler paths; full catalog off compiler autoload. (probe: pytest scripts/impl_hygiene_rules_runtime/tests/test_authoring_view.py -q; expect: passed)

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “impl-hygiene-rules-as-data/s-51a06b38” }, “generated_at”: “2026-06-21T05:31:44.217963+00:00”, “graph_state”: { “head_sha”: “b0bd51a8”, “last_code_import_at”: “2026-06-21T05:27:29.206Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:impl-hygiene-rules-as-data/s-51a06b38] 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: authoring-view-scope-split—s-51a06b38.intel.json)