Skip to content

feat(dispatch): slash-command skill invocation + .middle/prompt.md dispatch brief#76

Merged
thejustinwalsh merged 1 commit into
mainfrom
feat/dispatch-slash-command-and-brief
May 23, 2026
Merged

feat(dispatch): slash-command skill invocation + .middle/prompt.md dispatch brief#76
thejustinwalsh merged 1 commit into
mainfrom
feat/dispatch-slash-command-and-brief

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Make skill invocation deterministic and turn .middle/prompt.md into a dispatch brief the skill consumes.

What changed

  • buildPromptText('initial') now sends /implementing-github-issues implement #N — a slash command that force-invokes the skill, instead of relying on the agent reading "use the skill" prose. One clean one-line submission (works within the Phase 1 single-Stop limit).
  • The skill reads .middle/prompt.md first (new "Dispatch brief" section in SKILL.md). That file is the dispatch handoff — operating framing + per-dispatch operator notes (plan changes, scope adjustments). Operator notes override the skill's defaults.
  • ensurePromptFile now writes the framing brief (work continuously, don't stop to ask, terminal = PR-ready) instead of redundant "use the skill" text — with an ## Operator notes section for kickoff input.
  • resume/answer keep the @-file pointer for the fuller multi-turn workflow (Hooks and watchdog #14).

Why

Forced skill invocation removes the "did the agent decide to load it?" gamble; the brief file keeps the dispatch framing and human-input channel the design calls for, all in one submission.

Verification

bun test 125 pass, tsc clean. buildPromptText('initial') test asserts the slash-command form.

Note

mm dispatch --note <text> (to inject operator kickoff notes into the brief) is the natural next add — not in this PR.

Summary by CodeRabbit

  • New Features

    • Added "Dispatch brief" section to skill instructions with support for .middle/prompt.md file detection and conditional execution paths.
    • Enhanced dispatch workflow to support epic number integration in prompt initialization.
  • Refactor

    • Restructured dispatch brief template with clearer operational rules and terminal state guidance.
    • Updated prompt invocation to use slash-command dispatching instead of file references.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f0ddc1e6-dcb3-4860-b27f-c97edba08104

📥 Commits

Reviewing files that changed from the base of the PR and between 7a20cf3 and 693059f.

📒 Files selected for processing (5)
  • .claude/skills/implementing-github-issues/SKILL.md
  • packages/adapters/claude/src/prompt.ts
  • packages/adapters/claude/test/adapter.test.ts
  • packages/core/src/adapter.ts
  • packages/dispatcher/src/workflows/implementation.ts

📝 Walkthrough

Walkthrough

This PR extends the prompt generation system to support epic-number-aware dispatch. It updates the AgentAdapter interface to accept epicNumber, modifies buildPromptText to emit slash commands for initial prompts, integrates the parameter through the dispatcher workflow, updates the default prompt template to a structured brief format, and provides corresponding test coverage and skill documentation.

Changes

Epic-number prompt dispatch

Layer / File(s) Summary
Core adapter interface update
packages/core/src/adapter.ts
AgentAdapter.buildPromptText now requires epicNumber: number in its options alongside existing promptFile and kind parameters.
Prompt generation implementation
packages/adapters/claude/src/prompt.ts
buildPromptText changes: initial prompts return slash commands using the epic number; resume/answer prompts directly embed the prompt file reference; module documentation updated for the new workflows.
Dispatcher workflow integration
packages/dispatcher/src/workflows/implementation.ts
ensurePromptFile docs updated; default .middle/prompt.md template replaced with structured dispatch brief including operating rules and terminal state guidance; launchAndDrive passes epicNumber from context to buildPromptText.
Test expectations update
packages/adapters/claude/test/adapter.test.ts
buildPromptText tests updated to expect slash commands in initial case and to pass epicNumber in all test invocations.
Skill workflow documentation
.claude/skills/implementing-github-issues/SKILL.md
Added "Dispatch brief (read first)" section instructing runners to check for and follow .middle/prompt.md when present.

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the two main changes: slash-command skill invocation and the .middle/prompt.md dispatch brief mechanism.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant