fix(kyberforge): correct prompt-author claims found in clean-context review
Three clean-context reviewers checked the skill against apm 0.28.0. Fix what they showed to be wrong: a failed hidden-character install still writes the Copilot and Gemini outputs and withholds only the Claude command; a multi-key input item turns each key into an argument. Add the symptom row, use "prompt file" for the source concept, name the Claude slash-commands source for the forge discriminator, drop an ambiguous Step 3 pointer and a "trim" heading with no trim guidance, and tighten two bats assertions. CONTEXT.md now says "a single-file command that is not a SKILL.md". Refs #149 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
This commit is contained in:
1 parent
e9df1ca0da
commit
8381c9f395
13 files changed
+40
-27
No files matched your search
@@ -22,7 +22,7 @@ Reached from `SKILL.md` Step 2. A prompt file is a single instruction a user fir
|
||||
|
||||
## Not a prompt file?
|
||||
|
||||
Stop and tell the user when the content is any of these, and do not bend it into a prompt:
|
||||
Stop and tell the user when the content is any of these, and do not bend it into a prompt file:
|
||||
|
||||
- A multi-step procedure that needs `references/` or `scripts/`, or that other skills or the model must be able to call: a skill. Which kind is forge's call.
|
||||
- A rule that should apply without being typed: an instructions file.
|
||||
|
||||
@@ -6,19 +6,19 @@ source_keys:
|
||||
|
||||
# Creating a new prompt file
|
||||
|
||||
Return to `SKILL.md` Step 3 once Step 3 below is done.
|
||||
Return to `SKILL.md` Step 3 once the file is filled in (Step 3 below).
|
||||
|
||||
## Before touching the filesystem
|
||||
|
||||
Confirm, and ask the user for anything missing:
|
||||
|
||||
- [ ] What the command does, in one sentence. Two jobs are two files.
|
||||
- [ ] What the prompt file does, in one sentence. Two jobs are two files.
|
||||
- [ ] Which arguments it takes, by name, or that it takes none.
|
||||
- [ ] A kebab-case stem. It becomes the command name.
|
||||
|
||||
## Step 1 — Check the stem
|
||||
|
||||
apm skips a hand-written file at `.claude/commands/<stem>.md`, `.github/prompts/<stem>.prompt.md`, `.cursor/commands/<stem>.md` and `.gemini/commands/<stem>.toml` ("not managed by APM") and installs everything else. `--force` overwrites it. List those paths in the consuming project and choose another stem on any hit.
|
||||
apm skips a hand-written file at a deployed path ("not managed by APM") and installs everything else. `--force` overwrites it. For each target in `targets:`, list its path from `references/target-mapping.md` in the consuming project and choose another stem on any hit.
|
||||
|
||||
## Step 2 — Scaffold
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Return to `SKILL.md` Step 3 once the edits are made.
|
||||
|
||||
## Step 1 — Read the file and the signals
|
||||
|
||||
Read the file whole. Signals are grill output, audit findings, inline feedback, or a session describing a command that is missing, lost a field or ignores its arguments. Apply what the signals name and nothing else.
|
||||
Read the file whole. Apply the signals that triggered this flow (`SKILL.md` Step 1) and nothing else.
|
||||
|
||||
## Step 2 — Diagnose by symptom
|
||||
|
||||
@@ -19,16 +19,17 @@ Read the file whole. Signals are grill output, audit findings, inline feedback,
|
||||
| The command does not exist after install | The file is nested, uppercase (`.PROMPT.md`) or a bare `.md`, so discovery ignored it | Move it flat into `.apm/prompts/` and name it `<stem>.prompt.md` |
|
||||
| The command is missing and install warned "malformed or over-budget YAML frontmatter" | Broken frontmatter, so Claude and Gemini skipped the file | Repair the YAML |
|
||||
| Install warned "frontmatter keys not supported … dropped" | The file carries keys the Claude family does not keep | Remove them, or accept that only Copilot keeps them |
|
||||
| An argument is missing from `arguments:` | The name failed `[A-Za-z][\w-]{0,63}` and install warned `input: rejected` | Rename it |
|
||||
| An argument is missing from `arguments:` | The name failed `[A-Za-z][A-Za-z0-9_-]{0,63}` and install warned `input: rejected` | Rename it |
|
||||
| An argument appears twice | Duplicate names are not caught | Remove the duplicate |
|
||||
| `arguments:` lists `name` and `description` | An `input:` item had `name:` and `description:` keys, and each key became an argument | Use plain names, or one `{name: description}` pair per item |
|
||||
| The body shows `$ARGUMENTS` or `$0` next to named arguments | `input:` and a literal placeholder were both written | Use one style |
|
||||
| The Gemini command ignores `model` or `allowed-tools` | Gemini keeps only `description` and the body, silently | State it to the user; it is apm behaviour |
|
||||
| Nothing deployed for Codex, Kiro or Antigravity | Those targets have no prompt surface | State it to the user |
|
||||
| A hand-written command was not replaced | apm skips unmanaged files | Rename the stem, or use `apm install --force` knowingly |
|
||||
| Install failed with exit 1 and a security error | Tag characters or a bidi override in the file; `--force` does not deploy it either | Remove the hidden characters |
|
||||
| Install failed with exit 1 and a security error | Tag characters or a bidi override in the file; the Claude-family command is withheld even with `--force`, while the Copilot copy and Gemini TOML may still be written | Remove the hidden characters |
|
||||
|
||||
Cases not in the table: read `references/target-mapping.md`.
|
||||
|
||||
## Step 3 — Split or trim
|
||||
## Step 3 — Split
|
||||
|
||||
A prompt doing two jobs becomes two files. Do the split only when a signal names it.
|
||||
A prompt file doing two jobs becomes two files. Do the split only when a signal names it.
|
||||
@@ -14,7 +14,7 @@ Verified against apm 0.28.0. Reached from `SKILL.md` Step 2 when a field, a plac
|
||||
`.apm/prompts/<name>.prompt.md`, flat. A root-level `<name>.prompt.md` is also discovered, but `.apm/prompts/` is canonical.
|
||||
|
||||
- Discovery is non-recursive and case-sensitive. A file in a subdirectory, `X.PROMPT.md` or a bare `x.md` is ignored with exit 0.
|
||||
- The stem is the prompt's name and the command name. There is no `name` field. Odd names (uppercase, underscores, dots, spaces) deploy unvalidated, so use kebab-case.
|
||||
- The stem is the prompt file's name and, once deployed, the command name. There is no `name` field. Odd names (uppercase, underscores, dots, spaces) deploy unvalidated, so use kebab-case.
|
||||
- `apm init` creates only `apm.yml`; create `.apm/prompts/` yourself.
|
||||
- The manifest `type:` is validated (`instructions`, `skill`, `hybrid`, `prompts`) but never constrains what deploys.
|
||||
- Do not give a root file and a `.apm/prompts/` file the same stem. The root one wins and the other is skipped with a misleading "not managed by APM".
|
||||
@@ -26,14 +26,14 @@ No closed schema; apm passes or drops keys per target.
|
||||
| Key | Purpose |
|
||||
|---|---|
|
||||
| `description` | Shown in pickers; kept everywhere |
|
||||
| `input` | Argument names, a list of strings. Becomes `arguments:` on the Claude family. Object and map forms are accepted, but their descriptions are discarded |
|
||||
| `input` | Argument names, a list of strings. Becomes `arguments:` on the Claude family. A list item `{name: description}` is accepted, but the description is discarded. An item with several keys, such as `name:` plus `description:`, makes each key an argument, so do not write one |
|
||||
| `allowed-tools` (alias `allowedTools`) | Tool allowlist. Copilot ignores it |
|
||||
| `model` | Model override |
|
||||
| `argument-hint` (alias `argumentHint`) | Hint text; synthesised as `<a> <b>` from `input` when omitted |
|
||||
|
||||
Input names must match `[A-Za-z][\w-]{0,63}`. An invalid name is dropped with a warning and the install still succeeds; duplicates are neither removed nor warned about.
|
||||
Input names must match `[A-Za-z][A-Za-z0-9_-]{0,63}`. An invalid name is dropped with a warning and the install still succeeds; duplicates are neither removed nor warned about.
|
||||
|
||||
The Copilot App workflow keys `interval`, `schedule_hour` and `schedule_day` mark a prompt as a scheduled workflow that the command integrator skips. Do not use them in a plain prompt. The VS Code keys `agent`, `tools` and `name` survive on Copilot only.
|
||||
The Copilot App workflow keys `interval`, `schedule_hour` and `schedule_day` mark a prompt file as a scheduled workflow that the command integrator skips. Do not use them in a plain prompt file. The VS Code keys `agent`, `tools` and `name` survive on Copilot only.
|
||||
|
||||
## Body placeholders
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ Claude Code natively supports `$ARGUMENTS`, zero-based `$N` and named `$name` fr
|
||||
## Ownership and cleanup
|
||||
|
||||
- A hand-written file at a deployed path is skipped ("not managed by APM", exit 0); `--force` overwrites. Editing a deployed file and reinstalling silently overwrites it.
|
||||
- Removing a prompt from the package and reinstalling deletes the deployed files. A hand-edited one is kept with a "delete manually" message.
|
||||
- Zero-width characters, BOM and NBSP warn. Tag characters and bidi overrides are critical: install exits 1 and deploys nothing, even with `--force`, which still exits 0.
|
||||
- Removing a prompt file from the package and reinstalling deletes the deployed files. A hand-edited one is kept with a "delete manually" message.
|
||||
- Zero-width characters, BOM and NBSP warn and the file deploys to every target. Tag characters and bidi overrides are critical: install exits 1 and the Claude-family command is withheld, but the Copilot byte copy and Gemini TOML may still be written. `--force` makes the exit code 0 and changes nothing else.
|
||||
|
||||
## Packing
|
||||
|
||||
|
||||
Reference in new issue
Block a user