@schalkneethling/calavera-skill-calavera 0.2.4 → 0.2.6
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 +1 -1
- package/payload/calavera/SKILL.md +19 -12
package/package.json
CHANGED
|
@@ -9,31 +9,38 @@ Use Calavera to compose and apply project tooling through its MCP tools whenever
|
|
|
9
9
|
|
|
10
10
|
## Start Here
|
|
11
11
|
|
|
12
|
-
1.
|
|
13
|
-
2.
|
|
14
|
-
3. Call `inspect_project` when
|
|
12
|
+
1. Check which Calavera tools are listed to you, and use only the Calavera tools listed to you: the tools the server provides and the client allows. If no Calavera tools are listed to you at all, the Calavera tools are unavailable, and there are two possible causes. The server may be missing, because it is not registered, did not start, or the session has not reloaded since registration. Or the client does not allow the tools, for example because of the user's permission rules. Tell the user that the Calavera tools are unavailable and name both causes, then stop and ask the user before you register or repair the server, as MCP Setup describes, and before composing or applying anything. Do not inspect npm cache internals or import Calavera source files from package cache paths as a substitute for MCP setup.
|
|
13
|
+
2. This skill and the project's pinned MCP server update separately, so a later step may name a tool that the pinned server does not have. Never call a tool that is not listed to you. When Calavera tools are listed to you but not a tool that a step names, that is a missing tool, not a missing server, so the registration does not need repair: the pinned server may predate the tool, or the client may hide it. Tell the user which tool is not listed, skip the part of the step that needs it, and continue with the tools that are listed. When `compose_recipe`, `dry_run_apply`, or `apply_recipe` is missing, apply nothing through MCP, because without `compose_recipe` you must not hand-author the recipe, and through MCP the user approves changes only from a `dry_run_apply` result. When you ask the user whether to switch to Fallbacks because a tool is not listed, name both possible causes: the pinned server version lacks the tool, or the user's own permission rules hide it. A server version newer than the pinned one may provide the tool, but changing the registration needs the user's approval, as MCP Setup describes.
|
|
14
|
+
3. Call `inspect_project` when the server lists it. Inspect the project manually only after the user agrees to switch to Fallbacks, for example because the MCP server cannot be registered or a missing approval tool stops the MCP flow, as step 2 describes. Check files such as `package.json`, `calavera.config.json`, `.editorconfig`, and `.stylelintrc.json`.
|
|
15
15
|
If likely conflicts exist, pause before applying changes. List each conflict as a hard stop or a migration decision the user can approve, and use `dry_run_apply` to show concrete impact when adoption still looks possible.
|
|
16
16
|
4. Use AskUserTool or the agent client's equivalent when available to clarify profile preferences, framework needs, conflict decisions, and apply approval. If no such tool exists, ask the user directly.
|
|
17
17
|
5. List choices with `list_profiles`, `list_integrations`, and `list_ai_artifacts`. Use `describe_integration` when the user asks for more information or when you need to compare options.
|
|
18
18
|
6. Calavera does not scaffold a JavaScript or TypeScript formatter; in a `vp`-managed project, formatting comes from `vp fmt`.
|
|
19
19
|
7. Once the profile and requirements are clear, compose the recipe with `compose_recipe`.
|
|
20
|
-
When the response lists `artifactInputs`, ask the user to confirm or change each value before `dry_run_apply`. Show the input's `prompt` and its `default`, and when `default` is null, its `defaultUnavailable` reason. Then compose again with the confirmed values in that artifact's `inputs`, so the recipe records them.
|
|
20
|
+
When the response lists `artifactInputs`, ask the user to confirm or change each value before `dry_run_apply`. Show the input's `prompt` and its `default`, and when `default` is null, its `defaultUnavailable` reason. Then compose again with the confirmed values in that artifact's `inputs`, so the recipe records them. Do the same for each entry in `integrationInputs`, such as `github-repository-controls.defaultBranch`, and pass the confirmed value in `integrationOptions`. Each default names its `defaultSource`; show it, so the user can tell whether it is the branch they mean.
|
|
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
|
+
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.
|
|
21
23
|
8. Validate and explain it with `validate_recipe` and `explain_recipe`.
|
|
22
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.
|
|
23
|
-
|
|
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
|
+
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.
|
|
24
27
|
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.
|
|
25
28
|
|
|
26
|
-
Do not hand-author `calavera.config.json
|
|
29
|
+
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.
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
Before you switch from the MCP tools to the CLI in Fallbacks, for any reason, ask the user and wait for their agreement. This covers a tool the server lacks, a tool the client hides, every Calavera tool being unavailable, and a call the user refused at a permission prompt. A refused call is the user's answer, not a missing tool: in some clients the tool stays listed after the user refuses it, so step 2 does not apply. When the user refuses a Calavera tool call at a permission prompt, stop and ask the user how to continue, and never run the CLI apply command in its place unless the user then agrees to switch to Fallbacks.
|
|
32
|
+
|
|
33
|
+
Treat files listed by `dry_run_apply` as Calavera-managed outputs. Do not hand-write or edit them. Let `apply_recipe` create them after the user approves the dry run. In Fallbacks that the user agreed to, `create-project-calavera apply` creates them after the user approves its preview.
|
|
29
34
|
|
|
30
35
|
`apply_recipe.writeConfig: false` only skips writing `calavera.config.json`. Do not use it to bypass managed-file conflicts, stale state hashes, or an unapproved dry-run result.
|
|
31
36
|
|
|
32
|
-
Use `reownManagedFiles` only after the user explicitly approves
|
|
37
|
+
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
|
+
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.
|
|
33
40
|
|
|
34
41
|
## MCP Setup
|
|
35
42
|
|
|
36
|
-
If the Calavera MCP
|
|
43
|
+
If the Calavera MCP server is missing, help the user register this server from the project root. Check the target project's `package.json` first and use the package manager declared by `packageManager` or `devEngines.packageManager`.
|
|
37
44
|
|
|
38
45
|
```json
|
|
39
46
|
{
|
|
@@ -62,16 +69,16 @@ Registering the Calavera MCP server is a persistent code-execution change that r
|
|
|
62
69
|
|
|
63
70
|
## Fallbacks
|
|
64
71
|
|
|
65
|
-
|
|
72
|
+
Use this flow only after the user agrees to switch from the MCP tools to the CLI, for example when the MCP server cannot be registered, or when `compose_recipe`, `dry_run_apply`, or `apply_recipe` is missing. Compose and download a recipe in the hosted Calavera Web UI:
|
|
66
73
|
|
|
67
74
|
https://calavera.schalkneethling.com
|
|
68
75
|
|
|
69
|
-
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. Ask the user to approve the preview before running the matching apply command.
|
|
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.
|
|
70
77
|
|
|
71
78
|
## User Prompt
|
|
72
79
|
|
|
73
80
|
When the user wants to start from a scaffolded or existing project, suggest:
|
|
74
81
|
|
|
75
82
|
```text
|
|
76
|
-
Use Calavera for this project. First
|
|
83
|
+
Use Calavera for this project. First check which Calavera MCP tools are available, and use only those. If none are available, stop, tell me the possible causes, and ask me before configuring the MCP server or composing or applying anything. If a tool you need is missing, tell me which one, and do not apply anything without a dry run I approve. Once the tools are available, inspect the current project for existing tooling and possible config conflicts, list the available profiles, integrations, and AI artifacts, compose a recipe, show me the dry-run result, and apply it only after I approve.
|
|
77
84
|
```
|