sniper-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Target: $ARGUMENTS
Target: $ARGUMENTS

Sniper Check

Sniper 检查

Overview

概述

Quick code quality validation using the sniper agent in an isolated forked context. Executes the full 6-phase workflow without polluting the main conversation context.
FeatureDetail
ContextForked (isolated sub-agent)
Agentsniper (Sonnet)
Phases6-phase code-quality workflow
ResultOnly final report returns to parent

使用sniper agent在隔离的分叉上下文环境中快速验证代码质量。执行完整的6阶段工作流,且不会污染主对话上下文。
特性详情
上下文分叉(隔离子Agent)
Agentsniper (Sonnet)
阶段6阶段代码质量工作流
结果仅将最终报告返回至父级

When to Use

适用场景

ScenarioUse
After code modifications
/sniper-check src/
Validate specific file
/sniper-check path/to/file.ts
Full project check
/sniper-check .
After refactoring
/sniper-check src/components/

场景用法
代码修改后
/sniper-check src/
验证特定文件
/sniper-check path/to/file.ts
全项目检查
/sniper-check .
重构后
/sniper-check src/components/

Workflow

工作流

Execute the mandatory 6-phase
code-quality
workflow:
  1. PHASE 1+2 (PARALLEL): Launch both in parallel:
    • explore-codebase
      (Haiku) → Architecture discovery
    • research-expert
      (Sonnet) → Documentation verification
  2. PHASE 3: Grep all usages → Impact analysis
  3. PHASE 4: Run linters → Detect errors
  4. PHASE 5: Apply corrections → Minimal changes
  5. PHASE 6: Re-run linters → Zero errors
CRITICAL: Phases 1+2 must run in PARALLEL (two Task calls in one message).

执行强制的6阶段
code-quality
工作流:
  1. 阶段1+2(并行):同时启动两项任务:
    • explore-codebase
      (Haiku) → 架构发现
    • research-expert
      (Sonnet) → 文档验证
  2. 阶段3:搜索所有用法 → 影响分析
  3. 阶段4:运行代码检查器(linters)→ 检测错误
  4. 阶段5:应用修正 → 最小化修改
  5. 阶段6:重新运行代码检查器 → 零错误
重要提示:阶段1+2必须并行运行(在一条消息中发起两个任务调用)。

Critical Rules

核心规则

RuleReason
Never skip phases 1+2Documentation-backed fixes only
Always run phases in orderDependencies between phases
Zero linter errorsNon-negotiable exit criteria
Minimal changes onlySmallest fix necessary

规则原因
绝不能跳过阶段1+2仅基于文档进行修复
始终按顺序运行各阶段各阶段之间存在依赖关系
代码检查器零错误不可协商的退出标准
仅做最小化修改采用必要的最小修复方案

Report Format

报告格式

Return a validation report with:
  • Architecture summary (from explore-codebase)
  • Documentation references (from research-expert)
  • Impact analysis table (usages, risk level)
  • Errors fixed (critical, high, medium, low)
  • SOLID compliance status
  • Final linter status (must be ZERO errors)
返回包含以下内容的验证报告:
  • 架构摘要(来自explore-codebase)
  • 文档参考(来自research-expert)
  • 影响分析表(用法、风险等级)
  • 已修复错误(严重、高、中、低)
  • SOLID合规状态
  • 最终代码检查器状态(必须为零错误)