GeezerVison is showing github.com — Agentic /review: ground findings against the codebase (tier 2) · Issue #1287 · Nano-Collective/nanocoder
Agentic /review: ground findings against the codebase (tier 2) #1287Labels architectureNeeds a structural design changearea:agentAgent loop: context, compaction, subagents, memory, sessionsarea:cliCLI flags, headless mode, completions, slash commandsenhancementNew feature or request DescriptionFollow-up to #1002 and #1099.
#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.
@puri-adityakumar proposed this in detail in #1002 (comment) and wants to work on it. @soumojit-D48 owns #1099. Please coordinate here rather than in the PR so #1099 can land as v1.
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. Activitypuri-adityakumar commented on Sep 16, 2026 Hi @will-lamerton, thank you for this. A few questions before I start:
- Could you assign Agentic /review: ground findings against the codebase (tier 2) #1287 to me so ownership is official?
- OK to ship as 3 stacked PRs (below)?
- 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)
- Phase 1 → PR 1 (default tier): extract
resolveReviewTarget() from feat: add /review slash command and nanocoder review CLI command #1099 (v1 behavior unchanged), review-finder + review-verifier subagents 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
- Phase 2 → PR 2 (deep tier, on PR 1): three isolated finders (bugs / standards / spec), verifier fan-out, dedupe + sectioned report,
/review deep, tests + changeset
- Phase 3 → PR 3 (output + CLI, mostly independent):
--output-format json + plain-shell dispatch so nanocoder review > file.md works, tests + changeset
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. puri-adityakumar commented on Sep 24, 2026 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.
 puri-adityakumar commented on 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.
- 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 main in 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. added area:agentAgent loop: context, compaction, subagents, memory, sessions area:cliCLI flags, headless mode, completions, slash commands and removed on Oct 7, 2026puri-adityakumar commented on Nov 17, 2026 Where this stands
The /review stack for this issue was planned as 5 PRs: Q → Foundation → Grounded default → Deep → Headless (plan).
Next steps
@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. akramcodez commented on Nov 19, 2026 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. Reacted by Aditya Kumar Puri puri-adityakumar commented on Nov 19, 2026
MetadataMetadataarchitectureNeeds a structural design changearea:agentAgent loop: context, compaction, subagents, memory, sessionsarea:cliCLI flags, headless mode, completions, slash commandsenhancementNew feature or request DevelopmentNo branches or pull requestsIssue actions
|