The skill still described apm 0.28.0. On 0.39.3 an unquoted applyTo fails install and deploys nothing, the Claude compile writes AGENTS.md behind a CLAUDE.md that only imports it, dedup is per instruction, unscoped rules retire from .claude/rules/ once AGENTS.md carries them, and install skips a hand-authored rule rather than overwriting it. Update the Gotchas, the compatibility line and the target-mapping, schema, verify, improve and create references, the template comment, the tests README and the bats header. Bump metadata.version to 0.1.1. Refs: #273 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
3.0 KiB
3.0 KiB
name, description, compatibility, allowed-tools, metadata
| name | description | compatibility | allowed-tools | metadata | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| instructions-author | Use when creating or revising an apm instructions file (`.apm/instructions/*.instructions.md`). Not read-only review -> `factory-audit`. Not skills -> `skill-author`. Not agents -> `agent-author`. Not AGENTS.md -> `agentsmd-author`. | Requires the apm CLI, 0.39.2 or later; behaviour verified against apm 0.39.3. | Bash Read Write Edit |
|
Gotchas
- Claude Code drops
description; only Copilot, grok-build and Cursor keep it. Write a body that explains itself. - Quote every
applyTo. An unquoted**/*.pyis a YAML alias error:apm installexits 1 and deploys nothing, whileapm compiledrops the file and still exits 0. - On Claude a rule can leave
.claude/rules/: after a compile, unscoped and single-directory rules move intoAGENTS.md, whichCLAUDE.mdimports. Where a rule loads from is inreferences/target-mapping.md.
Step 1 — Dispatch
| Condition | Flow | Reference |
|---|---|---|
| No file at the target path | Create | references/create.md |
| A file exists, at least one improvement signal present | Improve | references/improve.md |
| A file exists, no signals | Stop and ask | — |
Signals: grill output, audit findings, inline feedback, a session describing a rule that loaded when it should not or failed to load. With none, ask whether the user meant to create a new file or has feedback to apply.
Read only the reference for the resolved flow.
Step 2 — Contract
Gates on every file, whichever flow wrote it:
- One topic per file. Two topics are two files.
- Scope. Omit
applyToonly for a rule that must load in every session, and tell the user it then costs context at every launch. - Source. Flat in
.apm/instructions/, named<stem>.instructions.md. Anything nested or misnamed is ignored or never installed. - Stem. It becomes the deployed filename. Install skips a hand-authored file at that path and deploys nothing there, and
--forceoverwrites it. Check for a collision before choosing it. - Body. Concrete, checkable bullets, paths in backticks, nothing assuming another file is loaded, under 200 lines. If unsure the content is a rule rather than a procedure or something to enforce, read
references/content.md.
If a field, glob or location is in question, read references/schema.md. If the question is which target keeps which field, or what compile does, read references/target-mapping.md.
Step 3 — Validate and close
- Verify with a real compile and a throwaway deploy: read
references/verify.md. Resolve every warning and confirm a scoped rule deploys withpaths:. - Bump the owning package's
apm.ymlversion— minor on create, patch on improve — because consumers compare it to detect updates.
factory-audit has no instructions checks yet, so nothing else gates the file; report only what the verification showed.