/predicate:formfrom predicate
Guides formal mathematical domain modeling using categorical, coalgebraic, and information-theoretic lenses. Activates on /form or when discussing formal modeling workflows.
Ships in predicate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Identify → Select → Construct → Validate → Record → Connect
This workflow defines the C.O.R.E. Modeling phase. The objective is to define the formal structural representation of a domain, establishing the state space, transition relationships, and coalgebraic dynamics. This serves as the structural foundation from which normative constraints and test invariants are derived.
Formal models are the bridge between empirical observations and proof. An olog, a coalgebra, a session type specification — each makes implicit relationships explicit and mathematically verifiable. Without formal models, sequence trajectories are guided by anthropomorphic verbal descriptions that cannot be checked or formally composed.
FORM provides the procedure for constructing these structural representations. The sdma skill defines a foundational toolkit of categorical, coalgebraic, and information-theoretic isomorphisms. The principle of minimal representation governs selection: choose the simplest mathematical formalism that faithfully captures the domain's structure, and use it to map the state space for subsequent verification loops.
[!IMPORTANT] FORM produces formal model documents — either creating new ones from
templates/MODEL.mdor scrutinizing existing documents (protocol specs, whitepapers, design docs) through the SDMA lens. It is structural analysis, not planning, exploration, or implementation: strategic planning and exploration are the standing Planning Invariants and Sketch Principle, and implementation is/core. If you find yourself writing code or redesigning architecture, you've left FORM territory.
MODEL operates in two modes, determined by context:
Trigger: No existing document specified. The human requests a formal model for a domain or problem.
Flow: Produce a new model document from templates/MODEL.md, committed to docs/models/.
Output: A complete model document with all five template sections filled.
Trigger: An existing document is specified (protocol spec, whitepaper, design doc, etc.).
Flow: Scrutinize the existing document through the SDMA lens. Identify which formalisms apply, what structure is implicit, where rigor is missing, and what the formal model reveals.
Output: Either annotations/refinements to the existing document, or a companion model document in docs/models/ that formalizes the document's domain.
[!NOTE] In Apply mode, the target document may not need all SDMA formalisms. The Decision Matrix (SDMA §6) determines which tools are relevant. Don't force a formalism where none is warranted.
# 1. STATE METADATA
STATUS: [IDENTIFY | SELECT | CONSTRUCT | VALIDATE | RECORD | CONNECT]
# 2. CONTEXT
CTX:
MODE: [CREATE | APPLY]
DOMAIN: "Problem domain being modeled"
TARGET: "path/to/existing/doc.md" # Apply mode only
SCOPE: "What aspect of the domain to model"
# 3. FORMALISM SELECTION (populated in SELECT)
FORMALISM:
PRIMARY: "Selected representation (from Decision Matrix)"
SUPPORTING: ["Additional formalisms if layered"]
RATIONALE: "Why this formalism fits the domain"
# 4. MODEL (populated in CONSTRUCT)
MODEL:
TYPE: "Olog | Coalgebra | Session Type | LinRel | Hyperdoctrine | ..."
COMPONENTS: ["Key structural elements of the model"]
# 5. VALIDATION (populated in VALIDATE)
VALIDATION:
CHECKS:
- CHECK: "What was verified"
RESULT: [PASS | FAIL | PARTIAL]
DETAIL: "Specifics"
Characterize the problem domain and determine what needs formal modeling.
Create mode:
Apply mode:
Choose the appropriate formalism(s), starting from the Decision Matrix (SDMA §6) but not constrained by it.
Both modes:
[!IMPORTANT] HALT after SELECT. Present the formalism selection and rationale to the human before constructing the model. Wrong formalism choice cascades into wasted work.
Build the formal model.
Create mode:
Apply mode:
Verify the model's internal consistency, external adequacy, and framing assumptions.
Document all validation checks and their results.
Commit the model as a durable artifact.
Create mode:
templates/MODEL.mddocs/models/<domain-name>.mdApply mode:
docs/models/, or integrate findings directly into the target document (human's choice)templates/MODEL.md with the Source Document field populated[!IMPORTANT] Template discipline. Create mode documents MUST use
templates/MODEL.md. Ad hoc formats are a protocol violation. Apply mode companion documents also use the template; integrated annotations follow the target document's format.
Link the formal model to the verification pipeline:
docs/models/.docs/specs/ to verify that the model's state space conforms to the specification constraints.IDENTIFY ──→ SELECT (domain understood, characteristics identified)
└─→ ABORT (domain not suitable for formal modeling)
SELECT ──→ CONSTRUCT (formalism chosen, human approved)
└─→ IDENTIFY (wrong scope — need to reframe)
CONSTRUCT ──→ VALIDATE (model built)
└─→ SELECT (formalism doesn't fit — need different tool)
VALIDATE ──→ RECORD (model passes validation)
└─→ CONSTRUCT (validation failures require model revision)
RECORD ──→ CONNECT (artifact committed)
CONNECT ──→ DONE (context linked, implications noted)
You MUST stop and await human input at:
docs/
└── models/
└── <domain-name>.md # formal model artifact
Model filenames should be descriptive of the domain being modeled, not the formalism used. Example: docs/models/payment-protocol.md, not docs/models/session-type-1.md.
If a sketch exists for the current workstream:
The sketch captures the modeling journey; the model document captures the outcome.
FORM is a domain-specific structural-analysis tool, not a pipeline stage:
explore (ambient Sketch Principle) → understand the problem space
↓
/form → formalize domain understanding (can be invoked from any phase)
↓
/spec → declare normative constraints over the model (→ what MUST hold)
↓
/core → regulate state (guided by model, constrained by spec)
FORM can be invoked standalone or from within any other workflow. A model produced while exploring informs the strategy that follows; a model produced during /core validates implementation decisions. The formal model is a structural analysis tool available at any point. Strategy itself is governed by the ambient Planning Invariants, not a discrete planning workflow.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nrdxp/predicate --plugin predicate35 skills in this plugin
/ai-auditSOP 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.
/api-auditProtocol 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.
/boundaryNormative sufficiency conditions for Initial Boundary Conditions (IBCs)
and the SOP for the cheap-tier boundary refinement loop (/boundary).
Trigger when:
- Crafting, auditing, or refining a prompt/IBC destined for an expensive
(architect-class) model or an autonomous worker dispatch.
- Evaluating whether a task frame is sufficient to bound an agent walk.
- Prompt contains: /boundary, IBC, initial boundary condition, boundary
contract, sufficiency conditions, worker prompt, prompt refinement.
Other plugins' skills for the same job