2.4 KiB
2.4 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | ||
|---|---|---|---|---|---|---|---|---|---|
| drift/reference-modules | Create reference graph type Modules (call-graph, secret-graph) | pending |
|
moderate | medium | component | implementation |
Description
Create concrete graph type Modules that compose from Metagraph via Import() and Type.Composite(). These serve as reference implementations and validation that the Module pattern works end-to-end with the bridge functions.
Per metagraph-module.md Phase 3, start with:
call-graph.ts— mirrors@alkdev/flowgraph'sCallNodeAttrs/CallEdgeAttrsschemassecret-graph.ts— the encrypted data graph type from encrypted-data.md
Each Module uses Metagraph.Import("BaseNode") and Metagraph.Import("BaseEdge") for base composition (ADR-010: same-package Modules use Import() directly).
Acceptance Criteria
src/graphs/modules/call-graph.tsexportsCallGraphasType.Module({...})with entries:Config,CallNode,SubcallNode,TriggeredEdge,DependsOnEdge,TriggeredEdgeConstraints,DependsOnEdgeConstraints,CallStatus,IdentityCallGraph.ConfigusesType.Literalvalues (frozen config: directed, not multi, no self-loops)CallGraph.CallNodecomposesMetagraph.Import("BaseNode")with call-specific attributes viaType.CompositeCallGraph.TriggeredEdgecomposesMetagraph.Import("BaseEdge")withtype: Type.Literal("triggered")- Edge constraint entries follow
*EdgeConstraintsnaming convention withedgeType,allowedSourceTypes,allowedTargetTypes src/graphs/modules/secret-graph.tsexportsSecretGraphwith:Config,SecretNode,ClientNode,HasSecretEdge,HasSecretEdgeConstraintsmoduleToDbSchema(CallGraph)produces validDbSchemarows compatible with the sqlite metagraph tablesmoduleToDbSchema(SecretGraph)produces validDbSchemarowsvalidateNode(CallGraph, "CallNode", validData)returnstruesrc/graphs/modules/index.tsbarrel re-exports all Module definitionsdeno check mod.tspasses
References
- docs/architecture/metagraph-module.md — "Concrete Graph Type Modules" and "Edge Type Constraints" sections
- docs/architecture/encrypted-data.md — SecretGraph Module definition
- docs/architecture/decisions/010-metagraph-import-for-same-package.md
Notes
To be filled by implementation agent
Summary
To be filled on completion