Trellis Implement Tdd logo

Trellis Implement Tdd

Community
coldwateryi
trellis-implement-tdd

Implement a Trellis subtask using strict TDD (RED→GREEN→REFACTOR), turning acceptance criteria into code one by one. Used when Codex / Claude Code drives a small-parameter model like qwen3.6 35b—transforms "understand and implement requirements" into a mechanical "make this failing test green" loop with objective signals at every step.

Overview

Publishercoldwateryi
Repositorytrellis-skills
Skill nametrellis-implement-tdd
Stars
44
Forks
1
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by coldwateryi on GitHub. Read the source before you install it.

Installation

Install the Trellis Implement Tdd AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/coldwateryi/trellis-skills/tree/main/trellis-implement-tdd
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/coldwateryi/trellis-skills.git /tmp/trellis-skills
mkdir -p .claude/skills
cp -r /tmp/trellis-skills/trellis-implement-tdd .claude/skills/trellis-implement-tdd
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Trellis Implement Tdd in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Trellis Implement Tdd on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Trellis Implement Tdd is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Trellis TDD Implementation (RED-GREEN-REFACTOR)

Overview

Implement a planned Trellis subtask by going through its prd.md acceptance criteria (AC) one by one using TDD: write a failing test and see red, write minimal code and see green, run self-checks to confirm no regression, record progress, move to the next AC.

This skill is invoked by the orchestration session (main session, typically a strong model) to drive the implementation executor (which may be a small model like qwen3.6 35b). The flow is "held" by this skill; the executor only performs mechanically verifiable steps without needing to judge "am I done?"—test turns green = done.

Input: A subtask directory with status in-progress and dependencies satisfied (contains prd.md, may contain design.md, implement.md, implement.jsonl, check.jsonl). Output: Code changes passing tests + progress written back to <task-dir>/tdd-progress.md, without executing git commit (Trellis implementation executors forbid commit/push/merge).

Constraints

  • Do not write implementation code before a failing test. The first step for every AC is always writing a test that fails.
  • Only handle one AC at a time. Don't start the next AC until the current one turns green.
  • Do not judge "what the requirement is". Requirements are locked down by prd.md acceptance criteria, decision table, and contracts; executor's job is to make the corresponding test green.
  • Landing point is locked. Where new code goes is decided by prd.md file manifest + design.md orchestration-computation layering; don't decide on your own.
  • Do not touch files outside file manifest / forbidden list. When you need to touch other files, stop and report—don't spread modifications autonomously.
  • Do not execute git commit / git push / git merge. After completing an AC, only stage/record.
  • RED/GREEN signals are the only completion criteria. Test doesn't show red means test didn't capture the behavior—stop and fix the test, don't write implementation to "make it green".
  • When test should be green but stays red, or self-check command fails, switch to trellis-debug-systematic—don't trial-and-error in this loop.
  • If prd.md lacks executable test definitions or self-check commands (violates planning-phase quality gate), stop and report—ask to supplement planning artifacts first, don't force through.

Workflow

1. Load task context (must-read before editing)

Read in order, loading only "must-read-before-editing" stable context to control small-model context occupancy:

  1. Subtask prd.md: focus on Acceptance Criteria, Automated Tests Required, Reference Implementation, File Manifest, Decision Table, Behavior Constraints, Self-Check Commands, Forbidden.
  2. If implement.jsonl exists: pre-load each stable context item listed (spec / contract / research).
  3. If design.md exists: read Orchestration-Computation Separation and Mount Point Checklist sections to confirm each new code's landing point.
  4. If .trellis/spec/<relevant-layer> exists: read specs directly related to this task.

Before editing code, copy references/tdd-progress-template.md to <task-dir>/tdd-progress.md. This task-local file is the writable progress record; the template under the skill directory stays read-only.

Extract each AC-xxx from prd.md into a TODO test list, write to <task-dir>/tdd-progress.md.

2. Run RED-GREEN loop for each AC

For each AC in order, execute the loop from references/tdd-loop-protocol.md:

1. RED  ── Copy prd.md「Reference Implementation/Test Example」, write a test for AC-xxx asserting its expected observable result
2. See red ── Run the test, must see failure (objective evidence). No failure → test didn't cover behavior, go back to step 1 to fix test
3. GREEN ── Write "just enough to turn it green" minimal code; landing point per file manifest+orchestration layering, decisions per decision table, no free improvisation
4. See green ── Run the test again, see it pass (objective signal)
5. Self-check ── Run prd.md「Self-Check Commands」full set, confirm no breakage of already-green ACs (no regression)
6. Record ── Mark AC-xxx as done in `<task-dir>/tdd-progress.md`, stage changes (no commit)
7. Next AC

Any step fails and not obvious → trigger trellis-debug-systematic, fix, then return to the failed step and re-run.

3. Wrap-up self-check

After all ACs turn green:

  1. Run all prd.md self-check commands + project lint / type-check, all green.
  2. Check design.md Mount Point Checklist item by item to confirm wiring (route registration / config item / event subscription / DI binding, etc.), preventing "wrote implementation but didn't wire it".
  3. <task-dir>/tdd-progress.md shows all ACs as done, no remaining red lights.

4. Handoff to review

After implementation self-check all green, do not mark task complete on your own. Hand off to trellis-review-twostage for two-stage review; mark task complete only after review passes, via orchestration session.

Small-model adaptation highlights

  • Decisions left-shifted: Naming / branching / schema / landing points decided by strong model in planning phase, executor just mechanically copies.
  • Objective signal-driven: Each step's completion determined by test red/green / command exit code, not letting small model subjectively judge.
  • Narrow context: Only face one AC + one test at a time, naturally slicing context to minimum.
  • Role-layered model assignment: This skill drives implementation executor configured with small model (e.g. qwen3.6 35b); debugging beyond 3 rounds, review Stage 2 escalate to strong model (see trellis-review-twostage).

Reference files

  • references/tdd-loop-protocol.md —— Detailed RED-GREEN loop per AC, iron rules and anti-patterns, read before starting implementation.
  • references/tdd-progress-template.md —— Read-only template for <task-dir>/tdd-progress.md; update the task-local file throughout execution.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Trellis Implement Tdd AI skill do?

Implement a Trellis subtask using strict TDD (RED→GREEN→REFACTOR), turning acceptance criteria into code one by one. Used when Codex / Claude Code drives a small-parameter model like qwen3.6 35b—transforms "understand and implement requirements" into a mechanical "make this failing test green" loop with objective signals at every step.

Why use Trellis Implement Tdd on TypingMind?

Because you install it once and use it with any model. Trellis Implement Tdd is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Trellis Implement Tdd in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/coldwateryi/trellis-skills/tree/main/trellis-implement-tdd. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Trellis Implement Tdd?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Trellis Implement Tdd?

As many as you like. As long as a model supports skills, you can use Trellis Implement Tdd with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Trellis Implement Tdd AI skill free?

Yes. It is published on GitHub by coldwateryi under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇