investigation-notes

작성자: cloudflare

버그 사냥 중 조사 상태를 위한 구조화된 스크래치 추적 문서 - 코드 재읽기, 컨텍스트 손실, 그리고 토끼굴을 방지하며, 외부를 유지합니다…

npx skills add https://github.com/cloudflare/workerd --skill investigation-notes

Investigation Notes

Overview

During bug investigations, maintain a lightweight scratch document as external memory. This prevents re-reading code you've already analyzed, losing track of which hypothesis you're testing, and silently drifting into rabbit holes.

Core principle: Write it down once, refer to it later. Re-reading your one-line note is faster than re-reading 200 lines of source.

Always keep the document up to date with your current focus, hypotheses, and learnings from code reads and tests.

Always refer to the document before re-reading code or forming a new hypothesis. If the information is there, use it. If it's not sufficient, read the code, then write a better note.

The document never takes priority over writing or running a test. If you're choosing between updating notes and writing a test, write the test. Update the notes after.

The Document

Create ~/tmp/investigate-<short-name>.md during orientation (step 2 of /investigate).

The short name should be descriptive enough to identify the investigation (e.g., investigate-concurrent-write.md, investigate-pipe-zombie-state.md).

Once created, notify the user and provide the file path so they can open it in their editor.

Format

# Investigation: <one-line bug description>

## Error

<assertion/crash message, file:line — written once, never changes>

## Current Focus

<single sentence: what you are doing RIGHT NOW>

## Hypotheses

1. [TESTING] <one sentence> — test: <test name or "not yet written">
2. [REJECTED] <one sentence> — disproved by: <one sentence>
3. [CONFIRMED] <one sentence> — evidence: <test name + result>

## Code Read

- `file:line-range` — <what you learned, short paragraph or bullet>

## Tests

- `file:line` "test name" — <result + what it means, one sentence>

## Ruled Out

- <thing you investigated and eliminated, one sentence why>

## Next

1. <concrete next action>
2. <fallback>

Creation

Create the document when:

  • You have more than one hypothesis to track
  • You've read more than 3 files/functions
  • You're about to re-read code you already read
  • The investigation is going to span multiple iterations of test-write-run

When created, populate Error, Current Focus, your current hypotheses, and anything you've already learned (backfill "Code Read" and "Tests" from what you've done so far).

Rules

  • Always update "Current Focus" before starting any new thread of work
  • Always Add a hypothesis for what you're doing
  • Always update the document after each significant action:
    • After reading a function or file section → add to "Code Read"
    • After forming or rejecting a hypothesis → update "Hypotheses"
    • After running a test → update BEFORE doing anything else. Record: what test ran, what the result was, what it means for the active hypothesis. This is non-negotiable — it takes 30 seconds and prevents the pattern of running multiple tests, losing track of what they proved, and falling back to code reading.
    • After starting a new thread of work → update "Current Focus"
  • Do not dump large amounts of code into the document. Instead, reference it by file:line.
  • Do not reorganize or reformat the document - this is a scratchpad, not a report.
  • You may include brief, simple diagrams if they help you understand and retain information.

Hypothesis Limits

  • Maximum 3 active hypotheses at a time. If you want to add a fourth, reject or merge one first.
  • Maximum 1 [TESTING] at a time. Commit to one, test it, resolve it, then move on.
  • Every hypothesis must have a test or a concrete plan to write one. "Need to investigate further" is not a valid state — that's analysis paralysis wearing a label.

Valid statuses:

  • [UNTESTED] — formed but not yet tested. Must become [TESTING] or [REJECTED] soon.
  • [TESTING] — actively being tested. Only one at a time.
  • [CONFIRMED] — test reproduced the bug as predicted.
  • [REJECTED] — test disproved it, or evidence rules it out. Include why.
  • [SUPERSEDED] — replaced by a more specific hypothesis. Reference the replacement.

cloudflare의 다른 스킬

workerd-api-review
cloudflare
workerd 코드 리뷰를 위한 성능 최적화, API 설계 및 호환성, 보안 취약점, 표준 사양 준수. tcmalloc 인식…
official
workerd-safety-review
cloudflare
메모리 안전성, 스레드 안전성, 동시성, 그리고 workerd 코드 리뷰를 위한 중요 탐지 패턴. V8/KJ 경계 위험 요소, 수명 관리 등을 다룹니다.
official
module-registry
cloudflare
workerd에서 모듈 레지스트리를 작업할 때 로드 — 모듈 해석, 컴파일, 평가, 등록을 읽기, 수정, 디버깅, 검토하는 경우…
official
reproduce
cloudflare
cloudflare/agents GitHub 이슈를 재현하기 위해 최소한의 Agents/Worker 프로젝트를 스캐폴딩하고 임시 Cloudflare 계정에 배포한 후 보고합니다…
official
local-explorer
cloudflare
로컬 탐색기 또는 로컬 API에 제품/리소스를 추가하는 방법. 새로운 로컬 API나 UI 라우트를 구현할 때 사용합니다.
official
commit-categories
cloudflare
커밋을 체인지로그와 "새로운 기능" 요약으로 분류하는 규칙입니다. 체인지로그 또는 whats-new 명령에서 커밋을 분류하기 전에 반드시 로드되어야 합니다. 제공하는 기능:
official
architecture
cloudflare
코드베이스를 처음 탐색할 때, 새 클라이언트 메서드를 추가할 때, 새 컨테이너 핸들러/서비스를 추가할 때, 또는 요청 흐름을 이해할 때 사용합니다.
official
changesets
cloudflare
변경셋을 생성하거나, 릴리즈를 준비하거나, 버전을 올릴 때 사용합니다. 참조할 패키지, 사용자 대상 변경셋 설명 작성 방법 등을 다룹니다.
official