返回 Skill 列表
extension
分类: 开发与工程无需 API Key

Lightweight Implementation Analysis Protocol

此技能应在修复错误、实现功能、调试问题或更改代码时使用。通过以下方式确保在实施前理解代码流程:(1) 使用特定文件:行引用跟踪执行路径,(2) 创建显示类.方法() 流程的轻量级文本图,(3) 与用户验证理解情况。防止因假设或猜测而浪费努力。当用户请求:错误修复、功能实现、重构、TDD周期、调试、代码分析时触发。

person作者: jakexiaohubgithub

Lightweight Implementation Analysis Protocol

Quick understanding before implementation - just enough to guide TDD, no more.

When This Activates

Before creating implementation plans, fix plans, or TDD cycles for bugs/features.

The Protocol (3 Quick Steps)

1. Trace the Flow

Answer these:

  • Which event/request triggers this?
  • Which file:line handles it?
  • Where does the error occur (file:line)?

2. Quick Diagram

Simple class.method() flow with relevant data:

Event: EventName
  ↓ (contains: relevant fields)
Class.method() [file:line]
  ↓ (what it does)
Class.method() [file:line] ← 💥 Error here
  ↓
Result: What happens

Keep it short - 5-10 lines max.

3. Verify

Ask: "Here's the flow: [diagram]. Correct?"

Wait for confirmation, then proceed.

Example

Problem: Email validation failing

Event: user.email.updated
  ↓ (email: "invalid@")
UpdateUserEmailHandler.execute() [line 281]
  ↓ (validates email format)
EmailValidator.parse() [line 289] ← 💥 Throws ValidationError
  ↓
Result: Error response

Current: Throws
Should: Use safeParse(), return validation error

Rules

  • Keep it lightweight - This isn't detailed planning, just enough to know what to test
  • Be specific - File:line, not abstractions
  • Get confirmation - Don't proceed without it
  • Skip for trivial changes - Typos, formatting, docs

Anti-Pattern

WRONG: "I'll fix the validation. Here's my plan..." ✅ RIGHT: "Let me trace where the error occurs... [diagram]. Correct?"