New instructions-author skill (v0.1.0): scaffolds and revises .apm/instructions/*.instructions.md via scripts/new-instructions.sh, a minimal template, and create/improve flows.
Verification recipe (references/verify.md) uses a real apm compile --dry-run plus a throwaway-package install, because apm compile --validate always exits 0 and hides the missing-description, missing-applyTo and empty-body warnings.
Gotchas demonstrated in bats against real apm 0.28.0: Claude Code drops description; an unquoted applyTo installs with no paths: (loads in every session); compile writes no CLAUDE.md once rules are installed.
Wiring: forge routing row (+ author-routes.md, version-bump.md), one-line pointer in apm-workflow/references/compile.md, and ADR-0022 patch bumps for forge (1.0.3) and apm-workflow (1.0.2).
Research docs for the primitive (schema, target mapping, gotchas, sources) added earlier on this branch.
## Summary
- New `instructions-author` skill (v0.1.0): scaffolds and revises `.apm/instructions/*.instructions.md` via `scripts/new-instructions.sh`, a minimal template, and create/improve flows.
- Verification recipe (`references/verify.md`) uses a real `apm compile --dry-run` plus a throwaway-package install, because `apm compile --validate` always exits 0 and hides the missing-`description`, missing-`applyTo` and empty-body warnings.
- Gotchas demonstrated in bats against real apm 0.28.0: Claude Code drops `description`; an unquoted `applyTo` installs with no `paths:` (loads in every session); compile writes no `CLAUDE.md` once rules are installed.
- Wiring: `forge` routing row (+ `author-routes.md`, `version-bump.md`), one-line pointer in `apm-workflow/references/compile.md`, and ADR-0022 patch bumps for `forge` (1.0.3) and `apm-workflow` (1.0.2).
- Research docs for the primitive (schema, target mapping, gotchas, sources) added earlier on this branch.
- Versions: kyberforge 2.0.2 -> 2.1.0, catalog 0.5.2 (root `apm.yml`, `executables.allow` key, `marketplace.json`).
## Notes
- `factory-audit` has no instructions flow yet (#151), so forge's clean-context rerun is skipped for instructions files; stated in `author-routes.md`.
- `apm-workflow/references/compile.md` line 66 (empty `apm compile` exits 1) looks stale for 0.28.0; left untouched as out of scope.
## Test plan
- [x] `factory-audit` on `instructions-author`: validate, provenance and Vale clean; qualitative review resolved
- [x] `scripts/skill-size-check.sh` (ADR-0020 budgets)
- [x] `apm audit --ci` and `apm pack --check-clean`
- [x] Full bats suite: 440 tests, 0 failures
- [x] Pre-push hooks pass
Fixes #148
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
The existing schema doc covered only Claude and Copilot and called missing
description and empty content errors when apm 0.28.0 only warns. Rewrite it
with the applyTo grammar and add per-target compile/install mapping and a
gotchas doc (unquoted globs, install-vs-compile discovery, dedup and
overwrite behaviour), all verified against the apm 0.28.0 binary.
Refs: #148
Co-Authored-By: Claude Code <[email protected]>
Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
Scaffolds and revises apm instructions files, with a throwaway-package
verification recipe because `apm compile --validate` always exits 0 and
Claude Code drops `description`. Routed from forge and linked from
apm-workflow's compile reference. Bumps kyberforge to 2.1.0 and the catalog
to 0.5.2.
Fixes#148
Co-Authored-By: Claude Code <[email protected]>
Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
- **One topic per file.** Two topics are two files.
- **Scope.** Omit `applyTo` only for a rule that must load in every session, and tell the user it then costs context at every launch.
- **Stem.** It becomes the deployed filename, and install overwrites a hand-authored rule of the same name on most targets without a prompt. Check for a collision before choosing it.
- **Body.** Bullets, paths in backticks, nothing assuming another file is loaded, under 200 lines.
`factory-audit` has no instructions checks yet, so nothing else gates the file; report only what the verification showed.
**Commit verification.** Once verification is clean, run `rtk git add` and `rtk git commit`. Re-run `rtk git log --oneline -1` and confirm the hash changed from Step 1's. A non-empty `git diff --stat` is not proof: staged-but-uncommitted work is lost if the tree is cleaned up. Report done only once the hash has changed.
- instructions-author: keep two Gotchas, move the rest to the Step 2 contract
and verify.md; add references/content.md on what belongs in an instructions
file and tighten the template bullets to match
- instructions-author, skill-author, agent-author: remove the commit
verification step; committing is out of scope for author skills
- skill-author 1.0.6, agent-author 1.0.4 (ADR-0022 patch bumps)
Refs #148
Co-Authored-By: Claude Code <[email protected]>
Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
Quote the template description so the raw scaffold is valid YAML, reject
newline-containing names in new-instructions.sh, correct the empty-compile
facts (exit 1, --clean exits 0), and finish removing commit steps from the
skill-author, agent-author and forge references. Adds regression tests.
Refs #148
Co-Authored-By: Claude Code <[email protected]>
Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
Agreed, it belongs in forge. Moved in a92320a: forge's references/author-routes.md now has a "Rule, procedure or enforcement?" table (instructions file, AGENTS.md, skill, hook or permissions.deny), with a matching claude-code-memory-docs entry in forge's references/sources.md. instructions-author/references/content.md keeps only a short "Not a rule?" stop condition. No version bump needed, since forge and instructions-author are already above merge-base in this PR.
Agreed, it belongs in forge. Moved in a92320a: forge's `references/author-routes.md` now has a "Rule, procedure or enforcement?" table (instructions file, AGENTS.md, skill, hook or `permissions.deny`), with a matching `claude-code-memory-docs` entry in forge's `references/sources.md`. `instructions-author/references/content.md` keeps only a short "Not a rule?" stop condition. No version bump needed, since forge and instructions-author are already above merge-base in this PR.
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
Pushed b4499fd. Four clean-context reviewers (skill audit, apm claims checked by experiment, cross-file consistency, script/test/prose) found no blockers; this commit fixes their should-fix items.
Corrected claims in instructions-author (verified against apm 0.28.0):
Kiro does deploy at user scope; only Cursor, Windsurf and Antigravity do not.
Stale cleanup does not cover Antigravity or grok-build, which leave the old file behind.
grok-build also skips unmanaged files, keeps description, and emits author/version (verbatim copy, like Copilot).
Compile's native-dedup is all-or-nothing, so one deployed sibling hides new instructions unless --force-instructions is passed.
compile --validate exits 1 on a package with no instructions, not always 0.
An unquoted applyTo makes install warn once, then deploy unscoped.
Codex, Gemini and OpenCode get no native file, so they are not duplicated by compile.
verify.md step 4 no longer tells the agent to compile "before installing" after step 2 already installed.
Wiring:README.md gets an instructions-author row, forge's Gotcha lists it, and forge's routing table notes that Claude Code reads AGENTS.md only when no CLAUDE.md exists.
Tests: 22 bats tests, up from 19. New cases cover a mismatched-quote type:, a prefix type: prompts-only, and ~ expansion; each fails when its logic is mutated out. Test 19 now asserts the compile succeeded. The newline test moved into the argument-validation section.
Left alone: the nits (script edge cases such as a directory at the destination, a name-length cap, ~user, symlinked roots; the three-way table duplication; GNU sed in a test helper) and the commit-step removal, which was deliberate. Full bats suite 445/0, pre-push hooks passed. Review 50 thread is still unresolved.
Pushed `b4499fd`. Four clean-context reviewers (skill audit, apm claims checked by experiment, cross-file consistency, script/test/prose) found no blockers; this commit fixes their should-fix items.
**Corrected claims in `instructions-author`** (verified against apm 0.28.0):
- Kiro does deploy at user scope; only Cursor, Windsurf and Antigravity do not.
- Stale cleanup does not cover Antigravity or grok-build, which leave the old file behind.
- grok-build also skips unmanaged files, keeps `description`, and emits `author`/`version` (verbatim copy, like Copilot).
- Compile's native-dedup is all-or-nothing, so one deployed sibling hides new instructions unless `--force-instructions` is passed.
- `compile --validate` exits 1 on a package with no instructions, not always 0.
- An unquoted `applyTo` makes install warn once, then deploy unscoped.
- Codex, Gemini and OpenCode get no native file, so they are not duplicated by compile.
- `verify.md` step 4 no longer tells the agent to compile "before installing" after step 2 already installed.
**Wiring:** `README.md` gets an `instructions-author` row, forge's Gotcha lists it, and forge's routing table notes that Claude Code reads `AGENTS.md` only when no `CLAUDE.md` exists.
**Tests:** 22 bats tests, up from 19. New cases cover a mismatched-quote `type:`, a prefix `type: prompts-only`, and `~` expansion; each fails when its logic is mutated out. Test 19 now asserts the compile succeeded. The newline test moved into the argument-validation section.
Left alone: the nits (script edge cases such as a directory at the destination, a name-length cap, `~user`, symlinked roots; the three-way table duplication; GNU `sed` in a test helper) and the commit-step removal, which was deliberate. Full bats suite 445/0, pre-push hooks passed. Review 50 thread is still unresolved.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
instructions-authorskill (v0.1.0): scaffolds and revises.apm/instructions/*.instructions.mdviascripts/new-instructions.sh, a minimal template, and create/improve flows.references/verify.md) uses a realapm compile --dry-runplus a throwaway-package install, becauseapm compile --validatealways exits 0 and hides the missing-description, missing-applyToand empty-body warnings.description; an unquotedapplyToinstalls with nopaths:(loads in every session); compile writes noCLAUDE.mdonce rules are installed.forgerouting row (+author-routes.md,version-bump.md), one-line pointer inapm-workflow/references/compile.md, and ADR-0022 patch bumps forforge(1.0.3) andapm-workflow(1.0.2).apm.yml,executables.allowkey,marketplace.json).Notes
factory-audithas no instructions flow yet (#151), so forge's clean-context rerun is skipped for instructions files; stated inauthor-routes.md.apm-workflow/references/compile.mdline 66 (emptyapm compileexits 1) looks stale for 0.28.0; left untouched as out of scope.Test plan
factory-auditoninstructions-author: validate, provenance and Vale clean; qualitative review resolvedscripts/skill-size-check.sh(ADR-0020 budgets)apm audit --ciandapm pack --check-cleanFixes #148
🤖 Generated with Claude Code
https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
@@ -0,0 +16,4 @@- claude-code-memory-docs---## GotchasAre all of these really gotcha's? Or things that should be added as rules/requirements or generalisatons elsewhere?
@@ -0,0 +43,4 @@- **One topic per file.** Two topics are two files.- **Scope.** Omit `applyTo` only for a rule that must load in every session, and tell the user it then costs context at every launch.- **Stem.** It becomes the deployed filename, and install overwrites a hand-authored rule of the same name on most targets without a prompt. Check for a collision before choosing it.- **Body.** Bullets, paths in backticks, nothing assuming another file is loaded, under 200 lines.Is it clear what should be an instruction and what typer of info/content should be in the bod (either here or in the template?)
@@ -0,0 +54,4 @@`factory-audit` has no instructions checks yet, so nothing else gates the file; report only what the verification showed.**Commit verification.** Once verification is clean, run `rtk git add` and `rtk git commit`. Re-run `rtk git log --oneline -1` and confirm the hash changed from Step 1's. A non-empty `git diff --stat` is not proof: staged-but-uncommitted work is lost if the tree is cleaned up. Report done only once the hash has changed.Commit steps should be out of scope for author skills.
@@ -0,0 +8,4 @@---# FILL IN: one topic per file- FILL IN: the first rule, stated as a bullet.See body comment in skill.md
@@ -0,0 +29,4 @@- Anything stated in another file that loads alongside this one. Two copies drift, and contradictory rules are followed arbitrarily.- Generalities ("write clean code").## Right artifact?Does this section belong in the instruction skill? Or in the forge skill?
Agreed, it belongs in forge. Moved in
a92320a: forge'sreferences/author-routes.mdnow has a "Rule, procedure or enforcement?" table (instructions file, AGENTS.md, skill, hook orpermissions.deny), with a matchingclaude-code-memory-docsentry in forge'sreferences/sources.md.instructions-author/references/content.mdkeeps only a short "Not a rule?" stop condition. No version bump needed, since forge and instructions-author are already above merge-base in this PR.Pushed
b4499fd. Four clean-context reviewers (skill audit, apm claims checked by experiment, cross-file consistency, script/test/prose) found no blockers; this commit fixes their should-fix items.Corrected claims in
instructions-author(verified against apm 0.28.0):description, and emitsauthor/version(verbatim copy, like Copilot).--force-instructionsis passed.compile --validateexits 1 on a package with no instructions, not always 0.applyTomakes install warn once, then deploy unscoped.verify.mdstep 4 no longer tells the agent to compile "before installing" after step 2 already installed.Wiring:
README.mdgets aninstructions-authorrow, forge's Gotcha lists it, and forge's routing table notes that Claude Code readsAGENTS.mdonly when noCLAUDE.mdexists.Tests: 22 bats tests, up from 19. New cases cover a mismatched-quote
type:, a prefixtype: prompts-only, and~expansion; each fails when its logic is mutated out. Test 19 now asserts the compile succeeded. The newline test moved into the argument-validation section.Left alone: the nits (script edge cases such as a directory at the destination, a name-length cap,
~user, symlinked roots; the three-way table duplication; GNUsedin a test helper) and the commit-step removal, which was deliberate. Full bats suite 445/0, pre-push hooks passed. Review 50 thread is still unresolved.