docs: apply the #272 review notes on the apm 0.39 docs
- Name kyberforge's SessionStart hook as a lock writer that can write the bad lock in a 0.28-populated checkout, with the recovery steps (README, AGENTS.md, gates.md). - AGENTS.md: put the pinned-invocation rule above the lock-churn rule, make the bare-apm remark conditional on what PATH holds, and replace the two 0.28 migration notes with one pointer to gates.md "apm-audit-ci". - Use one wording for the offline guarantee: a synced .venv/ and a populated apm_modules/. - Say the #204 leak was not re-tested on 0.39.3, and narrow the claim to git_subprocess_env (gates.md, LESSONS.md, git-env test header). - State the apm-audit-ci timing as 70-90 s, drop a duplicate README sentence, give the 0.39.3 shorthand error, reflow gates.md to about 100 columns, and move the ADR-0033 note into amendment blockquote form. Refs #272 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
1 parent
66443e7458
commit
db34dfa728
7 files changed
+71
-64
No files matched your search
@@ -61,15 +61,15 @@ uv run --frozen apm install
|
||||
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 ...`.
|
||||
**`uv sync --frozen`** installs the apm that `uv.lock` pins into `.venv/`.
|
||||
|
||||
**`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`.
|
||||
**Run apm only through `uv run --frozen apm`.** A bare `apm` reaches whatever is on `PATH`, possibly an older apm that refuses the v4 `apm.lock.yaml`. The global pipx apm 0.28.0 some machines carry is not used in this repo.
|
||||
|
||||
**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.
|
||||
|
||||
**Writing the lock from a checkout whose `apm_modules/` apm 0.28 populated needs a clean cache first.** Before any 0.39 command that writes `apm.lock.yaml` (`uv run --frozen apm update`, or an install that changes the lock), move `apm_modules/` aside and run `uv run --frozen apm install`. Otherwise apm reuses the 0.28-era third-party copies and writes a lock without their `carried_licenses` entries, which a fresh install then contradicts. Consuming the committed lock is unaffected and needs only the two setup steps above.
|
||||
**Writing the lock from a checkout whose `apm_modules/` apm 0.28 populated needs a clean cache first.** Before any 0.39 command that writes `apm.lock.yaml` (`uv run --frozen apm update`, or an install that changes the lock), move `apm_modules/` aside and run `uv run --frozen apm install`. Otherwise apm reuses the 0.28-era third-party copies and writes a lock without their `carried_licenses` entries, which a fresh install then contradicts. kyberforge's `SessionStart` hook is such a writer: it runs `uv run --frozen apm update --yes` at session start, so it can write the bad lock before you read this. To recover, discard it with `git checkout -- apm.lock.yaml`, move `apm_modules/` aside, then run `uv run --frozen apm install`. Consuming the committed lock is unaffected and needs only the two setup steps above.
|
||||
|
||||
**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.
|
||||
|
||||
@@ -103,7 +103,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 `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.
|
||||
**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 synced `.venv/` and 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
|
||||
|
||||
@@ -146,7 +146,8 @@ releases, run `git ls-remote --tags https://git.rkdr.net/Mortis/Holocron.git '<p
|
||||
|
||||
The shorthand `git.rkdr.net/Mortis/Holocron/plugins/<name>#<plugin>-v<x.y.z>` does not work on this
|
||||
host. apm reads `plugins/<name>` as part of the repository path, so a real install tries to clone
|
||||
`.../Holocron/plugins/<name>.git` and fails with "Not found". `apm install --dry-run` does not catch
|
||||
`.../Holocron/plugins/<name>.git` and fails because no such repository exists (on apm 0.39.3:
|
||||
"Repository Mortis/Holocron/plugins/<name> not found on git.rkdr.net"). `apm install --dry-run` does not catch
|
||||
this. Use the object form.
|
||||
|
||||
### Automated updates
|
||||
|
||||
Reference in new issue
Block a user