Predicate sets up in two phases: install it once globally, then initialize each project you want it to govern.
Audience: Developers integrating Predicate skills.
Clone the repository somewhere stable — this checkout is the live source for the
plugin and the always-on rules, so keep it around and git pull it to update.
The commands below write the clone path as <predicate-dir>; substitute wherever
you cloned it:
git clone https://github.com/nrdxp/predicate.git <predicate-dir>The two phases below are both subcommands of bootstrap/install.sh and are safe
to re-run.
The install phase registers Predicate with your agent runner and wires the
always-on rules into your global CLAUDE.md. Run it once:
<predicate-dir>/bootstrap/install.sh installIt detects your harness and registers Predicate via that harness's real mechanism:
Claude Code — Predicate ships a plugin manifest (.claude-plugin/plugin.json)
and a marketplace catalog (.claude-plugin/marketplace.json) that catalogs the
checkout as an installable plugin. The install phase runs the supported Claude
Code CLI registration:
claude plugin marketplace add <predicate-dir>
claude plugin install predicate@predicateBoth commands are idempotent, so re-running install is a no-op. After this,
Predicate's skills are available in every project under the predicate:
namespace (the core workflow, for instance, is invoked as predicate:core).
The claude CLI must be on your PATH; if it is not, install
Claude Code first.
Antigravity CLI — Antigravity discovers plugins from a file-based directory,
so the install phase symlinks the checkout into its plugins directory under
~/.gemini/antigravity-cli/plugins/predicate.
After registering the plugin, install delivers the always-on conditioning
layer natively into each harness. Predicate ships a conditioning layer
(conditioning/) that generates a structured system prompt for each role.
The generator (conditioning/compose.ncl) composes invariant-core ++ persona(role) and enforces a contract (HasCore) that makes it structurally
impossible for any persona to drop the always-on law. The install phase
materializes the generated prompts into each harness's native system-prompt
surface at install time:
- Claude Code — writes an output style to
~/.claude/output-styles/predicate-architect.md(frontmatterkeep-coding-instructions: false, which empties Claude Code's built-in software-engineering block while preserving tool definitions, environment info, agent identity, and safety scaffolding). It also materializes every worker permutation as a subagent under~/.claude/agents/predicate-<role>.md(the subagent body becomes that role's full system prompt). - agy — writes the architect law as a managed block into
~/.gemini/GEMINI.md.
See conditioning-layer.md for the composition contract and delivery details.
The output style is the single always-on surface. No @import of rules.md or
ambient.md is written to CLAUDE.md; rules.md is the authoritative source for
the invariants and is loaded by invoked skills — the conditioning prompt already
carries the invariant core into every session.
The
installphase touches only your global config. It installs no git hooks and creates no.ledger— those are per-project, and belong toinit.
From inside any repository you want Predicate to govern, run the init phase:
cd /path/to/your/project
<predicate-dir>/bootstrap/install.sh init --project .It performs the per-repository setup:
- Installs the three-tier commit gate by calling
hooks/install-hooks.sh— thecommit-msgandpre-commithooks.commit-msgenforces Conventional Commits form plus self-containment (no internal campaign references a stranger readinggit logcould not resolve).pre-commitruns three tiers: the structural tier always runs (referential integrity, markdown link validity, Nickel contract satisfaction); the authority tier runs only when a campaign DAG is active (staged paths must be authorized by the DAG); and the process tier fires only when an agent walk is registered (procedure deposits are validated against their contract class). The installer links the hooks as symlinks into your repo's untracked.git/hooks/, each pointing back to the plugin checkout. Nothing is added to your project's tracked tree, and the symlinks are auditable and removable (rm .git/hooks/{pre-commit,commit-msg}). The hooks self-locate their gate machinery from their own path back in the checkout, so they keep working with no copy frozen into your project. - Initializes the
.ledgersubrepo — the project's flight-recorder for durable agent history — and configures its remote (it never pushes; pushing is left to you).
To point the .ledger remote at your own repository, set the remote URL when
initializing:
PREDICATE_LEDGER_REMOTE=git@github.com:you/yourproject-ledger.git \
<predicate-dir>/bootstrap/install.sh init --project .When you are ready, push the .ledger subrepo yourself:
git -C .ledger push -u origin mainThe gates and hooks run with Predicate's own defaults out of the box. To override
them for your project, copy .ledger/config.sh.example to .ledger/config.sh and
edit it — the example documents every overridable variable (the commit
self-containment pattern, the orphan-scan targets, the removed-workflow set, and
more) with Predicate's defaults shown.
Predicate is self-contained: init vendors no machinery into your tree. After
initializing, your project's only Predicate footprint is:
- Untracked
.git/hooks/{pre-commit,commit-msg}symlinks pointing back to the checkout — auditable, and removable with a plainrm. Nohooks/directory appears in your tracked tree. - Its own
.ledger/— the flight-recorder subrepo plus theconfig.sh.exampleoverride surface.
For any Nickel artifacts of your own that build on Predicate's ledger contracts,
import them by the logical convention — import "dag.ncl" — rather than a path
into the plugin. The gate runner injects the plugin's contract directory on the
Nickel import path, so the logical name resolves without your artifact knowing
where the plugin lives.
Runtime floor. Predicate's gates assume a small, standard toolchain on
PATH: a coreutils-grade realpath (the hooks self-locate the plugin via
realpath), plus bash, git, a stdlib-only python3, and either nickel or
nix for the ledger checks. These are the only host assumptions.
The install phase delivers the conditioning output style, so an AGENTS.md is
not required for skills to load — basic use works without one. It remains useful for
project-specific context the global rules cannot know — build commands, an
architecture overview, and explicit skill routing.
It is also the anchor the prevention layer builds on: the
/orient workflow maps a repository and authors a
nested AGENTS.md hierarchy (ecosystem ⊃ project ⊃ component) holding the goal,
requirements, and invariants so every subsequent walk is anchored against drift.
Optional to start; load-bearing once you adopt the prevention half.
Create an AGENTS.md in your project root and fill in:
- Project Overview — what the project does and its high-level architecture.
- Active Skills — the skills that apply to your project.
- Build & Commands — how to test, build, and lint.
Example active skills for a Go project:
**Active Skills:**
- go (Go idioms)
- sdma (Domain modeling)Confirm your agent runner detects and loads the Predicate configuration.
-
Verify the registration: For Claude Code, run
claude plugin listand confirmpredicate@predicateappears, enabled. The skills surface under thepredicate:namespace. -
Verify the conditioning output style: For Claude Code, check that
~/.claude/output-styles/predicate-architect.mdexists and that worker agents appear under~/.claude/agents/predicate-<role>.md. For agy, check that~/.gemini/GEMINI.mdcontains the predicate managed block (between the# >>> predicate conditioning block >>>sentinels). A new session receives the invariant core via the installed native surface. -
Verify the skills list: When you launch your runner, the startup metadata's Available skills block should list the Predicate skills (
constitution,engineering, a language skill such asrustorgo, and a workflow such ascoreorrefine). -
Verify semantic triggering: Direct the agent in natural language (e.g., "Let's run the core workflow"). The runner matches your request against the skill descriptions and loads the required skill context.
-
Verify the commit gate: In an initialized project, attempt a commit with a non-conforming message; the
commit-msghook should reject it. To scan the whole repository for stale workflow references at any time, run the orphan gate directly:<predicate-dir>/gates/check_orphans.sh . plan charter sketch
- Custom content: See authoring.md for writing your own custom skills.
- Architecture overview: See predicate-architecture.md for the correction/prevention architecture, the gate tiers, and the contract surface.
- Conditioning layer: See conditioning-layer.md for the system-prompt-as-law mechanism and how the invariant-core is injected.
- Primitives: See primitives.md for the five cross-cutting primitives (P-GROUND, P-ARSENAL, P-COMPOSE, P-INTENT, P-TRACK) that the machinery composes on.
- Forking: Fork the Predicate repository and point your global clone at your fork to maintain custom organizational skills.