confidence-based-strictness
Skill6 starsChanged 8 months agoMITView on GitHub
Use when the complexity or unfamiliarity of a task should increase guardrail enforcement. Scales verification depth based on how confident the system is in the correctness of the generated code.
In this repository64 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-backward-compatibilitySkill
- api-design-standardsSkill
- api-versioningSkill
- database-designSkill
- distributed-systemsSkill
- observability-by-defaultSkill
- performance-budgetsSkill
- resilience-patternsSkill
- twelve-factor-appSkill
- codex-cross-reviewSkill
- dispatching-parallel-agentsSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- architecture-awarenessSkill
- intent-to-specSkill
- project-diagnosisSkill
- using-shipworthySkill
- systematic-debuggingSkill
- documentation-as-codeSkill
- accessibilitySkill
- frontend-standardsSkill
- retrospectiveSkill
- writing-skillsSkill
- ci-cd-awarenessSkill
- context-managerSkill
- environment-setupSkill
- feature-flag-disciplineSkill
- finishing-a-development-branchSkill
- guardrail-audit-logSkill
- incident-responseSkill
- mcp-integrationSkill
- migration-strategiesSkill
- production-readinessSkill
- scope-creep-detectionSkill
- session-memorySkill
- slo-sli-definitionSkill
- tech-debt-trackingSkill
- using-git-worktreesSkill
- zero-downtime-migrationsSkill
- brainstormingSkill
- decision-frameworksSkill
- design-documentsSkill
- executing-plansSkill
- writing-plansSkill
- code-complexitySkill
- error-handling-patternsSkill
- feedback-driven-adaptationSkill
- quality-gatesSkill
- response-schema-validationSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- adaptive-securitySkill
- bias-detectionSkill
- compliance-awarenessSkill
- container-securitySkill
- dependency-managementSkill
- pii-detectionSkill
- secrets-managementSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
No extra verification needed
- Distinctive: line 41
Run full test suite, not just affected tests
- Distinctive: line 42
Verify no unintended side effects on related modules
- Distinctive: line 50
No existing tests in the affected area
- Distinctive: line 76
Hard block: Do not proceed without explicit user acknowledgment of risk
- Distinctive: line 78
If proceeding: require formal verification plan, edge case matrix, and rollback strategy
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Confidence-Based Strictness
Core Rule
When confidence is low, verification must be high. The more uncertain the system is about the correctness of generated code, the more guardrails should activate and the stricter they should be.
Confidence Levels
Level 1: High Confidence (Routine)
Indicators:
- Well-known pattern (CRUD endpoint, form validation, standard middleware)
- Single clear approach — no ambiguity about the right solution
- Existing tests cover the area being modified
- Small change to an established codebase
- Language/framework the project already uses
Guardrail Response:
- Standard enforcement — normal quality gates
- Tests must pass, lint must pass
- No extra verification needed
Level 2: Moderate Confidence (Non-Trivial)
Indicators:
- Multiple valid approaches exist (design decision needed)
- Modifying code without existing test coverage
- New feature in an established codebase
- Performance-sensitive code where the "obvious" approach may not be optimal
- Cross-module changes that could have side effects
Guardrail Response:
- All standard guardrails plus:
- Require tests before and after (TDD flow)
- Run full test suite, not just affected tests
- Verify no unintended side effects on related modules
- Suggest code review before merge
Level 3: Low Confidence (High Uncertainty)
Indicators:
- Unfamiliar domain (cryptography, financial calculations, distributed consensus)
- Complex algorithm with edge cases
- No existing tests in the affected area
- Security-critical path (authentication, authorization, payment)
- Concurrency or race condition potential
- External API integration with unclear behavior
- Regulatory implications (HIPAA, PCI-DSS, GDPR)
Guardrail Response:
- All moderate guardrails plus:
- Mandatory threat model review (
shipworthy:threat-modeling) - Edge case enumeration — list and test boundary conditions explicitly
- Require verification evidence for every claim (see
shipworthy:verification-before-completion) - Suggest splitting the change into smaller, independently verifiable steps
- Activate domain-specific skills (compliance-awareness, bias-detection, etc.)
- Flag for human review with specific review focus areas
Level 4: Minimal Confidence (Dangerous Territory)
Indicators:
- Rolling your own cryptography or security primitives
- Implementing financial calculation without domain expert review
- Modifying database migration in production with live data
- Writing code that bypasses existing safety checks
- Implementing consensus or distributed locking
Guardrail Response:
- All low-confidence guardrails plus:
- Hard block: Do not proceed without explicit user acknowledgment of risk
- Recommend using a well-tested library instead of custom implementation
- If proceeding: require formal verification plan, edge case matrix, and rollback strategy
- Log to guardrail audit as
severity: 'block'
Confidence Assessment Triggers
Automatically assess confidence when any of these occur:
| Trigger | Assessment |
| New file created | What domain is this? Is the pattern standard or novel? |
| Function over 30 lines | Complexity increases uncertainty — run Level 2+ checks |
crypto, hash, encrypt, sign in code | Level 3 minimum — security-critical |
price, amount, fee, interest, tax in code | Level 3 minimum — financial calculation |
lock, mutex, atomic, channel, semaphore | Level 3 minimum — concurrency |
migration, alter table, drop | Level 3 minimum — data mutation |
| No tests exist in the directory | Level 2 minimum — no safety net |
| Multiple TODO/FIXME in the area | Level 2 minimum — known tech debt |
| External API call | Level 2 minimum — behavior depends on third party |
Verification Scaling
As confidence decreases, verification requirements increase:
| Confidence | Tests Required | Review Required | Evidence Required |
| High | Existing tests pass | Standard | Build succeeds |
| Moderate | New tests + full suite | Suggested | Tests + lint + build |
| Low | Edge case matrix + full suite | Required | Tests + threat model + verification evidence |
| Minimal | Formal verification plan | Hard block until acknowledged | Full audit trail + rollback plan |
How to Apply
When generating code:
- Assess — check the confidence indicators against the current task
- Announce — tell the user the confidence level and why
- Scale — activate the guardrails appropriate for that level
- Verify — run verification at the depth the confidence level requires
- Log — record the confidence assessment in the guardrail audit trail
Example announcement:
Confidence: LOW — this involves financial calculation (interest compounding)
and the codebase has no existing tests in this area.
Activating: threat-modeling, edge case enumeration, verification-before-completion.
I'll split this into smaller steps and verify each independently.Rationalization Pressure Test
| Excuse | Counter |
| "I'm confident this is right" | Confidence is subjective. Check the indicators — unfamiliar domain, no tests, security-critical path. If any apply, escalate regardless of feeling |
| "It's just a simple function" | Simple functions in complex domains (crypto, finance, concurrency) are where the worst bugs hide. Domain complexity trumps code complexity |
| "We don't need threat modeling for this" | If the code touches auth, payments, or user data, threat modeling is non-negotiable. The cost of skipping it is measured in breaches |
| "The tests will catch any issues" | Tests catch what you thought to test for. Low-confidence code has unknown unknowns — that's why it needs more verification, not less |
| "This is slowing us down" | A bug in crypto or financial code slows you down for months. An extra hour of verification is cheap insurance |
| "I've written similar code before" | Similar is not identical. Edge cases in unfamiliar domains are what kill you. Verify, don't assume |
Code Review Checklist
- Confidence level assessed and announced for non-trivial code
- Guardrail escalation matches the assessed confidence level
- Security-critical code always at Level 3+
- Financial calculation code always at Level 3+
- Concurrency code always at Level 3+
- Custom crypto or security primitives always at Level 4 (hard block)
- Verification evidence scales with uncertainty
- User informed of confidence assessment and activated guardrails
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

