@schalkneethling/calavera-skill-calavera 0.2.6 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -21,9 +21,10 @@ Use Calavera to compose and apply project tooling through its MCP tools whenever
|
|
|
21
21
|
When the recipe selects `stylelint-baseline`, ask the user which Baseline target their CSS must meet before `dry_run_apply`. The Stylelint rule checks against `widely` by default, which needs no entry in the recipe. Show the targets that `list_baseline_targets` returns, or call `describe_baseline_target` when the user names a single target. When the user names CSS features they need, find their IDs with `search_baseline_features` and pass them to `recommend_baseline_target`, which returns the earliest fixed year that supports them all, or a null `recommendedTarget` with the `limitedFeatures` that are not yet Baseline. Compose again with any other target in `integrationOptions.stylelint-baseline.available`.
|
|
22
22
|
When the recipe selects `stryker`, confirm the test runner with the user before `dry_run_apply`, because Calavera does not detect it from the project. Offer the runners that `list_integrations` or `describe_integration` list in `testRunners`; the first is the default and needs no entry in the recipe. When the user chooses another runner, compose again with it in `integrationOptions.stryker.testRunner`. For `node:test`, also ask which paths the project's test script passes to `node --test`, and record them as `integrationOptions.stryker.testFiles` only when they differ from the files that `node --test` runs by default.
|
|
23
23
|
8. Validate and explain it with `validate_recipe` and `explain_recipe`.
|
|
24
|
-
9. Present `dry_run_apply` output to the user before changing files, including inspection findings, omitted script explanations, ownership notes, and planned file changes. Show the user the command each `package.json` script in `scriptChanges` will run, and for a changed or renamed script the command it replaces.
|
|
24
|
+
9. Present `dry_run_apply` output to the user before changing files, including inspection findings, omitted script explanations, ownership notes, and planned file changes. Show the user the command each `package.json` script in `scriptChanges` will run, and for a changed or renamed script the command it replaces. Show the user each script in `keptScripts`, which Calavera keeps as the user's own because its value is not one Calavera wrote, with the user's value, Calavera's value, and the command that hands it back, which the `project-owned-package-script` finding gives. When the recipe selects an artifact, `dry_run_apply` writes one file, `.calavera/apply-plan.json`, which `result.planPath` names, and nothing else; tell the user. The plan records the artifact versions the dry run showed, and `apply_recipe` installs exactly those.
|
|
25
25
|
When `result.manifestDecision` has no `choice`, the current directory has no `package.json` of its own but Calavera found a manifest above it, so the dry run plans nothing. Show the user the ancestor manifest in `result.manifestDecision.ancestor.manifestPath`, whether Vite+ manages it in `result.manifestDecision.ancestor.status`, and every entry in `result.manifestDecision.options` with its `choice` and `description`: `create-here`, `apply-at-ancestor`, and `abandon`. Ask the user to choose, and never pick one for them, even when one looks obvious. Call `dry_run_apply` again with the user's choice as `manifestChoice`; the result records it in `result.manifestDecision.choice`, so do not ask again. For `abandon`, tell the user that Calavera changes nothing and stop. For the other choices, show the new dry run, and after the user approves it, pass the same `manifestChoice` to `apply_recipe`, which stops before writing anything without it. Pass `manifestChoice` only after a dry run returned `manifestDecision`, because Calavera refuses a choice where there is none to make.
|
|
26
26
|
10. Call `apply_recipe` only after the user explicitly approves the dry run. Pass it the recipe from the dry run's `result.recipe`, which records every artifact input and integration input; `apply_recipe` refuses an input the recipe does not record. Show the user each line in `wiringChanges`, each warning in `wiringWarnings` and `inputWarnings`, each value in `integrationInputs`, and each entry in `ignoreChanges`, which lists the lines apply adds to or removes from `.gitignore` and `.htmlvalidateignore`, and each entry in `stagingLeftovers`, which lists the old folders in `.calavera/.staging/` that apply removes and the entries there it keeps, as part of the dry run. After `dry_run_apply` and again after `apply_recipe`, show each entry in `temporaryFolderLeftovers` as a warning with its remedy: each is a temporary folder Calavera could not remove, which the user should remove; the command still finished.
|
|
27
|
+
When `apply_recipe` stops on `.calavera/apply-plan.json`, because the recipe or the artifact lock changed since the dry run, call `dry_run_apply` again, show the user the new result, and ask them to approve it before you call `apply_recipe` again. Do not delete the plan to get past the stop.
|
|
27
28
|
11. If the MCP transport closes or reports `-32000` during or immediately after `apply_recipe`, treat the outcome as unknown instead of failed. Inspect `calavera.config.json`, `.calavera/state.json`, generated files, and package metadata before retrying the apply.
|
|
28
29
|
|
|
29
30
|
Do not hand-author `calavera.config.json`, even when a Calavera tool is missing. Let Calavera compose, validate, dry-run, and apply the recipe so generated files, package scripts, dependencies, AI artifacts, and managed state stay consistent.
|
|
@@ -36,6 +37,8 @@ Treat files listed by `dry_run_apply` as Calavera-managed outputs. Do not hand-w
|
|
|
36
37
|
|
|
37
38
|
Use `reownManagedFiles` only after the user explicitly approves losing their local edits to the listed Calavera-tracked files: `apply_recipe` replaces each listed file's current contents with Calavera's, so the edits are lost unless they save a copy first. Tell the user this before they approve, and never use it to keep an edit.
|
|
38
39
|
|
|
40
|
+
Use `reownPackageScripts` only after the user explicitly approves losing their own value of each listed `package.json` script: `apply_recipe` replaces each listed script's current value, which Calavera keeps as the user's own, with Calavera's value, so the user's value is lost unless they save a copy first. Tell the user this before they approve, and never use it to keep a script.
|
|
41
|
+
|
|
39
42
|
When the user asks to stop Calavera managing the project and keep the tooling it installed, that is the CLI command `eject`, not an MCP tool, because it removes the Calavera MCP registration. Ask the user to run the dry run, pinned to a release that has `eject`, such as `latest`, because the version pinned for MCP setup may predate it: `npm create project-calavera@latest eject -- --dry-run` for npm, `pnpm dlx create-project-calavera@latest eject --dry-run` for pnpm, `yarn dlx create-project-calavera@latest eject --dry-run` for Yarn, or `bunx create-project-calavera@latest eject --dry-run` for Bun, and then the same command without `--dry-run` in their own terminal, where they approve the list it shows. Do not delete Calavera's files by hand or run `eject --yes` for them.
|
|
40
43
|
|
|
41
44
|
## MCP Setup
|
|
@@ -73,7 +76,7 @@ Use this flow only after the user agrees to switch from the MCP tools to the CLI
|
|
|
73
76
|
|
|
74
77
|
https://calavera.schalkneethling.com
|
|
75
78
|
|
|
76
|
-
After a recipe exists, preview local changes with the package-manager-specific apply dry-run command, pinned to the same explicit package version used for MCP setup: `npm create project-calavera@<version> apply -- --dry-run` for npm, `pnpm dlx create-project-calavera@<version> apply --dry-run` for pnpm, `yarn dlx create-project-calavera@<version> apply --dry-run` for Yarn, or `bunx create-project-calavera@<version> apply --dry-run` for Bun. When a recipe was already composed through MCP, do not ask the user to compose it again and do not write it to `calavera.config.json` yourself: save the recipe, from the dry run's `result.recipe` or from the `recipe` that `compose_recipe` returned, to a file outside the project, and pass its path with `--config`, for example `pnpm dlx create-project-calavera@<version> apply --config <path> --dry-run`, or `npm create project-calavera@<version> apply -- --config <path> --dry-run` for npm. Ask the user to approve the preview before running the matching apply command.
|
|
79
|
+
After a recipe exists, preview local changes with the package-manager-specific apply dry-run command, pinned to the same explicit package version used for MCP setup: `npm create project-calavera@<version> apply -- --dry-run` for npm, `pnpm dlx create-project-calavera@<version> apply --dry-run` for pnpm, `yarn dlx create-project-calavera@<version> apply --dry-run` for Yarn, or `bunx create-project-calavera@<version> apply --dry-run` for Bun. When a recipe was already composed through MCP, do not ask the user to compose it again and do not write it to `calavera.config.json` yourself: save the recipe, from the dry run's `result.recipe` or from the `recipe` that `compose_recipe` returned, to a file outside the project, and pass its path with `--config`, for example `pnpm dlx create-project-calavera@<version> apply --config <path> --dry-run`, or `npm create project-calavera@<version> apply -- --config <path> --dry-run` for npm. Ask the user to approve the preview before running the matching apply command. Run that command with the same `--config`. When the recipe selects an artifact, the preview writes `.calavera/apply-plan.json`, and the apply installs the artifact versions it records, or stops when the recipe or the artifact lock changed in between; then preview again and ask the user to approve it.
|
|
77
80
|
|
|
78
81
|
## User Prompt
|
|
79
82
|
|