oh-my-customcode 1.1.46 → 1.1.48
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 +4 -0
- package/templates/.claude/rules/MUST-agent-design.md +2 -0
- package/templates/.claude/rules/MUST-agent-teams.md +25 -3
- package/templates/.claude/rules/MUST-completion-verification.md +18 -4
- package/templates/.claude/rules/MUST-intent-transparency.md +7 -2
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +32 -4
- package/templates/.claude/rules/MUST-permissions.md +25 -3
- package/templates/.claude/rules/MUST-sync-verification.md +26 -2
- package/templates/.claude/skills/de-lead-routing/SKILL.md +3 -1
- package/templates/.claude/skills/dev-lead-routing/SKILL.md +3 -1
- package/templates/.claude/skills/multi-model-verification/SKILL.md +2 -2
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +26 -3
- package/templates/.github/workflows/wiki-sync.yml +1 -1
- package/templates/CLAUDE.md +3 -3
- package/templates/CLAUDE.md.en +3 -3
- package/templates/CLAUDE.md.ko +3 -3
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +26 -3
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
|
|
29
29
|
> **계수/매칭 방법 확인 (#1521)**: 카운트를 대조하기 전에 **비교 대상이 무엇을 어떻게 세는지** 먼저 확인한다 — 같은 지표라도 계수 방법이 다르면 값이 달라진다. 대표 함정 4종: (a) glob(`ls *.md`, 최상위만) vs 재귀 `find`(하위 디렉토리 포함), (b) 부분 문자열 grep(`grep "sdd"`가 `sdd-dev`까지 매칭), (c) 확장자 필터(`--include='*.md'`가 `CLAUDE.md.en`을 미매칭), (d) **머지 커밋 diff 기본 생략** — `git show --name-only <머지커밋>`은 diff를 기본적으로 출력하지 않아 변경 파일 0개로 오독된다. 머지 커밋의 변경 파일을 세려면 `--first-parent`(1차 부모 대비) 또는 `-m`(각 부모별 diff)을 명시한다. 검증 스크립트와 대조할 때는 **스크립트의 실제 계수 로직을 읽고** 같은 방법으로 센다. 위 `ls | tail` 시계열 오판(#1417)과 동류로, 도구의 기본 동작을 확인하지 않은 채 결과를 해석해 오탐에 이르는 패턴이다. Origin: #1521 (2026-07-20 세션에서 3회 반복; 두 서브에이전트가 독립적으로 동일 오탐에 도달); (d)는 #1553 찐빠 #4 (2026-07-30 세션에서 머지 커밋 `--name-only` 0파일을 "변경 없음"으로 오독).
|
|
30
30
|
|
|
31
|
+
> **도구 이름 ≠ 그 프로그램 (#1590)**: 도구를 쓰기 전에 `type <tool>`로 실체를 확인한다. Bash 도구의 `grep`은 `~/.claude/shell-snapshots/snapshot-zsh-*.sh`의 **셸 함수**이며 `ugrep --ignore-files`에 위임한다. 그 결과 `.gitignore`의 리터럴 `CLAUDE.md` 패턴을 존중해, **force-tracked 파일을 재귀 탐색에서 조용히 누락**한다(에러 없이 exit 0). 명시 경로를 준 grep은 정상 동작하므로 **traversal만 영향**을 받는다. 실측(2026-08-15): 동일 패턴·동일 대상에 대해 셸 함수 36 / `command grep` 43 / `git grep` 38 히트 — 셸 함수만 `CLAUDE.md`를 0 히트로 놓쳤다. 진단 함정: `git check-ignore`는 **index-aware**라 tracked 파일에 "not ignored"(exit 1)를 반환한다 — 원인을 보려면 `git check-ignore --no-index`를 써야 한다. 처방: 저장소 전수 조사는 `git grep`을 표준으로 한다(R017 Count Sync cross-ref). Origin: #1590.
|
|
32
|
+
|
|
31
33
|
<!--
|
|
32
34
|
> **v2.1.206+**: `/doctor`에 checked-in CLAUDE.md에서 코드베이스로부터 파생 가능한 내용을 잘라내도록 제안하는 체크가 추가되었습니다 — R005 "Context Optimization via HTML Comments"의 컨텍스트 절감 원칙과 정합(모델 불필요 메타데이터 축소).
|
|
33
35
|
-->
|
|
@@ -38,6 +40,8 @@
|
|
|
38
40
|
|
|
39
41
|
> **v2.1.212+**: MCP 도구 호출이 2분(기본값, `CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS`로 임계값 조정·비활성) 초과 시 자동으로 백그라운드로 이동해 세션이 계속 사용 가능해집니다 — 위 v2.1.210 Bash/PowerShell auto-background의 MCP 도구 확장. 느린 MCP 호출(ontology-rag `rebuild_ontology`, code-review-graph 인덱싱 등)을 hang으로 오판하지 말고, 2분 초과 시 백그라운드 전환을 전제로 후속 작업을 진행합니다.
|
|
40
42
|
|
|
43
|
+
> **v2.1.233+**: `WebFetch`의 세션 URL 캐시 TTL이 `CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS`로 조정 가능해졌습니다(기본 15분 불변). **재확인 함정**: 같은 URL을 TTL 내 재조회하면 캐시가 반환되므로 **독립적인 2차 확인이 아닙니다** — R020 Degraded-Output Re-Verification Gate가 요구하는 "결정론적 2차 소스"로 동일 URL의 WebFetch 재호출을 쓰지 말고, 다른 소스나 CLI 실측(`npm view`, `gh`)을 사용합니다.
|
|
44
|
+
|
|
41
45
|
> **v2.1.224+**: mid-turn에 연결된 MCP 도구가 **이름 고지 없이** tool search로 deferred되던 결함이 수정되었습니다. 구버전에서는 세션 도중 붙은 MCP 서버의 도구가 이름조차 노출되지 않아 "그런 도구 없음"으로 오판할 수 있었으므로, 위 tool-availability 주의(`command -v` 사전 확인과 동류)를 MCP 도구에도 적용합니다 — 도구 부재 결론 전에 `ToolSearch`로 실측합니다.
|
|
42
46
|
|
|
43
47
|
> **v2.1.228+**: Write 도구가 **이번 세션에 읽지 않은 기존 파일도 newer model에서는 덮어쓸 수 있도록** 변경되어 Edit 도구 규칙과 일치합니다(구모델은 여전히 read 선행 필요). 도구가 강제하던 read-before-write 가드가 모델에 따라 사라지므로, "Write가 실패했다 = 파일을 안 읽었다"는 진단이 더 이상 보편적으로 성립하지 않고, **읽지 않은 파일을 Write하면 기존 내용이 경고 없이 소실**됩니다 — 전체 교체가 아닌 변경에는 Edit을 쓰는 원칙을 도구 강제가 아니라 절차로 유지합니다. 또한 deferred-tools reminder가 skill 호출 후 모델에 두 번 전달되던 문제가 수정되었습니다(중복 컨텍스트 소모).
|
|
@@ -492,6 +492,8 @@ Key optional fields: `scope`, `context`, `version`, `effort`, `model`, `agent`,
|
|
|
492
492
|
|
|
493
493
|
> **v2.1.222+**: 스킬 frontmatter의 `disable-model-invocation: true`(모델이 스스로 그 스킬을 호출하지 못하게 막고 사용자/파이프라인의 명시적 호출만 허용하는 필드)가 설정된 스킬을 모델이 호출하려 할 때의 refusal 문구가 개선되어, 모델에게 **워크플로우를 스스로 복제하지 말고 사용자에게 실행을 요청하라**고 지시합니다. 무인 루프(`/fsd` 등)가 이런 스킬을 모델 호출 경로에 두면 실행 대신 refusal이 반환되므로, 해당 스킬은 **사용자/파이프라인 명시 호출**로 설계합니다.
|
|
494
494
|
|
|
495
|
+
> **v2.1.233+**: 스킬/커맨드의 인자 치환이 **인자 값을 다시 템플릿 마커로 재확장하던** 문제가 수정되었습니다 — 인자에 `$ARGUMENTS`·`$1` 같은 문자열이 들어오면 2차 확장돼 프롬프트가 변형될 수 있었습니다. 즉 구버전에서 **인자 값은 신뢰 입력이 아니었으므로**, 인자를 지시문에 그대로 끼워 넣는 스킬은 샘플 값으로 조립 결과를 실제 확인해 검증합니다(R023 Sample-Value Assembly — 문법 검증만으로는 드러나지 않는 계열).
|
|
496
|
+
|
|
495
497
|
> **v2.1.228+**: claude.ai에서 동기화된 스킬이 하드닝되었습니다 — 로컬 커맨드·MCP prompt를 **shadow하지 않고**, description이 sanitize·labeling되며, 로컬 머신에서 그 본문이 `!` 명령을 실행하거나 `@` 파일 참조를 확장하지 **않습니다**. 즉 외부 출처 스킬은 로컬 `.claude/skills/` 스킬과 **동일한 실행 능력을 갖지 않으므로**, 동기화 스킬에 `!`/`@` 동작을 전제한 본문을 작성하면 무음 미실행이 됩니다. 구버전에서는 동기화 스킬이 로컬 커맨드를 가릴 수 있어 같은 이름 호출이 어느 정의로 해소되는지 결정론적이지 않았습니다.
|
|
496
498
|
|
|
497
499
|
<!-- DETAIL: Skill Optional Fields (full yaml block)
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# [MUST] Agent Teams Rules (Conditional)
|
|
2
2
|
|
|
3
3
|
> **Priority**: MUST | **ID**: R018
|
|
4
|
-
> **Condition**: Agent Teams enabled
|
|
4
|
+
> **Condition**: Agent Teams enabled — `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **AND** `TeamCreate` present in the tool list (see Detection)
|
|
5
5
|
> **Fallback**: When disabled, R009/R010 apply
|
|
6
6
|
|
|
7
7
|
## Detection
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Agent Teams is active only when the **team-creation path actually exists** — `TeamCreate` present in the tool list. The environment variable alone is NOT sufficient: it expresses intent to enable the feature, not the feature's availability.
|
|
10
|
+
|
|
11
|
+
| Observed state | Teams active? |
|
|
12
|
+
|----------------|---------------|
|
|
13
|
+
| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **and** `TeamCreate` present | Yes |
|
|
14
|
+
| env var set, `TeamCreate` **absent** | **No** — a team cannot be created, so no member can be spawned |
|
|
15
|
+
| `SendMessage` present, `TeamCreate` absent | **No** — peer/cross-session messaging is a separate capability (see Scope below), not evidence of Teams |
|
|
16
|
+
|
|
17
|
+
Rationale: since v2.1.233, `TeamCreate`/`TeamDelete` are absent from the tool list in this runtime (measured — R002 "Todo/Task 도구 기본 제거"), so a set env var cannot make teams creatable. Detection therefore rests on the tools actually being present, not on the env var alone — "the tool exists" is itself a claim requiring measurement (R020).
|
|
18
|
+
|
|
19
|
+
When Detection resolves to **No**, this entire rule is dormant and R009/R010 govern.
|
|
10
20
|
|
|
11
21
|
## Decision Matrix
|
|
12
22
|
|
|
@@ -119,7 +129,7 @@ Origin: #1293 (Session 110 retrospective, Low).
|
|
|
119
129
|
|
|
120
130
|
> Origin: #1341 찐빠 #2 (low-confidence) — 4+ 병렬 Agent Tool 스폰 시 `[N]` prefix는 표기했으나 "R018 게이트: … → Agent Tool 폴백" announce를 생략한 것을 자가 위반으로 의심. 그러나 R018은 조건부 규칙이라 Agent Teams 비활성 환경에서는 게이트 투명성 자체가 미적용이다.
|
|
121
131
|
|
|
122
|
-
R018 전체(게이트 투명성 포함)는 Agent Teams 활성 시에만 적용되는 조건부 규칙이다
|
|
132
|
+
R018 전체(게이트 투명성 포함)는 Agent Teams 활성 시에만 적용되는 조건부 규칙이다 — 활성 조건은 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **AND** `TeamCreate` 도구 존재이며, `SendMessage` 단독 존재는 활성 근거가 아니다(상세는 위 `## Detection`). Agent Teams **비활성** 환경에서는:
|
|
123
133
|
|
|
124
134
|
- 게이트 투명성 announce 의무가 없다 — R009 `[N]` prefix 만으로 충분하다.
|
|
125
135
|
- 3+ 병렬 Agent Tool 스폰을 "게이트 announce 누락"으로 자가 플래그하지 않는다 (false-positive 방지).
|
|
@@ -354,6 +364,8 @@ Do NOT avoid Agent Teams solely for cost reasons when criteria are met.
|
|
|
354
364
|
|
|
355
365
|
Agent Teams 멤버는 long-running 작업 중 진행 상태를 TaskUpdate 로 명시적으로 알려야 한다. 침묵은 코디네이터가 죽었거나 멤버가 막혔다고 오인하게 만든다.
|
|
356
366
|
|
|
367
|
+
> **도구 가용성 선확인 (v2.1.233+)**: `TaskCreate/Get/Update/List`는 현행 모델(Opus 4.8 / Sonnet 5 / Fable 5 / Mythos 5 이상)에서 기본 제거되어 이 저장소 실행 환경에 **존재하지 않는다** — 실측은 R002 「Todo/Task 도구 기본 제거」. 아래 표는 Task 도구가 가용할 때(구모델 또는 `CLAUDE_CODE_ENABLE_TODO_TOOLS=1`)의 규정이며, **부재 시 아래 대체 규약을 따른다**. 없는 도구의 호출을 의무로 남겨두면 실행 불가능한 규정이 된다.
|
|
368
|
+
|
|
357
369
|
| 시점 | 호출 |
|
|
358
370
|
|------|------|
|
|
359
371
|
| 작업 시작 | TaskUpdate(taskId, status: "in_progress") |
|
|
@@ -369,6 +381,16 @@ Agent Teams 멤버는 long-running 작업 중 진행 상태를 TaskUpdate 로
|
|
|
369
381
|
|
|
370
382
|
Reference issue: #1087.
|
|
371
383
|
|
|
384
|
+
### Task 도구 부재 시 대체 규약 (Origin: #1582)
|
|
385
|
+
|
|
386
|
+
| 시점 | 대체 수단 |
|
|
387
|
+
|------|-----------|
|
|
388
|
+
| 시작 / 완료 / 차단 | `SendMessage` 1줄 보고 (`summary`에 상태 단어 포함) |
|
|
389
|
+
| 장문 진행 보고 | 아티팩트 파일 경로만 전달 (R006 Artifact Channel Protocol) — SendMessage 본문은 v2.1.222+ 조용히 절단된다 |
|
|
390
|
+
| 코디네이터의 완료 판정 | SendMessage 보고가 아니라 **결정론적 ground-truth** (아래 Member Completion Verification) |
|
|
391
|
+
|
|
392
|
+
`TaskList` 부재로 **공유 작업 목록이라는 조율 기반 자체가 사라지므로**, 아래 Member Completion Verification의 "보고는 신호일 뿐, 판정은 실측"이 보조 원칙이 아니라 **유일한 방어선**이 된다.
|
|
393
|
+
|
|
372
394
|
## Member Completion Verification (deterministic ground-truth)
|
|
373
395
|
|
|
374
396
|
Agent Teams member completion MUST be verified by deterministic ground-truth — NOT by SendMessage reports or TaskList status alone. Members may edit files without updating task status (task stays `pending`) or go idle without executing at all.
|
|
@@ -10,7 +10,7 @@ Before declaring any task `[Done]`, verify completion against task-type-specific
|
|
|
10
10
|
|
|
11
11
|
| Task Type | REQUIRED Verification Before [Done] |
|
|
12
12
|
|-----------|-------------------------------------|
|
|
13
|
-
| Release | All issues closed, version bumped, PR merged
|
|
13
|
+
| Release | All issues closed, version bumped, PR merged; **대기 조건은 AND** — `release.yml` completed **AND** GitHub Release `isDraft=false` (npm 도달은 충분조건이 아님, 아래 참조); **External automation verified**: `.github/workflows/` listed AND `gh run list --limit 10` checked for auto-publish workflows |
|
|
14
14
|
| Implementation | Code compiles/passes lint, tests pass (if exist), no TODO markers left |
|
|
15
15
|
| Documentation | Links valid, counts accurate, cross-references updated |
|
|
16
16
|
| Git Operations | Operation succeeded (check exit code), working tree clean |
|
|
@@ -18,6 +18,10 @@ Before declaring any task `[Done]`, verify completion against task-type-specific
|
|
|
18
18
|
| Agent/Skill Creation | Frontmatter valid, referenced skills exist, routing updated |
|
|
19
19
|
| UI/Frontend | Browser render verified (dev server running + page loaded), no console errors, visual output matches intent; **CSS/style changes**: capture before/after visual diff or screenshot; type-check passing alone is NOT sufficient |
|
|
20
20
|
|
|
21
|
+
> **비동기 연쇄의 대기 조건 = 가장 늦게 완료되는 산출물 (Origin: #1584 #2)**: 릴리즈 체인처럼 산출물이 순차 생성되는 비동기 연쇄에서, 중간 산출물 도달을 완료로 읽으면 뒤따르는 산출물이 미완인 채 남는다. npm publish는 `release.yml` **안에서** GitHub Release 생성보다 먼저 끝나므로, npm 도달 시점에 검증을 끝내면 Release가 `draft=true`로 남을 수 있다. `gh run view <id> --json status`(completed) **AND** `gh release view <tag> --json isDraft`(false)를 둘 다 확인한다.
|
|
22
|
+
>
|
|
23
|
+
> v1.1.44는 타이밍이 맞아 드러나지 않고 v1.1.45에서 노출된 **간헐적 결함**이다 — 한 번 통과한 검증 순서가 경합을 배제하지 않는다.
|
|
24
|
+
|
|
21
25
|
## Optional: Quantitative Evidence (advisory, added v0.114.0, #1034)
|
|
22
26
|
|
|
23
27
|
For complex agent invocations or multi-step workflows, attach 4-metric evidence to [Done] declarations as supplementary evidence (NOT a binary gate):
|
|
@@ -273,14 +277,24 @@ Origin: #1266 ④.
|
|
|
273
277
|
|
|
274
278
|
#### 자율 루프 세션의 턴 경계 정의 (계수 전 확정 필수)
|
|
275
279
|
|
|
276
|
-
위 파싱 레시피는 **"사용자 프롬프트 = 턴 경계"**를 암묵 전제한다. `/fsd` 같은 자율 루프는 사용자 프롬프트가 거의 없어(실측: 사용자 프롬프트 4개 대 assistant 응답 30여 회) 이 전제로는 경계 재구성이 실패하고, 계수 자체가 성립하지 않는다. 자율 루프 transcript를 셀 때는
|
|
280
|
+
위 파싱 레시피는 **"사용자 프롬프트 = 턴 경계"**를 암묵 전제한다. `/fsd` 같은 자율 루프는 사용자 프롬프트가 거의 없어(실측: 사용자 프롬프트 4개 대 assistant 응답 30여 회) 이 전제로는 경계 재구성이 실패하고, 계수 자체가 성립하지 않는다. 자율 루프 transcript를 셀 때는 **두 단계를 순서대로** 수행하고, 완료 전에는 **위반 횟수를 단정하지 않는다**.
|
|
281
|
+
|
|
282
|
+
1. **전처리 — `.message.role`이 존재하는 라인만 필터링**한다. 트랜스크립트에는 role 없는 라인(메타·이벤트·요약)이 assistant/user 사이에 대량으로 끼어 있어, 필터 없이는 **인접성 판정 자체가 깨진다**. 2단계의 어떤 경계 정의도 이 필터 없이는 성립하지 않는다.
|
|
283
|
+
2. **경계 정의(규범)** — 응답 시작 경계는 **`content`에 `tool_result` 블록을 포함하지 않는 user 메시지**로 정의한다. 도구 결과도 `role: user`로 기록되므로, "user→assistant 전이 = 응답 시작"이라는 단순 정의는 도구 결과 뒤에 이어지는 assistant 메시지를 전부 새 응답으로 오인해 **위반 건수를 대폭 과대 계상**한다. 실증: 이 정의를 쓰지 않고 파싱했을 때 R007 위반이 177건으로 나왔으나, 위 규범대로 경계를 고치자 1건이 됐다(177배 과대). R008도 44 → 33으로 정정됐다.
|
|
284
|
+
|
|
285
|
+
### 자가 계수는 advisor 판정식을 재현한다
|
|
286
|
+
|
|
287
|
+
자체 해석 패턴으로 위반을 세지 말고, `.claude/hooks/scripts/r007-r008-drift-advisor.sh`의 판정식을 **1:1 재현**한다. 실증: 자체 announce 패턴을 advisor보다 좁게 잡아(번호 매긴 병렬 스폰 라인 `[N] agent:model → desc` 형식을 announce로 미포함) R008 위반을 과대 계상했다 — advisor 스크립트 자체를 참조하지 않고 "그럴듯한 정의"로 재구현하면 같은 종류의 오차가 반복된다.
|
|
277
288
|
|
|
278
289
|
| Anti-pattern | Required |
|
|
279
290
|
|--------------|----------|
|
|
280
|
-
| 자율 루프 transcript를 사용자 프롬프트 경계로 파싱해 위반 N회로 단정 |
|
|
291
|
+
| 자율 루프 transcript를 사용자 프롬프트 경계로 파싱해 위반 N회로 단정 | 1단계 필터 + 2단계 경계 정의를 먼저 확정; 확정 전에는 횟수 단정 금지 |
|
|
292
|
+
| 필터 없이 원본 라인 순서로 인접성을 판정 → 계수 실패를 경계 정의 탓으로 오진 | `.message.role` 필터를 먼저 적용한 뒤 경계 정의를 평가 |
|
|
281
293
|
| 경계 재구성 실패를 "위반 없음"으로 해석 | 경계 무관 지표로 대체 보고 — `┌─ Agent:` 헤더 총량, tool_use 대 announce 라인 비율 |
|
|
294
|
+
| "user→assistant 전이"를 응답 시작 경계로 단순 정의 → `tool_result`(role=user) 뒤 assistant 응답을 전부 새 응답으로 오산입 | 경계 = `tool_result` 블록을 포함하지 않는 user 메시지 (규범) |
|
|
295
|
+
| 자체 해석 패턴(예: 좁게 잡은 announce 정규식)으로 위반을 재계산 | `r007-r008-drift-advisor.sh`의 판정식을 그대로 재현 |
|
|
282
296
|
|
|
283
|
-
Origin: #1574 (v1.1.44 세션 — 자율 루프에서 R007 헤더 누락 계수를 시도했으나 사용자 프롬프트 4개로 턴 경계 재구성 불가). Cross-ref: R005(계수/매칭 방법 확인 — 도구 기본 동작 미확인 시 결과 오해석).
|
|
297
|
+
Origin: #1574 (v1.1.44 세션 — 자율 루프에서 R007 헤더 누락 계수를 시도했으나 사용자 프롬프트 4개로 턴 경계 재구성 불가); 1단계 필터는 #1584 #3 (v1.1.45 세션 — 위 조항을 신설했음에도 계수가 재실패. 실제 장애물은 경계 정의가 아니라 **`role=null` 라인 661개 / 전체 1215줄의 54%**였고, 필터 추가 즉시 성립(응답 시작 50, R007 위반 0) — 조항이 원인을 절반만 짚어 재발한 사례). 경계 규범 승격 및 advisor 판정식 재현은 #1593 #6 (경계 오정의로 R007 177배 과대 계상, `tool_result` 배제 정의로 정정; R008은 좁은 announce 패턴 자가 재구현으로 44→33 정정). Cross-ref: R005(계수/매칭 방법 확인 — 도구 기본 동작 미확인 시 결과 오해석).
|
|
284
298
|
|
|
285
299
|
### Proxy Signal vs Canonical Ground-Truth (#1336 ①②)
|
|
286
300
|
|
|
@@ -114,13 +114,18 @@ The Git Push Continuation pattern (first-time strict / follow-up relaxed, scoped
|
|
|
114
114
|
| 1st explicit approval (category C, target T) | Proceed; advisory warning emitted |
|
|
115
115
|
| Follow-up same session (same C + same T) | No re-confirmation (directive persistence) |
|
|
116
116
|
| Different category or target | Fresh confirmation required |
|
|
117
|
-
| Platform
|
|
117
|
+
| Platform **permission prompt** repeats (asking to re-approve an already-allowed command) | Add a `settings.json` permission `allow` rule scoped to the specific command — this suppresses the prompt |
|
|
118
|
+
| Platform **safety classifier BLOCK** (e.g. auto-mode refuses/flags the action, not merely prompting) | `allow` rule addition is **NOT effective** — the classifier is a separate layer from the permission-prompt layer. Have the user run the command directly (`!` prefix), or remove the trigger itself (e.g. drop an unnecessary bypass flag — see R010 「우회 플래그는 우회 대상과 근거를 명시」) |
|
|
118
119
|
|
|
119
120
|
**R001 exclusion (MUST)**: R001-listed catastrophic git operations (`git reset --hard`, `git clean -fd`, `git push --force` to shared branches, `git branch -D` with unmerged commits) are EXCLUDED from this persistence rule — they always require explicit per-invocation approval regardless of prior session approvals.
|
|
120
121
|
|
|
121
122
|
**Boundary / honesty note**: This rule is ADVISORY and governs model behavior only. It CANNOT suppress Claude Code's platform-level auto-mode classifier prompts. For genuine prompt suppression on a repeated destructive command, the user must add a `settings.json` permission allow rule scoped to the specific command (e.g., a specific `supabase db push` invocation). The model SHOULD surface this workaround when the user expresses friction about repeated prompts.
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
`settings.json` **allow 규칙은 permission prompt를 억제하지만, safety classifier 차단은 억제하지 못한다 — 서로 다른 층이다** (#1592). 실효 경로는 두 가지뿐이다: (a) 사용자가 직접 실행, (b) 차단 트리거 자체를 제거(예: 불필요한 `--admin` 제거). 부가로, CC v2.1.229+는 위험 플래그(`--force`/`--amend`/`--no-verify`)를 가진 git/gh 명령을 auto-approve하지 않는다(설치 버전 실측 v2.1.233).
|
|
125
|
+
|
|
126
|
+
> Origin: #1592 (v1.1.47 세션 실측) — `permissions.allow`에 `Bash(gh:*)`와 `defaultMode: bypassPermissions`가 있는데도 `--admin` 포함 머지 위임이 auto-mode classifier에 차단됐다. `Edit(.claude/**)` allow 규칙이 있는데도 `.claude/settings.local.json` 편집이 차단됐다. 두 사례 모두 allow 규칙이 걸어둔 permission-prompt 층을 이미 통과한 상태에서 별도의 classifier 층이 차단한 것 — allow 규칙 추가로는 해소되지 않았고, 실효 해법은 (a) `--admin` 제거(R010 선행 실측 조항, #1591), (b) 사용자 직접 실행이었다.
|
|
127
|
+
|
|
128
|
+
Cross-references: R001 (safety — destructive operation pre-checks still apply), R002 (permission tiers), R010 (우회 플래그 선행 실측 — 차단 트리거 제거 경로). Reference issues: #1230, #1226 (item 2), #1592.
|
|
124
129
|
|
|
125
130
|
## User-Provided Input Precedence
|
|
126
131
|
|
|
@@ -282,6 +282,22 @@ The Subagent Scope-Creep STOP Protocol (above) is REACTIVE — it halts an agent
|
|
|
282
282
|
|
|
283
283
|
Cross-reference: the Subagent Scope-Creep STOP Protocol (reactive halt after trips) and R001 (credential/privileged-scope guardrails, re-confirm scope before irreversible shared-infra actions).
|
|
284
284
|
|
|
285
|
+
#### 우회 플래그는 우회 대상과 근거를 명시 (Origin: #1584 #6, #1591)
|
|
286
|
+
|
|
287
|
+
**선행 실측 (신설, #1591)**: 우회 플래그(`--admin`, `--force`, `--no-verify` 등)를 위임 프롬프트에 지시하기 **전에**, 그 플래그가 실제로 필요한지 먼저 실측한다(`gh api repos/{owner}/{repo}/branches/{branch}/protection`). 불필요하면 정답은 **서술 보강이 아니라 플래그 제거**다 — 근거 서술은 플래그가 실제로 필요할 때에만 의미가 있다.
|
|
288
|
+
|
|
289
|
+
보호장치를 우회하는 플래그를 위임 프롬프트에 지시할 때는 **무엇을 우회하는지와 그것이 정당한 근거**를 함께 적는다. 플래그만 적으면 하니스·에이전트가 무권한 우회로 판정해 플래그하거나 거부한다.
|
|
290
|
+
|
|
291
|
+
| Anti-pattern | Required |
|
|
292
|
+
|--------------|----------|
|
|
293
|
+
| 우회 플래그(`--admin` 등)만 지시하고 근거 없음 | 실측 branch protection과 대조 후, 플래그가 실제로 필요할 때만 우회 대상·근거를 명시 — 예: "required status check 6종 전부 pass 확인함. `enforce_admins=false`이므로 `--admin`이 우회하는 것은 **그 6종 CI 게이트**뿐이며, [사유]로 이를 승인한다" |
|
|
294
|
+
|
|
295
|
+
목적은 권한 확보가 아니라 **감사 추적**이다. 승인의 인용이 아니라 우회 범위의 사실 서술이므로 아래 「Delegation Prompt Framing — 승인 인용 금지」와 충돌하지 않는다.
|
|
296
|
+
|
|
297
|
+
**실측 기록 (2026-08-15, `gh api repos/{owner}/{repo}/branches/develop/protection`)**: required status checks **6종** — `Test`, `Lint`, `Template Sync`, `Version Sync`, `Dependency Security Audit`, `Rust Tests` (`strict=true`). **`enforce_admins=false`**. **`required_pull_request_reviews` 부재** — 리뷰어 승인 요건 자체가 없다. 다음 릴리즈가 재확인하지 않도록 이 값을 여기 고정 기록한다.
|
|
298
|
+
|
|
299
|
+
Origin: #1584 #6 — v1.1.45·v1.1.46 릴리즈 PR 머지에서 하니스가 "no visible user authorization naming that bypass"로 플래그했다. #1591 (v1.1.47 세션 실측) — v1.1.47이 신설한 위 표의 예시가 사실과 달랐다: "required status check **10종**"은 실제 **6종**이었고, "`--admin`이 우회하는 것은 **리뷰어 승인 요건**뿐"은 틀렸다 — 리뷰어 승인 요건 자체가 존재하지 않고 `enforce_admins=false`이므로 `--admin`이 실제로 우회하는 것은 **CI 게이트 6종**이었다. 기존 예시는 더 위험한 우회를 무해한 것처럼 서술하고 있었다. 근본 원인 진단 결과 develop 브랜치에는 `--admin`이 애초에 불필요했다 — 실측 없이 확정형 근거를 적으면 우회 범위 자체를 오판할 수 있다는 사례.
|
|
300
|
+
|
|
285
301
|
<!-- ARCHIVED CC version note (historical):
|
|
286
302
|
> **v2.1.178+**: Auto mode now evaluates subagent spawns with the safety classifier BEFORE launch, closing a gap where a spawned subagent could request a blocked action without prior review. This is the PLATFORM-level complement to the (advisory) Pre-Delegation Privileged-Scope Boundary above: the orchestrator still states the approved/forbidden scope in the delegation prompt (proactive, model-level), and CC now also gates the spawn itself (platform-level). The two are defense-in-depth — the prompt-stated boundary remains required because the classifier gates ACTIONS, not task SCOPE.
|
|
287
303
|
-->
|
|
@@ -311,6 +327,16 @@ Cross-reference: the Subagent Scope-Creep STOP Protocol (reactive halt after tri
|
|
|
311
327
|
|
|
312
328
|
Origin: #1563 찐빠 #3 — `gh issue edit --assignee`가 gh 2.86.0에 없는 플래그였고(정답 `--add-assignee`) 에이전트가 실행 중 자체 복구했다. Cross-reference: R005(도구 플래그·기본 동작 실측 함정 사례집), 아래 Agent Capability Pre-Check(위임 전 존재성 확인의 도구·경로 각도).
|
|
313
329
|
|
|
330
|
+
#### 저장소 상태 기재도 같은 규율 (Origin: #1584 #5)
|
|
331
|
+
|
|
332
|
+
위임 프롬프트에 저장소 상태(HEAD SHA, 브랜치, 작업트리 청결도)를 기재할 때도 **직전 실측**이 필요하다 — `git rev-parse --short HEAD` 한 줄이면 충분하다. 세션 중 머지·pull로 HEAD는 수시로 바뀌므로, 앞선 턴에서 본 값을 그대로 옮기면 서브에이전트가 **틀린 베이스를 전제로** 작업한다.
|
|
333
|
+
|
|
334
|
+
| Anti-pattern | Required |
|
|
335
|
+
|--------------|----------|
|
|
336
|
+
| 이전 턴에서 본 HEAD SHA를 위임서에 그대로 기재 | 위임 직전 `git rev-parse --short HEAD` 실측값 기재 |
|
|
337
|
+
|
|
338
|
+
Origin: #1584 #5 (v1.1.45 세션 — 커밋 위임서에 `develop @ 96ef8f85`로 적었으나 실측은 `f6d3f518`; #1572 머지 후 pull 미반영). R017 「메모리 TODO를 위임 전제로 쓸 때」의 **세션 내 축소판** — 스냅샷의 수명이 세션 간이 아니라 **턴 간**이라는 차이만 있다.
|
|
339
|
+
|
|
314
340
|
### Parallel Delegation — Sibling-Agent Disclosure
|
|
315
341
|
|
|
316
342
|
2개 이상의 서브에이전트를 같은 메시지에서 병렬 스폰할 때, 각 위임 프롬프트는 **형제 에이전트의 존재와 각자의 담당 범위**를 고지해야 한다. 서브에이전트는 격리된 컨텍스트에서 실행되어 형제를 인지할 수 없으므로, 고지가 없으면 `git status` 같은 **저장소 전역 공유 뷰**의 출력을 자기 변경분으로 오독하거나 경합 원인을 "외부 세션/프로세스"로 오귀속한다.
|
|
@@ -427,6 +453,8 @@ Before spawning any agent:
|
|
|
427
453
|
|
|
428
454
|
Before delegating a task to a subagent, MUST verify the target agent's tool capabilities against the task requirements. Failure to pre-check causes round-trip waste (delegation → failure → re-delegation).
|
|
429
455
|
|
|
456
|
+
> **표 조회 배선 (MUST, #1593 #1)**: 위임 프롬프트를 작성하기 **전에** 아래 "Known Limitations (Active Cache)" 표에서 대상 에이전트 이름을 조회한다. 표에 항목이 있으면 그 제약에 걸리는 완료 조건 항목을 제거하거나 대체 경로를 지정한다. **표가 존재해도 참조되지 않으면 무효**다 — R016 Rule Wiring Check의 "텍스트 ≠ 배선" 원칙이 위임 습관에도 그대로 적용된다.
|
|
457
|
+
|
|
430
458
|
### Required Checks
|
|
431
459
|
|
|
432
460
|
| Task involves | Verify in target agent frontmatter |
|
|
@@ -459,7 +487,7 @@ Before delegating a task to a subagent, MUST verify the target agent's tool capa
|
|
|
459
487
|
|
|
460
488
|
| Agent | Limitation | Workaround |
|
|
461
489
|
|-------|-----------|-----------|
|
|
462
|
-
| `arch-documenter` | `disallowedTools: [Bash]` — cannot run `gh`, shell scripts | Pre-collect data via orchestrator, pass as content; OR use `general-purpose` for the Bash-needing portion |
|
|
490
|
+
| `arch-documenter` | `disallowedTools: [Bash]` — cannot run `gh`, shell scripts, `diff`/`md5`/`verify-*.sh` | Pre-collect data via orchestrator, pass as content; OR use `general-purpose` for the Bash-needing portion. **Completion-condition guard (#1593 #1)**: do NOT put `diff` / `md5` / `verify-*.sh` execution into arch-documenter's completion criteria — the orchestrator must run these itself, or split off a `general-purpose` agent for the Bash-needing verification |
|
|
463
491
|
| `qa-engineer` | (verify each invocation) | — |
|
|
464
492
|
|
|
465
493
|
### Common Violation
|
|
@@ -673,11 +701,11 @@ The skill's WORKFLOW is followed, but git EXECUTION is delegated to mgr-gitnerd
|
|
|
673
701
|
|
|
674
702
|
## Agent Teams (required when enabled)
|
|
675
703
|
|
|
676
|
-
|
|
704
|
+
Agent Teams is active only when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **AND** `TeamCreate` is present in the tool list (the env var alone is NOT sufficient; `SendMessage` alone is not evidence). When active, Agent Teams is required for qualifying tasks; when not, R009/R010 govern.
|
|
677
705
|
|
|
678
|
-
See **R018 (MUST-agent-teams.md)** for the complete decision matrix, self-check, team patterns, and lifecycle.
|
|
706
|
+
See **R018 (MUST-agent-teams.md)** for the Detection table, complete decision matrix, self-check, team patterns, and lifecycle.
|
|
679
707
|
|
|
680
|
-
**Quick rule
|
|
708
|
+
**Quick rule** (applies only when active): 3+ agents OR review cycle OR 2+ issues in same batch → use Agent Teams.
|
|
681
709
|
Using Agent tool when Agent Teams criteria are met needs correction per R018.
|
|
682
710
|
|
|
683
711
|
<!-- DETAIL: Announcement Format
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
|------|-------|--------|
|
|
9
9
|
| 1: Always | Read, Glob, Grep, ToolSearch | Free use, read-only |
|
|
10
10
|
| 2: Default | Write, Edit, NotebookEdit | State changes explicitly, notify before modifying important files |
|
|
11
|
-
| 3: Context | Agent, Skill, EnterPlanMode, ExitPlanMode, EnterWorktree, ExitWorktree, LSP, Monitor, TodoWrite
|
|
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
|
|
13
|
+
| 5: Conditional | TeamCreate†, TeamDelete†, SendMessage, TaskCreate†, TaskGet†, TaskList†, TaskUpdate†, TaskStop, TaskOutput | Available when Agent Teams enabled |
|
|
14
14
|
| 6: MCP | ListMcpResourcesTool, ReadMcpResourceTool, CronCreate, CronDelete, CronList, RemoteTrigger | MCP/extension tools, available when servers configured |
|
|
15
15
|
|
|
16
|
+
> **†** 현행 모델의 기본 실행 환경에 **존재하지 않는다** — 아래 v2.1.233 노트 참조. 이 표는 **도구 카탈로그**이지 가용성 보증이 아니므로, 규칙이 특정 도구 호출을 의무화하기 전에 실측(도구 목록 / `ToolSearch`)으로 존재를 확인한다.
|
|
17
|
+
|
|
16
18
|
## File Access
|
|
17
19
|
|
|
18
20
|
| Operation | Allowed | Prohibited |
|
|
@@ -84,7 +86,7 @@ Use a `"*"` deny rule in `settings.json` to enforce a deny-by-default posture, t
|
|
|
84
86
|
|
|
85
87
|
> **v2.1.232/233+**: 232가 권한 검사 우회 3건을 수정했으나 **233이 그중 2건을 롤백**했습니다. 어느 것이 현행인지 버전별로 구분합니다.
|
|
86
88
|
>
|
|
87
|
-
> 1. **233 현재 유효 (232 수정 유지)** — (a) PowerShell에서 변수 기록 파라미터가 `$PSDefaultParameterValues`를 조용히 덮어써 이후 명령의 파일 접근을 리다이렉트할 수 있던 우회가 수정되었습니다. 또한 중첩 git 저장소가 부모 디렉토리의 trust를 상속하던 문제가 수정되어 저장소마다 별도 trust 확인이 필요하고, `sandbox.ripgrep`은 user/managed/`--settings`에서만 적용되며 **project settings로는 override 불가**입니다(위 v2.1.214 allow/deny 스코프 비대칭과 같은 계열의 축소 — repo-local 설정으로 켤 수 없는 항목이 늘었습니다).
|
|
89
|
+
> 1. **233 현재 유효 (232 수정 유지)** — (a) PowerShell에서 변수 기록 파라미터가 `$PSDefaultParameterValues`를 조용히 덮어써 이후 명령의 파일 접근을 리다이렉트할 수 있던 우회가 수정되었습니다. 또한 중첩 git 저장소가 부모 디렉토리의 trust를 상속하던 문제가 수정되어 저장소마다 별도 trust 확인이 필요하고, `sandbox.ripgrep`은 user/managed/`--settings`에서만 적용되며 **project settings로는 override 불가**입니다(위 v2.1.214 allow/deny 스코프 비대칭과 같은 계열의 축소 — repo-local 설정으로 켤 수 없는 항목이 늘었습니다). 233은 추가로 **Windows NT `\??\` device prefix 경로가 UNC 경로 검증을 우회**해 NTLM 자격증명 유출 벡터가 되던 결함을 수정했습니다 — 같은 경로를 여러 표기로 쓸 수 있다는 v2.1.221/223 "검사 대상 문자열 ≠ 실행 문자열" 계열의 **경로 표기** 각도입니다.
|
|
88
90
|
> 2. **233에서 롤백됨 — 현재 권한 검사되지 않음** — (b) Windows Git Bash가 경로 검증에는 일반 파일로 보이는 Cygwin-style symlink를 따라가던 우회 수정, (c) Bash 입력 리다이렉션(`< file`)을 인자 표기와 동일하게 권한 검사하던 변경. 두 건 모두 232에서 도입됐다가 233에서 되돌려졌습니다(CHANGELOG v2.1.233: "Reverted the 2.1.232 Bash permission changes for Cygwin-style symlinks on Windows and for input redirections (`< file`); a narrower version will return in a later release"). **이 두 경로는 현행 233에서 권한 검사를 거치지 않으므로, 검사된다고 가정하고 경로 스코프 규칙을 설계하면 우회됩니다.**
|
|
89
91
|
> 3. **재도입 예정** — "a narrower version will return in a later release"이므로 좁힌 형태로 돌아옵니다. 재도입 시 적용 범위가 232 원본과 다를 수 있으므로 그때 다시 확인합니다.
|
|
90
92
|
>
|
|
@@ -92,6 +94,26 @@ Use a `"*"` deny rule in `settings.json` to enforce a deny-by-default posture, t
|
|
|
92
94
|
>
|
|
93
95
|
> **일반 교훈**: 단일 릴리즈의 플랫폼 권한 개선은 롤백될 수 있으므로 **항구적 보호막으로 간주하지 않습니다**. 스코프 규칙은 개선 이전 상태를 기준으로 설계하고 플랫폼 개선은 defense-in-depth로만 취급합니다(`feedback_platform_claim_staleness` 계열 — 플랫폼 주장의 시효성).
|
|
94
96
|
|
|
97
|
+
### Todo/Task 도구 기본 제거 (v2.1.233+) — 위 표의 †
|
|
98
|
+
|
|
99
|
+
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`).
|
|
100
|
+
|
|
101
|
+
**실측 (2026-08-15 — `claude -p --output-format stream-json` init 이벤트의 `tools` 배열, `claude-opus-5[1m]`/`claude-sonnet-5` 3회 동일 결과)**:
|
|
102
|
+
|
|
103
|
+
| 상태 | 도구 |
|
|
104
|
+
|------|------|
|
|
105
|
+
| 미등록 (CHANGELOG 명시) | `TodoWrite`, `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate` |
|
|
106
|
+
| 미등록 (CHANGELOG 미명시 — 별도 게이팅) | `TeamCreate`, `TeamDelete` |
|
|
107
|
+
| 잔존 | `TaskStop`, `TaskOutput`, `SendMessage` |
|
|
108
|
+
|
|
109
|
+
바이너리(`2.1.233`) 게이트 함수 실측도 이를 뒷받침한다 — 게이트 대상 도구 배열은 **정확히 5개**(CHANGELOG 명시 5종)이며 `TaskOutput`은 포함되지 않는다.
|
|
110
|
+
|
|
111
|
+
`TeamCreate` 부재는 CHANGELOG가 설명하지 않는 별개 사실이며, **Agent Teams 생성 경로 자체가 없다**는 뜻이다 — 환경변수 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`이 설정돼 있어도 R018은 이 환경에서 비활성이다(R018 Detection). 규칙은 **존재하지 않는 도구의 호출을 의무화하지 않는다** — 도구 의존 의무를 쓸 때는 부재 시 대체 규약을 함께 규정한다(R018 Member TaskUpdate Discipline이 그 예).
|
|
112
|
+
|
|
113
|
+
`CLAUDE_CODE_ENABLE_TODO_TOOLS=1`은 복구 수단이나 **환경 설정 사안**이므로 규칙이 그 설정을 전제하지 않는다. 공식 settings 문서(`code.claude.com/docs/en/settings`)에는 2026-08-15 기준 미수록 — 현재 근거는 CHANGELOG 원문 + 위 실측이다.
|
|
114
|
+
|
|
115
|
+
Origin: #1582. Cross-ref: R018(Member TaskUpdate Discipline 대체 규약), R020("도구가 있다"는 가정도 실측 대상).
|
|
116
|
+
|
|
95
117
|
## Agent Tool Permission Mode
|
|
96
118
|
|
|
97
119
|
> 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.
|
|
@@ -97,7 +97,7 @@ Origin: #1512 (v1.1.28 커밋 staging에 dist/ 2파일 포함, 커밋 전 실측
|
|
|
97
97
|
|
|
98
98
|
카운트(스킬/에이전트/룰/가이드 수) 동기화는 **파일 목록 열거가 아니라 저장소 전수 grep + 의미 판별**로 수행한다. 같은 카운트가 15곳 이상에 흩어져 있어 열거식 위임은 목록에서 빠진 곳을 구조적으로 놓친다.
|
|
99
99
|
|
|
100
|
-
절차: (a) 실제 개수 실측(`ls -1d .claude/skills/*/ | wc -l` 등) → (b) 이전 값을 저장소 전역 grep → (c) 각 히트가 **카운트를 의미하는지 판별** → (d) 카운트 의미인 것만 정정.
|
|
100
|
+
절차: (a) 실제 개수 실측(`ls -1d .claude/skills/*/ | wc -l` 등) → (b) 이전 값을 저장소 전역 `git grep -n`으로 조사 → (c) 각 히트가 **카운트를 의미하는지 판별** → (d) 카운트 의미인 것만 정정.
|
|
101
101
|
|
|
102
102
|
무관한 숫자는 건드리지 않는다 — 버전번호(`v0.118.x`, CC `v2.1.118`), 이슈 번호, 과거 이력 서술("skill-count correction 114→118"), 스크립트 예시 주석은 정정 대상이 아니며 판단 근거와 함께 보고한다. grep 필터 주의: `--include='*.md'`는 `CLAUDE.md.en`/`CLAUDE.md.ko` 같은 **이중 확장자 파일을 매칭하지 못하므로**, 확장자 필터 없이 훑거나 별도 패턴을 병행한다.
|
|
103
103
|
|
|
@@ -105,10 +105,13 @@ Origin: #1512 (v1.1.28 커밋 staging에 dist/ 2파일 포함, 커밋 전 실측
|
|
|
105
105
|
|--------------|----------|
|
|
106
106
|
| 카운트 동기화를 "갱신할 파일 목록" 열거로 위임 | 전수 grep으로 이전 값 히트를 모두 수집한 뒤 카운트 의미만 정정 |
|
|
107
107
|
| `--include='*.md'` 필터로 전수 grep 수행 | 확장자 필터 없이 훑거나 이중 확장자 패턴 병행 |
|
|
108
|
+
| 셸의 `grep -rn`으로 전수 조사 | `git grep -n` 사용 — tracked 기준이라 릴리즈 대상과 일치하고 셸 함수/alias 셰이딩에 면역 (#1590) |
|
|
108
109
|
|
|
109
110
|
위임 프롬프트에는 항상 **"실측값 기준으로 동기화하라, 추측으로 숫자를 바꾸지 말라"**를 명시해, 오케스트레이터의 잘못된 전제를 서브에이전트가 정정할 여지를 남긴다(#1443).
|
|
110
111
|
|
|
111
|
-
|
|
112
|
+
`git grep`은 **untracked 파일을 보지 못한다** — 조사 전 `git status --porcelain`으로 untracked 0을 확인하거나, untracked 가능성이 있으면 `command grep`을 병행한다.
|
|
113
|
+
|
|
114
|
+
Origin: #1521 (찐빠 #2 — v1.1.32 skills 118→114 동기화에서 파일 열거식 위임이 6곳만 갱신, CI 3곳 지적 + 전수 grep 9곳 추가 발견, 최종 15곳); #1590 (셸 `grep`이 shell function으로 shadow되어 tracked 파일을 재귀 탐색에서 누락 — `git grep` 표준화). Cross-ref: #1443 (실측값 기준 명시), #1287 (multi-copy 일관성).
|
|
112
115
|
|
|
113
116
|
## When Required
|
|
114
117
|
|
|
@@ -176,10 +179,31 @@ Origin: #1457 (Session 128 회고 찐빠 #1) — 오케스트레이터가 stale
|
|
|
176
179
|
|
|
177
180
|
Origin: #1574 (v1.1.44 세션 — mgr-sauron 브리핑의 "선재 항목" 4건 중 3건이 부정확: 이미 해소된 항목, 의도적 차이를 결함으로 오인, 규모 과대). **완화 요인**: 프롬프트에 "그대로 믿지 말고 직접 확인하라"를 명시해 3건 전부 에이전트가 정정 — #1443의 "실측값 기준으로 동기화하라" 방어선과 동일 효과. Cross-ref: R011(메모리 신뢰도·Temporal Decay), R020(Diagnostic Hypothesis Verification).
|
|
178
181
|
|
|
182
|
+
## CC 버전 노트 반영 전 — 스코프 상한 이후 릴리즈 확인 (Origin: #1584 #1)
|
|
183
|
+
|
|
184
|
+
CC 버전 노트를 룰에 반영하기 **전**, `npm view @anthropic-ai/claude-code version` + `claude --version`을 실측해 **스코프 상한 버전 이후의 릴리즈 존재 여부**를 확인한다. 있으면 그 CHANGELOG를 먼저 읽어 **롤백·후속 변경**을 파악한 뒤 반영한다. 이슈 생성과 작업 사이의 간극 동안 플랫폼이 스스로 뒤집을 수 있으므로 — **이슈 번호는 최신 릴리즈를 의미하지 않는다**.
|
|
185
|
+
|
|
186
|
+
| Anti-pattern | Required |
|
|
187
|
+
|--------------|----------|
|
|
188
|
+
| 이슈에 적힌 버전(스코프 상한)까지만 조사해 버전 노트를 반영 | 반영 전 `npm view`+`claude --version` 실측 → 상한 이후 릴리즈 CHANGELOG에서 롤백·후속 변경 확인 |
|
|
189
|
+
| 롤백된 개선을 현행 보호막으로 기재 | 롤백 여부를 확인하고, 롤백된 항목은 "현재 미적용"으로 명시 |
|
|
190
|
+
|
|
191
|
+
Origin: #1584 #1 (v1.1.46 세션) — 이슈 생성(8/11~14)과 작업(8/15) 사이 5일 간극 동안 v2.1.233이 v2.1.232 Bash 권한 변경 2건을 롤백했으나 이를 모른 채 배치해 mgr-sauron이 **FAIL로 차단**(당시 저장소 전역 `2.1.233` 언급 0건). Cross-ref: 위 Pre-Release Target Version Ground-Truth Gate(동일 "스냅샷 ≠ ground-truth" 원리의 버전 각도), R020(Diagnostic Hypothesis Verification), R016(버전노트 보존정책 — *어느* 노트를 남길지는 R016, *반영 전 실측*은 이 게이트).
|
|
192
|
+
|
|
179
193
|
## Post-Gate Scope-Expansion Re-Run (Origin: #1433 #2)
|
|
180
194
|
|
|
181
195
|
R017 게이트(mgr-sauron) 통과 선언 후 신규 결함 발견 등으로 스코프가 확장되면(추가 파일 편집), 커밋 전 게이트를 **최종 상태에서 재실행**한다. 게이트 통과 시점 이후의 변경은 형식적으로 미검증이므로, 확장분 미검증 커밋은 R017이 최종 산출물을 커버하지 못하게 만든다.
|
|
182
196
|
|
|
197
|
+
### Advisory 제시 시점 — "같은 커밋 포함 권고"는 판정과 함께 (Origin: #1584 #4)
|
|
198
|
+
|
|
199
|
+
위 재실행 비용을 줄이는 방법은 권고를 **판정 시점에** 받는 것이다. mgr-sauron 위임 프롬프트에 "같은 커밋에 포함 권고" 성격의 advisory는 **PASS/FAIL 판정과 같은 응답에 제시**하도록 명시한다(또는 게이트 실행 전 예비 조회로 미리 수집). 판정 후 도착한 권고를 반영하면 그 자체가 스코프 확장이 되어 게이트 전량 재실행 + 위키 재동기화가 강제된다.
|
|
200
|
+
|
|
201
|
+
| Anti-pattern | Required |
|
|
202
|
+
|--------------|----------|
|
|
203
|
+
| 게이트 PASS 후 도착한 포함 권고를 반영해 스코프 확장 | 위임 프롬프트에 "포함 권고 advisory는 판정과 함께 제시" 명시; 판정 후 도착분은 다음 릴리즈 이월을 우선 검토 |
|
|
204
|
+
|
|
205
|
+
Origin: #1584 #4 (v1.1.45 세션) — R021 자기 서술 staleness 반영을 R017 통과 **후** 수행해 위키 재동기화 1회 + 게이트 전량 재실행 발생. 포함 판단 자체는 옳았고 **시점**이 결함이었다.
|
|
206
|
+
|
|
183
207
|
## Quick Verification Commands — agent/skill/guide/wiki counts via ls/find/wc. See commands via Read tool.
|
|
184
208
|
|
|
185
209
|
<!-- DETAIL: Quick Verification Commands
|
|
@@ -61,7 +61,7 @@ Routes data engineering tasks to appropriate DE expert agents. This skill contai
|
|
|
61
61
|
Before routing via Agent tool, evaluate in this order:
|
|
62
62
|
|
|
63
63
|
### Step 1: Agent Teams Eligibility (R018)
|
|
64
|
-
Check if Agent Teams is available
|
|
64
|
+
Check if Agent Teams is available — `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **AND** `TeamCreate` present in the tool list. The env var alone is NOT sufficient, and `SendMessage` presence is not evidence of Teams (see R018 Detection).
|
|
65
65
|
|
|
66
66
|
| Scenario | Preferred |
|
|
67
67
|
|----------|-----------|
|
|
@@ -70,6 +70,8 @@ Check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or T
|
|
|
70
70
|
| Cross-tool data quality analysis | Agent Teams |
|
|
71
71
|
| Quick DAG/model validation | Agent Tool |
|
|
72
72
|
|
|
73
|
+
When Detection resolves to **No**, skip this step — route via the Agent tool under R009/R010.
|
|
74
|
+
|
|
73
75
|
### Step 2: Expert Selection
|
|
74
76
|
Route to appropriate DE expert based on tool/framework detection.
|
|
75
77
|
|
|
@@ -99,7 +99,7 @@ This directive is preserved inline because Agent-tool prompt synthesis can drop
|
|
|
99
99
|
Before selecting an expert agent, evaluate in this order:
|
|
100
100
|
|
|
101
101
|
### Step 1: Agent Teams Eligibility (R018)
|
|
102
|
-
Check if Agent Teams is available
|
|
102
|
+
Check if Agent Teams is available — `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **AND** `TeamCreate` present in the tool list. The env var alone is NOT sufficient, and `SendMessage` presence is not evidence of Teams (see R018 Detection).
|
|
103
103
|
|
|
104
104
|
| Scenario | Preferred |
|
|
105
105
|
|----------|-----------|
|
|
@@ -109,6 +109,8 @@ Check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or T
|
|
|
109
109
|
| Cross-layer debugging (FE + BE + DB) | Agent Teams |
|
|
110
110
|
| Simple file search/validation | Task Tool |
|
|
111
111
|
|
|
112
|
+
When Detection resolves to **No**, skip this step — route via the Agent tool under R009/R010.
|
|
113
|
+
|
|
112
114
|
### Step 2: Expert Agent Selection
|
|
113
115
|
Route to appropriate language/framework expert based on file extension and keyword mapping.
|
|
114
116
|
|
|
@@ -33,8 +33,8 @@ Inspired by Pi Coding Agent Workflow Extension's multi-model verification patter
|
|
|
33
33
|
## Workflow
|
|
34
34
|
|
|
35
35
|
### Prerequisites
|
|
36
|
-
- Agent Teams
|
|
37
|
-
-
|
|
36
|
+
- None. This skill runs fully without Agent Teams — the three reviewers spawn as parallel Agent tool calls (see "Agent Tool Fallback" below).
|
|
37
|
+
- Agent Teams mode is used only when available: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **AND** `TeamCreate` present in the tool list. The env var alone is NOT sufficient, and `SendMessage` presence is not evidence of Teams (see R018 Detection).
|
|
38
38
|
|
|
39
39
|
### Execution Flow
|
|
40
40
|
|
|
@@ -398,8 +398,18 @@ steps:
|
|
|
398
398
|
# Edit ONLY the .version field — do NOT overwrite templates/manifest.json wholesale (e.g. a source-hash path→hash map).
|
|
399
399
|
# Recover a corrupted manifest: git show HEAD:templates/manifest.json | jq '.version="<NEW>"' > templates/manifest.json (#1423/#1154).
|
|
400
400
|
d. templates/manifest.json: jq '.version = "<NEW>"' templates/manifest.json > templates/manifest.json.tmp && mv templates/manifest.json.tmp templates/manifest.json [on release/v{NEW}]
|
|
401
|
-
e.
|
|
402
|
-
|
|
401
|
+
e. ⚠ PREREQUISITE: steps c (package.json) AND d (templates/manifest.json) MUST BOTH be completed
|
|
402
|
+
before running this step. bun run build — run standalone (NO pipe), read exit code directly
|
|
403
|
+
($? after a pipe is the last command's, R005/#1492).
|
|
404
|
+
Actual mechanism (corrected, #1593): `bun run build` invokes `scripts/sync-source-lockfile.ts`
|
|
405
|
+
(a 10-line wrapper with no version literals of its own), which calls
|
|
406
|
+
`generateAndWriteLockfileForDir` (`src/core/lockfile.ts`). That function reads versions via
|
|
407
|
+
`loadVersions()` (`src/core/sync.ts`) — `generatorVersion` FROM package.json, `templateVersion`
|
|
408
|
+
FROM templates/manifest.json — and writes both into .omcustom.lock.json. If step d has not yet
|
|
409
|
+
landed when this runs, the lockfile silently records the PREVIOUS templateVersion — no warning,
|
|
410
|
+
no error. Observed contamination: v1.1.47 shipped generatorVersion=1.1.47 / templateVersion=1.1.46
|
|
411
|
+
because the bump commit created package.json + lockfile together and manifest.json was bumped in
|
|
412
|
+
a later commit. Do NOT run this step until BOTH c and d are staged. [on release/v{NEW}]
|
|
403
413
|
f. git status --short — enumerate ALL tracked drift (`^ M`) the build produced; stage EVERY one (esp. .omcustom.lock.json) before commit.
|
|
404
414
|
(#1531 — .omcustom.lock.json missed staging across 4 consecutive releases after v1.1.29; root cause was no build step between version bump and commit.) [on release/v{NEW}]
|
|
405
415
|
g. mgr-gitnerd commit: "chore(release): bump to v<NEW>" — MUST include the drift from step f.
|
|
@@ -411,6 +421,11 @@ steps:
|
|
|
411
421
|
i. mandatory verification (with existence guard for partial-update safety), run on release/v{NEW}:
|
|
412
422
|
[ -f scripts/verify-version-sync.sh ] && bash scripts/verify-version-sync.sh || echo "::warning::verify-version-sync.sh not found, version sync verification skipped"
|
|
413
423
|
(verify-version-sync.sh 가 exit 1 시 release 단계 halt)
|
|
424
|
+
j. lockfile 3-way assertion (#1593 제안3, closes the gap step i's 2-way check misses) — run standalone
|
|
425
|
+
(NO pipe), read exit code directly, on release/v{NEW}:
|
|
426
|
+
jq -e --arg v "<NEW>" '.generatorVersion==$v and .templateVersion==$v' .omcustom.lock.json
|
|
427
|
+
실패 시 release 단계 halt — cause is almost always step e run before step d landed; fix by
|
|
428
|
+
re-running step d then step e, re-staging, and re-running this assertion.
|
|
414
429
|
|
|
415
430
|
Version decision (semver) — PATCH-PREFERRED policy (post-1.0.0):
|
|
416
431
|
- No existing tags → v0.1.0
|
|
@@ -428,7 +443,15 @@ steps:
|
|
|
428
443
|
b. mgr-gitnerd creates PR: gh pr create --base develop --head release/v{NEW} --title "chore(release): bump to v{NEW}" --body "<MUST include 'Closes #N' for EVERY issue this release resolves>"
|
|
429
444
|
⚠ auto-tag.yml closes issues by grep'ing Closes/Fixes/Resolves keywords in the PR BODY — NOT by milestone membership NOR by commit message trailers. If the keywords are missing, no issues close and the workflow still reports success (#1531). Commit-message close keywords are explicitly forbidden during `implement` and step 1.g above (#1542) — the PR body is the ONLY place a close keyword should appear.
|
|
430
445
|
Before creating the PR (whether via inline --body or --body-file), confirm the body text actually contains a Closes line per issue.
|
|
431
|
-
c. mgr-gitnerd merges PR
|
|
446
|
+
c. mgr-gitnerd merges PR: gh pr merge {n} --merge --delete-branch (plain merge — NOT --admin).
|
|
447
|
+
Ground-truth (measured 2026-08-15, `gh api repos/{owner}/{repo}/branches/develop/protection`):
|
|
448
|
+
required status checks are exactly 6 — Test, Lint, Template Sync, Version Sync,
|
|
449
|
+
Dependency Security Audit, Rust Tests (strict=true); enforce_admins=false; NO
|
|
450
|
+
required_pull_request_reviews (no reviewer-approval requirement exists). v1.1.47 merged with a
|
|
451
|
+
plain `gh pr merge 1585 --merge --delete-branch` — no --admin needed. A plain merge succeeds
|
|
452
|
+
once all 6 checks report green. If the merge is rejected, do NOT reflexively add --admin —
|
|
453
|
+
re-run the protection query above to re-measure current requirements and report the actual
|
|
454
|
+
blocker (R010 bypass-flag pre-check: name what is bypassed and why before ever using --admin).
|
|
432
455
|
d. DO NOT manually git tag or gh release create.
|
|
433
456
|
auto-tag.yml fires on release/v* PR merge → creates tag → closes issues linked via PR-body Closes/Fixes/Resolves keywords → closes milestone → deletes release branch.
|
|
434
457
|
release.yml fires on the tag → npm publish + GitHub Release creation.
|
|
@@ -127,6 +127,6 @@ jobs:
|
|
|
127
127
|
TOTAL_GUIDES=$(find guides -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')
|
|
128
128
|
TOTAL_WIKI=$(find wiki -name "*.md" ! -name "index.md" ! -name "log.md" 2>/dev/null | wc -l | tr -d ' ')
|
|
129
129
|
|
|
130
|
-
echo "Source entities: agents=$TOTAL_AGENTS skills=$TOTAL_SKILLS rules=$TOTAL_RULES
|
|
130
|
+
echo "Source entities: agents=$TOTAL_AGENTS skills=$TOTAL_SKILLS rules=$TOTAL_RULES guide_topics=$TOTAL_GUIDES"
|
|
131
131
|
echo "Wiki pages: $TOTAL_WIKI"
|
|
132
132
|
echo "All wiki pages present — sync OK"
|
package/templates/CLAUDE.md
CHANGED
|
@@ -184,7 +184,7 @@ oh-my-customcode는 소프트웨어 컴파일과 동일한 구조를 따릅니
|
|
|
184
184
|
|
|
185
185
|
## Agent Teams (MUST when enabled)
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
Agent Teams는 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **그리고** `TeamCreate` 도구가 도구 목록에 존재할 때만 활성입니다. env 변수는 의도의 표현일 뿐 기능의 가용성이 아닙니다 — 현행 환경(CC v2.1.233+)에서 `TeamCreate`는 도구 목록에 **미등록**(실측)이므로 R018은 비활성(dormant)이며 R009/R010이 지배합니다.
|
|
188
188
|
|
|
189
189
|
| 기능 | 서브에이전트 (기본) | Agent Teams |
|
|
190
190
|
|------|---------------------|-------------|
|
|
@@ -193,8 +193,8 @@ Claude Code의 Agent Teams 기능이 활성화되어 있으면 (`CLAUDE_CODE_EXP
|
|
|
193
193
|
| 적합한 작업 | 집중된 작업 | 리서치, 리뷰, 디버깅 |
|
|
194
194
|
| 토큰 비용 | 낮음 | 높음 |
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
결정 매트릭스는 R018 (MUST-agent-teams.md)
|
|
196
|
+
**활성 판정이 Yes일 때, 적격한 협업 작업에 Agent Teams를 반드시 사용해야 합니다 (R018 MUST).**
|
|
197
|
+
판정표와 결정 매트릭스는 R018 (MUST-agent-teams.md) `## Detection`을 참조하세요.
|
|
198
198
|
하이브리드 패턴 (Claude + Codex, 동적 생성 + Teams)이 지원됩니다.
|
|
199
199
|
단순/비용 민감 작업에는 Task tool + 라우팅 스킬이 폴백으로 유지됩니다.
|
|
200
200
|
|
package/templates/CLAUDE.md.en
CHANGED
|
@@ -178,7 +178,7 @@ This is the core oh-my-customcode philosophy: **"No expert? CREATE one, connect
|
|
|
178
178
|
|
|
179
179
|
## Agent Teams (MUST when enabled)
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
Agent Teams is active only when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **AND** `TeamCreate` is present in the tool list. The env var expresses intent, not availability — in the current runtime (CC v2.1.233+) `TeamCreate` is **absent** from the tool list (measured), so R018 is dormant and R009/R010 govern.
|
|
182
182
|
|
|
183
183
|
| Feature | Subagents (Default) | Agent Teams |
|
|
184
184
|
|---------|---------------------|-------------|
|
|
@@ -187,8 +187,8 @@ When Claude Code's Agent Teams feature is enabled (`CLAUDE_CODE_EXPERIMENTAL_AGE
|
|
|
187
187
|
| Best for | Focused tasks | Research, review, debugging |
|
|
188
188
|
| Token cost | Lower | Higher |
|
|
189
189
|
|
|
190
|
-
**When
|
|
191
|
-
See R018 (MUST-agent-teams.md) for the decision matrix.
|
|
190
|
+
**When Detection resolves to Yes, Agent Teams is MANDATORY for qualifying collaborative tasks (R018 MUST).**
|
|
191
|
+
See R018 (MUST-agent-teams.md) `## Detection` for the detection table and decision matrix.
|
|
192
192
|
Hybrid patterns (Claude + Codex, Dynamic Creation + Teams) are supported.
|
|
193
193
|
Task tool + routing skills remain the fallback for simple/cost-sensitive tasks.
|
|
194
194
|
|
package/templates/CLAUDE.md.ko
CHANGED
|
@@ -178,7 +178,7 @@ project/
|
|
|
178
178
|
|
|
179
179
|
## Agent Teams (MUST when enabled)
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
Agent Teams는 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` **그리고** `TeamCreate` 도구가 도구 목록에 존재할 때만 활성입니다. env 변수는 의도의 표현일 뿐 기능의 가용성이 아닙니다 — 현행 환경(CC v2.1.233+)에서 `TeamCreate`는 도구 목록에 **미등록**(실측)이므로 R018은 비활성(dormant)이며 R009/R010이 지배합니다.
|
|
182
182
|
|
|
183
183
|
| 기능 | 서브에이전트 (기본) | Agent Teams |
|
|
184
184
|
|------|---------------------|-------------|
|
|
@@ -187,8 +187,8 @@ Claude Code의 Agent Teams 기능이 활성화되어 있으면 (`CLAUDE_CODE_EXP
|
|
|
187
187
|
| 적합한 작업 | 집중된 작업 | 리서치, 리뷰, 디버깅 |
|
|
188
188
|
| 토큰 비용 | 낮음 | 높음 |
|
|
189
189
|
|
|
190
|
-
|
|
191
|
-
결정 매트릭스는 R018 (MUST-agent-teams.md)
|
|
190
|
+
**활성 판정이 Yes일 때, 적격한 협업 작업에 Agent Teams를 반드시 사용해야 합니다 (R018 MUST).**
|
|
191
|
+
판정표와 결정 매트릭스는 R018 (MUST-agent-teams.md) `## Detection`을 참조하세요.
|
|
192
192
|
하이브리드 패턴 (Claude + Codex, 동적 생성 + Teams)이 지원됩니다.
|
|
193
193
|
단순/비용 민감 작업에는 Task tool + 라우팅 스킬이 폴백으로 유지됩니다.
|
|
194
194
|
|
package/templates/manifest.json
CHANGED
|
@@ -398,8 +398,18 @@ steps:
|
|
|
398
398
|
# Edit ONLY the .version field — do NOT overwrite templates/manifest.json wholesale (e.g. a source-hash path→hash map).
|
|
399
399
|
# Recover a corrupted manifest: git show HEAD:templates/manifest.json | jq '.version="<NEW>"' > templates/manifest.json (#1423/#1154).
|
|
400
400
|
d. templates/manifest.json: jq '.version = "<NEW>"' templates/manifest.json > templates/manifest.json.tmp && mv templates/manifest.json.tmp templates/manifest.json [on release/v{NEW}]
|
|
401
|
-
e.
|
|
402
|
-
|
|
401
|
+
e. ⚠ PREREQUISITE: steps c (package.json) AND d (templates/manifest.json) MUST BOTH be completed
|
|
402
|
+
before running this step. bun run build — run standalone (NO pipe), read exit code directly
|
|
403
|
+
($? after a pipe is the last command's, R005/#1492).
|
|
404
|
+
Actual mechanism (corrected, #1593): `bun run build` invokes `scripts/sync-source-lockfile.ts`
|
|
405
|
+
(a 10-line wrapper with no version literals of its own), which calls
|
|
406
|
+
`generateAndWriteLockfileForDir` (`src/core/lockfile.ts`). That function reads versions via
|
|
407
|
+
`loadVersions()` (`src/core/sync.ts`) — `generatorVersion` FROM package.json, `templateVersion`
|
|
408
|
+
FROM templates/manifest.json — and writes both into .omcustom.lock.json. If step d has not yet
|
|
409
|
+
landed when this runs, the lockfile silently records the PREVIOUS templateVersion — no warning,
|
|
410
|
+
no error. Observed contamination: v1.1.47 shipped generatorVersion=1.1.47 / templateVersion=1.1.46
|
|
411
|
+
because the bump commit created package.json + lockfile together and manifest.json was bumped in
|
|
412
|
+
a later commit. Do NOT run this step until BOTH c and d are staged. [on release/v{NEW}]
|
|
403
413
|
f. git status --short — enumerate ALL tracked drift (`^ M`) the build produced; stage EVERY one (esp. .omcustom.lock.json) before commit.
|
|
404
414
|
(#1531 — .omcustom.lock.json missed staging across 4 consecutive releases after v1.1.29; root cause was no build step between version bump and commit.) [on release/v{NEW}]
|
|
405
415
|
g. mgr-gitnerd commit: "chore(release): bump to v<NEW>" — MUST include the drift from step f.
|
|
@@ -411,6 +421,11 @@ steps:
|
|
|
411
421
|
i. mandatory verification (with existence guard for partial-update safety), run on release/v{NEW}:
|
|
412
422
|
[ -f scripts/verify-version-sync.sh ] && bash scripts/verify-version-sync.sh || echo "::warning::verify-version-sync.sh not found, version sync verification skipped"
|
|
413
423
|
(verify-version-sync.sh 가 exit 1 시 release 단계 halt)
|
|
424
|
+
j. lockfile 3-way assertion (#1593 제안3, closes the gap step i's 2-way check misses) — run standalone
|
|
425
|
+
(NO pipe), read exit code directly, on release/v{NEW}:
|
|
426
|
+
jq -e --arg v "<NEW>" '.generatorVersion==$v and .templateVersion==$v' .omcustom.lock.json
|
|
427
|
+
실패 시 release 단계 halt — cause is almost always step e run before step d landed; fix by
|
|
428
|
+
re-running step d then step e, re-staging, and re-running this assertion.
|
|
414
429
|
|
|
415
430
|
Version decision (semver) — PATCH-PREFERRED policy (post-1.0.0):
|
|
416
431
|
- No existing tags → v0.1.0
|
|
@@ -428,7 +443,15 @@ steps:
|
|
|
428
443
|
b. mgr-gitnerd creates PR: gh pr create --base develop --head release/v{NEW} --title "chore(release): bump to v{NEW}" --body "<MUST include 'Closes #N' for EVERY issue this release resolves>"
|
|
429
444
|
⚠ auto-tag.yml closes issues by grep'ing Closes/Fixes/Resolves keywords in the PR BODY — NOT by milestone membership NOR by commit message trailers. If the keywords are missing, no issues close and the workflow still reports success (#1531). Commit-message close keywords are explicitly forbidden during `implement` and step 1.g above (#1542) — the PR body is the ONLY place a close keyword should appear.
|
|
430
445
|
Before creating the PR (whether via inline --body or --body-file), confirm the body text actually contains a Closes line per issue.
|
|
431
|
-
c. mgr-gitnerd merges PR
|
|
446
|
+
c. mgr-gitnerd merges PR: gh pr merge {n} --merge --delete-branch (plain merge — NOT --admin).
|
|
447
|
+
Ground-truth (measured 2026-08-15, `gh api repos/{owner}/{repo}/branches/develop/protection`):
|
|
448
|
+
required status checks are exactly 6 — Test, Lint, Template Sync, Version Sync,
|
|
449
|
+
Dependency Security Audit, Rust Tests (strict=true); enforce_admins=false; NO
|
|
450
|
+
required_pull_request_reviews (no reviewer-approval requirement exists). v1.1.47 merged with a
|
|
451
|
+
plain `gh pr merge 1585 --merge --delete-branch` — no --admin needed. A plain merge succeeds
|
|
452
|
+
once all 6 checks report green. If the merge is rejected, do NOT reflexively add --admin —
|
|
453
|
+
re-run the protection query above to re-measure current requirements and report the actual
|
|
454
|
+
blocker (R010 bypass-flag pre-check: name what is bypassed and why before ever using --admin).
|
|
432
455
|
d. DO NOT manually git tag or gh release create.
|
|
433
456
|
auto-tag.yml fires on release/v* PR merge → creates tag → closes issues linked via PR-body Closes/Fixes/Resolves keywords → closes milestone → deletes release branch.
|
|
434
457
|
release.yml fires on the tag → npm publish + GitHub Release creation.
|