-
Notifications
You must be signed in to change notification settings - Fork 3
ADR 0008 hierarchical memory scoping
Pedro Gomes Branquinho edited this page Feb 15, 2026
·
1 revision
Status: Implemented Date: 2026-02-04 Memory ID: 20260204191624-14925ea2
The hive monorepo contains multiple subprojects. We need:
- Parents see children's memories (downward visibility)
- Children isolated from parents (upward isolation)
~/.config/hive.edn # Global defaults
~/project/.hive-project.edn # Project overrides
~/project/sub/.hive-project.edn # Submodule overrides (highest)
hive-mcp/ # Sees all below
├── hive-connectors/ # Sees its children only
│ ├── slack/ # Isolated
│ └── github/ # Isolated
└── hive-addons/ # Sees its children only
├── diagrams/ # Isolated
└── presentations/ # Isolated
Resolution Priority:
- Check
.hive-project.ednfor explicit:parent-id - Check persistent index (DataScript) for cached hierarchy
- If stale or missing, scan filesystem and update index
- Fall back to string-based inference (colon-delimited)
| Phase | Scope | Effort |
|---|---|---|
| 1 | Add .hive-project.edn to subprojects |
Low |
| 2 | Persistent DataScript index | Medium |
| 3 | Downward visibility (descendant-scopes) |
Medium |
| 4 | Multi-repo workspaces (~/.config/hive.edn) | Future |
| Tool | Hierarchy Model | Key Insight |
|---|---|---|
| Nx | workspace.json | "Affected" detection via dep graph |
| Polylith | workspace.edn | Single source of truth |
| deps.edn monorepos | :local/root | Sean Corfield pattern |
| Git submodules | .gitmodules | Recursive traversal |
- Subprojects get isolated memories
- Parent aggregates children's memories
- Incremental adoption
- Requires adding
.hive-project.ednto each subproject - Cache invalidation complexity