.agents/skills/oat-project-review-receive/SKILL.md
Use when review findings from oat-project-review-provide need closure. Converts review artifacts into actionable plan tasks.
npx skillsauth add tkstang/open-agent-toolkit oat-project-review-receiveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Process review findings into actionable plan tasks and guide gap closure execution.
Turn review output into plan changes and a clear next action. This closes the feedback loop between reviewing and fixing.
Required: An active review artifact exists in the top level of {PROJECT_PATH}/reviews/ (not in reviews/archived/).
OAT MODE: Receive Review
Purpose: Convert review findings into plan tasks for systematic gap closure.
When executing this skill, provide lightweight progress feedback so the user can tell what’s happening after they confirm.
Print a phase banner once at start using horizontal separators, e.g.:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ OAT ▸ RECEIVE REVIEW ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Before multi-step work (parsing findings, updating artifacts, committing), print 2–5 short step indicators, e.g.:
[1/4] Reading review artifact…[2/4] Converting findings → plan tasks…[3/4] Updating plan.md + implementation.md…[4/4] Committing + next-step summary…For long-running operations (large review artifacts, many findings), print a start line and a completion line (duration optional).
Keep it concise; don’t print a line for every shell command.
BLOCKED Activities:
artifact reviews: no converting findings into plan tasksartifact reviews: no deferring findings by defaultALLOWED Activities:
artifact reviews: updating reviewed artifact files directly after user confirmationOAT stores active project context in .oat/config.local.json (activeProject, local-only).
PROJECT_PATH=$(oat config get activeProject 2>/dev/null || true)
PROJECTS_ROOT="${OAT_PROJECTS_ROOT:-$(oat config get projects.root 2>/dev/null || echo ".oat/projects/shared")}"
PROJECTS_ROOT="${PROJECTS_ROOT%/}"
If PROJECT_PATH is missing/invalid:
{project-name}PROJECT_PATH to ${PROJECTS_ROOT}/{project-name}mkdir -p .oat
oat config set activeProject "$PROJECT_PATH"
If PROJECT_PATH is valid: derive {project-name} as the directory name (basename of the path).
ls -t "$PROJECT_PATH/reviews/"*.md 2>/dev/null | head -10
Selection rules:
"$PROJECT_PATH/reviews/"."$PROJECT_PATH/reviews/archived/".If no active review files: Block and ask user to run the oat-project-review-provide skill first.
If multiple candidates:
oat_generated_at frontmatter date (not filesystem mtime, which is unreliable across branches).Read the selected review file completely.
Derive archive bookkeeping before making lifecycle edits:
REVIEW_FILENAME=$(basename "$REVIEW_PATH")
ARCHIVED_REVIEW_DIR="$PROJECT_PATH/reviews/archived"
ARCHIVED_REVIEW_PATH="$ARCHIVED_REVIEW_DIR/$REVIEW_FILENAME"
Extract findings from the review artifact and categorize:
Critical (must fix before merge):
Important (should fix before merge):
Medium (default fix before pass):
Minor (fix if time permits):
Count findings:
Critical: {N}
Important: {N}
Medium: {N}
Minor: {N}
Assign stable finding IDs for this receive run and keep them consistent in all prompts:
C1, C2, ...I1, I2, ...M1, M2, ...m1, m2, ...For each finding, build a structured register entry:
Large | Moderate | Minor | Negligible)artifact reviews, use dispositions:
resolve_in_artifactrejected_with_rationale (invalid/not applicable)needs_user_direction (unclear or disagreement)If Critical + Important + Medium == 0:
passed in the plan.md Reviews table (if plan.md exists)final scope:
passed until both gates are complete:
passed and route to PR/finalizationpassed means “review passed” (not merely “fixes completed”). If fixes exist, use fixes_completed until a re-review passes.Before asking the user to defer/convert findings, present a concise but complete summary so they do not need to open the review file.
Required output structure:
Findings Overview:
- Critical: {N}
- Important: {N}
- Medium: {N}
- Minor: {N}
Critical Findings:
{for each C\* finding}
- `{ID}` `{title}` (`{file}:{line}` if known)
- Reviewer finding: {issue + reviewer fix guidance}
- Finding analysis: {why you agree/disagree; practical risk if not fixed}
- Recommendation: {convert_to_task | defer_with_rationale}
- Task Scope: {Large | Moderate | Minor | Negligible}
Important Findings:
{same pattern}
Medium Findings:
{same pattern}
Minor Findings:
{same pattern, include fix-now vs defer-now tradeoff in plain language}
Rules:
None.Task Scope line using: Large, Moderate, Minor, or Negligible.Large: likely multi-file or cross-module behavior changeModerate: bounded implementation in one area with some verification breadthMinor: small localized code/test/doc changeNegligible: trivial cleanup/refactor with very low riskRead oat_review_type and oat_review_invocation from review artifact frontmatter:
oat_review_type == artifact:
rejected_with_rationale for invalid findings, or needs_user_direction when user input is required.oat_review_type == code AND oat_review_invocation == auto:
oat-project-implement. Apply relaxed disposition defaults:
oat_review_type == code (manual or oat_review_invocation absent):
Applies to code reviews only. (artifact reviews are handled via Step 2.6, the archive + routing in Step 10A, and the artifact summary path in Step 11.)
Which phase should receive fix tasks?
oat_review_scope)pNN (phase) or pNN-tNN (task): add fix tasks to that phasepNN-pMM (contiguous phase range): add fix tasks to the last phase in the range (pMM)final or SHA/range review: add fix tasks to a new "Review Fixes" phase or the last phaseRead plan.md to find the last task ID in the target phase:
# Example for phase p03:
# grep -E "^### Task p03-t[0-9]+:" "$PROJECT_PATH/plan.md" | tail -5
grep -E "^### Task ${TASK_PREFIX}-t[0-9]+:" "$PROJECT_PATH/plan.md" | tail -5
Revision phase naming:
For revision phases (p-revN), the task prefix is prevN, not p-revN:
p-rev1 → task prefix prev1 → regex ^### Task prev1-t[0-9]+:p-rev2 → task prefix prev2 → regex ^### Task prev2-t[0-9]+:For standard phases (pNN), the task prefix matches the phase: p03 → p03-tNN.
Derive TASK_PREFIX from scope:
p-revN: TASK_PREFIX = "prevN" (e.g., p-rev1 → prev1)TASK_PREFIX = TARGET_PHASE (e.g., p03 → p03)Numbering convention:
TASK_PREFIX (e.g., prev1-t02)prev1-t03, prev1-t04, etc.For each Critical, Important, and Medium finding (default):
Create a plan task entry:
### Task {task_id}: (review) {Finding title}
**Files:**
- Modify: `{file from finding}`
**Step 1: Understand the issue**
Review finding: {issue description from review}
Location: `{file}:{line}`
**Step 2: Implement fix**
{Fix guidance from review}
**Step 3: Verify**
Run: `{verification command from review or standard test command}`
Expected: {expected outcome}
**Step 4: Commit**
```bash
git add {files}
git commit -m "fix({task_id}): {description}"
```
**Task naming:**
- Prefix with `(review)` to indicate review-generated task
- Use active verb: "Fix...", "Add...", "Update..."
### Step 6: Update Plan.md
Add new tasks to plan.md in the target phase. When adding or editing tasks, preserve/restore shared `plan.md` invariants per the `oat-project-plan-writing` contract (stable task IDs, required sections, review table preservation, accurate `## Implementation Complete` totals).
**Review-fix bookkeeping (required):**
- When you add review-generated fix tasks:
- Update the relevant Reviews table row status to `fixes_added` (work queued) and set the Date + Artifact.
- Update `## Implementation Complete` totals (phase counts + total task count) so downstream PR/review summaries don’t go stale.
- If the plan includes any phase rollups that reference task counts, update those too.
**Keep plan runnable:**
- Do NOT leave plan.md in a state that blocks `oat-project-implement`.
- Ensure plan.md frontmatter remains:
- `oat_status: complete`
- `oat_ready_for: oat-project-implement`
**Keep plan internally consistent:**
- If the plan contains an `## Implementation Complete` summary (phase counts, total task count), update it to reflect any newly added review fix tasks.
- If the plan has phase headings that include task counts (or other rollups), update those rollups as well.
**Update Reviews section:**
```markdown
## Reviews
- Update or add a row for `{scope}` in the Reviews table:
- Status: `fixes_added` (if tasks were added) or `passed` (if no Critical/Important/Medium and no unresolved final-scope gates)
- Date: `{today}`
- Artifact: `reviews/archived/{filename}.md`
Status semantics (v1):
fixes_added: fix tasks were created and added to the planfixes_completed: fix tasks implemented, awaiting re-reviewpassed: re-review completed and recorded as passing (no unresolved Critical/Important/Medium, and all final-scope gates satisfied: deferred-medium + minor disposition)Add a note to implementation.md:
### Review Received: {scope}
**Date:** {today}
**Review artifact:** reviews/archived/{filename}.md
**Findings:**
- Critical: {N}
- Important: {N}
- Medium: {N}
- Minor: {N}
**New tasks added:** {task_ids}
**Next:** Execute fix tasks via the `oat-project-implement` skill.
After the fix tasks are complete:
- Update the review row status to `fixes_completed`
- Re-run `oat-project-review-provide {type} {scope}` then `oat-project-review-receive` to reach `passed`
Restart safety (required):
{PROJECT_PATH}/implementation.md exists, ensure it will resume correctly after this skill:
oat_current_task_id is null (or points at already-completed work), set it to the first newly-added review-fix task ID (or the next incomplete task in plan order).{PROJECT_PATH}/state.md frontmatter so routing/UI is accurate:
oat_phase: implementoat_phase_status: in_progressoat_current_task: {first_fix_task_id} (or next incomplete)oat_project_state_updated: "{ISO 8601 UTC timestamp}"After plan/implementation/state updates reference the archived location, move the processed review artifact into the local-only history directory:
mkdir -p "$ARCHIVED_REVIEW_DIR"
mv "$REVIEW_PATH" "$ARCHIVED_REVIEW_PATH"
Rules:
reviews/archived/{filename}.md."$ARCHIVED_REVIEW_PATH" already exists, append a timestamp suffix before moving so history is preserved.CRITICAL — DO NOT SKIP. When this skill runs in a separate agent session (subagent, fresh session, or different conversation), uncommitted bookkeeping updates cause state drift for the original agent. This skill modifies plan.md, implementation.md, state.md, and the contents of reviews/ (via the Step 7.5 archive move) but does not commit them on its own — the commit below is the safety net.
Commit all modified OAT tracking files atomically:
git add "$PROJECT_PATH/plan.md" "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md"
# Capture the Step 7.5 archive move: stages both the deletion of the original
# review path and the new archived location. Scope to the project's reviews/
# directory — never use repo-wide `git add -A`.
git add "$PROJECT_PATH/reviews/"
git diff --cached --quiet || git commit -m "chore(oat): record review findings and add fix tasks ({scope})"
Do not use git add -A or glob patterns that reach outside "$PROJECT_PATH/reviews/". Do not include unrelated implementation or code files in this commit. Do not defer this commit without explicit user approval — if deferred, clearly state in the summary that bookkeeping is uncommitted so the original agent knows to commit on return.
Note on archived review paths: When reviews/archived/ matches a localPaths pattern (the default setup), the archived file is gitignored and git add "$PROJECT_PATH/reviews/" will only stage the deletion of the original (now-moved) top-level review file. When reviews/archived/ is tracked, both the deletion and the new archived location are staged. Both cases are safe — the command handles them uniformly.
Worktree handling: If the project was resolved via a worktree in Step 0, run the git commands scoped to the worktree (git -C "$WORKTREE_PATH" ...) so the commit lands on the worktree branch.
Bounded loop protection:
Count how many review cycles have occurred for this scope:
{
find "$PROJECT_PATH/reviews" -maxdepth 1 -type f -name "*$SCOPE_TOKEN*.md" 2>/dev/null
find "$PROJECT_PATH/reviews/archived" -maxdepth 1 -type f -name "*$SCOPE_TOKEN*.md" 2>/dev/null
} | wc -l
If 3 or more cycles:
⚠️ Review cycle limit reached (3 cycles).
This scope has been reviewed {N} times. Further automated review cycles are blocked.
Options:
1. Review findings manually and decide which to address
2. Proceed to PR with current state
3. Request explicit user override to continue
Choose an option:
If under limit: Proceed normally.
If scope == final, resurface previously deferred Medium findings from prior review cycles before marking final as passed.
implementation.md review notes ("Deferred Findings"), plus prior review artifacts in reviews/archived/ (and any still-active top-level reviews/ file for the current cycle).Ask user to decide each deferred Medium:
Rules:
passed.implementation.md under the final review notes.Medium findings are converted to tasks by default.
Only propose Medium deferral when there is a concrete reason (duplicate, blocked dependency, explicit out-of-scope follow-up, or high-risk churn now).
If any Medium is proposed for deferral:
implementation.md under "Deferred Findings (Medium)".Minor findings handling is scope-aware:
If scope != final:
Negligible or Minor.If scope == final:
Minor findings are NOT auto-deferred silently.
Before asking for disposition, explain each minor in plain language:
Recommendation default:
convert when the finding is likely future cleanup or the fix scope is Negligible/Minor;defer only when the finding is unlikely to matter soon, blocked, duplicated, or high-churn to address now.Keep explanations concise (1-3 sentences per minor) and include file/line when available.
Ask user explicitly:
{N} minor findings pending final disposition:
- {m1}: {summary} — {brief explanation}
- {m2}: {summary} — {brief explanation}
...
Options:
1. Defer all minor findings with rationale
2. Select specific minor IDs to convert to tasks (e.g., m2,m3)
3. Convert all minors to tasks
Choose:
If option 2 is chosen, echo back selected IDs and the corresponding finding titles before proceeding.
If deferred, record rationale in implementation.md under "Deferred Findings".
Hard guard: do not mark final review passed until this explicit choice is recorded.
Ask user:
Review processed for {project-name}.
Added {N} fix tasks:
- {task_id}: {description}
- {task_id}: {description}
...
Options:
1. Execute fix tasks now (oat-project-implement)
2. Review the plan first (then manually run oat-project-implement)
3. Exit (tasks added, execute later)
Choose:
If execute now:
oat_phase_status: in_progress, oat_project_state_updated: "{ISO 8601 UTC timestamp}"oat-project-implement skill to execute fix tasks starting from {first_fix_task_id}"oat-project-implement if environment supports skill chainingIf review first:
plan.md, then run the oat-project-implement skill when ready"If exit:
oat-project-implement skill when ready."For artifact reviews, do not route to implementation tasks. After user-approved artifact edits are applied:
Archive the consumed review artifact (same as Step 7.5):
mkdir -p "$ARCHIVED_REVIEW_DIR"
mv "$REVIEW_PATH" "$ARCHIVED_REVIEW_PATH"
reviews/archived/{filename}.md."$ARCHIVED_REVIEW_PATH" already exists, append a timestamp suffix before moving so history is preserved.Then route:
needs_user_direction, ask targeted follow-up question(s) and wait for decision.resolve_in_artifact or rejected_with_rationale, ask user:
oat-project-review-provide artifact {scope}Review received for {project-name}.
Review: {review_filename}
Scope: {scope}
Findings: {N} critical, {N} important, {N} medium, {N} minor
Actions taken:
- Added {N} fix tasks to plan.md ({task_ids})
- Updated implementation.md with review notes
- Archived review artifact to `reviews/archived/{filename}.md`
- Deferred/accepted Medium findings: {N}
- Deferred {N} minor findings (auto for non-final, explicit decision for final)
- Finding disposition map: {ID -> converted|deferred|accepted + rationale summary}
Review cycle: {N} of 3
Next: {recommended action based on user choice}
For artifact reviews, summarize instead:
Review received for {project-name}.
Review: {review_filename}
Scope: {scope}
Findings: {N} critical, {N} important, {N} medium, {N} minor
Actions taken:
- Applied {N} artifact edits
- Archived review artifact to `reviews/archived/{filename}.md`
- No plan tasks created
- Finding disposition map: {ID -> resolve_in_artifact|rejected_with_rationale|needs_user_direction}
Next: {re-review artifact or continue phase, per user choice}
After fix tasks are executed, if another review is requested:
Default scope for re-review: Fix tasks only (not full phase)
This prevents reviewing already-approved code and focuses the reviewer on just the fixes.
How it works:
oat-project-review-provide is called after fix tasks exist(review) tasks in plan.md for the scope, including range review tags such as (p02-p03-review)reviews/archived/artifact reviews: findings are resolved directly in artifacts (or rejected with rationale if invalid), with no default deferralsartifact reviews: user confirms proposed edits before they are applieddocumentation
Use when OAT implementation changes and repository reference docs must be synchronized. Updates .oat/repo/reference to match current behavior.
business
Merge multiple analysis artifacts into a single coherent report with provenance tracking. Reads existing artifacts from /deep-research, /analyze, and /compare.
testing
Use when the user questions or suspects an agent claim is wrong. Adversarially gathers evidence to verify or refute the claim using the best sources available in the current environment.
tools
Use when prioritizing backlog work or evaluating a roadmap. Produces value-effort ratings, dependency mapping, and execution recommendations.