Enforceable Software Engineering Conventions for Coding Agents.
Composable, atomic predicates that capture programming conventions at the directory level — a shared specification language between humans and coding agents. Machine-checkable, actionable, and easy to integrate into any agent loop. Reliably improve output quality with clear, enforceable guarantees on the final deliverable.
A shared vocabulary for efficient communication between humans and agents. Express complex engineering requirements as compact, unambiguous DP identifiers.
Give coding agents a machine-checkable specification. Run dp-checker at the end of each loop iteration for verifiable, actionable guarantees on deliverables.
dp-checker at the end
Understand any repository's characteristics without reading every file. Lite predicates run in milliseconds and produce a structured, token-efficient summary.
Hover over a field on the left to highlight the corresponding part in the implementation, and vice versa.
DpResult (Result<DpOutcome, String>). Use .into() to convert booleans or tuples.dp_ids that must run before this predicate — declares dependencies.false. If true, included in the fast lite check. Must run within 10ms, with no external dependencies or side effects.None. ID of the replacement predicate (marks this one as deprecated).Install dirp with a single command, then integrate it into your workflow.
Manually run DP checks on any repository to verify it meets specific conventions. Useful for CI pipelines, pre-merge checks, and reviewing third-party code.
Runs the specified predicates against the current directory by default. Pass one or more DP IDs to check specific conventions. Exit code is non-zero if any predicate fails, making it easy to integrate into scripts and CI.
| Flag | Description |
|---|---|
| --path <dir> | Run against a specific directory instead of the current working directory. |
| --verbose | Show detailed output for each predicate, including pass/fail reasons and execution time. |
| --json | Output results as JSON for programmatic consumption. |
| --all | Run all registered predicates (including non-lite ones) instead of a specified subset. |
Integrate DP checks directly into your coding agent loop for automated quality enforcement. The agent runs, dirp checks the output, and the error message feeds back in — until the repo satisfies all predicates.
dirp can run as a Claude Code Stop hook to automatically check predicates when Claude finishes responding. If any predicates fail, Claude is blocked from stopping and receives feedback to fix the issues.
Add the following to your .claude/settings.json (project-level) or ~/.claude/settings.json (user-level):
Replace the predicate IDs with the ones you want to enforce. When any of the specified predicates fail, Claude will see a message like:
Quickly understand a repository's characteristics without reading every file.
dirp analyze runs all lite predicates and returns a structured summary — perfect for orienting a new agent or getting a token-efficient overview.
Runs the full set of lite predicates and outputs a structured report of which conventions the repository satisfies. Each lite predicate is guaranteed to complete in under 10ms with no side effects.
Sample output
| Flag | Description |
|---|---|
| --path <dir> | Analyze a specific directory instead of the current working directory. |
| --verbose | Show full predicate descriptions alongside results. |
| --json | Output results as structured JSON for piping into other tools or agents. |
| --failed-only | Only show predicates that failed, for a focused action list. |