Skip to content

Commit 620b681

Browse files
committed
chore(docs): polishing documentation
1 parent 9ebe532 commit 620b681

File tree

2 files changed

+40
-38
lines changed

2 files changed

+40
-38
lines changed

CHANGELOG.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,55 @@ coherent platform: canonical-report-first, agent-facing, CI-native, and product-
77

88
### Licensing & packaging
99

10-
Re-license source code to MPL-2.0 while keeping documentation under MIT. Ship dual `LICENSE` / `LICENSE-docs` files and
11-
sync SPDX headers.
10+
- Re-license source code to MPL-2.0 while keeping documentation under MIT.
11+
- Ship dual `LICENSE` / `LICENSE-docs` files and sync SPDX headers.
1212

1313
### MCP server (new)
1414

15-
- Optional `codeclone[mcp]` extra with `codeclone-mcp` launcher (`stdio` and `streamable-http` transports).
16-
- 20 read-only tools + 7 fixed resources + 3 run-scoped URI templates: analysis, diff-aware changed-files, run
17-
comparison, findings / hotspots / remediation, granular checks, gate preview, and in-memory-only review/session
18-
markers.
19-
- Bounded run retention (`--history-limit`), `--allow-remote` guard, `cache_policy=refresh` rejected to preserve
15+
- Add optional `codeclone[mcp]` extra with `codeclone-mcp` launcher (`stdio` and `streamable-http`).
16+
- Introduce a read-only MCP surface with 20 tools, fixed resources, and run-scoped URIs for analysis, changed-files
17+
review, run comparison, findings / hotspots / remediation, granular checks, and gate preview.
18+
- Add bounded run retention (`--history-limit`), `--allow-remote` guard, and reject `cache_policy=refresh` to preserve
2019
read-only semantics.
21-
- Agent-optimised payloads: short MCP run/finding ids, slim summary inventory, compact summary/default finding cards,
22-
single-dimension `health` in `check_*`, bounded `metrics_detail`, and compact changed-files / compare-runs responses
23-
— all without changing the canonical report contract.
24-
- `cache.freshness` marker and `get_production_triage` / `codeclone://latest/triage` for compact production-first
20+
- Optimize MCP payloads for agents with short ids, compact summaries/cards, bounded `metrics_detail`, and slim
21+
changed-files / compare-runs responses — without changing the canonical report contract.
22+
- Make MCP explicitly triage-first and budget-aware: clients are guided toward summary/triage → hotspots / `check_*`
23+
single-finding drill-down instead of broad early listing.
24+
- Add `cache.freshness` marker and `get_production_triage` / `codeclone://latest/triage` for compact production-first
2525
overview.
26-
- Honest run comparison: `compare_runs` reports `mixed` / `incomparable` instead of misleading single verdicts;
27-
`clones_only` runs surface `health: unavailable` instead of zeroed placeholders.
28-
- Safety hardening: MCP analysis now requires an absolute repository root and rejects relative roots like `.`, so the
29-
server cannot silently analyze the wrong directory when its cwd differs from the client workspace.
26+
- Improve run-comparison honesty: `compare_runs` now reports `mixed` / `incomparable`, and `clones_only` runs surface
27+
`health: unavailable` instead of placeholder values.
28+
- Harden repository safety: MCP analysis now requires an absolute repository root and rejects relative roots like `.`
29+
to avoid analyzing the wrong directory.
3030
- Fix hotlist key resolution for `production_hotspots` and `test_fixture_hotspots`.
3131
- Bump cache schema to `2.3` (stale metric entries rebuilt, not reused).
3232

3333
### Report contract
3434

3535
- Bump canonical report schema to `2.2`.
3636
- Add canonical `meta.analysis_thresholds.design_findings` provenance and move threshold-aware design findings fully
37-
into the canonical report, so MCP/HTML read the same design-finding universe instead of re-synthesizing it.
37+
into the canonical report, so MCP and HTML read the same design-finding universe.
3838
- Add `derived.overview.directory_hotspots` and render it in the HTML Overview tab as `Hotspots by Directory`.
3939

4040
### CLI
4141

42-
- `--changed-only`, `--diff-against`, `--paths-from-git-diff` for changed-scope review and gating with first-class
43-
summary output.
42+
- Add `--changed-only`, `--diff-against`, and `--paths-from-git-diff` for changed-scope review and gating with
43+
first-class summary output.
4444

4545
### SARIF
4646

47-
- Stable `primaryLocationLineHash` (line numbers excluded), run-unique `automationDetails.id` / `startTimeUtc`, explicit
48-
`kind: "fail"`, ancillary fields moved to `properties`.
47+
- Stabilize `primaryLocationLineHash` (line numbers excluded), add run-unique `automationDetails.id` /
48+
`startTimeUtc`, set explicit `kind: "fail"`, and move ancillary fields to `properties`.
4949

5050
### HTML report
5151

52-
- IDE picker (PyCharm, IDEA, VS Code, Cursor, Fleet, Zed) with persistent selection; clickable file-path deep links
53-
across all tabs; stable `finding-{id}` anchors.
52+
- Add `Hotspots by Directory` to the Overview tab, surfacing directory-level concentration for `all`, `clones`, and low-cohesion findings with scope-aware badges and compact counts.
53+
- Add IDE picker (PyCharm, IDEA, VS Code, Cursor, Fleet, Zed) with persistent selection.
54+
- Add clickable file-path deep links across all tabs and stable `finding-{id}` anchors.
5455

5556
### GitHub Action
5657

57-
- Composite Action v2: configurable quality gates, SARIF upload to Code Scanning, PR summary comments.
58+
- Ship Composite Action v2 with configurable quality gates, SARIF upload to Code Scanning, and PR summary comments.
5859

5960
## [2.0.0b2]
6061

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
---
2020

2121
CodeClone provides deterministic structural code quality analysis for Python.
22-
It detects architectural duplication via normalized AST and Control Flow Graphs,
23-
computes quality metrics, and enforces CI gates — all with **baseline-aware
22+
It detects architectural duplication, computes quality metrics, and enforces CI gates — all with **baseline-aware
2423
governance** that separates **known** technical debt from **new** regressions.
25-
An optional MCP interface exposes the same pipeline to AI agents and IDEs.
24+
An optional MCP interface exposes the same canonical analysis pipeline to AI agents and IDEs.
2625

2726
Docs: [orenlab.github.io/codeclone](https://orenlab.github.io/codeclone/) ·
2827
Live sample report:
@@ -41,10 +40,11 @@ Live sample report:
4140
- **Structural findings** — duplicated branch families, clone guard/exit divergence and clone-cohort drift (report-only)
4241
- **Quality metrics** — cyclomatic complexity, coupling (CBO), cohesion (LCOM4), dependency cycles, dead code, health
4342
score
44-
- **Baseline governance** — known debt stays accepted; CI blocks only new clones and metric regressions
43+
- **Baseline governance** — separates accepted **legacy** debt from **new regressions** and lets CI fail **only** on
44+
what changed
4545
- **Reports** — interactive HTML, deterministic JSON/TXT plus Markdown and SARIF projections from one canonical report
46-
- **MCP server** — optional MCP surface for AI agents, IDEs, and MCP-capable clients; read-only with respect to repo and
47-
persisted artifacts, budget-aware, and designed as a guided control surface for agentic development
46+
- **MCP server** — optional read-only MCP surface for AI agents and IDEs, designed as a budget-aware guided control
47+
surface for agentic development
4848
- **CI-first** — deterministic output, stable ordering, exit code contract, pre-commit support
4949
- **Fast** — incremental caching, parallel processing, warm-run optimization, and reproducible benchmark coverage
5050

@@ -167,13 +167,15 @@ codeclone-mcp --transport stdio
167167
codeclone-mcp --transport streamable-http --port 8000
168168
```
169169

170-
20 tools + 10 resources — deterministic, baseline-aware, and read-only. Never mutates source files, baselines, or repo
171-
state.
172-
Payloads are optimised for LLM context: compact summaries by default, full detail on demand.
170+
20 tools + 10 resources — deterministic, baseline-aware, and read-only.
171+
Never mutates source files, baselines, or repo state.
172+
173+
Payloads are optimized for LLM context: compact summaries by default, full detail on demand.
173174
The cheapest useful path is also the most obvious path: first-pass triage stays compact, and deeper detail is explicit.
174-
Recommended budget-first flow for agents: `analyze_repository` or
175-
`analyze_changed_paths``get_run_summary` or `get_production_triage`
176-
`list_hotspots` or `check_*``get_finding``get_remediation`.
175+
176+
Recommended agent flow:
177+
`analyze_repository` or `analyze_changed_paths``get_run_summary` or `get_production_triage`
178+
`list_hotspots` or `check_*``get_finding``get_remediation`
177179

178180
Docs:
179181
[MCP usage guide](https://orenlab.github.io/codeclone/mcp/)
@@ -242,8 +244,7 @@ All report formats are rendered from one canonical JSON report document.
242244
- `--timestamped-report-paths` appends a UTC timestamp to default report filenames for bare report flags such as
243245
`--html` or `--json`. Explicit report paths are not rewritten.
244246

245-
The published docs site also includes a live example HTML/JSON/SARIF report
246-
generated from the current `codeclone` repository during the docs build.
247+
The docs site also includes live example HTML/JSON/SARIF reports generated from the current `codeclone` repository.
247248

248249
Structural findings include:
249250

@@ -270,7 +271,7 @@ class Middleware: # codeclone: ignore[dead-code]
270271
Dynamic/runtime false positives are resolved via explicit inline suppressions, not via broad heuristics.
271272

272273
<details>
273-
<summary>JSON report shape (v2.2)</summary>
274+
<summary>Canonical JSON report shape (v2.2)</summary>
274275

275276
```json
276277
{

0 commit comments

Comments
 (0)