Files
Agent-System-Dev/scripts/zcode/write-guard.sh
T
weichen 8af945a1d5 Make development gates preserve work and verifiable evidence
Why: cleanup, component synchronization, receipt recording and credential handling could contradict the documented development boundaries.

Evidence: SELF 75 isolated governance tests and source checks are captured in .task/feature-governance-reliability.md; combination and CI verification follow.

Impact: hardens local task and CI tooling, aligns policy and component documentation, and adds continuous regression tests without changing product behavior.

Refs: .task/feature-governance-reliability.md; policy/governance.md; policy/platform-admission.md
2026-10-05 12:36:02 +00:00

11 lines
371 B
Bash

#!/usr/bin/env bash
# PreToolUse 写路径守卫。解析/依赖错误均拒绝,不能把未知请求当作安全请求。
set -uo pipefail
if ! command -v python3 >/dev/null 2>&1; then
echo 'write-guard: 拒绝——缺少 python3,无法检查写入目标' >&2
exit 2
fi
python3 "$(dirname "$0")/write_guard.py"
result=$?
if [ "$result" -ne 0 ]; then exit 2; fi