The harness assumes a pnpm repo — a bash-only consumer needs a stub package.json just to carry @ai-hero/sandcastle #17

Open
opened 2026-08-22 11:35:13 +00:00 by ben · 1 comment
Owner

Part of the agent-driven install-session arc (Ben, 2026-08-21/22; docs/superpowers/specs/2026-08-21-vendor-command-design.md §Context records the decomposition: 2 vendor ✅ → 1 policy layer + prompt rendering → 3 host enrolment → 4 the install session). Worked by the factory's own swarm (STATUS.md 2026-08-22 — SELF-HOSTED).

Symptom

Self-onboarding this repo (2026-08-22) needed a root package.json + pnpm-lock.yaml whose only content is @ai-hero/sandcastle and tsx, because run-swarm.sh runs pnpm install --frozen-lockfile + pnpm exec sandcastle docker build-image, FATALs on an empty pnpm-store, and main.mts runs pnpm install --frozen-lockfile inside every worker. matou-app hit the same (root npm→pnpm conversion in idss #572's acceptance run). Related: onboard.sh dockerfile is single-stack (#8).

Proposal (design ticket — rule before coding)

  • Decide whether the sandcastle runtime dependency belongs to the factory (vendored .sandcastle/package.json, installed from there; the consumer's own package manager untouched) rather than the consumer's root. That removes the stub and the pnpm-store FATAL for repos with no JS.
  • If yes: run-swarm.sh/main.mts resolve sandcastle from .sandcastle/; the pnpm-store mount and the in-sandbox install become conditional on the consumer declaring a JS stack (policy key, e.g. STACKS="node go" — pairs with #8).

Acceptance

  • A consumer with no root package.json runs swarm.yml green; idss and matou-app unchanged.
_Part of the agent-driven install-session arc (Ben, 2026-08-21/22; `docs/superpowers/specs/2026-08-21-vendor-command-design.md` §Context records the decomposition: 2 vendor ✅ → 1 policy layer + prompt rendering → 3 host enrolment → 4 the install session). Worked by the factory's own swarm (STATUS.md 2026-08-22 — SELF-HOSTED)._ ## Symptom Self-onboarding this repo (2026-08-22) needed a root `package.json` + `pnpm-lock.yaml` whose only content is `@ai-hero/sandcastle` and `tsx`, because `run-swarm.sh` runs `pnpm install --frozen-lockfile` + `pnpm exec sandcastle docker build-image`, FATALs on an empty `pnpm-store`, and `main.mts` runs `pnpm install --frozen-lockfile` inside every worker. matou-app hit the same (root npm→pnpm conversion in idss #572's acceptance run). Related: `onboard.sh dockerfile` is single-stack (#8). ## Proposal (design ticket — rule before coding) - Decide whether the sandcastle runtime dependency belongs to the **factory** (vendored `.sandcastle/package.json`, installed from there; the consumer's own package manager untouched) rather than the consumer's root. That removes the stub and the pnpm-store FATAL for repos with no JS. - If yes: `run-swarm.sh`/`main.mts` resolve sandcastle from `.sandcastle/`; the pnpm-store mount and the in-sandbox install become conditional on the consumer declaring a JS stack (policy key, e.g. `STACKS="node go"` — pairs with #8). ## Acceptance - A consumer with no root `package.json` runs `swarm.yml` green; idss and matou-app unchanged.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

  • Ruling: keep deferred (no state role applied). The reporter deliberately parked this at filing and the friction is still a single, documented, tolerated stub file that bites no current consumer.
  • Why this is a two-way door: park/build is reversible by a label change. The actual build would mint a new STACKS closed-vocabulary policy key, which per GOTCHAS 17 wants the bump-the-pin-before-declaring rollout and the "rule before coding" decision the ticket explicitly asks for — but nothing forces that now.
  • What proves the park is still safe: the friction is confirmed still present (the stub package.json/pnpm-lock.yaml, the provision_pnpm_store_guard FATAL, the in-worker pnpm install --frozen-lockfile) and no live consumer is blocked — dev-factory carries the documented stub; the JS consumer has a real one.

Triage update: the deferral still holds. Noting for whoever un-defers — the pairing partner #8 (multi-stack Dockerfile) has since closed, so the "declare a stack" half now has somewhere to hang; the remaining design call is whether the sandcastle runtime dependency moves to a vendored .sandcastle/package.json and the pnpm-store mount + in-sandbox install become conditional on a STACKS policy key (mind GOTCHAS 17 — bump the pin before declaring any new key).

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** - **Ruling:** keep `deferred` (no state role applied). The reporter deliberately parked this at filing and the friction is still a single, documented, tolerated stub file that bites no current consumer. - **Why this is a two-way door:** park/build is reversible by a label change. The actual build would mint a new `STACKS` closed-vocabulary policy key, which per GOTCHAS 17 wants the bump-the-pin-before-declaring rollout and the "rule before coding" decision the ticket explicitly asks for — but nothing forces that now. - **What proves the park is still safe:** the friction is confirmed still present (the stub `package.json`/`pnpm-lock.yaml`, the `provision_pnpm_store_guard` FATAL, the in-worker `pnpm install --frozen-lockfile`) and no live consumer is blocked — dev-factory carries the documented stub; the JS consumer has a real one. _Triage update: the deferral still holds. Noting for whoever un-defers — the pairing partner #8 (multi-stack Dockerfile) has since closed, so the "declare a stack" half now has somewhere to hang; the remaining design call is whether the sandcastle runtime dependency moves to a vendored `.sandcastle/package.json` and the pnpm-store mount + in-sandbox install become conditional on a `STACKS` policy key (mind GOTCHAS 17 — bump the pin before declaring any new key)._
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#17
No description provided.