stalegreen
Hooks that keep a coding agent's green claims honest: verification runs are recorded unmasked, and "done" is blocked when the evidence is stale, failed or masked.
AI 分析
用于规范 AI 编码智能体的测试验证流程,防止其在测试未通过或凭据过期时虚报成功。适合对代码质量和自动化测试有严格要求的开发者。
インストール
検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗
ドキュメント
README 全文を読む ↗Configuration
~/.stalegreen/config.json, overridable per repository in .stalegreen.json:
{
"policy": "block",
"mode": "rewrite",
"strictNoEvidence": false,
"tailLines": 40,
"categories": { "test": true, "typecheck": true, "lint": true, "build": true },
"ignoreCommands": ["make lint-fast"],
"extraRunners": [{ "match": "^make check", "category": "test", "pass": "^OK", "fail": "FAILED" }],
"fingerprintIgnore": ["*.md", "docs/**"],
"fingerprintBudgetMs": 150,
"deferredTtlMinutes": 10,
"maxLogBytes": 5242880,
"permission": "inherit",
"prune": "30d"
}
policy:block(default) oradvisory, which records verdicts without blocking.mode:rewrite(default),strict(masked commands that cannot be wrapped are denied with a rerun instruction) oroff(no rewriting).strictNoEvidence: block claims that have no run at all.tailLines: how many lines of a wrapped run the agent sees; the agent's owntail -nis kept when it asks for at least 20.categories,ignoreCommands,extraRunners: which categories are gated, commands never treated as runs, and your own runners (matchis a regular expression on the command,passandfailon the output).fingerprintIgnore,fingerprintBudgetMs: paths left out of the working-tree hash, and the time after which the hash is marked unavailable and edit events decide.deferredTtlMinutes: how long a background run counts as in flight.maxLogBytes: logs above this size are truncated with a marker.permission:inherit(default, an allow decision only when your own rules already allow the command),allow(every verification run) orask(never a decision; on Codex this turns the rewrite off).prune: the windowstalegreen doctor --prunekeeps; older sessions are removed from the store.