Private
Public Access
fix(agents): Add TDD phase enforcement to tier3-worker
This commit is contained in:
@@ -84,40 +84,30 @@ Before implementing:
|
|||||||
3. [ ] Verify target file and line range exists
|
3. [ ] Verify target file and line range exists
|
||||||
4. [ ] Announce: "Implementing: [task description]"
|
4. [ ] Announce: "Implementing: [task description]"
|
||||||
|
|
||||||
## Task Execution Protocol
|
## Task Execution Protocol (MANDATORY TDD)
|
||||||
|
|
||||||
### 1. Understand the Task
|
### Phase 1: RED - Write Failing Test
|
||||||
|
- Write a test that defines the expected behavior
|
||||||
|
- Run: `manual-slop_run_powershell` with `uv run pytest tests/path/test.py -v`
|
||||||
|
- Confirm: Test MUST fail before proceeding
|
||||||
|
- DO NOT skip this phase
|
||||||
|
|
||||||
Read the task prompt carefully. It specifies:
|
### Phase 2: GREEN - Implement to Pass
|
||||||
|
- Implement the minimal code to make the test pass
|
||||||
|
- Run tests again
|
||||||
|
- Confirm: Test MUST pass
|
||||||
|
- DO NOT skip this phase
|
||||||
|
|
||||||
- **WHERE**: Exact file and line range to modify
|
### Phase 3: REFACTOR - Optional
|
||||||
- **WHAT**: The specific change required
|
- With passing tests, improve code quality
|
||||||
- **HOW**: Which API calls, patterns, or data structures to use
|
- DO NOT change behavior
|
||||||
- **SAFETY**: Thread-safety constraints if applicable
|
- Re-run tests to confirm still passing
|
||||||
|
|
||||||
### 2. Research (If Needed)
|
### Commit Protocol (ATOMIC PER TASK)
|
||||||
|
After each task completion:
|
||||||
Use MCP tools to understand the context:
|
1. `manual-slop_run_powershell` with `git add .`
|
||||||
|
2. `git commit -m "feat(scope): description"`
|
||||||
- `manual-slop_read_file` - Read specific file sections
|
3. DO NOT batch commits across tasks
|
||||||
- `manual-slop_py_find_usages` - Search for patterns
|
|
||||||
- `manual-slop_search_files` - Find files by pattern
|
|
||||||
|
|
||||||
### 3. Implement
|
|
||||||
|
|
||||||
- Follow the exact specifications provided
|
|
||||||
- Use the patterns and APIs specified in the task
|
|
||||||
- Use 1-space indentation for Python code
|
|
||||||
- DO NOT add comments unless explicitly requested
|
|
||||||
- Use type hints where appropriate
|
|
||||||
|
|
||||||
### 4. Verify
|
|
||||||
|
|
||||||
- Run tests if specified: `manual-slop_run_powershell` with `uv run pytest ...`
|
|
||||||
- Check for syntax errors: `manual-slop_py_check_syntax`
|
|
||||||
- Verify the change matches the specification
|
|
||||||
|
|
||||||
### 5. Report
|
|
||||||
|
|
||||||
Return a concise summary:
|
Return a concise summary:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user