docs: remove backward compatibility framing from architecture specs
This commit is contained in:
@@ -43,14 +43,14 @@ ecosystem.
|
||||
|
||||
| Export | Contents | Dependencies |
|
||||
| ------------------------ | --------------------------------------- | --------------------------------------- |
|
||||
| `@alkdev/storage` | Graph schema types, SchemaBuilder | `@alkdev/typebox`, `@alkdev/drizzlebox` |
|
||||
| `@alkdev/storage` | Graph schema types, Metagraph Module | `@alkdev/typebox`, `@alkdev/drizzlebox` |
|
||||
| `@alkdev/storage/graphs` | Same as `.` — alias for the main export | Same as `.` |
|
||||
| `@alkdev/storage/sqlite` | SQLite tables, relations, client | + `drizzle-orm`, `@libsql/client` |
|
||||
| `@alkdev/storage/pg` | PostgreSQL tables, relations, client | ⚠️ NOT YET IMPLEMENTED |
|
||||
|
||||
The `./graphs` subpath exists because the source code lives in `src/graphs/` and
|
||||
the main `mod.ts` re-exports it. Importing from either `@alkdev/storage` or
|
||||
`@alkdev/storage/graphs` yields the same types and SchemaBuilder.
|
||||
`@alkdev/storage/graphs` yields the same types and Metagraph Module.
|
||||
|
||||
## Terminology
|
||||
|
||||
@@ -65,7 +65,7 @@ the main `mod.ts` re-exports it. Importing from either `@alkdev/storage` or
|
||||
| **Graph instance** | A concrete graph belonging to a graph type. Contains nodes and edges conforming to its type definitions. Stored in the `graphs` table. |
|
||||
| **Consumer** | Code that imports `@alkdev/storage` (or a subpath) to define graph types and persist graph data. The hub, spokes, and other @alkdev packages are consumers. |
|
||||
| **Repository layer** | ⚠️ Not yet implemented. The typed CRUD functions (insert, find, update, delete) that sit between consumer code and raw Drizzle queries. Performs schema validation before writes. No dependency on `@alkdev/operations` — the consumer wires CRUD into the registry. |
|
||||
| **Validation boundary** | The line where schema validation is enforced. In this package, validation happens in the SchemaBuilder (at type definition time) and the repository layer (at mutation time), NOT in the database. |
|
||||
| **Validation boundary** | The line where schema validation is enforced. In this package, validation happens in the Metagraph Module (at type definition time) and the repository layer (at mutation time), NOT in the database. |
|
||||
|
||||
## Design Decisions
|
||||
|
||||
@@ -281,11 +281,11 @@ storage node attributes and operations call events), they should either:
|
||||
application provides the key ring. This keeps the storage package agnostic to
|
||||
deployment-specific secret management.
|
||||
|
||||
5. **Migration strategy**: When graph type schemas evolve (new node types,
|
||||
changed attribute schemas), who handles migration? The repository layer
|
||||
should support schema version checking, but actual migration scripts are
|
||||
application-level. See [metagraph.md](./metagraph.md) for the versioning
|
||||
approach.
|
||||
5. **Schema evolution strategy**: When graph type schemas evolve (new node types,
|
||||
changed attribute schemas), who handles migration? The repository layer
|
||||
should support schema version checking, but actual data migration scripts are
|
||||
application-level. See [metagraph.md](./metagraph.md) for the versioning
|
||||
approach.
|
||||
|
||||
6. **~~Should the repository layer live in `@alkdev/storage` or in a consumer
|
||||
package?~~** Decision: the repository CRUD layer (host-specific typed
|
||||
|
||||
Reference in New Issue
Block a user