Skip to content

ensemble-full-implement-trd-beads Preflight Step 3.4 (TRD CLI resolution) is broken in OMP: hard-codes Claude Code env var and source-tree-relative path; CLI not bundled in OMP plugin #88

Description

@ldangelo

Summary

Preflight Step 3.4 of ensemble-full-implement-trd-beads (SKILL.md v2.20.1) hard-codes two paths for resolving trd-cli.js, both of which are unsatisfiable in the OMP runtime. The CLI is also not bundled in the OMP plugin. The skill's halt on Step 3.4 is therefore the default behavior for any OMP consumer.

Affected

  • Skill: ensemble-full-implement-trd-beads
  • SKILL.md version: 2.20.1 (frontmatter comment <!-- Command: ensemble:implement-trd-beads | Version: 2.20.1 -->)
  • OMP plugin package: @fortium/ensemble-pi v1.5.0 (note: package version != SKILL.md version)
  • Installed skill path: ~/.omp/plugins/node_modules/@fortium/ensemble-pi/skills/ensemble-full-implement-trd-beads/SKILL.md

Bug shape: packaging AND resolution

The defect spans two layers.

1. Resolution gap (the hard-coded paths)

Preflight Step 3.4 of the installed SKILL.md:

Resolve TRD_CLI: set TRD_CLI to the first path that exists among: "${CLAUDE_PLUGIN_ROOT}/lib/trd-cli.js", "packages/development/lib/trd-cli.js". If neither exists OR 'which node' fails: print 'ERROR: Node.js and the TRD CLI (lib/trd-cli.js) are required for deterministic TRD parsing. Ensure Node.js is installed and the ensemble-development plugin is present.' and exit 1.

Both candidates are Claude Code oriented:

  • ${CLAUDE_PLUGIN_ROOT}/lib/trd-cli.jsCLAUDE_PLUGIN_ROOT is a Claude Code env var. OMP does not set it.
  • packages/development/lib/trd-cli.js (relative to CWD) — assumes the consumer checkout is the ensemble source repo. A consumer project (e.g. Foreman) has no packages/development/ directory.

Neither path is reachable in the OMP runtime. The skill's remediation message is also wrong for OMP: "the ensemble-development plugin is present" does not match OMP's plugin distribution model.

2. Packaging gap (the missing CLI)

The CLI exists in the source repo at packages/development/lib/trd-cli.js (~21 KB, syntactically valid Node), but the OMP plugin (@fortium/ensemble-pi) does not ship it. The plugin ships only skills/, agents/, commands/, dist/, node_modules/ — no lib/ directory at all.

So even if Step 3.4 were extended to check OMP-specific paths, no path would currently resolve, because the file is not present in the install.

Reproduction

# OMP runtime only (no Claude Code env vars):
which br && br list --status=open >/dev/null  # OK
which bv                                     # OK
which node                                   # OK
ls "${CLAUDE_PLUGIN_ROOT}/lib/trd-cli.js"    # missing (CLAUDE_PLUGIN_ROOT unset)
ls packages/development/lib/trd-cli.js       # missing (foreman repo has no packages/development/)
find ~/.omp/plugins/node_modules -name 'trd-cli.js'  # none

# Run: /ensemble:implement-trd-beads docs/TRD/<any>.md --plan
# -> Skill halts at Step 3.4 with the env-var error message.

The CLI is reachable in the source repo at packages/development/lib/trd-cli.js, but the skill never checks there.

Expected vs Actual

  • Expected: Preflight resolves the CLI in OMP by checking the installed skill's package root (e.g. the OMP plugin's own directory, or a sibling lib/trd-cli.js shipped with the plugin). Both --plan and --execute succeed.
  • Actual: Step 3.4 halts with the wrong-runtime error message. Any OMP consumer is blocked from running the scaffold plan, even though the CLI is locally available in the source repo.

Recommended fix

Two coordinated changes (a fix is a separate effort from this report):

  1. Bundle the CLI in the OMP plugin. Build/publish packages/development/lib/trd-cli.js into the @fortium/ensemble-pi install (e.g. at lib/trd-cli.js under the plugin root, or via a sibling @fortium/ensemble-cli package).
  2. Rewrite Step 3.4 resolution to be runtime-aware, ordered roughly:
    • ${CLAUDE_PLUGIN_ROOT}/lib/trd-cli.js (current, Claude Code)
    • <installed-skill-dir>/../lib/trd-cli.js (new, OMP — the skill's own package root + lib/trd-cli.js)
    • <installed-skill-dir>/../../<sibling-cli-package>/lib/trd-cli.js (new, OMP — sibling package)
    • packages/development/lib/trd-cli.js (current, source repo fallback)
    • Detection based on the runtime (CLAUDE_PLUGIN_ROOT set vs ~/.omp/plugins/node_modules/... present) rather than blindly checking both layouts.

The OMP fallback paths should be derived from the skill's own install location (e.g. $(dirname "$(dirname "$SKILL_PATH")")), not from a hard-coded series of guesses.

Workaround used in this report

To unblock an immediate --plan run, the CLI was resolved directly to the source repo path: node /Users/ldangelo/Development/Fortium/ensemble/packages/development/lib/trd-cli.js parse <trd>. This was a per-session override, not a fix. Any consumer without the source repo on disk is fully blocked.

Environment

  • macOS (darwin 25.5.0), arm64
  • OMP runtime (not Claude Code)
  • node present, br present, bv present
  • CLAUDE_PLUGIN_ROOT unset (OMP does not set it)
  • Skill discovered at: ~/.omp/plugins/node_modules/@fortium/ensemble-pi/skills/ensemble-full-implement-trd-beads/SKILL.md (v2.20.1)
  • Plugin package: @fortium/ensemble-pi v1.5.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions