Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By thnhtusv0.17.6MIT
Spec-driven agent harness: 7 roles, 5 code-enforced gates (Gate 5 is an adversarial agent), AC traceability from spec to test evidence. Project-agnostic kernel + per-project adapter.
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Harness spec-driven cho CLI agent (Claude Code, Codex, Cursor và 13 CLI khác): 7 role, 5 gate, truy vết từng AC từ spec tới test evidence.
Gate chặn bằng exit code, không bằng lời nhắc. Prompt thì model có thể bỏ qua; exit code thì không.
Tách từ một harness đã chạy thật 240 task qua 17 sprint trên codebase production.
Cần Node 22+. Chạy trong repo code của bạn:
cd ~/code/my-app
git init # nên có trước: để cắm hook pre-commit
npx spec-harness # Claude Code
npx spec-harness --cli codex,cursor # thêm CLI khác (danh sách đầy đủ: docs/advanced.md)
Xem trước (không ghi gì): npx spec-harness --dry-run — liệt kê file sẽ tạo mới và file sẽ bị đè.
Nâng cấp: npx spec-harness@latest. Config bạn đã sửa được giữ nguyên.
[!WARNING]
npm i spec-harnesskhông cài harness — nó chỉ tải package vềnode_modules/. Luôn dùngnpx.
Mở CLI agent trong repo, rồi:
/init-project-rules # 1. dò repo, điền config cho project
node scripts/validate-tasks.mjs --preflight # 2. phải xanh trước task đầu tiên
/start-task <ticket-id> # 3. chạy task
Trên Codex/Cursor, gọi skill init-project-rules / start-task thay cho lệnh /.
Hai việc /init-project-rules không làm thay được:
.mcp.json: điền URL tracker (bắt buộc — là nguồn AC), git-host, design, browser; rồi /mcp để login.acTrace.since trong harness.config.json: ngày bật harness, để task cũ chỉ bị cảnh báo chứ không bị chặn.Mỗi task đi qua 7 role theo thứ tự; giữa các role là một gate. Gate trượt thì task quay lại, không đi tiếp.
| Role | Viết ra | Gate chặn khi |
|---|---|---|
orchestrator | task folder + độ phức tạp | — |
fsd-writer | 01-FSD.md | FSD thiếu / không truy vết được (Gate 1) |
fsd-reviewer | 02-FSD-Review.md (AC, câu hỏi BA) | AC mơ hồ, còn câu hỏi blocking (Gate 2) |
technical-planner | 03-Technical-Plan.md | thiếu plan / test, rơi AC (Gate 3) |
implementer / fixer | code + 08-Test-Evidence.md | thiếu evidence, ngoài scope (Gate 4) |
adversary | 09-Adversarial-Review.md | finding blocking, evidence không tái lập được (Gate 5) |
Hai điểm khác một bộ prompt có tổ chức:
git diff thật, và hỏi "đổi hằng số thì test có đỏ không".run-evidence.mjs sinh, gắn hash với output và với nội dung cây code lúc chạy: dán tay, chép từ task khác, hoặc sửa code sau khi chạy test đều bị chặn (trước khi push; không kiểm trong CI vì PR là merge-commit). Commit lại đúng nội dung cũ thì không bị tính là đổi. Giới hạn: agent cố tình tự gõ cả block vẫn qua được — đó là gian lận chủ động, gitRev + durationMs để adversary đối chiếu.Độ phức tạp (vector 8 chiều, validator tự tính lại) chỉ quyết định gate nặng hay nhẹ và dùng model nào — mức nào cũng đủ 5 gate. Task nhỏ thật sự thì đi đường tắt quick-task / fix-bug; ranh giới đó cũng do exit code quyết định.
Ngoài validator, harness cài sẵn một lớp permission:
| Lệnh | Hành vi |
|---|---|
git reset --hard, git stash, git clean, đọc .env | chặn |
git push | hỏi user, chỉ sau khi gate cuối đã qua |
Claude Code dùng permissions.deny / permissions.ask; các CLI khác dùng hook (--guard <cli>) và Codex dùng .codex/rules. Nhiều CLI tắt hook cho tới khi bạn trust project — installer in đúng bước cho CLI bạn chọn.
Guard khớp theo prefix lệnh: nó chặn tai nạn, không chặn người cố ý (bash -c "git push" vẫn lọt). Bảo vệ thật cho secret là không để chúng trong repo.
git pushgit push là quyền duy nhất có công tắc, vì nó khác bản chất với 4 cái còn lại: reset --hard/stash/clean/đọc .env phá dữ liệu git không trả lại được, nên không cấu hình được. git push thì có đường lùi (--force-with-lease, push lại) — team đã tự duyệt mọi push từ trước thì câu hỏi luôn là "có".
// harness.config.json
"git": { "push": "allow" } // mặc định "ask"; thiếu field cũng = "ask"
Chạy lại npx spec-harness sau khi đổi (regenerate .codex/rules). --preflight luôn in giá trị hiệu lực; một giá trị sai chính tả bị báo lỗi, không âm thầm giữ nguyên hay âm thầm tắt.
Jev là decision model của TypeSafe. Nó đọc artifact trước khi --advance gọi role kế tiếp; chỉ khi chắc chắn sai (FAIL, confidence ≥ 0.9) thì --advance mới chặn và trả task về role vừa bàn giao, bỏ qua một lượt dispatch (Gate 5: 54k–132k token).
Generated from the plugin's indexed repository (thnhtus/spec-harness) — no native marketplace selected
npx claudepluginhub p/thnhtus-spec-harnessBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground