Repository navigation
Closed
Labels
area/multi-targetMulti-target deploy spec, target directory creation, agent surface routing.status/needs-designDesign discussion required before implementation; not scope approval by itself.type/featureNew capability, new flag, new primitive.
Description
North star
APM needs exactly one answer to "who controls which primitive goes to which harness, and in what shape." This issue records the converged three-layer model so future requests (and PRs) resolve against a single design instead of accreting per-type flags and new verbs.
This supersedes the per-primitive-type approach in #1898 and is the design that PR #1902 implements.
The three layers
| Layer | Question | Mechanism | Status |
|---|---|---|---|
| CONSENT | May this package's executable run at all? | executables: {allow, deny} keyed per-package x per-exec-type (hooks/mcp/bin/canvas), deny-wins, deny-by-default |
shipped (security/executables.py) |
| PLACEMENT | Which harness(es) does this package go to? | per-package targets: on a dependency entry, uniform across every primitive type in that package |
PR #1902 |
| PORTING | What shape per harness? | each primitive written to the harness's native format (.claude/settings.json, .codex/hooks.json, .agents/skills/, ...) |
shipped |
| (intra-harness) | Where inside a harness do instructions land? | apm compile (root/nested AGENTS.md/CLAUDE.md, .claude/rules toggle) |
shipped |
Design rulings (and why)
- No new lifecycle verb.
apm installis idempotent regeneration;apm auditdetects drift. We do not addapm sync,apm mcp export, or a--checkflag (declines [FEATURE] Standaloneapm mcp export --runtime <target>command #1868 / closes PR feat(mcp): add 'apm mcp export --runtime <target>' (closes #1868) #1905). - No per-primitive-TYPE routing for inert primitives (declines [FEATURE] Primitives exclusion for targets #1898). Splitting one package's skills to one harness and its instructions to another is a fork of that package. The supported path is per-package routing: route an instruction-only package to one harness and a skill-only package to another. The bloat [FEATURE] Primitives exclusion for targets #1898 describes is a harness-standards gap (Claude does not read the
.agents/skills/convention that Copilot/Cursor/Codex/Gemini share), not an APM defect. - Hooks are not special. "hooks off" = the CONSENT trust floor (
apm deny <pkg> hooks). "hooks to one harness" = plain per-packagetargets:. No dedicatedhooks:lever. - We port, we do not glue. Porting a primitive into each harness's native format is faithful porting. Inventing a universal cross-harness format, or translating semantics between harnesses that disagree on a should-be-standard, is out of scope. (This is also why [BUG] hook_integrator merges all per-harness hook manifests into every target (codex/cursor hooks leak into .claude/settings.json) #1892 is a porting bug, not a translation layer.)
Folds into this design
- [FEATURE] Primitives exclusion for targets #1898 -- per-package routing covers the legit residual; per-type filter declined.
- [FEATURE] Standalone
apm mcp export --runtime <target>command #1868 / PR feat(mcp): add 'apm mcp export --runtime <target>' (closes #1868) #1905 -- export verb declined. - [FEATURE] Per-package opt-out for hooks (e.g. --no-hooks / hooks: false in apm.yml) #1894 -- already expressible via the deny-by-default trust floor; at most a
--no-hookssugar that writes thedeny. - Let authors target native context files (root or nested CLAUDE.md/AGENTS.md), not just .claude/rules #1807 -- intra-harness placement served by
apm compile; any author-intent residual is the PORTING layer here. - [BUG] hook_integrator merges all per-harness hook manifests into every target (codex/cursor hooks leak into .claude/settings.json) #1892 -- the porting bug PR fix(hooks): per-target hook manifest selection (closes #1892) #1902 fixes.
Implementation
The build surface is substantially PR #1902. Re-reviewed via the apm-review-panel against this model, then driven to green. #1882 (require explicit targets) is tracked separately as opt-in governance.
Metadata
Metadata
Assignees
Labels
area/multi-targetMulti-target deploy spec, target directory creation, agent surface routing.status/needs-designDesign discussion required before implementation; not scope approval by itself.type/featureNew capability, new flag, new primitive.
Type
Projects
- StatusShow more project fieldsDone
Activity