feat(kyberforge): add primitive-author for apm hooks, instructions and prompts

New skill that creates or improves an apm hook, instruction or prompt.
Its SKILL.md holds the shared procedure (dispatch on primitive, boundary
gate, create-or-improve, factory-audit close); one self-contained
reference per primitive carries its gate, checklist and template, drawn
from the microsoft-apm research docs and ADR-0029.

forge gains a route row sending a hook, instruction or prompt to
primitive-author through author-routes.md, and no longer lists hooks as
unroutable. factory-audit's description adds the primitive-author
boundary now that the target resolves.

Fixes #94

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-28 17:22:23 +00:00
parent 70210d6a7e
commit 0d96dc8282
12 changed files with 325 additions and 22 deletions

View File

@@ -3,12 +3,13 @@ source_keys:
- claude-code-subagents-docs
---
# Routing a skill or agent to its author skill
# Routing a skill, agent or apm primitive to its author skill
Reached from `SKILL.md` Step 2 when the classified artifact is a skill or an agent/subagent
definition. Route a skill to `skill-author` and an agent to `agent-author`. The two branches
differ on the author skill only — both verify the result with `factory-audit`, which detects the
artifact type itself — and everything below applies to both.
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.
## Choose fork or inline
@@ -25,8 +26,8 @@ Fall back to an **inline invocation** — same conversation, no subagent — whe
## Two-tier verification
Both author skills already close out with their own inline audit, in the same context as the
authoring work: `skill-author` and `agent-author` each invoke `factory-audit` on what they wrote.
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.
Tier two belongs to forge. Once the author skill's run has finished, spin up a separate