Repository navigation
Gate review flows behind explicit opt-in (skip in regular review sessions) - #238
Conversation
…ions)
The flows guidance triggered on any review verb, so a plain "review my PR"
in a normal Codex/Claude session loaded the kcap-review-flows skill and
pushed the agent toward start_review_flow — spinning up a SEPARATE hosted
reviewer the user never asked for.
Gate the flow behind explicit opt-in, consistently across the three places
an agent sees flows guidance:
- kcap/skills/review-flows/SKILL.md: narrow the description to explicit-flow
intent only ("start a review flow" / "submit for review" / "re-review"),
add a "When NOT to use" guard (ordinary review → review directly), and
retitle "When to use" → "Choosing the flow kind" so the spec/code split
can't be misread as "any review → use the flow".
- McpFlowsServer.cs: prepend the same gate to the start_review_flow tool
description (cross-agent lever; Codex reads tool descriptions from
tools/list since config.toml carries no server description).
- kcap/.mcp.json: same gate on the Claude Code kcap-flows server description.
- Bump plugin.json 1.7.1 -> 1.7.2 so marketplace installs refresh the skill.
Follow-up to #235 (hosted-reviewer misfire guard), covering the opposite
case: tools present in a regular session but the user wants a direct review.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Summary by QodoGate hosted review flows behind explicit user opt-in
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
…us failure handling Rebased onto current main (which #235/#238 rewrote for opt-in gating and the hosted-reviewer misfire guard, and #233/#234 made hosting vendor-uniform). Dropped my earlier "Roles" section (now covered by main's intro + "when NOT to use" gating) and the Codex-specific wording (reviewer vendor now comes from the flow definition, not hardcoded Codex). Remaining unique, vendor-neutral addition: a Prerequisites section stating start_review_flow needs `kcap login` + a daemon with this repo checked out, and split failure handling — no-daemon (start one, retry) vs ambiguous multi-checkout match (can't disambiguate; surface it, AI-1112). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Problem
When the flows MCP tools are registered in a regular interactive Codex/Claude session, a plain review request (
"review my PR","code review","review this spec") triggered thekcap-review-flowsskill and pushed the agent to callstart_review_flow— which launches a separate hosted reviewer through the daemon and drives a multi-round loop the user never asked for. Observed in the wild as Codex announcing "…using kcap-review-flows as the review workflow guide" for an ordinary review.Fix
Gate the flow behind explicit opt-in, consistently across the three places an agent sees flows guidance:
kcap/skills/review-flows/SKILL.md— narrow thedescriptionto explicit-flow intent only ("start a review flow","submit for review","re-review after I address findings") and explicitly exclude ordinary review verbs; add a prominent "When NOT to use" guard (ordinary review → review directly, don't call the tools); retitle## When to use→## Choosing the flow kindso the spec-review/code-review split isn't misread as "any review → use the flow".src/Capacitor.Cli/Commands/McpFlowsServer.cs— prepend the same gate to thestart_review_flowtool description. This is the cross-agent lever: Codex reads tool descriptions fromtools/listbecauseconfig.tomlcarries no server description.kcap/.mcp.json— same gate on the Claude Codekcap-flowsserver description.kcap/.claude-plugin/plugin.json— bump1.7.1→1.7.2so marketplace installs refresh the new skill text (matching how Guard review-flows skill against hosted-reviewer misfire #235 handled it).Net effect: a plain review request → the agent reviews directly and reports findings; the hosted-reviewer flow runs only when the user explicitly asks for a review flow / to submit for review.
Relationship to #235
Follow-up to #235, which guarded the opposite case (flows tools absent → you're likely the hosted reviewer, review directly). This PR covers tools present in a regular session where the user just wants a direct review.
Notes
dotnet buildclean (0 warnings); no tests assert on the touched descriptions.🤖 Generated with Claude Code