Skip to content

Commit bcbaca6

Browse files
authored
Ship CodeClone 2.0.0b4 with first-class MCP, VS Code, Claude, and Codex surfaces (#19)
* feat(mcp): add help tool for cheaper, more guided agent workflows * feat(report): add report-only god modules and tighten MCP, health, and UX semantics - add canonical `metrics.families.god_modules` as a report-only layer and surface it in JSON, CLI, HTML, and MCP without affecting health, gates, or findings - tighten findings vs suggestions semantics for low-signal structural hints and keep action guidance inline where separate suggestions add no real value - align CLI and HTML scope/inventory presentation with canonical report semantics and polish overview/God Modules rhythm - add dedicated Health Score documentation, clarify phased health-model expansion, and document unified metrics-baseline behavior - refresh MCP guidance/help wording and GitHub issue templates for the current b4 surface * feat(vscode): add a publish-ready CodeClone VS Code extension and document it as a first-class surface - add a native VS Code client over codeclone-mcp with baseline-aware, triage-first structural review and guided source-first drill-down - stabilize extension lifecycle and setup UX with local launcher verification, fallback connection handling, review-focused hotspots, and human-readable command surfaces - add CodeClone-native branding and marketplace-ready packaging assets, including a proper extension icon and validated .vsix packaging - document the new VS Code interface across README, docs, contracts book, changelog, and issue-routing guidance - update AGENTS.md to reflect the VS Code extension as a public surface and align validation/module-routing rules with the current codebase * feat(vscode): harden the VS Code surface and document it as a first-class contract - mature the preview VS Code extension into a safer, enterprise-grade MCP client with limited Restricted Mode, source-first review flow, persisted focus state, bounded transport handling, and a safer local HTML bridge - add extension-side regression coverage with Node unit tests, local extension-host smoke, and validated preview VSIX packaging - document the extension consistently across README, docs, the contracts book, changelog, and AGENTS with its current capabilities, design decisions, trust model, and limits * feat(vscode): harden the VS Code client with trust-aware UX, safer launcher/runtime handling, and tested review workflows * feat(vscode,report): rename overloaded modules canonically and harden the VS Code surface * feat(vscode): add profile-aware review workflows and harden the VS Code extension lifecycle - add conservative, deeper-review, and custom analysis profiles to the VS Code extension and pass them through to CodeClone MCP - improve review UX with clearer analysis-depth affordances, conservative-first guidance, and profile-aware overview/session state - harden extension lifecycle and resource handling with safer shutdown, single-flight MCP connection reuse, and cleanup of workspace/session state - expand extension-side regression coverage and refresh VS Code extension docs to match the current behavior * feat(mcp,report): harden core contracts, cleanup structural noise, and tighten MCP guidance - implement the audit-driven cleanup across baseline/cache/report/html internals with shared JSON IO, safer normalization and path handling, and cleaner structural rendering boundaries - remove safe non-golden structural and clone noise surfaced by stricter analysis passes without touching golden fixture debt - strengthen MCP semantics with conservative-first threshold guidance, the new analysis_profile help topic, and tighter workflow/help wording - refresh core docs and contract tests for baseline, report, MCP, and stricter analysis behavior * feat(claude): make the Claude Desktop bundle * feat(codex): add a native CodeClone plugin for Codex MCP review * refactor(tests): split the golden v2 dummy executor into a narrower inline stub and update baseline * feat(clients,docs): polish native client surfaces and harden the Claude bundle startup flow * docs(clients): standardize uv installs and tighten Codex MCP-only guardrails * feat(clients): harden MCP client surfaces and polish prerelease UX for b4 - make MCP initialize metadata report the CodeClone package version so clients can enforce runtime compatibility correctly - harden the VS Code extension with a minimum supported CodeClone gate, uv-based setup guidance, moved-view icons, titled quick picks, and leaner editor actions aligned with current VS Code UX guidance - improve the Claude Desktop bundle startup path and launcher handling, with refreshed tests and packaging flow - refresh README, MCP/client docs, changelog, and related CI-facing metadata around the current VS Code, Claude, and Codex surfaces * feat(vscode): improve launcher clarity, range-aware source reveal, and marketplace readiness - make unsupported CodeClone runtime errors explain which launcher the extension resolved and whether it came from the workspace, explicit settings, PATH, or repo-local uv fallback - document that auto launcher resolution prefers the current workspace virtualenv before falling back to PATH - fix source reveal for clone review by hydrating canonical finding detail when summary locations are range-truncated, so block and segment findings reveal the full span instead of only the first line - bump the preview VS Code extension to 0.2.1, refresh packaged metadata, and add the live Marketplace listing across the repo and extension docs
1 parent e30100e commit bcbaca6

File tree

173 files changed

+19484
-2714
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+19484
-2714
lines changed

.agents/plugins/marketplace.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "orenlab-local",
3+
"interface": {
4+
"displayName": "OrenLab Local Plugins"
5+
},
6+
"plugins": [
7+
{
8+
"name": "codeclone",
9+
"source": {
10+
"source": "local",
11+
"path": "./plugins/codeclone"
12+
},
13+
"policy": {
14+
"installation": "AVAILABLE",
15+
"authentication": "ON_INSTALL"
16+
},
17+
"category": "Developer Tools"
18+
}
19+
]
20+
}

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ docs
1818
codeclone.egg-info
1919
.pre-commit-config.yaml
2020
uv.lock
21+
extensions

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 🐞 Bug report
2-
description: Incorrect clone detection, crashes, or broken reports
2+
description: Incorrect analysis results, crashes, broken reports, or contract regressions
33
title: "[Bug]: "
44
labels: [ "bug" ]
55
assignees: [ ]
@@ -16,7 +16,7 @@ body:
1616
attributes:
1717
label: CodeClone version
1818
description: Output of `codeclone --version`
19-
placeholder: "1.1.0"
19+
placeholder: "2.0.0b4"
2020
validations:
2121
required: true
2222

@@ -26,11 +26,17 @@ body:
2626
label: Affected area
2727
options:
2828
- Function clone detection (Type-2)
29-
- Block clone detection (Type-3-lite)
29+
- Block clone detection
30+
- Segment clone reporting
31+
- Structural findings
32+
- Quality metrics / health
3033
- CFG construction
3134
- AST normalization
35+
- Canonical report / JSON
3236
- HTML report
33-
- CLI / baseline
37+
- CLI / baseline / cache
38+
- GitHub Action / CI
39+
- MCP server
3440
validations:
3541
required: true
3642

@@ -62,4 +68,4 @@ body:
6268
id: notes
6369
attributes:
6470
label: Additional context
65-
description: CFG structure, HTML screenshots, logs, etc.
71+
description: Baseline/cache status, HTML screenshots, MCP payloads, logs, etc.

.github/ISSUE_TEMPLATE/cfg_semantics.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ body:
1515
id: version
1616
attributes:
1717
label: CodeClone version
18-
placeholder: "1.1.0"
18+
placeholder: "2.0.0b4"
1919

2020
- type: textarea
2121
id: scenario

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: CodeClone Docs
4+
url: https://orenlab.github.io/codeclone/
5+
about: Read the contracts book, MCP guide, and interface docs before opening a generic usage question.

.github/ISSUE_TEMPLATE/false_positive.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,27 @@ body:
1515
id: version
1616
attributes:
1717
label: CodeClone version
18-
placeholder: "1.1.0"
18+
placeholder: "2.0.0b4"
19+
validations:
20+
required: true
21+
22+
- type: dropdown
23+
id: family
24+
attributes:
25+
label: Detection family
26+
options:
27+
- Function clone
28+
- Block clone
29+
- Segment clone (report-only)
30+
- Structural finding
1931
validations:
2032
required: true
2133

2234
- type: textarea
2335
id: code
2436
attributes:
25-
label: Code snippets detected as clones
26-
description: Paste both snippets or a reduced example
37+
label: Minimal reproduction
38+
description: Paste both snippets, the reduced example, or the relevant finding evidence
2739
render: python
2840
validations:
2941
required: true
@@ -38,9 +50,11 @@ body:
3850
validations:
3951
required: true
4052

41-
- type: checkbox
53+
- type: checkboxes
4254
id: cfg_related
4355
attributes:
44-
label: CFG-related?
56+
label: Additional signals
4557
options:
4658
- label: Control flow structure differs meaningfully
59+
- label: Side effects or runtime behavior differ meaningfully
60+
- label: The issue appears only in tests / fixtures

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: ✨ Feature request
22
description: Propose an enhancement to CodeClone
33
title: "[Feature]: "
4-
labels: ["enhancement"]
5-
assignees: []
4+
labels: [ "enhancement" ]
5+
assignees: [ ]
66

77
body:
88
- type: markdown
@@ -18,9 +18,22 @@ body:
1818
- Clone detection logic
1919
- CFG semantics
2020
- AST normalization
21+
- Structural findings / suggestions
22+
- Metrics / health model
23+
- Canonical report / contracts
2124
- HTML report / UX
2225
- CLI / CI integration
26+
- MCP server / agent workflow
2327
- Performance
28+
- Documentation
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: user_impact
34+
attributes:
35+
label: Why is this worth adding?
36+
description: What concrete workflow, quality, or UX problem would this solve?
2437
validations:
2538
required: true
2639

@@ -44,3 +57,14 @@ body:
4457
id: alternatives
4558
attributes:
4659
label: Alternatives considered
60+
61+
- type: checkboxes
62+
id: contracts
63+
attributes:
64+
label: Contract-sensitive areas
65+
description: Tick any surfaces you believe this may affect.
66+
options:
67+
- label: Baseline / cache compatibility
68+
- label: Canonical report JSON schema
69+
- label: CLI exit codes or script-facing output
70+
- label: MCP tool or resource semantics
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: MCP server
2+
description: Report an MCP bug or propose an MCP workflow/tooling improvement
3+
title: "[MCP]: "
4+
labels: [ "mcp" ]
5+
assignees: [ ]
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Use this template for issues about the **CodeClone MCP server**:
12+
tools, resources, payload shape, routing, session semantics, root handling,
13+
IDE/MCP client behavior, and agent-facing workflow quality.
14+
15+
- type: input
16+
id: version
17+
attributes:
18+
label: CodeClone version
19+
description: Output of `codeclone --version`
20+
placeholder: "2.0.0b4"
21+
validations:
22+
required: true
23+
24+
- type: dropdown
25+
id: category
26+
attributes:
27+
label: MCP category
28+
options:
29+
- Tool behavior
30+
- Resource behavior
31+
- Payload size / shape
32+
- Session / latest-runs semantics
33+
- Root / safety semantics
34+
- Guidance / workflow routing
35+
- Packaging / launcher / transport
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: client
41+
attributes:
42+
label: MCP client or host
43+
description: Codex, Claude Desktop, Cursor, VS Code, custom client, etc.
44+
placeholder: "Codex desktop / stdio"
45+
46+
- type: textarea
47+
id: problem
48+
attributes:
49+
label: What happened?
50+
description: Describe the current MCP behavior and why it is wrong or awkward.
51+
validations:
52+
required: true
53+
54+
- type: textarea
55+
id: expected
56+
attributes:
57+
label: What should happen instead?
58+
description: Focus on the safest and most budget-aware expected behavior.
59+
validations:
60+
required: true
61+
62+
- type: textarea
63+
id: reproduction
64+
attributes:
65+
label: Reproduction or request sequence
66+
description: |
67+
Include the relevant tool/resource calls when possible.
68+
Small, exact examples are preferred over screenshots.
69+
render: json
70+
71+
- type: textarea
72+
id: notes
73+
attributes:
74+
label: Additional context
75+
description: Payload excerpts, error text, screenshots, or workflow notes.

.github/actions/codeclone/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Explicit prerelease:
149149

150150
```yaml
151151
with:
152-
package-version: "2.0.0b3"
152+
package-version: "2.0.0b4"
153153
```
154154

155155
Local/self-repo validation:

.github/workflows/codeclone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: CodeClone
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, reopened]
6-
paths: ["**/*.py"]
5+
types: [ opened, synchronize, reopened ]
6+
paths: [ "**/*.py" ]
77

88
permissions:
99
contents: read

0 commit comments

Comments
 (0)