Context
packages/loopover-mcp/bin/loopover-mcp.js is the @loopover/mcp CLI. Every single-purpose,
--login-driven reporting subcommand follows the same convention: check for --help/help as the
first arg (or options.help === true) and print a dedicated usage block before doing any real work.
This is implemented for:
reviewPrCli (line ~1926): if (options.help === true) return printReviewPrHelp();
lintPrTextCli (line ~2006): if (!args.length || args[0] === "--help" || args[0] === "help") return printLintPrTextHelp();
validateConfigCli (line ~2049): same pattern, printValidateConfigHelp()
slopRiskCli, issueSlopCli: same pattern, printSlopRiskHelp() / printIssueSlopHelp()
Two commands in the same family never got this treatment: decisionPackCli (line 2163) and
repoDecisionCli (line 2176). Neither checks options.help/args[0] at all, and neither has a
print*Help function. Both commands are fully wired into runCli's dispatch table (line 1850-1851)
and into CLI_COMMAND_SPEC (used for shell completion), so they are discoverable, just not
--help-able.
Concretely, today:
$ loopover-mcp decision-pack --help
Error: Pass --login <github-login> or set LOOPOVER_LOGIN.
--help is silently swallowed by parseOptions (becomes options.help = true, which
decisionPackCli never reads), so the command falls straight into its normal --login requirement
check and throws a login error instead of showing usage — the opposite of what a user typing
--help wants, and inconsistent with every sibling command in CLI_COMMAND_SPEC's flat (non-nested)
command list.
Requirements
- Add
printDecisionPackHelp() and printRepoDecisionHelp() functions (or one shared helper,
following the existing print*Help naming/format convention already used by printReviewPrHelp
etc. — usage line(s), one-paragraph description, "Pass --json for machine-readable output.").
decisionPackCli and repoDecisionCli must short-circuit on --help/help as the first arg (or
options.help === true, matching whichever of the two established patterns fits the existing
runCli call site for each command) and print their new help text before requiring --login /
--repo.
- Do not change any non-help behavior of either command.
Deliverables
Test Coverage Requirements
packages/loopover-mcp/bin/loopover-mcp.js is outside this repo's Codecov coverage.include
(vitest.config.ts's coverage.include is limited to src/**/*.ts,
packages/loopover-engine/src/**/*.ts, packages/loopover-miner/lib/**/*.js, and one
review-enrichment file — packages/loopover-mcp/** is not listed, and codecov.yml doesn't
override that), so Codecov's 99% patch gate does not numerically measure this change. Behavioral
regression coverage is still required and enforced by npm run test:mcp-pack/test:ci running the
full test/unit/mcp-cli-*.test.ts subprocess suite — add the new --help assertions there so a
future regression is still caught, even though Codecov won't flag it.
Expected Outcome
loopover-mcp decision-pack --help and loopover-mcp repo-decision --help print usage text and
exit 0, matching the behavior of every other single-purpose subcommand in this CLI family
(review-pr, lint-pr-text, validate-config, slop-risk, issue-slop).
Links & Resources
packages/loopover-mcp/bin/loopover-mcp.js — decisionPackCli (~L2163), repoDecisionCli
(~L2176), runCli dispatch (~L1850-1851), sibling pattern at reviewPrCli (~L1925-1926) and
lintPrTextCli/printLintPrTextHelp (~L1993-2006).
test/unit/support/mcp-cli-harness.ts for the existing run()/runAsync() test harness pattern.
Context
packages/loopover-mcp/bin/loopover-mcp.jsis the@loopover/mcpCLI. Every single-purpose,--login-driven reporting subcommand follows the same convention: check for--help/helpas thefirst arg (or
options.help === true) and print a dedicated usage block before doing any real work.This is implemented for:
reviewPrCli(line ~1926):if (options.help === true) return printReviewPrHelp();lintPrTextCli(line ~2006):if (!args.length || args[0] === "--help" || args[0] === "help") return printLintPrTextHelp();validateConfigCli(line ~2049): same pattern,printValidateConfigHelp()slopRiskCli,issueSlopCli: same pattern,printSlopRiskHelp()/printIssueSlopHelp()Two commands in the same family never got this treatment:
decisionPackCli(line 2163) andrepoDecisionCli(line 2176). Neither checksoptions.help/args[0]at all, and neither has aprint*Helpfunction. Both commands are fully wired intorunCli's dispatch table (line 1850-1851)and into
CLI_COMMAND_SPEC(used for shell completion), so they are discoverable, just not--help-able.Concretely, today:
--helpis silently swallowed byparseOptions(becomesoptions.help = true, whichdecisionPackClinever reads), so the command falls straight into its normal--loginrequirementcheck and throws a login error instead of showing usage — the opposite of what a user typing
--helpwants, and inconsistent with every sibling command inCLI_COMMAND_SPEC's flat (non-nested)command list.
Requirements
printDecisionPackHelp()andprintRepoDecisionHelp()functions (or one shared helper,following the existing
print*Helpnaming/format convention already used byprintReviewPrHelpetc. — usage line(s), one-paragraph description, "Pass --json for machine-readable output.").
decisionPackCliandrepoDecisionClimust short-circuit on--help/helpas the first arg (oroptions.help === true, matching whichever of the two established patterns fits the existingrunClicall site for each command) and print their new help text before requiring--login/--repo.Deliverables
printDecisionPackHelp()inpackages/loopover-mcp/bin/loopover-mcp.js, wired intodecisionPackCli.printRepoDecisionHelp()(or equivalent) wired intorepoDecisionCli.test/unit/mcp-cli-basics.test.ts(or a newtest/unit/mcp-cli-decision-pack.test.ts) assertingloopover-mcp decision-pack --helpandloopover-mcp repo-decision --helpprint usage and exit 0, without requiring--login/--repoor making any network call.
Test Coverage Requirements
packages/loopover-mcp/bin/loopover-mcp.jsis outside this repo's Codecovcoverage.include(
vitest.config.ts'scoverage.includeis limited tosrc/**/*.ts,packages/loopover-engine/src/**/*.ts,packages/loopover-miner/lib/**/*.js, and onereview-enrichmentfile —packages/loopover-mcp/**is not listed, andcodecov.ymldoesn'toverride that), so Codecov's 99% patch gate does not numerically measure this change. Behavioral
regression coverage is still required and enforced by
npm run test:mcp-pack/test:cirunning thefull
test/unit/mcp-cli-*.test.tssubprocess suite — add the new--helpassertions there so afuture regression is still caught, even though Codecov won't flag it.
Expected Outcome
loopover-mcp decision-pack --helpandloopover-mcp repo-decision --helpprint usage text andexit 0, matching the behavior of every other single-purpose subcommand in this CLI family
(
review-pr,lint-pr-text,validate-config,slop-risk,issue-slop).Links & Resources
packages/loopover-mcp/bin/loopover-mcp.js—decisionPackCli(~L2163),repoDecisionCli(~L2176),
runClidispatch (~L1850-1851), sibling pattern atreviewPrCli(~L1925-1926) andlintPrTextCli/printLintPrTextHelp(~L1993-2006).test/unit/support/mcp-cli-harness.tsfor the existingrun()/runAsync()test harness pattern.