Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,17 @@ next-env.d.ts
.vllnt/
test-results/
scripts/

# analysis + coverage artifacts
.code-visualizer/
coverage/

# local agent state
.claude/

# self-dogfood `init` outputs stay local (PR #35 closed unmerged)
.cursor/
.pi/
GEMINI.md
CONVENTIONS.md
.github/copilot-instructions.md
45 changes: 45 additions & 0 deletions specs/backlog/2026-04-29-add-analyze-module-depth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Add analyze_module_depth tool with CLI parity
status: backlog
created: 2026-04-29
estimate: 1d
tier: standard
---

# Add analyze_module_depth tool with CLI parity

## Goal
Add a focused tool for ranking modules by architectural depth.

## Scope
Add both interfaces:
- MCP tool: `analyze_module_depth`
- CLI command: `module-depth`

## Output
For each module return:
- `path`
- `interfaceSize`
- `implementationSize`
- `depthScore`
- `leverageScore`
- `localityScore`
- `verdict`: `DEEP | SHALLOW | MIXED`
- short `evidence[]`

## Heuristics
- **Interface size**: exported symbols, public entry points, config surface
- **Implementation size**: internal files/symbols/LOC hidden behind the public surface
- **Depth score**: hidden behavior divided by interface cost
- **Leverage score**: useful behavior reused by many callers
- **Locality score**: change and knowledge concentrated in one place

## Acceptance Criteria
- MCP tool returns ranked modules with stable JSON shape
- CLI command supports table output and `--json`
- command/tool support `--limit` / `limit`
- docs updated in `docs/mcp-tools.md` and `docs/cli-reference.md`
- tests cover one deep-module example and one shallow-module example

## Notes
This should be a narrow, high-signal tool. Avoid mixing in seam detection or force-analysis summary.
50 changes: 50 additions & 0 deletions specs/backlog/2026-04-29-add-find-seams-and-adapters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Add find_seams tool and adapter detection with CLI parity
status: backlog
created: 2026-04-29
estimate: 1d
tier: standard
---

# Add find_seams tool and adapter detection with CLI parity

## Goal
Help agents find where behavior can vary and which concrete adapters exist.

## Scope
Add both interfaces:
- MCP tool: `find_seams`
- CLI command: `seams`

## Output
Return:
- `seams[]`
- `name`
- `contract`
- `callers`
- `adapters[]`
- `status`: `HYPOTHETICAL | REAL | LEAKY`
- `evidence[]`
- `adapterPatterns[]`
- `summary`

## Rules
- **Hypothetical seam**: one adapter behind a contract
- **Real seam**: two or more adapters behind a contract
- **Leaky seam**: callers know adapter-specific details they should not need to know

## Detection Signals
- shared interface/type used by multiple implementations
- sibling files with same role but different backing dependencies
- injected dependencies or provider-style construction
- duplicated exported API shape across files

## Acceptance Criteria
- MCP tool returns seam/adapter analysis in JSON
- CLI command prints concise seam summaries and supports `--json`
- every seam includes evidence for why it was detected
- docs updated in `docs/mcp-tools.md` and `docs/cli-reference.md`
- tests cover one hypothetical seam and one real seam case

## Notes
Prefer confidence + evidence over aggressive detection. False positives will reduce trust quickly.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Extend analyze_forces with architecture signals
status: backlog
created: 2026-04-29
estimate: 1d
tier: standard
---

# Extend analyze_forces with architecture signals

## Goal
Make `analyze_forces` more useful for architecture review by adding simple derived signals instead of only cohesion/tension/extraction output.

## Scope
Update both interfaces:
- MCP: extend existing `analyze_forces`
- CLI: extend existing `forces` command

## Add
- `shallowModules[]`
- `deepModules[]`
- `seamCandidates[]`
- `localityRisks[]`

## Heuristics
- **Shallow module**: interface surface is large relative to hidden behavior
- **Deep module**: small public surface, large hidden behavior, reused by many callers
- **Seam candidate**: clear interface point where behavior could vary
- **Locality risk**: understanding or changing one concept requires bouncing across many files

## Acceptance Criteria
- `analyze_forces` returns the new fields in MCP JSON
- `forces --json` returns the same fields
- human CLI output prints short sections for shallow/deep/seam/locality
- existing force analysis output remains intact
- docs updated in `docs/mcp-tools.md` and `docs/cli-reference.md`
- tests cover at least one shallow-module and one locality-risk case

## Notes
Keep heuristics simple and explainable. Every flagged item should include evidence, not just a score.
3 changes: 3 additions & 0 deletions specs/history.log
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
2026-02-18 | shipped | 3d-code-mapper-v1 | 10h→2h | 1d | 3D codebase visualizer with 6 views, 6 MCP tools, 75 tests
2026-03-02 | shipped | mcp-parity-readme-sync | 3h→2h | 1d | 100% MCP-REST parity: +2 tools, enhanced 3 tools, 15 tool descriptions, README sync, 21 new tests
2026-03-03 | shipped | mcp-only | 3h→- | - | Dropped web UI & REST API — MCP stdio only. PR #3. (archived retroactively)
2026-03-11 | shipped | fix-dead-export-false-positives | 2h→1.5h | 1d | Fix 33% false positive rate: merge duplicate imports, include same-file calls, call graph consumption. 8 regression tests.
2026-03-11 | shipped | fix-error-handling | 1h→0.5h | 1d | Consistent impact_analysis error handling, LOC off-by-one fix, empty file guard. 17 regression tests.
2026-03-11 | shipped | fix-metrics-test-files | 2h→1.5h | 1d | Exclude test files from coverage/coupling metrics, isTestFile detection, coupling formula fix. 19 regression tests.
2026-03-11 | shipped | feat-metric-quality | 3h→2h | 1d | LEAF verdict for single-file modules, tension suppression for type hubs/entry points, file_context path normalization. 20 regression tests.
2026-03-12 | shipped | cli-mode | 8h→- | - | CLI parity with MCP: 15 commands, shared core extraction, AGENTS.md + llms.txt + cli-reference docs. PR #16. (archived retroactively)
2026-05-30 | shipped | feat-agent-adoption-init | 3h→1h | 1d | `init` command: idempotent managed-block instructions for 6 agents + portable skill + registry SKILL.md. 18 tests, docs + CHANGELOG. PR #34.
2026-06-10 | shipped | config-rules-engine | -→- | - | Declarative config + ESLint-style rules engine + `check` command CI gate. PR #42. (archived retroactively)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Drop Web UI & REST API — MCP Only
status: active
status: shipped
shipped: 2026-03-03
created: 2026-03-03
estimate: 3h
tier: standard
Expand Down
Loading
Loading