Skip to content

feat(dispatcher): expose statusline/agy/review CLIs; document monitors exclusion (#172) - #198

Merged
dngioidev merged 1 commit into
mainfrom
feat/172-dispatcher-entrypoints
Jul 22, 2026
Merged

feat(dispatcher): expose statusline/agy/review CLIs; document monitors exclusion (#172)#198
dngioidev merged 1 commit into
mainfrom
feat/172-dispatcher-entrypoints

Conversation

@dngioidev

Copy link
Copy Markdown
Owner

Closes #172

Problem

Four main-guarded CLI entrypoints were reachable only by direct node path, not through the forge <area> <cmd> dispatcher — an inconsistency in the dispatcher contract from #150.

AC1 decision — inclusive where sensible, documented exclusion otherwise

Verified all five cited scripts are genuinely main-guarded CLI entrypoints, then split them by whether they are interactive CLIs:

Wired (inclusive):

  • plugin/scripts/statusline.mjs -> forge statusline (top-level, sibling of init/doctor, same $S/$area.mjs mapping)
  • plugin/scripts/agy/ask.mjs -> forge agy ask (new agy two-level area)
  • plugin/scripts/review/agy-opinion.mjs -> forge review agy-opinion (new review two-level area)

These three are invoked by direct node path in skill docs (investigate/review/spike SKILL.md), i.e. exactly the inconsistency the ticket describes.

Documented exclusion:

  • plugin/scripts/monitors/ci-watch.mjs, plugin/scripts/monitors/decisions-watch.mjs -> deliberately NOT dispatched. They are background watchers registered in plugin/monitors/monitors.json with when: on-skill-invoke:autopilot, launched by the monitor runner as long-running polling loops for the life of an autopilot session — not interactive forge <area> <cmd> commands. The dispatcher documents this in both the usage() block and an explicit monitors) case that prints a clear message and exits 2 (previously fell through to the generic unknown-area catch-all).

AC checklist

  • AC1 — intended contract decided and encoded: inclusive for statusline/agy/review, documented exclusion for monitors.
  • AC2 — agy/review areas + statusline case added; tests/bin/forge.test.mjs extended to cover agy/review/statusline routing AND to assert the documented monitors exclusion (source text + non-zero exit).

Verification (honest)

  • pnpm verify (vitest, full suite incl. manifests/plugin-validity test): 362 passed, exit 0 locally.
  • Manual dry-run smoke test: forge agy ask, forge review agy-opinion, forge statusline resolve to the right scripts; forge monitors ci-watch prints the exclusion message and exits 2.
  • forge:reviewer (full branch): verdict pass, zero findings.
  • forge:security (full branch): verdict pass, zero critical/high (one low: pre-existing unsanitized $sub path pattern, unchanged trust boundary, now also applies to the two new hardcoded areas).

CI note

GitHub Actions minutes are exhausted this run, so CI jobs fail at startup (0 steps) — infrastructure, not this diff. Owner authorized merge on LOCAL-green for this run.

🤖 Generated with Claude Code

…s exclusion

Four main-guarded CLI entrypoints were only reachable by direct `node` path,
not via the `forge <area> <cmd>` dispatcher (#150 contract gap).

AC1 decision — inclusive where sensible, documented exclusion otherwise:
- statusline.mjs -> `forge statusline` (top-level, sibling of init/doctor)
- agy/ask.mjs -> `forge agy ask` (new area)
- review/agy-opinion.mjs -> `forge review agy-opinion` (new area)
- monitors/{ci-watch,decisions-watch}.mjs -> deliberately EXCLUDED: they are
  background watchers registered in plugin/monitors/monitors.json
  (when: on-skill-invoke:autopilot), launched by the monitor runner as
  long-running polling loops, not interactive dispatcher CLIs. Documented in
  the usage block and an explicit `monitors)` case with a clear message.

AC2 — tests/bin/forge.test.mjs extended to cover agy/review/statusline routing
and to assert the documented monitors exclusion.

Closes #172

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dngioidev
dngioidev merged commit 04c4fec into main Jul 22, 2026
0 of 4 checks passed
@dngioidev
dngioidev deleted the feat/172-dispatcher-entrypoints branch July 22, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bin/forge dispatcher: expose statusline/agy/review/monitors CLI entrypoints

1 participant