Upgrade apm to >=0.39.2 and pin it per repo #265
Open
opened 2026-12-01 20:48:17 +00:00 by Claude
·
0 comments
No Branch/Tag Specified
main
docs/plan-pin-apm-per-repo
research/copilot-cli-agents
research/team-structures
research/enforcement-hooks
research/team-patterns
research/existing-infra-skills
feat/66-wire-gitea-mcp-config
plan-v0.5.0
bin-v5.0.0
plan-v0.4.0
plan-v0.3.0
mattpocock-v0.5.0
bin-v4.0.0
plan-v0.2.0
plan-v0.1.0
delivery-v0.8.0
k8s-v0.2.0
gitops-v0.2.0
ansible-v0.1.0
mattpocock-v0.4.0
bin-v3.0.0
kyberforge-v2.2.1
lint-v1.1.9
gitea-v1.3.10
git-v1.3.9
core-v1.1.4
git-v1.3.8
v2.0.1
v2.0.0
v1.0.0
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Status/Needs Triage
Status/Ready for Agent
Status/Ready for Human
Wayfinder/Grilling
Wayfinder/Map
Wayfinder/Prototype
Wayfinder/Research
Wayfinder/Task
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Maintainer needs to evaluate this issue
Fully specified, ready for an AFK agent
Requires human implementation
Wayfinder ticket (HITL): decision made in conversation
Wayfinder map: index of decisions for an effort
Wayfinder ticket (HITL): cheap artifact to react to
Wayfinder ticket (AFK): research a fact a decision waits on
Wayfinder ticket: work that unblocks a decision (or build work when the map's Notes allow)
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mortis/Holocron#265
Reference in new issue
Block a user
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.
Why
The repo runs apm 0.28.0 (
apm.lock.yaml:3, pipx install). In 0.28.0 the Claude prompt-to-command integrator keeps only a fixed set of frontmatter keys:description,allowed-tools,model,argument-hint,input. Every other key is dropped. That includesdisable-model-invocation, whichplan.prompt.mdandship.prompt.mddeclare (#245, closed as accepted risk).apm 0.39.0 (2026-11-25, microsoft/apm PR #4910) keeps Claude-native command keys, including
disable-model-invocation,when_to_useandeffort. The latest release is v0.39.3.What the upgrade involves
These points come from reading the v0.39.3 source and CHANGELOG during #245 planning. None of them has been checked with a live run.
lockfile_version: "4", which 0.36.1 and older refuse. The 0.39.2 lock is refused by 0.37.0–0.39.1. Once an upgraded lock is committed, every machine that runsapm install/auditneeds apm >=0.39.2. That includes the SessionStartapm updatehook (ADR-0019) and the pre-pushapm-audit-cireplay. Plan this as a coordinated cutover.apm --versioncheck in a hook, or the README.hooks.json, and the SessionStart merge into.claude/settings.json.refmust exactly name a branch or tag. Affects ADR-0033 consumer pins.audit --cifails MCP servers that are not approved inapm.yml. Rootmcp: []lowers the risk.--frozenhash enforcement._map_grantsis version-blind (apm.yml:63-70reasoning).scripts/apm-audit-ci.shmatches.apm outdatedphrase matched bycheck-apm-current.sh:43.docs/spec/gates.md.pre-commit-config.yaml:89,117,130scripts/apm-audit-ci.sh:31,36tests/test-apm-current-hook.sh,tests/test-apm-hooks-git-env.sh,tests/run-bats.shprompt-author(SKILL.md, schema, target-mapping),instructions-author,apm-workflow,forgeplugins/kyberforge/docs/research/docs/microsoft-apm/.prompt-primitive-schema.mdsays the key set is not configurable, which goes stale on upgrade.Per-repo apm install (replaces reliance on the machine-wide pipx install)
Why
Today one machine-wide binary (
/root/.local/bin/apm, pipx, 0.28.0) serves every apm project on the dev machine. The projects have already drifted apart:ai-developmentansiblekamino(and worktree checkouts)According to the CHANGELOG, 0.28.0 cannot read kamino's v4 lock. If the global binary moved to >=0.39.2 instead, running
apm installin kamino would rewrite its lock, and that lock would be refused by machines still on 0.38.1. Neither failure mode has been tested live. A single global version cannot serve all three repos.Proposal
Pin apm per repo with
uv, which is already installed at/usr/local/bin/uv. Declareapm-cli==<version>as a dev dependency in apyproject.tomlwith a committeduv.lock, and run it asuv run apm. No ADR covers how apm itself is installed today, so record this as a new ADR.Keep the global pipx apm (0.28.0) installed.
ansiblestill depends on it. Do not upgrade it as part of this issue either; that would rewrite ansible's lock out of band. The last of Defame1297/ansible-homelab-mono#1078 and Mortis/Kamino#499 to land uninstalls it.Cost
Bare
apmmust no longer be relied on in this repo. Every call site must switch to the pinned invocation:plugins/kyberforge/.apm/hooks/check-apm-current.sh;scripts/apm-audit-ci.shand the apm entries in.pre-commit-config.yaml;apm-installandapm-workflowskills, which consumer repos also install, so they must handle both repo-pinned and global apm;docs/spec/gates.mdsetup and run instructions.Out of scope here:
ansibleonto its own pin: Defame1297/ansible-homelab-mono#1078;kaminoonto its own pin: Mortis/Kamino#499;Acceptance criteria
apm.lock.yamlregenerated, and a cutover note says which machines and hooks must upgrade together.apm audit --ciand the pre-push hooks pass on the upgraded lock. The SessionStart hook still merges into.claude/settings.jsonwithout drift.apm install, deployed.claude/commands/plan.mdandship.mdcarrydisable-model-invocation: true.scripts/tag-plugin-releases.sh.uv(pyproject.toml+uv.lock), and an ADR records the decision, including the rule that the last consumer repo to migrate removes the global pipx install.apm-install/apm-workflowskills, and the docs.apmremoved from PATH (not uninstalled),apm install,apm audit --ci, the pre-push hooks and the SessionStart hook all pass in this repo.Follow-up from #245. Consumer switchovers: Defame1297/ansible-homelab-mono#1078, Mortis/Kamino#499.
Upgrade apm from 0.28.0 to >=0.39.2to Upgrade apm to >=0.39.2 and pin it per repo