docs(agent): add anti-local-thinking rules — NEVER #10 strengthen (disprove before report), NEVER #11 (no mechanical apply), ALWAYS #9 (project history cross-ref), Bug Report Protocol

This commit is contained in:
2026-03-15 23:26:54 +09:00
parent c9f44afcf1
commit 9b93ee9776
2 changed files with 53 additions and 1 deletions

View File

@@ -19,7 +19,13 @@ description: 모든 작업에 자동 적용되는 에이전트 행동 규칙.
7. NEVER truncate error messages — always show the full error output
8. NEVER say "구현 완료" or "동작 확인" without ACTUAL end-to-end test — import/문법 통과는 검증이 아님
9. NEVER confuse "코드가 논리적으로 맞음" with "실제로 동작함" — 실행 로그가 없으면 미검증
10. NEVER fix code by looking at only the immediate file — always trace the full data flow across ALL affected files (producer → consumer → side effects) before proposing a fix
10. NEVER fix or audit code by looking at only the immediate file:
(a) Open the PRODUCER (who creates the data?) and CONSUMER (who reads/deletes?)
(b) Search for defense mechanisms (try-catch, dedup, idempotency guards)
(c) DISPROVE the bug before reporting — if a defense exists, it may be a false positive
(d) Report only bugs with a proven end-to-end triggering path
"I traced the flow" without opening actual files = violation.
11. NEVER apply changes mechanically across files — every import, variable, function must have at least one callsite in the SAME file
## ALWAYS (필수)
@@ -31,6 +37,7 @@ description: 모든 작업에 자동 적용되는 에이전트 행동 규칙.
6. ALWAYS read related existing code (minimum 3 files) before writing new code
7. ALWAYS verify with real execution after implementation — trigger the actual flow, check logs (e.g. extension.log), confirm the expected result appeared
8. ALWAYS distinguish "구현했다" vs "검증했다" when reporting to user — 테스트 안 했으면 명시
9. ALWAYS cross-reference with project history (devlog, git log -5, Vikunja) when evaluating system state — code absence may mean "intentionally removed" or "deployed externally", not "unimplemented"
## Failure Protocol
@@ -52,6 +59,10 @@ description: 모든 작업에 자동 적용되는 에이전트 행동 규칙.
4. `.agents/workflows/services.md` (service credentials & protocols)
5. `.agents/workflows/` (action procedures)
## Bug Report Protocol
→ See `.agents/references/bug-report-protocol.md`
## PowerShell Notes
- `curl` → PowerShell에서 `Invoke-WebRequest` 별칭. **반드시 `curl.exe`** 사용

View File

@@ -0,0 +1,41 @@
# Bug Report Protocol
> 이 프로토콜은 코드 감사 또는 디버깅 시 false positive를 방지하기 위한 6단계 검증 절차입니다.
> AGENT.md 규칙 #10의 세부 구현입니다.
## 절차
```
1. Identify: 로컬 코드에서 잠재적 이슈 식별
2. Trace: 해당 데이터의 전체 생명주기 추적
- Producer (생성자) 파일을 열어 확인
- Transport (전달 경로: file, HTTP, RPC) 확인
- Consumer (소비자) 파일을 열어 확인
3. Defend: 기존 방어 메커니즘 검색
- try-catch, idempotency guard, dedup logic
- upstream validation, downstream tolerance
4. Disprove: 버그가 아닌 이유를 적극적으로 찾기
- "이 코드가 안전한 이유는?"
- 방어 메커니즘이 존재하면 → false positive 가능성 높음
5. Prove: 여전히 버그라면 트리거 경로를 증명
- 구체적 입력 → 구체적 경로 → 구체적 실패
- "A가 B를 호출하면 C에서 D가 발생" 형태
6. Report: 증명된 버그만 보고
- 트리거 경로 + 심각도 + 영향 범위 포함
- 증명 못 한 것은 보고하지 않음
```
## 결정 기준
| 상황 | 판정 |
|------|------|
| 방어 메커니즘 존재 + 트리거 경로 없음 | ❌ 보고 안 함 |
| 방어 메커니즘 없음 + 트리거 경로 증명됨 | ✅ 보고 |
| 방어 메커니즘 존재 + 우회 경로 증명됨 | ✅ 보고 (우회 경로 명시) |
| 잘 모르겠음 | 🔍 추가 조사 후 판단 (추측으로 보고 금지) |
## 근거
- Anthropic Code Review: "verification step attempts to disprove each finding"
- LLM Self-Verification: 자기 결과를 검증하지 않으면 noise와 과신 리포트 양산
- Systems Thinking: 개별 컴포넌트가 아닌 관계와 상호의존성에 집중