用户行为契约验证
behavior-validator
以不看源码(source-blind)的方式,对照预先编写的契约验证应用、CLI、API 和生成产物的用户行为。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1.1k
- Forks
- 124
01 前言 Front Matter
- name
- behavior-validator
- description
- Source-blind user behavior validation against a prewritten contract for apps, CLIs, APIs, and generated artifacts.
02 资源文件 3
- 参考文档agents/openai.yaml232 B
- 参考文档references/contract-template.md1.4 KB
- 参考文档references/report-schema.md1.4 KB
03 SKILL.md 正文
Behavior Validator
Validate observable behavior without inspecting source. Use this as the black-box companion to code-aware review: autoreview judges the change bundle, while behavior-validator judges the running product, CLI, API, or generated artifact against a behavior contract.
Contract
- Read the behavior contract first. If none exists, write a short one from the user request before testing. See
references/contract-template.md. - Stay source-blind. Do not inspect source files, diffs, tests, git history, implementation notes, build internals, or review bundles.
- Interact only through user-visible or operator-visible surfaces: browser, CLI, API, generated files, public logs, screenshots, accessibility trees, or documented runtime output.
- Treat implementation-looking evidence as contamination. If source access is required to continue, stop and report
blocked_source_required. - Report findings against contract clauses and observable steps, not code locations.
- Do not mark a workflow as passing until each relevant contract clause is pass, fail, blocked, or out of scope.
Isolation
Prefer a source-blind workspace:
validator_dir="$(mktemp -d "${TMPDIR:-/tmp}/behavior-validator-run.XXXXXX")"
chmod 700 "$validator_dir"
cp behavior-contract.md "$validator_dir/"
cd "$validator_dir"
Launch or connect to the target from the contract. Keep only the contract, allowed fixtures, and redacted captured evidence in the private validator workspace. Supply credentials through approved secret tooling or exact environment variables; never copy credential values into the workspace, report, screenshots, or logs. Do not use fixed shared paths for contracts or captured evidence. If the app must be started from the source checkout, start it from a separate terminal and do not read source while validating.
Workflow
- Parse the contract into user tasks, expected behavior, anti-cheat probes, setup, and evidence requirements.
- Prepare runtime access: target URL, CLI command, API endpoint, fixture data, credentials, or generated artifact path.
- Exercise each user task as a real user or operator would.
- Run anti-cheat probes: vary fixture data, refresh/retry, test empty and invalid inputs, verify persistence, inspect generated output, and confirm buttons/commands perform real work rather than only displaying success text.
- Capture evidence as compact redacted notes, screenshots, terminal excerpts, response summaries, file summaries, or accessibility observations. Omit credentials, tokens, cookies, private user data, and unrelated log content.
- Emit a structured report. Use
references/report-schema.mdwhen a machine-readable report is useful. - If the orchestrator fixes a finding, rerun only the affected contract clauses plus any nearby regression probes.
Finding Rules
- Fail when observable behavior violates the contract, a task cannot be completed, expected state is fake/static, or evidence is insufficient for a claimed pass.
- Block when required runtime access, credentials, fixtures, network, or tools are missing.
- Mark out of scope only when the contract explicitly excludes the behavior or the task depends on a user-owned product decision.
- Reject purely aesthetic, code-quality, or implementation-style concerns; those belong to code-aware review.
Final Report
Include:
- target exercised
- contract file or inline contract used
- pass/fail/blocked/out-of-scope summary
- accepted behavioral findings with reproduction steps and evidence
- anti-cheat probes run
- remaining blockers, if any
04 同仓库更多 Skills
OpenClaw 工作交接
team-handoff
将本地工作移交给共享的 OpenClaw Gateway:一次请求即以你自己的身份在该网关上启动一个 worktree 会话,并附带交接信息,然后返回会话 URL。
会话 JSONL 转 HTML 查看器
session-viewer
将 Codex、Claude Code、OpenClaw 或 Pi 的会话 JSONL 转录内容渲染为可搜索、可分享的单文件 HTML 查看器。
仓库 README 编写规范
readme-standard
制定仓库 README 规范:面向 steipete/openclaw 仓库的结构、徽章行、语气、按原型分类的模板以及验证关卡。
任务交接提示生成
handoff
生成可直接复制到剪贴板的交接提示,供其他智能体(agent)调查问题或继续任务。
Crabbox 远程验证
crabbox
Crabbox/Testbox 远程验证:可移植的提供者路由、不可信隔离、Linux/macOS/Windows/WSL2 支持、实时 E2E 测试、诊断和清理。
编码会话脱敏分享
beam
分享经过脱敏的编码会话,或将其逻辑对话移交给已认证的 OpenClaw Gateway。