Logo Trellis Implement Tdd

Trellis Implement Tdd

Cộng đồng
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.

Tổng quan

Nhà phát hànhcoldwateryi
Kho mãtrellis-skills
Tên kỹ năngtrellis-implement-tdd
Sao
44
Bản fork
1
Tệp đi kèm
3
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được coldwateryi công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Trellis Implement Tdd trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/coldwateryi/trellis-skills/tree/main/trellis-implement-tdd
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Trellis Implement Tdd trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Trellis Implement Tdd ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Trellis Implement Tdd không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Trellis Implement Tdd làm được gì?

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.

Vì sao nên dùng Trellis Implement Tdd trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Trellis Implement Tdd là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Trellis Implement Tdd trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/coldwateryi/trellis-skills/tree/main/trellis-implement-tdd. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Trellis Implement Tdd?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Trellis Implement Tdd với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Trellis Implement Tdd với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Trellis Implement Tdd có miễn phí không?

Có. Kỹ năng này được coldwateryi phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇