From predicate
Systematically searches for prior art in production code, RFCs, and academic papers to inform design of algorithms and protocols.
How this skill is triggered — by the user, by Claude, or both
Slash command
/predicate:prior-artThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Search → Audit → Adapt → Clean**
Search → Audit → Adapt → Clean
This skill is the procedure the ambient Outward-Search Reflex invokes (ambient.md §"Outward-Search Reflex"). The mandate is ambient — every walker that reaches a design fork, a missing fact, or a non-trivial pattern runs this procedure before halting. The skill documents the how: tiered search, shallow-clone workspace hygiene, ≥2-reference grounding, and cleanup before every commit.
Adversarial path anchor. This lens is also invoked on the Verification Dual's adversarial path (rules.md §2 Invariant 1): the Dual's thesis — externalize correctness, never trust the generator's confidence — applies to external knowledge. Internal confidence is not evidence; a context-free search in decorrelated sources (production code, RFCs, literature) closes the condition where no deterministic evaluator exists.
When addressing a non-trivial architectural or algorithmic task, you must systematically search for existing work using the following priority tiers:
graph TD
A["Start Search Walk"] --> B{"Tier 1: Production Code Available & Permissive?"}
B -- "Yes" --> C["Audit Code & Extract Invariants (MIT/Apache-2.0)"]
B -- "No / Restricted (GPL)" --> D{"Tier 2: Official Standards / RFCs Available?"}
D -- "Yes" --> E["Map Normative Protocol Constraints from Specification"]
D -- "No" --> F{"Tier 3: Academic Papers / Formal Specifications (arXiv, TLA+)?"}
F -- "Yes" --> G["Extract Mathematical Theorems & State Transitions"]
F -- "No" --> H["Halt Sequence: Insufficient Constraints to Warop IBC"]
MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, OPTIONAL).If no verified prior art, standard, or literature can be located for a highly complex algorithm, you MUST halt and transition to manual clarification. Greenfield sequence walks without empirical or mathematical groundings are forbidden.
To inspect codebases in the wild without cluttering the local workspace, you must adhere to the following git cloning rules:
.prior_art_cache/./tmp/ or /home/) is strictly prohibited.--depth 1): Always append --depth 1 to git clone to avoid downloading historical commits and large historical objects.# 1. Clone without checking out files, using blobless filtering
git clone --depth 1 --filter=blob:none --sparse --no-checkout <repo_url> .prior_art_cache/<repo-name>
# 2. Configure sparse checkout paths
cd .prior_art_cache/<repo-name>
git sparse-checkout set <target-directory-or-file>
# 3. Checkout target files only
git checkout
rm -rf .prior_art_cache/ before executing any commit boundary or finalizing a task. No external source code repositories may remain in the active workspace at commit boundaries.When prior art is located and utilized, record findings in the active sketch ledger. For each source, capture: the URL or citation, the architectural/design pattern or algorithm, its key strengths, how its invariants will be adapted to the target codebase, and the license (MIT, Apache-2.0, BSD-3-Clause). For literature, record the title, DOI or arXiv/RFC identifier, the proven safety or liveness invariants extracted, and any pseudocode or state-machine parameters.
Do not copy code directly from external repositories. All extracted prior art must be audited against:
npx claudepluginhub nrdxp/predicate --plugin predicateUse when about to build any feature, library, or system - searches GitHub and package registries for existing implementations to study, harvest patterns from, or use directly instead of building from scratch
Researches external documentation, best practices, and industry standards via web search and codebase analysis. Useful for library docs, implementation comparisons, and recommended structures.
Searches internal codebase patterns and GitHub for open-source implementation references, filtering repos by quality and extracting code excerpts.