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

@@ -1,10 +1,10 @@
--- ---
name: forge name: forge
description: > description: >
Use when the user wants something built or improved but has not yet named Use when the user wants to build or improve something of unnamed type ("where
its type ("skill or plugin?"). If named, use instead: skill -> `skill-author`, does this idea go?"). If named, use instead: skill -> `skill-author`, agent ->
agent -> `agent-author`, hook/instruction/prompt -> `primitive-author`, `agent-author`, apm hook/instruction/prompt -> `primitive-author`, plugin ->
plugin -> `apm-workflow`. `apm-workflow`.
metadata: metadata:
version: "1.0.2" version: "1.0.2"
category: factory category: factory

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 ## Always inline, never forked
Run these routes inline, in the current conversation. Their flows are short, prompt-heavy or 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 gated — editing a package's manifest metadata republishes its public `plugin.json` description,
conversational confirmation — and a backgrounded fork cannot surface those checkpoints to the and removing a marketplace entry takes a conversational confirmation before `apm pack` changes the
user in real time. consumed catalog — and a backgrounded fork cannot surface those checkpoints to the user in real
time.
## No clean-context recheck, and no automatic audit ## 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 Skill, agent, and hook, instruction or prompt routes close with a clean-context audit rerun; these
is deliberate rather than an oversight. Neither artifact type has an audit skill counterpart to two do not, and the omission is deliberate rather than an oversight. Neither artifact type has an
re-run, so detaching the route to earn a recheck it would never get buys nothing. 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 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 `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 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 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 `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 the author skill only — all verify the result with `factory-audit`, which detects the artifact
itself — and everything below applies to all of them. type itself — and everything below applies to all of them.
## Choose fork or inline ## Choose fork or inline
@@ -27,12 +27,12 @@ Fall back to an **inline invocation** — same conversation, no subagent — whe
## Two-tier verification ## Two-tier verification
Every author skill already closes out with its own inline audit, in the same context as the 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. authoring work: `skill-author`, `agent-author` and `primitive-author` each invoke `factory-audit`
That is tier one, and forge does not change it. 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 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 **clean-context subagent** — fresh, not forked, no inherited context — to independently re-run
same audit skill against the finished artifact. This is a distinct verification layer, not a 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 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. 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. 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` 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 for unreleased work: `git diff $(git merge-base HEAD origin/main) -- <package>/apm.yml` shows a
`version:` line. One bump covers all unreleased work on a branch — `primitive-author` skips on the changed `version:` line. Diff against the remote default branch, not a local `main` that may be
same condition — so bumping again here double-counts it. 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 ## Delegate the bump