Skip to content

feat(mcp): emit council preset and consensus data from parse_mode (#1300)#1307

Merged
JeremyDev87 merged 2 commits into
masterfrom
taskmaestro/1775293281/pane-2
Apr 4, 2026
Merged

feat(mcp): emit council preset and consensus data from parse_mode (#1300)#1307
JeremyDev87 merged 2 commits into
masterfrom
taskmaestro/1775293281/pane-2

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Extend ParseModeResult with optional councilPreset and councilSummary fields for backward-compatible API addition
  • Inject CouncilPresetService into ModeHandler to emit deterministic council participants in PLAN/EVAL mode responses
  • ACT/AUTO modes correctly omit council data (null → undefined)

Changed Files

  • apps/mcp-server/src/keyword/keyword.types.ts — add councilPreset and councilSummary fields to ParseModeResult
  • apps/mcp-server/src/mcp/handlers/mode.handler.ts — inject CouncilPresetService, resolve preset, include in response
  • apps/mcp-server/src/mcp/handlers/mode.handler.spec.ts — 6 new council integration tests
  • apps/mcp-server/src/mcp/handlers/abstract-handler.integration.spec.ts — update constructor call
  • apps/mcp-server/src/mcp/mcp.service.spec.ts — update constructor call

Test plan

  • PLAN mode response includes councilPreset with mode: "PLAN", primary: "technical-planner", and 4 specialists
  • EVAL mode response includes councilPreset with mode: "EVAL", primary: "code-reviewer", and 3 specialists
  • ACT mode response does NOT include councilPreset
  • AUTO mode response does NOT include councilPreset
  • councilSummary is undefined when no specialist results exist
  • councilPreset is JSON-serializable (round-trip test)
  • TypeScript compiles with --noEmit
  • All 5893 tests pass

Closes #1300

)

Integrate CouncilPresetService into ModeHandler so PLAN/EVAL mode
responses include deterministic council participant data. Add
councilPreset and councilSummary optional fields to ParseModeResult
for backward-compatible API extension.

- Extend ParseModeResult with councilPreset (CouncilPreset) and
  councilSummary (CouncilSummary) optional fields
- Inject CouncilPresetService into ModeHandler and resolve preset
  for PLAN/EVAL modes (null → undefined for ACT/AUTO)
- Add 6 handler-level tests covering PLAN, EVAL, ACT, AUTO modes
  and serialization round-trip
- Update all ModeHandler constructor call sites in test files

Closes #1300
@JeremyDev87 JeremyDev87 added feat mcp-server apps/mcp-server labels Apr 4, 2026
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 4, 2026 9:29am

…-preset.service

Extract CouncilPreset interface and CouncilMode type to a dedicated
council-preset.types.ts file that has no imports from keyword module.
Both keyword.types.ts and council-preset.service.ts now import from
the shared types file, eliminating the cycle.

- keyword.types.ts → council-preset.types.ts (no cycle)
- council-preset.service.ts → council-preset.types.ts (no cycle)
- council-preset.service.ts re-exports CouncilPreset for API compat

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: ✅ APPROVE

CI Status: ALL PASS (26/26 including circular-check)

Code Quality:

  • Circular dep fix: Extracted CouncilPreset/CouncilMode to council-preset.types.ts — clean break
  • ParseModeResult extended: councilPreset? and councilSummary? with @apiProperty JSDoc
  • ModeHandler: CouncilPresetService injected, emits preset for PLAN/EVAL only
  • Tests: 5 new tests — PLAN/EVAL have preset, ACT/AUTO don't, no summary without specialist results, JSON round-trip
  • Backward compatible: All new fields optional

Checklist:

  • CI ALL PASS (circular-check now passes)
  • No unused imports
  • No any types
  • Proper DI injection pattern
  • All 3 spec files updated (mode.handler, abstract-handler, mcp.service)

✅ Council preset integration complete — deterministic council participants emitted in parse_mode.

@JeremyDev87 JeremyDev87 merged commit 2aac5b5 into master Apr 4, 2026
26 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1775293281/pane-2 branch April 4, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat mcp-server apps/mcp-server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): emit council preset and consensus data from the main parse_mode response path

1 participant