← 返回
未分类 中文

Nm Leyline Risk Classification

Inline risk classification for agent tasks using a 4-tier model. Hybrid routing: GREEN/YELLOW use heuristic file-pattern matching, RED/CRITICAL escalate to w...
将代理任务分类为4个风险等级(绿色/黄色/红色/严重)
athola athola 来源
未分类 clawhub v1.9.14 5 版本 100000 Key: 无需
★ 0
Stars
📥 428
下载
💾 1
安装
5
版本
#latest

概述

> Night Market Skill — ported from claude-night-market/leyline. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

Table of Contents

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) instead)
  • Non-code tasks (documentation-only, configuration comments)

4-Tier Risk Model

TierColorScopeExampleVerification
------------------------------------------
GREENSafeSingle file, trivial revertTest files, docs, utilsNone required
YELLOWCautionModule-level, user-visibleComponents, routes, viewsConflict check and test pass
REDDangerCross-module, security/dataMigrations, auth, database schemaWar-room RS, full test, and review
CRITICALStopIrreversible, regulatedData deletion, production deployWar-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:

{
  "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:00:00Z"
  }
}

Tasks without risk_tier metadata default to GREEN (backward compatible).

Readiness Levels

The 4-tier Readiness Levels system provides clear risk

classification with required controls per tier:

LevelNameWhenRequired Controls
--------------------------------------
0RoutineLow blast radius, easy rollbackBasic validation, rollback step
1WatchUser-visible changesReview, negative test, rollback note
2ElevatedSecurity/compliance/dataAdversarial review, risk checklist
3CriticalIrreversible, regulatedHuman confirmation, two-step verification

See modules/readiness-levels.md for full level definitions,

selection decision tree, and integration guidance.

Module Reference

  • tier-definitions.md: Detailed tier criteria, boundaries, and override mechanism
  • heuristic-classifier.md: File-pattern rules for automated classification
  • verification-gates.md: Per-tier verification requirements and parallel safety matrix
  • readiness-levels.md: 4-tier risk system with required controls per level

Integration Pattern

# In your skill's frontmatter
dependencies: [leyline:risk-classification]

For Task Generators

Append [R:TIER] marker to task format:

- [ ] T012 [P] [US1] [R:YELLOW] Create LoginForm component in src/components/LoginForm.tsx

For Orchestrators

Check risk tier before task assignment:

if task.risk_tier in ["RED", "CRITICAL"]:
    invoke Skill(attune:war-room-checkpoint) for RS scoring
    if CRITICAL: require human approval before proceeding

Exit Criteria

  • Every task has a risk tier assigned (explicit or default GREEN)
  • RED/CRITICAL tasks have war-room-checkpoint RS scores
  • Verification gates passed for the assigned tier
  • No parallel execution of prohibited tier combinations

版本历史

共 5 个版本

  • v1.9.14 当前
    2026-07-02 08:48
  • v1.9.13
    2026-06-30 16:54 安全 安全
  • v1.9.12
    2026-06-19 19:58 安全 安全
  • v1.0.2
    2026-05-09 16:44 安全 安全
  • v1.0.1
    2026-05-07 17:07 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,163 📥 935,297
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 865 📥 344,247
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,518 📥 573,910