Back to Skills

escalate-issues

pjt222
Updated Yesterday
4 views
17
2
17
View on GitHub
Metawordaiautomationdesign

About

The escalate-issues skill triages complex maintenance problems by severity and creates actionable reports when automated cleanup fails. It handles unsafe code deletions, domain-specific configurations, breaking changes, complex refactoring, and security findings like hardcoded secrets. The skill documents context and routes issues to appropriate specialist agents or humans.

Quick Install

Claude Code

Recommended
Primary
npx skills add pjt222/agent-almanac -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/pjt222/agent-almanac
Git CloneAlternative
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/escalate-issues

Copy and paste this command in Claude Code to install this skill

Documentation

escalate-issues

適用時機

此技適用於維護任務遇超出自動清理之問題時:

  • 不確定代碼是否可安全刪
  • 配置改需領域專長(安全、效能、架構)
  • 清理中發現破壞性變更
  • 需複雜重構(非僅清理)
  • 安全敏感之發現(寫死之密秘、漏洞)

勿用於有明修之簡單問題。僅於自動清理有險或不足時升級。

輸入

參數類型必要說明
issue_descriptionstring問題之明述
severityenumcriticalhighmediumlow
context_filesarray相關文件之路徑
specialiststring目標代理(若未指則自路由)
blockingboolean問題是否阻後續清理(預設:false)

步驟

步驟一:評嚴重度

以標準嚴重度分類問題。

CRITICAL — 阻生產功能:

  • 活用代碼中破之 import
  • 安全漏洞(暴露之密秘、SQL 注入)
  • 清理致數據遺失之險
  • 生產服務中斷

HIGH — 影響可維護性或開發生產力:

  • 大量死代碼(>1000 行)
  • 破之 CI/CD 管線
  • 環境間大幅配置漂移
  • 可能動態載入之未被引模組

MEDIUM — 衛生小疵:

  • 未用之輔助函數(<100 行)
  • 陳舊之文檔待更
  • 棄用之配置文件(存而不用)
  • 非關鍵路徑之 lint 警告

LOW — 風格不一:

  • 縮排混(可行而不一)
  • 行尾空白
  • 命名不一(camelCase vs snake_case)
  • 格式小異

嚴重度決策樹

Does it break production? → CRITICAL
Does it block development? → HIGH
Does it impact code quality? → MEDIUM
Is it purely cosmetic? → LOW

預期: 問題以明嚴重度標分類

失敗時: 若不定,預設 HIGH 並升級予人再分類

步驟二:文檔發現

為專家審捕所有相關語境。

問題報告模板

# Issue: [Brief Title]

**Severity**: CRITICAL | HIGH | MEDIUM | LOW
**Discovered During**: [Skill name, e.g., clean-codebase]
**Date**: YYYY-MM-DD
**Blocking**: Yes | No

## Description

Clear description of the problem in 2-3 sentences.

## Context

- **File(s)**: [List of affected files with line numbers]
- **Related**: [Related issues, commits, or previous attempts to fix]
- **Impact**: [What breaks if this isn't fixed, or what's wasted if not cleaned]

## Evidence

```language
# Code snippet or log excerpt showing the problem

Attempted Fixes

  • Tried X but failed because Y
  • Considered Z but uncertain due to W

Recommendation

  • Option 1: [Safe conservative approach]
  • Option 2: [More aggressive fix with risks]
  • Preferred: [Which option to pursue and why]

Specialist Routing

Suggested Agent: [agent-name] Reason: [Why this specialist is appropriate]

References

  • [Link to related documentation]
  • [Link to similar past issues]

**預期:** 問題以全語境文檔於 `ESCALATION_REPORTS/issue_YYYYMMDD_HHMM.md`

**失敗時:** (無——恒文檔之,縱不全)

### 步驟三:定路由

配問題類型於合適之專家代理或人審。

**路由表**:

| 問題類型 | 專家 | 原因 |
|------------|-----------|---------|
| 安全漏洞 | security-analyst | 需安全專長 |
| GxP 合規之慮 | gxp-validator | 需監管知識 |
| 架構決定 | senior-software-developer | 設計模式專長 |
| 配置管理 | devops-engineer | 基礎設施知識 |
| 依賴衝突 | devops-engineer | 包管理專長 |
| 效能瓶頸 | senior-data-scientist | 優化知識 |
| 代碼風格爭 | code-reviewer | 風格指南之權 |
| 死代碼不定 | r-developer (or lang-specific) | 語言特定知識 |
| 測試破不明 | code-reviewer | 測試設計專長 |
| 文檔準確性 | senior-researcher | 需領域知識 |
| 授權相容 | auditor | 法律/合規專長 |

**自動路由邏輯**:
```python
def route_issue(severity, issue_type):
    if severity == "CRITICAL":
        # Always escalate to human for critical issues
        return "human"

    if "security" in issue_type or "secret" in issue_type:
        return "security-analyst"

    if "gxp" in issue_type or "compliance" in issue_type:
        return "gxp-validator"

    if "architecture" in issue_type or "design" in issue_type:
        return "senior-software-developer"

    if "config" in issue_type or "deployment" in issue_type:
        return "devops-engineer"

    # Default: code-reviewer for general code issues
    return "code-reviewer"

預期: 問題帶理由路至合適之專家

失敗時: 若無明專家,升級予人以手動路由

步驟四:建可行之問題報告

生合於目標對象(代理或人)之格式化報告。

予專家代理(MCP 工具之結構式格式):

---
type: escalation
severity: high
from_agent: janitor
to_agent: security-analyst
blocking: false
---

# Security Concern: Hardcoded API Key in Config

**File**: config/production.yml:45
**Pattern**: API_KEY="sk_live_abc123..."

**Request**: Please review if this is a valid secret or a placeholder.
If valid, recommend secure credential management strategy.

**Context**: Discovered during config cleanup sweep.

予人審(詳細 markdown):

# Escalation Report: Uncertain Dead Code Removal

**From**: Janitor Agent
**Date**: 2026-02-16
**Severity**: HIGH

## Problem

File `src/legacy_payments.js` (450 lines) appears unused but contains
complex payment processing logic. Static analysis shows zero references,
but name suggests business-critical functionality.

## Why Escalated

- Uncertain if payment code is dynamically loaded at runtime
- Potential data loss risk if deleted incorrectly
- Requires domain knowledge to assess business impact

## Evidence

- No direct imports found
- Last modified 8 months ago
- Git history shows it was part of payment refactor

## Recommendation

Request human review before deletion. If confirmed dead:
1. Archive to archive/legacy/ directory
2. Document in ARCHIVE_LOG.md
3. Create ticket to verify payment flows still work

## Next Steps

Awaiting human confirmation before proceeding with cleanup.

預期: 報告已合於目標對象之格

失敗時: (無——若不定以通用 markdown 生報告)

步驟五:追升級狀態

維所有升級之日誌以防重複報告。

# Escalation Log

| ID | Date | Severity | Issue | Specialist | Status |
|----|------|----------|-------|-----------|--------|
| ESC-001 | 2026-02-16 | CRITICAL | Broken prod import | human | Resolved |
| ESC-002 | 2026-02-16 | HIGH | Dead payment code | human | Pending |
| ESC-003 | 2026-02-16 | MEDIUM | Config drift | devops-engineer | In Progress |

預期: ESCALATION_LOG.md 已以新條目更

失敗時: 若日誌不存,建之

步驟六:若需則通知並阻

若問題阻後續維護,則通知並暫停清理。

阻斷邏輯

  • CRITICAL 問題恒阻
  • HIGH 問題若於關鍵路徑則阻
  • MEDIUM/LOW 問題不阻

通知

⚠️ MAINTENANCE BLOCKED ⚠️

Issue ESC-002 (HIGH severity) requires human review before proceeding.

**Affected Operation**: clean-codebase (Step 5: Remove Dead Code)
**Reason**: Uncertain if src/legacy_payments.js is truly dead

**Action Required**: Review ESCALATION_REPORTS/ESC-002_2026-02-16.md

Once resolved, re-run maintenance from Step 5.

預期: 維護已暫停;明通知已生

失敗時: 若通知機制不可得,於報告中文檔之

驗證清單

升級後:

  • 問題嚴重度已正評
  • 全語境已文檔(文件、證據、所試)
  • 合適之專家已識
  • 升級報告已建於 ESCALATION_REPORTS/
  • ESCALATION_LOG.md 已更
  • 若用則阻斷狀態已傳
  • 報告無敏感信息外露

常見陷阱

  1. 過升級:為簡單問題升級浪專家之時。僅於真不定或有險時升。

  2. 欠升級:刪代碼「以觀測試是否過」而不升級可致生產中斷。

  3. 語境不足:無證據升級迫專家再查。含文件路徑、行號、錯誤訊息。

  4. 模糊之述:「配置有問題」不可行。具體:「配置漂移:dev 用 API v1,prod 用 v2」。

  5. 不追狀態:再升已審之問題。先查 ESCALATION_LOG.md。

  6. 密秘外露:升級報告中含實 API key 或密碼。遮敏感值。

相關技能

GitHub Repository

pjt222/agent-almanac
Path: i18n/wenyan-lite/skills/escalate-issues
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

Related Skills

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

polymarket

Meta

This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.

View skill

creating-opencode-plugins

Meta

This skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.

View skill

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill