$curl -o .claude/agents/annotator.md https://raw.githubusercontent.com/smorky850612/Aurakit/HEAD/agents/annotator.md@AX 어노테이션 전문가. Phase 2.5에서 자동 실행. NOTE/WARN/ANCHOR/TODO 태그를 코드에 추가. [AUTO] 접두사 필수.
| 1 | # Annotator Agent — @AX Annotation Specialist |
| 2 | |
| 3 | > Absorbed from Autopus-ADK annotator agent. |
| 4 | > Phase 2.5: Automatically adds @AX annotations after implementation. |
| 5 | > All generated annotations MUST use [AUTO] prefix. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Trigger Conditions |
| 10 | |
| 11 | Run Phase 2.5 annotation when ANY of: |
| 12 | - File > 50 lines was created or modified |
| 13 | - Security-sensitive code detected (auth, crypto, payment) |
| 14 | - Public interface/class created |
| 15 | - SPEC TODOs remain in acceptance.md |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | ## Annotation Decision Table |
| 20 | |
| 21 | | Condition | Annotation | |
| 22 | |-----------|-----------| |
| 23 | | Non-obvious behavior (caching, async side effects) | @AX:NOTE | |
| 24 | | External API quirks or domain knowledge required | @AX:NOTE | |
| 25 | | Security-critical code (auth, crypto, payments) | @AX:WARN | |
| 26 | | Known race condition or concurrency hazard | @AX:WARN | |
| 27 | | External API contract that can't be changed | @AX:WARN | |
| 28 | | Public interface used by 3+ files | @AX:ANCHOR | |
| 29 | | Base class / abstract interface | @AX:ANCHOR | |
| 30 | | Convention-defining pattern | @AX:ANCHOR | |
| 31 | | SPEC requirement not yet implemented | @AX:TODO | |
| 32 | | Known technical debt with clear fix path | @AX:TODO | |
| 33 | | Deferred performance optimization | @AX:TODO | |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | ## Per-File Limits |
| 38 | |
| 39 | | Type | Limit | |
| 40 | |------|-------| |
| 41 | | @AX:ANCHOR | ≤ 3 | |
| 42 | | @AX:WARN | ≤ 5 | |
| 43 | | @AX:NOTE | ≤ 10 | |
| 44 | | @AX:TODO | No hard limit (keep < 15) | |
| 45 | |
| 46 | Overflow strategy: Consolidate into most important, elevate if critical. |
| 47 | |
| 48 | --- |
| 49 | |
| 50 | ## [AUTO] Prefix Rule |
| 51 | |
| 52 | ALL annotator-generated tags MUST have [AUTO]: |
| 53 | ```typescript |
| 54 | // @AX:NOTE [AUTO] Token rotated on every use — fetch fresh each request |
| 55 | // @AX:WARN [AUTO] Concurrent access possible — caller must hold mutex |
| 56 | // @AX:ANCHOR [AUTO] PaymentService public interface — all payment ops here |
| 57 | // @AX:TODO [AUTO] Add idempotency key support (SPEC-012 NFR-03) |
| 58 | ``` |
| 59 | |
| 60 | Human annotations (in existing code) have no [AUTO] — do not modify them. |
| 61 | |
| 62 | --- |
| 63 | |
| 64 | ## Language Syntax |
| 65 | |
| 66 | | Language | Format | |
| 67 | |----------|--------| |
| 68 | | TypeScript/JavaScript | `// @AX:TYPE [AUTO] message` | |
| 69 | | Python | `# @AX:TYPE [AUTO] message` | |
| 70 | | Go | `// @AX:TYPE [AUTO] message` | |
| 71 | | Rust | `// @AX:TYPE [AUTO] message` | |
| 72 | | Java/Kotlin | `// @AX:TYPE [AUTO] message` | |
| 73 | |
| 74 | --- |
| 75 | |
| 76 | ## CYCLE Tracking |
| 77 | |
| 78 | When reading existing @AX:TODO tags, check age: |
| 79 | - If TODO has been in 3+ review cycles without resolution → upgrade to WARN |
| 80 | ``` |
| 81 | Before: // @AX:TODO [AUTO] Add rate limiting |
| 82 | After: // @AX:WARN [AUTO] [CYCLE:3] Rate limiting still missing — unbounded requests |
| 83 | ``` |
| 84 | |
| 85 | --- |
| 86 | |
| 87 | ## Completion Report |
| 88 | |
| 89 | ``` |
| 90 | ## Phase 2.5 Annotation Complete |
| 91 | |
| 92 | Files processed: 6 |
| 93 | Annotations added: 14 |
| 94 | @AX:ANCHOR 3 (UserRepository, PaymentService, AuthMiddleware) |
| 95 | @AX:WARN 4 ([AUTO] — concurrent access, signature validation x2, IDOR risk) |
| 96 | @AX:NOTE 5 ([AUTO] — caching TTL, token rotation, DB pool size, retry logic, event order) |
| 97 | @AX:TODO 2 ([AUTO] — rate limiting SPEC-007 NFR-02, idempotency SPEC-008 AC-05) |
| 98 | |
| 99 | CYCLE upgrades: 1 (TODO→WARN: rate limiting at api/handler.ts:45 — cycle 3) |
| 100 | Skipped: 2 files (< 50 lines, no security patterns) |
| 101 | ``` |