The longer you use Claude Code, the sooner you run into a core dilemma: it just wrote a chunk of code in three minutes—can you commit it straight away? Blind trust isn’t realistic, yet reviewing every single line defeats the point of using AI for speed.

This post lays out a practical decision framework so that before handing off any task to Claude, you can quickly decide how much autonomy to grant and where to focus your review.


The Traffic-Light Trust Framework

I group day-to-day engineering tasks into three trust levels, modeled after a traffic light:

Level Task Type Criteria Review Depth Examples
Green Boilerplate, docs, formatting Bugs can be spotted and fixed within 5 minutes Check the result only CRUD models, READMEs, lint fixes
Yellow Business logic, config changes, API design Bugs take 30+ minutes to debug Must review the diff Loyalty/points rules, DB schemas, env vars
Red Security code, data migrations, money-handling logic Mistakes are irreversible or carry severe impact Line-by-line review or write it yourself Auth logic, production migrations, payment calculations

Green Light: Delegate with Confidence

Green-light tasks follow well-established patterns with predictable outcomes. Generating a CRUD data model is a classic example:

1
2
3
# Example prompt for a typical green-light task
> Write a Go User model with ID, Name, Email, and CreatedAt fields,
> and generate the corresponding CRUD handlers using Gin.

Claude rarely gets model definitions and route registration wrong—this kind of code is highly templated, and any minor mistake surfaces immediately when you build or run tests. Verification is just as fast:

1
2
# Quick verification for green-light tasks: build passes + tests pass
go build ./... && go test ./...

For green-light tasks, I rarely inspect the implementation details; I only check whether the final output passes verification.

Yellow Light: Delegate, Then Review the Diff

For yellow-light tasks, let Claude produce the first pass, then inspect the changes carefully with git diff. When modifying a database schema, for instance, I focus on:

1
2
3
4
5
# Inspect the full diff to verify the scope of changes
git diff --stat # Check which files changed first
git diff # Then review the actual edits

# Focus on: column types, defaults, indexes, and accidentally dropped fields

Key questions when reviewing yellow-light tasks: Did the diff stay within the expected scope? Are any edge cases missing? Are all configuration values accurate?

Red Light: Write It Yourself, or Review Every Line

Security-sensitive code is the textbook red-light case. Take JWT authentication—Claude can produce code that works on the surface while hiding serious vulnerabilities:

1
2
3
4
// Code Claude might generate—works functionally, but carries security risks
token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) {
return []byte("my-secret-key"), nil // Hardcoded secret and no signing-algorithm check
})

This snippet runs without errors, yet it never validates SigningMethod (leaving it open to none-algorithm bypasses) and hardcodes the signing secret. For security code, the bar isn’t “it runs”—it’s “every detail holds up under attack.”


The Decision Formula and Walkthrough

If you don’t want to consult a table every time, use a quick rule of thumb:

Trust Level = Recovery Speed × Familiarity

  • Fast recovery (git revert fixes it, or it’s docs-only with zero runtime impact) → lean toward trusting
  • Slow recovery (mutated database state, broken production service) → lean toward caution
  • High familiarity (you can spot bugs at a glance) → lean toward trusting
  • Low familiarity (you’re unsure whether the output is right) → lean toward caution

High on both axes → Green. Low on either axis → at least Yellow.

Walking Through the Decision Process

Suppose the task is adding an auto-generated excerpt feature to a blog:

  1. Recovery speed: It only touches generation logic, and a single git revert rolls it back → Fast
  2. Familiarity: I know the Hexo template engine well and would spot a broken change immediately → High
  3. Verdict: Green light—let Claude implement it, and run hexo server to verify the result
1
2
3
# Green-light verification: preview locally to confirm the output
hexo clean && hexo server
# Open http://localhost:4000 in your browser to verify the generated excerpt

Now take a different task: editing a production database migration script. Recovery is slow (one bad run can destroy data) and my familiarity here is moderate → Yellow-leaning-Red. Let Claude draft the initial version, then test it repeatedly in staging before anything touches production.


Code Review in Practice: What to Check After Claude Finishes

Once you decide to review a change, run through this checklist:

# Check How to Verify
1 File paths Run git diff --name-only to confirm only target files were modified
2 Deletions Scan - lines in git diff to make sure useful logic wasn’t dropped
3 Hardcoded values Check secrets, URLs, and magic numbers for accuracy
4 Error handling Watch for swallowed errors (empty catch blocks) or unnecessary fallbacks
5 Edge cases Verify handling of null/empty inputs, concurrency, and oversized payloads
6 Style consistency Confirm naming, formatting, and directory layout match project conventions

You don’t need to read every line. Start with git diff --stat to check the blast radius; if the scope looks right, zero in on the six items above. For checks that keep coming up (such as style conventions or hardcoded values), encode them as rules in CLAUDE.md so Claude follows them during generation and cuts down your review load.


My Actual Split—and How It Shifts Over Time

Across my day-to-day development work, the breakdown looks roughly like this:

  • 60% Green—let Claude handle it; I only check the outcome
  • 30% Yellow—let Claude write the first pass; I review and refine it
  • 10% Red—handle it myself, or use Claude for research while writing the code by hand

This ratio isn’t static. Early in a new project, yellow-light work dominates because conventions aren’t established yet; once patterns and rules stabilize, the green-light share climbs. I also declare the trust policy right inside the project’s CLAUDE.md so Claude knows where it has autonomy:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Example trust policy declared in a project's CLAUDE.md

## Trust Levels

### Green Light (Execute directly, no confirmation needed)
- Format code and fix lint errors
- Update documentation and comments
- Generate boilerplate from existing patterns

### Yellow Light (Execute, then let me review the diff)
- Modify business logic
- Change configuration files
- Add new dependencies

### Red Light (Require my confirmation before executing)
- Modify authentication/authorization code
- Run or edit database migrations
- Touch payment or billing logic

The key is adjusting dynamically based on your own recovery speed and familiarity, rather than applying a rigid blanket rule. A trust framework isn’t meant to restrict Claude—it’s meant to focus your review energy where it actually counts.


Summary

  1. Classify every task with the traffic-light framework: delegate green, review diffs on yellow, and take the wheel on red.
  2. Use the formula “Recovery Speed × Familiarity” for fast calls without checking the table every time.
  3. Write your trust policy into CLAUDE.md so Claude knows the boundaries up front and stops asking unnecessary confirmation questions.

Next step: open the repository you work in most often and spend five minutes sorting common tasks into green, yellow, and red inside CLAUDE.md. Over the next few sessions, you’ll have a much sharper instinct for when to let go.


Series Navigation