HomeTrang chủ Quick startBắt đầu
Install, then run your first plan → cook → test → shipCài đặt, rồi chạy vòng đầu tiên: plan → cook → test → ship

Quick startBắt đầu

Linux · Python ≥3.9 · git · Claude Code
🧭
Personal-first — the local gate advises, it does not block you. This walkthrough runs the SDLC spine (plan · cook · test · ship). Locally the gate emits an [advisory] + a trace when an acceptance artifact is missing and lets you commit / push / ship straight through; the two safety floors (destructive-to-protected + secret) and the agent cage still hard-block. Quality is enforced for real at remote CI — the receipts-gate checks plan receipts on PR and push→main. No reviewer roster, no posture to choose. More on the overview.Personal-first — gate local khuyên, không chặn bạn. Mạch này chạy xương sống SDLC (plan · cook · test · ship). Ở local, gate phát [advisory] + trace khi thiếu artifact nghiệm thu rồi để bạn commit / push / ship thẳng; hai safety floor (destructive-to-protected + secret) và cũi agent vẫn chặn cứng. Chất lượng được ép thật ở remote CI — receipts-gate kiểm plan receipts trên PR và push→main. Không roster người duyệt, không phải chọn thế. Thêm ở tổng quan.

This page takes you from an empty repo to your first change shipped through the gate. Four steps: one in the shell (install), three in Claude Code (plan, build, ship). The whole walkthrough uses one worked example so the plan slug stays the same throughout. No package manager, no build step — requirements: Linux, Python ≥ 3.9, git, and Claude Code.Trang này đưa bạn từ một repo trống đến thay đổi đầu tiên được ship qua gate. Bốn bước: một bước ở shell (cài), ba bước trong Claude Code (plan, build, ship). Cả mạch dùng chung một ví dụ nên slug của plan giữ nguyên xuyên suốt. Không package manager, không bước build — yêu cầu: Linux, Python ≥ 3.9, git, và Claude Code.

Step 1 · shellshell

Install into your repoCài vào repo của bạn

Download the bundle and the standalone install.sh from the release into one folder. One command does it all: verify checksum → extract → check deps → install + verify → run the suite (skip with --skip-tests). No follow-up scripts to chain. Full walkthrough and options: the Install page.Tải bundle và install.sh độc lập từ bản release vào cùng một thư mục. Một lệnh làm tất: kiểm checksum → giải nén → kiểm deps → cài + verify → chạy bộ test (bỏ qua bằng --skip-tests). Không phải nối script. Hướng dẫn đầy đủ và tùy chọn: trang Cài đặt.

sh install.sh harness-<version>.tar.gz ../my-repo

Or run the installer directly from a clone. It copies harness/, merges hooks into .claude/settings.json additively (your own hooks survive), installs the pre-push gate, adds a .gitignore block for runtime state, then runs verify_install as the final gate. --non-interactive (alias --yes) is the CI path. Idempotent — preview with --dry-run, reverse with --uninstall. real outputHoặc chạy thẳng trình cài từ một clone. Nó copy harness/, gộp hook vào .claude/settings.json theo kiểu cộng thêm (hook của bạn vẫn còn), cài pre-push gate, thêm khối .gitignore cho trạng thái runtime, rồi chạy verify_install chốt cuối. --non-interactive (alias --yes) là đường CI. Idempotent — xem trước bằng --dry-run, gỡ bằng --uninstall. đầu ra thật

python3 harness/install/install.py --target ../my-repo
verify_install OK: manifest + hook registration consistent

After installing, enable the plugin with /reload-plugins in Claude Code. Full options: docs/deployment-guide.md; every config knob: harness/rules/config-reference.md.Sau khi cài, bật plugin bằng /reload-plugins trong Claude Code. Tùy chọn đầy đủ: docs/deployment-guide.md; mọi núm cấu hình: harness/rules/config-reference.md.

Step 2 · Claude CodeClaude Code

Plan your first taskLập plan cho task đầu tiên

In Claude Code, run /hs:plan and describe what you want. The harness researches, scans constraints, red-teams, and writes a plan under plans/<slug>/ (plan.md + phase files). You approve it — cook will not run until a human does. Then /clear so cook starts from a clean context. real outputTrong Claude Code, chạy /hs:plan và mô tả điều bạn muốn. Harness nghiên cứu, quét ràng buộc, red-team, rồi ghi plan dưới plans/<slug>/ (plan.md + file phase). Bạn duyệt — cook không chạy cho tới khi một con người duyệt. Rồi /clear để cook bắt đầu từ context sạch. đầu ra thật

In Claude Code:Trong Claude Code: /hs:plan add a token-bucket rate limit to the public API
tree plans/260612-1237-harness-w2-horizontal-1/
plans/260612-1237-harness-w2-horizontal-1/
  artifacts/verification.json
  phase-01-claims-fsm-team-config.md
  phase-02-task-store-adapter-github.md
  phase-03-plan-approval-role-check.md
  phase-04-write-guard-env-scrub-en-3.md
  phase-05-memory-gap-staged-port.md
  phase-06-telemetry-hooks-workflow-lens.md
  plan.md
  reports/code-review-260613-phase6-telemetry.md
  reports/from-code-reviewer-to-planner-red-team-maintainer-operator-plan-review-report.md
  reports/from-code-reviewer-to-planner-red-team-security-failure-plan-review-report.md
Step 3 · Claude CodeClaude Code

Build it — and write the acceptance artifactBuild — và ghi artifact nghiệm thu

Run /hs:cook with the absolute path to the approved plan. It executes phase by phase in TDD red→green, then on the final phase writes verification.json — the exact artifact the gate will look for. /hs:test can re-run the suite and refresh the verdict any time. real outputChạy /hs:cook với đường dẫn tuyệt đối tới plan đã duyệt. Nó thực thi từng phase theo TDD đỏ→xanh, rồi ở phase cuối ghi verification.json — đúng artifact mà gate sẽ tìm. /hs:test có thể chạy lại bộ test và làm mới verdict bất cứ lúc nào. đầu ra thật

In Claude Code:Trong Claude Code: /hs:cook /abs/path/plans/260612-1237-harness-w2-horizontal-1/plan.md
cat plans/260612-1237-harness-w2-horizontal-1/artifacts/verification.json
{
    "stage": "push",
    "plan": "260612-1237-harness-w2-horizontal-1",
    "actor": "user:dev@team.example",
    "ts": "2026-06-12T05:48:36.669571+00:00",
    "checks": [
        {
            "name": "preflight_deps",
            "status": "PASS",
            "detail": "pytest, pyyaml"
        },
        {
            "name": "pytest harness/tests",
            "status": "PASS",
            "detail": "258 passed (incl. 5 invariants)"
        },
        {
            "name": "schema load yaml+json",
            "status": "PASS",
            "detail": "yaml ok, schemas ok"
        },
        {
            "name": "verify_install --strict",
            "status": "PASS",
            "detail": "manifest 53 files"
        },
        {
            "name": "e2e vertical slice",
            "status": "PASS",
            "detail": "12 passed, 0 failed, transport=simulated-stdin"
        }
    ],
    "verdict": "PASS"
}
Step 4 · shellshell

Ship through the gateShip qua gate

Now push. If the artifact is missing, the pre-push gate blocks with exit 2 and names the exact path to create — never a dead end. Once Step 4 has written verification.json, the same push passes. That block-then-pass is the whole point. real outputGiờ push. Nếu thiếu artifact, pre-push gate chặn với exit 2 và nêu đúng đường cần tạo — không bao giờ là ngõ cụt. Khi Bước 4 đã ghi verification.json, chính lệnh push đó vượt qua. Chặn-rồi-vượt chính là cốt lõi. đầu ra thật

git push origin main
[gate_stage] BLOCKED: hard stage 'push' needs an active plan but none resolved. Three exits: (1) create a plan under plans/ with `status: in_progress` frontmatter; (2) set HARNESS_ACTIVE_PLAN to the plan dir; (3) set `require_plan: false` for this stage in harness/data/stage-policy.yaml (tracked in git)
[exit 2 — compliance hook fail-closed]
That's the loop. plan → cook → test → ship, with a gate that reads acceptance artifacts off the filesystem and fails closed. Watch the same change flow end to end in Journey, or learn each skill in depth: hs:plan · hs:cook · hs:test.Đó là vòng lặp. plan → cook → test → ship, với một gate đọc artifact nghiệm thu từ filesystem và fail-closed. Xem chính thay đổi đó chạy từ đầu đến cuối trong Journey, hoặc học sâu từng skill: hs:plan · hs:cook · hs:test.

Autonomy modes — pick your leashChế độ tự chủ — chọn mức kiểm soát

Set HARNESS_AUTONOMY before running any hs:* skill. All three modes still require the artifact gate at push/pr/ship — no mode auto-ships.Đặt HARNESS_AUTONOMY trước khi chạy skill hs:*. Cả ba mức đều qua artifact gate tại push/pr/ship — không mức nào tự ship.

Env varBiến môi trườngBehaviorHành vi
HARNESS_AUTONOMY=defaultRuns the phase chain; pauses at plan-approval and ship only.Chạy chuỗi phase; dừng tại duyệt plan và ship.
HARNESS_AUTONOMY=ask_allPauses after every phase — maximum human checkpoints.Dừng sau mỗi phase — nhiều chốt người nhất.
HARNESS_AUTONOMY=godNever pauses mid-chain — trace still records everything.Không dừng giữa chuỗi — trace vẫn ghi đủ mọi bước.

FAQHỏi đáp

Do I need a package manager or a build step?Có cần package manager hay bước build không?
No. The harness is a directory you clone into your repo — stdlib Python only. Requirements: Linux, Python ≥ 3.9, git, and Claude Code already installed.Không. Harness là một thư mục bạn clone vào repo — chỉ Python stdlib. Yêu cầu: Linux, Python ≥ 3.9, git, và Claude Code đã cài.
The gate blocked my push — how do I unblock it?Gate chặn push — làm sao mở?
Run the loop so the acceptance artifact exists: an approved plan (Step 3), then hs:cook writes verification.json (Step 4). The block message names the exact path to create — it's never a dead end.Chạy vòng lặp để artifact nghiệm thu tồn tại: plan đã duyệt (Bước 3), rồi hs:cook ghi verification.json (Bước 4). Thông báo chặn nêu đúng đường cần tạo — không bao giờ là ngõ cụt.
Will installing overwrite my existing .claude hooks?Cài có ghi đè hook .claude của tôi không?
No. Install merges hooks additively into .claude/settings.json — your own hooks survive. Preview with --dry-run, reverse with --uninstall. It's idempotent.Không. Cài gộp hook theo kiểu cộng thêm vào .claude/settings.json — hook của bạn vẫn còn. Xem trước bằng --dry-run, gỡ bằng --uninstall. Idempotent.
Why /clear between plan and cook?Vì sao /clear giữa plan và cook?
Planning carryover (research, debate, red-team) skews cook's focus. A clean context plus the absolute path to the approved plan keeps cook executing the contract, not re-litigating it.Dư âm khi lập plan (research, tranh luận, red-team) làm lệch trọng tâm của cook. Context sạch cộng đường dẫn tuyệt đối tới plan đã duyệt giúp cook thực thi hợp đồng, không cãi lại nó.
Does any of this hit the network?Có thứ gì gọi mạng không?
No — there are 0 network calls in the gate path, and the e2e runs in a temp dir. Even this showcase makes no external requests.Không — 0 lần gọi mạng trong đường gate, và e2e chạy trong thư mục tạm. Ngay cả showcase này cũng không gọi mạng.
Which autonomy mode should I start with?Nên bắt đầu với mức tự chủ nào?
default — it pauses at exactly two human checkpoints (plan approval + ship). No mode auto-ships, so it's a safe place to learn the loop.default — dừng ở đúng hai chốt người (duyệt plan + ship). Không mức nào tự ship, nên đây là chỗ an toàn để học vòng lặp.