apm-workflow/references/configure.md says hook subdirectories "must be created manually as content is migrated into them". There is no template, script or reference for .apm/hooks/*.json anywhere in kyberforge. forge/SKILL.md already says a hook "has no route here" and hands the user elsewhere, so the author is left without help.
The research doc plugins/kyberforge/docs/research/docs/microsoft-apm/hooks-primitive-schema.md records per-target reconstruction gotchas an author would get wrong by hand:
Copilot's version: 1 and camelCase field naming versus Claude's shape, plus the bash + powershell script split.
Event-name casing remaps between compile targets.
${CLAUDE_PLUGIN_ROOT} placeholder rewriting in script paths.
What to build
A new hook-author skill, shaped like agent-author:
SKILL.md with a trigger description that states its domain boundary (ADR-0021) and routes review-only requests to factory-audit.
assets/templates/ with a minimal .apm/hooks/*.json in the nested-wrapper shape.
references/ covering event-name casing, script-path placeholders and the Copilot field differences. Cite the research doc through source_keys and references/sources.md.
scripts/new-hook.sh scaffolder and tests/new-hook.bats, following agent-author.
Replace the "must be created manually" sentence in apm-workflow/references/configure.md with a pointer to the new skill.
Replace the "hook has no route" line in forge/SKILL.md with a real routing-table row.
Not in scope
Auditing hook files. That is the audit issue for hooks, which depends on this one.
Hook scripts themselves (the shell the JSON invokes).
Acceptance criteria
plugins/kyberforge/.apm/skills/hook-author/ exists with SKILL.md, assets/, references/, scripts/, tests/.
Scaffolded output compiles for both the Claude and Copilot targets, and the casing remap and path placeholder rewrite are demonstrated in a test or fixture.
metadata.version set per ADR-0022; description and body pass ADR-0020 budgets (scripts/skill-size-check.sh).
forge/SKILL.md has a route to it; the configure.md sentence is replaced.
factory-audit run on the new skill returns PASS.
apm audit --ci clean; bats tests pass.
The repo's own SessionStart hook (authored in plugins/kyberforge/.apm/hooks/hooks.json, ADR-0019) is not changed by this work.
plugins/kyberforge/.apm/skills/agent-author/ as the structural model
ADR-0019, ADR-0020, ADR-0021, ADR-0022
Part of #94.
## Why
`apm-workflow/references/configure.md` says hook subdirectories "must be created manually as content is migrated into them". There is no template, script or reference for `.apm/hooks/*.json` anywhere in kyberforge. `forge/SKILL.md` already says a hook "has no route here" and hands the user elsewhere, so the author is left without help.
The research doc `plugins/kyberforge/docs/research/docs/microsoft-apm/hooks-primitive-schema.md` records per-target reconstruction gotchas an author would get wrong by hand:
- Copilot's `version: 1` and camelCase field naming versus Claude's shape, plus the `bash` + `powershell` script split.
- Event-name casing remaps between compile targets.
- `${CLAUDE_PLUGIN_ROOT}` placeholder rewriting in script paths.
## What to build
A new `hook-author` skill, shaped like `agent-author`:
- `SKILL.md` with a trigger description that states its domain boundary (ADR-0021) and routes review-only requests to `factory-audit`.
- `assets/templates/` with a minimal `.apm/hooks/*.json` in the nested-wrapper shape.
- `references/` covering event-name casing, script-path placeholders and the Copilot field differences. Cite the research doc through `source_keys` and `references/sources.md`.
- `scripts/new-hook.sh` scaffolder and `tests/new-hook.bats`, following `agent-author`.
- Replace the "must be created manually" sentence in `apm-workflow/references/configure.md` with a pointer to the new skill.
- Replace the "hook has no route" line in `forge/SKILL.md` with a real routing-table row.
## Not in scope
- Auditing hook files. That is the audit issue for hooks, which depends on this one.
- Hook scripts themselves (the shell the JSON invokes).
## Acceptance criteria
- [ ] `plugins/kyberforge/.apm/skills/hook-author/` exists with `SKILL.md`, `assets/`, `references/`, `scripts/`, `tests/`.
- [ ] Scaffolded output compiles for both the Claude and Copilot targets, and the casing remap and path placeholder rewrite are demonstrated in a test or fixture.
- [ ] `metadata.version` set per ADR-0022; description and body pass ADR-0020 budgets (`scripts/skill-size-check.sh`).
- [ ] `forge/SKILL.md` has a route to it; the `configure.md` sentence is replaced.
- [ ] `factory-audit` run on the new skill returns PASS.
- [ ] `apm audit --ci` clean; bats tests pass.
- [ ] The repo's own `SessionStart` hook (authored in `plugins/kyberforge/.apm/hooks/hooks.json`, ADR-0019) is not changed by this work.
## References
- `plugins/kyberforge/docs/research/docs/microsoft-apm/hooks-primitive-schema.md`
- `plugins/kyberforge/.apm/skills/agent-author/` as the structural model
- ADR-0019, ADR-0020, ADR-0021, ADR-0022
Claude
added this to the Kyberforge basics milestone 2026-10-01 06:23:35 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #94.
Why
apm-workflow/references/configure.mdsays hook subdirectories "must be created manually as content is migrated into them". There is no template, script or reference for.apm/hooks/*.jsonanywhere in kyberforge.forge/SKILL.mdalready says a hook "has no route here" and hands the user elsewhere, so the author is left without help.The research doc
plugins/kyberforge/docs/research/docs/microsoft-apm/hooks-primitive-schema.mdrecords per-target reconstruction gotchas an author would get wrong by hand:version: 1and camelCase field naming versus Claude's shape, plus thebash+powershellscript split.${CLAUDE_PLUGIN_ROOT}placeholder rewriting in script paths.What to build
A new
hook-authorskill, shaped likeagent-author:SKILL.mdwith a trigger description that states its domain boundary (ADR-0021) and routes review-only requests tofactory-audit.assets/templates/with a minimal.apm/hooks/*.jsonin the nested-wrapper shape.references/covering event-name casing, script-path placeholders and the Copilot field differences. Cite the research doc throughsource_keysandreferences/sources.md.scripts/new-hook.shscaffolder andtests/new-hook.bats, followingagent-author.apm-workflow/references/configure.mdwith a pointer to the new skill.forge/SKILL.mdwith a real routing-table row.Not in scope
Acceptance criteria
plugins/kyberforge/.apm/skills/hook-author/exists withSKILL.md,assets/,references/,scripts/,tests/.metadata.versionset per ADR-0022; description and body pass ADR-0020 budgets (scripts/skill-size-check.sh).forge/SKILL.mdhas a route to it; theconfigure.mdsentence is replaced.factory-auditrun on the new skill returns PASS.apm audit --ciclean; bats tests pass.SessionStarthook (authored inplugins/kyberforge/.apm/hooks/hooks.json, ADR-0019) is not changed by this work.References
plugins/kyberforge/docs/research/docs/microsoft-apm/hooks-primitive-schema.mdplugins/kyberforge/.apm/skills/agent-author/as the structural model