← Back to Blog
Product

Your AI Agent Now Follows TDD Without Being Asked

·3 min read
productpersonaspersonaprotocolskillstddv0.14.8

The Gap

Yesterday we shipped Persona Protocol — portable AI agent identities with bundled skills. The coder persona came with TDD, debugging, and code review methodology.

But there was a gap. Type build TaskPilot and the agent just... coded. No tests first. No methodology. The skills were there, but the agent didn't use them unless you explicitly typed /tdd build TaskPilot.

A persona that knows TDD but doesn't follow it isn't a TDD engineer. It's a developer with an unread book on the shelf.

The Fix

Aii CLI v0.14.8 closes the gap. Type build TaskPilot with the coder persona active:

text
> build TaskPilot

Skill /tdd activated

● I'll build TaskPilot following TDD principles...
● Read(AGENTS.md)
● Write(tests/models/task.test.ts (157 lines))
● Bash(npm test) — FAIL (expected)
● Write(src/models/task.ts (42 lines))
● Bash(npm test) — PASS

No /tdd prefix. No setup. The agent recognized "build TaskPilot" as a software development request, matched it to the TDD skill from the active persona, and activated the full methodology automatically.

The project had an AGENTS.md file defining what to build — the agent read it, then followed TDD to implement it:

markdown
# AGENTS.md — TaskPilot

**TaskPilot** is a CLI task board tool — a local, file-based Trello
from the terminal. TypeScript, strict mode, zero external dependencies
beyond Commander.js.

## Commands
taskpilot add "title" [--priority high] [--tag backend]
taskpilot list [--status todo] [--tag backend]
taskpilot move <id> <status>
taskpilot done <id>
taskpilot stats
taskpilot remove <id>

## Data Model
interface Task {
  id: number;
  title: string;
  status: 'todo' | 'doing' | 'review' | 'done';
  priority: 'low' | 'medium' | 'high';
  tags: string[];
  createdAt: string;
  updatedAt: string;
}

## Development Rules
- TDD: Write the failing test FIRST, then implement. No exceptions.
- TypeScript strict: No `any` types.
- No over-engineering: No database, no config file, no plugin system.

Two inputs. One project spec (AGENTS.md), one command (build TaskPilot). The persona handled the rest.

How It Works

The agent knows which persona is active and what skills it has. When you type build TaskPilot, the system recognizes this as a software development request and matches it to the coder persona's TDD skill — automatically.

Different inputs trigger different skills based on the active persona:

text
| You type                   | Coder           | Doer            | Thinker         |
| -------------------------- | --------------- | --------------- | --------------- |
| "build TaskPilot"          | `/tdd`          | `/tdd`          | `/brainstorm`   |
| "fix the login bug"        | `/debug`        | `/debug`        | —               |
| "review this code"         | `/code-review`  | —               | —               |
| "design a caching system"  | —               | —               | `/brainstorm`   |

The matching is intent-based, not keyword-based. You don't need to say "tdd" — the system understands that building software means writing tests first.

You can always type /tdd build TaskPilot explicitly to guarantee the full methodology loads. The auto-invocation is the smart default; the slash command is the override.

Works Across Models

Tested with models of different sizes — from local 20b models on Ollama to DeepSeek and GLM-4.7-Flash. Auto skill invocation works across providers. Larger models follow the methodology more strictly; smaller models get the intent right and do their best with the content.

Try It

bash
npm install -g @aiiware/aii

# Activate the coder persona
aii persona use aiiware/coder

# Just build — TDD activates automatically
> build TaskPilot

No configuration. No slash commands. The persona knows its methodology.

What's Next

The auto skill invocation infrastructure opens the door for smarter agent behavior. The classifier, the persona context, the skill matching — these are building blocks. The agent gets smarter with every persona skill you add.

Available today in Aii CLI v0.14.8.