varmabudharaju/agent-pd

16 stars · Last commit 2026-06-11

A police department for your Claude Code agents — a logging-only hook + CLI that audits the main agent and every subagent and reports rule offenses (permission bypass, out-of-scope & credential access, self-permissioning, disallowed tools, redundant, off-task) with quoted evidence. Catch-and-report, never blocks.

README preview

<div align="center">

# agent-pd

### A police department for your Claude Code agents

A logging-only hook records every tool &amp; permission event from the main agent **and** its
subagents; the `pd` CLI replays that log through six detectors and reports rule offenses with
quoted evidence. **Catch-and-report — it never blocks.**

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/varmabudharaju/agent-pd/blob/master/LICENSE)
[![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-3776AB.svg?logo=python&logoColor=white)](https://github.com/varmabudharaju/agent-pd/blob/master/pyproject.toml)
[![Tests](https://img.shields.io/badge/tests-474_passing-brightgreen.svg)](https://github.com/varmabudharaju/agent-pd/tree/master/docs/manual-tests/)
[![Version](https://img.shields.io/badge/version-0.2.0-orange.svg)](https://github.com/varmabudharaju/agent-pd/blob/master/pyproject.toml)
[![Runtime deps](https://img.shields.io/badge/runtime_deps-PyYAML_only-lightgrey.svg)](https://github.com/varmabudharaju/agent-pd/blob/master/pyproject.toml)

**[Quickstart](#quickstart)** · **[How it works](#how-it-works-mental-model)** · **[Detectors](#the-detectors)** · **[Architecture](https://github.com/varmabudharaju/agent-pd/blob/master/ARCHITECTURE.md)** · **[Security](https://github.com/varmabudharaju/agent-pd/blob/master/SECURITY.md)**

</div>

View full repository on GitHub →