From predicate
Enforces engineering safety and maintainability rules including trajectory freeze, clarification triggers, and uncertainty thresholds for code edits, refactoring, and git workflows.
How this skill is triggered — by the user, by Claude, or both
Slash command
/predicate:engineeringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The following are hard **requirements**, not suggestions. Violating any rule below is considered a failure mode requiring immediate correction.
The following are hard requirements, not suggestions. Violating any rule below is considered a failure mode requiring immediate correction.
The mandatory-halt conditions and the divergence triggers (generative interpolation, accepting unverified assertions, suppressing discrepancies) are always-on and bind every walk whether or not this skill is invoked. They are stated authoritatively as Trajectory freeze conditions under Code-Edit Constraints in ambient.md. The tables below elaborate how to apply them in practice.
Invoke clarification under these conditions:
| Uncertainty Level | Criteria | Action |
|---|---|---|
| None (0.0) | Clear requirement, established pattern, no ambiguity. | Proceed. If the change is API-breaking, still confirm. |
| Low (0.1-0.3) | Explicit constraints with minor implementation ambiguities. | Present implementation path and query for targeted constraint boundaries before proceeding. |
| High (>0.3) | Multiple valid interpretations, conflicting constraints. | Halt sequence walk and request specific boundary parameter corrections. |
When in doubt, err toward halting. Wasted clarification is cheaper than trajectory drift.
[!NOTE] This table applies to general execution. In C.O.R.E. planning, the ambiguity gate uses a qualitative
OBSTACLESlist: the list must be empty before the sequence may advance from CLARIFY to PLAN. There is no numeric uncertainty field in the C.O.R.E. grammar.
The objective of this ruleset is to constrain code generation to output Production-Grade Correctness, maintainability, and security. Trajectories must converge on stable, decoupled, and verifiable states.
[!NOTE] The always-on binding constraints — production-grade correctness, no silent failures, strong typing, and the robust-testing mandate — are stated authoritatively under Code-Edit Constraints in ambient.md. The rules below are the reference elaboration of those principles: the language-specific detail, tables, and conventions for applying them.
Before writing code, understand the existing landscape:
Pattern Matching: Mimic existing directory structure and coding style strictly. Do not introduce foreign idioms. When uncertain, search for prior art in the repo (e.g., "How are errors handled elsewhere?") and follow established patterns.
Tip: If MCP tools are available, use them first for structural insight before reading individual files.
Never apply band-aid fixes. Analyze root causes; re-architect if the foundation is flawed. If a fix requires more than local changes, stop and discuss the broader implications.
// TODO within the scope of the current task.Check the project version in Cargo.toml, package.json, go.mod, or equivalent manifest:
0.x.x): Stability is secondary. Prefer correct design over backward compatibility.1.0.0+): Breaking changes to public APIs are forbidden without explicit user approval. Present trade-offs and await confirmation.When specification, tests, and code disagree:
This is a collaborative investigation, not a unilateral decision.
Before beginning any non-trivial task:
test_login_fails_with_invalid_credentials).any / interface{} unless necessary.Code goes wrong along two axes, not one. A single-lens review audits half the code.
Structural simplicity (spatial axis): Are independent concerns interleaved? Two ideas braided into one module, one function, or one match arm so that touching one forces you to touch the other = complected. The fix is separation. The dual — one domain concept shattered across multiple locations whose coherence depends on an unenforced rule — is fragmentation. The fix is reunification. See /hickey for the full evaluation procedure.
Volatility alignment (temporal axis): Do boundaries encapsulate axes of change, or do they just group related functionality? Code that works today but places a decision in the wrong layer — where it will rev on a different clock than its neighbors — is a volatility time-bomb. Functional decomposition maximizes the blast radius of change; volatility-based decomposition contains it. See /lowy for the full evaluation procedure.
When reviewing architectural decisions, run both lenses. Findings will predominantly be single-axis. When both lenses converge on the same location, the signal is particularly acute.
Validate external inputs at system boundaries. Never trust user input, API responses, or file contents without validation. Fail fast with clear error messages.
thiserror, fmt.Errorf("%w", ...)).| Context | panic/unwrap Allowed? | Guidance |
|---|---|---|
| Library Code | ❌ No | Return Result/Option. Never panic. |
| Application Entry | ✅ Limited | Convert Result to exit code with clear message. |
| Test Code | ✅ Yes | Panic = test failure; acceptable for brevity. |
| Initialization | ✅ If Unrecoverable | Use expect("clear message"). |
Libraries: No direct output. Return errors/results to the caller.
CLI Applications:
Web/Server Applications:
Update comments and documentation immediately when logic changes. Stale documentation is a bug.
Git hygiene matters to engineering for the same reason type safety does: a
clean, human-reviewable history is the durable interface between the work and
the reviewer who must reconstruct its reasoning from git log alone. The rules
that produce that history are not restated here — they have a single authority:
git push and history rewriting, are the
Commit Gate in rules.md.Engineering's only addition: a diff that compiles and passes tests but smears several logical changes together is still a defect by this skill's standards, not merely a hygiene nit. Atomicity is part of production-grade correctness, not a separable formality.
For multi-step work:
When a mistake is discovered or you find yourself confused:
When modifying an upstream dependency appears to be the correct solution:
When rules appear to conflict, use this hierarchy as a guideline, but remain context-aware:
npx claudepluginhub nrdxp/predicate --plugin predicateImplementation skill emphasizing verification-driven coding with tight feedback loops. Guides multi-step implementation work: orient, plan, implement, verify, commit. Based on analysis of 21k+ operations.
Enforces Karpathy guidelines to prevent LLM coding errors: read before writing, surgical changes only, verify assumptions, define success upfront. Use for feature implementation, code modifications, or scope discipline.
Dispatches 5 specialized agents for multi-perspective code review on correctness, architecture, security, production readiness, and test quality. Merges findings, auto-fixes Critical/Important issues up to 3 rounds.