By nrdxp
Defines reusable agent rulesets, skills, and structured workflows for coding assistants, enabling automated code auditing, formal refinement loops, property-based testing, documentation lifecycle management, security assessments, and project onboarding with goal hierarchies.
SOP for locating, auditing, and importing production-tested reference patterns and peer-reviewed literature. Trigger when: - Designing or implementing non-trivial algorithms, system protocols, design patterns, or major library integrations. - Prompt contains: prior art, reference implementation, research patterns, standard implementation, arXiv, RFC.
SOP for structured documentation lifecycle. Trigger when: - Designing, writing, reviewing, or auditing large-scale documentation structures. - Navigating phases: Audit, Plan, Draft, Review, Verify. - Prompt contains: /doc, doc workflow, audit, draft, review, verify, documentation debt.
Writing quality guidelines, formatting conventions, and styling constraints for documentation. Trigger when: - Writing, editing, or auditing documentation files, READMEs, markdown files, or guides. - Modifying files with suffixes like: *.md, *.qmd, *.txt, *.rst. - Prompt contains keywords: doc, documentation, spelling, grammar, headers, links, table alignment, Divio, tone, voice, clarity.
SOP for auditing AI-generated code. Trigger when: - Reviewing, refactoring, or cleaning up AI-generated code to prevent regressions or hallucinated APIs. - Prompt contains: /ai-audit, code audit, AI cleanup, common flaws.
Protocol for auditing API surface coherence and type safety. Trigger when: - Evaluating API designs, interface type safety, or design elegance. - Prompt contains: /api-audit, API surface, API coherence, type safety.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimnpx claudepluginhub nrdxp/predicate --plugin predicateBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Modular rules, skills, and workflows that keep AI coding assistants anchored to the true goal across long-horizon work.
Predicate is built from two synergistic halves: correction relaxes drift back out in an outer loop once it appears, and prevention keeps the walk focused before drift compounds. Correction without prevention corrects toward the wrong goal; prevention without correction drifts anyway over a long horizon. Together they bound drift.
See the Getting Started Guide to integrate Predicate into your project.
predicate/
├── rules.md # The master ruleset: the Verification Dual and the Prime Invariants every walker inherits
├── ambient.md # Always-on principles that are not workflows (no entrypoint)
├── skills/ # Encapsulated agent skills (rules, workflows, tools)
├── ledger/ # Nickel contracts that make campaign artifacts machine-valid
├── gates/ # Standalone evaluator scripts (orphan, self-containment)
├── hooks/ # Git hooks that enforce the Commit Gate at commit time
├── templates/ # Project templates (IBC.md, ADR.md, etc.)
└── docs/ # Guides, the orchestration protocol, ADRs, and theory
Two directories are runtime-only and gitignored by the parent repository: .scratch/
holds a campaign's ephemeral working set, and .ledger/ is the durable history
sub-repository (the flight recorder). Neither is tracked here; see
the flight recorder below.
Predicate packages all agent assets as skills:
| Term | Category | Description |
|---|---|---|
| Rule | Constraint | Declarative guardrails (like rust or engineering guidelines). |
| Workflow | Procedure | State-machine SOPs (like core, refine, or campaign). |
| Tool | Capability | Executable scripts (like security-audit). |
Prompt engineering is a fragile way to program. Autoregressive language models do not "think" or "reason"; they execute a stochastic walk across a discrete token state-space. Over long generations, errors compound, and the boundary condition that set the agent on course fades as context accumulates. Without external structure, an agent will eventually drift off course, write unverified code, or introduce regressions.
A drifting walk fails in two distinct ways, so Predicate answers each with its own half:
The two are not ranked; they are peers that cover different failure modes. Correction relaxes error away from a fixed attractor; prevention keeps that attractor felt as the context grows. The intro to rules.md and the project goal in AGENTS.md state the same architecture; the halves below expand each at the level of a newcomer.
Predicate's core invariant is the Verification Dual: verify, then trust. No condition is ever closed by an agent's say-so. Every condition that must hold is closed by the strongest applicable evaluator, and exactly one of two complementary paths closes it:
proof > type > property test > example test > linter.Both paths iterate to a fixed point against error feedback toward $\Delta E = 0$; if 3–5 corrective iterations fail to converge, the walk freezes and surfaces. The adversarial path also audits its own classification — "could this have been machine-checked?" — so the soft path self-polices back toward the hard path and never becomes an escape hatch. Human review is the escalation slot only.
Harness engineering for Claude Code — hook-enforced dual review, state-machine gates, and fail-closed safety where it counts.
Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use
Programmatic Agent Constraint Toolkit — governance infrastructure for AI coding agents
Unified Claude Code plugin merging superpowers workflows (TDD, debugging, planning) with everything-claude-code productivity (agents, learning, hooks, rules)
Verification-first engineering toolkit for Claude Code. 15 skills across a 5-phase spine (Investigate → Design → Implement → Verify → Ship), 8 specialist agents, an interactive setup wizard. Every skill has rationalizations + evidence requirements. Built for senior ICs and tech leads.
Enforces orchestrator context window discipline via PreToolUse hooks and rules. Prevents the orchestrator from reading source files it will not edit, running diagnostic commands that should be delegated, and bypassing delegation with 'small change' rationalizations. Install to structurally prevent investigation escalation anti-patterns.