grind-lab-core/night_owl_research_agent/auto-review-loop
Claude Code and agent skill by grind-lab-core/night_owl_research_agent
- community
Checking that the SKILL.md file is still in the repository.
Adversarial iterative review loop with generator-evaluator separation. Up to 4 rounds of independent review, improvement, and re-evaluation. Persists state to output/REVIEW_STATE.json for recovery. Stop: score ≥ 7.5/10 on all dimensions, or 4 rounds. Writes full history to output/AUTO_REVIEW_REPORT.md.
Install
npx vskill@latest install grind-lab-core/night_owl_research_agent/auto-review-loopSKILL.md
Skill: auto-review-loop
You run adversarial review cycles to iteratively improve research work. The architecture enforces generator-evaluator separation: the entity that wrote a section does NOT score it. Each round: independent review → parse → implement fixes → re-evaluate → decide.
Context: $ARGUMENTS
Core Principle: Generator-Evaluator Separation
Never let the same agent that wrote a section score it.
Constants
- MAX_ROUNDS = 4
- POSITIVE_THRESHOLD: score >= 6/10, or verdict contains "accept", "sufficient", "ready for submission"
- REVIEW_DOC:
output/AUTO_REVIEW_REPORT.mdin project root (cumulative log) - REVIEWER_MODEL =
gpt-5.4— Preferred external reviewer via Codex MCP (OpenAI models:gpt-5.4,o3,gpt-4o, etc.). If Codex MCP /codex execis unavailable or misconfigured, fall back toREVIEWER_FALLBACK(see Phase A.0). - REVIEWER_FALLBACK =
claude-opus-4-6— The most powerful Claude model, invoked via theAgenttool in a separate context as the adversarial reviewer subagent. Used automatically when the external LLM cannot be reached. - RESEARCH_DOMAIN =
auto— One ofml,giscience,remote-sensing,spatial-data-science, orauto(infer from the work under review). Drives the reviewer persona, rubric emphasis, and domain-specific must-checks (see Phase A.5). - HUMAN_CHECKPOINT = false — When
true, pause after each round's review (Phase B) and present the score + weaknesses to the user. Wait for user input before proceeding to Phase C. The user can: approve the suggested fixes, provide custom modification instructions, skip specific fixes, or stop the loop early. Whenfalse(default), the loop runs fully autonomously. - COMPACT = false — When
true, (1) readoutput/EXPERIMENT_LOG.mdandoutput/PROJ_NOTES.mdinstead of parsing full logs on session recovery, (2) append key findings tooutput/PROJ_NOTES.mdafter each round. - REVIEWER_DIFFICULTY = medium — Controls how adversarial the reviewer is. Three levels:
medium(default): Current behavior — MCP-based review, Claude controls what context GPT sees.hard: Adds Reviewer Memory (GPT tracks its own suspicions across rounds) + Debate Protocol (Claude can rebut, GPT rules).nightmare: Everything inhard+ GPT reads the repo directly viacodex exec(Claude cannot filter what GPT sees) + Adversarial Verification (GPT independently checks if code matches claims).
💡 Override:/auto-review-loop "topic" — compact: true, human checkpoint: true, difficulty: hard
State Persistence (Compact Recovery)
Long-running loops may hit the context window limit, triggering automatic compaction, or crash mid-round. To survive both, persist state to output/REVIEW_STATE.json at every phase boundary (not only end-of-round):
Write rules:
- Overwrite
output/REVIEW_STATE.jsonat each phase transition (A → B → B.5 → B.6 → C → D → E).phasevalues:A_selecting_backend,A5_selecting_persona,A_reviewing,B_parsing,B5_memory_update,B6_debate,C_implementing_fixes,D_waiting_results,E_documenting. scores_per_roundis an append-only array — never overwrite prior round scores.open_weaknessesentries carryfirst_seen_roundso the circuit breaker in Phase B.7 can detect repeats.
On completion (positive assessment or max rounds or blocked), set "status" to "completed", "max_rounds_reached", or "blocked" so future invocations don't resume a finished loop.
Budget Caps (safety valves)
Hard caps that terminate the loop with status: "blocked" and a clear reason written to output/AUTO_REVIEW_REPORT.md:
- MAX_ROUNDS = 4 (as before)
- MAX_WALL_CLOCK_HOURS = 6 — total elapsed from
loop_started_atto current time. Prevents runaway overnight loops. Override via argument (max-hours: N). - MAX_ROUND_WALL_CLOCK_HOURS = 2 — any single round exceeding this triggers a soft warning in the round log and a user notification; the round is not killed automatically (experiments may legitimately be long), but the cap is enforced cumulatively by
MAX_WALL_CLOCK_HOURS. - MAX_STALLED_ROUNDS = 2 — see Phase B.7.
Log round_started_at at the top of Phase A and compute elapsed at Phase E.
Workflow
Initialization
- Check for `output/REVIEW_STATE.json` in project root:
- If it does not exist: fresh start (normal case, identical to behavior before this feature existed)
- If it exists AND
statusis"completed": fresh start (previous loop finished normally) - If it exists AND
statusis"in_progress"ANDtimestampis older than 24 hours: fresh start (stale state from a killed/abandoned run — delete the file and start over) - If it exists AND
statusis"in_progress"ANDtimestampis within 24 hours: resume - Read the state file to recover
round,threadId,last_score,pending_experiments - Read
output/AUTO_REVIEW_REPORT.mdto restore full context of prior rounds - If
pending_experimentsis non-empty, check if they have completed (e.g., check screen sessions) - Resume from the next round (round = saved round + 1)
- Log: "Recovered from context compaction. Resuming at Round N."
- Read project narrative documents, memory files, and any prior review documents. When `COMPACT = true` and compact files exist: read
output/PROJ_NOTES.md+output/EXPERIMENT_LOG.mdinstead of fulloutput/AUTO_REVIEW_REPORT.mdand raw logs — saves context window. - Read recent experiment results (check output directories, logs)
- Identify current weaknesses and open TODOs from prior reviews
- Initialize round counter = 1 (unless recovered from state file)
- Create/update
output/AUTO_REVIEW_REPORT.mdwith header and timestamp
Loop (repeat up to MAX_ROUNDS)
Phase A.0: Select Reviewer Backend
Before sending any review prompt, decide which backend will act as the reviewer. Probe in this order and stop at the first one that works:
- Codex MCP (`mcp__codex__codex`) — preferred. Check that the MCP server is registered (e.g., entry in
.mcp.json) and that a cheap ping call returns without an auth/config error. - `codex exec` CLI — required for
nightmaredifficulty. Check withcommand -v codexand a--versionprobe. If missing onnightmare, downgrade to `hard` and note this inEXPERIMENT_LOG.md. - Reviewer subagent fallback — if neither of the above is usable, fall back to `REVIEWER_FALLBACK` (Claude Opus 4.6) invoked through the
Agenttool in a fresh context. This preserves generator-evaluator separation because the subagent starts cold and sees only the review package we hand it — not this session's writer context.
How to invoke the subagent fallback:
Rules for the fallback:
- The subagent must receive the same instructions the external reviewer would have received (persona, rubric, output format). Only the transport changes.
- For
hardandnightmare: include the full contents ofmemory/REVIEWER_MEMORY.mdin the prompt; the subagent returns an updated memory block we then persist. - For
nightmare: grant the subagent read access to the repo (it already has file tools) and explicitly tell it to verify claims against code/results/logs itself, without trusting the author. - There is no persistent `threadId` across rounds. Simulate memory by re-pasting
memory/REVIEWER_MEMORY.md+ the last round's raw response on each invocation. - Record which backend was used (
mcp/codex_exec/subagent) in the round entry ofoutput/AUTO_REVIEW_REPORT.mdso the audit trail is explicit.
If all three backends fail, stop the loop and write a clear error to output/AUTO_REVIEW_REPORT.md + output/REVIEW_STATE.json (status: "blocked", reason: "no reviewer backend available"). Do NOT silently self-review — that breaks generator-evaluator separation.
Phase A.5: Select Domain Persona and Rubric Emphasis
Pick the reviewer persona based on RESEARCH_DOMAIN (when auto, infer from the work: presence of spatial data, remote-sensing imagery, spatial statistics, GIScience theory, etc.). The persona string is injected into every Phase A prompt, whether MCP, codex exec, or subagent.
Persist the selected persona in REVIEW_STATE.json (persona field) so a resumed loop does not reclassify the domain mid-run and flip personas between rounds. On resume, read persona from state rather than re-inferring.
| Domain | Persona string | Target venues | Domain-specific must-checks | |
|---|---|---|---|---|
ml | "a senior ML reviewer (NeurIPS / ICML / ICLR level)" | NeurIPS, ICML, ICLR, CVPR | ablations, baselines, statistical significance, compute disclosure, seed variance | |
giscience | "a senior GIScience reviewer (IJGIS / TGIS / AAG level)" | IJGIS, TGIS, Annals of the AAG, CaGIS | CRS + projection (always); MAUP, spatial unit justification, conceptualization of space, reproducibility of spatial workflow — only when the claim depends on the unit of analysis or spatial reasoning is part of the contribution; do not penalize a paper for omitting MAUP / GWR discussion if the research question genuinely does not turn on them | |
remote-sensing | "a senior remote-sensing reviewer (RSE / IEEE-TGRS / ISPRS level)" | RSE, IEEE TGRS, ISPRS J. of P&RS, Remote Sensing | sensor & preprocessing chain, radiometric/atmospheric correction, cloud masking (when relevant), train/test geographic split (when transferability is claimed), transferability across scenes, per-class metrics | |
spatial-data-science | "a senior spatial data science reviewer" | EPB, CEUS, Geographical Analysis, IJGIS | Apply each of the following ONLY when the underlying claim requires it: spatial autocorrelation reported (Moran's I / Geary's C) when residual independence is assumed; spatial cross-validation when prediction is on spatially structured data; OLS vs spatial lag / error / GWR / MGWR comparison when the claim is about coefficients on spatially dependent residuals; residual diagnostics; effect-size maps. A spatial-data-science paper whose question is non-spatial in substance should NOT be marked down for omitting these |
Mixed GeoAI (deep learning + spatial/RS data): combine the ML persona with the relevant geo persona; require BOTH sets of must-checks scoped to the actual research question. Example preamble: "You are both a senior ML reviewer and a senior remote-sensing reviewer — hold this work to both bars, but only apply geo-specific checks (MAUP, spatial CV, GWR, residual Moran's I, per-scene transferability) where the paper's claims actually depend on them."
When constructing Phase A prompts below, replace the placeholder <PERSONA> with the persona string, and append the domain-specific must-checks as a conditional checklist: the reviewer should evaluate each item AND state "not applicable — <reason>" when the claim does not depend on it, instead of treating omission as an automatic weakness.
Phase A: Review
Route by REVIEWER_DIFFICULTY:
Medium (default) — MCP Review
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/auto-review-loop/SKILL.md
Popularity
- Repository stars
- 83
- Repository forks
- 21
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/grind-lab-core/night_owl_research_agent/auto-review-loop)