Files
manual_slop/.claude/commands/conductor-implement.md
Ed_ c428e4331a fix(mcp): wire run_powershell and MCP server for Windows/Scoop environment
- Add .mcp.json at project root (correct location for claude mcp add)
- Add mcp_env.toml: project-scoped PATH/env config for subprocess execution
- shell_runner.py: load mcp_env.toml, add stdin=DEVNULL to fix git hang
- mcp_server.py: call mcp_client.configure() at startup (fix ACCESS DENIED)
- conductor skill files: enforce run_powershell over Bash, tool use hierarchy
- CLAUDE.md: document Bash unreliability on Windows, run_powershell preference
2026-02-28 15:00:05 -05:00

3.5 KiB

description
description
Execute a conductor track — follow TDD workflow, delegate to Tier 3/4 workers

/conductor-implement

Execute a track's implementation plan. This is a Tier 2 (Tech Lead) operation. You maintain PERSISTENT context throughout the track — do NOT lose state.

Startup

  1. Read conductor/workflow.md for the full task lifecycle protocol
  2. Read conductor/tech-stack.md for technology constraints
  3. Read the target track's spec.md and plan.md
  4. Identify the current task: first [ ] or [~] in plan.md

If no track name is provided, run /conductor-status first and ask which track to implement.

Task Lifecycle (per task)

Follow this EXACTLY per conductor/workflow.md:

1. Mark In Progress

Edit plan.md: change [ ][~] for the current task.

2. Research Phase (High-Signal)

Before touching code, use context-efficient tools IN THIS ORDER:

  1. py_get_code_outline — FIRST call on any Python file. Maps functions/classes with line ranges.
  2. py_get_skeleton — signatures + docstrings only, no bodies
  3. get_git_diff — understand recent changes before modifying touched files
  4. Grep/Glob — cross-file symbol search
  5. Read (targeted, offset+limit only) — ONLY after outline identifies specific ranges

NEVER call Read on a full Python file >50 lines without a prior py_get_code_outline call.

3. Write Failing Tests (Red Phase — TDD)

DELEGATE to Tier 3 Worker — do NOT write tests yourself:

uv run python scripts\claude_mma_exec.py --role tier3-worker "Write failing tests for: {TASK_DESCRIPTION}. Focus files: {FILE_LIST}. Spec: {RELEVANT_SPEC_EXCERPT}"

Run the tests. Confirm they FAIL. This is the Red phase.

4. Implement to Pass (Green Phase)

DELEGATE to Tier 3 Worker:

uv run python scripts\claude_mma_exec.py --role tier3-worker "Implement minimum code to pass these tests: {TEST_FILE}. Focus files: {FILE_LIST}"

Run tests. Confirm they PASS. This is the Green phase.

5. Refactor (Optional)

With passing tests as safety net, refactor if needed. Rerun tests.

6. Verify Coverage

Use run_powershell MCP tool (not Bash — Bash is a mingw sandbox on Windows):

uv run pytest --cov=. --cov-report=term-missing {TEST_FILE}

Target: >80% for new code.

7. Commit

Stage changes. Message format:

feat({scope}): {description}

8. Attach Git Notes

$sha = git log -1 --format="%H"
git notes add -m "Task: {TASK_NAME}`nSummary: {CHANGES}`nFiles: {FILE_LIST}" $sha

9. Update plan.md

Change [~][x] and append first 7 chars of commit SHA:

[x] Task description. abc1234

Commit: conductor(plan): Mark task '{TASK_NAME}' as complete

10. Next Task or Phase Completion

  • If more tasks in current phase: loop to step 1 with next task
  • If phase complete: run /conductor-verify

Error Handling

If tests fail with large output, delegate to Tier 4 QA:

uv run python scripts\claude_mma_exec.py --role tier4-qa "Analyze this test failure: {ERROR_SUMMARY}. Test file: {TEST_FILE}"

Maximum 2 fix attempts. If still failing: STOP and ask the user.

Deviations from Tech Stack

If implementation requires something not in tech-stack.md:

  1. STOP implementation
  2. Update tech-stack.md with justification
  3. Add dated note
  4. Resume

Important

  • You are Tier 2 — delegate heavy implementation to Tier 3
  • Maintain persistent context across the entire track
  • Use Research-First Protocol before reading large files
  • The plan.md is the SOURCE OF TRUTH for task state