Input Classification System
1. Skill Name
Input Classification System
Identifier: input-classification-system
2. Version
1.0
This is the initial release of the Input Classification System skill.
3. Skill Purpose
Provide a deterministic, rule-based classification system that enables the Main Agent to categorize clarified user input into exactly one primary task category, assign execution complexity, assess risk level, and determine confidence score before any task decomposition or execution planning occurs.
Measurable Objectives:
- Achieve 100% single-category classification (no ambiguous multi-category outputs)
- Provide deterministic tie-breaking for all edge cases
- Assign complexity levels using measurable thresholds
- Calculate confidence scores with explicit formulas
- Route ambiguous inputs to clarification with specific triggers
4. What This Skill Does
- Classifies clarified input into exactly one primary category from a fixed list
- Assigns complexity level based on measurable operation counts and time estimates
- Calculates risk level based on impact scope and reversibility criteria
- Computes confidence score using explicit scoring factors
- Determines if input requires additional clarification
- Sets the appropriate state transition after classification
- Applies deterministic tie-breaking logic when multiple categories match
- Validates that input has been clarified before classification
- Logs all classification decisions with full context
- Provides secondary tags for additional context (maximum 3)
- Enforces boundary definitions between categories
- Triggers escalation for high-risk or low-confidence classifications
- Prevents misclassification through explicit rules
- Outputs structured ClassificationResult for downstream systems
- Maintains audit trail for all classification decisions
5. What This Skill Must Not Do
- Must not perform task decomposition or breakdown
- Must not solve or execute any tasks
- Must not create execution plans or strategies
- Must not apply emotional reasoning or sentiment analysis
- Must not assign multiple primary categories to a single input
- Must not overlap with Clarification System responsibilities
- Must not modify the original input content
- Must not make assumptions about user intent without explicit indicators
- Must not skip complexity assessment for any classification
- Must not bypass risk assessment for any classification
- Must not assign confidence scores below threshold without escalation
- Must not classify inputs that have not been clarified first
- Must not use probabilistic or non-deterministic classification methods
- Must not ignore tie-breaking rules when categories conflict
- Must not proceed to execution without setting state transition
6. Activation Conditions
This skill activates when ALL of the following conditions are met:
- Clarification Complete: Input has been processed by the Clarification System and marked as clarified
- No Pending Questions: No outstanding clarification questions remain
- Classification Not Yet Performed: Input has not been previously classified
- Valid Input Structure: Input contains recognizable task indicators
Pre-Activation Checklist:
Do NOT activate if:
- Input is still being clarified
- Input is a clarification question itself
- Input is a response to a clarification question
- Input has already been classified
7. Classification Categories
The following 15 categories form the fixed classification list:
| Category |
Code |
Description |
| CODE_GENERATION |
CG |
Writing, modifying, or generating source code |
| CODE_REVIEW |
CR |
Reviewing, analyzing, or auditing existing code |
| DEBUGGING |
DB |
Identifying and fixing bugs, errors, or issues |
| DATA_ANALYSIS |
DA |
Analyzing, processing, or visualizing data |
| FILE_OPERATIONS |
FO |
Reading, writing, moving, or managing files |
| DOCUMENTATION |
DC |
Creating or updating documentation |
| REFACTORING |
RF |
Restructuring code without changing behavior |
| TESTING |
TS |
Writing, running, or managing tests |
| DEPLOYMENT |
DP |
Deploying applications or infrastructure |
| RESEARCH |
RS |
Investigating, searching, or gathering information |
| CONFIGURATION |
CF |
Setting up or modifying configurations |
| COMMUNICATION |
CM |
Drafting messages, emails, or communications |
| CONVERSION |
CV |
Transforming data or files between formats |
| ANALYSIS |
AN |
General analysis not covered by other categories |
| PLANNING |
PL |
Creating plans, strategies, or roadmaps |
Category Priority Order (for tie-breaking):
- DEBUGGING (highest - immediate attention needed)
- DEPLOYMENT
- CODE_GENERATION
- REFACTORING
- TESTING
- CODE_REVIEW
- DATA_ANALYSIS
- CONFIGURATION
- FILE_OPERATIONS
- CONVERSION
- DOCUMENTATION
- RESEARCH
- ANALYSIS
- COMMUNICATION
- PLANNING (lowest)
8. Category Boundary Definitions
CODE_GENERATION vs CODE_REVIEW
- CODE_GENERATION: Input requests creating new code or modifying existing code
- CODE_REVIEW: Input requests analysis of existing code without modifications
- Boundary: If modification is implied, classify as CODE_GENERATION
CODE_GENERATION vs REFACTORING
- CODE_GENERATION: Creating new functionality or features
- REFACTORING: Restructuring existing code without new functionality
- Boundary: "Improve performance" without feature change = REFACTORING
DEBUGGING vs CODE_GENERATION
- DEBUGGING: Input explicitly mentions errors, bugs, or failures
- CODE_GENERATION: Input requests new features without error context
- Boundary: "Fix this bug" = DEBUGGING; "Add error handling" = CODE_GENERATION
DATA_ANALYSIS vs ANALYSIS
- DATA_ANALYSIS: Input involves data processing, statistics, or visualization
- ANALYSIS: Input involves general analysis of concepts, requirements, or situations
- Boundary: If data files/sets are mentioned = DATA_ANALYSIS
FILE_OPERATIONS vs CONVERSION
- FILE_OPERATIONS: Input requests file management (read, write, move, delete)
- CONVERSION: Input requests format transformation between file types
- Boundary: "Convert X to Y format" = CONVERSION; "Read file X" = FILE_OPERATIONS
RESEARCH vs ANALYSIS
- RESEARCH: Input requests information gathering or investigation
- ANALYSIS: Input requests evaluation or assessment of known information
- Boundary: "Find information about X" = RESEARCH; "Evaluate X" = ANALYSIS
TESTING vs CODE_GENERATION
- TESTING: Input specifically requests test creation or test execution
- CODE_GENERATION: Input requests production code
- Boundary: "Write tests for X" = TESTING; "Write X with tests" = CODE_GENERATION (primary)
CONFIGURATION vs DEPLOYMENT
- CONFIGURATION: Input requests setup of settings or configurations
- DEPLOYMENT: Input requests deployment to environments or infrastructure
- Boundary: Local setup = CONFIGURATION; Remote/environment setup = DEPLOYMENT
9. Single-Primary-Category Rule
Rule: Every classified input MUST have exactly one primary category.
Enforcement Rules
- No Multi-Category Output: Never output multiple primary categories
- Tie-Breaking Required: When multiple categories match, apply tie-breaking logic
- Category Exclusivity: Primary category is mutually exclusive with other primary categories
Tie-Breaking Logic
When input matches multiple categories, apply in order:
Step 1: Keyword Dominance
- Count explicit keyword matches for each candidate category
- Category with highest keyword count wins
- If tied, proceed to Step 2
Step 2: Action Verb Analysis
- Identify primary action verb in input
- Map action verb to category using verb-to-category mapping
- If still tied, proceed to Step 3
Step 3: Priority Order
- Apply category priority order (see Section 7)
- Higher priority category wins
Step 4: Default Fallback
- If all steps fail, default to ANALYSIS category
Tie-Breaking Example
Input: "Debug and fix the error in the authentication code, then add logging"
- Keywords: DEBUGGING (debug, fix, error), CODE_GENERATION (add, logging)
- Action Verb: "Debug" (primary action) → DEBUGGING
- Result: DEBUGGING (primary), secondary_tags: [CODE_GENERATION]
10. Secondary Tag Rules
Secondary tags provide additional context without affecting primary routing.
Rules
- Maximum 3 Tags: No more than 3 secondary tags per classification
- No Primary Duplicate: Secondary tags cannot duplicate primary category
- Related Categories Only: Secondary tags must be from the fixed category list
- Relevance Threshold: Only add tags with >50% keyword match confidence
Secondary Tag Selection Process
- Identify all categories with keyword matches (excluding primary)
- Calculate relevance score for each (0.0-1.0)
- Sort by relevance score (descending)
- Select top 3 with score > 0.5
- Add to ClassificationResult
When to Apply Secondary Tags
- Input contains multiple distinct sub-tasks
- Input references multiple technology domains
- Input implies follow-up work in other categories
- Input has context from previous interactions in different categories
When NOT to Apply Secondary Tags
- Input is single-focused with no additional context
- Relevance scores are below threshold (0.5)
- Would duplicate primary category
- Would exceed 3-tag limit
Secondary Tag Examples
| Input |
Primary |
Secondary Tags |
| "Debug the API and update the docs" |
DEBUGGING |
[DOCUMENTATION] |
| "Refactor the auth module and add tests" |
REFACTORING |
[TESTING] |
| "Analyze sales data and create a report" |
DATA_ANALYSIS |
[DOCUMENTATION, COMMUNICATION] |
| "Fix this bug" |
DEBUGGING |
[] |
Classification Models Reference
For detailed complexity, risk, confidence, and state transition models, see classification-models.md.
For system integration, failure conditions, logging, and examples, see system-integration.md.
1---2name: input-classification-system3description: Deterministic rule-based system for classifying clarified input into a single primary task category and assigning execution complexity. Use when the Main Agent needs to categorize user requests before task decomposition, route tasks to appropriate handlers, assess complexity and risk levels, or determine if clarification is needed. Triggers after clarification is complete and before decomposition begins.4---5
6# Input Classification System
7
8## 1. Skill Name
9
10**Input Classification System**
11
12Identifier: `input-classification-system`
13
14## 2. Version
15
16**1.0**
17
18This is the initial release of the Input Classification System skill.
19
20## 3. Skill Purpose
21
22Provide a deterministic, rule-based classification system that enables the Main Agent to categorize clarified user input into exactly one primary task category, assign execution complexity, assess risk level, and determine confidence score before any task decomposition or execution planning occurs.
23
24**Measurable Objectives:**
25- Achieve 100% single-category classification (no ambiguous multi-category outputs)
26- Provide deterministic tie-breaking for all edge cases
27- Assign complexity levels using measurable thresholds
28- Calculate confidence scores with explicit formulas
29- Route ambiguous inputs to clarification with specific triggers
30
31## 4. What This Skill Does
32
33- Classifies clarified input into exactly one primary category from a fixed list
34- Assigns complexity level based on measurable operation counts and time estimates
35- Calculates risk level based on impact scope and reversibility criteria
36- Computes confidence score using explicit scoring factors
37- Determines if input requires additional clarification
38- Sets the appropriate state transition after classification
39- Applies deterministic tie-breaking logic when multiple categories match
40- Validates that input has been clarified before classification
41- Logs all classification decisions with full context
42- Provides secondary tags for additional context (maximum 3)
43- Enforces boundary definitions between categories
44- Triggers escalation for high-risk or low-confidence classifications
45- Prevents misclassification through explicit rules
46- Outputs structured ClassificationResult for downstream systems
47- Maintains audit trail for all classification decisions
48
49## 5. What This Skill Must Not Do
50
51- Must not perform task decomposition or breakdown
52- Must not solve or execute any tasks
53- Must not create execution plans or strategies
54- Must not apply emotional reasoning or sentiment analysis
55- Must not assign multiple primary categories to a single input
56- Must not overlap with Clarification System responsibilities
57- Must not modify the original input content
58- Must not make assumptions about user intent without explicit indicators
59- Must not skip complexity assessment for any classification
60- Must not bypass risk assessment for any classification
61- Must not assign confidence scores below threshold without escalation
62- Must not classify inputs that have not been clarified first
63- Must not use probabilistic or non-deterministic classification methods
64- Must not ignore tie-breaking rules when categories conflict
65- Must not proceed to execution without setting state transition
66
67## 6. Activation Conditions
68
69This skill activates when ALL of the following conditions are met:
70
711. **Clarification Complete**: Input has been processed by the Clarification System and marked as clarified
722. **No Pending Questions**: No outstanding clarification questions remain
733. **Classification Not Yet Performed**: Input has not been previously classified
744. **Valid Input Structure**: Input contains recognizable task indicators
75
76**Pre-Activation Checklist:**
77- [ ] Input marked as "clarified" by Clarification System
78- [ ] No clarification questions pending
79- [ ] Input contains actionable request
80- [ ] Input is not empty or malformed
81
82**Do NOT activate if:**
83- Input is still being clarified
84- Input is a clarification question itself
85- Input is a response to a clarification question
86- Input has already been classified
87
88## 7. Classification Categories
89
90The following 15 categories form the fixed classification list:
91
92| Category | Code | Description |
93|----------|------|-------------|
94| CODE_GENERATION | CG | Writing, modifying, or generating source code |
95| CODE_REVIEW | CR | Reviewing, analyzing, or auditing existing code |
96| DEBUGGING | DB | Identifying and fixing bugs, errors, or issues |
97| DATA_ANALYSIS | DA | Analyzing, processing, or visualizing data |
98| FILE_OPERATIONS | FO | Reading, writing, moving, or managing files |
99| DOCUMENTATION | DC | Creating or updating documentation |
100| REFACTORING | RF | Restructuring code without changing behavior |
101| TESTING | TS | Writing, running, or managing tests |
102| DEPLOYMENT | DP | Deploying applications or infrastructure |
103| RESEARCH | RS | Investigating, searching, or gathering information |
104| CONFIGURATION | CF | Setting up or modifying configurations |
105| COMMUNICATION | CM | Drafting messages, emails, or communications |
106| CONVERSION | CV | Transforming data or files between formats |
107| ANALYSIS | AN | General analysis not covered by other categories |
108| PLANNING | PL | Creating plans, strategies, or roadmaps |
109
110**Category Priority Order (for tie-breaking):**
1111. DEBUGGING (highest - immediate attention needed)
1122. DEPLOYMENT
1133. CODE_GENERATION
1144. REFACTORING
1155. TESTING
1166. CODE_REVIEW
1177. DATA_ANALYSIS
1188. CONFIGURATION
1199. FILE_OPERATIONS
12010. CONVERSION
12111. DOCUMENTATION
12212. RESEARCH
12313. ANALYSIS
12414. COMMUNICATION
12515. PLANNING (lowest)
126
127## 8. Category Boundary Definitions
128
129### CODE_GENERATION vs CODE_REVIEW
130- **CODE_GENERATION**: Input requests creating new code or modifying existing code
131- **CODE_REVIEW**: Input requests analysis of existing code without modifications
132- **Boundary**: If modification is implied, classify as CODE_GENERATION
133
134### CODE_GENERATION vs REFACTORING
135- **CODE_GENERATION**: Creating new functionality or features
136- **REFACTORING**: Restructuring existing code without new functionality
137- **Boundary**: "Improve performance" without feature change = REFACTORING
138
139### DEBUGGING vs CODE_GENERATION
140- **DEBUGGING**: Input explicitly mentions errors, bugs, or failures
141- **CODE_GENERATION**: Input requests new features without error context
142- **Boundary**: "Fix this bug" = DEBUGGING; "Add error handling" = CODE_GENERATION
143
144### DATA_ANALYSIS vs ANALYSIS
145- **DATA_ANALYSIS**: Input involves data processing, statistics, or visualization
146- **ANALYSIS**: Input involves general analysis of concepts, requirements, or situations
147- **Boundary**: If data files/sets are mentioned = DATA_ANALYSIS
148
149### FILE_OPERATIONS vs CONVERSION
150- **FILE_OPERATIONS**: Input requests file management (read, write, move, delete)
151- **CONVERSION**: Input requests format transformation between file types
152- **Boundary**: "Convert X to Y format" = CONVERSION; "Read file X" = FILE_OPERATIONS
153
154### RESEARCH vs ANALYSIS
155- **RESEARCH**: Input requests information gathering or investigation
156- **ANALYSIS**: Input requests evaluation or assessment of known information
157- **Boundary**: "Find information about X" = RESEARCH; "Evaluate X" = ANALYSIS
158
159### TESTING vs CODE_GENERATION
160- **TESTING**: Input specifically requests test creation or test execution
161- **CODE_GENERATION**: Input requests production code
162- **Boundary**: "Write tests for X" = TESTING; "Write X with tests" = CODE_GENERATION (primary)
163
164### CONFIGURATION vs DEPLOYMENT
165- **CONFIGURATION**: Input requests setup of settings or configurations
166- **DEPLOYMENT**: Input requests deployment to environments or infrastructure
167- **Boundary**: Local setup = CONFIGURATION; Remote/environment setup = DEPLOYMENT
168
169## 9. Single-Primary-Category Rule
170
171**Rule**: Every classified input MUST have exactly one primary category.
172
173### Enforcement Rules
174
1751. **No Multi-Category Output**: Never output multiple primary categories
1762. **Tie-Breaking Required**: When multiple categories match, apply tie-breaking logic
1773. **Category Exclusivity**: Primary category is mutually exclusive with other primary categories
178
179### Tie-Breaking Logic
180
181When input matches multiple categories, apply in order:
182
183**Step 1: Keyword Dominance**
184- Count explicit keyword matches for each candidate category
185- Category with highest keyword count wins
186- If tied, proceed to Step 2
187
188**Step 2: Action Verb Analysis**
189- Identify primary action verb in input
190- Map action verb to category using verb-to-category mapping
191- If still tied, proceed to Step 3
192
193**Step 3: Priority Order**
194- Apply category priority order (see Section 7)
195- Higher priority category wins
196
197**Step 4: Default Fallback**
198- If all steps fail, default to ANALYSIS category
199
200### Tie-Breaking Example
201
202Input: "Debug and fix the error in the authentication code, then add logging"
203
2041. Keywords: DEBUGGING (debug, fix, error), CODE_GENERATION (add, logging)
2052. Action Verb: "Debug" (primary action) → DEBUGGING
2063. Result: DEBUGGING (primary), secondary_tags: [CODE_GENERATION]
207
208## 10. Secondary Tag Rules
209
210Secondary tags provide additional context without affecting primary routing.
211
212### Rules
213
2141. **Maximum 3 Tags**: No more than 3 secondary tags per classification
2152. **No Primary Duplicate**: Secondary tags cannot duplicate primary category
2163. **Related Categories Only**: Secondary tags must be from the fixed category list
2174. **Relevance Threshold**: Only add tags with >50% keyword match confidence
218
219### Secondary Tag Selection Process
220
2211. Identify all categories with keyword matches (excluding primary)
2222. Calculate relevance score for each (0.0-1.0)
2233. Sort by relevance score (descending)
2244. Select top 3 with score > 0.5
2255. Add to ClassificationResult
226
227### When to Apply Secondary Tags
228
229- Input contains multiple distinct sub-tasks
230- Input references multiple technology domains
231- Input implies follow-up work in other categories
232- Input has context from previous interactions in different categories
233
234### When NOT to Apply Secondary Tags
235
236- Input is single-focused with no additional context
237- Relevance scores are below threshold (0.5)
238- Would duplicate primary category
239- Would exceed 3-tag limit
240
241### Secondary Tag Examples
242
243| Input | Primary | Secondary Tags |
244|-------|---------|----------------|
245| "Debug the API and update the docs" | DEBUGGING | [DOCUMENTATION] |
246| "Refactor the auth module and add tests" | REFACTORING | [TESTING] |
247| "Analyze sales data and create a report" | DATA_ANALYSIS | [DOCUMENTATION, COMMUNICATION] |
248| "Fix this bug" | DEBUGGING | [] |
249
250---
251
252## Classification Models Reference
253
254For detailed complexity, risk, confidence, and state transition models, see [classification-models.md](references/classification-models.md).
255
256For system integration, failure conditions, logging, and examples, see [system-integration.md](references/system-integration.md).