4.8 KiB
4.8 KiB
🚨🚨🚨 CRITICAL REQUIREMENTS FOR BACKGROUND AGENTS 🚨🚨🚨
⚠️ STOP! READ THIS FIRST! ⚠️
MANDATORY TESTING REQUIREMENT - NO EXCEPTIONS!
🔥 RULE #1: ALWAYS RUN bash test BEFORE COMPLETION 🔥
THIS IS THE MOST IMPORTANT RULE FOR BACKGROUND AGENTS:
- 🚨 EVERY BACKGROUND AGENT MUST RUN
bash testBEFORE SAYING THEY ARE DONE - 🚨 NO EXCEPTIONS - THIS IS MANDATORY AND NON-NEGOTIABLE
- 🚨 IF YOU DON'T RUN
bash test, YOUR WORK IS INCOMPLETE - 🚨 SAYING "DONE" WITHOUT RUNNING
bash testIS BREAKING THE RULES
WHY THIS IS CRITICAL:
- The
bash testcommand runs the full test suite including unit tests and compilation checks - It catches breaking changes, compilation errors, and regressions
- It ensures the codebase remains stable and functional
- WITHOUT THIS, YOU WILL BREAK THE PROJECT
WHAT bash test DOES:
- Runs all C++ unit tests
- Runs Python linting and formatting checks
- Validates code compilation across platforms
- Checks for syntax errors and warnings
- Ensures all examples still compile
🚨 MANDATORY STEPS FOR COMPLETION - FOLLOW EXACTLY: 🚨
-
🔥 RUN
bash testCOMMAND- Execute:
bash test - Wait for ALL tests to complete
- Check that ALL tests PASS
- Execute:
-
🔥 VERIFY TEST RESULTS
- If ANY test fails, you MUST fix the issues
- Do NOT ignore warnings or errors
- Do NOT proceed until ALL tests pass
-
🔥 USE MCP SERVER VALIDATION (RECOMMENDED)
- Use the
validate_completiontool from MCP server:uv run mcp_server.py - This tool runs
bash testand validates results - Only indicate completion if this tool returns SUCCESS
- Use the
-
🔥 ZERO TOLERANCE FOR FAILURES
- If ANY test fails, the background agent MUST fix the issues
- Do NOT indicate completion with failing tests
- Do NOT ignore test errors or warnings
- Fix the code and re-run
bash testuntil ALL tests pass
COMPLETION CHECKLIST - MUST COMPLETE ALL ITEMS:
- ✅ All code changes have been made
- ✅
bash testhas been run and ALL tests PASS - ✅ No compilation errors or warnings remain
- ✅ MCP server
validate_completiontool shows SUCCESS (if used) - ✅ All test output has been reviewed for any issues
- ✅ ONLY THEN indicate task completion
🔥 CONSEQUENCES OF NOT FOLLOWING THIS RULE: 🔥
- YOUR CHANGES WILL BREAK THE PROJECT
- OTHER DEVELOPERS WILL HAVE TO FIX YOUR MISTAKES
- THE CONTINUOUS INTEGRATION SYSTEM WILL FAIL
- YOU WILL CAUSE REGRESSIONS AND BUGS
🚨 FINAL WARNING: 🚨
IF YOU ARE A BACKGROUND AGENT AND YOU INDICATE COMPLETION WITHOUT RUNNING bash test, YOU HAVE FAILED TO FOLLOW THE MOST BASIC REQUIREMENT OF THIS PROJECT.
NO EXCEPTIONS. NO SHORTCUTS. ALWAYS RUN bash test FIRST.
Examples of CORRECT Background Agent Behavior:
✅ GOOD Example:
1. Made code changes
2. Ran `bash test`
3. All tests passed
4. Indicated completion: "Task completed successfully. All tests pass."
❌ BAD Example:
1. Made code changes
2. Skipped running tests
3. Indicated completion: "Task completed successfully."
^ THIS IS WRONG AND BREAKS THE PROJECT
✅ GOOD Example with Test Failures:
1. Made code changes
2. Ran `bash test`
3. Some tests failed
4. Fixed the failing code
5. Ran `bash test` again
6. All tests passed
7. Indicated completion: "Task completed successfully. All tests pass."
❌ BAD Example with Test Failures:
1. Made code changes
2. Ran `bash test`
3. Some tests failed
4. Ignored failures and indicated completion anyway
^ THIS IS WRONG AND BREAKS THE PROJECT
HOW TO RUN bash test:
Command:
bash test
Expected Output (Success):
Running C++ tests...
All C++ tests passed ✅
Running Python linting...
All Python checks passed ✅
Running compilation checks...
All compilation checks passed ✅
What to do if tests fail:
- READ THE ERROR MESSAGES CAREFULLY
- FIX THE CODE THAT'S CAUSING THE FAILURES
- RUN
bash testAGAIN - REPEAT UNTIL ALL TESTS PASS
- ONLY THEN INDICATE COMPLETION
MCP SERVER VALIDATION TOOL:
How to use:
# Start MCP server
uv run mcp_server.py
# Use the validate_completion tool
# This automatically runs `bash test` and validates results
Benefits:
- Automatically runs
bash test - Provides clear pass/fail results
- Ensures you don't forget to run tests
- RECOMMENDED FOR ALL BACKGROUND AGENTS
🚨 REMEMBER: THIS IS NOT OPTIONAL 🚨
EVERY BACKGROUND AGENT WORKING ON THIS PROJECT MUST:
- RUN
bash testBEFORE COMPLETION - ENSURE ALL TESTS PASS
- FIX ANY FAILURES
- ONLY THEN INDICATE COMPLETION
NO SHORTCUTS. NO EXCEPTIONS. ALWAYS TEST FIRST.