with one click
core-patterns
// Base templates for error escalation, decision criteria, and enforcement. Referenced by agents and commands to avoid duplication.
// Base templates for error escalation, decision criteria, and enforcement. Referenced by agents and commands to avoid duplication.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | Core Patterns |
| description | Base templates for error escalation, decision criteria, and enforcement. Referenced by agents and commands to avoid duplication. |
| version | 2.0.0 |
Boundary tests required:
boundary_success_80: Exactly 80, yields success
boundary_warning_79: 78.5-79.9, yields warning
boundary_error_59: 58.5-59.9, yields error
</example>
Naming convention for enforcement behavior IDs
Format: PREFIX-TYPE-NUMBER
PREFIX: Agent/command abbreviation (e.g., EXEC, DEF, EXP)
TYPE: B for mandatory behavior, P for prohibited
NUMBER: Sequential (001, 002, ...)
Examples:
EXEC-B001: Execute command mandatory behavior 1
DEF-P002: Define command prohibited behavior 2
</example>
Decision criteria weights must sum to 1.0
Standard distributions:
3-factor equal: 0.33, 0.34, 0.33
3-factor weighted: 0.4, 0.3, 0.3
2-factor equal: 0.5, 0.5
2-factor weighted: 0.6, 0.4
Standard 4-level error escalation template
Minor issue description
Note in report, proceed
Unclear or ambiguous situation
Document issue, use AskUserQuestion for clarification
Breaking change or blocker
STOP, present options to user
Security risk or data loss
BLOCK operation, require explicit user acknowledgment
Standard decision criteria with validation tests including boundary cases
Excellent condition
Good condition
Fair condition
Poor condition
Excellent
Good
Fair
Poor
Excellent
Good
Fair
Poor
factor1=95, factor2=90, factor3=95
(95*0.4)+(90*0.3)+(95*0.3) = 38+27+28.5 = 93.5
success
High scores yield success
factor1=85, factor2=75, factor3=80
(85*0.4)+(75*0.3)+(80*0.3) = 34+22.5+24 = 80.5
success
Weighted average 80.5 meets success threshold
factor1=80, factor2=75, factor3=80
(80*0.4)+(75*0.3)+(80*0.3) = 32+22.5+24 = 78.5
warning
Weighted average 78.5 triggers warning
factor1=60, factor2=55, factor3=60
(60*0.4)+(55*0.3)+(60*0.3) = 24+16.5+18 = 58.5
error
Weighted average 58.5 is below 60, triggers error
factor1=50, factor2=55, factor3=45
(50*0.4)+(55*0.3)+(45*0.3) = 20+16.5+13.5 = 50
error
Low scores yield error
Standard enforcement template with mandatory and prohibited behaviors
When condition occurs
Required action
How to verify compliance
Always
Prohibited action description
What to do instead
Standard syntax for referencing skills from agents and commands
core-patterns
parallelization-patterns
workflow-patterns
serena-usage
nix-ecosystem
Use attribute values: patterns: Shared templates (core-patterns, parallelization-patterns, workflow-patterns) tools: Tool-specific usage patterns (serena-usage, context7-usage) workflow: How-to guides and methodologies (investigation-patterns, execution-workflow) domain: Domain knowledge and best practices (nix-ecosystem, typescript-ecosystem)
<error_escalation> Minor inconsistency in behavior ID format Note in report, proceed Missing one boundary test Document issue, add missing test Decision criteria weights do not sum to 1.0 STOP, fix weight distribution before proceeding Error escalation missing critical level BLOCK operation, require complete 4-level structure </error_escalation>
When creating new agent or command Reference core-patterns skill in refs section refs tag contains core-patterns When defining decision_criteria Include all 5 validation tests with boundary cases Tests include boundary_success_80, boundary_warning_79, boundary_error_59 Always Using non-standard confidence thresholds Use 60/80 thresholds as defined in this skill<anti_patterns> Duplicating full error_escalation in each file Reference core-patterns and customize only examples
Using different confidence thresholds (75, 80, 85) across files Always use 60/80 boundaries as defined in core-patterns Omitting boundary validation tests (59/60, 79/80) Always include boundary_success_80, boundary_warning_79, boundary_error_59 tests Decision criteria weights not summing to 1.0 Verify weights sum to exactly 1.0 (e.g., 0.4+0.3+0.3) Using different ID formats across files Use PREFIX-TYPE-NUMBER format consistently<best_practices> Reference core-patterns for error_escalation, decision_criteria, enforcement templates Always include all 5 validation tests: success, boundary_success_80, boundary_warning_79, boundary_error_59, error Ensure decision criteria weights sum to 1.0 Customize error_escalation examples to be domain-specific while keeping structure Use consistent behavior ID prefixes within each agent/command </best_practices>
Always include all 5 validation tests for decision_criteria Boundary tests must use exact threshold values (80, 79.x, 59.x) Error escalation must have exactly 4 severity levels Weights in decision_criteria must sum to 1.0 Use refs tag to reference this skill from agents and commands Customize examples in error_escalation while keeping structure Use consistent behavior ID naming convention Read relevant source files and docs Search for patterns and references<decision_tree name="skill_activation"> Does the task clearly match this skill domain? Use this skill workflow and constraints Use a more appropriate domain skill </decision_tree>
<related_agents> Locate code patterns and references for this domain Review implementation quality against this skill guidance </related_agents>
Define exactly 4 severity levels for error_escalation Include all 5 validation tests for decision_criteria Ensure weights sum to 1.0 Use standard confidence thresholds (60/80) Inventing new severity levels Omitting boundary tests Using non-standard thresholds<related_skills> Parallel execution strategies and timeout configuration Output formats, reflection checkpoints, agent weights For memory operations to store pattern decisions </related_skills>