Add the zcode write-path guard instance with its adaptation matrix #7

Merged
weichen merged 3 commits from feature/zcode-hooks into main 2026-09-30 03:43:38 +00:00
Owner

zcode 无 rules 功能(AGENTS.md 即常驻层,已就位);用其 PreToolUse 钩子补写路径强制:Edit/Write 落笔前拦截集成分支/detached 子仓/坏分支名(多租户事故的实际形态)。脚本级正负例 8/8(N1–N3 拦截带指引,P1–P5 含 fail-open 降级);客户端实弹拦截标注 pending-live 于矩阵。附 .zcode/config.json、policy/tool-adaptation-zcode.md、adoption 行、.zcode/plans/ 忽略。工程脚本类验证(verification.md 矩阵),无 gitlink/产品代码变更。

zcode 无 rules 功能(AGENTS.md 即常驻层,已就位);用其 PreToolUse 钩子补写路径强制:Edit/Write 落笔前拦截集成分支/detached 子仓/坏分支名(多租户事故的实际形态)。脚本级正负例 8/8(N1–N3 拦截带指引,P1–P5 含 fail-open 降级);客户端实弹拦截标注 pending-live 于矩阵。附 .zcode/config.json、policy/tool-adaptation-zcode.md、adoption 行、.zcode/plans/ 忽略。工程脚本类验证(verification.md 矩阵),无 gitlink/产品代码变更。
weichen added 3 commits 2026-09-30 03:43:38 +00:00
Why: zcode lacks a rules feature (AGENTS.md is the resident layer) but
supports PreToolUse hooks that can block Edit/Write before the write lands,
upgrading A1/A3 from commit-time to write-time enforcement; the two block
shapes (integration branch, detached submodule) mirror the real incidents.
Evidence: script-level suite 8/8 (N1-N3 blocks with exit 2 and remediation
hints, P1-P5 allows incl. fail-open degradation paths); config JSON valid;
client-side live-fire interception marked pending-live in the matrix.
Impact: .zcode/config.json enables the hook runner for this workspace;
.zcode/plans/ ignored (client state); no product code change.
Refs: Development-Guidelines 0.1.0-draft.8; policy/tool-adaptation-zcode.md
weichen merged commit 20727a8fd3 into main 2026-09-30 03:43:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#7