fix(kyberforge): correct instructions-author claims found in PR #154 review
Four clean-context reviewers checked the skill against apm 0.28.0 by experiment. Fix the target-mapping, schema, verify and SKILL.md claims they showed to be wrong, add the missing README row and forge Gotcha entry, note the AGENTS.md import caveat in forge, and close three test gaps (mismatched quotes, prefix type, tilde root) found by mutation. Refs #148 Co-Authored-By: Claude Code <[email protected]> Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
This commit is contained in:
1 parent
a92320a189
commit
b4499fd024
10 files changed
+55
-28
No files matched your search
@@ -22,7 +22,7 @@ Read the file whole. Signals are grill output, audit findings, inline feedback,
|
||||
| The rule appears nowhere | The name lacks `.instructions.md` | Rename it |
|
||||
| Claude ignores guidance written in `description` | Claude Code drops `description` | Move the substance into the body |
|
||||
| A hand-written rule vanished after install | The stem collided with a deployed name | Restore it from version control and rename the source stem |
|
||||
| The same rule reaches the agent twice | Cursor, Windsurf, Kiro, Codex and OpenCode get both a native file and an `AGENTS.md` copy | State it to the user; it is apm behaviour, not a defect in the file |
|
||||
| The same rule reaches the agent twice | Cursor, Windsurf, Kiro and Grok get both a native file and an `AGENTS.md` copy | State it to the user; it is apm behaviour, not a defect in the file |
|
||||
|
||||
Cases not in the table: read `references/target-mapping.md`.
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ Verified against apm 0.28.0. Reached from `SKILL.md` Step 2 when a frontmatter f
|
||||
|
||||
## Frontmatter
|
||||
|
||||
Only `description` and `applyTo` carry meaning. `author` and `version` are parsed and never emitted to any target.
|
||||
Only `description` and `applyTo` carry meaning. `author` and `version` are parsed and emitted only by the verbatim-copy targets (Copilot, grok-build).
|
||||
|
||||
- `description`: one line. The apm docs call it required; the binary only warns. Copilot and Cursor keep it; Claude Code, Windsurf, Kiro, Antigravity and every compiled root file drop it. Cursor auto-generates one from the first body sentence when it is missing.
|
||||
- `description`: one line. The apm docs call it required; the binary only warns. Copilot, grok-build and Cursor keep it; Claude Code, Windsurf, Kiro, Antigravity and every compiled root file drop it. Cursor auto-generates one from the first body sentence when it is missing.
|
||||
- `applyTo`: a glob scoping the rule. The apm docs list it as both required and optional; the binary treats it as optional, with a warning. Empty or absent means an unconditional rule.
|
||||
|
||||
### `applyTo` grammar
|
||||
@@ -42,7 +42,7 @@ Plain markdown. Official guidance: bullets over prose, one topic per file (`pyth
|
||||
|
||||
`Instruction.validate()` yields three findings, all demoted to warnings: missing `description`, missing `applyTo` ("will apply globally") and empty content. A broken relative link in the body is a fourth, also non-fatal.
|
||||
|
||||
- A real `apm compile` prints them. `apm compile --validate` prints none and exits 0 even for a file with all three problems.
|
||||
- A real `apm compile` prints them. `apm compile --validate` prints none of them and exits 0 even for a file with all three problems; it exits 1 only when the package has no instructions at all.
|
||||
- `apm install` prints none.
|
||||
- `apm audit --ci` checks lockfile, deployed-file presence, content hash and hidden Unicode, not instruction content.
|
||||
- A file whose frontmatter does not parse is skipped by compile ("Failed to parse") but still deployed by install.
|
||||
|
||||
@@ -28,28 +28,28 @@ Verified against apm 0.28.0 and throwaway installs. Reached from `SKILL.md` Step
|
||||
| grok-build | `.grok/rules/<n>.instructions.md` | Verbatim copy |
|
||||
| codex, gemini, opencode and the rest | none | Reach instructions only through compile |
|
||||
|
||||
Windsurf, Kiro, Antigravity and Cursor do not deploy at user scope.
|
||||
Cursor, Windsurf and Antigravity do not deploy at user scope; Kiro and the rest do.
|
||||
|
||||
## Field survival
|
||||
|
||||
| Field | Claude | Copilot | Cursor | Windsurf, Kiro, Antigravity | Compiled root file |
|
||||
| Field | Claude | Copilot, grok-build | Cursor | Windsurf, Kiro, Antigravity | Compiled root file |
|
||||
|---|---|---|---|---|---|
|
||||
| `applyTo` | as `paths` | verbatim | as `globs` | as each target's glob key | grouping only |
|
||||
| `description` | dropped | kept | kept | dropped | dropped |
|
||||
| `author`, `version` | dropped | kept only because the file is verbatim | dropped | dropped | dropped |
|
||||
| `author`, `version` | dropped | kept only because the file is a verbatim copy | dropped | dropped | dropped |
|
||||
|
||||
For Claude Code the body's first line or heading is the only descriptive text that survives, so the body must explain itself.
|
||||
|
||||
## Ownership and overwrite
|
||||
|
||||
- Claude, Cursor, Windsurf, Kiro and Antigravity treat each deployed file as apm-owned: install replaces a hand-authored file at the same path without a prompt. Copilot skips an unmanaged file ("local files exist, not managed by APM") until `apm install --force`.
|
||||
- Removing or renaming a source makes the next install delete the file it deployed.
|
||||
- Claude, Cursor, Windsurf, Kiro and Antigravity treat each deployed file as apm-owned: install replaces a hand-authored file at the same path without a prompt. Copilot and grok-build skip an unmanaged file ("local files exist, not managed by APM") until `apm install --force`.
|
||||
- Removing or renaming a source makes the next install delete the file it deployed for Claude, Copilot, Cursor, Windsurf and Kiro. Antigravity and grok-build leave the old file behind in 0.28.0, so delete it by hand.
|
||||
|
||||
## Compile
|
||||
|
||||
- `--target claude` writes `CLAUDE.md`; Gemini writes `GEMINI.md` and `AGENTS.md`; every other target writes `AGENTS.md`.
|
||||
- Compile skips instructions already deployed natively, for Claude, Copilot and Antigravity only. With rules populated, `--target claude` exits 0, prints "produced no output files" and writes nothing. `--force-instructions` (alias `--no-dedup`) overrides.
|
||||
- Cursor, Windsurf, Kiro, Grok, Codex and OpenCode have no dedup: compile writes `AGENTS.md` that repeats rules the tool already loads natively.
|
||||
- Compile skips instructions already deployed natively, for Claude, Copilot and Antigravity only, and the skip is all-or-nothing: if any instruction has a same-stem file in `.claude/rules/`, compile omits every instruction from `CLAUDE.md`, including a new one never deployed. With rules populated, `--target claude` exits 0, prints "produced no output files" and writes nothing. `--force-instructions` (alias `--no-dedup`) overrides.
|
||||
- Cursor, Windsurf, Kiro and Grok have no dedup: compile writes `AGENTS.md` that repeats rules the tool already loads natively. Codex, Gemini and OpenCode get no native file, so the compiled root file is their only copy.
|
||||
- A package with no instruction primitives (skills only) makes plain `apm compile` exit 1 with "No instruction files found"; `apm compile --clean` exits 0.
|
||||
|
||||
## Native format facts
|
||||
|
||||
@@ -7,7 +7,7 @@ source_keys:
|
||||
|
||||
Reached from `SKILL.md` Step 3. Run step 2 outside the repo: `apm install` writes `apm_modules/`, `apm.lock.yaml` and a rules directory, and install overwrites hand-authored rule files without warning.
|
||||
|
||||
1. From the package root, a real compile. `--validate` always exits 0 and hides the missing-`description`, missing-`applyTo` and empty-body warnings, so it verifies nothing:
|
||||
1. From the package root, a real compile. `--validate` hides the missing-`description`, missing-`applyTo` and empty-body warnings and exits 0 whenever the package has an instruction, so it verifies nothing:
|
||||
|
||||
```bash
|
||||
apm compile --dry-run --target claude
|
||||
@@ -27,6 +27,6 @@ Reached from `SKILL.md` Step 3. Run step 2 outside the repo: `apm install` write
|
||||
|
||||
3. The deployed file must open with `paths:` listing the intended globs. No frontmatter block at all means `applyTo` was missing or did not parse: the rule would load in every session.
|
||||
|
||||
4. Once rules sit in `.claude/rules/`, `apm compile --target claude` writes no `CLAUDE.md` and still exits 0, so an exit-code check proves nothing. To check the compiled root file instead, compile in that same clean directory *before* installing, or pass `--force-instructions`; after an install, `--target claude` writes nothing.
|
||||
4. Once rules sit in `.claude/rules/`, `apm compile --target claude` writes no `CLAUDE.md` and still exits 0, so an exit-code check proves nothing. To inspect the compiled root file, pass `--force-instructions`.
|
||||
|
||||
Delete the directory afterwards. Report only what was observed; Cursor's list-form `globs` and the Windsurf, Kiro and Antigravity runtimes stay unverified.
|
||||
Reference in new issue
Block a user