fix(forge): scope the primitive route to apm hooks

- say apm hook/instruction/prompt so pre-commit hooks stay with pc-author
- restore the idea-without-a-home trigger
- cite checkpoints forge's apm routes actually hit
- diff version bumps against the remote default branch

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:
2026-09-29 08:00:29 +00:00
parent fd86ee42f4
commit 06b01f8afc
4 changed files with 23 additions and 19 deletions

View File

@@ -15,15 +15,17 @@ removed per ADR-0015 once issue #90 landed, and `apm-workflow` is their sole suc
## Always inline, never forked
Run these routes inline, in the current conversation. Their flows are short, prompt-heavy or
gated — `apm publish` is not trivially reversible and removing a marketplace entry takes a
conversational confirmation — and a backgrounded fork cannot surface those checkpoints to the
user in real time.
gated — editing a package's manifest metadata republishes its public `plugin.json` description,
and removing a marketplace entry takes a conversational confirmation before `apm pack` changes the
consumed catalog — and a backgrounded fork cannot surface those checkpoints to the user in real
time.
## No clean-context recheck, and no automatic audit
Skill, agent and primitive routes close with a clean-context audit rerun; these two do not, and the omission
is deliberate rather than an oversight. Neither artifact type has an audit skill counterpart to
re-run, so detaching the route to earn a recheck it would never get buys nothing.
Skill, agent, and hook, instruction or prompt routes close with a clean-context audit rerun; these
two do not, and the omission is deliberate rather than an oversight. Neither artifact type has an
audit skill counterpart to re-run, so detaching the route to earn a recheck it would never get buys
nothing.
These routes get no automated terminal check either. `apm audit` is a separate action on
`apm-workflow`'s own dispatch table, not a closing step of the configure or marketplace flow a

View File

@@ -8,8 +8,8 @@ source_keys:
Reached from `SKILL.md` Step 2 when the classified artifact is a skill, an agent/subagent
definition, or a hook, instruction or prompt. Route a skill to `skill-author`, an agent to
`agent-author`, and a hook, instruction or prompt to `primitive-author`. The branches differ on
the author skill only — all verify the result with `factory-audit`, which detects the artifact type
itself — and everything below applies to all of them.
the author skill only — all verify the result with `factory-audit`, which detects the artifact
type itself — and everything below applies to all of them.
## Choose fork or inline
@@ -27,12 +27,12 @@ Fall back to an **inline invocation** — same conversation, no subagent — whe
## Two-tier verification
Every author skill already closes out with its own inline audit, in the same context as the
authoring work: `skill-author`, `agent-author` and `primitive-author` each invoke `factory-audit` on what they wrote.
That is tier one, and forge does not change it.
authoring work: `skill-author`, `agent-author` and `primitive-author` each invoke `factory-audit`
on what they wrote. That is tier one, and forge does not change it.
Tier two belongs to forge. Once the author skill's run has finished, spin up a separate
**clean-context subagent** — fresh, not forked, no inherited context — to independently re-run the
same audit skill against the finished artifact. This is a distinct verification layer, not a
**clean-context subagent** — fresh, not forked, no inherited context — to independently re-run
the same audit skill against the finished artifact. This is a distinct verification layer, not a
duplicate: the inline audit shares context with the work it is checking and can share its blind
spots, while the clean rerun has no stake in the result.

View File

@@ -25,9 +25,11 @@ Skip this step entirely if no ancestor `apm.yml` carries a `type:` field: the ar
standalone or scoped to a user agent directory, and there is no package to version.
Skip the bump, and report that you skipped it, if the branch already moved this package's `version`
for unreleased work: `git diff $(git merge-base HEAD main) -- <package>/apm.yml` shows a changed
`version:` line. One bump covers all unreleased work on a branch — `primitive-author` skips on the
same condition — so bumping again here double-counts it.
for unreleased work: `git diff $(git merge-base HEAD origin/main) -- <package>/apm.yml` shows a
changed `version:` line. Diff against the remote default branch, not a local `main` that may be
stale; if it is not `main`, resolve it with `git symbolic-ref refs/remotes/origin/HEAD`. One bump
covers all unreleased work on a branch — `agent-author` and `primitive-author` skip on the same
condition — so bumping again here double-counts it.
## Delegate the bump