Skip to content

Split normal vs adversarial review prompts; honest setup provider check (#32)#40

Merged
TheRealDinghyDog merged 1 commit into
opencode-conversionfrom
fix/issue-32-review-and-setup
Jul 10, 2026
Merged

Split normal vs adversarial review prompts; honest setup provider check (#32)#40
TheRealDinghyDog merged 1 commit into
opencode-conversionfrom
fix/issue-32-review-and-setup

Conversation

@TheRealDinghyDog

Copy link
Copy Markdown
Owner

Fixes #32 (review findings M-04 + M-05).

M-04 — review command semantics

Both review commands rendered the adversarial "break confidence in the change" template; only the result label differed, and /opencode:review silently accepted focus text its own docs said it doesn't take.

  • New neutral template prompts/review.md (balanced, high-signal, evidence-bar rules, same placeholders and structured-output contract as the adversarial one); /opencode:adversarial-review unchanged.
  • Template selection is explicit per-command config (promptTemplate), not display-label string matching.
  • /opencode:review rejects positional focus text with an error directing to /opencode:adversarial-review.

M-05 — setup false positive

getAuthStatus() said loggedIn: true whenever /config or /provider was merely readable — a server with {"all": [], "connected": []} was reported ready and the first real task failed later.

  • loggedIn now requires a non-empty connected set from /provider (tolerates id strings and {id} objects per the 1.17.15 shape).
  • Readable-but-disconnected reports loggedIn: false with the provider-configuration next step in /opencode:setup; a failing /provider endpoint is loggedIn: false instead of a false positive.
  • Fixture /provider now returns the realistic {all, default, connected} shape, with env switches for the disconnected and failing cases.

Provenance & tests

Drafted by OpenCode through the plugin's own --write rescue path (parallel-delegation live test), then reviewed and polished — the draft was good; changes were limited to config-driven template selection and dropping an invented connections field alias.

Tests assert the actual generated prompt content per command, the focus-text rejection message, and setup behavior across connected / disconnected / failing provider endpoints. npm test: 100 passed, 0 failed, 0 skipped.

🤖 Generated with Claude Code

…ck (#32)

/opencode:review and /opencode:adversarial-review both rendered the
adversarial "break confidence" template — only the result label differed
— and the normal review silently accepted focus text its docs said it
rejects. getAuthStatus reported loggedIn whenever /config or /provider
was merely readable, so setup marked the plugin ready with zero
connected providers and the first real task failed later.

review now renders a neutral high-signal template (prompts/review.md)
selected via explicit per-command config (promptTemplate), rejects
positional focus text with an error pointing at adversarial-review, and
adversarial-review is unchanged. loggedIn requires a non-empty
`connected` set from /provider (id strings or {id} objects); a readable
endpoint with nothing connected reports the provider-setup next step,
and a failing /provider endpoint is loggedIn: false instead of a crash
or a false positive.

Drafted by OpenCode via the plugin's own rescue path (issue #32 task),
then reviewed and polished: template selection moved from display-label
string matching to explicit config, and an invented `connections` field
alias dropped from the provider parsing.

Tests assert the actual generated prompt per command, the focus-text
rejection, and connected/disconnected/failing provider setups against
the fixture's real /provider shape.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TheRealDinghyDog
TheRealDinghyDog merged commit d008cd3 into opencode-conversion Jul 10, 2026
1 check passed
@TheRealDinghyDog
TheRealDinghyDog deleted the fix/issue-32-review-and-setup branch July 11, 2026 00:55
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