sniper-check
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTarget: $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.
| Feature | Detail |
|---|---|
| Context | Forked (isolated sub-agent) |
| Agent | sniper (Sonnet) |
| Phases | 6-phase code-quality workflow |
| Result | Only final report returns to parent |
使用sniper agent在隔离的分叉上下文环境中快速验证代码质量。执行完整的6阶段工作流,且不会污染主对话上下文。
| 特性 | 详情 |
|---|---|
| 上下文 | 分叉(隔离子Agent) |
| Agent | sniper (Sonnet) |
| 阶段 | 6阶段代码质量工作流 |
| 结果 | 仅将最终报告返回至父级 |
When to Use
适用场景
| Scenario | Use |
|---|---|
| After code modifications | |
| Validate specific file | |
| Full project check | |
| After refactoring | |
| 场景 | 用法 |
|---|---|
| 代码修改后 | |
| 验证特定文件 | |
| 全项目检查 | |
| 重构后 | |
Workflow
工作流
Execute the mandatory 6-phase workflow:
code-quality- PHASE 1+2 (PARALLEL): Launch both in parallel:
- (Haiku) → Architecture discovery
explore-codebase - (Sonnet) → Documentation verification
research-expert
- PHASE 3: Grep all usages → Impact analysis
- PHASE 4: Run linters → Detect errors
- PHASE 5: Apply corrections → Minimal changes
- 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+2(并行):同时启动两项任务:
- (Haiku) → 架构发现
explore-codebase - (Sonnet) → 文档验证
research-expert
- 阶段3:搜索所有用法 → 影响分析
- 阶段4:运行代码检查器(linters)→ 检测错误
- 阶段5:应用修正 → 最小化修改
- 阶段6:重新运行代码检查器 → 零错误
重要提示:阶段1+2必须并行运行(在一条消息中发起两个任务调用)。
Critical Rules
核心规则
| Rule | Reason |
|---|---|
| Never skip phases 1+2 | Documentation-backed fixes only |
| Always run phases in order | Dependencies between phases |
| Zero linter errors | Non-negotiable exit criteria |
| Minimal changes only | Smallest 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合规状态
- 最终代码检查器状态(必须为零错误)