feat(mcp/plugin): add opening council-scene contract to parse_mode#1407
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 6, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
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
anytypes: All interfaces explicitly typed (CouncilScene,CouncilSceneCastMember) - No unused imports: All imports consumed
- No dead code
- Python parity:
mode_engine.pymirrors MCP server structure (COUNCIL_PRESETS,MODERATOR_COPY,build_council_scene)
Spec Compliance (Issue #1366)
All acceptance criteria met:
- ✅ MCP
parse_moderesponse includescouncilScenecontract 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
moderatorCopystrings, locked formattiny-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.jshas an unrelated prettier formatting change ((line) =>→line =>). No functional impact.
Recommendation: APPROVE
JeremyDev87
commented
Apr 6, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
✅ Review complete - review agent approved
Review Summary
- Issues found: 1 (medium/low only)
- Critical: 0, High: 0
- Recommendation: APPROVE
LGTM - ready to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
councilScenefield toparse_modeMCP response for PLAN/EVAL/AUTO modes, enabling the assistant to open its first response with a Tiny Actor council scenebuild_council_scene()method to standalonemode_engine.pyfor MCP-independent usageChanges
MCP Server (
apps/mcp-server/)CouncilSceneandCouncilSceneCastMemberinterfacesbuildCouncilScene()into response pipelineStandalone Plugin (
packages/claude-code-plugin/)COUNCIL_PRESETS,MODERATOR_COPYdicts +build_council_scene()methodTest plan
yarn workspace codingbuddy test— 6150 passed, 0 failedpython3 -m pytest test_mode_engine.py— 48 passedyarn workspace codingbuddy build— cleanyarn lint --fix— no errors in changed filesyarn prettier --write .— formattedCloses #1366