docs: document the uv-pinned apm setup and full-identity allow keys

README: uv replaces the global apm as a prerequisite, setup starts with
`uv sync --frozen`, and the offline note names both one-time steps.
gates.md: the apm hooks run through scripts/lib/apm.sh with plain
--frozen (and why the gates, unlike the SessionStart hook, keep the
sync), and check-executables-allow-sync expects the full package
identity apm 0.39 matches on.

Refs: #271

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 08:47:53 +00:00
1 parent e87bd67c1f
commit a48f0fdf5b
2 files changed
+42 -12

No files matched your search

+11 -6
View File
@@ -36,7 +36,7 @@ Install all of these before setting up. Each one is a hard dependency of a git h
| Tool | Why | Install |
| --- | --- | --- |
| `apm` CLI | Two pre-push hooks shell out to it (`apm-audit-ci` and `apm-pack-check-clean`) | The `apm-install` skill, or `curl -sSL https://aka.ms/apm-unix \| sh`. Verify with `apm --version` |
| `uv` | Runs this repo's pinned apm. The root `pyproject.toml` pins `apm-cli==0.39.3` and `uv.lock` locks it (ADR-0034); the `apm-audit-ci` and `apm-pack-check-clean` pre-push hooks run it as `uv run --frozen apm` through `scripts/lib/apm.sh`, and fail below apm 0.39.2 | https://docs.astral.sh/uv/getting-started/installation/. A global `apm` is not needed and not used: a bare `apm` here may be an older one that refuses the v4 `apm.lock.yaml` |
| `python3` + PyYAML | Required by `scripts/skill-size-check.sh` (the `skill-size-check` pre-commit hook) and `scripts/check-skill-version-bump.sh` (the `check-skill-version-bump` pre-push hook), which both parse YAML frontmatter | `python3` is usually present — pre-commit is itself a Python application. `pip install pyyaml` if the hook reports PyYAML missing |
| `vale` | Required by the `vale-audit-prefilter-skill` / `-agent` pre-commit hooks, and by the `test-vale-wrap.sh` suite that `run-tests --strict` runs at pre-push | `brew install vale` (macOS), `snap install vale` (Linux), `choco install vale` (Windows), or https://vale.sh/docs/vale-cli/installation/ |
| `claude` CLI | Required by the `validate-marketplace` pre-push hook | Claude Code |
@@ -51,14 +51,19 @@ Two notes worth reading before you skip one:
Run these in order, from the repo root.
```bash
# 1. Deploy this repo's own skills and agents
apm install
# 1. Install the pinned apm into .venv/ (gitignored)
uv sync --frozen
# 2. Install the git hooks — all three stages
# 2. Deploy this repo's own skills and agents
uv run --frozen apm install
# 3. Install the git hooks — all three stages
pre-commit install -t pre-commit -t commit-msg -t pre-push
```
**`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. It needs the network and materializes `apm_modules/` (which stays gitignored).
**`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).
**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.
@@ -92,7 +97,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 `apm install` has populated `apm_modules/`**. 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 `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 `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.
## Editing plugin content