Skip to content

Commit 3344b49

Browse files
committed
protocol update
1 parent 1e36f82 commit 3344b49

2 files changed

Lines changed: 312 additions & 8 deletions

File tree

assets/protocol_assets/system/graph_population/v001/graph_population_control_protocol.md

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ flowchart TD
7878
E9 --> E10["Update cursor"]
7979
8080
E10 -->|"continue allowed and target not met"| E2
81-
E10 -->|"graph_build_targets_met and semantic gates passed"| Z["Complete run"]
81+
E10 -->|"raw targets appear met"| E11["Run Markdown semantic acceptance gate loop"]
82+
E11 -->|"semantic_acceptance_status: passed"| Z["Complete run"]
83+
E11 -->|"recoverable semantic gap remains"| E2
84+
E11 -->|"terminal limitation, invalid status, or recovery exhausted"| S
8285
E10 -->|"terminal stop or recovery exhausted"| S
8386
```
8487

@@ -201,6 +204,112 @@ endpoint-pairing, scaffold, or completion-policy records are not recovery.
201204
They must not be used to satisfy raw or accepted targets in ordinary
202205
`MAKE-GRAPH` mode.
203206

207+
### 0.0.2.2 Zero-Context Markdown Semantic Acceptance Gate Directive
208+
209+
A fresh Codex instance executing this control protocol must treat semantic
210+
acceptance as a required Markdown loop, not as hidden judgment and not as a
211+
Python traversal loop. Do not assume any prior conversation, unstated project
212+
intent, or model memory about what counts as a real graph.
213+
214+
For every ordinary `MAKE-GRAPH` bundle, the executor must require and execute:
215+
216+
```text
217+
loop_specs/17_semantic_acceptance_gate.md
218+
runs/<run_id>/reports/semantic_acceptance_report.md
219+
```
220+
221+
This loop is the semantic acceptance validator for the run. It must inspect the
222+
repo-local graph files, source batches, and decision reports through bounded
223+
Markdown checklist loops:
224+
225+
```text
226+
TypeNodeSemanticReview:
227+
for each accepted type node
228+
229+
TypeEdgeSemanticReview:
230+
for each accepted type edge
231+
232+
FiberNodeBatchSemanticReview:
233+
for each accepted fiber-node batch or type bucket
234+
235+
FiberEdgeBatchSemanticReview:
236+
for each accepted fiber-edge batch or edge type
237+
238+
CounterReconciliation:
239+
compare accepted semantic counters against graph_build_target
240+
241+
FinalSemanticDecision:
242+
write the exact semantic_acceptance_status
243+
```
244+
245+
Only this Markdown gate may promote raw written records to accepted semantic
246+
records. Structural graph validation, NetworkX/PyG/DGL materialization, source
247+
query row counts, and raw record counts are evidence inputs. They are not
248+
completion.
249+
250+
For every accepted type edge, the gate must classify:
251+
252+
```text
253+
relation_kind:
254+
domain_relation
255+
source_claim
256+
provenance_relation
257+
evidence_relation
258+
adapter_metadata_relation
259+
type_membership_relation
260+
query_derived_relation
261+
materialized_view_relation
262+
helper_or_scaffold_relation
263+
unknown
264+
```
265+
266+
Only `relation_kind: domain_relation` may count toward
267+
`accepted_base_relation_type_records` or requested edge-type targets.
268+
Source-backed source claims, source-system properties, source taxonomy classes,
269+
source categories, source IDs, source URLs, claim targets, evidence records, and
270+
provenance facts are metadata. They belong in sources, provenance, evidence
271+
notes, source batches, or reports, not in accepted base graph edges, unless the
272+
human explicitly requested a graph whose domain is source claims themselves.
273+
274+
Self-edges must not count toward requested edge targets unless the gate records
275+
all of these fields as true:
276+
277+
```text
278+
self_edge_allowed: true
279+
reflexive_domain_relation: true
280+
human_or_manifest_explicitly_requested_reflexive_edges: true
281+
relation_kind: domain_relation
282+
pair_specific_evidence_for_reflexive_relation: present
283+
not_source_claim_or_provenance_or_evidence: true
284+
```
285+
286+
A self-edge that exists only to record a source claim, source property,
287+
classification, evidence event, provenance fact, adapter row, or membership in
288+
a type bucket must be rejected for graph-build target counting.
289+
290+
The executor must reject every semantic acceptance status except these exact
291+
values:
292+
293+
```text
294+
passed
295+
semantic_acceptance_incomplete
296+
source_depth_limited
297+
field_richness_limited
298+
edge_evidence_limited
299+
```
300+
301+
Only the exact value `passed` is a completion state. Statuses such as
302+
`passed_with_note`, `passed_with_relation_policy_note`,
303+
`passed_with_claim_evidence_scope`, `passed_structural_only`, or any other
304+
qualified pass are invalid. A caveated pass is not a pass.
305+
306+
If exact requested counts can be reached only by weakening relation semantics,
307+
writing source-claim edges, writing provenance/evidence/helper edges, writing
308+
self-edge padding, counting generic fields, or treating source-adapter rows as
309+
semantic completion, stop with `semantic_acceptance_incomplete` or the more
310+
precise limitation status. Count preservation is subordinate to semantic
311+
admission.
312+
204313
### 0.0.3 Invocation Dispatch
205314

206315
At first contact, classify the invocation before doing any other work.
@@ -916,6 +1025,9 @@ The contract is complete only if:
9161025

9171026
- `mode` is `EXECUTE-BUNDLE` for the invocation;
9181027
- `manifest.ordered_loop_specs` exists and all listed files exist;
1028+
- for ordinary `MAKE-GRAPH`, `manifest.ordered_loop_specs` includes a final
1029+
Markdown semantic acceptance loop, normally
1030+
`loop_specs/17_semantic_acceptance_gate.md`;
9191031
- every loop spec contains the required headings;
9201032
- every loop spec defines source boundaries;
9211033
- every loop spec defines validation as a command, named checklist, or
@@ -2750,6 +2862,45 @@ query_derived_type_count == 0
27502862
query_derived_relation_type_count == 0
27512863
```
27522864

2865+
`semantic_acceptance_status` is an exact closed value. Only `passed` passes.
2866+
Do not accept `passed_with_note`, `passed_with_relation_policy_note`,
2867+
`passed_with_claim_evidence_scope`, `passed_structural_only`, or any other
2868+
qualified pass. Treat an unknown or qualified pass status as
2869+
`semantic_acceptance_status_invalid` and stop before claiming completion.
2870+
2871+
For every accepted type edge, the semantic acceptance report must show
2872+
`relation_kind: domain_relation`. Source claims, source-system properties,
2873+
source taxonomy classes, source categories, source IDs, source URLs, claim
2874+
targets, evidence records, provenance facts, adapter metadata, type-membership
2875+
relations, query-derived relations, materialized views, and helper/scaffold
2876+
relations must not count as base edge types.
2877+
2878+
For every accepted fiber edge, the report must show that the edge is an
2879+
instance of an accepted `domain_relation` type edge and has pair-specific
2880+
evidence for the exact source node, primitive domain relation, and target node.
2881+
A source claim about one entity is not pair-specific edge evidence. A source
2882+
record showing that entity X has source-system property P with claim target Z
2883+
may support type membership, a field value, source evidence, or provenance, but
2884+
it must not be converted into an accepted base edge unless the human explicitly
2885+
requested a graph whose domain is source claims themselves.
2886+
2887+
Self-edges must not count toward edge targets unless the semantic acceptance
2888+
report records all of these as true for the edge type and affected edge batch:
2889+
2890+
```text
2891+
self_edge_allowed: true
2892+
reflexive_domain_relation: true
2893+
human_or_manifest_explicitly_requested_reflexive_edges: true
2894+
relation_kind: domain_relation
2895+
pair_specific_evidence_for_reflexive_relation: present
2896+
not_source_claim_or_provenance_or_evidence: true
2897+
```
2898+
2899+
If raw edge counts pass by using source-claim edges, provenance/evidence edges,
2900+
helper/scaffold edges, adapter metadata edges, type-membership edges, or
2901+
self-edge padding, stop with `base_graph_target_semantically_invalid` or
2902+
`semantic_edge_target_unmet`.
2903+
27532904
For `MAKE-GRAPH`, a precise limitation is a valid stop explanation, not a
27542905
completion state. But a limitation is precise only after the relevant generated
27552906
recovery ladder has been run or explicitly found inapplicable. If type fields,

0 commit comments

Comments
 (0)