Skip to content

feat(mcp/plugin): add opening council-scene contract to parse_mode#1407

Merged
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775472491/pane-2
Apr 6, 2026
Merged

feat(mcp/plugin): add opening council-scene contract to parse_mode#1407
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775472491/pane-2

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Add councilScene field to parse_mode MCP response for PLAN/EVAL/AUTO modes, enabling the assistant to open its first response with a Tiny Actor council scene
  • ACT mode and unrelated prompts omit the field entirely (backward-compatible)
  • Add equivalent build_council_scene() method to standalone mode_engine.py for MCP-independent usage

Changes

MCP Server (apps/mcp-server/)

  • council-scene.types.ts: CouncilScene and CouncilSceneCastMember interfaces
  • council-scene.builder.ts: Pure function resolving cast from councilPreset (PLAN/EVAL), visual data, or fallback agent IDs (AUTO)
  • mode.handler.ts: Integrate buildCouncilScene() into response pipeline
  • council-scene.builder.spec.ts: 8 unit tests
  • mode.handler.spec.ts: 7 integration tests (PLAN/EVAL/AUTO enabled, ACT excluded, cast shape, serialization)

Standalone Plugin (packages/claude-code-plugin/)

  • mode_engine.py: COUNCIL_PRESETS, MODERATOR_COPY dicts + build_council_scene() method
  • test_mode_engine.py: 12 new tests

Test plan

  • yarn workspace codingbuddy test — 6150 passed, 0 failed
  • python3 -m pytest test_mode_engine.py — 48 passed
  • yarn workspace codingbuddy build — clean
  • yarn lint --fix — no errors in changed files
  • yarn prettier --write . — formatted

Closes #1366

…1366)

Add councilScene field to parse_mode response for PLAN/EVAL/AUTO modes,
enabling the assistant to open its first response with a Tiny Actor
council scene. ACT mode omits the field entirely.

MCP server:
- council-scene.types.ts: CouncilScene and CouncilSceneCastMember types
- council-scene.builder.ts: pure function building scene from preset/visual/fallback
- mode.handler.ts: integrate councilScene into response
- 8 new builder unit tests, 7 new handler integration tests

Standalone plugin:
- mode_engine.py: COUNCIL_PRESETS, MODERATOR_COPY, build_council_scene()
- 12 new Python tests covering all modes and serialization

Closes #1366
@vercel

vercel Bot commented Apr 6, 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 6, 2026 11:14am

@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: PASS

All 29 checks passed (lint, typecheck, build, tests, security, format, circular, e2e, plugin, landing, rules).

Code Quality

  • Clean architecture: Pure function builder (council-scene.builder.ts) with no I/O — types → builder → handler separation
  • No any types: All interfaces explicitly typed (CouncilScene, CouncilSceneCastMember)
  • No unused imports: All imports consumed
  • No dead code
  • Python parity: mode_engine.py mirrors MCP server structure (COUNCIL_PRESETS, MODERATOR_COPY, build_council_scene)

Spec Compliance (Issue #1366)

All acceptance criteria met:

  • ✅ MCP parse_mode response includes councilScene contract for PLAN/EVAL/AUTO
  • ✅ Standalone mode includes equivalent contract via build_council_scene + build_instructions
  • ✅ Scoped to workflow requests — ACT mode returns undefined/None
  • ✅ Deterministic output — fixed moderatorCopy strings, locked format tiny-actor-grid

Test Coverage (27 new tests)

  • Builder unit: 9 tests — mode routing, data resolution strategies (preset/visual/fallback), face cross-reference, single primary, JSON serializable
  • Handler integration: 7 tests — PLAN/EVAL/AUTO enabled, ACT excluded, cast structure validation
  • Python standalone: 11 tests — mode routing, cast structure, preset match, case insensitivity, instructions integration, JSON serializable

Issues Found

  • [low]: migrate-legacy-hooks.js has an unrelated prettier formatting change ((line) =>line =>). No functional impact.

Recommendation: APPROVE

@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 complete - review agent approved

Review Summary

  • Issues found: 1 (medium/low only)
  • Critical: 0, High: 0
  • Recommendation: APPROVE

LGTM - ready to merge.

@JeremyDev87 JeremyDev87 self-assigned this Apr 6, 2026
@JeremyDev87 JeremyDev87 merged commit 225ead6 into master Apr 6, 2026
29 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1775472491/pane-2 branch April 6, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp/plugin): add an opening council-scene contract to parse_mode and standalone workflow prompts

1 participant