@@ -121,6 +121,177 @@ it, point Codex at the control protocol instead:
121121assets/protocol_assets/system/graph_population/v001/graph_population_control_protocol.md
122122```
123123
124+
125+ ## Post-Run Correction Directives
126+
127+ These directives are normative corrections from full-scale MAKE-GRAPH testing.
128+ They exist to prevent a contextless Codex from treating structurally valid JSON
129+ or raw record counts as semantic graph completion.
130+
131+ ### Post-Confirmation Materialization Gate
132+
133+ After graph intent is confirmed or explicitly authorized for inference, the next
134+ legal graph-building action is to materialize the graph intent contract and the
135+ initial bundle control surface. Source probing remains illegal until these
136+ artifacts exist in the generated bundle:
137+
138+ ``` text
139+ runs/<run_id>/reports/graph_intent_contract.md
140+ control_loop_plan.md
141+ runs/<run_id>/cursor.json
142+ runs/<run_id>/execution_log.md
143+ ```
144+
145+ The graph intent contract must include:
146+
147+ ``` text
148+ domain_label
149+ graph_intent_status
150+ intent_resolution_mode
151+ confirmed_or_authorized_lens
152+ included_lenses
153+ excluded_lenses
154+ ordinary_entity_scope
155+ relation_scope
156+ source_scope
157+ domain_membership_rule
158+ type_membership_rule
159+ edge_evidence_rule
160+ downstream_gate
161+ created_before_source_probe: true
162+ next_legal_action_after_contract
163+ ```
164+
165+ If source probing, source-adapter testing, type discovery, edge discovery,
166+ instance discovery, or graph JSON writing occurs before this materialization,
167+ stop with ` graph_intent_materialization_order_violation ` .
168+
169+ ### Markdown-First Source Reconnaissance Directive
170+
171+ Source reconnaissance must be planned in Markdown before it is executed. Codex
172+ must write these run artifacts before any source result influences graph shape:
173+
174+ ``` text
175+ runs/<run_id>/reports/source_reconnaissance_plan.md
176+ runs/<run_id>/reports/source_family_registry.md
177+ runs/<run_id>/reports/source_landscape_map.md
178+ runs/<run_id>/reports/source_adapter_recovery_plan.md
179+ runs/<run_id>/reports/source_strategy_decision_log.md
180+ runs/<run_id>/batch_packets/*.md
181+ ```
182+
183+ The source reconnaissance plan must define:
184+
185+ ``` text
186+ graph_intent_contract_path
187+ source_scope
188+ source_families
189+ source_adapters
190+ source_family_priority
191+ source_adapter_recovery_order
192+ minimum_domain_membership_evidence
193+ minimum_type_membership_evidence
194+ minimum_edge_pair_evidence
195+ batching_strategy
196+ failure_policy
197+ next_legal_action
198+ ```
199+
200+ A source batch cache by itself is not a plan. Every source batch that influences
201+ candidate selection or graph JSON must have a prior Markdown batch packet. If a
202+ source result exists without a declared batch packet, stop with
203+ ` source_result_without_declared_batch ` .
204+
205+ ### Generated Code Runtime Audit
206+
207+ Python, shell, notebooks, or inline code may perform only declared mechanical
208+ work after the controlling Markdown artifact exists. Mechanical work includes
209+ validation, serialization, counting, deterministic sorting, ID normalization,
210+ referential checks, and executing a declared source query from a Markdown batch
211+ packet.
212+
213+ Generated code must not decide graph intent, source strategy, semantic type
214+ selection, semantic edge selection, accepted/candidate status, or target-filling
215+ policy. If generated code is used at all during MAKE-GRAPH execution, the run
216+ must maintain:
217+
218+ ``` text
219+ runs/<run_id>/reports/generated_code_runtime_audit.md
220+ ```
221+
222+ The audit must declare ` generated_code_used: true ` or `generated_code_used:
223+ false` . When true, it must include ` declared_markdown_authority`,
224+ ` mechanical_purpose ` , ` semantic_non_authority_statement ` , ` inputs ` , ` outputs ` ,
225+ ` executed_at ` , ` cleanup_status ` , and ` safe_to_resume ` . Missing audit means
226+ ` hidden_runtime_audit_missing ` . Generated code that owns semantic traversal
227+ means ` hidden_semantic_runtime_detected ` .
228+
229+ ### Domain Membership Acceptance Rule
230+
231+ Source query shape creates candidates, not accepted records. QIDs, URLs, labels,
232+ search hits, source classes, endpoint co-presence, or adapter result membership
233+ do not by themselves prove domain membership.
234+
235+ An accepted fiber node must satisfy all of these predicates in source-backed,
236+ human-readable form:
237+
238+ ``` text
239+ type_membership_predicate
240+ domain_membership_predicate
241+ graph_intent_fit_predicate
242+ source_backing_predicate
243+ field_sufficiency_predicate
244+ ```
245+
246+ Records that are only source-shape matches must remain candidate records with a
247+ non-counting status such as ` candidate_source_shape_only ` ,
248+ ` candidate_domain_membership_uncertain ` , ` candidate_type_membership_uncertain ` ,
249+ ` candidate_graph_intent_uncertain ` , ` rejected ` , or ` deferred ` . Candidate,
250+ rejected, and deferred records never count toward MAKE-GRAPH targets.
251+
252+ ### Semantic Sample Audit
253+
254+ Before semantic completion, every MAKE-GRAPH run must write and pass:
255+
256+ ``` text
257+ runs/<run_id>/reports/semantic_sample_audit.md
258+ ```
259+
260+ The audit must sample accepted records in human-readable form and check domain
261+ membership, type assignment, graph-intent fit, primitive relation status, and
262+ pair evidence. If an accepted sample is plainly wrong, stop with
263+ ` domain_membership_audit_failed ` or a more precise semantic failure. If labels
264+ or evidence are too sparse to audit, stop with ` semantic_sample_audit_limited ` .
265+
266+ ### Accepted Target Reconciliation
267+
268+ MAKE-GRAPH target counts are accepted semantic targets, not raw JSON record
269+ counts. Semantic reports must reconcile raw records, accepted records, candidate
270+ records, rejected records, synthetic/completion records, and target satisfaction.
271+
272+ Required counters include:
273+
274+ ``` text
275+ requested_node_types
276+ accepted_node_types
277+ requested_edge_types
278+ accepted_edge_types
279+ requested_fiber_nodes_per_type
280+ accepted_fiber_nodes_counted
281+ candidate_fiber_node_records
282+ requested_fiber_edges_per_type
283+ accepted_fiber_edges_counted
284+ candidate_fiber_edge_records
285+ synthetic_or_completion_records_counted_toward_target: false
286+ candidate_records_counted_toward_target: false
287+ graph_build_targets_met
288+ semantic_acceptance_status
289+ ```
290+
291+ If ` semantic_acceptance_status ` is not ` passed ` , the graph is not complete. The
292+ final response must say that first. Structural validation success may be
293+ reported only as supporting detail.
294+
124295## Corrected Soft Control Flow Diagram
125296
126297This diagram is the whole-system control flow. It is normative for both the
@@ -148,7 +319,7 @@ flowchart TD
148319 C5 --> C6["Initialize candidate graph JSON files"]
149320 C6 --> C7["Initialize run artifacts: structured cursor, initialized execution_log, source_batch_plan, reports, source_batches, batch_packets, tool_outputs"]
150321 C7 --> C7I["MAKE-GRAPH: write graph_intent_contract.md as the first run report artifact"]
151- C7I --> C7A["MAKE-GRAPH: initialize source landscape map, source family registry, adapter frontier, and source strategy log"]
322+ C7I --> C7A["MAKE-GRAPH: initialize source reconnaissance plan, landscape map, source family registry, adapter frontier, recovery plan , and source strategy log"]
152323 C7A --> C7B["MAKE-GRAPH: initialize joint population feasibility and endpoint reservation plans"]
153324 C7B --> C8["Run generated-bundle acceptance checks"]
154325 C8 --> C9["Write runs/<run_id>/reports/generated_bundle_acceptance_report.md"]
@@ -164,7 +335,7 @@ flowchart TD
164335 E3 --> E4["Reconcile graph paths and inspect current graph JSON state"]
165336 E4 --> E4I{"MAKE-GRAPH graph intent contract valid?"}
166337 E4I -->|"no"| S
167- E4I -->|"yes"| E4A{"MAKE-GRAPH source landscape and joint population control surfaces valid?"}
338+ E4I -->|"yes"| E4A{"MAKE-GRAPH source reconnaissance, runtime audit, and joint population control surfaces valid?"}
168339 E4A -->|"no"| S
169340 E4A -->|"yes"| E5["Derive next legal bounded action from manifest order, loop spec, cursor, log, and repo reality"]
170341 E5 --> E6["Execute one Markdown-authorized action"]
0 commit comments