t3code icon indicating copy to clipboard operation
t3code copied to clipboard

fix(playbook,ship-queue): wire live LLM challenge runner in playbook CLI and ship-queue, add --help/--ship flags, and fix post-merge ref

Open mellowmarshall opened this issue 4 days ago • 1 comments

Problem

When marscode PR #59 ran its post-merge hook (install-marscode-tools.sh), /home/logan/.local/bin/playbook switched from the legacy Python CLI to the new TypeScript bundle (packages/playbook). That broke playbook workflows on this host:

  1. No live LLM runner in playbook challenge CLI: packages/playbook/src/cli.ts passes model: null unless --response FILE is supplied, so playbook challenge can never execute a real LLM review. Live execution only existed inside apps/server's PlaybookChallengeService.
  2. Missing CLI flags: playbook challenge --help (and other subcommands' --help) exits 2 (Unknown option '--help'), causing legacy ship-queue's house_declaration_challenge probe to fail and fall back to a nonexistent path (PLAYBOOK REVIEW: NOT RUN / playbook is not installed on this host). playbook check --ship also exits 2 (Unknown option '--ship').
  3. TypeScript ship-queue missing declaration challenge: packages/ship-queue/src/worker.ts does not invoke declaration-challenge, post PLAYBOOK REVIEW comments on PRs, or print the review block in watcher.ts.
  4. Stale commit in scripts/ship/ship-steps.sh post_merge: post_merge checks out SHIP_QUEUE_BASE_SHA, which under legacy ship-queue is the pre-merge base SHA rather than the newly merged main commit.

(intent-audit and map are intentionally retired from playbook per PLAYBOOK.md §5 and §12; those responsibilities moved to individual repos.)

Checklist

  • [ ] Implement standalone read-only LLM runner (packages/playbook/src/challengeRunner.ts) supporting host-config.json (playbook_challenge default + fallbacks, challenge_timeout_s, auto:astra Codex resolution, codex/claudeAgent/antigravity/grok read-only CLI execution with bounded total/idle timeouts and process-group cleanup).
  • [ ] Wire createCliChallengeModel into packages/playbook/src/cli.ts (cmdChallenge), add -h/--help support on all subcommands, and accept --ship on cmdCheck.
  • [ ] Wire advisory declaration-challenge execution, idempotent PR review comment posting, and watcher.ts REVIEW output into packages/ship-queue.
  • [ ] Fix scripts/ship/ship-steps.sh post_merge to fetch and build the newly merged base branch tip rather than a stale pre-merge SHIP_QUEUE_BASE_SHA.
  • [ ] Add unit tests and run real end-to-end playbook challenge verification before shipping.

mellowmarshall avatar Nov 27 '26 19:11 mellowmarshall

Filed in the wrong repository by mistake; moved to mellowmarshall/marscode#66. Closing.

mellowmarshall avatar Nov 27 '26 19:11 mellowmarshall