Improve skills and document updates

This commit is contained in:
pleb
2026-10-21 17:47:56 -07:00
committed by pleb
parent ed71a6d081
commit 4d6f9b8be0
13 changed files with 148 additions and 52 deletions
@@ -22,19 +22,9 @@ Before acting, read the shared policy references:
test -f pyproject.toml && test -d src/plugin_helper && test -d registry && test -d locks
```
2. Read the local helper behavior before changing files.
Inspect at least:
```bash
sed -n '1,220p' README.md
sed -n '1,260p' src/plugin_helper/cli.py
sed -n '1,260p' src/plugin_helper/planner.py
sed -n '1,220p' src/plugin_helper/models.py
sed -n '1,220p' registry/plugins.toml
sed -n '1,220p' locks/<instance>.lock.toml
sed -n '1,220p' docs/SMOKETEST.md
```
2. Read the locked plugin entry and its registry file before changing them.
Open `src/plugin_helper` only when the command output disagrees with the
lock. `docs/SMOKETEST.md` is for the smoke after apply.
3. Determine the instance.
@@ -103,22 +93,22 @@ release URL only.
curl -sS https://api.github.com/repos/<owner>/<repo>/releases/tags/<tag>
```
Pick the asset that matches the Beat Saber instance/version. Prefer an exact versioned asset such as `1.40.8.zip` over broad or source archives. If multiple plausible assets remain, ask the user.
Pick the asset that matches the Beat Saber instance/version. Prefer an exact versioned asset such as `1.40.8.zip` over broad or source archives. If multiple plausible assets remain, ask the user. When a release ships one zip per game version, record the asset name and the `gameVersion` string embedded in the DLL. A stale manifest is a warning on the chosen asset. It is not a reason to select a lower-named zip.
5. Inspect the asset before selecting an install strategy.
Download to the helper state directory:
Download to the helper cache the planner searches:
```bash
mkdir -p .state/instances/<instance>/downloads/<plugin-id>
curl -L --fail -o .state/instances/<instance>/downloads/<plugin-id>/<asset-name> "<browser_download_url>"
sha256sum .state/instances/<instance>/downloads/<plugin-id>/<asset-name>
mkdir -p .state/cache/downloads/<instance>/<plugin-id>
curl -L --fail -o .state/cache/downloads/<instance>/<plugin-id>/<asset-name> "<browser_download_url>"
sha256sum .state/cache/downloads/<instance>/<plugin-id>/<asset-name>
```
Match the checksum against GitHub's `digest` when available. Inspect zip contents:
```bash
unzip -l .state/instances/<instance>/downloads/<plugin-id>/<asset-name>
unzip -l .state/cache/downloads/<instance>/<plugin-id>/<asset-name>
```
Use the install strategy guide in the artifact policy.
@@ -152,15 +142,22 @@ release URL only.
7. Use the helper to validate, plan, and apply.
Always pass `--state-dir .state` so the helper uses the repo-local downloaded asset:
Pass `--state-dir .state` so the helper uses the repo-local download. On a
native Windows BSManager install, also pass
`--config plugin-helper.windows.toml.example --profile windows` when
`plugin-helper.local.toml` is absent. `--state-dir .state` alone selects the
`default` install id, which is a different bootstrap record from the
`windows` profile.
```bash
PYTHONPATH=src .venv/bin/python -m plugin_helper --state-dir .state check --instance <instance>
PYTHONPATH=src .venv/bin/python -m plugin_helper --state-dir .state plan --instance <instance> --plugin <plugin-id>
PYTHONPATH=src .venv/bin/python -m plugin_helper --state-dir .state apply <generated-plan-path>
PYTHONPATH=src .venv/bin/python -m plugin_helper --config plugin-helper.windows.toml.example --profile windows --state-dir .state check --instance <instance>
PYTHONPATH=src .venv/bin/python -m plugin_helper --config plugin-helper.windows.toml.example --profile windows --state-dir .state plan --instance <instance> --plugin <plugin-id>
PYTHONPATH=src .venv/bin/python -m plugin_helper --config plugin-helper.windows.toml.example --profile windows --state-dir .state apply <generated-plan-path>
```
Before applying, read or summarize the generated plan enough to confirm it changes only the intended plugin files.
`plan` keeps the dependency closure in `unchanged` when those live files
already match. `changes` is what `apply` writes. Confirm `Changes:` is the
intended plugin before applying.
8. Verify the result.