sd0x-harness
sd0xdev · sd0xdev/sd0x-harness
Plugin Claude Code với hơn 100 skill, agent và hook ép các bước review và xác minh hoàn thành, có bản chỉ cài skill cho Codex, Cursor và các công cụ khác.
The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and fail-closed safety where it counts. Quality gates that AI can't skip.
Xem trước
Bạn có thể làm gì với nó
- Yêu cầu Codex review độc lập trước khi một tác vụ được coi là xong
- Tự nhận diện cấu hình dự án và cài rule, hook bằng /project-setup
- Giữ nguyên các cổng chất lượng ngay cả sau khi ngữ cảnh bị nén
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
sd0x-dev-flow
Language: English | 繁體中文 | 简体中文 | 日本語 | 한국어 | Español
The harness layer for Claude Code.
Let the model choose the path. Keep "done" verifiable.
Claude has discretion inside a closed, test-pinned anchor set. Since v5 only a small rule core loads at launch, and the detailed procedures load when their situation arises. Hooks are digest-bound reminders that survive compaction, and Codex reviews independently.
Full control plane on Claude Code. Skills-only distribution for Codex CLI and other compatible agents.
102 bundled · 102 public skills · 16 agents — procedures load on demand
Quick Start
# Claude Code — full control plane
/plugin marketplace add sd0xdev/sd0x-harness
/plugin install sd0x-dev-flow@sd0xdev-marketplace
# Configure your project
/project-setup
One command auto-detects framework, package manager, database, entrypoints, and scripts. Installs a subset of rules and hooks; the full plugin bundles 16 rules + 7 hooks. Use --lite to only configure CLAUDE.md (skip rules/hooks).
# Codex CLI / Cursor / Windsurf / Aider — skills only
npx skills add sd0xdev/sd0x-harness
Then, inside Codex CLI, generate the AGENTS.md kernel and install the commit-msg hook. The pre-push gate is opt-in — add --with-push-gate to install it too:
$codex-setup init
| Method | Tools | Coverage |
|---|---|---|
| Plugin install | Claude Code | Full (102 bundled skills, hooks, rules, auto-loop) |
npx skills add | Codex CLI, Cursor, Windsurf, Aider | Skills only (102 public skills) |
$codex-setup init | Codex CLI | AGENTS.md kernel + commit-msg hook (pre-push gate opt-in) |
Requirements: Claude Code 2.1+ | Node.js 18+ | jq (pre-edit-guard and post-edit-format parse their hook payload with it — without jq both exit 0, so the sensitive-path guard and auto-formatting are silently off) | Codex CLI (optional to install the plugin; the default reviewer for the /codex-* review gates — on codex_fail — the adapter's start or resume exiting 1, and nothing else — the gate is carried by a contract-aware fallback reviewer under the same mechanism, fail-closed per family contract with [REVIEWER_FALLBACK] recorded; a missing adapter, a configuration error, an unfinished run, or an alloc/cleanup failure dispatches no fallback, records no marker and leaves the gate open, and only when every carrier is exhausted does the review surface ⚠️ Need Human instead of a verdict)
Codex exec setup
The review loop talks to Codex through codex exec, driven by a small adapter. There is no MCP
server to register: this plugin no longer dispatches through codex mcp-server.
1. In a shell — install the Codex CLI (>= 0.149.0) and sign in:
codex --version
2. In Claude Code — install the transport adapter into this project. This is a slash command, not a shell command; typed into a terminal it would try to run an absolute path:
/sd0x-dev-flow:install-scripts codex-exec.js
Step 2 is optional: the first review that needs the adapter auto-installs it, using the same
three-level lookup precommit-fast uses for its runner. Run it explicitly when you would rather the
install not happen inside a review.
Model and reasoning effort now live in a Codex profile, not on a registration command. Name one
in rules/auto-loop-project.md:
## Codex Profile
review
That name resolves to $CODEX_HOME/<name>.config.toml — the profile-v2 form codex exec -p layers
on top of your base user config (codex exec --help: "Layer $CODEX_HOME/<name>.config.toml on top
of the base user config"). So a review profile holding model_reasoning_effort = "high" gives the
review loop the depth the old -c override gave it, and leaves your interactive Codex sessions
alone. Leaving ## Codex Profile empty is fine: the adapter then passes no -p and Codex uses its
own default configuration.
The adapter pins the sandbox and the approval policy itself for every dispatch, so neither is a
setup decision — see skills/codex-code-review/references/codex-transport.md for the full contract.
Why v4
Frontier models can plan, batch, and recover from structured state — they no longer need the harness to dictate every next command. v4 moves from choreography to contracts: the harness stopped scripting the model's moves and started defining what must be true when the work is declared done, without relaxing a single safety or review anchor.
| Dimension | v3 (choreography) | v4 (contracts) |
|---|---|---|
| Hook role | Emit the next command to run | Print reminders + [AUTO_LOOP_STATE] facts — change class, per-plane verdict state |
| Completion | Scripted step sequence ("fix → immediately re-review") | Terminal completion invariant: every gate the change class requires has passed after the last edit |
| Rule force | Uniform — every rule reads as mandatory | Three tiers: Anchor (never), Default (deviate with a stated signal), Guidance (advisory) |
| Review depth | Maximum by default | Risk-scaled tiers (fast / standard / thorough); security and data integrity always escalate |
| Stall detected / round cap hit | Hand off to the human | First hit: structured self-diagnosis + one bounded adjustment, then resume — unless a human exit applies (security/data-integrity, architecture-level change, requirement ambiguity); the same change hitting the cap again after its diagnosis: always human |
The non-negotiable core lives in a closed Anchor Register (rules/discretion.md) that no project override can downgrade — resolution is Anchor-first, and a test suite fails by design if a Register entry is removed. Inside that boundary, ownership is explicit:
| Owner | Owns |
|---|---|
| Model | Batching, |