Skip to content

Commit 0c67aaf

Browse files
committed
docs: scope Anaphora64 (v1.5) and OGAR adapter (v2) as follow-up PRs
Per design review: keep PR #479 a clean reading-substrate review unit. Both extensions are documented as deferred, not built here. window.rs: v1.5 Tekamolo/Anaphora64 provenance sidecar — full bit layout sketched in module docs. NOT folded into Cam64 (locality key) or P64 (address space). Hooks already present: HorizonPolarity (signed_crystal) + ExpectedReason (window). Boundary law: SentenceWindow resolves, EpisodicSpoFrame witnesses, Cam64 indexes, Anaphora64 (later) explains. design doc: - test count corrected to 215 (added crystal_neighborhood: 16) - new "Deliberately out of scope" section: * v1.5 Anaphora64 coreference provenance → coreference-ranking PR * v2 OGAR/SurrealDB AST adapter → separate crate, three-layer split (semantics/syntax/pragmatics), adapter law: semantics can exist without syntax; syntax must resolve to semantics before execution; pragmatics decides whether resolved syntax may run. SurrealDB is a runtime view, OGAR owns class truth. No code change; 215 deepnsm tests pass. https://claude.ai/code/session_0147hSzjmWZDuy2MSQNrhEK5
1 parent 52ae964 commit 0c67aaf

2 files changed

Lines changed: 67 additions & 1 deletion

File tree

crates/deepnsm/src/window.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,30 @@
1717
//! sentence backward and returns the first matching entity. In v1 "matching"
1818
//! means "any non-pronoun NP head from a prior sentence" — a pure recency
1919
//! heuristic. Richer disambiguation (gender, number, semantic type) is v2.
20+
//!
21+
//! ## Future (v1.5) — Tekamolo/Anaphora64 provenance sidecar
22+
//!
23+
//! v1 records *what* resolved (exact NP-head ranks + expected slots) but not
24+
//! *why* it resolved that way. A future `Anaphora64` sidecar (its own module,
25+
//! NOT folded into `Cam64` or `P64`) should encode coreference provenance:
26+
//!
27+
//! ```text
28+
//! bits 0..11 antecedent_rank_bucket / local entity id
29+
//! bits 12..15 sentence_offset_signed4
30+
//! bits 16..19 source_polarity (HorizonPolarity: confirmed/expected/inferred_right/basin)
31+
//! bits 20..23 expected_reason (ExpectedReason: relative/anaphora/ellipsis/causal/temporal)
32+
//! bits 24..31 agreement flags (number/gender/person/semantic-type/role)
33+
//! bits 32..39 grammatical role score
34+
//! bits 40..47 salience score
35+
//! bits 48..55 confidence q8
36+
//! bits 56..63 reserved / version
37+
//! ```
38+
//!
39+
//! It belongs to the **next** PR (coreference ranking/provenance), not the
40+
//! reader-substrate PR. Add it only once agreement/ranking is implemented, and
41+
//! store it as a provenance field on `EpisodicSpoFrame` (`anaphora_tag: Anaphora64`).
42+
//! The boundary stays clean: SentenceWindow resolves, EpisodicSpoFrame witnesses,
43+
//! Cam64 indexes, Anaphora64 (later) *explains* the resolution.
2044
2145
use crate::spo::NO_ROLE;
2246

docs/architecture/deepnsm-reader-design.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,9 @@ FORBIDDEN INTERNAL PATH (absent by omission):
262262
| `reader_state` | 12 (2 new: trigger wiring) |
263263
| `signed_crystal` | 18 |
264264
| `sentence_transformer64` | 26 |
265+
| `crystal_neighborhood` | 16 |
265266
| **Existing deepnsm tests** | 104 (unchanged) |
266-
| **Total** | **200** |
267+
| **Total** | **215** |
267268

268269
---
269270

@@ -291,5 +292,46 @@ Flow:
291292

292293
The holograph `sentence_crystal.rs` (integer-first, char n-gram hashing,
293294
bit rotation, majority bundling) is the correct large-field ancestor.
295+
296+
---
297+
298+
## Deliberately out of scope (follow-up PRs)
299+
300+
This PR is the **reading substrate**. Two natural extensions are intentionally
301+
deferred so #479 stays a clean review unit:
302+
303+
### v1.5 — Tekamolo/Anaphora64 coreference provenance
304+
305+
v1 records *what* resolved (exact NP-head ranks + expected slots). It does not
306+
record *why* — was the resolution confirmed-backward, expected-forward, or
307+
inferred-right? Was gender/number/type agreement used? The `HorizonPolarity`
308+
enum (in `signed_crystal.rs`) and `ExpectedReason` (in `window.rs`) are the
309+
v1 hooks. A future `anaphora64.rs` sidecar should pack provenance (antecedent
310+
bucket, sentence offset, source polarity, expected reason, agreement flags,
311+
role/salience scores, confidence q8) into a `u64`, stored as a provenance field
312+
on `EpisodicSpoFrame`. **Not in Cam64** (locality key, stays lean) and **not in
313+
P64** (native address space). Boundary law: *SentenceWindow resolves,
314+
EpisodicSpoFrame witnesses, Cam64 indexes, Anaphora64 explains.* Belongs to the
315+
coreference-ranking PR, after agreement/ranking is implemented.
316+
317+
### v2 — OGAR/SurrealDB AST adapter (separate crate)
318+
319+
The same three-layer split (semantics / syntax / pragmatics) carries into the
320+
OGAR → SurrealQL/DLL/AST adapter, with a domain role rather than a linguistic
321+
one:
322+
323+
```
324+
OGAR semantics = what business/domain thing is this? (ClassId/PredicateId/ActionId)
325+
SurrealQL/DLL/AST = how is it represented/executed? (AstNodeId/DllSymbolId/TemplateId)
326+
planner pragmatics= what may this actor do with it now? (ActorId/V_ref/HorizonPolarity/PolicyId)
327+
```
328+
329+
Adapter law (mirrors the DeepNSM truth/index/context split):
330+
*Semantics can exist without syntax. Syntax must resolve to semantics before
331+
execution. Pragmatics decides whether resolved syntax may run.* SemanticFrame is
332+
truth; AST node, SurrealQL text, and DLL symbol are execution vehicles, not
333+
truth. SurrealDB is a syntax/runtime view, never the ontology master — class
334+
truth stays in OGAR. This is its own PR (`crates/ogar-surreal-adapter/` or split
335+
across `ogar` / `surreal-adapter` / `lance-graph-planner`), not part of #479.
294336
The ladybug-rs `sentence_crystal.rs` (f32 random projection → 5D coords)
295337
is a float-projection prototype and is NOT the reference here.

0 commit comments

Comments
 (0)