oh-my-customcode 1.1.76 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/rules/MAY-optimization.md +80 -0
- package/templates/.claude/rules/MUST-agent-design.md +80 -4
- package/templates/.claude/rules/MUST-agent-teams.md +112 -0
- package/templates/.claude/rules/MUST-completion-verification.md +133 -5
- package/templates/.claude/rules/MUST-continuous-improvement.md +115 -11
- package/templates/.claude/rules/MUST-enforcement-policy.md +15 -1
- package/templates/.claude/rules/MUST-intent-transparency.md +39 -0
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +186 -2
- package/templates/.claude/rules/MUST-parallel-execution.md +97 -0
- package/templates/.claude/rules/MUST-permissions.md +25 -2
- package/templates/.claude/rules/MUST-safety.md +70 -0
- package/templates/.claude/rules/MUST-sync-verification.md +264 -1
- package/templates/.claude/rules/MUST-tool-identification.md +94 -1
- package/templates/.claude/rules/SHOULD-ecomode.md +1 -1
- package/templates/.claude/rules/SHOULD-memory-integration.md +57 -0
- package/templates/.claude/rules/SHOULD-verification-ladder.md +142 -0
- package/templates/.claude/skills/claude-native/SKILL.md +2 -0
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +6 -0
- package/templates/guides/claude-code/15-version-compatibility.md +187 -3
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +6 -0
|
@@ -17,43 +17,77 @@ Examples: creating multiple agents, reviewing multiple files, batch operations o
|
|
|
17
17
|
|
|
18
18
|
### File-Disjoint ≠ Independent (Local Git State)
|
|
19
19
|
|
|
20
|
+
로컬 git 상태변경 작업(`checkout`/`pull`/`branch`/`commit`/`stash`/`merge`/`rebase`)은 편집 파일이 disjoint해도 워킹트리·HEAD라는 공유 상태를 경합하므로 **직렬화**한다 — 동시 실행 git 상태변경 에이전트는 1개. read-only 조회는 병렬 가능. 상세는 Read 도구로 열람.
|
|
21
|
+
|
|
22
|
+
<!-- DETAIL: File-Disjoint ≠ Independent — full paragraph
|
|
20
23
|
로컬 git 상태를 변경하는 작업(`checkout` / `pull` / `branch` 생성·삭제·rename / `commit` / `stash` / `merge` / `rebase`)은 편집 대상 파일이 disjoint하더라도 **워킹트리·브랜치 포인터·인덱스·HEAD**라는 프로세스 수준 단일 공유 가변 상태를 경합하므로 **직렬화**한다. 실무 규칙: **동시 실행하는 git 상태변경 에이전트는 1개**. git 단계를 먼저 직렬로 끝낸 뒤 나머지를 병렬화한다. read-only 조회(`git status`/`log`/`diff`, `gh` 조회)는 병렬 가능 — 제한 대상은 상태 변경뿐이다.
|
|
24
|
+
-->
|
|
21
25
|
|
|
22
26
|
| Anti-pattern | Required |
|
|
23
27
|
|--------------|----------|
|
|
28
|
+
| 편집 파일 disjoint 이유로 git 상태변경 2+ 병렬 스폰 | 동시 1개로 직렬화; 완료 후 나머지 병렬화 |
|
|
29
|
+
|
|
30
|
+
<!-- DETAIL: git-state Anti-pattern row — full text
|
|
24
31
|
| 편집 파일이 disjoint하다는 이유로 git 상태변경 에이전트 2개 이상을 병렬 스폰 | git 상태변경은 동시 1개로 직렬화; 완료 후 나머지 작업 병렬화 |
|
|
32
|
+
-->
|
|
25
33
|
|
|
26
34
|
Origin: #1518 (찐빠 #1 — git 에이전트 2개 근접 실행으로 작업 브랜치 stale; 편집 파일은 disjoint였음).
|
|
27
35
|
|
|
36
|
+
<!-- DETAIL: CC v2.1.246 note (/ultrareview shared-repo uncommitted-state bug)
|
|
28
37
|
> **★ v2.1.246+**: `/ultrareview` 실행과 클라우드 세션을 **같은 저장소(여러 worktree 포함)에서 동시에 시작**하면, 한 실행이 다른 실행의 **커밋되지 않은 변경분과 함께 시작**되던 결함이 수정되었습니다. 이는 위 조항이 경고하는 시나리오가 **CC 플랫폼 자체에서 실증된 사례**입니다 — 이 조항은 이 저장소의 경험(#1518)에서 나왔는데, 플랫폼이 독립적으로 같은 결함을 겪고 고쳤다는 사실이 조항의 일반성을 뒷받침합니다. 구버전에서는 병렬 실행이 **서로의 uncommitted 변경분을 상속**했으므로, 과거 세션의 설명되지 않는 오염을 이 원인으로 재해석할 수 있습니다.
|
|
38
|
+
-->
|
|
29
39
|
|
|
30
40
|
#### 파일 disjoint ≠ 자원 disjoint (Origin: #1598)
|
|
31
41
|
|
|
42
|
+
<!-- DETAIL: 파일 disjoint ≠ 자원 disjoint — intro paragraph
|
|
32
43
|
git 상태 외에도 병렬 에이전트가 경합하는 공유 자원이 있다 — **검증 명령이 만지는 저장소 파일**, **CPU**, **`$TMPDIR`**. 편집 파일이 disjoint하다는 사실은 이 셋 중 어느 것도 보장하지 않는다.
|
|
44
|
+
-->
|
|
33
45
|
|
|
34
46
|
| 자원 | 병렬 가능 조건 |
|
|
35
47
|
|------|----------------|
|
|
48
|
+
| 검증 명령 | tracked 파일 이동 없고 초 단위 타임아웃 미의존 시만 — 아니면 오케스트레이터가 직렬 1회로 회수 |
|
|
49
|
+
| CPU | 초 단위 타임아웃 테스트는 동시 실행 금지 |
|
|
50
|
+
| `$TMPDIR` | 에이전트별 고유 경로 사용 시만 |
|
|
51
|
+
|
|
52
|
+
<!-- DETAIL: 자원 표 원문 (3행)
|
|
36
53
|
| 검증 명령(`bun test` 등) | 스위트가 저장소 tracked 파일을 이동·삭제·복구하지 않고, 초 단위 타임아웃 예산에 의존하지 않을 때만. 아니면 오케스트레이터가 **직렬 1회**로 회수 |
|
|
37
54
|
| CPU | 타임아웃 예산이 초 단위인 테스트는 동시 실행 금지 — 포화 시 프로세스 기동만으로 예산을 넘긴다 |
|
|
38
55
|
| `$TMPDIR` | 에이전트별 고유 하위 경로를 쓸 때만. 고정 경로를 공유하면 "누수 N건" 같은 측정이 형제 잔여물을 계상한다 |
|
|
56
|
+
-->
|
|
39
57
|
|
|
58
|
+
<!-- DETAIL: tracked 파일 이동 금지 — intro paragraph
|
|
40
59
|
**테스트가 tracked 파일을 이동시키지 않는다**: `cp` → `rm` → `finally` 복구 패턴은 병렬 경합 위양성뿐 아니라 **프로세스 중단 시 tracked 파일이 사라진 채 남는다**. 픽스처는 고유 임시 디렉토리에 사본을 만들어 조작하고 원본은 읽기만 한다.
|
|
60
|
+
-->
|
|
41
61
|
|
|
42
62
|
| Anti-pattern | Required |
|
|
43
63
|
|--------------|----------|
|
|
64
|
+
| 편집 파일이 disjoint하므로 동일 `bun test`를 각 에이전트 완료조건에 넣어 병렬 발주 | 검증을 직렬 1회로 회수하거나 형제 경합을 먼저 배제 |
|
|
65
|
+
| 테스트가 tracked 파일을 `cp`→`rm`→`finally` 복구 | 고유 임시 디렉토리에 사본을 만들어 조작 — 원본은 읽기 전용 |
|
|
66
|
+
|
|
67
|
+
<!-- DETAIL: 자원 disjoint Anti-pattern 표 원문 (2행)
|
|
44
68
|
| 편집 파일이 disjoint하므로 각 에이전트 완료 조건에 동일 `bun test`를 넣어 병렬 발주 | 검증을 직렬 1회로 회수하거나, 공유를 고지하고 결과 해석에서 형제 경합을 먼저 배제 |
|
|
45
69
|
| 테스트가 실제 저장소 tracked 파일을 `cp`→`rm`→`finally` 복구 | 고유 임시 디렉토리에 사본을 만들어 조작 — 원본은 읽기 전용 |
|
|
70
|
+
-->
|
|
71
|
+
|
|
72
|
+
Origin: #1598 (R010, R023).
|
|
46
73
|
|
|
74
|
+
<!-- DETAIL: 파일 disjoint ≠ 자원 disjoint Origin line — full text
|
|
47
75
|
Origin: #1598. Cross-ref: R010 「Parallel Delegation — Sibling-Agent Disclosure」(고지에 담을 내용), R023(Delegated Verification Floor).
|
|
76
|
+
-->
|
|
77
|
+
|
|
48
78
|
|
|
49
79
|
## Agent Teams Gate (R018)
|
|
50
80
|
|
|
81
|
+
Agent Teams 기준 확인 후 스폰 — 미확인은 위반. 3+ 에이전트/리뷰사이클/2+이슈 배치 → Agent Teams(R018).
|
|
82
|
+
|
|
83
|
+
<!-- DETAIL: Agent Teams Gate blockquote — full text
|
|
51
84
|
> Before spawning 2+ parallel agents, evaluate Agent Teams eligibility.
|
|
52
85
|
> Skipping this check does not follow R009 and R018.
|
|
53
86
|
>
|
|
54
87
|
> **See R018 (MUST-agent-teams.md) for the complete self-check and decision matrix.**
|
|
55
88
|
>
|
|
56
89
|
> Quick rule: **3+ agents OR review cycle OR 2+ issues in same batch → use Agent Teams**
|
|
90
|
+
-->
|
|
57
91
|
|
|
58
92
|
## Self-Check
|
|
59
93
|
|
|
@@ -61,13 +95,25 @@ Before writing/editing multiple files:
|
|
|
61
95
|
1. Are files independent? → YES: spawn parallel agents
|
|
62
96
|
2. Using Write/Edit sequentially for 2+ files? → parallelize instead
|
|
63
97
|
3. Specialized agent available? → Use it (not general-purpose)
|
|
98
|
+
4. Agent Teams available? → R018 확인 후 스폰; 3+ 배치는 게이트 결과 announce.
|
|
99
|
+
|
|
100
|
+
<!-- DETAIL: Self-Check item 4 — full text
|
|
64
101
|
4. Agent Teams available? → **Check R018 criteria before spawning 2+ agents; for a 3+ agent batch, announce the gate result (Agent Tool fallback reason or Agent Teams choice) — see R018 Self-Check "Gate Transparency"**
|
|
102
|
+
-->
|
|
65
103
|
5. Running agent stalled (2x+ duration)? → Spawn independent follow-up tasks immediately
|
|
104
|
+
6. Announced a parallel dispatch in prose? → N(announce)==N(tool_use) 대조 후 발화.
|
|
105
|
+
|
|
106
|
+
<!-- DETAIL: Self-Check item 6 + sub-point — full text
|
|
66
107
|
6. Announced a parallel dispatch in prose? → **발화 직전 카운트 대조**: announce 산문이 명시한 도구 개수 N == 이 메시지에 실제 포함된 tool_use 블록 개수. 불일치면 보완한 뒤 발화 (announce-execution consistency)
|
|
67
108
|
- 누락 방향은 무작위다 — verify Bash가 빠지기도(v1.1.22/23), action delegate가 빠지기도(v1.1.27 세션) 했다. 방향별 서술 강화는 3회 재발로 실패가 실증됐으므로, 유일한 실효 방어선은 N↔N 카운트 대조다. Origin: #1512, #1503.
|
|
109
|
+
-->
|
|
68
110
|
|
|
69
111
|
### Common Violations to Avoid
|
|
70
112
|
|
|
113
|
+
See examples via Read tool.
|
|
114
|
+
|
|
115
|
+
<!-- DETAIL: Common Violations to Avoid — examples + Token threshold heuristic
|
|
116
|
+
|
|
71
117
|
```
|
|
72
118
|
❌ WRONG: Write(file1.kt) → Write(file2.kt) → ... (sequential)
|
|
73
119
|
✓ CORRECT: Agent(agent1→file1.kt) + Agent(agent2→file2.kt) + ... (same message, parallel)
|
|
@@ -81,17 +127,32 @@ Before writing/editing multiple files:
|
|
|
81
127
|
```
|
|
82
128
|
|
|
83
129
|
> **Token threshold heuristic**: When a delegated agent prompt exceeds ~5000 tokens or spans 3+ unrelated domains, decompose by domain and spawn parallel agents. See R018 for Agent Teams criteria when review cycles are needed. Reference: #1085.
|
|
130
|
+
-->
|
|
84
131
|
|
|
85
132
|
### LLM Batch Output Token Budget
|
|
86
133
|
|
|
134
|
+
출력 예산 사전 계산 필요 — N×항목당 토큰 계산, ≤40개 청크 분할이 불변 해법.
|
|
135
|
+
|
|
136
|
+
<!-- DETAIL: LLM Batch Output Token Budget — full paragraph
|
|
87
137
|
The giant-prompt heuristic above governs INPUT tokens. The symmetric OUTPUT-side rule: when a single LLM call processes N items (scoring/classifying/extracting) and must emit structured output (e.g. JSON) per item, pre-compute the output budget = N × per-item output tokens BEFORE the call. Exceeding `max_tokens` truncates the response mid-structure → silent parse failure (the call "succeeds" but JSON.parse throws).
|
|
138
|
+
-->
|
|
88
139
|
|
|
89
140
|
| Anti-pattern | Required |
|
|
90
141
|
|--------------|----------|
|
|
142
|
+
| 가변 크기 리스트를 고정 소형 max_tokens로 단일 호출 | ≤40개 청크 분할 + 항목당 길이 제약 |
|
|
143
|
+
| max_tokens만 올림 | 불충분 — 청크 분할이 불변 해법 |
|
|
144
|
+
|
|
145
|
+
<!-- DETAIL: LLM Batch Anti-pattern 표 원문 (2행)
|
|
91
146
|
| Single batch call over a variable-size list with a fixed small max_tokens | Chunk into ≤40-item batches; constrain per-item output length (e.g. reason ≤10 words); raise max_tokens to fit one chunk |
|
|
92
147
|
| Raising max_tokens alone | Insufficient — defers the failure as the list grows. Chunking is the invariant fix. |
|
|
148
|
+
-->
|
|
93
149
|
|
|
150
|
+
Reference: #1320, #1321, `feedback_llm_batch_truncation.md`.
|
|
151
|
+
|
|
152
|
+
<!-- DETAIL: LLM Batch Output Token Budget Reference line — full text
|
|
94
153
|
Reference: #1320 (fix), #1321 (session 113 retrospective 찐빠 #1), `feedback_llm_batch_truncation.md`.
|
|
154
|
+
-->
|
|
155
|
+
|
|
95
156
|
|
|
96
157
|
<!-- DETAIL: Full violation examples (4 pairs)
|
|
97
158
|
❌ WRONG: Writing files one by one
|
|
@@ -109,7 +170,11 @@ Reference: #1320 (fix), #1321 (session 113 retrospective 찐빠 #1), `feedback_l
|
|
|
109
170
|
✓ CORRECT: Agent(lang-kotlin-expert→usecase commands) + Agent(lang-kotlin-expert→usecase queries) + Agent(be-springboot-expert→persistence) + Agent(be-springboot-expert→security) — all spawned together
|
|
110
171
|
-->
|
|
111
172
|
|
|
173
|
+
Agent Teams partial spawn → R018 (MUST-agent-teams.md) "Spawn Completeness Check".
|
|
174
|
+
|
|
175
|
+
<!-- DETAIL: Agent Teams partial spawn note — full text
|
|
112
176
|
> **Agent Teams partial spawn** → See R018 (MUST-agent-teams.md) "Spawn Completeness Check".
|
|
177
|
+
-->
|
|
113
178
|
|
|
114
179
|
<!--
|
|
115
180
|
> **v2.1.161+**: Parallel tool calls in a single batch are now independent — a failed Bash command no longer cancels the other calls in the same batch; each tool returns its own result. This strengthens R009 batching: one failing call in a parallel dispatch no longer aborts its siblings, so independent work bundled in the same message completes regardless of a single failure. Lowers the safety cost of the announce-execution consistency self-check (#6).
|
|
@@ -127,6 +192,9 @@ Reference: #1320 (fix), #1321 (session 113 retrospective 찐빠 #1), `feedback_l
|
|
|
127
192
|
| Instance independence | Isolated context, no shared state |
|
|
128
193
|
| Large tasks (>3 min) | MUST split into parallel sub-tasks |
|
|
129
194
|
|
|
195
|
+
Fable 5는 long-lived subagent 재사용에 강함 — `guides/claude-code/16-fable5-prompting.md` 참조.
|
|
196
|
+
|
|
197
|
+
<!-- DETAIL: CC version notes (v2.1.224-v2.1.273) + Fable 5 note
|
|
130
198
|
> **v2.1.224+**: **세션당 200 subagent spawn cap이 제거**되어 장기 세션이 신규 에이전트를 거부하지 않습니다(동시성 제한과 depth 제한은 유지). 위 표의 "Max instances 5 concurrent"는 **동시성** 제한이므로 그대로 유효합니다 — 제거된 것은 세션 누적 총량 cap입니다. `/fsd` 등 장기 무인 루프에서 후반 반복의 스폰 실패를 더 이상 누적 cap으로 진단하지 않습니다.
|
|
131
199
|
|
|
132
200
|
> **v2.1.232+**: subagent forking이 **기본 활성화**되어 `subagent_type: "fork"` 서브에이전트가 전체 대화와 prompt cache를 상속합니다. 위 표의 "Instance independence — Isolated context, no shared state"는 **fork에는 성립하지 않습니다** — fork는 격리된 병렬 인스턴스가 아니라 컨텍스트 사본이므로, 위 Detection Criteria의 독립성 전제로 병렬 배치를 설계할 때 fork를 일반 subagent와 동일하게 취급하지 않습니다(오케스트레이터 컨텍스트가 그대로 전달되므로 위임 프롬프트의 범위 서술이 유일한 경계가 아님). 구버전에서는 fork가 opt-in이라 이 상속이 예외 경로였습니다. 또한 interactive session의 **non-teammate 에이전트 스폰이 기본 background 실행**이므로 스폰 반환은 완료 신호가 아닙니다(R010/R020). **v2.1.246+**: 이미 fork되었거나 backgrounded된 세션에서 다시 `/fork`하면 빈 대화로 시작되던 결함이 수정되었습니다 — 구버전에서는 재fork 시 위 컨텍스트·prompt cache 상속조차 깨질 수 있었습니다.
|
|
@@ -140,12 +208,17 @@ Reference: #1320 (fix), #1321 (session 113 retrospective 찐빠 #1), `feedback_l
|
|
|
140
208
|
> **v2.1.273+**: (273) `scheduled_tasks.json`이 worktree-isolated 실행에 복사되어, 예약 작업이 **엉뚱한(worktree) 세션에서** 발동할 수 있던 결함이 수정되었습니다. worktree 병렬 위임(`isolation: "worktree"`)에 대한 함의: 273 이전에는 메인 세션에서 armed한 cron/예약 작업이 형제 worktree 에이전트의 컨텍스트에서 실행될 수 있었는데, 이는 이 규칙의 "Instance independence — Isolated context, no shared state" 행이 전제하지 않은 숨은 공유 상태 채널입니다 — 273+에서는 예약 작업에도 이 격리가 적용됩니다. ground-truth 원칙(R020)은 그대로 유지합니다 — 273 이전 버전에서 worktree 에이전트의 "예약 작업이 실행됐다"는 보고는 잘못 라우팅된 메인 세션 작업일 수 있습니다.
|
|
141
209
|
|
|
142
210
|
> **Fable 5 long-lived subagent reuse (Origin: #1435)**: Fable 5는 long-lived subagent 재사용(단일 subagent가 여러 단계를 이어서 수행)에 강함 — 현행 R009 병렬 실행 원칙과 상충하지 않으며, Fable 5 실행 시 short-lived 병렬 다수 대신 long-lived 재사용도 유효한 선택지. 상세는 `guides/claude-code/16-fable5-prompting.md`.
|
|
211
|
+
-->
|
|
143
212
|
|
|
144
213
|
## Adaptive Parallel Splitting
|
|
145
214
|
|
|
146
215
|
Runtime detection and splitting of stalled parallel agents. Complements pre-execution parallelization.
|
|
147
216
|
|
|
217
|
+
cross-ref: R018 `maxTurns` partial 표시 — 침묵·중간 절단 시 먼저 의심.
|
|
218
|
+
|
|
219
|
+
<!-- DETAIL: cross-ref (v1.1.50 실측) — full text
|
|
148
220
|
> **cross-ref (v1.1.50 실측)**: 병렬 위임 중 일부가 침묵·중간 절단되면, 재촉·재분할 전에 R018 `maxTurns` partial 표시(v2.1.246)를 먼저 의심한다 — 20턴 한도 절단이 v1.1.50 세션에서 병렬 4건 중 3건에 실증됐다. 상세는 R018 (MUST-agent-teams.md) Member Completion Verification 섹션.
|
|
221
|
+
-->
|
|
149
222
|
|
|
150
223
|
See detection signals, splitting rules, and example via Read tool.
|
|
151
224
|
|
|
@@ -182,7 +255,11 @@ After (adaptive split):
|
|
|
182
255
|
|
|
183
256
|
## Stability Testing Protocol
|
|
184
257
|
|
|
258
|
+
Soft default 4, hard cap 5; latency>2x/failure>10%/context error 시 4로 축소.
|
|
259
|
+
|
|
260
|
+
<!-- DETAIL: Stability Testing Protocol intro — full text
|
|
185
261
|
Soft default: 4 concurrent agents; hard cap: 5. Reduce to 4 if latency >2x, failure rate >10%, or context errors. See full protocol via Read tool.
|
|
262
|
+
-->
|
|
186
263
|
|
|
187
264
|
<!-- DETAIL: Stability Testing Protocol
|
|
188
265
|
When testing 5 concurrent agents (above the soft default of 4):
|
|
@@ -210,13 +287,21 @@ When testing 5 concurrent agents (above the soft default of 4):
|
|
|
210
287
|
[3] Explore:haiku → Search codebase
|
|
211
288
|
```
|
|
212
289
|
|
|
290
|
+
`[N] {subagent_type}:{model}` 형식 사용 — `[N]`은 1-indexed이며 Agent 도구 `description` 파라미터 접두사와 일치해야 Running display가 상관된다.
|
|
291
|
+
|
|
292
|
+
<!-- DETAIL: Display Format explanatory sentence — full text
|
|
213
293
|
Must use `[N] {subagent_type}:{model}` format. `[N]` is 1-indexed and MUST match the `description` parameter prefix of the Agent tool call for Running display correlation.
|
|
294
|
+
-->
|
|
214
295
|
|
|
215
296
|
Single agent spawns do NOT use the `[N]` prefix.
|
|
216
297
|
|
|
217
298
|
## Narrative Announcement Format (Before Spawn)
|
|
218
299
|
|
|
300
|
+
병렬 dispatch 산문 announce는 줄 시작에 대괄호 숫자가 오는 리터럴 형식을 쓴다 — 리스트 마커·백틱 금지(R008 판정 정규식 요구). 상세는 Read 도구로 열람.
|
|
301
|
+
|
|
302
|
+
<!-- DETAIL: Narrative Announcement Format intro — full text
|
|
219
303
|
병렬 dispatch 산문 announce는 **줄 시작에 대괄호 숫자가 오는 리터럴 형식**을 쓴다. 마크다운 리스트 마커(`- `)나 백틱을 그 앞에 붙이지 않는다 — R008 판정 정규식이 줄 시작의 대괄호 숫자를 요구하므로, 리스트 형식은 **규칙을 지킨 응답이 위반으로 계상**된다.
|
|
304
|
+
-->
|
|
220
305
|
|
|
221
306
|
```
|
|
222
307
|
[secretary][opus] → Spawning:
|
|
@@ -230,7 +315,11 @@ Single agent spawns do NOT use the `[N]` prefix.
|
|
|
230
315
|
| 헤더에 콜론 생략 | Spawning 뒤에 **콜론 필수** |
|
|
231
316
|
| 화살표 없이 콜론만으로 연결 | 에이전트타입:모델 다음에 화살표 필수 |
|
|
232
317
|
|
|
318
|
+
형식을 바꿀 때는 advisor 정규식(`r007-r008-drift-advisor.sh`)을 같은 커밋에서 갱신한다(R016 Rule Wiring Check). 상세는 Read 도구로 열람.
|
|
319
|
+
|
|
320
|
+
<!-- DETAIL: 정규식 정합 (Origin: #1595 #5) — full paragraph
|
|
233
321
|
**정규식 정합 (Origin: #1595 #5)**: 위 코드 블록의 형식은 `.claude/hooks/scripts/r007-r008-drift-advisor.sh`의 판정식과 1:1 대응한다. 화살표는 U+2192, ASCII 하이픈-부등호, U+2014-부등호 3종만 인식된다. 규칙 문구와 탐지기 정규식이 어긋나면 **규칙 준수 응답이 위반으로 계상되고, 그 계수를 근거로 다시 규칙을 고치는 악순환**이 생긴다. 형식을 바꿀 때는 advisor 정규식을 같은 커밋에서 갱신한다(R016 Rule Wiring Check). 이 형식은 위 「Display Format」 섹션과 동일하다 — 두 섹션이 서로 다른 형식을 요구하지 않도록 유지한다.
|
|
322
|
+
-->
|
|
234
323
|
|
|
235
324
|
<!-- DETAIL: Narrative Announcement Format (Before Spawn)
|
|
236
325
|
산문 announce(Agent 도구 호출 자체가 아니라 그 앞의 텍스트)는 advisor 정규식과 리터럴로 일치해야 한다.
|
|
@@ -278,12 +367,20 @@ Single agent spawns do NOT use the `[N]` prefix.
|
|
|
278
367
|
|
|
279
368
|
## Parallel Feature Integration Gate
|
|
280
369
|
|
|
370
|
+
병렬 각자의 "build green"은 통합 정합성 미보장 — 병합 후 통합 빌드+런타임 스모크 게이트 필수.
|
|
371
|
+
|
|
372
|
+
<!-- DETAIL: Parallel Feature Integration Gate — Origin + full paragraph
|
|
281
373
|
> Origin: #1335 ③ — parallel lang-kotlin-expert rounds each reported "build green", but the COMBINED runtime had a DataStore singleton crash, a Settings→Dashboard nav crash, a recording 400, and cursor pre-advance bugs — caught only by on-device testing.
|
|
282
374
|
|
|
283
375
|
Per-subagent "build green" does NOT guarantee integrated runtime correctness. When parallel feature subagents edit interdependent code, the orchestrator MUST run an INTEGRATION verification gate after the parallel work merges — a combined build PLUS a runtime/smoke check (or device test for apps) — before declaring the feature done. Independent green builds can still combine into runtime crashes (shared singletons, navigation, API contracts).
|
|
376
|
+
-->
|
|
284
377
|
|
|
285
378
|
| Anti-pattern | Required |
|
|
286
379
|
|--------------|----------|
|
|
380
|
+
| 각 병렬 subagent의 "build green"만 신뢰하고 완료 선언 | 병합 결과에 통합 빌드 + 런타임/스모크 게이트를 오케스트레이터가 먼저 실행 |
|
|
381
|
+
|
|
382
|
+
<!-- DETAIL: Parallel Feature Integration Gate Anti-pattern row — full text
|
|
287
383
|
| Trust each parallel subagent's "build green" and declare done | Orchestrator runs a combined build + runtime/smoke gate on the merged result first |
|
|
384
|
+
-->
|
|
288
385
|
|
|
289
386
|
Cross-reference: R020 (actual outcome ≠ attempt; completion verification).
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
| 2: Default | Write, Edit, NotebookEdit | State changes explicitly, notify before modifying important files |
|
|
11
11
|
| 3: Context | Agent, Skill, EnterPlanMode, ExitPlanMode, EnterWorktree, ExitWorktree, LSP, Monitor, TodoWrite†, AskUserQuestion, PushNotification | Context-dependent, no user approval needed |
|
|
12
12
|
| 4: Approval | Bash, PowerShell, WebFetch, WebSearch | Request user approval on first use |
|
|
13
|
-
| 5: Conditional | TeamCreate†, TeamDelete†, SendMessage, TaskCreate†, TaskGet†, TaskList†, TaskUpdate†, TaskStop
|
|
13
|
+
| 5: Conditional | TeamCreate†, TeamDelete†, SendMessage, TaskCreate†, TaskGet†, TaskList†, TaskUpdate†, TaskStop | Available when Agent Teams enabled (TaskOutput 제거됨, v2.1.277+ — 아래 참조) |
|
|
14
14
|
| 6: MCP | ListMcpResourcesTool, ReadMcpResourceTool, CronCreate, CronDelete, CronList, RemoteTrigger | MCP/extension tools, available when servers configured |
|
|
15
15
|
|
|
16
16
|
> **†** 현행 모델의 기본 실행 환경에 **존재하지 않는다** — 아래 v2.1.233 노트 참조. 이 표는 **도구 카탈로그**이지 가용성 보증이 아니므로, 규칙이 특정 도구 호출을 의무화하기 전에 실측(도구 목록 / `ToolSearch`)으로 존재를 확인한다.
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
| Write | Source code, new files in project, `.claude/**` (CC v2.1.121+ under `bypassPermissions`) | .env, .git/config, paths outside project |
|
|
24
24
|
| Delete | Temp files created by agent | Existing files (without request), entire directories |
|
|
25
25
|
|
|
26
|
+
<!-- DETAIL: Sensitive paths note (full rationale)
|
|
26
27
|
> **Sensitive paths note**: As of CC v2.1.121 (2026-04-28) and further relaxed in v2.1.126 (2026-05-01), `.claude/`, `.git/`, `.vscode/` are no longer prompted for Write/Edit/Bash under `mode: "bypassPermissions"`. The legacy `/tmp/*.sh` script bypass (R010 historical section) is deprecated for CC >= v2.1.121. Catastrophic operations (`rm -rf /`) remain blocked. See #1101.
|
|
28
|
+
-->
|
|
29
|
+
CC v2.1.121+: `.claude/`·`.git/`·`.vscode/`는 `bypassPermissions`에서 프롬프트 없음(레거시 `/tmp/*.sh` 우회는 폐기, #1101). 파괴적 작업(`rm -rf /`)은 계속 차단됩니다.
|
|
27
30
|
|
|
28
31
|
## Permission Request Format
|
|
29
32
|
|
|
@@ -75,6 +78,7 @@ Use a `"*"` deny rule in `settings.json` to enforce a deny-by-default posture, t
|
|
|
75
78
|
|
|
76
79
|
<!-- RETIRED (은퇴 릴리즈 v1.1.45, 보존 기준 v2.1.212 미만): > **v2.1.210+**: `Write(path)`/`NotebookEdit(path)`/`Glob(path)` 형태의 permission rule은 시작 시 경고를 발생시킵니다 — 파일 쓰기 rule은 `Edit(path)`, 읽기 rule은 `Read(path)` matcher로 작성합니다. 위 Tier 표의 Write/NotebookEdit/Glob은 도구명일 뿐 path-scoped rule matcher가 아닙니다(위 v2.1.166 unknown-tool startup warning 연장선). -->
|
|
77
80
|
|
|
81
|
+
<!-- DETAIL: Permission-check CC version notes (historical/diagnostic)
|
|
78
82
|
> **v2.1.214+**: 단일 세그먼트 `dir/**` allow rule(예: `Edit(src/**)`)이 트리 어디에나 있는 중첩 `dir/`까지 auto-approve하던 버그가 수정되어 이제 `<cwd>/dir`에만 매칭됩니다(hook `if:` 조건도 동일 — 임의 깊이 매칭이 필요하면 `**/dir/**`로 작성). **`deny`/`ask` permission rule은 any-depth 매칭을 유지**(allow만 `<cwd>`로 좁아짐). settings.json 스코프 설계 시 이 비대칭(allow 좁게 / deny·ask 넓게)을 전제로 삼습니다. 위 v2.1.210 `Edit(path)`/`Read(path)` matcher 권고의 연장선.
|
|
79
83
|
|
|
80
84
|
> **v2.1.252/257+**: 두 건이 allow 규칙 저장·반영 신뢰성을 보강합니다. (252) `.claude/settings.local.json`이 아직 없는 프로젝트에서 "always allow"를 눌러도 저장되지 않던 결함이 수정되었습니다 — 구버전에서 "always allow를 눌렀는데 다시 묻는다"는 관측은 이 파일 부재가 원인일 수 있었습니다. (257) 세션 시작 후 새로 생성된 `.claude/` 폴더의 settings가 재시작 전까지 반영되지 않던 결함이 수정되었습니다 — R021 「훅 배선 경로」가 서술하는 settings 재생성 흐름에서, 세션 중 생성한 settings 파일이 이제 즉시 로드됩니다.
|
|
@@ -123,19 +127,30 @@ Use a `"*"` deny rule in `settings.json` to enforce a deny-by-default posture, t
|
|
|
123
127
|
> **v2.1.238+**: Bash 도구의 permission 검사가 zsh 전용 조건문(shell conditional) 문법에 대해 추가로 개선되었습니다. 이는 위 v2.1.221 "zsh `[[ ]]` 정규식 조건문 안에서 숨겨진 명령이 권한 검사를 우회"의 **직접 연장선**입니다 — "개선"으로만 기술되어 있어 v2.1.221 수정이 완전 해결이 아니었거나 추가 우회 벡터가 있었음을 시사합니다. 이 저장소의 Bash 도구 실행 셸이 zsh이므로(R005 #1540 실측) 직접 관련됩니다.
|
|
124
128
|
|
|
125
129
|
> **v2.1.246/248+**: (246) 끝에 매달린 `&&`/`||`가 있는 손상된(malformed) 명령에 대해 Bash 권한검사가 이제 **항상 승인을 요구**합니다 — 구버전에서는 이런 형태가 검사를 우회할 수 있었습니다. (248) `--restricted`(또는 `CLAUDE_CODE_RESTRICTED=1`) 모드가 신설되어 명령/코드 실행 도구와 `WebFetch`를 제거하고(`--tools`에 명시 시 예외), 파일 도구를 작업 디렉토리 내부로 제한하며, `bypassPermissions`를 거부하고, user/project/local settings 파일을 무시합니다. 이 저장소는 프로젝트 settings에 `bypassPermissions`를 선언하지만 v2.1.257부터 그 선언은 무시되므로(R010 Universal bypassPermissions의 ★ v2.1.257 노트 — 2026-09-02 실측 유효 모드는 user settings `auto`), `--restricted`와의 상호 배타성은 **user/managed scope에서 bypass를 켠 경우에 한해** 성립합니다 — 이 저장소 워크플로우에는 적용하지 않되, 신규 안전 모드 옵션으로 존재를 기록합니다.
|
|
130
|
+
-->
|
|
126
131
|
|
|
127
132
|
### Todo/Task 도구 기본 제거 (v2.1.233+) — 위 표의 †
|
|
128
133
|
|
|
134
|
+
<!-- DETAIL: Todo/Task CHANGELOG quote + agent-count rationale
|
|
129
135
|
CHANGELOG v2.1.233 원문: *"Todo/task-tracking tools (TaskCreate/Get/Update/List, TodoWrite) are no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and newer models; set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to bring them back"*. 이 저장소 에이전트 **49개 중 46개**(`claude-sonnet-5` 41 + `claude-opus-5` 5)가 대상 모델이므로 실행 환경의 기본값은 **부재**다(잔여 3개는 `haiku`).
|
|
136
|
+
-->
|
|
130
137
|
|
|
138
|
+
<!-- DETAIL: Todo/Task measurement caption (full wording; table kept visible below)
|
|
131
139
|
**실측 (2026-08-15 — `claude -p --output-format stream-json` init 이벤트의 `tools` 배열, `claude-opus-5[1m]`/`claude-sonnet-5` 3회 동일 결과)**:
|
|
140
|
+
-->
|
|
141
|
+
**실측 (2026-08-15) + CHANGELOG v2.1.277**: 이 저장소 실행 환경(`claude-opus-5[1m]`/`claude-sonnet-5`)의 실제 tools 배열 기준.
|
|
132
142
|
|
|
133
143
|
| 상태 | 도구 |
|
|
134
144
|
|------|------|
|
|
135
145
|
| 미등록 (CHANGELOG 명시) | `TodoWrite`, `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate` |
|
|
136
146
|
| 미등록 (CHANGELOG 미명시 — 별도 게이팅) | `TeamCreate`, `TeamDelete` |
|
|
137
|
-
| 잔존 | `TaskStop`, `
|
|
147
|
+
| 잔존 | `TaskStop`, `SendMessage` |
|
|
148
|
+
| 제거됨 (v2.1.277+) | `TaskOutput` — background task output은 Read로 직접 읽는다; `taskOutputMaxChars`/`TASK_MAX_OUTPUT_LENGTH` 무효 |
|
|
149
|
+
|
|
150
|
+
<!-- DETAIL: TaskOutput 2026-08-15 측정 당시 잔존 표기(v2.1.233 기준) — CC v2.1.277 CHANGELOG: "Removed the deprecated TaskOutput tool; Claude reads a background task's output file with Read instead, and the `taskOutputMaxChars` setting and `TASK_MAX_OUTPUT_LENGTH` no longer have any effect" Origin: #1714.
|
|
151
|
+
-->
|
|
138
152
|
|
|
153
|
+
<!-- DETAIL: Todo/Task gate-function measurement + TeamCreate/env-var rationale + Origin
|
|
139
154
|
바이너리(`2.1.233`) 게이트 함수 실측도 이를 뒷받침한다 — 게이트 대상 도구 배열은 **정확히 5개**(CHANGELOG 명시 5종)이며 `TaskOutput`은 포함되지 않는다.
|
|
140
155
|
|
|
141
156
|
`TeamCreate` 부재는 CHANGELOG가 설명하지 않는 별개 사실이며, **Agent Teams 생성 경로 자체가 없다**는 뜻이다 — 환경변수 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`이 설정돼 있어도 R018은 이 환경에서 비활성이다(R018 Detection). 규칙은 **존재하지 않는 도구의 호출을 의무화하지 않는다** — 도구 의존 의무를 쓸 때는 부재 시 대체 규약을 함께 규정한다(R018 Member TaskUpdate Discipline이 그 예).
|
|
@@ -143,16 +158,24 @@ CHANGELOG v2.1.233 원문: *"Todo/task-tracking tools (TaskCreate/Get/Update/Lis
|
|
|
143
158
|
`CLAUDE_CODE_ENABLE_TODO_TOOLS=1`은 복구 수단이나 **환경 설정 사안**이므로 규칙이 그 설정을 전제하지 않는다. 공식 settings 문서(`code.claude.com/docs/en/settings`)에는 2026-08-15 기준 미수록 — 현재 근거는 CHANGELOG 원문 + 위 실측이다.
|
|
144
159
|
|
|
145
160
|
Origin: #1582. Cross-ref: R018(Member TaskUpdate Discipline 대체 규약), R020("도구가 있다"는 가정도 실측 대상).
|
|
161
|
+
-->
|
|
162
|
+
`TeamCreate`/`TeamDelete`도 별도로 부재 — R018은 이 환경에서 비활성입니다(R018 Detection). 규칙은 **존재하지 않는 도구의 호출을 의무화하지 않으며**, 도구 의존 의무를 쓸 때는 부재 시 대체 규약을 함께 규정합니다(R018 Member TaskUpdate Discipline이 그 예). `CLAUDE_CODE_ENABLE_TODO_TOOLS=1`은 환경 설정 사안이므로 규칙이 전제하지 않습니다. Origin: #1582.
|
|
146
163
|
|
|
147
164
|
## Agent Tool Permission Mode
|
|
148
165
|
|
|
149
166
|
> Canonical source: R010 (MUST-orchestrator-coordination.md) "Universal bypassPermissions" owns the full requirement, rationale, self-check, and version history. Core rule: always pass `mode: "bypassPermissions"` explicitly on every Agent tool call — the Agent tool's default `mode` (`acceptEdits`) overrides agent frontmatter `permissionMode` and causes prompts during unattended execution. Skills that spawn agents MUST include this in their Agent tool call instructions. See R010 for details.
|
|
150
167
|
|
|
168
|
+
**주의**: v2.1.212+부터 `mode` 파라미터는 무시되며 유효 모드는 부모 세션이 결정합니다 — 실측은 R010 Self-Check를 참조합니다.
|
|
169
|
+
|
|
170
|
+
<!-- DETAIL: Agent tool mode deprecation rationale (canonical: R010)
|
|
151
171
|
> **v2.1.212+**: CC가 Agent(구 Task) tool의 `mode` 파라미터를 deprecated 처리했습니다(이제 무시) — subagent는 부모 세션의 permission mode를 기본 상속합니다. 위 canonical 요약의 default `mode`(`acceptEdits`)가 frontmatter `permissionMode`를 override한다는 서술 및 항상 `mode: "bypassPermissions"`를 넘기라는 요건은 이 버전부터 stale이며(파라미터가 무시됨), 무인 실행의 실질 게이트는 부모 세션의 permission mode입니다. 요건 재조정은 R010 "Universal bypassPermissions"가 canonical — R002는 이 flag만 유지합니다.
|
|
172
|
+
-->
|
|
152
173
|
|
|
174
|
+
<!-- DETAIL: defaultMode project-scope-ignored rationale (canonical: R010)
|
|
153
175
|
> **v2.1.257+**: 프로젝트 scope `permissions.defaultMode` 가 무시됩니다(user/managed scope 또는
|
|
154
176
|
> `--permission-mode` 플래그만 유효). 위 v2.1.212 노트가 "무인 실행의 실질 게이트는 부모 세션의
|
|
155
177
|
> permission mode"라고 정정했는데, **그 부모 세션 모드를 프로젝트 settings로 지정하는 경로가 이
|
|
156
178
|
> 버전에서 끊겼습니다** — 이 파일 상단 「Deny Rule Glob Patterns」의 v2.1.214 노트(allow 규칙만
|
|
157
179
|
> `<cwd>`로 좁아진 비대칭)와 같은 계열의 **project-scope 축소** 흐름입니다. Canonical owner 는
|
|
158
180
|
> R010 "Universal bypassPermissions" — 상세와 실측 절차는 그쪽을 참조합니다. Origin: #1644.
|
|
181
|
+
-->
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
## Destructive Git Commands (Working Tree Loss Risk)
|
|
15
15
|
|
|
16
|
+
다음 git 명령은 과거 작업트리 손실을 유발했으므로(#1146) 호출마다 명시적 사용자 승인이 필요합니다:
|
|
17
|
+
|
|
18
|
+
<!-- DETAIL: destructive git commands intro
|
|
16
19
|
The following git commands have caused working tree loss in past sessions (#1146, v0.136.0). REQUIRE explicit user approval per invocation:
|
|
20
|
+
-->
|
|
17
21
|
|
|
18
22
|
| Command | Risk | Required Action |
|
|
19
23
|
|---------|------|----------------|
|
|
@@ -31,31 +35,57 @@ The following git commands have caused working tree loss in past sessions (#1146
|
|
|
31
35
|
|
|
32
36
|
<!-- RETIRED (은퇴 릴리즈 v1.1.44, 보존 기준 v2.1.212 미만): > **v2.1.208+**: Catastrophic removals (e.g. `rm -rf ~`) wrapped in `$(…)`/backticks/`<(…)` now trigger the same prompt as the plain form in `--dangerously-skip-permissions` and auto mode — closes a subshell-obfuscation gap in the v2.1.183 platform-level destructive-command block above. -->
|
|
33
37
|
|
|
38
|
+
<!-- DETAIL: v2.1.223/224+ dialog integrity/sandbox deny
|
|
34
39
|
> **v2.1.223/224+**: 승인 다이얼로그·샌드박스 경계의 표시 무결성 결함 두 건이 수정되었습니다. (223) 탭·비가시 유니코드로 패딩한 명령이 승인 다이얼로그에서 자기 일부를 숨길 수 있던 결함 — 사용자가 **본 것과 승인한 것이 달랐다**는 뜻이므로, 위 Pre-Delegation Blast-Radius Enumeration(모델이 파괴 대상을 별도로 열거)이 플랫폼 다이얼로그로 대체될 수 없음을 재확인시킵니다. (224) sandbox filesystem deny 항목의 후행 슬래시(`denyRead: "~/.aws/"`)가 조용히 우회 가능하던 결함, 그리고 sandbox 위반 상세가 Bash 도구 결과에 전혀 나타나지 않던 결함 — 후자는 위반이 **관측 불가**했다는 의미이므로, 구버전에서 "sandbox 위반 없음"은 위반 부재의 증거가 아닙니다. credential deny 규칙 작성 시 후행 슬래시를 제거합니다(cross-ref R002).
|
|
40
|
+
-->
|
|
35
41
|
|
|
42
|
+
<!-- DETAIL: v2.1.221/222+ worktree isolation destructive git
|
|
36
43
|
> **v2.1.221/222+**: v2.1.222에서 worktree-isolated 세션과 그 subagent가 main checkout에 대해 파괴적 git 명령을 실행할 수 있던 문제가 수정되어, isolation이 모든 세션 타입의 file edit과 Bash에 적용됩니다. v2.1.221에서는 `/fork` 세션이 원본 세션 checkout이 아니라 자체 worktree를 생성하도록 변경되었습니다. **완화 아님**: 위 Destructive Git Commands 표의 per-invocation 승인 요구와 아래 Pre-Delegation Blast-Radius Enumeration은 그대로 유지됩니다. 플랫폼 isolation은 격리 경계를 강화할 뿐, 사용자가 판단하는 데 필요한 blast-radius 열거를 대체하지 않습니다(v2.1.183/208 플랫폼 블록과 동일한 defense-in-depth 관계).
|
|
44
|
+
-->
|
|
37
45
|
|
|
46
|
+
<!-- DETAIL: v2.1.234/236/238+ dialog integrity series
|
|
38
47
|
> **v2.1.234/236/238+**: 승인 다이얼로그 표시 무결성 결함이 3개 릴리즈 연속으로 발견·수정되었습니다. (234) permission 프롬프트 comment 필드에서 Shift+Tab을 누르면 필드를 닫는 대신 **edit을 승인하고 세션 전체 edit 권한을 부여**하던 결함. (236) managed-settings 승인 프롬프트가 **표시되지 않으면서 첫 키입력을 승인으로 소비**하던 결함 — 프롬프트를 보지 못한 사용자의 무관한 입력이 승인으로 처리될 수 있었습니다. (238) 대화상자 표시 텍스트와 "don't ask again" 옵션이 이제 항상 실제 승인 범위와 일치하도록 개선되고, 내용이 완전히 표시될 수 없으면 "don't ask again"이 보류됩니다. 이 3건은 위 v2.1.223 "탭·비가시 유니코드 패딩 명령이 자기 일부를 숨김" 결함과 **같은 계열의 반복**이며, 단발 결함이 아니라 승인 다이얼로그 표시 무결성이 여러 릴리즈에 걸쳐 계속 발견되고 있는 구조적 계열임을 실증합니다. Pre-Delegation Blast-Radius Enumeration(모델이 파괴 대상을 별도 열거)이 플랫폼 다이얼로그로 대체될 수 없다는 원칙은 이 반복으로 더욱 강화됩니다.
|
|
48
|
+
-->
|
|
39
49
|
|
|
50
|
+
<!-- DETAIL: v2.1.236+ macOS sandbox wildcard deny
|
|
40
51
|
> **v2.1.236+**: macOS 샌드박스에서 wildcard read-deny 규칙(예: `**/.env`)이 이제 허용된 read 영역 **내부에서도 우선 적용**되고, 매칭된 디렉토리의 콘텐츠까지 커버하며, 파일명 변경으로 우회할 수 없습니다. 위 v2.1.224 "sandbox filesystem deny 항목의 후행 슬래시가 조용히 우회 가능하던 결함"과 같은 sandbox deny 규칙 우회 계열의 추가 하드닝입니다 — 구버전에서는 read-deny 와일드카드가 허용 영역 안에서 무력화되거나 파일명 rename으로 우회될 수 있었습니다.
|
|
52
|
+
-->
|
|
41
53
|
|
|
54
|
+
<!-- DETAIL: v2.1.246/251+ credential transmission boundary
|
|
42
55
|
> **v2.1.246/251+**: 자격증명 전송 경계 결함 2건이 수정되었습니다. (246) 서드파티 게이트웨이(`ANTHROPIC_BASE_URL`)용 API 키가 Anthropic 텔레메트리/메트릭 요청에 함께 실려 전송되던 결함 — 구버전에서는 게이트웨이 자격증명이 자기 호스트 밖으로 유출됐습니다. (251) `/ultrareview` 및 로컬 시딩 cloud session이 `prod.env` 계열·`*.tfvars` 파일, 또는 자격증명 파일의 에디터 swap/temp/backup 사본(`key.pem.tmp`, `id_rsa.swo`)을 업로드하던 결함 — 이제 로컬에 남습니다. 이 저장소는 `/ultrareview`를 사용하지 않으나, 두 항목 모두 이 섹션의 "자격증명 저장소 덤프 금지" 원칙과 동일한 위협 클래스에 대한 플랫폼 측 방어이므로 기록합니다.
|
|
56
|
+
-->
|
|
43
57
|
|
|
58
|
+
<!-- DETAIL: v2.1.261+ rm -rf prompt coverage/diagram upload
|
|
44
59
|
> **v2.1.261+**: 위험한 `rm` 안전 프롬프트가 **positional parameter에 대한 `rm -rf`**(`rm -rf "$@"` 등)와 **큰따옴표로 감싼 `sh -c` 스크립트 내부**의 `rm -rf`까지 잡도록 확장되었습니다 — 위 Destructive Git Commands 표의 per-invocation 승인 요구와 동일한 원칙을 셸 레벨에서 보강하는 플랫폼 측 defense-in-depth이며, Pre-Delegation Blast-Radius Enumeration을 대체하지 않습니다. 또한 auto mode가 **공개 다이어그램 렌더러 URL에 다이어그램 소스를 실어 보내는 링크**(mermaid/kroki류 렌더 URL)를 그 사이트로의 **업로드**로 취급해, 사용자가 요청하지 않은 한 더 이상 auto-approve하지 않습니다. 이 저장소의 다이어그램 스킬(`eraser-diagrams`, mermaid 렌더링)이 이런 링크를 생성할 수 있으므로, 이런 링크에서 classifier가 멈추는 것은 정상 동작이지 오작동이 아닙니다 — 재시도하지 않습니다(cross-ref R010 Subagent Scope-Creep STOP Protocol).
|
|
60
|
+
-->
|
|
45
61
|
|
|
62
|
+
<!-- DETAIL: v2.1.260/265/267+ bash-mode sandbox/symlink path
|
|
46
63
|
> **v2.1.260/265/267+**: (260) `!` bash-mode 프롬프트에서 직접 입력한 명령은 strict sandbox mode에서도 샌드박스 **밖에서** 실행됩니다 — 즉 위 「Standing User-Deny + Classifier Block」섹션의 "`!`로 사용자에게 넘기는" 패턴은 설계상 **비샌드박스 경로**임을 명시적으로 인지해야 합니다. (265) macOS/Linux에서 백슬래시를 포함한 플러그인 경로가 symlink containment 검사를 우회하던 결함, (267) fetched marketplace entry 경로에 대한 동일 계열 결함이 각각 수정되었습니다 — 둘 다 v2.1.233 `\??\` device prefix 노트와 같은 **경로 표기 우회 계열**(같은 위치를 다르게 표기해 검사를 피함)입니다. 또한 (259) 동시 세션이 서로의 `~/.claude.json` 변경(workspace trust 초기화, MCP/project state 유실)을 조용히 되돌리던 결함도 수정되었습니다 — 공유 워크트리 다중 세션 실행 시 관련됩니다.
|
|
64
|
+
-->
|
|
47
65
|
|
|
66
|
+
<!-- DETAIL: v2.1.268+ credential exposure two directions
|
|
48
67
|
> **v2.1.268+**: 자격증명 노출 결함이 두 방향에서 수정되었습니다 — 플러그인/마켓플레이스 오류가 git 소스 URL에 담긴 토큰·비밀번호를 표시하던 결함, `/mcp`·`/plugin` 서버 상세·`claude mcp list`/`get`·MCP 로그인 오류가 MCP config의 `${VAR}` placeholder를 **해석된 값**으로 표시하던 결함(274에서 MCP connection 오류·MCP 로그인 도구 설명까지 동일하게 수정). 이 섹션의 "자격증명 저장소 덤프 금지"와 동일한 위협 클래스입니다 — 구버전에서는 MCP 오류 메시지를 트랜스크립트나 이슈에 붙여 넣는 것만으로 해석된 시크릿이 함께 노출될 수 있었으므로(위 v2.1.232 GitLab 토큰 redaction 노트와 동일 원칙), 과거 로그를 공유하기 전 이 점을 확인합니다. 또한 (268) Bash 샌드박스 안내 문구가 실제보다 격리를 과장 서술하던 결함 — filesystem isolation이 꺼진 상태에서 경로 목록을 표시하거나, strict mode가 "명령이 샌드박스 밖에서 절대 실행되지 않는다"고 주장하던 사례 — 이 수정되었습니다. 샌드박스 안내 문구를 보장으로 취급하지 않습니다(위 `!` bash-mode 비샌드박스 경로 노트 cross-ref).
|
|
68
|
+
-->
|
|
49
69
|
|
|
70
|
+
<!-- DETAIL: v2.1.275+ CHANGELOG plugin secret/npm install
|
|
50
71
|
> **v2.1.275+**: (275) `Fixed plugin and marketplace messages, logs and "claude plugin marketplace list" showing a password or token stored in a git, ssh or marketplace URL` — 위 v2.1.268 노트와 같은 위협 클래스(자격증명 저장소 덤프 금지 원칙 유지)이며, 구버전 로그·`claude plugin marketplace list` 출력을 공유하기 전 자격증명 잔존 가능성을 확인합니다. (275) `Changed plugins installed from an npm source to be fetched with "npm pack --ignore-scripts" and integrity-verified, so a package's install scripts no longer run` — supply-chain 각도의 강화이며, 구버전에서는 npm 소스 플러그인 설치 시 install script가 실행될 수 있었습니다; 이 저장소는 플러그인을 마켓플레이스로 설치하므로 npm 소스 플러그인은 현재 미사용입니다(기록용).
|
|
72
|
+
-->
|
|
51
73
|
|
|
74
|
+
<!-- DETAIL: v2.1.271/273/274+ subshell rm/multibyte edit preview
|
|
52
75
|
> **v2.1.271/273/274+**: (273) bypass 모드에서 subshell 안에 숨긴 위험한 `rm`이 프롬프트를 우회하던 결함이 수정되었습니다(위험한 `rm` 프롬프트 계열: v2.1.261 positional parameter·`sh -c` 커버리지의 연장선). (274) 멀티바이트 문자가 포함된 파일에서 Edit 권한 프롬프트 미리보기가 실제 승인 대상과 **다른 위치**를 보여주던 결함이 수정되었습니다 — 이 파일 시리즈(v2.1.223/234/236/238/257)의 **여섯 번째** 승인 다이얼로그 무결성 결함이며, 멀티바이트 문자 전반에 대한 결함(한글 포함)이라 이 저장소의 룰·위키가 한글로 작성되므로 직접 영향을 받는 첫 사례입니다 — 구버전에서는 한글 파일의 Edit 미리보기가 엉뚱한 줄을 가리킬 수 있었습니다. Pre-Delegation Blast-Radius Enumeration(모델이 파괴 대상을 별도 열거)은 여전히 1차 방어선입니다. (271) 샌드박싱된 auto mode에 명령별 `allowed_domains`가 추가되어(cross-ref R002), 세션 전체 네트워크 허용보다 좁은 egress 승인이 가능해졌습니다.
|
|
76
|
+
-->
|
|
53
77
|
|
|
54
78
|
### Pre-Delegation Blast-Radius Enumeration
|
|
55
79
|
|
|
80
|
+
<!-- DETAIL: Origin #1307 blast-radius
|
|
56
81
|
> Origin: #1307 찐빠 #1 (High) — user chose "discard local changes and pull", and `git reset --hard origin/develop` was delegated immediately → user rejected (interrupt). The blast radius — that "discard local changes" included 18 files of *intended* uncommitted work (rule edits, new skills, new guides), not just a version downgrade — was never enumerated for the user.
|
|
82
|
+
-->
|
|
83
|
+
|
|
84
|
+
파괴적 git 명령 위임 전 오케스트레이터는 정확한 삭제 대상을 전부 열거해 명시적 승인을 받아야 합니다 — "로컬 변경 버리기" 같은 뭉뚱그린 의도만으로 위임을 금지합니다.
|
|
57
85
|
|
|
86
|
+
<!-- DETAIL: pre-delegation enumerate requirement
|
|
58
87
|
Before delegating ANY destructive git command (the table above), the orchestrator MUST first enumerate the EXACT discard targets and present them for explicit approval. Do NOT delegate a destructive git op on a paraphrased intent ("로컬 변경 버리기" / "discard local changes") without showing what will actually be lost.
|
|
88
|
+
-->
|
|
59
89
|
|
|
60
90
|
| Required before delegation | Command |
|
|
61
91
|
|----------------------------|---------|
|
|
@@ -64,13 +94,23 @@ Before delegating ANY destructive git command (the table above), the orchestrato
|
|
|
64
94
|
| Show stashable work scope | `git stash show --stat` (when a stash is involved) |
|
|
65
95
|
| Show untracked files at risk (for `clean`) | `git clean -nd` |
|
|
66
96
|
|
|
97
|
+
사용자가 지목한 증상뿐 아니라 의도된 미커밋 편집까지 전부 열거하고, 가능하면 `git stash` 등 비파괴적 대안을 우선합니다.
|
|
98
|
+
|
|
99
|
+
<!-- DETAIL: enumerate all affected work
|
|
67
100
|
Enumerate ALL affected work — intended uncommitted edits (rule changes, new skills/guides) count too, not just the symptom the user named. Prefer a non-destructive alternative (`git stash`) when the user's goal (e.g., "reach remote state") can be met without permanent loss.
|
|
101
|
+
-->
|
|
68
102
|
|
|
69
103
|
### Infra/Resource Deletion Blast-Radius (generalized)
|
|
70
104
|
|
|
105
|
+
<!-- DETAIL: Origin #1327 infra deletion
|
|
71
106
|
> Origin: #1327 찐빠 #3 — a Cloudflare tunnel was deleted after confirming only the user-named hostname (hermes.baekenough.com) + active-connection=0; the full set of DNS records / endpoints the tunnel served was never enumerated.
|
|
107
|
+
-->
|
|
72
108
|
|
|
109
|
+
위 git blast-radius 원칙은 모든 공유 인프라 삭제(터널·DNS·k8s·로드밸런서 등)에 일반화됩니다 — 사용자가 지목한 것 외 모든 엔드포인트를 열거합니다.
|
|
110
|
+
|
|
111
|
+
<!-- DETAIL: infra deletion generalization
|
|
73
112
|
The git blast-radius enumeration above generalizes to ALL infra/resource deletion (tunnels, DNS records, k8s resources, load balancers, security groups). Before deleting a shared infra resource, enumerate EVERY endpoint/hostname/route the resource serves — not just the one the user named.
|
|
113
|
+
-->
|
|
74
114
|
|
|
75
115
|
| Resource | Enumerate before delete |
|
|
76
116
|
|----------|-------------------------|
|
|
@@ -79,13 +119,23 @@ The git blast-radius enumeration above generalizes to ALL infra/resource deletio
|
|
|
79
119
|
| k8s resource (Service, Ingress, etc.) | All selectors/endpoints/routes it backs |
|
|
80
120
|
| Load balancer / Security group | All targets/rules attached |
|
|
81
121
|
|
|
122
|
+
삭제 전 전체 서빙 엔드포인트 목록을 제시해 명시적 승인을 받습니다 — 한 호스트명의 연결 0건이 전체 무사용의 증거는 아닙니다.
|
|
123
|
+
|
|
124
|
+
<!-- DETAIL: present full endpoint list
|
|
82
125
|
Present the full served-endpoint list for explicit approval before deletion. Active-connection=0 on one hostname does NOT prove the resource is unused by others.
|
|
126
|
+
-->
|
|
127
|
+
|
|
128
|
+
목표 달성에 영구 삭제가 불필요하면 가역적 조치(비활성화/분리/중지)를 우선하고, 진행 전 복구 가능 여부를 명시합니다.
|
|
83
129
|
|
|
130
|
+
<!-- DETAIL: prefer reversible action
|
|
84
131
|
Prefer a reversible action (disable/detach/stop) over delete when the goal can be met without permanent teardown — infra deletions (tunnel/DNS/k8s) are frequently NOT recoverable. Note whether the deletion is recoverable before proceeding.
|
|
132
|
+
-->
|
|
85
133
|
|
|
86
134
|
## Credential & Privileged-Scope Guardrails
|
|
87
135
|
|
|
136
|
+
<!-- DETAIL: Origin #1266 credential dump
|
|
88
137
|
> Origin: #1266 ① (Critical) — a subagent dumped `.env` and Gmail OAuth credentials into the transcript (Credential Exploration) and ran an unauthorized credential-rotation flow that caused a dashboard data outage.
|
|
138
|
+
-->
|
|
89
139
|
|
|
90
140
|
| Prohibited | Required instead |
|
|
91
141
|
|-----------|------------------|
|
|
@@ -94,11 +144,17 @@ Prefer a reversible action (disable/detach/stop) over delete when the goal can b
|
|
|
94
144
|
| Chaining an approved privileged action into adjacent unrequested ones | Each privileged op requires its own authorization trace |
|
|
95
145
|
| Irreversible shared-infra action (prod pod exec, shared-ns secret delete, tunnel create) without scope re-confirmation | Re-confirm scope with the user before irreversible / shared-infra actions |
|
|
96
146
|
|
|
147
|
+
Ask-before-scan(#1327): 크레덴셜/토큰이 필요하면 블라인드 디스커버리 스캔(`env | grep`, 전역 토큰 grep) 전에 먼저 사용자에게 요청합니다 — 사용자가 지정한 특정 파일 읽기는 허용되며, 스캔이 classifier에 걸리면 재시도하지 않습니다(R010).
|
|
148
|
+
|
|
149
|
+
<!-- DETAIL: Ask-before-scan full text
|
|
97
150
|
> **Ask-before-scan (#1327 찐빠 #4)**: When a credential/token is needed, request it from the user BEFORE running BLIND/DISCOVERY credential scans (`env | grep`, repo-wide token greps), which trip the Credential Exploration classifier. Reading a SPECIFIC file the user named to obtain a value is not a discovery scan and is fine. If a scan trips the classifier, do not retry it (R010 Subagent Scope-Creep STOP Protocol).
|
|
151
|
+
-->
|
|
98
152
|
|
|
99
153
|
### Infra-Diagnostic File Checks — Metadata, Not Contents (#1334 ①)
|
|
100
154
|
|
|
155
|
+
<!-- DETAIL: Origin #1334 infra-diagnostic file check
|
|
101
156
|
> Origin: #1334 ① — during a hermes 502 diagnosis, a `cat .env` + `credentials.json` key inspect was reflexively bundled into a diagnostic batch and tripped the Credential Exploration classifier. The secret values were never needed for the 502 diagnosis.
|
|
157
|
+
-->
|
|
102
158
|
|
|
103
159
|
When diagnosing infrastructure/health issues (502s, container state, env presence), file checks MUST use metadata-only commands — `ls -la` (existence, size, perms, mtime) — NEVER `cat .env`, `cat credentials.json`, or any command that reads secret CONTENTS or keys into the transcript. Confirming a file EXISTS is a metadata check; reading its values is a credential scan.
|
|
104
160
|
|
|
@@ -106,11 +162,17 @@ When diagnosing infrastructure/health issues (502s, container state, env presenc
|
|
|
106
162
|
|--------------|----------|
|
|
107
163
|
| `cat .env` / inspect OAuth/credential keys to "confirm config present" during a health diagnosis | `ls -la .env` — existence/size/perms only; request a specific value from the user if genuinely needed |
|
|
108
164
|
|
|
165
|
+
Cross-ref: 위 Ask-before-scan, R010 STOP Protocol.
|
|
166
|
+
|
|
167
|
+
<!-- DETAIL: cross-ref infra-diagnostic
|
|
109
168
|
Cross-reference: the Ask-before-scan note above (discovery scans), R010 Subagent Scope-Creep STOP.
|
|
169
|
+
-->
|
|
110
170
|
|
|
111
171
|
### Standing User-Deny + Classifier Block → Immediate user-runs Switch (#1335 ④)
|
|
112
172
|
|
|
173
|
+
<!-- DETAIL: Origin #1335 standing deny classifier block
|
|
113
174
|
> Origin: #1335 ④ — with a standing user constraint "절대 시크릿 건드리지 마" plus a classifier block, an `.env.local` edit (DATABASE_URL, LLM_MAX_TOKENS) was retried and blocked repeatedly instead of handing the edit to the user.
|
|
175
|
+
-->
|
|
114
176
|
|
|
115
177
|
When the user has a STANDING "don't touch X" constraint AND the safety classifier blocks an action on X even once, immediately switch to the `!` user-runs pattern — surface the exact command for the user to run themselves — and do NOT retry the blocked edit. A standing deny + one classifier trip is a hard signal to delegate to the user, not to find another path in.
|
|
116
178
|
|
|
@@ -118,9 +180,13 @@ When the user has a STANDING "don't touch X" constraint AND the safety classifie
|
|
|
118
180
|
|--------------|----------|
|
|
119
181
|
| Retry a blocked edit on a user-deny-listed path via a different mechanism | Stop after the first block; emit the command for the user to run via `!` and wait |
|
|
120
182
|
|
|
183
|
+
Cross-reference: R010 STOP Protocol(2-trip), R015 Retry Discipline, R002 permission tiers.
|
|
184
|
+
|
|
185
|
+
<!-- DETAIL: cross-ref standing-deny originals
|
|
121
186
|
Cross-reference: R010 Subagent Scope-Creep STOP Protocol (2-trip stop), R015 Failed Tool Re-Try Discipline.
|
|
122
187
|
|
|
123
188
|
Cross-reference: R010 Subagent Scope-Creep STOP Protocol, R002 (permission tiers).
|
|
189
|
+
-->
|
|
124
190
|
|
|
125
191
|
<!--
|
|
126
192
|
> **v2.1.187+**: Added the `sandbox.credentials` setting — blocks sandboxed commands from reading credential files and secret environment variables. Platform-level complement to this section's credential guardrails (the model still never echoes secret values; CC now also blocks sandboxed reads of credential files/secret env at the platform level) — defense-in-depth.
|
|
@@ -139,9 +205,13 @@ Cross-reference: R010 Subagent Scope-Creep STOP Protocol, R002 (permission tiers
|
|
|
139
205
|
> **v2.1.205+**: auto mode가 session transcript 파일 변조(tampering)를 차단하는 규칙이 추가되었습니다 — transcript 의존 스킬(homework/episodic-memory) 무결성 보호. 또한 Windows worktree 제거가 NTFS junction/symlink 존재 시 worktree 밖 파일을 삭제하던 문제가 수정되었습니다.
|
|
140
206
|
-->
|
|
141
207
|
|
|
208
|
+
<!-- DETAIL: v2.1.232+ GitLab token redaction/tmp socket hardening
|
|
142
209
|
> **v2.1.232+**: 시크릿·격리 보호가 확장되었습니다 — GitLab 토큰 계열(`glrt-`/`gloas-`/`glptt-`/`glagent-`/`glimt-`/`glsoat-`/`glcbt-`/`glft-`/`glffct-`) redaction 추가와 routable `glpat-`/`gldt-` 전체 redaction, `glab` CLI config가 `gh`와 동일한 샌드박스·자격증명 경로 보호를 받습니다. 또한 공유 `/tmp`의 cross-session messaging 소켓 디렉토리가 사전에 심어진 symlink나 타 사용자 소유 디렉토리를 **사용 대신 거부**하도록, Linux 파일시스템 샌드박스가 protected-path 우회에 대해 하드닝되었습니다. **구버전에서 GitLab 토큰은 redaction 대상이 아니었으므로 트랜스크립트·에이전트 출력에 원문 노출이 가능했습니다** — 과거 세션 로그를 공유하기 전 이 점을 전제합니다. 위 표의 "자격증명 저장소 덤프 금지"는 플랫폼 redaction과 무관하게 유지합니다(redaction은 최후 방어선이지 1차 방어선이 아님).
|
|
210
|
+
-->
|
|
143
211
|
|
|
212
|
+
<!-- DETAIL: v2.1.257+ containment escape/consent dialog/credential exposure
|
|
144
213
|
> **v2.1.257+**: 시크릿·격리 보호가 4건 추가로 강화되었습니다. (a) auto mode에 **Containment Escape** 규칙이 신설되어, 클라우드 메타데이터 자격증명 조회·egress 회피·cross-tenant 접근이 환경이 "expected"로 명시하지 않는 한 더 이상 auto-approve되지 않습니다 — 이 섹션의 "자격증명 저장소 덤프 금지" 원칙과 R010 Subagent Scope-Creep STOP Protocol의 플랫폼 측 대응이며, 인프라 위임 서브에이전트가 이 규칙에 걸리면 R010의 trip 계수 대상으로 취급합니다. (b) Remote Control 동의 프롬프트를 Esc 또는 `n`으로 닫은 것이 **동의로 계상**되어 다음 요청이 확인 없이 연결되던 결함이 수정되었습니다 — 위 v2.1.223/234/236/238 승인 다이얼로그 표시 무결성 계열의 다섯 번째 사례로, 단발 결함이 아니라 구조적 계열임을 재확인시킵니다. (c) 자격증명 전송·노출 경계 4건도 함께 수정되었습니다 — Foundry API-key 모드에서 잔여 Anthropic API 키/토큰이 함께 전송되던 결함, 게이트웨이가 Foundry/Vertex/Bedrock에 stray host `Authorization`·프로필 헤더를 보내던 결함, MCP 연결·OAuth 디버그/에러 로그의 URL·헤더 자격증명 미redaction, 샌드박스 `deniedDomains`가 후행 점(`example.com.`)이 붙은 호스트를 차단하지 못하고 "don't ask again"도 무한 재프롬프트되던 결함 — 위 v2.1.246/251 자격증명 전송 경계 노트와 같은 위협 클래스입니다. (d) 플러그인이 선언된 command/agent/skill/hooks 경로가 symlink일 때 이를 따라가 자기 디렉토리 밖 파일을 읽던 결함이 수정되어 이제 에러로 거부되며, Cowork·claude.ai cloud 세션에서 자신의 것이 아닌 artifact를 읽는 동작은 auto mode에서도 항상 먼저 확인을 거치도록 변경되었습니다.
|
|
214
|
+
-->
|
|
145
215
|
|
|
146
216
|
## Required Before Destructive Operations
|
|
147
217
|
|