Files
timmy-config/bin
STEP35 Burn Agent f32ff627c1 feat(jidoka): implement auto-halt gate for quality drops — stop the line on defect
Implements Jidoka (自働化) — automation with a human touch.
When the agent loop produces defective work, the line stops.

Implementation:
- bin/jidoka-gate.sh — gate script that checks quality of last N completions
- bin/quality-verify.sh — per-issue quality checker (PR exists, has files, mergeable, completion marker)
- Integrated into agent-loop.sh, claude-loop.sh, gemini-loop.sh — runs every JIDOKA_CHECK_INTERVAL completions (default 10)
- If >= JIDOKA_FAIL_THRESHOLD of SAMPLE_SIZE checks fail, a halt flag is created at ~/.hermes/logs/{agent}-jidoka-halt
- Telegram alert is sent on halt via existing bot token mechanism
- bin/claudemax-watchdog.sh updated to respect the halt flag — will NOT restart a halted agent

Configuration via environment:
- JIDOKA_CHECK_INTERVAL (default 10) — completions between gate checks
- JIDOKA_SAMPLE_SIZE (default 5) — how many recent closed issues to sample
- JIDOKA_FAIL_THRESHOLD (default 3) — failures needed to trigger halt

Accepts issue #346 as Closes.

Refs: #345 (Epic: Five Japanese Wisdoms)

Co-authored-by: Timmy <step35@burn.in>
2026-04-29 01:25:09 -04:00
..