SPEC-EVO-002 — Graph Engine¶
Purpose¶
The graph engine makes relationships between research objects first-class while preserving Markdown as canonical serialization.
Canonical edge model¶
Every relationship MUST declare a source OID, target OID, edge type, and provenance. Core edge types are:
supportscontradictsderived_fromanswersrefinesreplacesdepends_onreferencesusessupersedes
Custom edge types MAY be added only through a registered extension and MUST NOT redefine core semantics.
Requirements¶
- All graph nodes MUST resolve to canonical OIDs.
- Broken targets, duplicate edge identities, and invalid edge types MUST fail strict validation.
- Edge direction MUST be preserved.
- Edge provenance MUST identify the declaring object or relationship record.
- The generated graph MUST be reproducible from repository content.
- Circular relationships MAY exist unless prohibited by a specific edge contract; prohibited cycles MUST be reported with a traversable path.
- Graph indexes MUST be disposable and rebuildable.
Operations¶
QLens SHOULD provide neighborhood traversal, reverse references, path discovery, orphan detection, unsupported-meaning detection, contradiction discovery, and impact analysis.
Acceptance criteria¶
- A clean rebuild produces a deterministic node and edge set.
- Removing an index does not remove knowledge.
- A changed edge is visible in Git history.
- A user can identify every reasoning object affected by a selected evidence object.
Non-goals¶
The graph engine is not an independent source of truth and MUST NOT require a server database for basic repository operation.