~/codigoagente
AI agents

The daily ECC workflow: /plan, TDD, code review and build-fix on a real project

At the end of the article you'll find the install command, a ready-to-paste prompt and a .md to download.

The daily ECC workflow in Claude Code has four steps: /ecc:plan so the agent proposes a plan and waits for your confirmation, the tdd-workflow skill to implement with failing tests first, /ecc:code-review so a fresh-context reviewer hunts for bugs, and /build-fix when something will not compile. We ran it on a small Node API: 19 green tests and a review with 9 findings.

This is part 3 of the complete ECC guide. If you do not have it yet, start with part 2: installing ECC without duplicates. Below is each step with its real output, how long it took and what it cost in tokens, so you know what to expect on your own project.

The test project

We started from tienda-api, a 7-line node:http server with a single GET /products endpoint and an in-memory catalog (a 15 t-shirt and an 8 mug). No framework, no dependencies, no tests: a typical prototype.

The task: add POST /orders, which creates an order from existing products and computes the total.

Setup: Claude Code 2.1.329 with ECC 2.2.3 loaded as a plugin (--plugin-dir), the Sonnet model and non-interactive mode (claude -p) so the test is repeatable. The prompts were in Spanish, which is why the screenshots are in Spanish. Date: November 20, 2026.

Step 1: /ecc:plan before touching code

snippettext
/ecc:plan "Add a POST /orders endpoint that creates an order from existing products and computes the total"

The command's definition is explicit: restate requirements, look for patterns in the code, split the work into phases, assess risks and wait for your confirmation before writing anything. It did exactly that:

The /ecc:plan output: requirements, phases, risks and the decisions it assumed · codigoagente

The phases were not the most useful part. Two blocks were:

  • Risks: it spotted that a client could send its own price and decided to compute the total from the server-side catalog only. It also proposed a body size limit (413).
  • Assumed decisions: merge lines with the same productId, return 422 when a product does not exist, split app.js from server.js to make it testable. It lists them so you can push back.

It took 56 seconds. The CLI reported a cost of 0.37 USD (API pricing, Sonnet).

This is the step that saves the most: fixing a decision in the plan costs one line; fixing it in code costs an afternoon.

Step 2: implement with tdd-workflow

We answered the plan with:

snippettext
yes. Implement the plan following the tdd-workflow skill (failing test first, then code). Run npm test at the end and summarize which tests passed.

The tdd-workflow skill enforces RED → GREEN → REFACTOR. The agent:

  1. Refactored first with no behavior change: app.js with createApp() and server.js down to 2 lines.
  2. RED: wrote orders.test.js with node:test. Without order logic, 2 tests passed (the /products and 404 regressions) and 17 failed.
  3. GREEN: implemented readJson, buildOrder and the route. All 19 passed.
  4. Measured coverage: 98.5% of lines and branches; only the catch returning 500 was left uncovered.
npm test after the implementation: 19 out of 19 · codigoagente

These are not filler tests: they cover that a client-sent price is ignored, quantities of 0, negative, decimal or text, empty items, invalid JSON, a body over 100 KB and GET /orders (405).

It took 73 seconds and the CLI reported 0.64 USD.

One honest detail: the skill recommends checkpoint commits after RED and after GREEN, and the agent did not make them because we did not ask. If you want that history, say so in the prompt.

Step 3: /ecc:code-review with a fresh context

In a new session (empty context, no idea how the code was written):

snippettext
/ecc:code-review

With no arguments it reviews uncommitted changes: it lists files with git diff, reads them in full and looks for security issues (critical) first, then quality.

The reviewer found nothing critical, but 4 medium and 5 low findings · codigoagente

Result: no critical or high issues, so nothing blocks the commit. But it caught things the writing agent missed:

  • req.url is compared verbatim, so /products?x=1 returns 404. It suggests new URL(req.url, 'http://x').pathname.
  • The 404 answers in plain text while every other error is JSON.
  • After a 413 the rest of the body is not drained and no Connection: close is sent: the socket may stay open.
  • The orders array grows without bound in a long-running process.
  • Missing tests for decimal rounding and for null or [] bodies.

It took 25 seconds and cost 0.31 USD. Note: in this session we did not allow it to run npm test, and it said so up front ("this review is from reading the code only"). Give it permission and it runs them.

To compare with other reviewers, we have tested Alibaba's Open Code Review and the implement and code-review skills.

Step 4: /build-fix when it will not compile

Our API had no broken build, so we did not force one. Per its definition, it:

  1. Detects the build system: npm run build or pnpm build if there is a script, npx tsc --noEmit for TypeScript, cargo build, go build ./..., mvn compile, ./gradlew compileJava or mypy ..
  2. Groups errors by file and fixes them one at a time with the smallest change, rebuilding after each fix.
  3. Leaves architecture alone: the build-error-resolver agent is told not to make large changes just to get green.

It is the command you reach for after a dependency bump leaves you with 40 type errors.

What the full loop costs and how long it takes

StepTimeCost reported by the CLI
`/ecc:plan`56 s0.37 USD
Implementation with `tdd-workflow`73 s0.64 USD
`/ecc:code-review`25 s0.31 USD
**Total****2 min 34 s****1.32 USD**

These are API prices with Sonnet on a small task. On a Pro or Max subscription you do not pay per token, but it uses your quota. On a bigger task the plan and review grow little; implementation is what scales.

Common mistakes

  • Skipping the plan. If you ask for code directly, ECC will not force a plan. Put it in your CLAUDE.md: "use /ecc:plan before any new feature".
  • Reviewing in the same session. The point of /ecc:code-review is the fresh context. Open a new session or run /clear first.
  • Asking for TDD without naming the skill. "Do it with tests" is not the same as "follow tdd-workflow": the skill fixes the RED → GREEN order and the 80% coverage target.
  • Using /tdd or /verify. In v2.2 those shortcuts moved to legacy-command-shims/. Use the tdd-workflow and verification-loop skills.

FAQ

Does it work with prompts in other languages? Yes. We gave the task in Spanish and the plan came back in Spanish.

Can I use the loop without installing all of ECC? Yes: the selective installer can copy just tdd-workflow, security-review and the commands you use (--skills tdd-workflow,security-review).

What if I do not like the plan? Answer modify: [changes]. The command is built to iterate on the plan until you reply yes.

Conclusion

ECC's workflow does not make the agent smarter; it makes it more orderly. Planning first, testing before implementing and reviewing from another session found 9 things to improve in code that already passed 19 tests. Start tomorrow with /ecc:plan on your next task. In part 4 we go through ECC's 72 agents and which to use for your stack.

// resource · use it now

ECC's plan → TDD → review loop, ready to paste

With ECC installed as a plugin (`ecc@ecc`), paste the prompt that fits your project. Works with Claude Code 2.1 or newer.

Repository license: MIT

1. Install

Plugin via guided setup
npx ecc-universal@2.2.3 setup
Only the loop pieces (installer from the repository)
git clone https://github.com/affaan-m/ECC.git && cd ECC && npm install
./install.sh --target claude --skills tdd-workflow,security-review

2. Pick your case

Paste this prompt into your agent
We are building this feature with the ECC workflow: <describe the feature>.

1. Run /ecc:plan with that description. Show me requirements, phases, risks and the decisions you assume, and wait for my "yes" or "modify".
2. Once I approve, implement with the tdd-workflow skill: failing tests first (tell me how many fail), then minimal code until green, then refactor.
3. Commit after RED and after GREEN using Conventional Commits.
4. Run the tests at the end and report coverage.
5. Do not add dependencies without asking me.

3. How to use it

  1. Paste the prompt and read the plan carefully: fix any decision you dislike there.
  2. Approve with yes.
  3. When it finishes, open a new session and run /ecc:code-review.
Prompt and short guide in one fileRepositoryaffaan-m/ECC

Help us grow

codigoagente is free, with no paywalls. If this article helped you, any of these keeps the blog going.

// newsletter

One email a week with the repos worth your time

The week's new articles, tested against real code. No spam; unsubscribe in one click.

rea-video is an Apache-2.0 skill that breaks a video down shot by shot: filmed, AI or code, voice, music, captions and how to remake it. Real test and costs.
  • Skills for your agents
  • Claude Code
read article
AI agents

guide · Marketing psychology guide for AI agents · #3

Part 3 of the guide: anchoring, decoy, paradox of choice, Hick's Law and activation energy applied to the pricing page, with examples from the codigoagente kit.
  • Skills for your agents
  • Claude Code
read article
AI agents

guide · Marketing psychology guide for AI agents · #2

Part 2 of the guide: authority, commitment, real scarcity and framing with the marketing-psychology skill, with real before/after fragments from codigoagente.
  • Skills for your agents
  • Claude Code
read article