Skip to content

feat(cli): morphic council debate — two-engine debate with a judge verdict#42

Merged
engkimo merged 2 commits into
mainfrom
feature/council-cli
Jun 4, 2026
Merged

feat(cli): morphic council debate — two-engine debate with a judge verdict#42
engkimo merged 2 commits into
mainfrom
feature/council-cli

Conversation

@engkimo

@engkimo engkimo commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

Surfaces the TD-194 council pilot as a first-class, config-driven CLI command (not a demo script). Two candidate engines argue capability / cost / risk / approach over a goal; a resolver model judges with an explicit rationale.

```
morphic council debate "Should we write unit tests before or after for a fast-moving prototype?"
--engines ollama,claude_code
```

What changed

  • New `interface/cli/commands/council.py` (`morphic council debate`), registered in `main.py`.
  • Output isolated in `formatters.print_council_debate` (arguments panels + judge verdict + event trail); abandoned debates surface the reason.
  • Candidates via `--engines`; the resolver (judge) model comes from `MORPHIC_COUNCIL_RESOLVER_MODEL` (config-driven, no hardcoding).
  • `council_debate_timeout_seconds` (`MORPHIC_COUNCIL_TIMEOUT_SECONDS`, default 15s → 30s) added and wired: a cold Ollama runs two sequential argument generations + the resolver call, and the original 15s pilot budget aborted the first (cold-start) debate.

Testing

  • 4 new CLI tests (verdict render, abandoned-reason, engine-count / unknown-engine validation). 3364 unit tests pass, ruff clean.
  • Verified live across all four engines as candidates (ollama / claude_code / codex_cli / gemini_cli); all pairings complete with a 4-event flow. The judge picks by task fit (e.g. codex_cli wins a "build a CLI tool" coding task).

Notes

  • Candidate arguments are generated locally (Ollama persona); only the resolver calls the cloud model — so listing a cloud engine as a candidate does not require its API at debate time.
  • Run with `MORPHIC_COUNCIL_RESOLVER_MODEL=anthropic/claude-haiku-4-5` while the Gemini key is being renewed (the default resolver is `gemini/gemini-2.5-flash`).

🤖 Generated with Claude Code

engkimo and others added 2 commits June 3, 2026 16:11
Surfaces the TD-194 council pilot as a first-class, config-driven CLI command
(not a demo script). Two candidate engines argue capability/cost/risk/approach
over a goal; a resolver model (MORPHIC_COUNCIL_RESOLVER_MODEL) judges with an
explicit rationale. Candidates via --engines; abandoned debates surface the
reason. Output isolated in formatters.print_council_debate.

  morphic council debate "Python or Go for an MVP backend?" --engines ollama,claude_code

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A cold Ollama runs two sequential argument generations + the resolver call;
the original 15s pilot budget aborted the first (cold-start) debate. Add
council_debate_timeout_seconds (MORPHIC_COUNCIL_TIMEOUT_SECONDS, default 30)
and wire it into RunCouncilDebateUseCase. Updated the two _FakeSettings test
stubs to mirror the new field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@engkimo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 43 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ab05353-4916-49cc-8ffd-d1a73912f9e1

📥 Commits

Reviewing files that changed from the base of the PR and between 0cb680f and fc308c7.

📒 Files selected for processing (8)
  • interface/api/container.py
  • interface/cli/commands/council.py
  • interface/cli/formatters.py
  • interface/cli/main.py
  • shared/config.py
  • tests/unit/infrastructure/test_mcp_server.py
  • tests/unit/interface/test_council_cli.py
  • tests/unit/interface/test_fractal_container_wiring.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/council-cli

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@engkimo engkimo merged commit 44292d8 into main Jun 4, 2026
5 of 6 checks passed
@engkimo engkimo deleted the feature/council-cli branch June 4, 2026 06:32
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