guarrr816

Polygraph — Development skill for Claude Code

Development community

A lie detector for coding agents: flag forged instructions, check verification records, and guard hook configuration.

How to install Polygraph

This entry records only its repository, not the path inside it, so there is no exact command to give. Open guarrr816/polygraph and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Polygraph does

A lie detector for coding agents: flag forged instructions, check verification records, and guard hook configuration. Claude Code adapter; Codex planned.

Alternatives in Development

  • Discipline — Toggle discipline mode — auto-invoke verification, brainstorming-before-coding, and review checks 2.8k ★
  • 10 Colonial Records Search — Colonial Records Search 1.1k ★
  • Projectmem — Open-source coding agent memory 766 ★

README

polygraph — A lie detector for coding agents

**Your agent says “done.” Check the evidence.**

[![ci](https://github.com/guarrr816/polygraph/actions/workflows/ci.yml/badge.svg)](https://github.com/guarrr816/polygraph/actions/workflows/ci.yml)

polygraph checks the records behind coding agents' claims. Its current Claude Code adapter checks tool calls and transcripts for three familiar situations:

  • “Tests passed.” Checks code-changing turns for a completed verification command reported as successful. A claim in the reply does not count.
  • “You asked me to stop.” Flags known user-turn patterns inside assistant replies. The said command checks whether the transcript contains matching human input.
  • “I'll disable the hook.” Blocks recognizable commands targeting hook settings, plugin files, and other protected configuration.

Python 3.11+ · No third-party runtime dependencies · MIT

Platform Current status
Claude Code Adapter implemented; live session acceptance pending
Codex Hook interfaces confirmed in official documentation; adapter planned

[Install](#install) · [The story](#why-i-built-it) · [How it works](#what-it-does) · [Limits](#known-residuals) · [Chinese](README.zh-CN.md)

See the delivery gate in action

A turn changes `foo.py` and replies **“Done. All tests passed.”** Its transcript contains no test command. The Stop hook exits **2** and prints:

[polygraph] this turn changed foo.py;
no verification command succeeded this turn (subagents included);
...
block 1/2; after the cap the turn is released and recorded as an unverified delivery.

Actual hook output from a **local test replay with a synthetic transcript**, excerpted and wrapped for readability. Live Claude Code session acceptance is still pending. Reproduce the blocking check from a source checkout with the test dependency installed:

python -m pytest tests/test_gate.py::test_baseline_write_without_evidence_blocks -q