You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- extend `analyze_forces` / `forces` with shallow, deep, seam, and
locality signals
- keep existing output intact while adding new sections for MCP and CLI
consumers
- add analyzer tests and docs for the new architecture signals
## Changes
- add `shallowModules`, `deepModules`, `seamCandidates`, `localityRisks`
to force analysis types
- compute conservative heuristics in `src/analyzer/index.ts`
- expose the new fields through `src/core/index.ts` and CLI `forces`
- update `docs/mcp-tools.md`, `docs/cli-reference.md`, and
`docs/metrics.md`
## Validation
- `pnpm lint`
- `pnpm typecheck`
- `pnpm build`
- `pnpm test -- src/analyzer/index.test.ts`
Copy file name to clipboardExpand all lines: docs/metrics.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,10 @@ All metrics are computed per-file and stored in `FileMetrics`. Module-level aggr
38
38
|**Leaf module**| 1 non-test file | Single-file module. Cohesion is degenerate (no internal deps possible). Not a problem — use `find_hotspots(metric='coupling')` for high-coupling concerns. |
|**Extraction candidate**| escapeVelocity >= 0.5 | Module with 0 internal deps, consumed by many others. Extract to package. |
41
+
|**Shallow module**| many exports per file, low LOC per export, low cohesion | Public surface is wide relative to hidden behavior. Complexity likely leaks to callers. |
42
+
|**Deep module**| few exports, high LOC per export, reused across modules | Small interface hiding larger useful behavior. Good leverage for callers. |
43
+
|**Seam candidate**| exported file/module used by 2+ external modules | Natural place to stabilize an interface and vary implementation behind it. |
44
+
|**Locality risk**| tension + blast radius, or bridge + blast radius | Changes to one concept are likely to spread across multiple files/modules. |
0 commit comments