docs(plan): codemap apply <recipe-id> — Q1–Q10 locked#77
Conversation
Substrate-shaped fix engine over the existing --format diff-json row contract. Recipe SQL describes the transformation; codemap is the executor. Pre-locks (L.1–L.9) anchor Moat-A and the "no fix engine" floor; open decisions Q1–Q10 are all resolved with reasoning + envelope shape + boundary SQL kit. Headlines: - Q1 apply-by-default; --dry-run opts into preview - Q2 per-recipe-run, all-or-nothing (no rollback machinery) - Q5 standalone ApplyJsonPayload, single shape across modes - Q6 TTY prompt + --yes; non-TTY requires --yes - Q8 exact byte-match (multi-line via \n in before_pattern) - Q10 delete-on-ship lifecycle; durable design lifts to architecture.md
|
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA comprehensive planning document for the codemap apply feature has been added, outlining status, motivations, design decisions, architecture, implementation slices, test strategy, and risk indicators to guide development and coordination. ChangesCodemap Apply Plan
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/plans/codemap-apply.md`:
- Around line 202-209: The fenced code block showing the prompt starting with
"apply rename-preview: 3 files, 5 rows" needs a language tag to satisfy markdown
linting; update the opening fence from ``` to ```text (or another appropriate
language) in the block containing that exact prompt so the docs render and lint
correctly while preserving the block contents.
- Line 320: The doc currently reintroduces a conflicting "--apply" flag for the
MCP/HTTP apply tool; update the documentation and the description of
application/tool-handlers.ts to match the v1 flag contract that the tool applies
by default and only supports "--dry-run" for preview (i.e., remove or mark
"--apply" as invalid), ensure the MCP/HTTP apply tool's args envelope
description (same as query_recipe: recipe id + params + format) explicitly
states apply-by-default with only "--dry-run" supported, and update the v1 flag
table and any references to query_recipe/apply tool to use consistent
terminology.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d53414c0-91d6-4249-8a7a-de627980030e
📒 Files selected for processing (1)
docs/plans/codemap-apply.md
- Tag the y/N prompt fenced block with `text` (MD040; aligns with already-tagged json/typescript fences elsewhere in this file). - Fix architecture-sketch flag list (was `--apply` / `--dry-run`, contradicting Q1's apply-by-default lock and Q4's flag table). Now: `dry_run` + `yes` keys; non-TTY transports always require `yes` because they have no TTY prompt.
Summary
Plan PR for
codemap apply <recipe-id>— substrate-shaped fix engine that consumes the existing--format diff-jsonrow contract from any recipe. Recipe SQL describes the transformation; codemap is the executor. No code yet — this PR ships onlydocs/plans/codemap-apply.md. Implementation lands in subsequent slice PRs (Slice 1–5 outlined in the plan).Pre-locks (L.1–L.9)
Lifted from
roadmap.md § Backlog. Moat-A (substrate, not verdict) and the "no fix engine" floor are the load-bearing anchors. Reuses theDiffJsonPayloadrow contract verbatim — no schema delta, no new SQL primitives.Headline decisions (Q1–Q10)
--dry-runopts into previewgit apply/terraform apply)codemap apply <recipe-id>)show/snippet/impactshape;query --recipeis the exceptionApplyJsonPayload, single shape across modesDiffJsonPayload--yes; non-TTY rejects without--yesgh/cargo/npm uninstallprecedent\ninbefore_pattern)coverage-engine.tsrecipe_recencyTest plan
This PR ships docs only. Implementation slices:
--paramsplumbing + TTY prompt + subprocess testsapplytooldocs/README.mdRule 3)References
docs/roadmap.md § Backlog—codemap applyentry (deleted by Slice 5)application/output-formatters.tsDiffJsonPayload— input contract reused verbatimtemplates/recipes/rename-preview.{sql,md}— exemplar parametrised reciperecipe_recencyPR (#dfbf4e1) — boundary discipline + plan-lifecycle precedentSummary by CodeRabbit