oh-my-customcode 2.0.4 → 2.0.6
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/README.md +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/hooks/scripts/auto-continue-guard.sh +1 -1
- package/templates/.claude/hooks/scripts/r007-r008-drift-advisor.sh +4 -0
- package/templates/.claude/hooks/scripts/session-reflection.sh +3 -0
- package/templates/.claude/rules/MUST-agent-design.md +12 -12
- package/templates/.claude/rules/SHOULD-ecomode.md +1 -1
- package/templates/.claude/skills/claude-native/SKILL.md +3 -3
- package/templates/.claude/skills/fsd/SKILL.md +4 -4
- package/templates/.claude/skills/hada-scout/SKILL.md +6 -6
- package/templates/.claude/skills/omcustom-feedback/SKILL.md +3 -3
- package/templates/.claude/skills/omcustom-loop/SKILL.md +16 -17
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +16 -1
- package/templates/.claude/skills/post-release-followup/SKILL.md +9 -9
- package/templates/.claude/skills/research/SKILL.md +5 -5
- package/templates/.claude/skills/scout/SKILL.md +5 -5
- package/templates/.claude/skills/status/SKILL.md +1 -1
- package/templates/guides/agent-eval/README.md +1 -1
- package/templates/guides/claude-code/04-agent-skills.md +4 -0
- package/templates/guides/claude-code/15-version-compatibility.md +44 -44
- package/templates/guides/harness-engineering/README.md +2 -2
- package/templates/guides/middleware-patterns/README.md +5 -5
- package/templates/guides/multi-model-routing/README.md +4 -3
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +16 -1
package/README.md
CHANGED
|
@@ -208,7 +208,7 @@ All commands are invoked inside the Claude Code conversation.
|
|
|
208
208
|
| Command | What it does |
|
|
209
209
|
|---------|-------------|
|
|
210
210
|
| `/omcustom:monitoring-setup` | OTel monitoring toggle |
|
|
211
|
-
| `/omcustom-loop` |
|
|
211
|
+
| `/omcustom-loop` | SubagentStop advisory hooks during background agent work (outcome recording, consecutive-completion advisory) |
|
|
212
212
|
| `/omcustom:lists` | Show all commands |
|
|
213
213
|
| `/omcustom:status` | System health check |
|
|
214
214
|
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ set -euo pipefail
|
|
|
4
4
|
# Auto-Continue Guard
|
|
5
5
|
# Trigger: SubagentStop
|
|
6
6
|
# Purpose: Count consecutive subagent completions and warn when auto-continue limit reached
|
|
7
|
-
# Protocol: stdin JSON -> count check -> stdout pass-through, exit 0
|
|
7
|
+
# Protocol: stdin JSON -> count check -> stdout pass-through, the only explicit exit is exit 0 (R021); under set -u a corrupt counter file can exit 1 (non-blocking for SubagentStop)
|
|
8
8
|
|
|
9
9
|
input=$(cat)
|
|
10
10
|
|
|
@@ -227,6 +227,10 @@ JQ_LAST_TURN='
|
|
|
227
227
|
split("\n")
|
|
228
228
|
| map(select(length > 0) | (fromjson? // empty))
|
|
229
229
|
| map(select((.isSidechain // false) != true))
|
|
230
|
+
# (#1876) api-request-blob records carry a copy of the request message (role=assistant/user,
|
|
231
|
+
# no isSidechain) — they are NOT conversation lines. Left in, a trailing assistant blob is picked
|
|
232
|
+
# as $last and double-counts tool_use/announce blocks, and a user blob acts as a turn boundary.
|
|
233
|
+
| map(select((.type? // "") != "api-request-blob"))
|
|
230
234
|
| . as $L
|
|
231
235
|
| ($L | length) as $n
|
|
232
236
|
| [ range(0; $n) | select($L[.].message.role? == "assistant") ] as $ai
|
|
@@ -167,6 +167,9 @@ JQ_REFLECT='
|
|
|
167
167
|
split("\n")
|
|
168
168
|
| map(select(length > 0) | (fromjson? // empty))
|
|
169
169
|
| map(select((.isSidechain // false) != true))
|
|
170
|
+
# (#1876) api-request-blob records are request copies, not conversation lines — same filter as
|
|
171
|
+
# r007-r008-drift-advisor.sh (shared verdict; fixing one side only re-contaminates).
|
|
172
|
+
| map(select((.type? // "") != "api-request-blob"))
|
|
170
173
|
| [ foreach .[] as $l (0;
|
|
171
174
|
(if ($l.message.role? == "user")
|
|
172
175
|
and ( (($l.message.content | type) == "string")
|
|
@@ -40,13 +40,13 @@ Tier를 섞으면(예: frontmatter에 Tier-3 전용 값을 쓰거나 그 반대)
|
|
|
40
40
|
| `opusplan` | Opus + plan mode; architecture planning with approval gates |
|
|
41
41
|
| `inherit` | Inherit the parent session's model |
|
|
42
42
|
|
|
43
|
-
**CC resolves these, not this project.** This project cannot "pin" an alias to a specific version
|
|
43
|
+
**CC resolves these, not this project.** This project cannot "pin" an alias to a specific version; treat any "currently resolves to X" statement as a snapshot that changes when CC's own default changes (measured example via Read tool). <!-- DETAIL: measured example — a frontmatter `model: sonnet` agent executed as `claude-sonnet-5` (the v2.1.197-era default), not a project-fixed `claude-sonnet-4-6`. -->
|
|
44
44
|
|
|
45
45
|
#### Tier 2 — Full model IDs (frontmatter `model:` ONLY — recommended for stability)
|
|
46
46
|
|
|
47
47
|
| Full ID | Use Case |
|
|
48
48
|
|---------|----------|
|
|
49
|
-
| `claude-haiku-4-5` |
|
|
49
|
+
| `claude-haiku-4-5` | Haiku, previous generation; fast, cheap tasks |
|
|
50
50
|
| `claude-haiku-5-5` | Default Haiku model on the Anthropic API (v2.1.293+); 1M context |
|
|
51
51
|
| `claude-sonnet-5` | Native 1M context; previous-generation Sonnet (v2.1.197+; on the Anthropic API, `claude-sonnet-5-5` is now the default Sonnet model, v2.1.284+) |
|
|
52
52
|
| `claude-sonnet-5-5` | Now the default Sonnet model on the Anthropic API (v2.1.284+); 1M context, $2/$10 per Mtok, $0.10/Mtok cache reads in CC cost figures (v2.1.296; was $0.20) |
|
|
@@ -57,7 +57,7 @@ Tier를 섞으면(예: frontmatter에 Tier-3 전용 값을 쓰거나 그 반대)
|
|
|
57
57
|
| `claude-fable-5` | Mythos-class; tier above Opus (access via CC v2.1.170+) |
|
|
58
58
|
| `claude-fable-5-1` | Mythos-class; Fable 5.1 — v2.1.257부터 기본 Fable 모델, 1M context |
|
|
59
59
|
|
|
60
|
-
Full IDs are valid ONLY in agent frontmatter — the Agent tool's `model:` spawn parameter does NOT accept them (see Tier 3). Writing the full ID directly
|
|
60
|
+
Full IDs are valid ONLY in agent frontmatter — the Agent tool's `model:` spawn parameter does NOT accept them (see Tier 3). Writing the full ID directly pins the agent regardless of future CC default changes. This is the recommended way to opt into Haiku 5.5 / Sonnet 5.5 / Opus 5.5 / Fable 5 / 5.1 explicitly rather than riding CC's Tier-1 default resolution.
|
|
61
61
|
|
|
62
62
|
Extended context suffix: `[1m]` (e.g., `claude-opus-4-6[1m]`) — enables 1M token context window.
|
|
63
63
|
|
|
@@ -372,7 +372,7 @@ RETIRED (은퇴 릴리즈 v1.1.50, 보존 기준 v2.1.230 미만): > **v2.1.204+
|
|
|
372
372
|
|
|
373
373
|
## Permission Mode Guidance
|
|
374
374
|
|
|
375
|
-
> Canonical source: R010 (MUST-orchestrator-coordination.md) "Universal bypassPermissions". Below CC 2.1.212, CC defaults per-call `mode` to `acceptEdits` — pass `mode: "bypassPermissions"` explicitly. From 2.1.212 the parameter is ignored: subagents inherit the parent session's mode, and frontmatter `permissionMode` (modes in the table below) may override it. Keep passing `mode` for compatibility; see R010 for the version table and self-check.
|
|
375
|
+
> Canonical source: R010 (MUST-orchestrator-coordination.md) "Universal bypassPermissions". Below CC 2.1.212 pass `mode: "bypassPermissions"` explicitly (default `acceptEdits`); from 2.1.212 the `mode` parameter is ignored (parent mode inherited; frontmatter `permissionMode`, table below, may override). Keep passing `mode`; see R010's version table and self-check. <!-- DETAIL: pre-compression wording — Below CC 2.1.212, CC defaults per-call `mode` to `acceptEdits` — pass `mode: "bypassPermissions"` explicitly. From 2.1.212 the parameter is ignored: subagents inherit the parent session's mode, and frontmatter `permissionMode` (modes in the table below) may override it. Keep passing `mode` for compatibility; see R010 for the version table and self-check. -->
|
|
376
376
|
|
|
377
377
|
| Mode | Behavior |
|
|
378
378
|
|------|----------|
|
|
@@ -457,7 +457,7 @@ Optional per-agent identity layer. `soul: true` in frontmatter enables personali
|
|
|
457
457
|
|
|
458
458
|
## Artifact Output Convention
|
|
459
459
|
|
|
460
|
-
Skills persist output to `.claude/outputs/sessions/{YYYY-MM-DD}/{skill-name}-{HHmmss}.md`. Opt-in, git-untracked. Final subagent writes (R010).
|
|
460
|
+
Skills persist output to `.claude/outputs/sessions/{YYYY-MM-DD}/{skill-name}-{HHmmss}.md`. Opt-in, git-untracked. Final subagent writes (R010). Observed (#1858, CC 2.1.296/2.1.310): a subagent Write of a report-named file (`report-*.md`) was refused; trigger unmeasured [가설]. On refusal the subagent returns the content as text and reports the refusal; if a downstream agent needs a file, the orchestrator delegates a separate writer with a filename outside report/summary/findings/analysis names [가설]. The orchestrator confirms every file deliverable with its own `ls -la`. <!-- DETAIL: #1858 measurement (CC 2.1.310, 2026-10-25, mgr-updater subagent, scratchpad dir): Write `report-probe.md` → refused "Subagents should return findings as text, not write report files. Include this content in your final response instead."; `homework-probe.md` and `result-probe.md` → created; `ls -la` showed only the latter two. Trigger observed for a report-named file; whether filename, path, or content decides is unmeasured [가설]. 2.1.296 also saw a subagent falsely report a refused write as success, hence the orchestrator `ls -la` check. -->
|
|
461
461
|
|
|
462
462
|
### Sensitive Path Handling
|
|
463
463
|
|
|
@@ -490,14 +490,14 @@ CC v2.1.121+: `bypassPermissions`에서 `.claude/**`(templates 미러 포함)·`
|
|
|
490
490
|
|
|
491
491
|
### Artifact Channel Protocol
|
|
492
492
|
|
|
493
|
-
에이전트 간 결과 핸드오프 시 **아티팩트 파일을 채널로 사용**하는 프로토콜.
|
|
493
|
+
에이전트 간 결과 핸드오프 시 **아티팩트 파일을 채널로 사용**하는 프로토콜. <!-- DETAIL: Artifact Output Convention 경로 규약의 통신 계약 승격. -->
|
|
494
494
|
|
|
495
495
|
#### 원칙
|
|
496
496
|
|
|
497
497
|
| 원칙 | 내용 |
|
|
498
498
|
|------|------|
|
|
499
|
-
| Path-only transfer | 다음 에이전트에 전달할 때 **파일 경로만 전달**, 본문 inline 전달 금지 |
|
|
500
|
-
| Read-write 분리 | 생산 에이전트는 Write, 소비 에이전트는 Read (파일 경쟁 방지) |
|
|
499
|
+
| Path-only transfer | 다음 에이전트에 전달할 때 **파일 경로만 전달**, 본문 inline 전달 금지(거부 중계 시 별도 writer 1회 제외 — 위 Convention) |
|
|
500
|
+
| Read-write 분리 | 생산 에이전트는 Write(거부 시 위 Convention의 중계 경로), 소비 에이전트는 Read (파일 경쟁 방지) |
|
|
501
501
|
| Session-scoped | 아티팩트는 세션 범위 — `{YYYY-MM-DD}` 디렉토리로 격리 |
|
|
502
502
|
| Single-writer | 한 아티팩트는 하나의 에이전트만 작성. 후속 에이전트는 새 아티팩트 생성 |
|
|
503
503
|
|
|
@@ -532,13 +532,13 @@ Agent body: purpose, capabilities overview, workflow. NOT detailed instructions
|
|
|
532
532
|
|
|
533
533
|
## Fast Mode
|
|
534
534
|
|
|
535
|
-
Fast Mode
|
|
536
|
-
|
|
535
|
+
Fast Mode keeps the configured model (does NOT switch models): ~2.5x faster output, reduced reasoning depth. Activated via `/fast` or `fastMode` setting.
|
|
536
|
+
<!-- DETAIL: former table
|
|
537
537
|
| Aspect | Normal | Fast Mode |
|
|
538
538
|
|--------|--------|-----------|
|
|
539
539
|
| Model | As configured | Same model |
|
|
540
540
|
| Output speed | Standard | ~2.5x faster |
|
|
541
|
-
| Reasoning depth | Full | Reduced |
|
|
541
|
+
| Reasoning depth | Full | Reduced | -->
|
|
542
542
|
|
|
543
543
|
See activation, effort interaction, and default effort change details via Read tool.
|
|
544
544
|
|
|
@@ -656,7 +656,7 @@ Default: `core` (when field is omitted)
|
|
|
656
656
|
|
|
657
657
|
### Context Fork Criteria
|
|
658
658
|
|
|
659
|
-
Use `context: fork` for multi-agent orchestration skills only. Cap: **12 total**. Current: 10/12 (secretary/dev-lead/de-lead/qa-lead-routing, dag-orchestration, task-decomposition, worker-reviewer-pipeline, deep-plan, professor-triage, roundtable-debate
|
|
659
|
+
Use `context: fork` for multi-agent orchestration skills only. Cap: **12 total**. Current: 10/12 (list via Read tool). <!-- DETAIL: context:fork skills (10) — secretary/dev-lead/de-lead/qa-lead-routing, dag-orchestration, task-decomposition, worker-reviewer-pipeline, deep-plan, professor-triage, roundtable-debate. -->
|
|
660
660
|
|
|
661
661
|
<!-- DETAIL: Context Fork decision table
|
|
662
662
|
| Use context:fork | Do NOT use context:fork |
|
|
@@ -94,7 +94,7 @@ Active removal of irrelevant retrieved content from agent context. Complements o
|
|
|
94
94
|
|
|
95
95
|
> **v2.1.260+**: 1M 컨텍스트를 가진 모델의 auto-compact 시점이 확대되어, Opus·Fable 세션도 이제 1M 토큰 한도 직전에 compact되고 매우 큰 컨텍스트에서의 recovery compaction이 더 이상 10분 타임아웃으로 실패하지 않습니다 — 위 v2.1.251 Sonnet 5 노트를 Opus/Fable 계열로 확장하는 것이므로, `CLAUDE_CODE_DISABLE_1M_CONTEXT`가 설정되지 않은 한 이 섹션의 백분율 임계값은 이제 세 모델군 전체에서 절대 토큰량 ~1M에 대응합니다. 같은 릴리즈에서 `/cost`와 statusline의 `prompt_cache` 필드가 prompt-cache miss의 **가능성 있는 원인**(도구 정의·시스템 프롬프트 변경, TTL 경과 idle)을 표시하도록 개선되어, 이 규칙이 다루는 캐시 관련 비용 이상 징후를 진단할 때 그 원인 후보를 출발점으로 삼을 수 있습니다 — 후보이지 확정 원인이 아니므로 R020 Proxy Signal 원칙대로 실측으로 확정합니다(cross-ref R012 statusline).
|
|
96
96
|
|
|
97
|
-
> **v2.1.261+**: 컨텍스트 비용 진단 도구 2종이 추가되었습니다. `/skill-doctor`는 로드된 스킬 중 사용되지 않는 것과 그 컨텍스트 비용을 표시해 가지치기 대상을 알려줍니다 — 이 저장소의
|
|
97
|
+
> **v2.1.261+**: 컨텍스트 비용 진단 도구 2종이 추가되었습니다. `/skill-doctor`는 로드된 스킬 중 사용되지 않는 것과 그 컨텍스트 비용을 표시해 가지치기 대상을 알려줍니다 — 이 저장소의 114개 스킬 열거 블록과 `profile` 스킬의 플러그인 세트 전환에 직접 관련됩니다. `bashOutputMaxChars`/`taskOutputMaxChars` 설정은 command·background-task 출력이 파일로 저장되기 전 모델에 인라인 전달되는 상한을 올릴 수 있습니다(최대 128K자). **v2.1.277+**: `taskOutputMaxChars`는 `TaskOutput` 도구 제거로 더 이상 효과가 없습니다(상세는 `guides/claude-code/15-version-compatibility.md`). 지침: `bashOutputMaxChars`는 기본값으로 올리지 않습니다 — 이 규칙의 압축 원칙(파일 목록 → 개수, 오류 트레이스 → 앞/뒤 줄)이 작은 인라인 출력을 선호하므로, pass/fail 라인이 잘리는 특정 검증에 한해서만 올리고 그 외에는 독립적인 exit-code 조회(R005 #1492)를 우선합니다.
|
|
98
98
|
|
|
99
99
|
> **v2.1.269/273+**: (269) auto-compaction이 요약할 완전한 이전 대화 교환이 없을 때(주로 매우 큰 프롬프트를 쓰는 SDK 세션) "Prompt is too long"으로 세션이 영구적으로 멈추던 결함이 수정되었습니다. (273) context meter와 auto-compact가 advisor-tool 턴을 실제 컨텍스트 크기의 약 **2배**로 계산해 auto-compact가 실제 창의 약 **절반** 지점에서 발동하던 결함이 수정되었습니다 — 이 규칙의 백분율 임계값에 대한 함의: 273 이전 2.1.2xx에서 advisor tool을 쓴 세션은 CTX% 수치와 auto-compact 시점이 최대 2배 부풀려져, 그 수치에 근거한 예산 판단이 의도치 않게 보수적이었습니다; 273+에서는 미터를 다시 신뢰할 수 있습니다(cross-ref R012 statusline CTX 세그먼트).
|
|
100
100
|
|
|
@@ -89,9 +89,9 @@ byte_dump=$(mktemp /tmp/omcustom-gh-byte-dump.XXXXXX) || exit 1
|
|
|
89
89
|
trap 'command rm -f -- "$byte_dump"' 0
|
|
90
90
|
trap 'exit 1' HUP INT TERM
|
|
91
91
|
check_file() {
|
|
92
|
-
[ -f "$1" ] || return 1
|
|
93
|
-
command od -A n -v -t u1 "$1" > "$byte_dump" || return 1
|
|
94
|
-
command awk -v kind="$2" '
|
|
92
|
+
[ -f "${1}" ] || return 1
|
|
93
|
+
command od -A n -v -t u1 "${1}" > "$byte_dump" || return 1
|
|
94
|
+
command awk -v kind="${2}" '
|
|
95
95
|
{ for (i = 1; i <= NF; i++) {
|
|
96
96
|
b = $i + 0; n++;
|
|
97
97
|
if (b == 0) bad = 1;
|
|
@@ -183,7 +183,7 @@ Each iteration operates under full project rules — no relaxation because FSD i
|
|
|
183
183
|
| R015 (intent persistence) | If user explicitly defers a specific PR this session, honor that deferral — do not retry it. |
|
|
184
184
|
| R017 (sync verification) | mgr-sauron passes required before any commit. |
|
|
185
185
|
| R020 (completion verification) | Each release verified via `npm view`, `gh release view`, closed issues before `[Done]`. PR merges verified via `gh pr view` ground-truth before declaring iteration complete. |
|
|
186
|
-
| cost-cap advisory (`cost-cap-advisor.sh`, Conversation Block) | FSD는 사용자가 명시 호출한 다중 릴리즈 루프라 세션 비용이 상한(기본
|
|
186
|
+
| cost-cap advisory (`cost-cap-advisor.sh`, Conversation Block) | FSD는 사용자가 명시 호출한 다중 릴리즈 루프라 세션 비용이 상한(기본 USD 5)을 필연적으로 넘는다. advisory 발화는 루프를 멈추는 신호가 아니며, 오케스트레이터는 발화 사실과 누적 비용을 반복 경계(homework 게이트)에서 사용자에게 고지한다. 상한을 올리려면 `CLAUDE_COST_CAP`(v1.1.61 세션 실측: 착수 직후 USD 5.38에서 발화). |
|
|
187
187
|
|
|
188
188
|
`/homework` runs as a **retrospective gate** between iterations — findings go through `omcustom-feedback`'s Phase 4A confirmation gate. The loop does NOT skip homework on the grounds that it is "automated". If homework requires user confirmation (e.g., to file a feedback issue), the loop pauses and waits.
|
|
189
189
|
|
|
@@ -241,7 +241,7 @@ That session ran 2 iterations (v0.177.0 and v0.178.0) before converging with 0 e
|
|
|
241
241
|
| Skill / Rule | Role |
|
|
242
242
|
|--------------|------|
|
|
243
243
|
| `goal` | Disciplined goal-to-execution wrapper — objective parse, gap detection, R020 verification |
|
|
244
|
-
| `omcustom-loop` |
|
|
244
|
+
| `omcustom-loop` | SubagentStop command hooks (outcome recording and advisories only) — no orchestrator-workflow continuation; these hooks do not wake an idle model (no `asyncRewake` configured in `.claude/hooks/hooks.json` or `.claude/settings.json`) and `auto-continue-guard.sh` has no `exit 2` statement (its only explicit exit is `exit 0`), echoes the payload, and the CC 2.1.310 SubagentStop payload has no top-level `decision`/`continue` key (#1880 L2), so it does not block |
|
|
245
245
|
| `pipeline` | `/pipeline auto-dev` — the core release pipeline per iteration |
|
|
246
246
|
| `homework` | Retrospective 찐빠 audit gate per iteration |
|
|
247
247
|
| `mgr-gitnerd` | PR merge operations — all open PR merges delegated here (R010) |
|
|
@@ -256,12 +256,12 @@ That session ran 2 iterations (v0.177.0 and v0.178.0) before converging with 0 e
|
|
|
256
256
|
|
|
257
257
|
This skill is intentionally a **thin alias**. It does NOT duplicate:
|
|
258
258
|
- Issue polling logic (owned by `pipeline`)
|
|
259
|
-
- Loop cadence
|
|
259
|
+
- Loop cadence (no SubagentStop-hook-driven continuation of the orchestrator loop — the orchestrator drives each next step; `omcustom-loop`'s SubagentStop hooks only record outcomes and emit advisories)
|
|
260
260
|
- Release pipeline steps (owned by `pipeline auto-dev`)
|
|
261
261
|
- Retrospective analysis (owned by `homework`)
|
|
262
262
|
- PR merge execution (owned by `mgr-gitnerd`)
|
|
263
263
|
- Completion verification (owned by R020 + `goal`)
|
|
264
|
-
- Loop driving itself — the main conversation may run the iteration inline (see 「인라인 실행 허용」); `goal
|
|
264
|
+
- Loop driving itself — the main conversation may run the iteration inline (see 「인라인 실행 허용」); `goal`/`/loop` are optional expressions of the same contract; `omcustom-loop` hooks are advisory only
|
|
265
265
|
|
|
266
266
|
If any of those underlying skills evolve, FSD automatically benefits — its only responsibility is declaring the intent and forwarding to the right components.
|
|
267
267
|
|
|
@@ -33,7 +33,7 @@ eliminating the external CronJob dependency for user-invoked runs.
|
|
|
33
33
|
2. Agent evaluates each title against oh-my-customcode's domain (see prompt template below)
|
|
34
34
|
3. Returns relevance score (0–100) and a 1-line reason for each item
|
|
35
35
|
4. Threshold: ≥ 60 passes to Phase 3 (configurable via `--threshold` or `HADA_SCOUT_THRESHOLD`)
|
|
36
|
-
5. Cost:
|
|
36
|
+
5. Cost: ~USD 0.01–0.05 for 50 items
|
|
37
37
|
|
|
38
38
|
### Phase 3 — Scout Dispatch
|
|
39
39
|
|
|
@@ -50,7 +50,7 @@ The haiku agent receives the following system prompt:
|
|
|
50
50
|
|
|
51
51
|
```
|
|
52
52
|
You are a relevance filter for the oh-my-customcode project — an AI agent harness/orchestration
|
|
53
|
-
system built on Claude Code CLI with 50 agents,
|
|
53
|
+
system built on Claude Code CLI with 50 agents, 114 skills.
|
|
54
54
|
|
|
55
55
|
Project domains (HIGH relevance):
|
|
56
56
|
- AI agent orchestration, multi-agent systems, agent design patterns
|
|
@@ -105,9 +105,9 @@ Items:
|
|
|
105
105
|
|
|
106
106
|
| Stage | Model | Estimated Cost |
|
|
107
107
|
|-------|-------|----------------|
|
|
108
|
-
| Pre-scout (Phase 2) | haiku |
|
|
109
|
-
| Full scout (Phase 3) | sonnet |
|
|
110
|
-
| Total max per invocation | — |
|
|
108
|
+
| Pre-scout (Phase 2) | haiku | ~USD 0.01–0.05 per run (50 items) |
|
|
109
|
+
| Full scout (Phase 3) | sonnet | ~USD 0.5–1.5 per item, max 5 per run |
|
|
110
|
+
| Total max per invocation | — | ~USD 8 |
|
|
111
111
|
|
|
112
112
|
## Environment Variables
|
|
113
113
|
|
|
@@ -135,7 +135,7 @@ Items:
|
|
|
135
135
|
| Filtering | Regex keyword match | LLM relevance scoring (haiku) |
|
|
136
136
|
| Invocation | External CronJob only | User-invocable `/hada-scout` + CronJob |
|
|
137
137
|
| Precision | Low (keyword false positives) | High (context-aware scoring) |
|
|
138
|
-
| Cost per scan |
|
|
138
|
+
| Cost per scan | USD 0 (regex) + USD 2.5–7.5 (/scout) | USD 0.05 (pre-scout) + USD 2.5–7.5 (/scout) |
|
|
139
139
|
| False positive rate | ~30–40% | ~5–10% |
|
|
140
140
|
| Scope | `package` | `core` |
|
|
141
141
|
|
|
@@ -151,9 +151,9 @@ byte_dump=$(mktemp /tmp/omcustom-gh-byte-dump.XXXXXX) || exit 1
|
|
|
151
151
|
trap 'command rm -f -- "$byte_dump"' 0
|
|
152
152
|
trap 'exit 1' HUP INT TERM
|
|
153
153
|
check_file() {
|
|
154
|
-
[ -f "$1" ] || return 1
|
|
155
|
-
command od -A n -v -t u1 "$1" > "$byte_dump" || return 1
|
|
156
|
-
command awk -v kind="$2" '
|
|
154
|
+
[ -f "${1}" ] || return 1
|
|
155
|
+
command od -A n -v -t u1 "${1}" > "$byte_dump" || return 1
|
|
156
|
+
command awk -v kind="${2}" '
|
|
157
157
|
{ for (i = 1; i <= NF; i++) {
|
|
158
158
|
b = $i + 0; n++;
|
|
159
159
|
if (b == 0) bad = 1;
|
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: omcustom-loop
|
|
3
|
-
description:
|
|
3
|
+
description: SubagentStop advisory hooks during background agent work (outcome recording, consecutive-completion advisory; no orchestrator-workflow continuation)
|
|
4
4
|
scope: core
|
|
5
5
|
version: 1.0.0
|
|
6
6
|
user-invocable: true
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# /omcustom-loop —
|
|
9
|
+
# /omcustom-loop — SubagentStop Advisory Hooks
|
|
10
10
|
|
|
11
11
|
## Overview
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
When background subagents complete, `SubagentStop` command hooks record outcomes, count consecutive completions, and emit advisories; none of them continues the orchestrator's workflow. History: the "check pending steps" instruction was dropped from the prompt hook in v1.1.32 (commit 1dd0abef), and the remaining failure-gate prompt hook was replaced by an advisory command hook in d393db06 (#1631).
|
|
14
14
|
|
|
15
15
|
## How It Works
|
|
16
16
|
|
|
17
17
|
1. When a background subagent completes, Claude Code fires the `SubagentStop` event
|
|
18
|
-
2. The
|
|
19
|
-
3.
|
|
20
|
-
4. If no
|
|
18
|
+
2. The command hooks run: `task-outcome-recorder.sh` (records an outcome entry, but SubagentStop exposes no failure signal, so entries are always outcome=success; script comment lines 30-34), `stall-detection-advisor.sh` (stderr advisory on stalled parallel agents; stderr on exit 0 is visible to humans in transcript/debug, not fed to the model), `auto-continue-guard.sh` (counts consecutive completions), `r007-r008-drift-advisor.sh` (R007/R008 drift advisory), `subagent-failure-advisor.sh` (reads `.tool_output.is_error`, which is absent from the SubagentStop payload, so its warning can never trigger on this path until #1656 G (closed unfixed; tracked in #1775); script comment lines 30-34 of `task-outcome-recorder.sh` and line 22 of the advisor)
|
|
19
|
+
3. None of them continues the orchestrator's workflow; the orchestrator decides the next workflow step itself from the returned results. Exception: when `r007-r008-drift-advisor.sh` emits an advisory on SubagentStop, CC delivers the `additionalContext` to the stopping subagent, which continues its turn to respond (CHANGELOG 2.1.163).
|
|
20
|
+
4. If no steps remain, it reports results and waits for user input
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Consecutive-Completion Advisory
|
|
23
23
|
|
|
24
|
-
- **
|
|
25
|
-
- **stuck-detector integration**: If the same action repeats 3+ times, stuck-detector intervenes
|
|
26
|
-
- **cost-cap-advisor**: Cost monitoring
|
|
24
|
+
- **Consecutive-completion counter**: `auto-continue-guard.sh` counts SubagentStop events (counter resets after 60s idle); from the 4th completion onward within the window (count >= 4) it prints a stderr line "limit (3) reached. Pausing." (human-visible only, not a model-visible signal; among these five SubagentStop hooks only `r007-r008-drift-advisor.sh` uses `additionalContext`) and its script contains no `exit 2` statement (its only explicit exit is `exit 0`); it echoes the input payload to stdout, and the CC 2.1.310 SubagentStop payload has no top-level `decision`/`continue` key (measured by a reviewer from the binary's payload builder), so it does not block
|
|
25
|
+
- **stuck-detector integration**: If the same action repeats 3+ times, the independent PostToolUse stuck-detector hook intervenes
|
|
26
|
+
- **cost-cap-advisor**: Cost monitoring is independent of these hooks
|
|
27
27
|
|
|
28
28
|
## Configuration
|
|
29
29
|
|
|
30
|
-
The
|
|
30
|
+
The hooks are configured in `.claude/hooks/hooks.json` under `SubagentStop`. All five hooks are `type: command` and advisory (none contains an `exit 2` statement or emits a `decision`/`continue` field outside comments, so none blocks; the grep pattern covered `exit 2`, `"decision"`, `decision:`, `"continue"` and hit only comments in `r007-r008-drift-advisor.sh`. Four of the five hooks echo the CC payload to stdout, which carries no top-level `decision`/`continue` key in CC 2.1.310. The drift advisor's `additionalContext` makes the stopping subagent continue its own turn; that continuation is not a block).
|
|
31
31
|
|
|
32
32
|
## Limitations
|
|
33
33
|
|
|
34
|
-
- **Platform constraint**: Claude Code's turn-based model means
|
|
35
|
-
- **Foreground agents preferred**:
|
|
36
|
-
- **PoC status**: This is an experimental feature.
|
|
34
|
+
- **Platform constraint**: Claude Code's turn-based model means these SubagentStop command hooks only fire when a subagent completes — none of them wakes the model from true idle state (no `asyncRewake` is configured: `grep -c asyncRewake` = 0 in both `.claude/hooks/hooks.json` and `.claude/settings.json`), and none of them continues the orchestrator's workflow
|
|
35
|
+
- **Foreground agents preferred**: These hooks do not guarantee continuation; use foreground parallel agents (R009) instead of background agents
|
|
36
|
+
- **PoC status**: This is an experimental feature. These hooks only record and advise; prefer foreground agent patterns when you need deterministic follow-up
|
|
37
37
|
|
|
38
38
|
## Usage
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
/omcustom-loop #
|
|
42
|
-
/omcustom-loop status # Same as above
|
|
41
|
+
/omcustom-loop # Skill entry point (no status command exists; the consecutive-completion counter lives in /tmp/.claude-loop-count-${PPID})
|
|
43
42
|
```
|
|
44
43
|
|
|
45
|
-
The
|
|
44
|
+
The hooks are active by default: `.claude/hooks/hooks.json` is the source, and Claude Code loads the generated `.claude/settings.json` in this repo (R021); installed projects get the wiring merged into `.claude/settings.local.json` when the hooks component is installed (`src/core/installer.ts` returns early if `hooks.json` is absent). No explicit activation needed.
|
|
@@ -1009,7 +1009,7 @@ steps:
|
|
|
1009
1009
|
찐빠 #3).
|
|
1010
1010
|
- Delegations that create files, binaries, worktrees, or branches (artifact-creating
|
|
1011
1011
|
delegations only — text-only edits are excluded) MUST include measured output in their
|
|
1012
|
-
completion report — `file <bin>` for binaries, `ls -la <path>` for created paths, `git
|
|
1012
|
+
completion report — `file <bin>` for binaries, `ls -la <path>` for created paths (the orchestrator re-runs `ls -la` itself, R006 #1858), `git
|
|
1013
1013
|
worktree list` for worktrees, `git branch --list` for branches, as applicable — and the
|
|
1014
1014
|
orchestrator MUST confirm architecture/path from that measured output before using the
|
|
1015
1015
|
artifact, not from the agent's self-report alone (R020 Subagent Self-Report
|
|
@@ -1115,6 +1115,21 @@ steps:
|
|
|
1115
1115
|
지정합니다 — 원문에 있는지와 이 버전의 원문인지를 같은 검사로 취급하면 다른 버전
|
|
1116
1116
|
문장이 섞여도 통과하므로, #1757 찐빠 #4).
|
|
1117
1117
|
For a bundled multi-version note (R017 「묶음 버전 노트 위임서 — 문장별 (NNN) 태그와 합쇼체 예시」), cut one section file per version and verify each quote against its own version's file.
|
|
1118
|
+
- The FIRST drafting delegation of a `claude-code-release` CC-note (and of any document
|
|
1119
|
+
that makes many repository-impact claims — i.e. whose sentences assert repository facts,
|
|
1120
|
+
counts, or absences) MUST include, as a completion criterion, an exclusive/universal-claim
|
|
1121
|
+
sweep over its own new text; every later correction delegation that adds new claim
|
|
1122
|
+
sentences MUST run the same sweep over those sentences: find every exclusive or universal
|
|
1123
|
+
claim (keywords such as 뿐, 만, 전부, 모두, 0건, 없습니다, "only", "all", "none", and
|
|
1124
|
+
enumerations presented as complete) and give each exactly one of three treatments —
|
|
1125
|
+
(1) attach the full measuring command with its pathspec, (2) narrow it to
|
|
1126
|
+
"관측한 범위(<full literal command>)", or (3) tag it [가설]. Occurrences inside quoted
|
|
1127
|
+
source text (e.g. CHANGELOG quotations) or their translations are excluded from the
|
|
1128
|
+
verdict. The completion report MUST list each swept claim with its treatment and, for
|
|
1129
|
+
every cited command, name its grep blind spots (e.g. line continuations, commands invoked
|
|
1130
|
+
through a variable binary, case/hyphen variants, files outside the pathspec, text inside
|
|
1131
|
+
HTML `<!-- DETAIL -->` comments) (배타·전칭 서술이 반례 하나로 깨지는 리뷰 지적 계열
|
|
1132
|
+
방지 — v2.0.2 라운드 2에 스윕 도입 후 다음 리뷰의 신규 Medium 이상 11→4, #1860).
|
|
1118
1133
|
- Any delegation correcting a fact (the issue states an existing statement in a target file
|
|
1119
1134
|
is wrong) — not only `claude-code-release` CC-notes — MUST include, as a completion
|
|
1120
1135
|
criterion, an exhaustive `grep` across the target file(s) for the claim's key terms (the terms in a file written with the Write tool, run through the quote-verify block of the fixed constraint (c) as a search, not a pass/fail check), not
|
|
@@ -97,9 +97,9 @@ byte_dump=$(mktemp /tmp/omcustom-gh-byte-dump.XXXXXX) || exit 1
|
|
|
97
97
|
trap 'command rm -f -- "$byte_dump"' 0
|
|
98
98
|
trap 'exit 1' HUP INT TERM
|
|
99
99
|
check_file() {
|
|
100
|
-
[ -f "$1" ] || return 1
|
|
101
|
-
command od -A n -v -t u1 "$1" > "$byte_dump" || return 1
|
|
102
|
-
command awk -v kind="$2" '
|
|
100
|
+
[ -f "${1}" ] || return 1
|
|
101
|
+
command od -A n -v -t u1 "${1}" > "$byte_dump" || return 1
|
|
102
|
+
command awk -v kind="${2}" '
|
|
103
103
|
{ for (i = 1; i <= NF; i++) {
|
|
104
104
|
b = $i + 0; n++;
|
|
105
105
|
if (b == 0) bad = 1;
|
|
@@ -231,9 +231,9 @@ byte_dump=$(mktemp /tmp/omcustom-gh-byte-dump.XXXXXX) || exit 1
|
|
|
231
231
|
trap 'command rm -f -- "$byte_dump"' 0
|
|
232
232
|
trap 'exit 1' HUP INT TERM
|
|
233
233
|
check_file() {
|
|
234
|
-
[ -f "$1" ] || return 1
|
|
235
|
-
command od -A n -v -t u1 "$1" > "$byte_dump" || return 1
|
|
236
|
-
command awk -v kind="$2" '
|
|
234
|
+
[ -f "${1}" ] || return 1
|
|
235
|
+
command od -A n -v -t u1 "${1}" > "$byte_dump" || return 1
|
|
236
|
+
command awk -v kind="${2}" '
|
|
237
237
|
{ for (i = 1; i <= NF; i++) {
|
|
238
238
|
b = $i + 0; n++;
|
|
239
239
|
if (b == 0) bad = 1;
|
|
@@ -285,9 +285,9 @@ byte_dump=$(mktemp /tmp/omcustom-gh-byte-dump.XXXXXX) || exit 1
|
|
|
285
285
|
trap 'command rm -f -- "$byte_dump"' 0
|
|
286
286
|
trap 'exit 1' HUP INT TERM
|
|
287
287
|
check_file() {
|
|
288
|
-
[ -f "$1" ] || return 1
|
|
289
|
-
command od -A n -v -t u1 "$1" > "$byte_dump" || return 1
|
|
290
|
-
command awk -v kind="$2" '
|
|
288
|
+
[ -f "${1}" ] || return 1
|
|
289
|
+
command od -A n -v -t u1 "${1}" > "$byte_dump" || return 1
|
|
290
|
+
command awk -v kind="${2}" '
|
|
291
291
|
{ for (i = 1; i <= NF; i++) {
|
|
292
292
|
b = $i + 0; n++;
|
|
293
293
|
if (b == 0) bad = 1;
|
|
@@ -34,7 +34,7 @@ Orchestrates 10 parallel research teams for comprehensive deep analysis of any t
|
|
|
34
34
|
|
|
35
35
|
## Pre-flight Guards
|
|
36
36
|
|
|
37
|
-
Before executing the 10-team research workflow, the agent MUST run these checks. Research is a high-cost operation (
|
|
37
|
+
Before executing the 10-team research workflow, the agent MUST run these checks. Research is a high-cost operation (~USD 8-15) — these guards prevent wasteful execution.
|
|
38
38
|
|
|
39
39
|
### Guard Levels
|
|
40
40
|
|
|
@@ -67,7 +67,7 @@ indicators_complex:
|
|
|
67
67
|
- Query references a repository or ecosystem for deep analysis
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
**Action (GATE)**: `[Pre-flight] GATE: Query appears to be a simple factual question. Use direct answer or single WebSearch instead. 10-team research (
|
|
70
|
+
**Action (GATE)**: `[Pre-flight] GATE: Query appears to be a simple factual question. Use direct answer or single WebSearch instead. 10-team research (~USD 8-15) would be wasteful. Override with /research --force if intended.`
|
|
71
71
|
|
|
72
72
|
### Guard 2: Single-File Review Detection
|
|
73
73
|
|
|
@@ -128,7 +128,7 @@ fi
|
|
|
128
128
|
├── Known solution: PASS
|
|
129
129
|
└── Context budget: WARN — context at 45%, research adds ~35%
|
|
130
130
|
Result: PROCEED WITH CAUTION (0 GATE, 1 WARN, 0 INFO)
|
|
131
|
-
Cost estimate:
|
|
131
|
+
Cost estimate: ~USD 8-15 for 10-team parallel research
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
If any GATE: block and suggest alternative. User can override with `--force`.
|
|
@@ -407,7 +407,7 @@ Before execution:
|
|
|
407
407
|
|
|
408
408
|
Estimated: {time} | Teams: 10 | Models: sonnet → opus
|
|
409
409
|
Stopping: max 30 verification rounds, convergence at 0 contradictions
|
|
410
|
-
Cost:
|
|
410
|
+
Cost: ~USD 8-15 (10 teams × sonnet + opus verification)
|
|
411
411
|
Execute? [Y/n]
|
|
412
412
|
```
|
|
413
413
|
|
|
@@ -464,7 +464,7 @@ Agent(
|
|
|
464
464
|
|
|
465
465
|
- Each Teams member running research still respects R009 (max 4 concurrent sub-agents)
|
|
466
466
|
- Batching order remains: T1-T4 → T5-T8 → T9-T10
|
|
467
|
-
- Cost is identical to orchestrator mode (
|
|
467
|
+
- Cost is identical to orchestrator mode (~USD 8-15 per research invocation)
|
|
468
468
|
- Multiple Teams members running research simultaneously will multiply costs proportionally
|
|
469
469
|
|
|
470
470
|
## Integration
|
|
@@ -74,7 +74,7 @@ Before execution, show the plan:
|
|
|
74
74
|
├── Phase 3: 적합성 분석 (sonnet)
|
|
75
75
|
└── Phase 4: 이슈 생성
|
|
76
76
|
|
|
77
|
-
예상: ~1분 | 비용:
|
|
77
|
+
예상: ~1분 | 비용: ~USD 0.5-1.5
|
|
78
78
|
실행하시겠습니까? [Y/n]
|
|
79
79
|
```
|
|
80
80
|
|
|
@@ -185,9 +185,9 @@ byte_dump=$(mktemp /tmp/omcustom-gh-byte-dump.XXXXXX) || exit 1
|
|
|
185
185
|
trap 'command rm -f -- "$byte_dump"' 0
|
|
186
186
|
trap 'exit 1' HUP INT TERM
|
|
187
187
|
check_file() {
|
|
188
|
-
[ -f "$1" ] || return 1
|
|
189
|
-
command od -A n -v -t u1 "$1" > "$byte_dump" || return 1
|
|
190
|
-
command awk -v kind="$2" '
|
|
188
|
+
[ -f "${1}" ] || return 1
|
|
189
|
+
command od -A n -v -t u1 "${1}" > "$byte_dump" || return 1
|
|
190
|
+
command awk -v kind="${2}" '
|
|
191
191
|
{ for (i = 1; i <= NF; i++) {
|
|
192
192
|
b = $i + 0; n++;
|
|
193
193
|
if (b == 0) bad = 1;
|
|
@@ -297,7 +297,7 @@ When verdict is `INTERNALIZE` and integration effort is M or L:
|
|
|
297
297
|
|--------|--------|-----------|
|
|
298
298
|
| Purpose | Quick fit evaluation | Deep multi-dimensional analysis |
|
|
299
299
|
| Teams | 1 agent | 10 teams |
|
|
300
|
-
| Cost |
|
|
300
|
+
| Cost | ~USD 0.5-1.5 | ~USD 8-15 |
|
|
301
301
|
| Duration | 1-2 min | 10-20 min |
|
|
302
302
|
| Output | Issue with verdict | Full report with ADOPT/ADAPT/AVOID |
|
|
303
303
|
| When | First contact with new link | Deep dive after scout recommends |
|
|
@@ -23,7 +23,7 @@ LangChain의 Deep Agents 평가 방법론은 "More evals ≠ better agents" 철
|
|
|
23
23
|
|
|
24
24
|
### oh-my-customcode 맥락
|
|
25
25
|
|
|
26
|
-
oh-my-customcode의 에이전트 시스템은 50개 전문 에이전트와
|
|
26
|
+
oh-my-customcode의 에이전트 시스템은 50개 전문 에이전트와 114개 스킬로 구성된다. 이 방법론은 신규 에이전트 검증(mgr-creator), 릴리즈 품질 검증(deep-verify), 반복 개선 루프(evaluator-optimizer)에 정량 차원을 추가하는 수단으로 내재화된다.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
@@ -53,6 +53,10 @@ description: Brief description of what this Skill does and when to use it
|
|
|
53
53
|
- 비어 있지 않아야 함
|
|
54
54
|
- 최대 1024자
|
|
55
55
|
|
|
56
|
+
### 위치 인자 `$N` 치환 (#1879)
|
|
57
|
+
|
|
58
|
+
Claude Code 2.1.310에서 스킬을 인자 3개(`alpha beta gamma`)와 함께 호출해 관측한 결과, `SKILL.md` 안의 인자 범위 안의 인덱스(이번 관측 `$0`~`$2`)는 펜스 코드 블록, 큰따옴표, 함수 본문, 산문에서 인자 값으로 치환되었습니다(`"$1"` → `"beta"`). `${1}` 표기는 치환되지 않았고, 두 번째 관측(스킬 도구로 omcustom-feedback을 인자 `alpha beta gamma`와 함께 로드, CC 2.1.310)에서도 `"${1}"`, `[ -f "${1}" ]`, `kind="${2}"`가 리터럴로 남았으므로, 스킬의 셸 코드에서는 위치 매개변수를 `${1}`로 쓰십시오. 범위를 벗어난 인덱스(`$3`~`$9`)와 인자 없는 호출은 치환되지 않았고, `$10`도 3개 인자 호출에서는 리터럴로 남았습니다(한 자리 숫자만 인식하는지는 확정하지 못했습니다 [가설]). 인자가 있는 호출에서는 산문의 `$5` 같은 금액 표기도 같은 규칙으로 치환될 수 있으므로, 금액은 `USD 5`처럼 쓰는 것을 권장합니다.
|
|
59
|
+
|
|
56
60
|
## 사용 가능한 Skills
|
|
57
61
|
|
|
58
62
|
### 사전 구축된 Agent Skills
|