From 06b01f8afc7b12ac3b611fb3cb1d304d73d40ead Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Tue, 29 Sep 2026 08:00:29 +0000 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi --- plugins/kyberforge/.apm/skills/forge/SKILL.md | 8 ++++---- .../.apm/skills/forge/references/apm-routes.md | 14 ++++++++------ .../.apm/skills/forge/references/author-routes.md | 12 ++++++------ .../.apm/skills/forge/references/version-bump.md | 8 +++++--- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/plugins/kyberforge/.apm/skills/forge/SKILL.md b/plugins/kyberforge/.apm/skills/forge/SKILL.md index 6da0de1..e7a8c80 100644 --- a/plugins/kyberforge/.apm/skills/forge/SKILL.md +++ b/plugins/kyberforge/.apm/skills/forge/SKILL.md @@ -1,10 +1,10 @@ --- name: forge description: > - Use when the user wants something built or improved but has not yet named - its type ("skill or plugin?"). If named, use instead: skill -> `skill-author`, - agent -> `agent-author`, hook/instruction/prompt -> `primitive-author`, - plugin -> `apm-workflow`. + Use when the user wants to build or improve something of unnamed type ("where + does this idea go?"). If named, use instead: skill -> `skill-author`, agent -> + `agent-author`, apm hook/instruction/prompt -> `primitive-author`, plugin -> + `apm-workflow`. metadata: version: "1.0.2" category: factory diff --git a/plugins/kyberforge/.apm/skills/forge/references/apm-routes.md b/plugins/kyberforge/.apm/skills/forge/references/apm-routes.md index ea5c59e..b728d05 100644 --- a/plugins/kyberforge/.apm/skills/forge/references/apm-routes.md +++ b/plugins/kyberforge/.apm/skills/forge/references/apm-routes.md @@ -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 diff --git a/plugins/kyberforge/.apm/skills/forge/references/author-routes.md b/plugins/kyberforge/.apm/skills/forge/references/author-routes.md index dc1b8e5..fdbf82b 100644 --- a/plugins/kyberforge/.apm/skills/forge/references/author-routes.md +++ b/plugins/kyberforge/.apm/skills/forge/references/author-routes.md @@ -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. diff --git a/plugins/kyberforge/.apm/skills/forge/references/version-bump.md b/plugins/kyberforge/.apm/skills/forge/references/version-bump.md index 7b16a23..f04dd11 100644 --- a/plugins/kyberforge/.apm/skills/forge/references/version-bump.md +++ b/plugins/kyberforge/.apm/skills/forge/references/version-bump.md @@ -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) -- /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) -- /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