mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-17 23:52:36 +00:00
Add Contract Invariant I9 to the ScopeResolver contract and write the
single-source-of-truth + write/read phase contract into both the
SemanticModel file-head and ARCHITECTURE.md.
Three landing points so the rule is reachable from every entry:
* contract/scope-resolver.ts — new I9 entry in the Contract
Invariants list: scope-resolution passes consult SemanticModel
exclusively for symbol-keyed lookups; WorkspaceResolutionIndex is
reserved for Scope-valued maps. Documents the two-phase write
(legacy parse + reconcileOwnership) and the narrowed-handle read
posture. Calls out the reconciliation shim as transitional.
* model/semantic-model.ts — new "Single-source-of-truth invariant"
and "Write / read phase contract" sections in the file-head.
Three ordered write phases (parse → reconcile → attachScopeIndexes),
then frozen for readers.
* ARCHITECTURE.md § "Semantic-model source of truth" — expanded
subsection covering both invariants (ParsedFile = AST truth,
SemanticModel = symbol truth), the write/read phase diagram, and
the reconciliation-shim rationale.
No code change.
|
||
|---|---|---|
| .. | ||
| cli | ||
| config | ||
| core | ||
| lib | ||
| mcp | ||
| server | ||
| storage | ||
| types | ||