♻️ chore: rename recipes → commands (internal + DB, safe half) (#660)#379
Open
MaloPromyze wants to merge 5 commits into
Open
♻️ chore: rename recipes → commands (internal + DB, safe half) (#660)#379MaloPromyze wants to merge 5 commits into
MaloPromyze wants to merge 5 commits into
Conversation
Rename the nx project `recipes` -> `commands` and the `@packmind/recipes` package -> `@packmind/commands` (git mv packages/recipes -> packages/commands). Update all import specifiers, tsconfig/webpack/migrations/jest aliases, and project/package/jest config. A backward-compat `@packmind/recipes` alias points at the commands package during the transition. Internal domain identifiers (Recipe/RecipeId/RecipeVersion/IRecipesPort/ RecipesHexa...), physical DB names, HTTP routes, wire DTO fields and on-disk `.packmind/recipes` artifact paths are deliberately left unchanged here and handled as follow-ups. Backport of PackmindHub/packmind-proprietary#669 onto OSS (upstream). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Symbol-aware rename (ts-morph) of internal domain identifiers from the recipe vocabulary to command: types/brands (Recipe->Command, RecipeId-> CommandId, RecipeVersion(Id)->CommandVersion(Id)), the port + DI token (IRecipesPort->ICommandsPort, 'IRecipesPort'->'ICommandsPort'), services/ repositories/schemas/adapters/hexa/jobs, use-case contract types, methods, and the corresponding files/dirs (packages/types/src/recipes->commands, frontend domain/recipes->commands, api spaces/recipes->spaces/commands, etc.). The CQRS "Command" suffix is intentionally NOT collapsed with the business "Command" noun (e.g. CaptureRecipeCommand -> CaptureCommandCommand): the two Commands are distinct concepts. Deliberately NOT changed here (external contract / PR2 / rendering): - wire DTO field keys (recipeId, recipes, recipeName, recipesCount...) kept - HTTP routes and route-param filenames - DB tableName/column string literals, event-name strings, brand strings - on-disk .packmind/recipes artifact paths and the rendering pipeline - Chakra defineRecipe in @packmind/ui Builds, typecheck and tests green across commands, api, mcp-server, packmind-cli, deployments, coding-agent, frontend, playbook-change-applier and the domain packages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Single-cutover physical rename of the recipes domain tables/columns/
indexes/FK constraints to command naming, with matching TypeORM schema
updates. New migration 1811000000000-RenameRecipesToCommands (catalog-only
ALTER ... RENAME, fully reversible down()).
Tables : recipes->commands, recipe_versions->command_versions,
package_recipes->package_commands,
distributed_package_recipe_versions->distributed_package_command_versions
Columns: recipe_id->command_id, recipe_version_id->command_version_id
Indexes: idx_recipe_user/space, idx_package_recipes_unique, idx_dprv_unique -> command
FKs : FK_recipe_*, FK_package_recipes_*, FK_dprv_* -> command
EntitySchemas: tableName + physical column/joinTable/index name mappings
updated; ORM entity names flipped ('Recipe'->'Command' etc., referenced
only within schemas). TS property keys (recipeId) and relation aliases are
kept (they auto-map to the new columns; wire field renames are PR2).
Raw-SQL/QueryBuilder repository refs to physical columns/tables updated to
the new names.
Deploy note: requires a brief maintenance window (single cutover, no compat
views). Migration up/down not yet exercised against a live Postgres (no
Docker in CI-less env) — verify on staging before prod. Schema mapping is
validated end-to-end by integration-tests (506) against pg-mem.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Too many files changed for review. ( Bypass the limit by tagging |
The api commands.controller spec's jest.Mocked<CommandsService> still declared the old recipe-named method keys after the internal rename; align the mock keys and call sites with the renamed command-* methods. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reconcile the recipes→commands rename (#660) with 39 commits of main. Resolution rule: take main's semantic changes, re-apply PR1's mechanical recipe→command rename. - drop MCP (#374): accept deletion of apps/mcp-server - remove recipe version summary feature (#659): drop summary services/jobs and their command-renamed counterparts (CommandSummaryService, UpdateCommandsAndGenerateSummaries*, llmPort/setLlmPort wiring) - drop one-click trial (#373): accept GetStartedWithPackmindWidget deletion - adopt main's modal→drawer refactor (#657) for ProposeDescriptionChangeModal Co-Authored-By: Claude Opus 4.8 <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.



Summary
The "safe" half of the
recipes → commandsproduct rename (#660). This renames everything internal — the package, all domain identifiers, and the physical DB schema — while leaving external contracts untouched (HTTP routes + wire DTO field names), which land in a follow-up PR with an expand/contract (old+new side-by-side) strategy.This is a reproduction on OSS (upstream) of the work originally opened on the proprietary fork in PackmindHub/packmind-proprietary#669; that PR is being closed in favour of this one, which syncs down to proprietary.
What's in here (3 commits)
packages/recipes → packages/commands, nx projectrecipes → commands,@packmind/recipes → @packmind/commands, tsconfig/webpack/migrations/jest aliases. A backward-compat@packmind/recipesalias still resolves to the commands package during the transition.Recipe→Command,RecipeId→CommandId,RecipeVersion(Id)→CommandVersion(Id)), the port + DI token (IRecipesPort→ICommandsPort,'IRecipesPort'→'ICommandsPort'), services/repositories/schemas/adapters/hexa/jobs, use-case contract types, methods, and the corresponding files/dirs (types/src/recipes→commands,frontend/src/domain/recipes→commands, apispaces/recipes→spaces/commands, …).1811000000000-RenameRecipesToCommands(catalog-onlyALTER … RENAME, fully reversible), plus TypeORM schema mappings and raw-SQL repository refs.Naming conventions applied
Commandsuffix is intentionally NOT collapsed with the businessCommandnoun:CaptureRecipeCommand → CaptureCommandCommand,DeleteRecipeCommand → DeleteCommandCommand. The twoCommands are distinct concepts (the business item vs. the Query/Command pattern).recipeId: RecipeIdbecamerecipeId: CommandId— the key stays, only the type is renamed. TS property names, relation aliases, and DB column property keys are unchanged so TypeORM auto-maps to the new physical columns.Deliberately NOT changed (→ follow-up PR / rendering contract)
/…/recipes,recipes/publish,deployments/recipe/:id) and route-param filenames.recipeId,recipes,recipeName,recipesCount, …) — these go in the follow-up PR with new fields living alongside the old ones (expand/contract), removing the old ones in ~1–2 months..packmind/recipesartifact paths and the whole rendering/deployer pipeline.defineRecipe/.recipe.tsin@packmind/ui(unrelated concept).Physical DB objects renamed
recipes→commands,recipe_versions→command_versions,package_recipes→package_commands,distributed_package_recipe_versions→distributed_package_command_versionsrecipe_id→command_id,recipe_version_id→command_version_ididx_recipe_user/space,idx_package_recipes_unique,idx_dprv_unique→command/dpcvFK_recipe_*,FK_package_recipes_*,FK_dprv_*→command(
recipe_usageanddeployment_recipe_versionswere already dropped and are not touched. Auto-named FKs are left — Postgres updates them on rename.)Recreate/scale-to-zero or a short window.up()/down()were NOT run against a live Postgres (no Docker in the build env). The rename SQL is catalog-only and the object names were verified by replaying migration history, and the schema mapping is validated end-to-end byintegration-tests(506) against pg-mem — but please dry-run the migration on staging before prod.Validation
commands,api,mcp-server,packmind-cli,deployments,coding-agent,frontend,migrations— passcommands(226),deployments(1228),coding-agent(1081),packmind-cli(3144),mcp-server(335),playbook-change-applier(95),integration-tests(506),frontend,spaces,standards,accounts,skills— passPart of #660.
🤖 Generated with Claude Code