docs(kyberforge): record the apm 0.39.3 re-run of the primitive experiments

Re-run the 0.28.0 instruction, prompt and executable-grant experiments on
the repo-pinned apm 0.39.3 in throwaway packages, and record what changed
in instructions-gotchas.md and prompt-gotchas.md. Register the run as the
apm-cli-0-39-3-experiments source so the skills refreshed under #273 can
cite it.

Refs: #273

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-12-02 11:59:17 +00:00
1 parent c2ba7f01bf
commit bb84e4ac13
3 files changed
+39 -1

No files matched your search

@@ -7,9 +7,10 @@ source_keys:
- cursor-rules-docs - cursor-rules-docs
- github-copilot-custom-instructions-docs - github-copilot-custom-instructions-docs
- apm-v0-39-3-changelog - apm-v0-39-3-changelog
- apm-cli-0-39-3-experiments
--- ---
Surprising behaviours and source contradictions for the instructions primitive. "Verified" means observed with the installed apm 0.28.0 in a throwaway directory outside the repo. Everything else is stated as sourced or inferred. Surprising behaviours and source contradictions for the instructions primitive. The section "Re-run on 0.39.3" at the end records what changed when the experiments were repeated on the repo-pinned apm 0.39.3; where it disagrees with an earlier section, it wins. "Verified" means observed with the installed apm 0.28.0 in a throwaway directory outside the repo. Everything else is stated as sourced or inferred.
## Verified failure modes ## Verified failure modes
@@ -91,3 +92,17 @@ From the Claude Code memory docs (`claude-code-memory-docs`): instructions reach
- Something that must happen at a fixed point (before every commit) or must be blocked is a hook or a `permissions.deny` entry, never an instruction: "Settings rules are enforced by the client regardless of what Claude decides to do. CLAUDE.md instructions shape Claude's behavior but are not a hard enforcement layer." - Something that must happen at a fixed point (before every commit) or must be blocked is a hook or a `permissions.deny` entry, never an instruction: "Settings rules are enforced by the client regardless of what Claude decides to do. CLAUDE.md instructions shape Claude's behavior but are not a hard enforcement layer."
- Two instructions that contradict each other make Claude pick one arbitrarily, across user and project files and across rules. - Two instructions that contradict each other make Claude pick one arbitrarily, across user and project files and across rules.
- Under 200 lines per file; one topic per file. - Under 200 lines per file; one topic per file.
## Re-run on 0.39.3 (holocron#273)
Observed with the repo-pinned apm 0.39.3 in throwaway packages outside the repo.
- **Unquoted or broken frontmatter fails install.** `applyTo: **/*.py` unquoted, or `description: [broken`, makes `apm install` exit 1 with `Rejected frontmatter in <file>` and deploy nothing. No transaction change is committed. Compile still prints `Failed to parse`, skips the file and exits 0; `--validate` counts it out. The silent widening above no longer happens on install.
- **Claude compile layout.** `apm compile --target claude` writes `AGENTS.md` with the instruction bodies and a `CLAUDE.md` that holds only `@AGENTS.md` under the generated header. Compile also warns `applyTo for '<name>' matched no files` when a pattern matches nothing in the project.
- **Dedup is per instruction.** Compile omits only the instructions already deployed to `.claude/rules/`. A nested or newly added instruction still reaches `AGENTS.md`, and when every instruction is deployed no `CLAUDE.md` is written. `--force-instructions` puts all of them in. When the compile also serves a target with no dedup (codex), `AGENTS.md` carries every instruction.
- **Unscoped rules move to `AGENTS.md`.** Install first deploys an unscoped rule to `.claude/rules/<n>.md` with no frontmatter. Once a compiled `AGENTS.md` carries it, the next install deletes that file and prints `Retired .claude/rules/<n>.md: AGENTS.md now carries it for Claude Code`. A `**/*.py` rule stays in `.claude/rules/`.
- **Hand-authored collisions are skipped on Claude too.** A hand-written `.claude/rules/<n>.md` or `.github/instructions/<n>.instructions.md` is kept, with `files skipped -- local files exist, not managed by APM`, exit 0. `apm install --force` overwrites it. The 0.28.0 silent overwrite on Claude is gone.
- **Stale cleanup covers every rule target.** Renaming a source deletes the old file on antigravity, claude, copilot, cursor, grok-build, kiro and windsurf.
- **Per-target transforms.** Unchanged from 0.28.0 except: Cursor writes several patterns as one comma-separated `globs:` string, not a list; Antigravity writes `trigger: always_on` for an unscoped rule.
- **Empty package.** With no `.apm/` content, plain compile exits 1 with `No APM content found to compile`. With skills but no instructions it is still `No instruction files found in .apm/ directory`, exit 1. `--clean` exits 0 in both.
- **Unchanged:** `--validate` hides the warnings a real compile prints; a nested file is compiled but never deployed; `description` is dropped on Claude.
@@ -9,6 +9,7 @@ source_keys:
- apm-cli-0-28-0-prompt-experiments - apm-cli-0-28-0-prompt-experiments
- apm-v0-39-3-source - apm-v0-39-3-source
- apm-v0-39-3-changelog - apm-v0-39-3-changelog
- apm-cli-0-39-3-experiments
--- ---
## What this covers ## What this covers
@@ -86,3 +87,15 @@ The experimental targets (hermes, openclaw, copilot-cowork, grok-cloud, copilot-
- Frontmatter `hooks` on a command is withheld with a warning. - Frontmatter `hooks` on a command is withheld with a warning.
- A non-string frontmatter key (for example `1:`) skips that one command with a warning, and the other commands still install. - A non-string frontmatter key (for example `1:`) skips that one command with a warning, and the other commands still install.
- Hidden-Unicode, collision and stale-cleanup behaviour were not re-checked. 0.38 and 0.39 changed how edited deployed files are kept (see `migration-0-28-to-0-39.md`), so the "hand-edited file is silently overwritten" item above is likely stale. - Hidden-Unicode, collision and stale-cleanup behaviour were not re-checked. 0.38 and 0.39 changed how edited deployed files are kept (see `migration-0-28-to-0-39.md`), so the "hand-edited file is silently overwritten" item above is likely stale.
## Re-run on 0.39.3 (holocron#273)
Observed with the repo-pinned apm 0.39.3 in throwaway packages outside the repo. Where this disagrees with the sections above, it wins.
- **Claude-native keys.** `disable-model-invocation`, `when_to_use`, `user-invocable` and `effort` reached `.claude/commands/<n>.md`. Cursor and OpenCode dropped them. `author` and `mcp` were dropped everywhere but Copilot.
- **Dropped-keys message.** Printed only with `--verbose`, as an info line naming the dropped keys and the target's supported set. A default install says nothing about them.
- **`hooks`** in a prompt's frontmatter is withheld on Claude with a `frontmatter hooks withheld` warning, and the command still deploys.
- **Kiro now receives prompts**, at `.kiro/prompts/<n>.md` with every frontmatter key stripped and a warning naming them. Codex, Antigravity and agent-skills still deploy nothing, silently.
- **Hand-edited deployed files.** Editing `.claude/commands/<n>.md` and reinstalling after a source change makes install exit 1 with `Kept ... it was modified since APM deployed it`, and nothing is committed. Removing the source keeps the edited file with a warning and cleans the others.
- **Hidden characters.** A tag character makes install exit 1 with nothing written on any target. `--force` exits 0 and writes the Copilot copy and Gemini TOML, but still withholds the Claude command. A zero-width space warns and deploys.
- **Unchanged:** compile ignores prompts; `--validate` counts none; malformed YAML skips the command with a warning; an invalid input name is rejected with a warning and duplicates pass; a hand-written file at a deployed path is skipped until `--force`; `input:` becomes `arguments:`; Gemini keeps `description` and the body, and prepends `Arguments: {{args}}` to a body using `$0`.
@@ -146,6 +146,16 @@ Note: `releasing.md`'s `--check-clean`/`--check-versions` scope, `apm pack` exit
- **Contributing files:** installation.md - **Contributing files:** installation.md
- **Status:** `extracted` - **Status:** `extracted`
## apm-cli-0-39-3-experiments
- **URL:** https://pypi.org/project/apm-cli/0.39.3/
- **Description:** The repo-pinned apm-cli 0.39.3 (`uv run --frozen apm`) run in throwaway packages in a scratchpad outside the repo, under holocron#273. It re-ran the 0.28.0 instruction and prompt experiments:
- **instructions:** the Claude compile layout, per-instruction dedup, an unscoped rule's retirement from `.claude/rules/`, unquoted and broken frontmatter on install and compile, hand-authored collisions, stale cleanup, the per-target transforms for ten targets, and the empty-package compile;
- **prompts:** Claude-native key survival on claude versus cursor and opencode, the `--verbose` dropped-keys message, `hooks` withholding, malformed YAML, input names, collisions, hand-edited deployed files, the Kiro prompt surface and hidden-character scanning;
- **executables:** a bare-name grant parking a hook, a full-identity grant with a different `#version` deploying it, and the gate-disabled message.
- **Contributing files:** instructions-gotchas.md, prompt-gotchas.md
- **Status:** `extracted`
## context7-microsoft-apm-0-39-3 ## context7-microsoft-apm-0-39-3
- **URL:** context7:/microsoft/apm - **URL:** context7:/microsoft/apm