Repository navigation
feat: plan alternatives and MCP capability editing (preview) - #696
Merged
Merged
Conversation
Add preview fixmap alternatives (--input, or --report with an explicit --graph-fingerprint), a saved-report adapter, side-by-side Markdown trade-offs without a winner, and the read-only fixmap_alternatives MCP tool. fixmap_capability gains action create|update|remove routed through the CLI write path (lock, atomic replace, containment, link refusal). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two v0.10.0 ledger gaps on the CLI/MCP side. Both surfaces are labelled preview.
Alternative-plan comparison
Ledger row: "Report adapters, Markdown/CLI/MCP rendering ... remain". This PR adds:
fixmap alternatives --input <alternatives.json> [--format markdown|json] [--output <file>](packages/cli/src/alternatives-command.ts). The input is{ "alternativesInputVersion": 1, "alternatives": [PlanAlternative...] }. Core'scomparePlanAlternativesstill does all validation: 2-20 plans, one exact graph fingerprint, bounded fields.--report a.json --report b.json --graph-fingerprint <value>turns each saved Plan report into an alternative. It can be mixed with--input. A saved Plan records no graph state, so the caller has to state it (for example the commit SHA). FixMap refuses to guess. The mapping only uses what the report says:breaking-contractpolicy findingstestroutes, whose coverage counts only edits linked bytest-route/imported-byimpact evidencepartial, with the reason that the report records nothing beyond the source editsfixmap_alternatives(readOnlyHint: true) takesinput(an object or a path),reports,graphFingerprintandformat. It runs through the samecompareAlternativesFromSourcesas the CLI.feature-catalog.ts. It is also listed in CLI help and the CLI README.Evidence (
packages/cli/test/alternatives-command.test.ts,mcp.test.ts):--outputcannot overwrite an input, and unknown options are rejectedfixmap_planProduct capability editing over MCP
Ledger row: "MCP mutation ... remain". This PR adds:
fixmap_capabilityacceptsaction: "create" | "update" | "remove"along withname,touch,add,direction,depth,maxNodes,workspaceandrepository. MCP only type-checks the arguments and rejects ones that don't apply to the action. It then passes them as separate CLI tokens torunCapabilityCommand, so the containment check, stale lock, atomic replace, symlink/hard-link refusal, validation and error text are exactly the CLI's.readOnlyHint: falseanddestructiveHint: true. The description says to use an action only when the user asks for the change. Withoutaction, list/show/diff behave as before.Evidence (
mcp.test.ts):.fixmap/capabilities.json../outside.tsanchor refused as traversal.fixmapjunction/symlink pointing outside the repo refused, with nothing written outsideLocal checks
npm run typecheck,npm run lint, Core tests (900 passed, 1 skipped), CLI tests (377 passed) andnpm run check:action-bundle(matches) all pass. Core only changedfeature-catalog.ts, so the action bundle did not change. The ledger, CHANGELOG, versions and the website changelog were not touched.🤖 Generated with Claude Code