bug(package): scripts/github-coordination.js is missing from the npm tarball - the 7 published /epic-* commands cannot run
Summary
scripts/github-coordination.js is missing from the published npm package, but seven commands that are published call it. Anyone who installs from npm — including npm i -g ecc-universal, the documented path — gets seven /epic-* commands that cannot run.
It works from a git clone, which is what masks this in local development.
Root cause
package.json files[] enumerates each top-level scripts/*.js by hand. scripts/github-coordination.js is not in that list, so npm excludes it from the tarball. scripts/lib/ ships wholesale ("scripts/lib/"), which is why scripts/lib/github-coordination.js survives and only the CLI entry disappears.
Verified against main (currently 2.2.2) — still not listed, so this will ship again:
"scripts/catalog.js",
"scripts/consult.js",
...
"scripts/work-items.js",
"scripts/uninstall.js"There is no bin entry either — the map has ecc, ecc-install, ecc-memory-mcp, ecc-plan-canvas, ecc-control-pane, but no ecc-github-coordination.
Other than this file, there is no dispatcher for these actions anywhere in the package: a package-wide grep for applyClaim|applySync|applyUnblock|applyValidate|applyPublish|applyDecompose|applyReview matches only scripts/lib/github-coordination/actions.js (definitions) and scripts/lib/github-coordination.js (re-export). scripts/work-items.js has its own claim, but it is an unrelated local-SQLite subsystem.
Reproduction
npm i -g [email protected]
node "$(npm root -g)/ecc-universal/scripts/github-coordination.js" --help
# Error: Cannot find module '.../ecc-universal/scripts/github-coordination.js'Confirm the omission from the tarball:
npm pack [email protected]
tar -tzf ecc-universal-2.2.1.tgz | grep -c '^package/scripts/[^/]*\.js$'
# 41 — running the same count over a checkout lists 42; the difference is this fileImpact
All seven of these ship in commands/ (which is in files[]) and each instructs the agent to run:
node scripts/github-coordination.js <command> <issue> --repo <owner/repo>epic-claim.mdepic-decompose.mdepic-publish.mdepic-review.mdepic-sync.mdepic-unblock.mdepic-validate.md
So the whole epic coordination workflow is broken for npm installs while appearing to work in the repo. (Related in spirit but a different bug: #3084.)
Fix
Add one line to files[]:
"scripts/github-coordination.js",If the CLI is intentionally not meant to ship, the alternative is to remove or repair the seven command files above, since they reference a file that no release contains.
Adjacent bugs found while restoring the file
Restoring it locally to unblock the workflow exercised the CLI enough to find four real bugs in it. Happy to split these into separate issues, or send a PR, whichever is easier:
--limitis parsed as an issue number. It usesnormalizeIssueNumber, so--limit 0— the natural "no limit" — throwsInvalid issue number: 0, and any non-numeric value reports a misleading issue-number error.applySync/applyUnblockalso dolimit: options.limit || 100, so0cannot mean "no limit" downstream either.- A flag placed before the command silently misroutes.
node scripts/github-coordination.js --issue 5 claim --repo o/rleavescommandnull (onlyargv[0]is read as the command), so it falls through to thesyncdefault and runs a full-repo sync instead of a claim on #5. --dry-runstill writes state. It opens and migrates the local store at~/.claude/ecc/state.db, although--helppromises "Preview changes without modifying GitHub or state". PassingdbPath: ':memory:'works —resolveStateStorePathalready special-cases it.- The store is never closed on the error path. In
main(),catchcallsprocess.exit(1), sofinally { if (store) store.close(); }does not run when an action throws.process.exitCode = 1keeps the exit code and lets the cleanup run.
Environment
[email protected](latest published;mainis2.2.2)- Node v26.7.0, Windows 11,
gh2.98.0
Source: affaan-m/ECC