Add 10 new tasks under tasks/architecture/ for Phase 0a (ADR writing): - 9 ADR tasks (026-034) with dependency-ordered structure - 1 review checkpoint task before Phase 0b spec writing ADR dependency graph (3 generations): Gen 1 (parallel): 026, 029, 030, 031, 032, 034 Gen 2 (depends on 029): 027, 028 Gen 3 (depends on 027+028): 033 Gen 4: review checkpoint Also mark all 34 prior implementation tasks as completed — they were finished but still showing as pending in the taskgraph.
3.6 KiB
3.6 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | |
|---|---|---|---|---|---|---|---|---|
| architecture/adr-027-crate-decomposition | Write ADR-027 — Crate decomposition | pending |
|
moderate | medium | project | implementation |
Description
Write ADR-027 defining the crate decomposition for the alknet project: what crates exist, what each contains, and crucially what the dependency graph looks like (which must be acyclic).
Crate structure:
- alknet-core: transport, SSH, call protocol, config, auth types, identity, OperationSpec, Interface trait. Depends on: russh, tokio, irpc (feature-gated), serde. Does NOT depend on: alknet-secret, alknet-storage, alknet-flowgraph.
- alknet-secret: BIP39, SLIP-0010 Ed25519 HD key derivation, AES-256-GCM, SecretProtocol irpc service. Depends on: bip39, ed25519-bip32 (or rust-bip32-ed25519), aes-gcm, sha2, irpc. Does NOT depend on: alknet-core, alknet-storage.
- alknet-storage: SQLite-backed metagraph, identity tables, ACL graph, honker integration, StorageProtocol irpc service. Depends on: rusqlite, honker, petgraph, jsonschema, irpc. Does NOT depend on alknet-core (but implements alknet-core's IdentityProvider trait via the trait, not a crate dep). Does NOT depend on alknet-secret (but references EncryptedData type format).
- alknet-flowgraph: FlowGraph<N,E> over petgraph, operation graph, call graph, type compatibility. Depends on: petgraph, serde, jsonschema. Does NOT depend on: alknet-core, alknet-storage, alknet-secret.
- alknet-napi: Node.js native addon. Depends on: alknet-core.
- alknet (CLI binary): Assembles everything. Depends on: alknet-core, alknet-secret (feature), alknet-storage (feature), alknet-flowgraph (feature), toml.
The narrow interface points: Identity type, IdentityProvider trait, and OperationSpec are in alknet-core. External crates implement core traits or serialize to formats core understands.
This ADR must also address the irpc feature flag question (OQ: resolved — irpc is behind a feature flag in alknet-core, independent in other crates) and the storage/secret irpc dependency question (resolved — each crate depends on irpc independently).
Acceptance Criteria
docs/architecture/decisions/027-crate-decomposition.mdexists- ADR follows established format
- Context explains why decomposition is needed: core shouldn't depend on heavy services; different deployment topologies need different subsets; circular dependencies prevent clean builds
- Decision states: the six crates, their contents, and their dependencies
- Includes the dependency graph ASCII art from integration-plan.md
- States the narrow interface points: Identity, IdentityProvider, OperationSpec
- States that irpc is a feature flag in alknet-core and an independent dep elsewhere
- States that alknet-storage implements IdentityProvider via the trait (not a crate dependency on alknet-core)
- States that alknet-storage references alknet-secret's EncryptedData wire format (type-level compatibility, not crate dep)
- Consequences: core is lean; services are pluggable; no circular deps; deployment topology determines which crates to include
- References: integration-plan.md dependency graph, ADR-029
References
- docs/research/integration-plan.md — Phase 2, dependency graph
- docs/research/core.md — alknet-core contents
- docs/research/services.md — service protocols
- docs/research/storage.md — alknet-storage contents
- docs/research/flow.md — alknet-flowgraph contents
Notes
To be filled by implementation agent
Summary
To be filled on completion