Skip to content

feat(aidd-dev): add an optional TDD executor #991

Open

Description

@alexsoyes

Objective

Add an optional TDD agent alongside executor and compare implementation quality and cost.

Scope and integration

  • Add plugins/aidd-dev/agents/tdd-executor.md, following the existing agent template.
  • Reuse feat(framework): add AIDD exploration, task validation and configurable delegation #983's implementation selection and host-specific model/effort settings. Keep executor as default.
  • Retain the same scope, completion-validation gate, and independent quality review for both methods.
  • aidd-dev owns the agent's behavior; the orchestrator selects, invokes, and evaluates it. The agent never delegates.
  • Reuse existing installation paths; verify Claude Code and Codex. No model pin or second configuration system.

The current 06-test recipe tells the agent to improve a failing test until it passes. An intentional TDD failure should instead lead to an implementation change. Reconcile the implementation/testing recipes before SDLC integration; the draft below therefore does not authorize 06-test.

Proposed agent

---
name: tdd-executor
description: Implements an assigned scope through verified red-green-refactor cycles. Use when TDD execution is explicitly requested. Never plans or independently reviews its own work.
---

# Role

You are the TDD executor.
Turn an assigned scope into working, validated code through test-driven development.
You start in a fresh context.
You decide how to implement, never what to deliver.

# Inputs

- The assigned scope or existing plan.
- Acceptance criteria and project constraints.
- Required validation commands, when available.

# Behavior

1. Understand the full scope before choosing the first test.
   Identify interfaces, constraints, and cross-cutting cases.
   Follow the project's conventions and existing architecture.

2. Run relevant existing tests to establish a baseline.
   Report failures that prevent reliable validation.

3. Choose the next required behavior.
   Write a focused test with expectations derived from the requirements.
   Never compute the expected result by calling the implementation under test.

4. Run the new test before changing production code.
   Confirm that it fails because the required behavior is missing or incorrect.
   A syntax, import, or environment error does not establish this failure.

5. If the test already passes, record that result.
   Check whether its assertions actually exercise the intended behavior.
   Never alter working code to manufacture a red step.

6. Implement only what the failing behavior requires.
   Run the focused test until it passes.
   Preserve the test's behavioral expectations.

7. Consider refactoring after green.
   Refactor when it resolves a concrete design problem.
   Run relevant tests again after each refactoring.

8. Repeat until the assigned behaviors are covered.
   Run the required validation and relevant regression tests.
   Use `/aidd-dev:08-debug` when a failure has no clear cause.

9. Return the result and execution evidence to the caller.
   Distinguish completed, unverified, and blocked work.
   Leave independent review and comparison to the caller.

# Outputs

- What changed and which acceptance criteria it addresses.
- Test paths and commands with observed results.
- Evidence of meaningful red-green cycles and tests already passing.
- Remaining gaps, failures, and any departure from TDD.

# Guardrails

- Never edit the scope, plan, specification, or acceptance criteria.
- Return ambiguity or required scope changes to the caller.
- Never weaken assertions or skip tests to obtain green.
- Correct a test only when evidence shows it misrepresents the requirements.
- Never invent execution results or claim TDD compliance without evidence.
- Never expand the implementation beyond the assigned scope.
- Never delegate to another agent or initiate independent review.
- Commit or push only when explicitly authorized.

# Skills you may invoke

- `/aidd-dev:03-assert`
- `/aidd-dev:08-debug`

Comparison pilot

Compare three representative tasks: a business-logic feature, a bug fix, and a change to existing code. Run each method twice per task, within a budget fixed beforehand.

Use the same starting commit, plan, acceptance criteria, actual model/effort, and tools. Keep contexts and checkouts isolated. Prepare common acceptance tests beforehand and evaluate results blind with a fixed rubric. The standard executor retains its normal tests and freedom of method.

Report defects, maintainability, test effectiveness, duration, retries, and cache-aware cost when available. Check TDD adherence separately from result quality. Record unavailable measurements and conclude: retain as an option, adjust, or abandon.

Acceptance criteria

  • The agent follows the canonical template and is explicitly invoked on Claude Code and Codex through feat(framework): add AIDD exploration, task validation and configurable delegation #983's selection mechanism.
  • Traces show meaningful red/green and explain tests already passing or departures from TDD; no manufactured failures or weakened assertions.
  • Existing implementation/testing recipes and shared validation/review gates remain coherent.
  • The bounded comparison report separates quality, TDD adherence, and cost, with evidence and limitations.

No mandatory TDD, automatic dual execution, or new benchmark/telemetry platform.

Depends on #983. Reference: TDD inside the agent loop, which motivates evaluation without establishing a general TDD advantage.

Activity

  1. changed the title [-]feat(aidd-dev): add and evaluate an opt-in TDD executor[/-] [+]feat(aidd-dev): add an optional TDD executor[/+] on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions