<!-- Generated by scripts/build-arch-map.mjs — do not edit by hand.

Run pnpm docs:arch-map. CI enforces sync via pnpm docs:arch-map:check. -->

Architecture map

Generated layer/seam reference for contributors. The authoritative import

gate is .config/dependency-cruiser.cjs (enforced by pnpm depcruise).

Layer stack

| Layer | Package | Role |

|-------|---------|------|

| 1 | @opensip-cli/core | kernel |

| 2 | @opensip-cli/datastore | SQLite + Drizzle persistence layer |

| 2 | @opensip-cli/contracts | shared contract types (SignalEnvelope, CommandResult, exit codes) |

| 2 | @opensip-cli/tree-sitter | grammar-agnostic parser substrate |

| 2 | @opensip-cli/cli-ui | shared Ink/React presentational primitives |

| 2 | @opensip-cli/clone-detection | shared function-body clone-detection substrate (node:crypto only; ADR-0064) |

| 2 | @opensip-cli/format | pure presentation formatters + display projectors (zero deps; ADR-0144) |

| 2 | @opensip-cli/tool-test-kit | public test helpers for tool authors |

| 3 | @opensip-cli/cli-live | shared live-run runtime (state machine + produce seam) |

| 3 | @opensip-cli/session-store | session persistence over datastore/contracts |

| 3 | @opensip-cli/output | signal-envelope formatters + sinks |

| 3 | @opensip-cli/config | capability-configuration composer + schema registry (depends on core) |

| 3 | @opensip-cli/targeting | host file-targeting runtime substrate (scope.targets; depends on core + config) |

| 3 | @opensip-cli/codebase | bounded project inventory substrate (core + contracts) |

| 3 | @opensip-cli/shared-analysis | shared cross-tool analysis runtime: impact compute, review-brief derivation/correlation, agent-catalog assembly (core + contracts) |

| 3 | @opensip-cli/lang-* | language adapters |

| 3 | @opensip-cli/dashboard | HTML report generator (core + contracts) |

| 3 | @opensip-cli/external-tool-adapter | External Tool Adapter substrate (core + contracts; output devDep) |

| 4 | @opensip-cli/fitness | fitness engine + cli/* commands |

| 4 | @opensip-cli/simulation | simulation engine + cli/* commands |

| 4 | @opensip-cli/graph | graph engine + cli/* commands |

| 4 | @opensip-cli/yagni | YAGNI advisory engine |

| 4 | @opensip-cli/mcp | MCP tool/server over graph + stored evidence |

| 4 | @opensip-cli/tool-* | external scanner Tool adapters |

| 5 | @opensip-cli/checks-* | fitness check packs (depend on fitness) |

| 5 | @opensip-cli/graph-* | graph adapter packs (depend on graph) |

| 6 | opensip-cli | CLI composition root (loads Tools dynamically, no static Tool imports) |

Workspace packages (61: 58 publishable, 3 private)

ToolCliContext seams (24)

Tools and host command handlers must use only these documented methods on the

per-run ToolCliContext (ADR-0051). See

packages/core/src/tools/cli-context.ts.

Related docs