SKILL.md--- name: risk-classification description: Classifies agent tasks into 4 risk tiers (GREEN/YELLOW/RED/CRITICAL). Use when assessing action reversibility before committing to an approach. alwaysApply: false category: infrastructure tags: - risk - classification - safety - verification - gates dependencies: - error-patterns provides: infrastructure: - risk-tier-classification - verification-gates - heuristic-classifier patterns: - risk-aware-coordination - tier-based-verification usage_patterns: - task-risk-assessment - verification-gate-routing - parallel-safety-validation complexity: intermediate estimated_tokens: 500 progressive_loading: true modules: - modules/tier-definitions.md - modules/heuristic-classifier.md - modules/verification-gates.md - modules/readiness-levels.md - modules/automation-tiers.md role: library --- # Risk Classification ## Overview Provides inline risk classification for agent tasks using a 4-tier model (GREEN/YELLOW/RED/CRITICAL). Uses fast heuristic file-pattern matching for low-risk tiers and delegates to `Skill(attune:war-room-checkpoint)` for high-risk tiers requiring full reversibility scoring. ## When To Use - Assessing risk of tasks before agent assignment - Determining verification requirements for task completion - Deciding parallel execution safety between tasks - Adding risk markers to task checklists ## When NOT To Use - Single-file trivial changes (assume GREEN) - Strategic architecture decisions (use full `Skill(attune:war-room-playbook)` instead) - Non-code tasks (documentation-only, configuration comments) ## 4-Tier Risk Model | Tier | Color | Scope | Example | Verification | |------|-------|-------|---------|-------------| | **GREEN** | Safe | Single file, trivial revert | Test files, docs, utils | None required | | **YELLOW** | Caution | Module-level, user-visible | Components, routes, views | Conflict check and test pass | | **RED** | Danger | Cross-module, security/data | Migrations, auth, database schema | War-room RS, full test, and review | | **CRITICAL** | Stop | Irreversible, regulated | Data deletion, production deploy | War-room RS and human approval | ## Hybrid Routing ``` Task received | v Heuristic classifier (file patterns) | ├── GREEN/YELLOW → Apply tier, continue | └── RED/CRITICAL → Invoke Skill(attune:war-room-checkpoint) for reversibility scoring (RS) | └── RS confirms or adjusts tier ``` **Why hybrid**: GREEN/YELLOW classification is fast and deterministic (file pattern matching). RED/CRITICAL tasks warrant the overhead of full reversibility analysis because the cost of getting them wrong is high. ## Task Metadata Extension Add risk tier to task metadata for downstream consumption: ```json { "id": "5", "subject": "Add user authentication", "metadata": { "risk_tier": "YELLOW", "risk_reason": "Modifies src/components/LoginForm.tsx (user-visible component)", "classified_at": "2026-02-07T22