wjttc-builder – skill Lập trình cho agent AI
LẬP KẾ HOẠCH và TẠO bộ test WJTTC (đẳng cấp vô địch) cho mọi dự án. Phân tích codebase, phân loại thành phần theo năm tầng WJTTC (Brake · Engine · Aero · Tyre · Pit), viết kế hoạch test theo tầng và khởi tạo các file test có thể chạy.
Cài skill wjttc-builder bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/wjttc-builder-089ae.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /wjttc-builder – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/wjttc-builder-089ae.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $wjttc-builder – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/wjttc-builder-089ae.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /wjttc-builder – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/wjttc-builder-089ae.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /wjttc-builder – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
WJTTC Builder - Championship Test Suite Generator
Philosophy: "We break things so others never have to know they were broken."
This skill generates F1-inspired test suites following the WJTTC (Wolfe James Tests The Code) methodology.
GOALS
| Goal | How |
|------|-----|
| Pre-defined | Test plan before code → improves code quality |
| Inline Testing | Tests/approves at write time → catches bugs at inception |
| Layer 1 → Layer 2 | Industry + Expert = GOLD Code |
| AI Optimized | 100% bi-sync with project.faf |
| Best Code Possible | ✪ Championship standard |
GOLD Code ✨
Code earns GOLD status when:
┌────────────────────────────────────────┐
│ ✪ GOLD CODE ✨ │
│ ════════════════════════════════════ │
│ ✓ Pre-test plan defined │
│ ✓ Inline testing at write time │
│ ✓ Layer 1: 100% industry coverage │
│ ✓ Layer 2: WJTTC expert edge cases │
│ ✓ Bi-sync with project.faf │
│ ✓ All tests passing │
│ ════════════════════════════════════ │
│ This code has earned its name. │
└────────────────────────────────────────┘Position in Development Pipeline
WJTTC comes AFTER project.faf, BEFORE coding:
1. project.faf → Define WHAT we're building (context)
2. WJTTC-TESTS.md → Define SUCCESS CRITERIA (tests first)
3. Code → Build to pass the tests
4. Test → Pass/Fail
5. Repeat → Until Championship gradeTest-Driven Code (TDC)
The WJTTC Cycle:
Think → Cross-check → Confirm → Code → Test → [Repeat]
│ │ │ │ │
│ │ │ │ └── Pass/Fail verdict
│ │ │ └── Write implementation
│ │ └── Green light to proceed
│ └── STOP if missing info - get it first
└── Understand what we're buildingCross-check Gate: STOP if missing information. Get it before proceeding.
- Missing requirements? Ask.
- Unclear acceptance criteria? Clarify.
- Unknown edge cases? Define them.
Red → Green → Refactor:
1. Write failing test (RED)
2. Write code to pass (GREEN)
3. Clean up (REFACTOR)
Never code without knowing what "done" looks like.
Two-Layer Testing Architecture
Layer 1: Industry Standard (100% Coverage)
Use the framework's native testing - Jest, pytest, Vitest, etc.
- Unit tests
- Integration tests
- Standard assertions
- Coverage requirements
Coverage goals are project-specific and must be approved;100% code coverage does not mean all behaviors are tested.
Layer 2: WJTTC Expert (Stress + Edge Cases)
The championship layer that catches what industry tests miss:
| Category | What We Test |
|----------|--------------|
| Syntax | Special chars, escapes, quotes, brackets |
| Emoji | 🏎️ in strings, filenames, variables |
| Typecases | camelCase, snake_case, SCREAMING_CASE, mixed |
| Variables | Empty, null, undefined, MAX_INT, negative |
| Unicode | RTL text, combining chars, zero-width |
| Injection | SQL, XSS, command injection attempts |
| Boundaries | 0, 1, -1, MAX, MAX+1, empty array |
Test Targets:
- MCP servers and tools
- CLI commands and flags
- API endpoints and payloads
- Engine internals
- Infrastructure configs
We Test the Testing
Meta-testing checklist:
- [ ] Do the tests actually run?
- [ ] Do they fail when code is broken?
- [ ] Do they pass when code is correct?
- [ ] Are edge cases covered?
- [ ] Can tests be run in isolation?
- [ ] Do tests clean up after themselves?
Signal Integrity Audit (The Red-Means-Real Doctrine)
Before you measure coverage, measure signal trust.
Red CI is a contract: stop, look, fix. If red means *"shrug, runner had a noisy neighbor, just rerun,"* the signal is dead — and dead signal is worse than no signal at all. A test suite with 100% coverage but flaky reds is less trustworthy than one with 80% coverage and zero false alarms, because the team has stopped reading the reds.
This is the parent doctrine. Every other testing principle serves it.
The Audit
For any test suite under review, classify the last 30 days of CI failures into three buckets:
| Bucket | Meaning | Action |
|--------|---------|--------|
| Real bug | Red corresponded to an actual code defect that was fixed by a code change | ✓ Signal worked |
| Flake | Failure suspected to be nondeterministic; rerun success alone does not distinguish a flaky test from a real intermittent product defect | ✗ Test design defect |
| Infra | Red was missing secret, runner image change, dep upstream — not the code under test | ✗ Workflow design defect |
Signal Integrity Score
SI = (Real bugs) / (Real bugs + Flakes + Infra) × 100| SI % | Verdict | Required Action |
|------|---------|-----------------|
| 100% | TROPHY ✪ | Maintain — exemplary signal |
| 95-99% | Championship | Annotate any flake immediately |
| 85-94% | Acceptable | Schedule flake-class fix this sprint |
| 70-84% | Eroding | Stop adding tests; fix flakes first |
| <70% | DEAD SIGNAL | Block all merges until signal restored |
The credibility problem precedes the coverage problem. A suite at 60% coverage with 100% SI is healthier than one at 95% coverage with 70% SI.
Common Flake Sources to Eliminate on Sight
- Hard absolute-time perf assertions on shared CI runners —
expect(time).toBeLessThan(30). Move to non-gating workflow withcontinue-on-error: true. - Network-dependent tests in main suite — mock at the boundary or route to integration tier.
- Concurrency tests without explicit ordering — use deterministic schedulers.
- OS scheduler-dependent timing — replace with statistical (P95 over N) or relative (vs same-run baseline) assertions.
- Secret-dependent steps — skip only explicitly optional checks; required deployment/security gates must fail closed or remain blocked when prerequisites are absent.
The Inverse Rule
Green CI that passes when something is broken is equally a contract violation. If a real bug shipped despite green CI, that's a coverage gap that demands a regression test BEFORE the fix lands. Treat false negatives with the same urgency as false positives.
When the Conversation Is the Real Gate
Automated CI is supporting infrastructure. Human review complements the project's mandatory automated gates; conversation cannot replace required CI or protected approval. Flaky CI wastes the conversation's bandwidth. Signal Integrity exists to keep CI worthy of the conversation it serves.
When to Use This Skill
- AFTER defining project.faf context
- BEFORE writing any implementation code
- When starting a new feature (define tests first)
- When fixing a bug (write failing test first)
- Building regression test suites
Test Tier System — the WJTTC Five
WJTTC has five tiers: Brake · Engine · Aero · Tyre · Pit. The builder classifies every component into one of them. (faf wjttc audits a suite for the same five and flags untiered tests — name your tests with a tier word so the audit can place them.)
Tier 1: BRAKE (Safety — Critical)
When failure = catastrophic consequences
Identify and test:
- Security vulnerabilities (auth bypass, injection, XSS)
- Data loss or corruption risks
- Payment/financial processing
- API key/credential exposure
- Backup/restore functionality
Tier 2: ENGINE (Core Functionality)
When failure = poor experience or incorrect results
Identify and test:
- Core API endpoints
- Data transformations
- Business logic accuracy
- Integration points
- Performance benchmarks
Tier 3: AERO (Polish)
When failure = minor inconvenience
Identify and test:
- UI/UX edge cases
- Error message formatting
- Optional features
- Documentation accuracy
Tier 4: TYRE (Live — the Real Road)
Where the rubber meets the road: durability under real conditions over time
Identify and test:
- Edge cases and boundary inputs against the real surface (live data shapes, large payloads)
- Wear and durability — long-running sessions, repeated calls, soak/load behavior
- Degraded conditions — slow networks, partial data, rate limits, retries
- Resource leaks (memory, file handles, connections) under sustained use
Tier 5: PIT (Operational — When Needed)
The pit stop: getting it onto the track and keeping it serviceable
Identify and test:
- Integration and end-to-end wiring across components
- Deploy / release checks (build, packaging, smoke tests, migrations)
- Ops health — startup/shutdown, config loading, secrets present, observability
- Rollback and recovery paths
Test Suite Generation Process
Step 1: Analyze the Project
To understand what to test:
1. Read key files (package.json, main entry points, API routes)
2. Identify the project type (web app, CLI, API, library)
3. List all public interfaces (APIs, functions, UI interactions)
4. Note external
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- wjttc-tester – Bộ THỰC THI test lấy cảm hứng từ F1, kiêm báo cáo. Chạy kế hoạch test, tìm và tái hiện…
- woo-guard – Rà soát các tiện ích WooCommerce được tạo hoặc thay đổi, tích hợp thanh toán và vận…
- wordpress-penetration-testing – Đánh giá các bản cài đặt WordPress về lỗ hổng phổ biến và giới hạn quyền REST của…
- wordpress-plugin-development – Quy trình phát triển plugin WordPress gồm kiến trúc plugin, hooks, giao diện quản trị…
- wp-guard – Rà soát các plugin, theme và block WordPress được tạo mới hoặc thay đổi về bảo mật, quốc…
- wp-site-health-auditor – Biến báo cáo Site Health của WordPress thành kế hoạch khắc phục theo mức rủi ro, ưu tiên…
- yes-md – Quản trị AI 6 lớp: cổng an toàn, gỡ lỗi dựa trên bằng chứng, phát hiện hành vi làm việc…
- zapier-make-patterns – Xây dựng quy trình tự động không cần code trở nên dễ dàng. Zapier và Make (trước đây là…