Skill: ivangdavila/triage (version 1.0.0)

--- name: Triage description: Auto-learns to prioritize tasks by urgency, impact, and user patterns. Grows smarter with each decision. --- ## Auto-Adaptive Priority Memory This skill auto-evolves. Observe prioritization signals, detect patterns, confirm before internalizing. **Core Loop:** 1. **Assess** — When tasks arrive, evaluate urgency + importance 2. **Classify** — Assign priority level (P0-P3) 3. **Route** — P0 immediately, P1-P3 into queue 4. **Learn** — Notice when user overrides priority → propose pattern 5. **Confirm** — After 2+ corrections, ask: "Should X always be P[n]?" Check `signals.md` for urgency indicators. Check `patterns.md` for learned priority rules. --- ## Priority Levels | Level | Response | Examples | |-------|----------|----------| | P0 | Interrupt immediately | Server down, security breach, deadline today | | P1 | Next available slot | Blocking work, waiting users, same-day tasks | | P2 | Scheduled queue | Important but not urgent, planning, reviews | | P3 | Backlog | Ideas, "someday", low-impact optimizations | **Default:** When uncertain, ask. Start conservative, learn boundaries. --- ## Urgency Signals Automatic P0 triggers: - Words: "urgent", "ASAP", "down", "broken", "emergency" - Context: External deadlines, blocked team members - Pattern: User previously escalated similar tasks Automatic P3 triggers: - Words: "when you have time", "no rush", "idea for later" - Context: No deadline mentioned, exploratory --- ## Entry Format One line: `pattern: priority (level) [context]` Examples: - `deploy-issues: P0 (confirmed) [always urgent]` - `refactoring: P2 (pattern) [user deprioritized 3x]` - `docs-updates: P3 (confirmed) [explicit "low priority"]` --- ### Work Categories <!-- Task types and default priorities --> ### Time Patterns <!-- Time-based rules: mornings, Fridays, etc. --> ### Source Routing <!-- Priority by source: Slack vs email vs direct --> ### Overrides <!-- User corrections that became patterns --> --- ## Queue Management When multiple tasks compete: 1. **Group by priority** — P0 first, always 2. **Within same priority** — Order by arrival or explicit sequence 3. **Report queue** — "3 P1 tasks queued, handling X first" 4. **Re-triage on change** — New P0 interrupts P1 work --- ## Learning Triggers Phrases that signal priority pattern: - "This should be higher priority" - "Drop everything and..." - "This can wait" - "Handle [X] before [Y]" - "Not urgent" / "No rush" **After hearing these:** Update entry, wait for 2nd occurrence, then confirm permanent rule. --- *Empty sections = still learning. Start conservative, observe corrections, propose only after patterns emerge.*

path: patterns.md
content: # Priority Patterns

## Pattern Recognition

When user corrects a priority assignment, record the pattern:

```
[DATE] Task type: original → corrected (user comment)
```

After 2+ similar corrections, propose confirmation:
> "I've noticed you prioritize [task type] as P[n]. Should I default to this?"

---

## Pattern Categories

### By Task Type
```
# Observed patterns (add as learned)
# Format: task_type: Pn (confidence) [last updated]
```

### By Source
```
# Patterns based on where task came from
# Format: source: default_priority (confidence)
```

### By Time
```
# Time-based priority adjustments
# Format: condition: adjustment (confidence)
```

### By Keyword
```
# Specific words/phrases that indicate priority
# Format: "phrase": Pn (confidence)
```

---

## Confidence Levels

| Level | Meaning | Action |
|-------|---------|--------|
| `observed` | Seen once | Note, don't apply automatically |
| `pattern` | Seen 2+ times | Propose confirmation |
| `confirmed` | User said yes | Apply automatically |
| `locked` | Reinforced multiple times | High confidence, rarely override |

---

## Pattern Evolution

Patterns can change:
1. **Strengthen** — More corrections in same direction
2. **Weaken** — Contradictory corrections
3. **Split** — Same task type needs different priority by context

When patterns conflict, ask rather than guess.

---

## Queue History

Track priority distributions to detect drift:
```
# Weekly summary (auto-generated)
# P0: n% | P1: n% | P2: n% | P3: n%
# Compare to previous weeks for anomalies
```

If P0 ratio spikes → something systemic may be wrong.
If everything is P3 → triage may be too conservative.

---

## Override Tracking

When user explicitly overrides:
1. Record the override with context
2. Look for pattern in overrides
3. After pattern emerges, update default

```
# Recent overrides (last 10)
# [DATE] task: old_priority → new_priority "reason"
```


path: signals.md
content: # Urgency Signals

## Language Signals

### P0 Triggers (Immediate)
- "urgent", "ASAP", "emergency", "critical"
- "down", "broken", "not working", "crashed"
- "deadline today", "due now", "meeting in X minutes"
- "blocking", "can't continue without"
- ALL CAPS messages (often indicates urgency)
- Multiple messages in rapid succession about same issue

### P1 Triggers (High)
- "today", "by EOD", "this afternoon"
- "waiting on this", "need this for"
- "important", "high priority"
- External stakeholders mentioned
- Client-facing issues

### P2 Triggers (Medium)
- "this week", "when possible"
- "would be nice", "should probably"
- Internal improvements
- No explicit deadline

### P3 Triggers (Low)
- "no rush", "when you have time"
- "idea", "thought", "maybe"
- "someday", "future", "backlog"
- "nice to have", "optional"

---

## Context Signals

### Escalate Priority When:
- External deadline mentioned
- Multiple people affected
- Revenue/customer impact
- Security or safety implications
- User explicitly says it's urgent
- Follow-up to previously urgent item

### De-escalate Priority When:
- User says "no rush" or equivalent
- Exploratory/brainstorming context
- No external dependencies
- User is multitasking on other priorities
- Weekend/off-hours (unless P0)

---

## Source-Based Defaults

| Source | Default | Rationale |
|--------|---------|-----------|
| Direct message | P1 | User took time to message directly |
| Scheduled check-in | P2 | Planned, not urgent |
| Automated alert | P0-P1 | Systems rarely cry wolf |
| Email forward | P2 | If urgent, wouldn't use email |
| "FYI" prefix | P3 | Informational by definition |

---

## Time-Based Modifiers

- **Monday morning** — Batch P2/P3 review, don't interrupt with backlog
- **Friday afternoon** — Deprioritize non-urgent (weekend buffer)
- **User's focus time** — Hold P2/P3, only interrupt for P0/P1
- **Before known meetings** — Compress timelines appropriately

---

## Anti-Patterns

**Don't auto-elevate:**
- Repeated mentions of same task (frustration ≠ urgency)
- Length of message (verbosity ≠ importance)
- Exclamation marks alone (style ≠ priority)

**Don't auto-lower:**
- Polite phrasing ("would you mind...") — check actual deadline
- Casual tone — user might just be friendly


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)