100%

SKILL.md Phase-3 rewrite: file x batch serial loop

Goal

Deliver the skill-rewrite piece of the file x rule-batch matrix walk for /impl-hygiene-review.

Implementation Sketch

Per the matrix-walk topology: the runtime (scripts/impl_hygiene_review_runtime/) owns the loop; the LLM gets ONE (anchor_file, rule_batch) cell per dispatch. The anchor file is the finding subject; the cell agent reads cross-file context freely (encouraged). Rule content renders from the JSON SSOT generator; per-cell findings flow through the shared finding_emit._classify_finding drop-unless-verified gate into both emission sinks (plan/bug §NN.R.H + raw-context report).

Spec References

  • .claude/rules/workflow-ownership.md §1 — the script owns the loop; one bounded cell per LLM dispatch.
  • .claude/rules/script-first.md §1 — orchestration lives in scripts/<skill>_runtime/.
  • scripts/impl_hygiene_rules_runtime/ — the JSON SSOT generator + category_tokens() (rule content for each batch).
  • Predecessor: plans/completed/impl-hygiene-rules-as-data (JSON SSOT + 5-batch decomposition + raw-context report sink).

Work Items

  • Rewrite SKILL.md Phase 3 to drive the file x batch serial loop (one Agent per assistant message)
  • Update phase-3-analysis.md for the per-cell anchor + cross-file-encouraged agent task
  • Preserve the SERIAL MANDATORY discipline; prose-lint clean

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “impl-hygiene-review-matrix-walk/s-74bd200c” }, “generated_at”: “2026-06-21T15:16:31.417755+00:00”, “graph_state”: { “head_sha”: “45796766”, “last_code_import_at”: “2026-06-21T15:16:19.842Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:impl-hygiene-review-matrix-walk/s-74bd200c] 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-review-matrix-walk” } } }

(full dossier: skill-rewrite—s-74bd200c.intel.json)