Copy architecture docs, ADRs, storage domain specs, research, reviews, and 56 storage architecture tasks from the alkhub_ts monorepo. Adapt for standalone @alkdev/hub repo structure (src/ not packages/hub/). Sanitize all sensitive information: - Replace private IPs (10.0.0.1) with localhost defaults - Remove internal server hostnames (dev1, ns528096) - Replace /workspace/ private paths with npm package references - Remove hardcoded credentials from examples - Rewrite infrastructure.md without private network details Add Deno project scaffolding: deno.json (pinned deps), .gitignore, AGENTS.md, entry point. Migrate existing code stubs (crypto, config types, logger) with updated import paths.
1.4 KiB
1.4 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level |
|---|---|---|---|---|---|---|---|
| document-mappings-valid-shapes | Document Valid Column Combinations for Mappings Table | completed | narrow | medium | component | implementation |
Description
W20: The mappings table stores three conceptually different relationships in one table: session→spoke, session→parent session, session→task. All nullable FKs allow any combination, including invalid ones. The table name mappings doesn't convey what's mapped.
Document the valid column combinations (polymorphic association shapes): sessionId always NOT NULL; taskId only for task-scoped mappings; parentSessionId only for coordinator children. This makes it a polymorphic association table with documented shapes.
Acceptance Criteria
coordination.mddocuments valid column combinations (mapping shapes)- Shape 1: Session→Spoke (
sessionId+spokeId, notaskId/parentSessionId) - Shape 2: Session→Parent (
sessionId+parentSessionId, notaskId) - Shape 3: Session→Task (
sessionId+taskId, noparentSessionId) - Invalid combinations documented (e.g.,
taskId+parentSessionIdon same row) sessionIdnoted as always NOT NULL for any mapping
References
- docs/reviews/storage-architecture-review-2026-04-21.md#W20
- docs/architecture/storage/coordination.md:10-27
Notes
To be filled by implementation agent
Summary
To be filled on completion