Configure & operateCấu hình & vận hành
Already installed? This is where you tune how the harness feels: how much it pauses for you (autonomy), how hard each guard pushes back (policy), and which branches are protected. Every change is a human-edited YAML file and a git-visible diff — nothing is hidden in a binary or a database. Not installed yet? Start on the Install page.Đã cài rồi? Đây là chỗ chỉnh cảm giác của harness: dừng cho bạn bao nhiêu (tự chủ), đẩy lại mạnh cỡ nào ở mỗi guard (policy), và nhánh nào được bảo vệ. Mọi thay đổi là một file YAML người-sửa và một diff git thấy được — không gì giấu trong binary hay database. Chưa cài? Bắt đầu ở trang Cài đặt.
Pick an autonomy levelChọn mức tự chủ
Set HARNESS_AUTONOMY to control how often hs:cook pauses for a human. No level self-ships — push / pr / ship / deploy always go through the artifact gate, and the trace records fully even at god.Đặt HARNESS_AUTONOMY để điều khiển hs:cook dừng cho người bao lâu một lần. Không mức nào tự ship — push / pr / ship / deploy luôn qua gate artifact, và trace ghi đầy đủ kể cả ở god.
| LevelMức | PausesDừng | Use whenDùng khi |
|---|---|---|
default | at 2 checkpoints: plan approval + shipở 2 chốt: duyệt plan + ship | most work — supervised but not naggingphần lớn việc — có giám sát mà không phiền |
ask_all | after every phasesau mỗi phase | high-risk change you want to watch closelythay đổi rủi ro cao muốn theo sát |
god | never (trace still records fully)không bao giờ (trace vẫn ghi đầy đủ) | unattended / AFK runs — pairs with hs:afkchạy không giám sát / AFK — đi kèm hs:afk |
god removes the pauses, not the gates — the difference between "fast" and "unsafe".Tự chủ đổi khi nào bạn bị hỏi, không bao giờ đổi cái gì bị ép. god bỏ các điểm dừng, không bỏ gate — khác biệt giữa "nhanh" và "không an toàn".Set the guard policyĐặt chính sách guard
guard-policy.yaml gives every guard one posture — off / warn / block — resolved from a preset plus per-guard overrides. Edit it by hand or with guard_config.py (which also writes a who/when audit line).guard-policy.yaml cho mỗi guard một thế — off / warn / block — phân giải từ một preset cộng overrides theo-guard. Sửa tay hoặc bằng guard_config.py (cũng ghi một dòng audit ai/khi-nào).
| preset | safety | enforcement | advisory | nudge |
|---|---|---|---|---|
strict | block | block | warn | warn |
balanced (default) | block | block | warn | off |
lenient | block | warn | off | off |
solo | block | block | off | off |
nudge is the one category off at balanced — gentle reminders ship asleep and surface only under strict. Notice safety stays block in every preset: that's the floor.nudge là nhóm duy nhất tắt ở balanced — nhắc nhẹ ngủ sẵn và chỉ hiện dưới strict. Để ý safety luôn block ở mọi preset: đó là cái sàn.
Safety floors & break-glassSàn an toàn & break-glass
Safety guards — host-safety, secret-read, write_guard, force-push, the merge gate — have a FLOOR of block. A preset can never lower a floor. An overrides: entry can, but that's a break-glass: guard_config records it with break_glass: true in the change-log.Guard an toàn — host-safety, secret-read, write_guard, force-push, merge gate — có SÀN là block. Preset không bao giờ hạ được sàn. Một mục overrides: thì có thể, nhưng đó là break-glass: guard_config ghi nó với break_glass: true trong change-log.
Not tunable hereKhông chỉnh được ở đây
Some invariants are always-on — turning them off would corrupt state, so they're not in the policy file at all: input-validation grammars, path containment, config-loader validation, plan-approval role consistency, and the CI bug-class invariants.Một số bất biến luôn-bật — tắt chúng sẽ làm hỏng trạng thái, nên không nằm trong file policy: grammar kiểm-tra-đầu-vào, khoanh đường-dẫn, validate config-loader, nhất quán vai trò duyệt-plan, và các bất biến bug-class của CI.
Protect a branchBảo vệ một nhánh
List a branch in protected-branches.yaml and a push to it is treated as a merge — the transport twin of the pr stage. The pre-push hook then demands the same merge-grade artifacts a reviewed PR would. The merge gate is itself a FLOOR guard.Liệt kê một nhánh trong protected-branches.yaml và push lên nó được xử như một merge — bản sao vận-chuyển của stage pr. Pre-push hook khi đó đòi cùng bộ artifact cấp-merge như một PR đã review. Merge gate tự nó là một FLOOR guard.
| BehaviorHành vi | On a protected refTrên ref được bảo vệ |
|---|---|
| Pattern syntaxCú pháp mẫu | fnmatch — * spans /, so release/* covers release/1.2fnmatch — * trải qua /, nên release/* bao release/1.2 |
| Plain pushPush thường | requires the four merge-grade artifactsđòi bốn artifact cấp-merge |
| Force-push / delete / non-ffForce-push / xóa / non-ff | refused outrighttừ chối thẳng |
| Empty / missing listDanh sách trống / thiếu | protects nothing — a fresh repo pushes freely (additive)không bảo vệ gì — repo mới push thoải mái (cộng dồn) |
Defaults shipped: main, master, release/*. See the glossary for non-fast-forward and merge gate, or the cheatsheet for the stage → artifact table.Mặc định kèm theo: main, master, release/*. Xem glossary cho non-fast-forward và merge gate, hoặc tra cứu nhanh cho bảng stage → artifact.
Personal-first: local advisory gates, remote enforcementPersonal-first: gate advisory local, enforce remote
The harness operates personal-first: local gates are advisory (no block — you decide) to minimize friction while you're coding, but the real enforcement moves to the remote CI (`.github/workflows/receipts-gate.yml`) where plan receipts are checked before PR merge and push-to-main. Agent RBAC and safety floors stay block everywhere. One command reverts any experiment: push and the remote gate holds the line.Harness hoạt động personal-first: gate local là advisory (không chặn — bạn quyết) để giảm ma-sát khi code, nhưng enforce thật đẩy lên CI remote (`.github/workflows/receipts-gate.yml`) kiểm plan receipt trước merge PR và push-main. RBAC agent và safety floor vẫn block ở mọi chỗ. Một lệnh đảo: push và gate remote giữ vạch.
block. Remote CI enforces the final receipts, so nothing merges without plan + test pass + code review. Your device is yours; the project is protected.Personal-first hạ ma-sát local, không an toàn. Gate local advisory cho phép lặp không phải giơ tay; agent RBAC cage và mọi safety floor vẫn block. CI remote ép final receipt, nên không gì merge nếu thiếu plan + test pass + code review. Thiết bị của bạn là của bạn; dự án được bảo vệ.FAQHỏi đáp
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, and --uninstall reverses the settings + pre-push edits (it leaves harness/ in place; delete that folder to remove it fully).Chạy --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, và --uninstall đảo ngược chỉnh settings + pre-push (để harness/ nguyên; xóa thư mục đó để gỡ hẳn).Is god autonomy dangerous?god có nguy hiểm không?
god run still cannot push without the artifacts, and the trace records every phase. It's "no questions asked", not "no rules applied".Nó bỏ các điểm dừng, không bỏ gate. Một lần chạy god vẫn không push được khi thiếu artifact, và trace ghi mọi phase. Đó là "không hỏi gì", không phải "không luật nào".Why YAML for config and JSON for data?Vì sao config dùng YAML còn dữ liệu dùng JSON?
How do I see every guard and its current mode?Xem mọi guard và mode hiện tại thế nào?
python3 harness/scripts/guard_config.py show lists every valid guard id with its resolved mode, so you know exactly what an override would change.python3 harness/scripts/guard_config.py show liệt kê mọi guard id hợp lệ với mode đã phân giải, để bạn biết chính xác một override sẽ đổi gì.In solo mode, can I turn off the reminder lines too?Ở solo, tắt luôn các dòng nhắc được không?
set solo keeps a one-line soft-stage reminder so a frictionless push still leaves a visible "ran ungated" note (notify). Add --quiet for a fully silent run (soft_stage_advisory:false). Either way the gate still traces every decision — quiet silences the nudge, not the audit.Được — tùy bạn. set solo giữ một dòng nhắc soft-stage để push không-ma-sát vẫn để lại ghi chú "chạy không gate" thấy được (notify). Thêm --quiet cho lần chạy im hẳn (soft_stage_advisory:false). Kiểu nào gate cũng vẫn trace mọi quyết định — quiet tắt lời nhắc, không tắt audit.Does solo mode let the AI agent bypass the guards?Solo có cho agent AI vượt guard không?
enforcement stays block, so agent_rbac_guard and every safety floor keep blocking a subagent. A hard invariant re-reads the final policy and refuses the flip if anything dropped below block — solo cannot silently uncage an agent.Không. Solo chỉ nới luồng của người. Guard enforcement vẫn block, nên agent_rbac_guard và mọi safety floor vẫn chặn subagent. Một invariant cứng đọc lại policy cuối và từ chối flip nếu có cái tụt dưới block — solo không thể âm thầm thả cũi agent.