Bläddra i källkod

docs: document module-graph gate; unwrap generated prose

Codex review follow-up:
- Update docs/development.md: add verify-module-graph to the pre-push and
  CI gate lists and gen/verify-module-graph to the daily commands, so the
  contributor guide matches the new freshness gate.
- Emit the module-graph.md intro paragraph as a single line (repo Markdown
  convention: one line per paragraph), since regenerating would otherwise
  reintroduce hard wrapping.
Tianyi Cui 2 månader sedan
förälder
incheckning
8e6fd91e15
3 ändrade filer med 6 tillägg och 7 borttagningar
  1. 4 1
      docs/development.md
  2. 1 3
      docs/module-graph.md
  3. 1 3
      scripts/gen-module-graph.ts

+ 4 - 1
docs/development.md

@@ -57,7 +57,7 @@ DEEPSEEK_BASE_URL=https://... # optional
 lefthook is configured in `lefthook.yml` as an early local checkpoint before review:
 
 - `pre-commit` runs staged-file ESLint fixes, `pnpm run typecheck`, and the vendor manifest guard.
-- `pre-push` runs `pnpm run test`, `pnpm run hygiene`, and `pnpm run doc-sync`.
+- `pre-push` runs `pnpm run test`, `pnpm run hygiene`, `pnpm run doc-sync`, and `pnpm run verify-module-graph`.
 
 The vendor manifest guard checks that changes under `vendor/*/src` are staged with the matching `vendor/README.md` manifest update. See `vendor/README.md` before editing vendored code.
 
@@ -72,6 +72,7 @@ The GitHub workflow runs these gates on each pull request:
 - `pnpm run typecheck`
 - `pnpm run lint`
 - `pnpm run doc-sync`
+- `pnpm run verify-module-graph`
 - `pnpm run test:coverage`
 - `pnpm run build`
 - `pnpm run knip && pnpm run publint`
@@ -93,6 +94,8 @@ pnpm run lint:fix       # eslint . --fix
 pnpm run doc-typecheck  # compile checked TypeScript snippets in Markdown docs
 pnpm run verify-event-taxonomy  # compare docs/architecture.md event names with source
 pnpm run doc-sync       # doc-typecheck plus event taxonomy verification
+pnpm run gen-module-graph     # regenerate docs/module-graph.md from package peerDeps
+pnpm run verify-module-graph  # fail if docs/module-graph.md is stale
 pnpm run build          # build declarations and JS bundles
 pnpm run hygiene        # knip, publint, and workspace constraints
 ```

+ 1 - 3
docs/module-graph.md

@@ -3,9 +3,7 @@
 
 # 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.
+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

+ 1 - 3
scripts/gen-module-graph.ts

@@ -87,9 +87,7 @@ function render(pkgs: Pkg[]): string {
     '',
     '# 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.',
+    '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',