wall-scope-derivation
Goal
Derive the problem symbol-set (the wall) a grind plateau is stuck against, from the ledger corpus, plan-agnostically, with a fallback chain — the foundation the microscope dossier is scoped to.
Implementation Sketch
- New module scripts/ledger_evolution_runtime/problem_scope.py (SRP: keeps state.py serving_surface_gate clean).
- Source the wall from the assembled corpus: dead-end signatures + recent REVERTED/INERT cycle entries; collect typed links[].symbol ids (learning-ledger.md §4 symbol link type).
- Best-effort graph verification; degrade-to-include on graph-down.
- Return a
: target consumable by intel_package_runtime; fallback symbol-set -> subsystem -> None.
Spec References
- learning-ledger.md §4 (typed links: symbol = intel-graph symbol id), §11.4 (dead-end / constraint_audit).
- scripts/ledger_evolution_runtime/state.py (assemble_corpus), pipeline.py (_dead_end_signatures).
- scripts/intel_package_runtime/target_kinds.py (symbol-set / subsystem kinds), target_resolve.py.
- script-first.md §11 (plan-agnostic / domain-agnostic tooling).
Work Items
- Author scripts/ledger_evolution_runtime/problem_scope.py: derive_problem_scope(corpus, plan_dir, *, query_intel=None) -> str | None; collect dead-end signatures + recent REVERTED/INERT cycle entries and their typed links[].symbol ids from the assembled corpus.
- Graph-verify candidate symbols best-effort via scripts/intel-query.sh (existence check); drop unverifiable; degrade-to-include when the graph is down (a missing graph NEVER false-suppresses a symbol).
- Fallback chain returning a
: target: symbol-set: -> subsystem: from the plan owns_crates/conceptual_integrity_owner -> None (skip; section dossier only). - Plan-agnostic per script-first.md §11: NO plan-id / domain-term branch. pytest matrix in tests/test_problem_scope.py: wall-with-symbols / wall-without-symbols->subsystem / no-wall->None / graph-down->degrade.
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “evolution-candidate-intel-package/s-c7d06c93” }, “generated_at”: “2026-06-29T19:46:08.395822+00:00”, “graph_state”: { “head_sha”: “72ec9529”, “last_code_import_at”: “2026-06-29T19:42:46.062Z”, “embedding_stale”: true, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:evolution-candidate-intel-package/s-c7d06c93] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “constrained_symbols”: [ “assemble_corpus”, “serving_surface_gate”, “compose_dead_ends_ledger”, “ledger_decay” ], “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/evolution-candidate-intel-package” } } }
(full dossier: wall-scope-derivation—s-c7d06c93.intel.json)