This document describes Qoder's mandatory code validation system that ensures all code modifications are immediately checked for compilation and linting errors. The validation pipeline uses the get_problems tool to detect issues after every code change and enforces an iterative error-fixing loop until the code is clean.
For information about the file editing operations that trigger validation, see File Operations and Editing Rules. For testing-specific validation workflows, see Testing Guidelines and TDD Workflow.
Sources: Qoder/prompt.txt146-150 Qoder/prompt.txt196-203
Every code modification in Qoder, regardless of size or apparent simplicity, must be followed by validation using the get_problems tool. This is not optional—it is a mandatory final step that cannot be skipped.
| Operation | Validation Required | Tool Used |
|---|---|---|
search_replace | ✓ Yes (Mandatory) | get_problems |
edit_file | ✓ Yes (Mandatory) | get_problems |
create_file | ✓ Yes (Mandatory) | get_problems |
read_file | ✗ No | N/A |
delete_file | ⚠ Conditional | get_problems (if affects other files) |
| Test file generation | ✓ Yes (Per file) | get_problems |
Sources: Qoder/prompt.txt146-150 Qoder/prompt.txt196-203
Diagram: Standard Code Validation Loop
The validation loop continues iteratively until get_problems returns no issues. There is no predetermined limit on iterations—the loop continues until the code is correct.
Sources: Qoder/prompt.txt146-150 Qoder/prompt.txt199-203
Diagram: Sequential File Modification with Per-File Validation
When modifying multiple files, each file is validated independently before proceeding to the next. This prevents cascading errors and ensures each file is compilable before moving forward.
Sources: Qoder/prompt.txt196-203
The get_problems tool is Qoder's primary validation mechanism. It retrieves compilation errors, linting warnings, and other code quality issues from the IDE's problem panel.
| Property | Description |
|---|---|
| Tool Name | get_problems |
| Category | Code Validation |
| Execution Mode | Sequential (never parallel) |
| Return Type | List of problems with file paths, line numbers, and messages |
| Scope | All files in workspace or specific file paths |
| Timing | Always after code modification, never before |
Sources: Qoder/prompt.txt318 Qoder/prompt.txt372-376
Diagram: get_problems Tool Integration Points
The get_problems tool is invoked immediately after any file modification tool completes.
Sources: Qoder/prompt.txt318 Qoder/prompt.txt372-376
The validation requirement is enforced through explicit system instructions with severe penalties for non-compliance:
"MANDATORY FINAL STEP: After completing ALL code changes, no matter how small or seemingly straightforward, you MUST: Use get_problems to validate the modified code"
Sources: Qoder/prompt.txt146-150
Qoder's validation enforcement operates under the same penalty framework as file editing violations:
| Violation Type | Penalty |
|---|---|
| Skipping validation after code change | $100,000,000 |
| Proceeding without fixing detected issues | $100,000,000 |
| Marking task complete without validation | $100,000,000 |
These penalties are symbolic enforcement mechanisms within the system prompt to ensure absolute compliance.
Sources: Qoder/prompt.txt234-243
Diagram: Complete File Modification and Validation Cycle
The validation pipeline integrates tightly with Qoder's file editing workflow, which mandates reading files before modification.
Sources: Qoder/prompt.txt146-150 Qoder/prompt.txt196-203
When using search_replace (Qoder's preferred editing tool), validation occurs after all replacement operations in a single call complete:
search_replace with all planned replacements (up to 600 lines total)get_problemssearch_replace with fixesget_problems againSources: Qoder/prompt.txt123-126 Qoder/prompt.txt146-150
Test file generation has a specialized validation protocol to ensure compilation before execution.
Diagram: Test File Generation and Validation Sequence
The system enforces strict one-at-a-time test file generation with compilation validation between each file.
Sources: Qoder/prompt.txt87-93
| Rule | Description |
|---|---|
| Sequential Generation | Generate ONE test file at a time |
| Immediate Validation | Use get_problems after writing test file |
| Fix Before Proceeding | Resolve all compilation issues before next test |
| No Parallel Tests | Never generate multiple test files without validation |
| Execute After Validation | Run tests only after successful compilation |
Sources: Qoder/prompt.txt87-96
Qoder employs an unbounded iteration approach to error fixing:
Diagram: Unbounded Iterative Error Resolution
Unlike some systems with 3-attempt limits, Qoder continues the fix-validate loop indefinitely until achieving zero errors.
Sources: Qoder/prompt.txt146-150 Qoder/prompt.txt199-203
The validation pipeline prioritizes correctness over completion speed:
"Remember: Complex changes will be handled across multiple calls - Focus on doing each change correctly - No need to rush or simplify due to perceived limitations - Quality cannot be compromised"
Sources: Qoder/prompt.txt126-130
It is important to distinguish between validation (compilation/linting) and testing (execution):
| Aspect | Validation (get_problems) | Testing (test execution) |
|---|---|---|
| Purpose | Ensure code compiles and meets static analysis | Verify code behavior and correctness |
| Timing | Immediately after code change | After validation passes |
| Tool | get_problems | run_in_terminal with test commands |
| Mandatory | Yes, for all code changes | Recommended, not mandatory |
| Frequency | Every single edit | After implementation complete |
| Error Type | Syntax, type, lint errors | Logic errors, failures, incorrect behavior |
Sources: Qoder/prompt.txt146-150 Qoder/prompt.txt84-96
When using Qoder's task management system (add_tasks, update_tasks), validation integrates as follows:
Diagram: Task Completion Requires Validation Success
Tasks cannot be marked complete until all associated code changes pass validation.
Sources: Qoder/prompt.txt37-38 Qoder/prompt.txt196-203
"NEVER mark any task as complete until you have actually executed it."
This includes ensuring validation passes. A task with unvalidated or failing code is not considered executed.
Sources: Qoder/prompt.txt38
The get_problems tool operates at different scopes:
Diagram: Workspace-Level Validation for Integration Issues
After modifying multiple files, a final workspace-wide validation check ensures no cross-file integration issues exist.
Sources: Qoder/prompt.txt196-203
Sources: Qoder/prompt.txt196-203 Qoder/prompt.txt372-376
Unlike some AI coding assistants that implement fixed iteration limits (e.g., Same.dev's 3-attempt limit documented in 4.2.3), Qoder's validation pipeline continues indefinitely until achieving zero errors. This ensures correctness at the cost of potentially longer resolution times for complex issues.
For comparison with validation approaches in other systems, see Validation and Quality Assurance Mechanisms.
Sources: Qoder/prompt.txt146-150
Refresh this wiki