docs: run apm only through the uv-pinned invocation

README, the AGENTS.md session rules, architecture.md and the .gitignore
comments now give the pinned `uv run --frozen apm` form for every apm
command in this repo and the two one-time online setup steps. A new
session rule says a bare `apm` reaches the global 0.28.0, which this repo
does not use. README and AGENTS.md add the setup note for a checkout
deployed by apm 0.28: move .claude/skills, agents and commands aside
before the first 0.39 install, or apm refuses with "no trustworthy local
deployment baseline".

Refs #272

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-12-02 11:49:22 +00:00
1 parent 7e63f22bf8
commit 01fe1fb767
4 files changed
+18 -13

No files matched your search

+10 -6
View File
@@ -63,18 +63,22 @@ pre-commit install -t pre-commit -t commit-msg -t pre-push
**`uv sync --frozen`** installs the apm that `uv.lock` pins into `.venv/`. Every apm command in this repo runs as `uv run --frozen apm ...`.
**`apm install`** deploys the plugins root `apm.yml` lists into `.claude/skills/` and `.claude/agents/`. Both are gitignored install output, *not* authoring source — `plugins/<name>/.apm/` remains the only place to edit. Both steps need the network once, and `apm install` materializes `apm_modules/` (which stays gitignored).
**`uv run --frozen apm install`** deploys the plugins root `apm.yml` lists into `.claude/skills/` and `.claude/agents/`. Both are gitignored install output, *not* authoring source — `plugins/<name>/.apm/` remains the only place to edit. Steps 1 and 2 each need the network once per checkout; the first apm 0.39 install also records commit-reachability verdicts. The install materializes `apm_modules/` (which stays gitignored).
**Run apm only through `uv run --frozen apm`.** A bare `apm` reaches whatever is on `PATH`; on a machine with the global pipx apm 0.28.0, that one is not used in this repo and refuses the v4 `apm.lock.yaml`.
**An existing checkout deployed by apm 0.28 needs one more step before step 2.** Move `.claude/skills`, `.claude/agents` and `.claude/commands` aside (or delete them if they hold no edits), then run `uv run --frozen apm install`. Without that, apm 0.39 refuses to replace the 0.28-deployed files with "no trustworthy local deployment baseline", because 0.28 recorded no deployment evidence for them. apm's own message suggests a bare `apm install`; use the `uv run --frozen` form instead.
**Git hooks** must be wired for **all three stages**. This repo's `.pre-commit-config.yaml` has no `default_install_hook_types`, so a plain `pre-commit install` silently skips `commit-msg` (Conventional Commits) and `pre-push` (the full gate) — the `-t` flags above are not optional. The `pc-run` skill handles this and the troubleshooting around it, if you would rather not remember the flags.
## Keeping the install current
The first-party dependencies in root `apm.yml` are unpinned against the default branch, so deployed skills go stale whenever anyone merges. kyberforge's `SessionStart` hook keeps the install current automatically on launch, rewriting `apm.lock.yaml` in the process — an unexplained modification to it after opening a session is expected, not a bug. On `main`, commit or discard it deliberately. On a feature branch, discard it (`git checkout -- apm.lock.yaml`, then `apm install`). The committed lock records a `main` commit too, just an older one. Discarding keeps lock churn unrelated to the branch out of its diff, and keeps the deployed tree consistent with the committed lock that `apm pack --check-clean` reads. The trade-off: the session then runs the older `main` the lock records, which is accepted on a feature branch. The discard also lasts only until the next session start, when the hook finds the lock behind `main` and refreshes again. Mechanism and rationale: `docs/adr/0019-session-start-hook-keeps-the-apm-install-current.md`.
The first-party dependencies in root `apm.yml` are unpinned against the default branch, so deployed skills go stale whenever anyone merges. kyberforge's `SessionStart` hook keeps the install current automatically on launch, rewriting `apm.lock.yaml` in the process — an unexplained modification to it after opening a session is expected, not a bug. On `main`, commit or discard it deliberately. On a feature branch, discard it (`git checkout -- apm.lock.yaml`, then `uv run --frozen apm install`). The committed lock records a `main` commit too, just an older one. Discarding keeps lock churn unrelated to the branch out of its diff, and keeps the deployed tree consistent with the committed lock that `apm pack --check-clean` reads. The trade-off: the session then runs the older `main` the lock records, which is accepted on a feature branch. The discard also lasts only until the next session start, when the hook finds the lock behind `main` and refreshes again. Mechanism and rationale: `docs/adr/0019-session-start-hook-keeps-the-apm-install-current.md`.
Note the difference between the two commands:
- `apm install` deploys from `apm.lock.yaml`. It does **not** pick up remote changes.
- `apm update` re-resolves refs. This is the command that pulls in a merged `.apm/` edit.
- `uv run --frozen apm install` deploys from `apm.lock.yaml`. It does **not** pick up remote changes.
- `uv run --frozen apm update` re-resolves refs. This is the command that pulls in a merged `.apm/` edit.
## Running tests
@@ -97,7 +101,7 @@ pre-commit run --hook-stage pre-push --all-files
See [`docs/spec/gates.md`](docs/spec/gates.md) for what each hook enforces and why.
**Offline?** No pre-push hook needs the network **once `uv sync --frozen` and `apm install` have each run once** (ADR-0034). Root `apm.yml`'s marketplace has no remote package entries (the last one, `mattpocock-skills`, was removed), so `apm-pack-check-clean` resolves everything from local sources, and `apm-audit-ci`'s install-replay is cache-only against a populated install. On a **fresh clone** there is no cache: `apm-audit-ci`'s `deployed-files-present` fails outright, and its `drift` and `config-consistency` checks clone from the holocron remote. The offline guarantee is a property of a populated `apm_modules/`, not of the hook set — run `uv sync --frozen` and `uv run --frozen apm install` once on a new checkout and it holds from then on.
**Offline?** No pre-push hook needs the network **once `uv sync --frozen` and `uv run --frozen apm install` have each run once, online** (ADR-0034). Root `apm.yml`'s marketplace has no remote package entries (the last one, `mattpocock-skills`, was removed), so `apm-pack-check-clean` resolves everything from local sources, and `apm-audit-ci`'s install-replay is cache-only against a populated install. On a **fresh clone** there is no cache: `apm-audit-ci`'s `deployed-files-present` fails outright, and its `drift` and `config-consistency` checks clone from the holocron remote. The offline guarantee is a property of a populated `apm_modules/`, not of the hook set — run `uv sync --frozen` and `uv run --frozen apm install` once on a new checkout and it holds from then on.
## Editing plugin content
@@ -132,7 +136,7 @@ dependencies:
ref: git-v1.3.9
```
Then run `apm install`. Without `ref:`, the entry tracks the default branch. To list a plugin's
Then run `apm install` in your own repo. Without `ref:`, the entry tracks the default branch. To list a plugin's
releases, run `git ls-remote --tags https://git.rkdr.net/Mortis/Holocron.git '<plugin>-v*'`;
`apm outdated` also reports newer `<plugin>-v<x.y.z>` tags.