Add scripts/gen-module-graph.ts, which derives the inter-package dependency graph from each package's @deepseek-ai/dsh-* peerDependencies and renders docs/module-graph.md (a GitHub-native Mermaid graph plus a dependency table). Output is deterministic so a regenerate-and-diff check is stable. Wire a freshness gate the same way doc-sync is wired (ADR 0007: hooks and CI run the same package.json scripts): verify-module-graph runs in pre-push (lefthook) and as a CI step. It fails if the committed file drifts from what the generator would produce.
50 lines
1.3 KiB
Markdown
50 lines
1.3 KiB
Markdown
<!-- Generated by scripts/gen-module-graph.ts — do not edit by hand.
|
|
Run `pnpm run gen-module-graph` to regenerate. -->
|
|
|
|
# Module dependency graph
|
|
|
|
Inter-package dependencies among the `@deepseek-ai/dsh-*` harness packages, derived from each
|
|
package's `peerDependencies` (the canonical runtime-dependency signal). An edge `a --> b` means
|
|
package `a` depends on package `b`. Names have the `@deepseek-ai/dsh-` prefix stripped.
|
|
|
|
```mermaid
|
|
graph TD
|
|
agent --> llm
|
|
agent --> session
|
|
agent-loop --> agent
|
|
agent-loop --> llm
|
|
agent-loop --> session
|
|
agent-loop --> system-prompt
|
|
agent-loop --> tools
|
|
bash-local --> bash
|
|
invariants --> agent
|
|
invariants --> llm
|
|
invariants --> session
|
|
llm-deepseek --> llm
|
|
llm-pi-ai --> llm
|
|
session --> llm
|
|
system-prompt --> llm
|
|
tool-bash --> agent
|
|
tool-bash --> bash
|
|
tool-bash --> llm
|
|
tool-bash --> tools
|
|
tools --> agent
|
|
tools --> llm
|
|
tools --> system-prompt
|
|
```
|
|
|
|
| Package | Depends on |
|
|
| --- | --- |
|
|
| `agent` | `llm`, `session` |
|
|
| `agent-loop` | `agent`, `llm`, `session`, `system-prompt`, `tools` |
|
|
| `bash` | — |
|
|
| `bash-local` | `bash` |
|
|
| `invariants` | `agent`, `llm`, `session` |
|
|
| `llm` | — |
|
|
| `llm-deepseek` | `llm` |
|
|
| `llm-pi-ai` | `llm` |
|
|
| `session` | `llm` |
|
|
| `system-prompt` | `llm` |
|
|
| `tool-bash` | `agent`, `bash`, `llm`, `tools` |
|
|
| `tools` | `agent`, `llm`, `system-prompt` |
|