feat(planner): add --rename and --slug naming overrides#81
Merged
Conversation
Implements the ROADMAP "Optional explicit naming overrides" feature (flag-based, no interactive prompts — scriptable + CI/MCP-safe). --rename From=To (repeatable): overrides one of the planner's domain rename targets. Keyed on the substrate token (Shop/Shopkeeper/ItemTag); semantics are "change a planned target" — overrides matching no planned rename are reported and dropped, never silently added. --slug=<kebab>: overrides the planner's slug, which drives the output dir, DB prefix, env-bridge token, and the Pascal project name (NativeAppTemplate -> VetClinic) across all three platforms. Invalid kebab-case is reported and ignored. Both apply right after the planner in dispatch() so every downstream consumer (workers, reviewer, judge, report) sees the final plan, and both are exposed on the CLI and the MCP generate_app tool. - src/rename-overrides.ts: pure parseRenamePair + applyRenameOverrides - src/slug.ts: isValidSlug (mirrors the planner's slug contract) - src/dispatch.ts: DispatchOptions.renameOverrides + slug, applied + traced - src/index.ts: --rename / --slug parsing, confirmations, warnings - src/mcp.ts: renameOverrides + slug params on generate_app - tests: 13 new (parse, merge, slug validation, end-to-end dispatch) - README + ROADMAP updated Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 22, 2026
Merged
dadachi
added a commit
that referenced
this pull request
May 23, 2026
Cut a release so the naming-override work reaches npx users — the registry still serves pre-flag 0.1.2. Since 0.1.2: - feat: --rename From=To and --slug=<kebab> naming overrides (CLI + MCP) (#81) - fix: sync entity names when --rename overrides a target (#82) - fix: rename scope covers .webmanifest / .svg / .swiftformat (#83) - fix: rename skips compiled build output (app/assets/builds, public/assets) (#84) Minor bump: additive features, no breaking changes. Verified the tarball ships scripts/ruby/rename.rb + dist/ via `npm pack --dry-run`. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
What
Implements the ROADMAP "Optional explicit naming overrides" feature — flag-based, no interactive prompts (scriptable + CI/MCP-safe, per
ROADMAP.mdline 83). Lets a human veto the planner's noun/name choices without taking over the whole DomainSpec.--rename From=To(repeatable)Overrides one of the planner's domain rename targets. Keyed on the substrate token (
Shop/Shopkeeper/ItemTag); semantics are "change a planned target" — an override matching no planned rename is reported and dropped, never silently added.--slug=<kebab>Overrides the planner's slug, which drives the project name (
NativeAppTemplate → VetClinic/…Api/…App) across all three platforms, plus the output dirout/<slug>/, DB prefix, and env-bridge token. Invalid kebab-case is reported and ignored.How
Both overrides apply right after the planner in
dispatch(), before the env-bridge/workers/reviewer/judge/report readdomain, so every downstream consumer sees the final plan. Both are exposed on the CLI and the MCPgenerate_apptool.src/rename-overrides.ts(new)parseRenamePair+applyRenameOverridessrc/slug.tsisValidSlug(mirrors the planner's slug contract)src/dispatch.tsDispatchOptions.renameOverrides+slug, applied + traced;renameOverrideOutcomeson the resultsrc/index.ts--rename/--slugparsing, confirmations, warnings, usagesrc/mcp.tsrenameOverrides+slugparams ongenerate_appREADME.md,ROADMAP.mdTesting
npm run buildclean (strict,exactOptionalPropertyTypes).npm run test→ 68/68 pass (13 new: arg parsing, merge semantics, slug validation, end-to-end dispatch for both flags).--rename; valid / invalid-fallback for--slug; both together.Notes / deliberate scope
--slugcouples the project name to the output dir + DB prefix (one coherent rename) — the chosen behavior. A decoupled--project-name(dir ≠ code name) was considered, not built.displayNameoverride remains deferred.--rename Shop=Taskcould shadow Swift'sTask); these are explicit escape hatches, same as the planner's existing trust boundary. Can add a guard if wanted.🤖 Generated with Claude Code