2.7 KiB
2.7 KiB
description, agent
| description | agent |
|---|---|
| Resume or start track implementation following TDD protocol | tier2-tech-lead |
/conductor-implement
Resume or start implementation of the active track following TDD protocol.
Prerequisites
- Run
/conductor-setupfirst to load context - Ensure a track is active (has
[~]tasks)
Implementation Protocol
-
Identify Current Task:
- Read active track's
plan.md - Find the first
[~](in-progress) or[ ](pending) task - If phase has no pending tasks, move to next phase
- Read active track's
-
Research Phase (MANDATORY): Before implementing, use tools to understand context:
py_get_code_outlineon target filespy_get_skeletonon dependenciesgrepfor related patternsget_git_difffor recent changes- Audit
__init__methods for existing state
-
TDD Cycle:
Red Phase (Write Failing Tests)
- Stage current progress:
git add . - Delegate test creation to @tier3-worker:
@tier3-worker Write tests for: [task description] WHERE: tests/test_file.py:line-range WHAT: Test [specific functionality] HOW: Use pytest, assert [expected behavior] SAFETY: [thread-safety constraints] Use 1-space indentation. - Run tests:
uv run pytest tests/test_file.py -v - CONFIRM TESTS FAIL - this is the Red phase
Green Phase (Implement to Pass)
- Stage current progress:
git add . - Delegate implementation to @tier3-worker:
@tier3-worker Implement: [task description] WHERE: src/file.py:line-range WHAT: [specific change] HOW: [API calls, patterns to use] SAFETY: [thread-safety constraints] Use 1-space indentation. - Run tests:
uv run pytest tests/test_file.py -v - CONFIRM TESTS PASS - this is the Green phase
Refactor Phase (Optional)
- With passing tests, refactor for clarity
- Re-run tests to verify
- Stage current progress:
-
Commit Protocol (ATOMIC PER-TASK):
git add . git commit -m "feat(scope): description" $hash = git log -1 --format="%H" git notes add -m "Task: [summary]" $hash- Update
plan.md: Change[~]to[x]with commit SHA - Commit plan update:
git add plan.md && git commit -m "conductor(plan): Mark task complete"
- Update
-
Repeat for Next Task
Error Handling
If tests fail after Green phase:
- Delegate analysis to @tier4-qa:
@tier4-qa Analyze this test failure: [test output] DO NOT fix - provide analysis only. - Maximum 2 fix attempts before escalating to user
Phase Completion
When all tasks in a phase are [x]:
- Run
/conductor-verifyfor checkpoint