InstallCài đặt
Installing is one command — you paste it, and nothing else. It downloads the latest release, verifies the checksum, extracts it, checks dependencies, installs into your repo, and verifies the wiring (--strict) — in that order, fail-fast at the first problem. No preflight to run first, no follow-up scripts to chain. Requirements: Python ≥ 3.12, git, and Claude Code.Cài đặt là một lệnh — bạn dán vào, hết. Nó tải bản release mới nhất, kiểm checksum, giải nén, kiểm phụ thuộc, cài vào repo, rồi xác nhận wiring (--strict) — theo đúng thứ tự đó, dừng ngay ở lỗi đầu tiên. Không phải chạy preflight trước, không script nối tiếp. Yêu cầu: Python ≥ 3.12, git, và Claude Code.
Install online — one lineCài online — một dòng
Run this from inside the repo you want the harness in. It resolves the latest release from GitHub, downloads the bundle, and installs it — you never touch a version number or a download link.Chạy ngay trong repo bạn muốn có harness. Nó tự tìm bản mới nhất trên GitHub, tải bundle, và cài — bạn không cần đụng tới số phiên bản hay đường tải nào.
Linux / macOSLinux / macOS
curl -fsSL https://hieubui2409.github.io/sdlc-harness-release/install.sh | shWindows (PowerShell)Windows (PowerShell)
irm https://hieubui2409.github.io/sdlc-harness-release/install.ps1 | iex--version=5.4.0 pins a release, -i / --interactive lists every release and previews its changelog before you confirm, and -n / --dry-run prints exactly what would be downloaded (URL + expected sha256) and installs nothing. To pass a flag through the pipe: curl -fsSL <url> | sh -s -- --interactive.Chọn phiên bản hoặc xem trước. Cùng một dòng nhận cờ: --version=5.4.0 ghim một bản, -i / --interactive liệt kê mọi bản và xem changelog trước khi bạn xác nhận, còn -n / --dry-run in đúng thứ sẽ tải (URL + sha256 kỳ vọng) và không cài gì. Muốn truyền cờ qua pipe: curl -fsSL <url> | sh -s -- --interactive.Watch one thing: the closing verify. After it copies harness/ and wires the hooks into .claude/settings.json (additively — your own hooks survive), the installer runs verify_install --strict as the final gate. A clean run ends with verify_install OK and exit 0. It is not silent: a fresh install prints ~12 WARN lines, and every one is expected — ten name a hook the shipped table disables whose entrypoint stays wired (it spawns and self-no-ops, costing a spawn and nothing else), and one names the config you are meant to localize. The verdict line is the proof, not the absence of warnings. real outputChỉ cần nhìn một thứ: verify chốt. Sau khi copy harness/ và gắn hook vào .claude/settings.json (cộng thêm — hook của bạn vẫn còn), trình cài chạy verify_install --strict làm gate cuối. Một lần chạy sạch kết thúc bằng verify_install OK và exit 0. Nó KHÔNG im lặng: bản cài mới in ~12 dòng WARN, và tất cả đều nằm trong dự kiến — mười dòng gọi tên một hook mà bảng ship tắt sẵn nhưng entrypoint vẫn còn gắn (nó spawn rồi tự no-op, tốn một lần spawn chứ không gì khác), một dòng gọi tên đúng phần cấu hình bạn được quyền chỉnh. Dòng phán quyết mới là bằng chứng, không phải việc vắng cảnh báo. đầu ra thật
WARN harness/bin/hs-cli: not reachable on PATH — skill bodies tell the user to type `hs-cli`. Fix: `ln -s <repo>/harness/bin/hs-cli ~/.local/bin/hs-cli` (or `install.py --cli` for every launcher; Windows: add <repo>/harness/bin to PATH) … 5 more of the same shape (hs-run, hs-code, hs-rops, hs-secrets, hs-usage: a launcher not yet linked onto PATH) WARN harness/data/harness-hooks.yaml: bash_write_guard: enabled=false in the SSOT but its entrypoint is still wired in .claude/settings.json — not a bug (the process spawns and self-no-ops each matching event under the wire-then-toggle pattern), but it costs a spawn; unwire it there too if you want zero per-event cost … 9 more of the same shape (a hook disabled in the SSOT whose entrypoint stays wired) WARN harness/data/harness-hooks.yaml: hash mismatch (deployer-localized config — expected to differ from the shipped baseline) verify_install OK: manifest + hook registration consistent
python3 script on each tool call, so the machine that runs the harness needs Python ≥ 3.12. The installer fails clearly up front if it is missing. No Python? Install it first (apt install python3 · brew install python · python.org), then re-run. We deliberately do not bundle a venv: a venv references a base interpreter (it does not contain Python) and is not portable across machines — it would not help the no-Python case and would break on a different OS. The whole dependency surface is three pip packages (PyYAML + pytest + defusedxml), which the installer's deps check installs for you.Máy đích bắt buộc có Python — không chỉ để cài. Mỗi hook chạy như script python3 ở từng lần gọi tool, nên máy chạy harness cần Python ≥ 3.12. Trình cài báo rõ ngay từ đầu nếu thiếu. Chưa có Python? Cài trước (apt install python3 · brew install python · python.org) rồi chạy lại. Chúng tôi cố ý không đóng gói venv: venv tham chiếu tới một interpreter gốc (nó không chứa Python) và không di động giữa các máy — gói venv không cứu được trường hợp thiếu Python mà còn vỡ trên OS khác. Toàn bộ phụ thuộc chỉ là ba gói pip (PyYAML + pytest + defusedxml), và bước kiểm deps của trình cài lo việc cài.Offline — install a downloaded bundleOffline — cài từ bundle đã tải
No network on the target? Download the release bundle harness-<version>.tar.gz (with its .sha256) and the standalone install.sh elsewhere, copy them over, and point the installer at the bundle and your repo. Same five steps, same closing verify — it just skips the download.Máy đích không có mạng? Tải bundle release harness-<version>.tar.gz (cùng .sha256) và install.sh độc lập ở nơi khác, copy sang, rồi trỏ trình cài vào bundle và repo của bạn. Cùng năm bước, cùng verify chốt — chỉ bỏ bước tải.
sh install.sh harness-<version>.tar.gz ../my-repoOptionsTùy chọn
| OptionTùy chọn | EffectTác dụng |
|---|---|
-i / --interactive | List every release, preview its changelog, and confirm before installing (reads your terminal even through a pipe).Liệt kê mọi bản, xem trước changelog, và xác nhận trước khi cài (đọc terminal của bạn kể cả qua pipe). |
-n / --dry-run | Print the exact download plan (URL + expected sha256) and install nothing.In đúng kế hoạch tải (URL + sha256 kỳ vọng) và không cài gì. |
--version=X | Pin a release (e.g. --version=5.4.0). Same as the HARNESS_VERSION env var.Ghim một bản (vd. --version=5.4.0). Tương đương biến môi trường HARNESS_VERSION. |
--run-tests (-RunTests) | Opt-in. Also run the harness test suite against the freshly installed copy (~30s). OFF by default — the --strict verify already confirms the install.Tùy chọn bật. Chạy thêm bộ test của harness trên bản vừa cài (~30s). MẶC ĐỊNH TẮT — bước verify --strict đã xác nhận bản cài rồi. |
The post-install test suite is off by default now — one command installs and verifies, and that is it. Add --run-tests only if you want to watch the suite go green in your own environment. --skip-tests / --no-tests still work as harmless no-ops.Bộ test sau cài giờ mặc định tắt — một lệnh cài và verify, thế là xong. Chỉ thêm --run-tests nếu muốn xem bộ test chạy xanh trong môi trường của mình. --skip-tests / --no-tests vẫn chạy như no-op vô hại.
.github/workflows/receipts-gate.yml is optional — wire it into your own CI to require plan receipts before merge. Nothing about the harness assumes a remote server enforcing you.Personal-first — local khuyên, cũi không bao giờ nới. Các gate quy trình ở push / pr / ship là advisory: chúng cảnh báo và ghi trace, không chặn bạn, nên bạn lặp thoải mái. Cái luôn cứng ở mọi máy, không cần CI: các sàn ghi theo đường-dẫn (destructive-to-protected + secret), và chặn giả-mạo-artifact. Muốn thêm một gate remote cứng? File .github/workflows/receipts-gate.yml đi kèm là tùy chọn — tự wire vào CI của bạn để đòi plan receipt trước khi merge. Harness không giả định có server từ xa nào ép bạn.From a clone (advanced)Từ một clone (nâng cao)
If you already have the harness checked out, skip the bundle and run the installer directly — same writes, same final verify. Every mutation is idempotent and previewable with --dry-run. Keep the extracted harness outside the repo you install into: if source == target the copy is a no-op and nothing installs.Nếu đã có harness sẵn, bỏ qua bundle và chạy thẳng trình cài — cùng cách ghi, cùng verify cuối. Mọi thay đổi đều idempotent và xem-trước được bằng --dry-run. Để thư mục harness vừa giải nén ở ngoài repo định cài: nếu source trùng target thì bước copy thành no-op, không cài được gì.
python3 harness/install/install.py --target ../my-repoDirect-installer flags: --non-interactive / --yes (never prompt — the automation path), --dry-run (plan every write, change nothing), --no-track (run without committing harness/ into your product git), --uninstall (reverse the settings + pre-push edits; harness/ is left in place).Cờ của trình cài trực tiếp: --non-interactive / --yes (không hỏi — đường tự động), --dry-run (lập kế hoạch mọi lần ghi, không đổi gì), --no-track (chạy mà không commit harness/ vào git sản phẩm), --uninstall (đảo ngược chỉnh settings + pre-push; harness/ vẫn để nguyên).
install.py --global installs instead as ONE shared binary at $HARNESS_BIN_ROOT serving many projects, each keeping a private data home at $HARNESS_DATA_ROOT (default .harness/). Two-zone guards keep the binary read-only while the project stays writeable. Under global mode both variables must reach the process: calling hs-run by a bare path without them lets it walk up the tree looking for plans/ and answer correctly for the wrong project. Full guide: docs/harness/global-install-guide.md.Hai chế độ cài. Mặc định là per-project — cây được chép vào repo và mọi thứ sống ở đó. install.py --global thì cài MỘT binary dùng chung ở $HARNESS_BIN_ROOT phục vụ nhiều dự án, mỗi dự án giữ kho dữ liệu riêng ở $HARNESS_DATA_ROOT (mặc định .harness/). Guard hai-vùng giữ binary chỉ-đọc còn dự án vẫn ghi được. Ở chế độ global, cả hai biến phải tới được tiến trình: gọi hs-run bằng đường dẫn trần mà thiếu chúng sẽ khiến nó đi ngược lên cây tìm plans/ và trả lời đúng cho SAI dự án. Hướng dẫn đầy đủ: docs/harness/global-install-guide.md.Install onto another coding agentCài lên một coding agent khác
The harness is not only for Claude Code. harness/data/runtime-targets.yaml declares what nine other coding-agent runtimes can actually carry — event names, tool vocabulary, hook-file shape, skill-name constraints — and the installer casts that table into a real install instead of a copy that looks installed and fires nothing. An undeclared name is refused, never approximated.Harness không chỉ dành cho Claude Code. harness/data/runtime-targets.yaml khai báo chín runtime coding-agent khác thực sự mang được gì — tên event, từ vựng tool, hình dạng file hook, ràng buộc tên skill — và trình cài đúc bảng đó thành một install THẬT thay vì một bản copy trông như đã cài mà không bắn gì. Tên chưa khai báo bị từ chối, không bao giờ đoán gần đúng.
python3 harness/install/install.py --runtime codexCSV for several at once (--runtime codex,cursor,grok). Two of the nine live in your home, not a project, so they take a deliberately separate flag — installing them changes every project you own, and that is never a side effect of installing here: --runtime-home agy. Both reverse with --uninstall, which reads an ownership ledger the install itself wrote: a file you have since edited is kept and reported, never deleted.Dùng CSV để cài nhiều cái một lúc (--runtime codex,cursor,grok). Hai trong chín cái sống ở home chứ không phải trong dự án, nên chúng có cờ RIÊNG cố ý — cài chúng là đổi mọi dự án bạn sở hữu, và đó không bao giờ là tác dụng phụ của việc cài ở đây: --runtime-home agy. Cả hai đảo ngược bằng --uninstall, đọc sổ sở-hữu mà chính lần cài đã ghi: file bạn đã sửa từ đó thì được giữ lại và báo, không bao giờ bị xoá.
Want to see what survives before writing anything? hs-cli emit --target codex --json reports the projection read-only; --out DIR writes a runnable bundle (hooks file + degradation ledger + operator notes) into a directory of your choice. Note it is a projection, not a tracked install — --out has no ledger of its own, so reversing it means deleting that directory yourself.Muốn xem cái gì sống sót trước khi ghi bất cứ thứ gì? hs-cli emit --target codex --json báo cáo phép chiếu ở chế độ chỉ-đọc; --out DIR ghi một bundle chạy được (file hook + sổ suy-giảm + ghi chú vận hành) vào thư mục bạn chọn. Lưu ý đây là phép CHIẾU, không phải bản cài có theo dõi — --out không có sổ riêng, nên muốn đảo ngược thì tự xoá thư mục đó.
--allow-inert-gates, and even then the loss is written into that runtime's INSTALL.md and degradation ledger. Four of the nine carry no hook surface at all: they get the skills and instructions, and the install reports zero gate coverage rather than claiming a cage that is only a drawing of one. Where a capability was never measured against a live runtime, the table says unknown — which is not a synonym for unsupported, so the harness refuses there too.Cái bảng này từ chối giả vờ. Một gate compliance mà đăng ký được trên target nhưng không bao giờ bắn là lỗi cứng, không phải rơi rụng âm thầm — bản cài dừng lại trừ khi bạn truyền --allow-inert-gates, và ngay cả khi đó phần mất mát vẫn được ghi vào INSTALL.md và sổ suy-giảm của runtime đó. Bốn trong chín cái không có mặt hook nào cả: chúng nhận skill và chỉ-dẫn, còn bản cài báo độ phủ gate bằng KHÔNG thay vì khai một cái cũi chỉ tồn tại trên bản vẽ. Chỗ nào năng lực chưa từng được đo trên runtime thật, bảng ghi chưa biết — và thứ đó không đồng nghĩa với không hỗ trợ, nên harness cũng từ chối ở đó.harness/standards/ is missing or thin. Run scaffold_standards.py --type system-architecture|code-standards for a TBD skeleton to fill. Once installed, tune behavior on the Configure page; every knob (file, default, how to change it, env override) is mapped in docs/harness/config-reference.md.Trình cài không bao giờ bịa standards của bạn — nó cảnh báo khi harness/standards/ trống hoặc sơ sài. Chạy scaffold_standards.py --type system-architecture|code-standards để có khung TBD mà điền. Cài xong, chỉnh hành vi ở trang Cấu hình; mọi núm (file, mặc định, đổi cách nào, env override) liệt kê trong docs/harness/config-reference.md./reload-plugins in Claude Code (or restart it), then run your first loop in the Quick start. Re-verify any time with python3 harness/scripts/verify_install.py --strict.Sau khi cài: bật plugin bằng /reload-plugins trong Claude Code (hoặc khởi động lại), rồi chạy vòng đầu tiên trong Bắt đầu. Verify lại bất cứ lúc nào với python3 harness/scripts/verify_install.py --strict.FAQHỏi đáp
Is curl … | sh safe?curl … | sh có an toàn không?
.., or out-of-tree member. Prefer to read first? Open the URL in a browser, or run with --dry-run to see the exact download plan before anything installs. For a fully offline path, download the bundle and run the local install.sh instead.Script được phục vụ qua HTTPS từ trang release, và nó kiểm sha256 sidecar của bundle trước khi tin một byte nào — kèm một tar-escape guard từ chối mọi member tuyệt đối, .., hay ra-ngoài-cây. Muốn đọc trước? Mở URL trên trình duyệt, hoặc chạy với --dry-run để xem đúng kế hoạch tải trước khi cài gì. Muốn hoàn toàn offline, tải bundle và chạy install.sh cục bộ.What if the target machine has no Python?Nếu máy đích không có Python thì sao?
python3 script, so Python ≥ 3.12 is a runtime requirement, not just an install-time one. The installer detects this and stops with the install command for your OS. Install Python first, then re-run.Thì harness không chạy được — mọi hook là script python3, nên Python ≥ 3.12 là yêu cầu lúc chạy, không chỉ lúc cài. Trình cài phát hiện và dừng kèm lệnh cài cho OS của bạn. Cài Python trước, rồi chạy lại.Do the post-install tests run automatically?Bộ test sau cài có tự chạy không?
--run-tests (-RunTests on PowerShell) if you want to also watch the suite go green in your environment.Không — từ 5.4.0 chúng mặc định tắt. Một lệnh cài và chạy verify integrity nghiêm ngặt, thế là đủ xác nhận bản cài. Thêm --run-tests (-RunTests trên PowerShell) nếu muốn xem thêm bộ test chạy xanh trong môi trường của bạn.Will installing touch files I didn't expect?Cài đặt có đụng file tôi không ngờ không?
--dry-run first — it plans every write and changes nothing. The real run is idempotent, merges .claude hooks additively (your own survive), and --uninstall reverses the settings + pre-push edits (it leaves harness/ in place; delete that folder to remove it fully).Chạy trình cài trực tiếp với --dry-run trước — nó lập kế hoạch mọi lần ghi và không đổi gì. Lần chạy thật là idempotent, gộp hook .claude theo kiểu cộng thêm (hook của bạn vẫn còn), và --uninstall đảo ngược chỉnh settings + pre-push (để harness/ nguyên; xóa thư mục đó để gỡ hẳn).