This document synthesizes the validation and quality assurance patterns implemented across AI coding assistant systems in this repository. It covers mandatory post-edit checks, iterative fixing loops, circuit breakers, verification gate sequences, and enforcement mechanisms that ensure code quality before user delivery.
For information about file editing strategies themselves, see File Editing Patterns and Strategies. For parallel vs. sequential execution constraints, see Parallel Execution Patterns and Constraints.
All documented AI assistants implement some form of mandatory validation after code modifications. The pattern consists of three universal components: validation triggers, validation tools, and remediation loops.
Sources: Qoder/prompt.txt145-150 Qoder/prompt.txt196-210 Amp/gpt-5.yaml332-344 Amp/claude-4-sonnet.yaml50-57 Same.dev/Prompt.txt72 Same.dev/Prompt.txt237
Every system implements mandatory validation with varying degrees of strictness. The following table compares trigger conditions across systems:
| System | Trigger Condition | Tool Name | Mandatory? | Scope |
|---|---|---|---|---|
| Qoder | After ALL code changes, no matter how small | get_problems | YES ($100M penalty) | Compilation + Lint |
| Amp (GPT-5) | After task completion | get_diagnostics + custom commands | YES (Verification Gates) | Type → Lint → Test → Build |
| Amp (Claude 4) | After completing a task | get_diagnostics + lint/typecheck | YES (MUST run) | Diagnostics + Custom |
| Same.dev | After every significant edit and before each version | run_linter | YES | Linting + Runtime Errors |
| VSCode Agent | Implicit through user-visible errors | N/A | NO (Best Practice) | IDE Diagnostics |
| Windsurf | Implicit validation | N/A | NO (Recommended) | Build/Test Commands |
Key Insight: Qoder enforces validation most strictly (with financial penalty metaphor), while Amp implements a structured gate sequence, and Same.dev focuses on linting before versioning.
Sources: Qoder/prompt.txt145-150 Qoder/prompt.txt234-239 Amp/gpt-5.yaml332-344 Amp/claude-4-sonnet.yaml50-57 Same.dev/Prompt.txt72
Systems implement a consistent pattern for addressing validation failures:
Different systems provide specific guidance on when to fix vs. when to escalate:
Qoder Approach Qoder/prompt.txt196-210:
Same.dev Approach Same.dev/Prompt.txt72 Same.dev/Prompt.txt237:
Amp Approach Amp/gpt-5.yaml332-344:
Sources: Qoder/prompt.txt196-210 Same.dev/Prompt.txt72 Same.dev/Prompt.txt237 Amp/gpt-5.yaml332-344
Multiple systems converge on a 3-attempt maximum for fixing the same issue, preventing infinite loops:
| System | Max Attempts | Scope | Action on Limit |
|---|---|---|---|
| Same.dev | 3 | Per file | Ask user what to do next; suggest revert or contact support |
| Amp (implied) | Not specified | Per verification gate | Report evidence and scope change |
| Qoder | Not specified | Continuous until clean | Continue until no issues (no explicit limit) |
Same.dev Circuit Breaker Same.dev/Prompt.txt72 Same.dev/Prompt.txt186:
"DO NOT loop more than 3 times on fixing linter errors on the same file. On the third time, you should stop and ask user what to do next. If user doesn't know, suggest them to revert or contact Same support."
This prevents token exhaustion and infinite correction loops when the assistant is stuck.
Sources: Same.dev/Prompt.txt72 Same.dev/Prompt.txt186 Same.dev/Prompt.txt237
Amp implements the most comprehensive verification sequence with explicit ordering:
From Amp/gpt-5.yaml332-344:
Order: Typecheck → Lint → Tests → Build
Rules:
AGENTS.md or neighbors; if unknown, search the repoSources: Amp/gpt-5.yaml332-344 Amp/claude-4-sonnet.yaml50-57
Several systems emphasize testing as a critical validation mechanism:
From Qoder/prompt.txt85-96 Qoder enforces strict sequential validation for test generation:
Rules for Multiple Test Files:
get_problems to check for compilation issuesRationale: "You will be called multiple times to complete all files, NO need to worry about token limits, focus on current file only."
Same.dev/Prompt.txt89 Same.dev/Prompt.txt254:
versioning tool to create a new version for the project. Version frequently."Sources: Qoder/prompt.txt85-96 Same.dev/Prompt.txt89 Same.dev/Prompt.txt254
Qoder uses extreme financial penalties to enforce critical rules:
| Rule Violated | Penalty | Purpose |
|---|---|---|
Using wrong editing tool (not search_replace) | $100,000,000 | Force correct tool selection |
| Trying to replace entire file content | $100,000,000 | Prevent expensive operations |
| Splitting short modifications unnecessarily | $100,000,000 | Optimize token usage |
From Qoder/prompt.txt234-239:
"MUST always default to using search_replace tool for editing files unless explicitly instructed to use edit_file tool, OR face a $100000000 penalty"
This metaphorical enforcement ensures the assistant prioritizes critical constraints.
Systems use different levels of imperative language:
| System | Strongest Language | Example |
|---|---|---|
| Qoder | "MUST" + penalty | "MUST: Use get_problems to validate... OR face a $100M penalty" |
| Amp | "must run" (lowercase) | "Order: Typecheck → Lint → Tests → Build" |
| Same.dev | "DO NOT loop" | "DO NOT loop more than 3 times on fixing linter errors" |
Sources: Qoder/prompt.txt234-239 Amp/gpt-5.yaml332-344 Same.dev/Prompt.txt72
Different systems provide different validation tools with varying capabilities:
| Tool | System | Compilation | Linting | Type Checking | Runtime | Custom Commands |
|---|---|---|---|---|---|---|
get_problems | Qoder | ✓ | ✓ | ✓ | ✓ | ✗ |
get_diagnostics | Amp | ✓ | ✓ | ✓ | ✗ | ✓ |
run_linter | Same.dev | ✗ | ✓ | ✗ | ✓ | ✗ |
| IDE Diagnostics | VSCode Agent | ✓ | ✓ | ✓ | ✗ | ✗ |
Key Differences:
get_problems is the most comprehensive single-tool validatorget_diagnostics + custom commands provide the most flexibilityrun_linter focuses on pre-deployment validationSources: Qoder/prompt.txt145-150 Amp/claude-4-sonnet.yaml50-57 Same.dev/Prompt.txt72
Before validation tools even run, systems enforce quality standards at code generation time:
Amp Quality Bar Amp/gpt-5.yaml316-330:
as any or linter suppression unless explicitly requestedAmp Code Conventions Amp/claude-4-sonnet.yaml403-453:
Qoder Code Standards Qoder/prompt.txt122-146:
// ... existing code ...)get_problems to validateSources: Amp/gpt-5.yaml316-330 Amp/claude-4-sonnet.yaml403-453 Qoder/prompt.txt122-146
The complete workflow shows how validation integrates with the broader development process:
This diagram bridges natural language concepts to actual code execution flow, showing the relationship between high-level validation concepts and their implementation through specific tools.
Sources: Qoder/prompt.txt145-150 Qoder/prompt.txt196-210 Amp/gpt-5.yaml332-344 Same.dev/Prompt.txt72
get_problems toolThe convergence of these patterns suggests industry best practices:
Sources: Qoder/prompt.txt145-150 Qoder/prompt.txt234-239 Amp/gpt-5.yaml332-344 Same.dev/Prompt.txt72 Same.dev/Prompt.txt186
Refresh this wiki