Z.A.E.B.A.L. is a profanity-triggered self-audit protocol for coding agents that detects user frustration, activates escalating audit levels, and optionally invokes an external auditor to correct mistaken assumptions.

Stars

7

7-day growth

No data

Forks

0

Open issues

0

License

No data

Last updated

2026-07-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It addresses a common failure mode where coding agents repeat mistakes due to unfixed assumptions by using user frustration as an operational signal, features explicit recovery and fail-open safety, and integrates with multiple agent platforms without technical tool lock.

Who it is for

  • Developers using Claude Code, Codex CLI, Kimi CLI, or OpenCode
  • Teams deploying AI coding agents in production
  • Researchers studying AI agent safety and failure recovery
  • Developers of coding agent tools seeking built-in audit mechanisms

Use cases

  • Automatically stop an agent from repeating the same incorrect action when the user expresses frustration
  • Escalate repeated failures to an independent auditor for deeper analysis
  • Recover from agent dead-ends by forcing assumption re-check and explicit user acknowledgment
  • Integrate consistent self-audit behavior across multiple supported agent hosts

Strengths

  • Zero external dependencies – uses only Python standard library
  • Multilingual profanity detection (Russian, English, Chinese) with intent classification
  • Fail-open design ensures a malformed payload or auditor failure never breaks the host session
  • Supports four major agent hosts with per-host adapters and a single shared core

Considerations

  • Detection is heuristic and can produce false positives or negatives with sarcasm or unusual context
  • State locking uses POSIX fcntl, which may lose updates on Windows systems
  • External audits are synchronous at configured levels, causing the user to wait for auditor response or timeout

README quick start

Zaebal? · Audit · Errors · Break · Analyze · Leave no assumption

Read this in other languages 🇺🇸 English · 🇷🇺 Русский · 🇨🇳 简体中文

Profanity-triggered self-audit for coding agents. Z.A.E.B.A.L. treats user frustration as an operational signal: stop, re-check the agent's assumptions, and escalate repeated failures to an independent auditor.

Capabilities · How it works · Install · Configuration · Architecture


Why it exists

When a coding agent gets stuck, it often repeats the same action with small variations because one underlying belief about the task or codebase is wrong. The agent still treats that belief as a fact, so another self-check can reproduce the same mistake.

Z.A.E.B.A.L. adds a feedback loop to the user-message boundary:

  • profanity and direct complaints become an audit signal;
  • positive profanity such as “fucking great” does not add to the streak and closes an active incident as an acknowledgment;
  • repeated signals escalate from a local protocol to a full stop;
  • at level 3, an external agent reads the transcript and repository evidence;
  • work resumes only after an explicit user acknowledgment.

There is intentionally no technical tool lock. The protocol changes the agent's instructions and asks it to stop; the human always retains the final control.

Capability map

CapabilityWhat it doesImplementation
Multilingual detectionDetects Russian, English, and Chinese profanity, including punctuation-separated and common leetspeak forms.core/wordlists/{ru,en,zh}.txt + NFKC normalization
Intent classificationSeparates praise, directed complaints, and ambiguous frustration before changing the streak.classify(); weights 0, 1.0, and 0.5
Session escalationTracks each session in a 30-minute sliding window and selects L1, L2, or L3.Atomic JSON state + POSIX fcntl lock
Three audit protocolsInjects increasingly strict instructions: independent checks, assumption inventory, and full stop.core/protocol/L1.mdL3.md
External auditorRuns the same or a cross-vendor CLI against the transcript tail and repository evidence.Claude, Codex, Kimi, or OpenCode
Four host adaptersHooks Claude Code, Codex CLI, Kimi CLI, and OpenCode at user-message submission.JSON hooks, TOML hook, or TypeScript plugin
Explicit recoveryResets

Description

Profanity-triggered self-audit protocol for coding agents (Claude Code, Codex CLI, Kimi CLI, OpenCode). Python stdlib only.

Related repositories

Similar projects matched by category, topics, and programming language.

jamesob
Featured
jamesob GitHub avatar

local-llm

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.

AI & Machine LearningLarge Language Models
1,660
mereyabdenbekuly-ctrl
Featured
mereyabdenbekuly-ctrl GitHub avatar

clodex-ide

Clodex is an open-source, local-first agentic IDE that combines persistent AI tasks, code, terminal, browser, Git, models, memory, and governed execution in one Electron workspace, currently in technical preview.

AI & Machine LearningAI Agents
859
0xwilliamortiz
Featured
0xwilliamortiz GitHub avatar

openclaude-improved

OpenClaude is an open-source CLI coding agent that runs on any platform and supports a wide range of LLM providers, offering the same tools and workflows as Claude Code.

AI & Machine LearningLarge Language Models
577