The fallback decided for apm's drift audit covers attribution and disableSkillShellExecution. The hand-written rtk hook sits in the same file and is not covered. The retest already planned in chore(agents): ignore local Claude settings and commit apm-deployed hooks supplies the fact; this ticket decides what follows from it.
To decide
If the newest apm still fails apm audit --ci on entries it does not own, where does the rtk hook live: per user through rtk init -g (reversing "no rtk init -g"), shipped by the skills source as an apm hook so that apm owns the entry, or nowhere, with rtk no longer mandatory?
Should the retest include one hand-written hook entry next to one apm-deployed hook, so the answer covers hooks and not only top-level keys?
Part of #87
The fallback decided for apm's drift audit covers `attribution` and `disableSkillShellExecution`. The hand-written `rtk` hook sits in the same file and is not covered. The retest already planned in [chore(agents): ignore local Claude settings and commit apm-deployed hooks](https://git.rkdr.net/Mortis/Kamino/issues/196) supplies the fact; this ticket decides what follows from it.
## To decide
1. If the newest apm still fails `apm audit --ci` on entries it does not own, where does the `rtk` hook live: per user through `rtk init -g` (reversing "no `rtk init -g`"), shipped by the skills source as an apm hook so that apm owns the entry, or nowhere, with `rtk` no longer mandatory?
2. Should the retest include one hand-written hook entry next to one apm-deployed hook, so the answer covers hooks and not only top-level keys?
## Waits on this
[chore(dev): install rtk-oss from dev-setup.sh and track its guarded Claude Code hook](https://git.rkdr.net/Mortis/Kamino/issues/228) is blocked by this ticket, for its step 2.
Evidence is in the first comment.
apm-cli 0.28.0 source: the drift replay starts from empty target directories and compares every file it produced with the project's copy byte for byte. It produces .claude/settings.json only when apm deploys a hook. A hand-written hook entry is a byte difference like any other key. Read, not run.
The audit reaches Lint with the re-check of the skills source, after the rtk issue could have merged.
Three reviewers raised this independently.
Related facts for the rtk issue: rtk hook claude exists (seen in rtk 0.42.4). No crate named rtk-oss exists on crates.io (checked 2026-11-17), so the cargo install rtk-oss fallback in that issue cannot work as written.
Not settled: whether the newest apm still compares the whole settings file. apm audit --ci was not run, because it would fetch the private source.
## Evidence from the review of the map (2026-11-17)
- [Making sure an agent actually loads the guidance](https://git.rkdr.net/Mortis/Kamino/issues/213), decision 8, names two keys and rules out `--no-drift`.
- [Committed skills as agent instructions: ownership, updates and required tools](https://git.rkdr.net/Mortis/Kamino/issues/208), decision 7: the tracked hook is the whole setup, "with no `rtk init -g`".
- apm-cli 0.28.0 source: the drift replay starts from empty target directories and compares every file it produced with the project's copy byte for byte. It produces `.claude/settings.json` only when apm deploys a hook. A hand-written hook entry is a byte difference like any other key. Read, not run.
- The audit reaches Lint with the re-check of the skills source, after the `rtk` issue could have merged.
- Three reviewers raised this independently.
Related facts for the `rtk` issue: `rtk hook claude` exists (seen in `rtk` 0.42.4). No crate named `rtk-oss` exists on crates.io (checked 2026-11-17), so the `cargo install rtk-oss` fallback in that issue cannot work as written.
Not settled: whether the newest apm still compares the whole settings file. `apm audit --ci` was not run, because it would fetch the private source.
New fact (read from source, not run). The ticket's premise holds only for apm-cli 0.28.0. Since 0.29.0 (CHANGELOG: "apm audit now compares only APM-owned entries in shared native hook configs, preserving user-authored hooks"), the drift check projects only the hooks object of .claude/settings.json and keeps only entries recorded in the sidecar .claude/apm-hooks.json. In 0.36.1 (newest, 2026-11-18; integration/hook_ownership.py:140-188, install/drift.py:841-858, 934-952), hand-written hook entries and hand-written top-level keys (attribution, disableSkillShellExecution) cause no drift. It still fails when the sidecar is missing, when a hand-written entry is byte-identical to an apm-owned one ("ambiguous duplicate"), or when hooks is not an object. No option declares hand-written content ignored; --no-drift is the only switch. apm install merges into the file (keeps other keys, rewrites formatting). apm treats a hook as an executable primitive, allowed with apm approve (executables.allow in apm.yml).
The rtk hook comes from apm, whatever the audit does. The guarded hook (command -v rtk >/dev/null 2>&1 && exec rtk hook claude || exit 0, PreToolUse, matcher Bash) ships as a hook primitive in a new rtk plugin in the skills source, filed there by the maintainer, outside this map, like the guard hook. Kamino adds the plugin to apm.yml, allows it with apm approve (entry committed) and commits what it deploys. rtk stays mandatory; no rtk init -g. Reason: apm then owns the entry, so the audit checks the hook is present and unaltered, and one source serves every repository. Held by: control (apm audit --ci) for the deployed hook; rtk on the machine stays aspirational.
Rule: every hook in the tracked .claude/settings.json arrives through apm. Reason: a hook nobody owns is checked by nothing. Held by: review (CODEOWNERS on .claude/); apm ≥ 0.29.0 does not see hand-written hooks, so no control holds it. It lives beside "never permissions.allow", wherever the local-settings issue writes that. Personal hooks go in the ignored .claude/settings.local.json.
The retest in chore(agents): ignore local Claude settings and commit apm-deployed hooks runs apm audit --ci at a pinned apm-cli ≥ 0.36.1 on a settings file holding attribution, disableSkillShellExecution and one apm-deployed hook (the rtk hook once it ships; otherwise the pull request says the hook case was not exercised), with .claude/apm-hooks.json committed. No hand-written hook case. Decision 8 of Making sure an agent actually loads the guidance (per-user fallback, upstream issue) applies only if this fails.
Gap accepted: until the plugin ships, dev-setup.sh installs rtk and no tracked hook calls it. No interim hand-written hook (rule 2). Both sit in Open to contributors, so no contributor arrives before the hook.
Backlog: no new issue. Scope changed on #193, #194, #196, #228. Owed outside the map: the rtk plugin issue in the skills source (maintainer).
## Resolution (2026-11-20)
Decided with the maintainer.
**New fact (read from source, not run).** The ticket's premise holds only for apm-cli 0.28.0. Since 0.29.0 (CHANGELOG: "`apm audit` now compares only APM-owned entries in shared native hook configs, preserving user-authored hooks"), the drift check projects only the `hooks` object of `.claude/settings.json` and keeps only entries recorded in the sidecar `.claude/apm-hooks.json`. In 0.36.1 (newest, 2026-11-18; `integration/hook_ownership.py:140-188`, `install/drift.py:841-858, 934-952`), hand-written hook entries and hand-written top-level keys (`attribution`, `disableSkillShellExecution`) cause no drift. It still fails when the sidecar is missing, when a hand-written entry is byte-identical to an apm-owned one ("ambiguous duplicate"), or when `hooks` is not an object. No option declares hand-written content ignored; `--no-drift` is the only switch. `apm install` merges into the file (keeps other keys, rewrites formatting). apm treats a hook as an executable primitive, allowed with `apm approve` (`executables.allow` in `apm.yml`).
1. **The `rtk` hook comes from apm, whatever the audit does.** The guarded hook (`command -v rtk >/dev/null 2>&1 && exec rtk hook claude || exit 0`, PreToolUse, matcher `Bash`) ships as a hook primitive in a new `rtk` plugin in the skills source, filed there by the maintainer, outside this map, like the guard hook. Kamino adds the plugin to `apm.yml`, allows it with `apm approve` (entry committed) and commits what it deploys. `rtk` stays mandatory; no `rtk init -g`. Reason: apm then owns the entry, so the audit checks the hook is present and unaltered, and one source serves every repository. Held by: control (`apm audit --ci`) for the deployed hook; `rtk` on the machine stays aspirational.
2. **Rule: every hook in the tracked `.claude/settings.json` arrives through apm.** Reason: a hook nobody owns is checked by nothing. Held by: review (CODEOWNERS on `.claude/`); apm ≥ 0.29.0 does not see hand-written hooks, so no control holds it. It lives beside "never `permissions.allow`", wherever the local-settings issue writes that. Personal hooks go in the ignored `.claude/settings.local.json`.
3. **The retest** in [chore(agents): ignore local Claude settings and commit apm-deployed hooks](https://git.rkdr.net/Mortis/Kamino/issues/196) runs `apm audit --ci` at a pinned `apm-cli` ≥ 0.36.1 on a settings file holding `attribution`, `disableSkillShellExecution` and one apm-deployed hook (the `rtk` hook once it ships; otherwise the pull request says the hook case was not exercised), with `.claude/apm-hooks.json` committed. No hand-written hook case. Decision 8 of [Making sure an agent actually loads the guidance](https://git.rkdr.net/Mortis/Kamino/issues/213) (per-user fallback, upstream issue) applies only if this fails.
4. **[chore(dev): install rtk-oss from dev-setup.sh and track its guarded Claude Code hook](https://git.rkdr.net/Mortis/Kamino/issues/228)** keeps steps 1 and 3 and is unblocked. Step 2 moves to the scope of [Re-check Shared agent primitives once the skills source is public](https://git.rkdr.net/Mortis/Kamino/issues/194). The double-wrap check against a global `rtk init -g` hook goes with whichever lands second.
5. **Gap accepted:** until the plugin ships, `dev-setup.sh` installs `rtk` and no tracked hook calls it. No interim hand-written hook (rule 2). Both sit in *Open to contributors*, so no contributor arrives before the hook.
Supersedes: point 7 of [Committed skills as agent instructions: ownership, updates and required tools](https://git.rkdr.net/Mortis/Kamino/issues/208) where it puts a hand-written hook in the tracked settings; the map's Notes clause "hooks arrive through apm or by hand".
No ADR: cheap to reverse. No new glossary terms.
**Backlog:** no new issue. Scope changed on [#193](https://git.rkdr.net/Mortis/Kamino/issues/193), [#194](https://git.rkdr.net/Mortis/Kamino/issues/194), [#196](https://git.rkdr.net/Mortis/Kamino/issues/196), [#228](https://git.rkdr.net/Mortis/Kamino/issues/228). Owed outside the map: the `rtk` plugin issue in the skills source (maintainer).
The skills-source issue owed by point 1 is filed: [feat(rtk): add an rtk plugin whose Claude Code hook routes Bash calls through rtk when it is installed](https://git.rkdr.net/Defame1297/holocron/issues/179).
Claude
removed a dependency 2026-11-20 21:51:25 +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 #87
The fallback decided for apm's drift audit covers
attributionanddisableSkillShellExecution. The hand-writtenrtkhook sits in the same file and is not covered. The retest already planned in chore(agents): ignore local Claude settings and commit apm-deployed hooks supplies the fact; this ticket decides what follows from it.To decide
apm audit --cion entries it does not own, where does thertkhook live: per user throughrtk init -g(reversing "nortk init -g"), shipped by the skills source as an apm hook so that apm owns the entry, or nowhere, withrtkno longer mandatory?Waits on this
chore(dev): install rtk-oss from dev-setup.sh and track its guarded Claude Code hook is blocked by this ticket, for its step 2.
Evidence is in the first comment.
Evidence from the review of the map (2026-11-17)
--no-drift.rtk init -g"..claude/settings.jsononly when apm deploys a hook. A hand-written hook entry is a byte difference like any other key. Read, not run.rtkissue could have merged.Related facts for the
rtkissue:rtk hook claudeexists (seen inrtk0.42.4). No crate namedrtk-ossexists on crates.io (checked 2026-11-17), so thecargo install rtk-ossfallback in that issue cannot work as written.Not settled: whether the newest apm still compares the whole settings file.
apm audit --ciwas not run, because it would fetch the private source.Resolution (2026-11-20)
Decided with the maintainer.
New fact (read from source, not run). The ticket's premise holds only for apm-cli 0.28.0. Since 0.29.0 (CHANGELOG: "
apm auditnow compares only APM-owned entries in shared native hook configs, preserving user-authored hooks"), the drift check projects only thehooksobject of.claude/settings.jsonand keeps only entries recorded in the sidecar.claude/apm-hooks.json. In 0.36.1 (newest, 2026-11-18;integration/hook_ownership.py:140-188,install/drift.py:841-858, 934-952), hand-written hook entries and hand-written top-level keys (attribution,disableSkillShellExecution) cause no drift. It still fails when the sidecar is missing, when a hand-written entry is byte-identical to an apm-owned one ("ambiguous duplicate"), or whenhooksis not an object. No option declares hand-written content ignored;--no-driftis the only switch.apm installmerges into the file (keeps other keys, rewrites formatting). apm treats a hook as an executable primitive, allowed withapm approve(executables.allowinapm.yml).rtkhook comes from apm, whatever the audit does. The guarded hook (command -v rtk >/dev/null 2>&1 && exec rtk hook claude || exit 0, PreToolUse, matcherBash) ships as a hook primitive in a newrtkplugin in the skills source, filed there by the maintainer, outside this map, like the guard hook. Kamino adds the plugin toapm.yml, allows it withapm approve(entry committed) and commits what it deploys.rtkstays mandatory; nortk init -g. Reason: apm then owns the entry, so the audit checks the hook is present and unaltered, and one source serves every repository. Held by: control (apm audit --ci) for the deployed hook;rtkon the machine stays aspirational..claude/settings.jsonarrives through apm. Reason: a hook nobody owns is checked by nothing. Held by: review (CODEOWNERS on.claude/); apm ≥ 0.29.0 does not see hand-written hooks, so no control holds it. It lives beside "neverpermissions.allow", wherever the local-settings issue writes that. Personal hooks go in the ignored.claude/settings.local.json.apm audit --ciat a pinnedapm-cli≥ 0.36.1 on a settings file holdingattribution,disableSkillShellExecutionand one apm-deployed hook (thertkhook once it ships; otherwise the pull request says the hook case was not exercised), with.claude/apm-hooks.jsoncommitted. No hand-written hook case. Decision 8 of Making sure an agent actually loads the guidance (per-user fallback, upstream issue) applies only if this fails.rtk init -ghook goes with whichever lands second.dev-setup.shinstallsrtkand no tracked hook calls it. No interim hand-written hook (rule 2). Both sit in Open to contributors, so no contributor arrives before the hook.Supersedes: point 7 of Committed skills as agent instructions: ownership, updates and required tools where it puts a hand-written hook in the tracked settings; the map's Notes clause "hooks arrive through apm or by hand".
No ADR: cheap to reverse. No new glossary terms.
Backlog: no new issue. Scope changed on #193, #194, #196, #228. Owed outside the map: the
rtkplugin issue in the skills source (maintainer).The skills-source issue owed by point 1 is filed: feat(rtk): add an rtk plugin whose Claude Code hook routes Bash calls through rtk when it is installed.