fix(adapters, harness): with skill directories the pi adapter keeps --no-skills, so only the given skills load, and the fit check proves that shape (#1873) #2014

Merged
jason.woltje merged 3 commits from pi-skills into refactor 2026-11-20 10:53:12 +00:00
Owner

What changes

Lane pi-skills: a pi launch given skill directories loads only those directories.

  • The defect. With MOSAIC_SKILLS set, the pi adapter dropped --no-skills and passed only --skill <dir>. On pi 0.85.1 --skill adds to discovery. A probe with planted skills in a scratch HOME showed four more loading: the user's, a settings one, a package one and ~/.agents/skills.
  • The fix. adapters/pi/adapter.sh always passes --no-skills, then each --skill <dir>. A missing directory still exits 2.
  • The fit check proves it. Its last -p run now uses the adapter's --skill arguments with two skill directories (new export workerShape). A pi that loads a planted skill there, or drops a given directory, is refused harness-feature-missing. The run replaces one the check already made, so the check is no slower: cold median 2282 ms against 2352 ms on the base.
  • Who it reached. Only the interactive launch from scripts/agent.sh sets MOSAIC_SKILLS. Task launches refuse skill directories, and role sessions never get the variable. The worker image's home has no skill places today.

No new verb, refusal code, grant, role, schema or config format. harness-feature-missing is the code approved on 2026-11-19.

Tests

  • packages/harness/tests/pi-fit.test.mjs grows: the adapter's argument line holds --no-skills before the --skill entries, a stand-in pi that loads an ambient skill in that shape is refused, real pi 0.85.1 passes, and a missing directory exits 2.
  • Lane gate on 4381e94bc: 71 files, 1010 pass, 0 fail.
  • scripts/test-task.sh was not run. It needs the instance config, which a lane may not read.
  • Lead check in a clean environment on the rebased tip ca7388743: 298 files, 3338 pass, 0 fail, 0 skip.

Review

A fresh claude-opus-5-5 reviewer asked for two changes, both fixed. A second asked for one docs change and two small items, all fixed in the last commit. The Lead read that commit.

Left for later

  • The interactive launch runs pi in the TUI with --tools and --session-dir. No fit run can drive the TUI, so that exact shape is not proven.
  • The fit check runs before bus sessions only. Worker containers run the pi in the image.
## What changes Lane pi-skills: a pi launch given skill directories loads only those directories. - **The defect.** With `MOSAIC_SKILLS` set, the pi adapter dropped `--no-skills` and passed only `--skill <dir>`. On pi 0.85.1 `--skill` adds to discovery. A probe with planted skills in a scratch HOME showed four more loading: the user's, a settings one, a package one and `~/.agents/skills`. - **The fix.** `adapters/pi/adapter.sh` always passes `--no-skills`, then each `--skill <dir>`. A missing directory still exits 2. - **The fit check proves it.** Its last `-p` run now uses the adapter's `--skill` arguments with two skill directories (new export `workerShape`). A pi that loads a planted skill there, or drops a given directory, is refused `harness-feature-missing`. The run replaces one the check already made, so the check is no slower: cold median 2282 ms against 2352 ms on the base. - **Who it reached.** Only the interactive launch from `scripts/agent.sh` sets `MOSAIC_SKILLS`. Task launches refuse skill directories, and role sessions never get the variable. The worker image's home has no skill places today. No new verb, refusal code, grant, role, schema or config format. `harness-feature-missing` is the code approved on 2026-11-19. ## Tests - `packages/harness/tests/pi-fit.test.mjs` grows: the adapter's argument line holds `--no-skills` before the `--skill` entries, a stand-in pi that loads an ambient skill in that shape is refused, real pi 0.85.1 passes, and a missing directory exits 2. - Lane gate on 4381e94bc: 71 files, 1010 pass, 0 fail. - `scripts/test-task.sh` was not run. It needs the instance config, which a lane may not read. - Lead check in a clean environment on the rebased tip ca7388743: 298 files, 3338 pass, 0 fail, 0 skip. ## Review A fresh claude-opus-5-5 reviewer asked for two changes, both fixed. A second asked for one docs change and two small items, all fixed in the last commit. The Lead read that commit. ## Left for later - The interactive launch runs pi in the TUI with `--tools` and `--session-dir`. No fit run can drive the TUI, so that exact shape is not proven. - The fit check runs before bus sessions only. Worker containers run the pi in the image.
jason.woltje added 3 commits 2026-11-20 10:53:09 +00:00
jason.woltje merged commit ca7388743b into refactor 2026-11-20 10:53:12 +00:00
Sign in to join this conversation.