pavangupta352/stalegreen2

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 Analysis

用于规范 AI 编码智能体的测试验证流程,防止其在测试未通过或凭据过期时虚报成功。适合对代码质量和自动化测试有严格要求的开发者。

Package
stalegreen
Version
0.1.0
License
MIT
Last updated
Sep 3, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full 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) or advisory, which records verdicts without blocking.
  • mode: rewrite (default), strict (masked commands that cannot be wrapped are denied with a rerun instruction) or off (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 own tail -n is kept when it asks for at least 20.
  • categories, ignoreCommands, extraRunners: which categories are gated, commands never treated as runs, and your own runners (match is a regular expression on the command, pass and fail on 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) or ask (never a decision; on Codex this turns the rewrite off).
  • prune: the window stalegreen doctor --prune keeps; older sessions are removed from the store.