Simplify Git Worktree Ignore Configuration · Entire

Code Review

1. Determine Diff Against origin/main

Always review changes against origin/main directly. Do not use local main, git merge-base, a PR base branch, or a user-specified alternate base.

Get the CURRENT diff — never use cached results from earlier in the conversation. Include both committed and uncommitted changes (staged + unstaged):

BASE=origin/main
git diff $BASE --stat

Note: git diff origin/main (not origin/main...HEAD) diffs origin/main against the working tree, capturing committed changes, staged changes, and unstaged changes in one pass.

Show the user the file list and total count. If there are 0 changed files, report that to the user and stop — there is nothing to review. Otherwise, immediately proceed to the review agents. Do NOT wait for confirmation.

Before launching agents, build a concise review context and pass it to every agent. Show the context as a table before launching agents so assumptions are visible:

Context Source Value
User goal Conversation One-line summary, or not provided
Implementation plan Conversation / docs One-line summary, or not provided
PR context PR title/body One-line summary, or no PR found
Commits git log --oneline origin/main..HEAD One-line summary of commit intent
Changed surface diff file list Main packages/files touched
Inferred behavior commits/tests/docs/user text Intended behavior change, or diff-only inference

2. Spawn Parallel Review Agents

Review Philosophy

Pass these rules to every agent:

Launch four baseline sub-agents in parallel using the Agent tool. Pass each agent origin/main as the base ref, the full list of changed files, the review context, and the review philosophy above. When the repository is a Go project and the diff includes Go-related files (*.go, go.mod, or go.sum), also launch Agent 5 in the same batch.

Agent 1: Security & Adversarial

Review git diff $BASE with fresh eyes for:

For EACH finding: read the actual source file and trace whether the code path is reachable in production. Discard any finding you cannot confirm with a concrete code reference.

Agent 2: Correctness & Quality

Review git diff $BASE for:

For EACH finding: verify the claim by reading the source. Check call sites to confirm the issue is real, not hypothetical.

Agent 3: Simplification & De-slop

Use the local pfleidi:de-slop skill's slop taxonomy as the source of truth: skills/pfleidi/skills/de-slop/SKILL.md ("What Counts as Slop"). Apply its criteria as a detection lens only — find and report slop; do not run de-slop's remediation workflow, create commits, or open a PR.

Review git diff $BASE for:

For EACH suggestion: verify it does not break existing behavior by checking call sites and usages. Discard cosmetic-only suggestions.

Agent 4: Readability & Go Idioms

Review git diff $BASE for code that is hard to read, maintain, or reason about:

For EACH finding: explain the readability cost in concrete maintenance terms. Prefer small, local refactor suggestions.

Agent 5: Clean Go & Modern Go (Go diffs only)

Use the local pfleidi:clean-go skill as the source of truth: skills/pfleidi/clean-go/SKILL.md. Review only changed Go code plus surrounding source, tests, interfaces, and call sites needed to verify findings.

3. Synthesize Report

After all launched agents complete:

  1. Collect findings from both the first-pass agents and the second-pass coverage sweep.
  2. Deduplicate — merge findings from different agents that point to the same underlying issue.
  3. Verify — for any finding where the agent did not cite a specific file:line with evidence, read the source and confirm or discard it.
  4. Group by file.
  5. Sort by severity within each file: Critical > High > Medium > Low.