Skip to content

T-VAW3-built-plugin-runs-outside-the-repo

State: closed/done · Impact: high · Complexity: medium

The agent-pants build (M-AX01) ships a self-contained plugin tree, but its launcher and several skill scripts still only work when they sit inside this repo. An installed copy (the Claude Code plugin cache, a harness install claude --mode copy) cannot run the CLI or those scripts.

  • cli/sdlc is copied verbatim into <packs>/sdlc/cli/sdlc. Its local layer computes self="$(cd -P "$here/../../..")", which is right only at solutions/ontological/cli/; from a built pack it names a dir with no solutions/ontological/cli/sdlc.ts, and there is no cli/sdlc.js beside it. Outside the repo the launcher works only through SDLC_HOME or a linked checkout. This was already true of every installed copy before the vault inversion.
  • Every per-skill scripts/sdlc shim resolves to that launcher, so the shim has no working path in an installed copy either.
  • start_task.ts, dedup_search.ts, ensure_ready_mutate.ts, scan_corpus_assumptions.ts and summarize_dedup_telemetry.ts import ../../../../../lib/...; from packs/sdlc/skills/<x>/ that climbs out of the plugin and lands on solutions/ontological/ only by accident of the in-repo layout. Run from a copy they fail with Cannot find module '@sksizer/cli-tool'.
  • The shim’s target (cli/sdlc) is a literal inside agent-pants’ export.rs.

A built pack copied anywhere runs ${CLAUDE_PLUGIN_ROOT}/cli/sdlc <verb> and every skill script the prose invokes, with no checkout present.

  1. Ship the bundled cli/sdlc.js entry as a plugin asset and render a pack-specific launcher (devlink render-launcher at the pack’s depth).
  2. Move the five skill scripts behind CLI ops (or bundle them) so no skill script imports lib/ by relative path.
  3. Make the agent-pants shim target configurable instead of the cli/sdlc literal.
AreaNote
solutions/ontological/cli/launcher and bundled entry
solutions/ontological/scripts/render-launcher.tspack-depth launcher
solutions/ontological/plugin/plugins/sdlc/skills/scripts importing lib/
solutions/agent-pants/crates/agent-adapt-core/src/export.rsshim target
  • AC-1: <copy of packs/sdlc>/cli/sdlc --version succeeds with no sdlc checkout, SDLC_HOME or link present.
  • AC-2: every bun run ${CLAUDE_PLUGIN_ROOT}/skills/... invocation in skill prose runs from a copied pack.
  • AC-3: the shim’s target is declared in the project file, not hardcoded.
  • The npm wrapper’s plugin/ staged-dist layout (T-XTGT).
  • none

Adversarial review of the Phase 3 gate (findings B2, round-2 MINOR 2, M8), parked from the vault-inversion PR as pre-existing.


← Back to Tasks