Repository navigation
fix(mission): pin the cora review guidance in the mission prompt - #537
Merged
Merged
Conversation
`tole mission` builds its registry like `run`, including the auto-attached `mcp_cora_*` tools, but its pinned system prompt never named the review flow, so the unattended command did not know it existed. When both review tools are registered, a fresh mission prompt now carries the same review section as run/chat/tui plus one sentence asking for a review (and its verdict in the final message) before the mission ends. serve/acp/mcp sessions are unchanged on purpose: they attach no external MCP servers, so they have no review tools. Documented in the README.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
The `cora mcp` auto-preset (and --no-auto-mcp) only exist with the `mcp` feature, so the e2e test failed in the `no-mcp profile` CI job. Gate the test and its fake-cora helper on `all(unix, feature = "mcp")`.
Contributor
Author
|
CI:
Generated by Claude Code |
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.
What
A fresh
tole missionsession now carries the cora agent-as-reviewer guidance in its pinned system prompt when the review tools are attached, likerun,chatand the TUI already do.Why
tole missionbuilds its registry through the samebuild_registrypath asrun, so withcoraon PATH it gets the auto-attachedmcp_cora_*tools. Butreview_section()was only called fromrun,chatand the TUI, so a mission had the tools and never learned the review flow existed: the unattended command was the one that did not know it. Closes #536.The issue also asked to check
serve,acpandmcp. They are different by design: those faces serve their own registry,--mcp-serveris refused there (check_client_session_flags) andopen_sessionbuilds its roster with nomcp_servers. So they have no review tools, and a review section there would instruct the model to call tools that do not exist. I left them unchanged and documented it.Changes
mission.rs:fresh_mission_prompt()= default prompt + mission addendum +mission_review_section(). The section isreview_section(®istry)(empty unless bothmcp_cora_cora_review_prepareandmcp_cora_cora_review_finalizeare registered) plus one sentence: review the change with this flow before ending the mission, address what it blocks, include the verdict in the final message. It comes after the mission contract, so the completion-marker rules are not displaced.git commitis feat(git): review gate beforegit commit(cora agent-as-reviewer, on by default when attached) #534. Resumed missions keep their already pinned prompt (append-only).[Unreleased]entry.Testing
cargo test --workspacepassescargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warningspassescorais not installed where this was written); the CI Cora Review job is the verdict.mission_e2e.rs): the real binary, a stand-incoraon PATH that speaks MCP over stdio and lists the two review tools; the pinned session header contains the review section and the mission contract. Control run with--no-auto-mcp: no review section. Mutation checked: makingmission_review_sectionempty fails the e2e test.corabinary (the stand-in speaks onlyinitializeandtools/list).Related Issues
Closes #536. Related: #534 (review gate before commit), #535 (
tole setup cora).Checklist
feat/)developGenerated by Claude Code