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-jsonb-column-boundaries | Document JSONB Column Boundaries (metadata vs data) | completed | narrow | medium | component | implementation |
Description
W01: The commonCols.metadata and per-table data JSONB columns overlap with no documented boundary. api_keys stores scopes/resources/tags inside metadata; accounts has both data (preferences, avatar) and metadata (arbitrary) with overlapping purposes. An implementer cannot determine which column to use for what.
Define and document the boundary: data holds structured domain-specific data with known TypeScript types; metadata holds opaque key-value pairs for subsystem use with a namespacing convention (e.g., _keypal.scopes).
Acceptance Criteria
README.mddocuments the boundary betweencommonCols.metadataand per-tabledatacolumns- Namespacing convention for
metadatais specified (e.g.,_subsystem.key) - Each table that has both columns lists what belongs in each (
identity.mdforaccounts,api_keys) - Update
keypalusage note:api_keys.metadata._keypal.scopespattern documented
References
- docs/reviews/storage-architecture-review-2026-04-21.md#W01
- docs/architecture/storage/README.md:73
- docs/architecture/storage/identity.md:85-88, :23
Notes
To be filled by implementation agent
Summary
To be filled on completion