Skip to content
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/users/features/code-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ Confirmed findings are canonicalized into `.qwen/tmp/qwen-review-<target>-findin

The command validates on write: a duplicate id, a finding with no failure scenario, an empty locations array, or an unknown severity is an error rather than a silently mangled entry.

Where do the images come from? For terminal-rendering claims, `qwen review capture-tui` drives the code under review in a **private tmux server** (it cannot touch your own tmux sessions), captures the pane bytes as `.ans`, and renders a `.png` via `freeze` when installed — degrading explicitly (`png` → `ans-only` → refused) and recording which rung it reached, because a verifier must say whether its verdict stands on pixels, bytes, or prose.

## Evidence Images in PR Comments

GitHub's API cannot attach images to review comments, so `/review` can host evidence images (TUI screenshots, rendered-output comparisons) in a repository you designate and embed them by URL:
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/review.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('reviewCommand', () => {
'comment-body',
'fetch-pr',
'capture-local',
'capture-tui',
'plan-diff',
'repo-context',
'pr-context',
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/commands/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { composeReviewCommand } from './review/compose-review.js';
import { findingsCommand } from './review/findings.js';
import { fetchPrCommand } from './review/fetch-pr.js';
import { captureLocalCommand } from './review/capture-local.js';
import { captureTuiCommand } from './review/capture-tui.js';
import { planDiffCommand } from './review/plan-diff.js';
import { repoContextCommand } from './review/repo-context.js';
import { prContextCommand } from './review/pr-context.js';
Expand Down Expand Up @@ -59,6 +60,7 @@ export const reviewCommand: CommandModule = {
.command(commentBodyCommand)
.command(fetchPrCommand)
.command(captureLocalCommand)
.command(captureTuiCommand)
.command(planDiffCommand)
.command(repoContextCommand)
.command(prContextCommand)
Expand Down Expand Up @@ -86,7 +88,7 @@ export const reviewCommand: CommandModule = {
.command(cleanupCommand)
.demandCommand(
1,
'Specify a subcommand: run, parse-args, match-remote, meta, issue-context, fetch-diff, comment-body, fetch-pr, capture-local, plan-diff, repo-context, pr-context, comment-status, load-rules, agent-prompt, build-test, base-tree, test-delta, drive, mock-provider, extract-step, script-lint, resolve-anchors, check-coverage, cost-ledger, presubmit, test-efficacy, test-plan, findings, publish-assets, compose-review, save-artifact, submit, or cleanup.',
'Specify a subcommand: run, parse-args, match-remote, meta, issue-context, fetch-diff, comment-body, fetch-pr, capture-local, capture-tui, plan-diff, repo-context, pr-context, comment-status, load-rules, agent-prompt, build-test, base-tree, test-delta, drive, mock-provider, extract-step, script-lint, resolve-anchors, check-coverage, cost-ledger, presubmit, test-efficacy, test-plan, findings, publish-assets, compose-review, save-artifact, submit, or cleanup.',
)
.version(false),
handler: () => {
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/commands/review/agent-prompt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2883,6 +2883,13 @@ describe('verify and reverse-audit briefs — the Step 4/5 methodology, in code'
expect(p).toContain('go read the claimed source first');
});

it('wires capture-tui into the verify brief — the producer its rendering claims cite', () => {
// The brief teaches terminal-rendering claims to run `review capture-tui`;
// if the block drops out of the prompt the command exists with no consumer.
const p = buildRoleBrief(PLAN, 'verify');
expect(p).toContain('"${QWEN_CODE_CLI:-qwen}" review capture-tui');
});

it('the verify brief is a verdict role: Exclusion Criteria yes, finding format no', () => {
const p = buildRoleBrief(PLAN, 'verify');
expect(p).toContain('What is NOT a finding'); // the Exclusion Criteria heading
Expand Down
Loading
Loading