LLM-narrowing candidate queries + web/issue intelligence
Goal
For every llm-only rule, build the graph-NARROWING candidate query that points the LLM at exactly where to look, plus wire web/issue intelligence (similar/search/fixed) for prior-art on a candidate — the ‘graph assists where LLM judgment is needed’ half of the mission.
Implementation Sketch
Each narrowing query emits a ranked candidate file:line set the engine hands the LLM; no blind walk. Web-intel surfaces prior-art into the LLM dispatch context.
Spec References
intel-query.sh cypher/similar/search/fixed; compose-intel-summary.md; llm-only descriptors from section 02.
Work Items
- Narrowing queries: INVERTED-TDD-deep (test symbols x assertion density), WASTE:defensive-impossible-state (uniform Result-wrapping over exhaustive types), NAMING:domain-mismatched (name<->signature divergence), LEAK:validation-bypass (consumption-site validation vs canonical validator), AIMS-ad-hoc-emission (CALLS into emit fns outside the burden path).
- Each narrowing query emits a ranked candidate file:line set the engine hands the LLM — no blind file walk.
- Web/issue intelligence wiring: for a candidate, similar/search/fixed prior-art surfaced into the LLM dispatch context (the intel-graph web-search intelligence mechanism).
- Tests: each narrowing query returns the expected candidate set on a fixture; degradation when graph down.
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “graph-driven-hygiene/s-f42f39a4” }, “generated_at”: “2026-06-22T05:28:47.677273+00:00”, “graph_state”: { “head_sha”: “9e4174b6”, “last_code_import_at”: “2026-06-22T05:14:59.715Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:graph-driven-hygiene/s-f42f39a4] 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: llm-narrowing—s-f42f39a4.intel.json)