50%

Section 01: Intel-package constrained_symbols output contract (step-0 precondition)

Goal

Make the per-section dossier carry a machine-readable constrained_symbols / do_not_touch list so a downstream constraint check reads structured data, never prose. This is the registry’s source-(a) feed and the hard precondition for every later section.

Implementation Sketch

Net-new key on the dossier dict (the dict is already an unvalidated extra the runtime validate_envelope ignores; package.schema.json does not list dossier). objective_symbols + tier rows are already structured; constrained_symbols is the new do-not-touch concept. Extractor reads from .intel.json, not the prose VERDICT block.

Spec References

scripts/intel_package_runtime/envelope.py (build_dossier:221, build_envelope:274, validate_envelope:354); scripts/intel_package_runtime/package.schema.json; scripts/intel_package_runtime/render.py.

Work Items

  • TDD-first: pin that build_dossier emits a machine-readable dossier.constrained_symbols list (and/or do_not_touch) read straight from the .intel.json envelope, no prose parse — failing test in scripts/intel_package_runtime/tests/.
  • Add constrained_symbols/do_not_touch as a net-new key on the dossier dict returned by build_dossier (envelope.py:221), sibling to objective_symbols/tiers/resolution/defect; the agent-authored dossier populates it from VERDICT ‘do-not-touch / known-dead-end / prefer-X’ findings. Confirm validate_envelope (runtime SSOT) accepts it; reconcile package.schema.json if a strict validator is wired.
  • Author the mechanical extractor (scripts/intel_package_runtime/) that reads constrained_symbols from a section’s .intel.json envelope; unit-tested on a fixture dossier.

Items

  • TDD-first failing test in scripts/intel_package_runtime/tests/: pin that an agent-authored dossier carrying a do-not-touch / known-dead-end VERDICT finding surfaces as a NON-EMPTY, machine-readable constrained_symbols list on the persisted .intel.json envelope (round-tripped via load_package), read from structured data with NO prose parse. The test MUST fail today: build_dossier (envelope.py:260) emits constrained_symbols=[] from an unpopulated getattr(res, 'constrained_symbols', None) stub — assert the populated value, never mere key presence (a presence-only pin is false-green / INVERTED-TDD against the existing Seam-1 default-[] skeleton).
  • Wire the PRODUCTION population path for the already-existing constrained_symbols dossier key (envelope.py:260 Seam-1 skeleton, sibling to objective_symbols/tiers/resolution/defect): replace the unpopulated getattr(res, 'constrained_symbols', None) stub so the key carries the agent-authored dossier’s structured do-not-touch / known-dead-end / prefer-X findings. Confirm validate_envelope (runtime SSOT) accepts the field and load_package round-trips it (already proven by test_forward_coherence_acceptance.py’s hand-injected fixture, line 67/83); reconcile package.schema.json (currently omits the dossier extra) if a strict validator is wired.
  • Instruct the intel-package authoring agent to EMIT structured constrained_symbols — the section goal’s named source-(a) feed: update scripts/intel_package_runtime/compose_prompt.py + the dossier template so the agent records its do-not-touch / known-dead-end / prefer-X VERDICT findings as a machine-readable list, not only prose. Without this the production dossier’s constrained_symbols stays [] and the binding-constraint loop never fires on real plans — today the north-star (sc-fc0acce5) passes ONLY via the test fixture’s hand-injected value (test_forward_coherence_acceptance.py:83). This is the missing producer end that closes the contract: agent emits -> build_dossier carries -> route_walk consumes.

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “plan-forward-coherence/s-33435c75” }, “generated_at”: “2026-06-25T23:45:38.302053+00:00”, “graph_state”: { “head_sha”: “8f006d26”, “last_code_import_at”: “2026-06-25T23:42:53.617Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:plan-forward-coherence/s-33435c75] 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/plan-forward-coherence” } } }

(full dossier: intel-constrained-symbols-contract—s-33435c75.intel.json)