fix(primitive-author): annotate tier moves and route package config
- annotate the research Must demoted to hook Should 12; narrow Must 5 note - extend Must 6 to scripts run via an interpreter -c string - add a fallback dispatch row and comma-joined --target guidance - fall back when agentsmd-author is not installed - add the apm-workflow boundary; pin upstream apm source URL Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
---
|
||||
name: primitive-author
|
||||
description: >
|
||||
Use when the user wants an apm hook, instruction or prompt file created, or
|
||||
audit findings or feedback applied to an existing one. Not read-only
|
||||
review -> factory-audit. Not skills -> skill-author. Not agents -> agent-author.
|
||||
Use when the user wants an apm hook, instruction or prompt created, or
|
||||
findings applied to one. Not read-only review -> factory-audit. Not skills
|
||||
-> skill-author. Not agents -> agent-author. Not apm.yml, targets or package
|
||||
config -> apm-workflow.
|
||||
allowed-tools: Bash Read Write Edit
|
||||
metadata:
|
||||
version: "0.1.0"
|
||||
@@ -25,9 +26,10 @@ metadata:
|
||||
|---|---|---|
|
||||
| A hook — `.apm/hooks/<name>.json`, or "run X whenever Y happens" | hook | `references/hook.md` |
|
||||
| An instruction — `.apm/instructions/<name>.instructions.md`, or a rule for files matching a pattern | instruction | `references/instruction.md` |
|
||||
| A prompt — `.apm/prompts/<name>.prompt.md`, or a reusable message the user types to kick off work | prompt | `references/prompt.md` |
|
||||
| A prompt — `.apm/prompts/<name>.prompt.md`, or a slash command steering existing skills | prompt | `references/prompt.md` |
|
||||
| Anything else (agent file, context/memory file) | none | stop; agents -> `agent-author`, otherwise name the unsupported type |
|
||||
|
||||
Read only the reference matching the resolved type — each is self-contained. If the target sits inside a git worktree, capture `rtk git log --oneline -1` before touching the filesystem; Step 4 needs it.
|
||||
Read only the matching reference. If the target sits inside a git worktree, capture `rtk git log --oneline -1` before touching the filesystem; Step 4 needs it.
|
||||
|
||||
## Step 2 — Boundary gate
|
||||
|
||||
@@ -45,7 +47,7 @@ Signals: grill output, `/factory-audit` findings, inline feedback, session conte
|
||||
|
||||
## Step 4 — Validate and close
|
||||
|
||||
1. Run `/factory-audit` on the file, inline in this context; resolve every FAIL before reporting done, including the `### Prose` FAILs Vale raises on an instruction or prompt body or description.
|
||||
2. Render it: in a fresh `mktemp -d` directory, run `rtk apm install <absolute path to the owning package> --target <its targets:, or all when it declares none>`, then read what each target received — `.claude/settings.json` and `.github/hooks/`, `.claude/rules/` and `.github/instructions/`, or `.claude/commands/` and `.github/prompts/`. A local path deploys the working tree; `--dry-run` renders nothing and a repo-root install resolves the remote's `main`.
|
||||
3. Bump the owning package's `apm.yml` `version:` — minor for a new hook, instruction or prompt, patch for a fix — unless this branch already bumped it for unreleased work. None of these is released on its own version — bump the package even if an instruction carries an optional `version:` key.
|
||||
1. Run `/factory-audit` on the file, inline in this context; resolve every FAIL before reporting done, including Vale's `### Prose` FAILs on an instruction or prompt.
|
||||
2. Render it: in a fresh `mktemp -d` directory, run `rtk apm install <absolute path to the owning package> --target <its targets: joined with commas, or all when it declares none>` (a repeated `--target` keeps only the last; Codex receives no prompts), then read what each target received — `.claude/settings.json` and `.github/hooks/`, `.claude/rules/` and `.github/instructions/`, or `.claude/commands/` and `.github/prompts/`. A local path deploys the working tree; `--dry-run` renders nothing and a repo-root install resolves the remote's `main`.
|
||||
3. Bump the owning package's `apm.yml` `version:` (minor for a new hook, instruction or prompt, patch for a fix; even if an instruction carries its own `version:` key) unless this branch already bumped it for unreleased work.
|
||||
4. **Commit verification.** Inside a git worktree, once the audit is clean, run `rtk git add` and `rtk git commit`, then confirm `rtk git log --oneline -1` changed from Step 1's hash: staged-but-uncommitted work is lost if the tree is cleaned up. Outside a worktree, report done on a clean audit and name that as the reason.
|
||||
|
||||
Reference in New Issue
Block a user