You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agentic /review: ground findings against the codebase (tier 2) #1287
#1099 lands /review as a deliberate v1: one client.chat() over a diff, empty tool registry, no file reads. That caps review quality. The system prompt asks the model not to hallucinate issues, but gives it no way to check a finding against the surrounding code.
This issue covers the next tier: a review that can ground its findings.
Shape to settle here:
Default /review becomes a find-then-verify loop with a read-only tool profile (git_diff, git_log, read_file, search_file_contents, lsp_get_diagnostics) and a tool-call budget.
The current one-shot stays available as /review quick or equivalent.
Optional /review deep fans out finder subagents plus an independent per-finding verification pass.
Mandatory file:line citation per finding, with a confidence threshold that drops what cannot be verified.
Also worth covering: nanocoder review is currently TTY-only, so CLI output cannot be redirected to a file. Teaching the plain shell to dispatch built-in commands would fix that and is a reasonable thing to fold into this work.
Is plain-shell dispatch in scope for the first PR, or its own PR? It touches source/plain/shell.ts, which is core plumbing rather than review code, so happy to isolate either way.
Confirming: verifiers can run a cheaper model than finders via the per-subagent model override (reviewModel knob)?
Plan:
Phase 0: spike: prove SubagentExecutor + read-only tool whitelist reviews a real diff productively (done, all checks passed)
Benchmark results (catch rate, false positives, citation validity, token cost) will be posted here once the default tier runs.
Since #1099 hasn't landed yet, PR 1 starts on my fork and rebases onto v1 when it merges. Nothing in the one-shot path or parseReviewCliArgs gets touched.
@soumojit-D48, would you like to stay involved in this work once #1099 lands, or is handing it over fine? Either works for me.
I tested the current implementation in the TUI and found a few gaps before opening the replacement PR stack:
/review quick 1467 fails to fetch an upstream PR when origin points to my fork. A PR URL is not currently understood as a PR target.
Quick is intentionally a one-shot, diff-only review. I want to preserve that behavior, while fixing target resolution and clearly showing the reviewed scope and any diff truncation.
Default /review runs a finder/verifier pipeline, but the TUI does not show which agent is running or its tool/API calls. When an investigation hits its budget, the result can still look like a clean review. That should be labeled incomplete, not “no issues found.”
The review result’s raw Markdown styling also differs from normal chat output.
On main, /review reports no branch changes, then prints fatal: Needed a single revision.
On the feature branch, the finder hits its turn budget after a truncated diff, but the report says “No verified issues found” and displays raw Markdown beside normally rendered chat.
Following up on the proposed replacement stack above, here is what I intend each PR to contain. I’d appreciate feedback on the boundaries before opening them.
Q — Quick fixes: Correct fork/upstream PR lookup, support explicit PR URLs, reject ambiguous or extra target text, and show the resolved scope and truncation. Quick remains one-shot: no finder, verifier, or tool calls.
1 — Foundation: Give default/deep a read-only coordinator for natural requests, remote branches, and PR URLs. Validate and pin the target before review. Add compact live progress that can expand into agent, tool-call, and API-call details.
2 — Grounded default: Bring the finder → citation validation → independent verifier flow onto that foundation. Show incomplete or failed investigations honestly and render the result consistently with the TUI.
3 — Deep: Add the specialist finders and deduplication, reusing the same target, verification, and activity infrastructure.
4 — Headless: Support non-TTY review with final text/JSON on stdout and progress on stderr.
The branches would be stacked Q → 1 → 2 → 3 → 4, with each PR initially based on the preceding branch. They would merge into upstream mainin that order, retargeting the next PR to main after each merge. The existing feat/1287-grounded-review branch remains a reference; I’ll move relevant work selectively rather than merge it wholesale.
@akramcodez, could you assign this issue to me first? After that, which approach would you prefer:
One larger PR to main that brings back the Foundation along with the remaining stages, or
A feature branch you create, where the remaining stages land one by one and then merge into main together?
Status
The implementation and testing for all remaining stages are already done on my side. Once we've decided on the approach, I just need to put it together in that shape, and then it's ready for review and merge.
Thanks @puri-adityakumar, you're assigned. Please go with the feature branch approach: I'll create feat/1287-grounded-review on the main repo. Open each stage (Foundation, Grounded default, Deep, Headless) as its own PR against that branch so they can be reviewed in small pieces, and we merge the branch into main once all of them are in and tested together.
Activity
puri-adityakumar commentedon Sep 16, 2026
Hi @will-lamerton, thank you for this. A few questions before I start:
source/plain/shell.ts, which is core plumbing rather than review code, so happy to isolate either way.reviewModelknob)?Plan:
SubagentExecutor+ read-only tool whitelist reviews a real diff productively (done, all checks passed)resolveReviewTarget()from feat: add /review slash command and nanocoder review CLI command #1099 (v1 behavior unchanged),review-finder+review-verifiersubagents with read-only tools + tool-call budget, independent verifier per finding (CONFIRM / REJECT / INSUFFICIENT), tier dispatch (/review→ default,/review quick→ v1 one-shot), mandatory file:line citations, tests + changeset/review deep, tests + changeset--output-format json+ plain-shell dispatch sonanocoder review > file.mdworks, tests + changesetBenchmark results (catch rate, false positives, citation validity, token cost) will be posted here once the default tier runs.
Since #1099 hasn't landed yet, PR 1 starts on my fork and rebases onto v1 when it merges. Nothing in the one-shot path or
parseReviewCliArgsgets touched.@soumojit-D48, would you like to stay involved in this work once #1099 lands, or is handing it over fine? Either works for me.
fix(review): state diff-only v1 scope with Nano-Collective#1287 link;…
feat: add /review slash command and nanocoder review CLI command (#1099)
puri-adityakumar commentedon Sep 24, 2026
I tested the current implementation in the TUI and found a few gaps before opening the replacement PR stack:
/review quick 1467fails to fetch an upstream PR whenoriginpoints to my fork. A PR URL is not currently understood as a PR target./reviewruns a finder/verifier pipeline, but the TUI does not show which agent is running or its tool/API calls. When an investigation hits its budget, the result can still look like a clean review. That should be labeled incomplete, not “no issues found.”On
main,/reviewreports no branch changes, then printsfatal: Needed a single revision.On the feature branch, the finder hits its turn budget after a truncated diff, but the report says “No verified issues found” and displays raw Markdown beside normally rendered chat.
puri-adityakumar commentedon Sep 24, 2026
Following up on the proposed replacement stack above, here is what I intend each PR to contain. I’d appreciate feedback on the boundaries before opening them.
The branches would be stacked Q → 1 → 2 → 3 → 4, with each PR initially based on the preceding branch. They would merge into upstream
mainin that order, retargeting the next PR tomainafter each merge. The existingfeat/1287-grounded-reviewbranch remains a reference; I’ll move relevant work selectively rather than merge it wholesale.puri-adityakumar commentedon Nov 17, 2026
Where this stands
The /review stack for this issue was planned as 5 PRs: Q → Foundation → Grounded default → Deep → Headless (plan).
/review.Next steps
@akramcodez, could you assign this issue to me first? After that, which approach would you prefer:
mainthat brings back the Foundation along with the remaining stages, ormaintogether?Status
The implementation and testing for all remaining stages are already done on my side. Once we've decided on the approach, I just need to put it together in that shape, and then it's ready for review and merge.
akramcodez commentedon Nov 19, 2026
Thanks @puri-adityakumar, you're assigned. Please go with the feature branch approach: I'll create
feat/1287-grounded-reviewon the main repo. Open each stage (Foundation, Grounded default, Deep, Headless) as its own PR against that branch so they can be reviewed in small pieces, and we merge the branch intomainonce all of them are in and tested together.puri-adityakumar commentedon Nov 19, 2026
Hey @akramcodez, all four PRs are up against
feat/1287-grounded-review:One thing first: the branch is 16 commits behind
main. Could you rebase it onmain? Once that's done, I'll update the four PRs and rerun the checks.Please merge in the order above, since each PR builds on the one before. Once all four are in, the branch can go into
main.Does that work for you?