Skip to content

feat: stabilize 2.1 alpha MCP change-control and onboarding surfaces#50

Merged
orenlab merged 133 commits into
mainfrom
fix/mcp-budget-fix
Jul 7, 2026
Merged

feat: stabilize 2.1 alpha MCP change-control and onboarding surfaces#50
orenlab merged 133 commits into
mainfrom
fix/mcp-budget-fix

Conversation

@orenlab

@orenlab orenlab commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

This PR prepares the CodeClone 2.1 alpha line by stabilizing the MCP change-control workflow, tightening controller budget/hygiene behavior, extending engineering memory and observability surfaces, and refreshing the public onboarding/docs structure.

The branch is currently ahead of main by 133 commits and is intended as an integration PR for the 2.1 alpha surface rather than a narrow single-file bug fix.

What changed

MCP change-control and controller workflow

  • Refines the controlled-change flow around intent, implementation context, blast radius, patch contracts, review receipts, and workspace hygiene.
  • Improves MCP payload handling, help/tool messages, session mixins, and workflow orchestration.
  • Tightens context-governance and token-budget behavior for agent-facing workflows.
  • Keeps edit_allowed as the authoritative permission signal for agent edits.

Workspace hygiene and verification safety

  • Optimizes hygiene snapshot reuse on the start path.
  • Reduces redundant git work in dirty-state digest handling while preserving digest identity.
  • Improves dirty workspace classification and controller hygiene behavior.
  • Adds regression coverage for hygiene snapshot reuse and digest byte-identity behavior.

Engineering memory and trajectory support

  • Extends memory models, schema migration, retrieval, trajectory storage/export, and lifecycle/status handling.
  • Improves memory governance and retrieval continuation behavior.
  • Adds support code for richer memory records, trajectory evidence, and projection metadata.

Setup and onboarding

  • Adds the new setup CLI surface and setup engine modules.
  • Introduces project discovery, capability detection, setup planning, rollup, apply, rendering, and wizard flows.
  • Adds reusable CLI UI helpers for help presentation, tours, mascot/progress/typewriter output.

Observability and analytics

  • Extends observability query/runtime/store support.
  • Adds analytics mapping support and improves export/integrity handling.
  • Updates audit event handling and analysis-completed payload behavior.

Documentation and release materials

  • Refreshes README, AGENTS, CLAUDE, CHANGELOG, and contribution-facing docs.
  • Replaces the previous docs/book and docs/guide structure with the new docs/concepts, docs/guides, docs/integrations, and docs/internal structure.
  • Adds report screenshots/assets for public presentation.

Type-safety and utility hardening

  • Narrows payload and mapping helpers.
  • Improves JSON, atomic write, file lock, SQLite, config, baseline, cache, parser, CFG, and benchmark support code.
  • Fixes several strict typing issues in action/benchmark/helper paths.

Why

CodeClone 2.1 introduces a stronger “Structural Change Controller” model for AI-assisted Python development:

  1. agents declare intent before editing;
  2. CodeClone maps allowed paths, do-not-touch paths, review context, blast radius, and budget;
  3. edits are checked against the declared boundary;
  4. finish produces verifiable receipts and hygiene evidence;
  5. engineering memory and trajectories preserve reusable project knowledge.

This PR consolidates that alpha surface so the release line has one coherent controller, setup, memory, observability, and documentation baseline.

Review focus

Please focus review on:

  • MCP change-control semantics and edit_allowed behavior;
  • workspace hygiene and dirty snapshot compatibility;
  • token/context budget behavior for MCP responses;
  • engineering memory schema/migration compatibility;
  • setup CLI behavior and generated config safety;
  • docs restructuring and public onboarding clarity.

orenlab added 30 commits June 28, 2026 09:09
orenlab added 16 commits July 6, 2026 22:06
Rich escape codes broke substring checks on numeric and styled output.
Add strip_ansi() in tests/_assertions.py and route CLI text assertions
through assert_contains_all/assert_contains_none.
Rewrite docs IA contract for zensical.toml navigation and update plugin
doc-path assertions to docs/integrations and docs/guides layouts.
Add branch-coverage tests across cache, memory, MCP, observability,
setup, and CLI surfaces. Deduplicate mascot rich-step helpers to avoid
new clone groups in pre-commit.
@orenlab orenlab self-assigned this Jul 7, 2026
@orenlab orenlab added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code architecture cli memory mcp semantic-search labels Jul 7, 2026
Comment thread codeclone/surfaces/cli/workflow.py
Comment thread codeclone/memory/retrieval/service.py
Comment thread codeclone/observability/store/schema.py
Comment thread codeclone/surfaces/cli/setup/render.py
Comment thread codeclone/surfaces/cli/setup/wizard.py
Comment thread codeclone/surfaces/cli/ui/help_tour.py
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

CodeClone Review

✅ Passed · Health 91/100 (A) · Baseline ok · Cache miss · CodeClone 2.1.0a1

Review snapshot

Area Signal Review note
Clones 0 total, 0 new, 0 known no new clone debt reported
Quality CC max 20, CBO max 9, LCOM4 max 3, overloaded 43 structural metric snapshot
Dependencies avg 7.0, p95 22, max 24, cycles 0 acyclic
Coverage Join not joined no coverage.xml facts in this report
Security Surfaces 281 surfaces, 6 categories, 133 production report-only boundary inventory
API Surface 7659 symbols, 656 modules 0 breaking, 0 added
Dead code 0 high-confidence, 2 suppressed clean

Review focus

  • Treat 133 production security surface(s) as review-first boundary code when touched.
  • Review 43 overloaded module candidate(s) when they intersect this PR.

Security Surfaces are report-only capability inventory, not vulnerability claims. Generated by CodeClone

@orenlab orenlab merged commit 82f2485 into main Jul 7, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture bug Something isn't working cli dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request mcp memory python:uv Pull requests that update python:uv code semantic-search

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants