oh-my-customcode 0.104.1 → 0.105.0
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 +5 -5
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/rules/MUST-agent-design.md +25 -0
- package/templates/.claude/rules/MUST-continuous-improvement.md +9 -7
- package/templates/.claude/rules/SHOULD-ecomode.md +45 -0
- package/templates/.claude/skills/action-validator/SKILL.md +40 -0
- package/templates/.claude/skills/adaptive-harness/SKILL.md +4 -0
- package/templates/.claude/skills/diagram-design/SKILL.md +45 -0
- package/templates/.claude/skills/harness-eval/SKILL.md +4 -0
- package/templates/.claude/skills/harness-synthesizer/SKILL.md +4 -0
- package/templates/.claude/skills/result-aggregation/SKILL.md +25 -0
- package/templates/.claude/skills/skill-extractor/SKILL.md +28 -0
- package/templates/CLAUDE.md +2 -2
- package/templates/guides/browser-automation/02-lightweight-cdp-alternatives.md +109 -0
- package/templates/guides/external-tools/graphify-integration.md +88 -0
- package/templates/guides/harness-engineering/README.md +203 -0
- package/templates/manifest.json +3 -3
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
**[한국어 문서 (Korean)](./README_ko.md)**
|
|
15
15
|
|
|
16
|
-
48 agents.
|
|
16
|
+
48 agents. 113 skills. 22 rules. One command.
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npm install -g oh-my-customcode && cd your-project && omcustom init
|
|
@@ -132,7 +132,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
|
|
|
132
132
|
|
|
133
133
|
---
|
|
134
134
|
|
|
135
|
-
### Skills (
|
|
135
|
+
### Skills (113)
|
|
136
136
|
|
|
137
137
|
| Category | Count | Includes |
|
|
138
138
|
|----------|-------|----------|
|
|
@@ -222,7 +222,7 @@ Key rules: R010 (orchestrator never writes files), R009 (parallel execution mand
|
|
|
222
222
|
|
|
223
223
|
---
|
|
224
224
|
|
|
225
|
-
### Guides (
|
|
225
|
+
### Guides (42)
|
|
226
226
|
|
|
227
227
|
Reference documentation covering best practices, architecture decisions, and integration patterns. Located in `guides/` at project root, covering topics from agent design to CI/CD to observability.
|
|
228
228
|
|
|
@@ -272,14 +272,14 @@ your-project/
|
|
|
272
272
|
├── CLAUDE.md # Entry point
|
|
273
273
|
├── .claude/
|
|
274
274
|
│ ├── agents/ # 48 agent definitions
|
|
275
|
-
│ ├── skills/ #
|
|
275
|
+
│ ├── skills/ # 113 skill modules
|
|
276
276
|
│ ├── rules/ # 22 governance rules (R000-R021)
|
|
277
277
|
│ ├── hooks/ # 15 lifecycle hook scripts
|
|
278
278
|
│ ├── schemas/ # Tool input validation schemas
|
|
279
279
|
│ ├── specs/ # Extracted canonical specs
|
|
280
280
|
│ ├── contexts/ # 4 shared context files
|
|
281
281
|
│ └── ontology/ # Knowledge graph for RAG
|
|
282
|
-
└── guides/ #
|
|
282
|
+
└── guides/ # 42 reference documents
|
|
283
283
|
```
|
|
284
284
|
|
|
285
285
|
---
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -234,6 +234,31 @@ Skills persist output to `.claude/outputs/sessions/{YYYY-MM-DD}/{skill-name}-{HH
|
|
|
234
234
|
|
|
235
235
|
CC treats `.claude/` as a sensitive directory. The sensitive-path check runs **above** `bypassPermissions` and `Bash(*)` allow rules, so Bash-based file operations (`cp`, `mkdir`) on `.claude/` paths trigger permission prompts regardless of settings. Subagents and skills that modify `.claude/` files SHOULD prefer `Write`/`Edit` tools over `Bash(cp)`/`Bash(mkdir)`, and projects SHOULD add `Write(.claude/**)` and `Edit(.claude/**)` to `.claude/settings.local.json` allow list.
|
|
236
236
|
|
|
237
|
+
### Artifact Channel Protocol
|
|
238
|
+
|
|
239
|
+
에이전트 간 결과 핸드오프 시 **아티팩트 파일을 채널로 사용**하는 프로토콜. 기존 Artifact Output Convention의 경로 규약을 에이전트 통신 계약으로 승격합니다.
|
|
240
|
+
|
|
241
|
+
#### 원칙
|
|
242
|
+
|
|
243
|
+
| 원칙 | 내용 |
|
|
244
|
+
|------|------|
|
|
245
|
+
| Path-only transfer | 다음 에이전트에 전달할 때 **파일 경로만 전달**, 본문 inline 전달 금지 |
|
|
246
|
+
| Read-write 분리 | 생산 에이전트는 Write, 소비 에이전트는 Read (파일 경쟁 방지) |
|
|
247
|
+
| Session-scoped | 아티팩트는 세션 범위 — `{YYYY-MM-DD}` 디렉토리로 격리 |
|
|
248
|
+
| Single-writer | 한 아티팩트는 하나의 에이전트만 작성. 후속 에이전트는 새 아티팩트 생성 |
|
|
249
|
+
|
|
250
|
+
#### 사용 맥락
|
|
251
|
+
|
|
252
|
+
1. **Parallel agents → Aggregator**: N 병렬 에이전트가 각자 `skill-HHmmss.md` 작성 → aggregator가 N개 경로를 받아 단일 요약 생성
|
|
253
|
+
2. **Research → Planner**: research 에이전트가 findings를 아티팩트로 저장 → planner가 경로 참조로 계획 수립
|
|
254
|
+
3. **Pipeline steps**: 단계별 state를 파일 기반으로 체크포인트 (Tracker 패턴의 전단계)
|
|
255
|
+
|
|
256
|
+
#### 관련 규약
|
|
257
|
+
|
|
258
|
+
- R013 SHOULD-ecomode.md Deep Insight Context Handoff Pattern (per-agent budget + handoff protocol)
|
|
259
|
+
- `result-aggregation` 스킬 (channel read pattern 구현)
|
|
260
|
+
- R011 SHOULD-memory-integration.md (장기 persistence는 memory, 세션 handoff는 channel)
|
|
261
|
+
|
|
237
262
|
<!-- DETAIL: Artifact Output full spec
|
|
238
263
|
**Format**: Metadata header with `skill`, `date`, `query` fields, followed by skill output content.
|
|
239
264
|
**Rules**: Opt-in per skill, final subagent writes (R010 compliance), Write tool auto-creates parent directory (no Bash `mkdir` required — avoids `.claude/` sensitive-path prompt per #960/#961/#978), .claude/outputs/ is git-untracked, no indexing required.
|
|
@@ -26,13 +26,15 @@ Update the relevant rule rather than just acknowledging the violation.
|
|
|
26
26
|
|
|
27
27
|
## Defect Response Matrix
|
|
28
28
|
|
|
29
|
-
| Defect Type | Rule Update | Memory | Issue |
|
|
30
|
-
|
|
31
|
-
| Rule violation (agent behavior) | ✅ | — | — |
|
|
32
|
-
| CI/infra defect | — | ✅ | ✅ |
|
|
33
|
-
| Process gap (workflow hole) | ✅ | ✅ | ✅ |
|
|
34
|
-
| Repeatable system bug | — | ✅ | ✅ |
|
|
35
|
-
| Agent selection failure (wrong agent routed) | — | ✅ | — |
|
|
29
|
+
| Defect Type | Rule Update | Memory | Issue | Skill Promotion |
|
|
30
|
+
|-------------|:-----------:|:------:|:-----:|:---------------:|
|
|
31
|
+
| Rule violation (agent behavior) | ✅ | — | — | — |
|
|
32
|
+
| CI/infra defect | — | ✅ | ✅ | — |
|
|
33
|
+
| Process gap (workflow hole) | ✅ | ✅ | ✅ | ⚠️ (패턴 3회 이상 반복 시) |
|
|
34
|
+
| Repeatable system bug | — | ✅ | ✅ | ⚠️ (수정이 구조적일 경우, 일회성 아닐 때) |
|
|
35
|
+
| Agent selection failure (wrong agent routed) | — | ✅ | — | ✅ (라우팅 스킬 업데이트 후보) |
|
|
36
|
+
|
|
37
|
+
**Skill Promotion**: feedback memory가 동일 패턴으로 3회 이상 반복되면 "failure pattern"으로 승격. skill-extractor의 `--mode failure` 플래그로 스킬 후보 분석 가능 (Skillify 내재화, #972).
|
|
36
38
|
|
|
37
39
|
When CI failure, process gap, or repeatable system defect is found:
|
|
38
40
|
1. Record feedback memory (defend current session)
|
|
@@ -36,6 +36,22 @@ Ecomode: `[lang-golang-expert] ✓ src/main.go reviewed: 1 naming issue (handle_
|
|
|
36
36
|
|
|
37
37
|
Disable with: "ecomode off", "verbose mode", or "show full details".
|
|
38
38
|
|
|
39
|
+
## Pruning Transparency
|
|
40
|
+
|
|
41
|
+
When ecomode is active, report what was compressed so users can audit context decisions:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
[Pruned] {n} chunks, ~{tokens} tokens saved | Retained: {m} | Summarized: {k} | Dropped: {j}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
| When | Report |
|
|
48
|
+
|------|--------|
|
|
49
|
+
| After input context pruning | `[Pruned]` line in agent output |
|
|
50
|
+
| After output compression | `[Compressed]` line in batch summary |
|
|
51
|
+
| On request ("what was pruned?") | Full pruning ledger with chunk names |
|
|
52
|
+
|
|
53
|
+
Pruning transparency is advisory — it adds ~1 line per pruning event. Disable with "ecomode off" or "hide pruning".
|
|
54
|
+
|
|
39
55
|
## Input Context Pruning — Active removal of irrelevant content. See full spec via Read tool.
|
|
40
56
|
|
|
41
57
|
<!-- DETAIL: Input Context Pruning
|
|
@@ -110,6 +126,35 @@ The `context-budget-advisor.sh` hook monitors context usage and emits warnings w
|
|
|
110
126
|
- Context percentage from statusline data when available
|
|
111
127
|
-->
|
|
112
128
|
|
|
129
|
+
## Deep Insight Context Handoff Pattern — 에이전트 간 핸드오프 시 context window 한계를 극복하는 패턴. per-agent budget 할당 + artifact channel 전달. See full spec via Read tool.
|
|
130
|
+
|
|
131
|
+
<!-- DETAIL: Deep Insight Context Handoff Pattern
|
|
132
|
+
|
|
133
|
+
에이전트 간 핸드오프 시 context window 한계를 극복하기 위한 패턴. 기존 task-type threshold에 **per-agent budget** 차원을 추가합니다.
|
|
134
|
+
|
|
135
|
+
### Per-Agent Budget
|
|
136
|
+
|
|
137
|
+
| 상황 | 권장 할당 |
|
|
138
|
+
|------|----------|
|
|
139
|
+
| 오케스트레이터 (메인 대화) | 총 컨텍스트 40-50% |
|
|
140
|
+
| 전문가 서브에이전트 | 총 컨텍스트 20-30% per instance |
|
|
141
|
+
| 리서치 에이전트 (Explore) | 총 컨텍스트 10-20% per instance |
|
|
142
|
+
|
|
143
|
+
task-type threshold와 곱연산 — 예: research 40% × 전문가 30% = 실질 12% 할당.
|
|
144
|
+
|
|
145
|
+
### Handoff Protocol
|
|
146
|
+
|
|
147
|
+
1. **Inline transfer 금지** — 에이전트 간 결과 전달 시 본문을 직접 다음 에이전트 프롬프트에 포함하지 않음
|
|
148
|
+
2. **Artifact channel 사용** — 결과를 `.claude/outputs/sessions/{date}/{skill}-{HH}.md`에 저장, 다음 에이전트에는 경로만 전달 (R006 Artifact Channel Protocol)
|
|
149
|
+
3. **result-aggregation 스킬** — N개 에이전트 결과를 단일 요약으로 압축 후 후속 에이전트에 전달
|
|
150
|
+
|
|
151
|
+
### 참조
|
|
152
|
+
|
|
153
|
+
- R006 `MUST-agent-design.md` Artifact Channel Protocol (R013과 쌍으로 작동)
|
|
154
|
+
- `result-aggregation` 스킬 — channel 읽기 패턴
|
|
155
|
+
- `ecomode` + `cc-token-saver` Token Guardian 공존 (기존 섹션)
|
|
156
|
+
-->
|
|
157
|
+
|
|
113
158
|
## Token Guardian Coexistence — R013 context budget (usage-based) + cc-token-saver Token Guardian (time-based) can run simultaneously.
|
|
114
159
|
|
|
115
160
|
<!-- DETAIL: Token Guardian Coexistence (cc-token-saver)
|
|
@@ -57,16 +57,52 @@ policy_cache:
|
|
|
57
57
|
- tool: Bash
|
|
58
58
|
pattern: "git add *"
|
|
59
59
|
verdict: allow
|
|
60
|
+
hints: { safety: normal, parallel: false, approval: auto }
|
|
60
61
|
- tool: Bash
|
|
61
62
|
pattern: "git commit *"
|
|
62
63
|
verdict: allow
|
|
64
|
+
hints: { safety: normal, parallel: false, approval: auto }
|
|
63
65
|
- tool: Bash
|
|
64
66
|
pattern: "git push *"
|
|
65
67
|
verdict: warn_confirm
|
|
68
|
+
hints: { safety: low, parallel: false, approval: needs_approval }
|
|
66
69
|
```
|
|
67
70
|
|
|
68
71
|
Policy caching reduces redundant LLM calls for well-understood workflows. Policies are advisory — the orchestrator may override.
|
|
69
72
|
|
|
73
|
+
## Capability Hints (Opus 4.7+)
|
|
74
|
+
|
|
75
|
+
When agents target Opus 4.7 (`opus47` model alias), tool capability hints improve batched tool-call planning. Declare per-tool metadata in policy cache entries:
|
|
76
|
+
|
|
77
|
+
| Field | Values | Effect |
|
|
78
|
+
|-------|--------|--------|
|
|
79
|
+
| `safety` | `normal`, `low` | `low` triggers confirmation advisory |
|
|
80
|
+
| `parallel` | `true`, `false` | `true` allows concurrent scheduling |
|
|
81
|
+
| `approval` | `auto`, `needs_approval` | Maps to R002 permission tier |
|
|
82
|
+
|
|
83
|
+
### Example: Enhanced Policy Cache with Capability Hints
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
policy_cache:
|
|
87
|
+
agent: mgr-gitnerd
|
|
88
|
+
action: git-commit
|
|
89
|
+
validated_steps:
|
|
90
|
+
- tool: Bash
|
|
91
|
+
pattern: "git add *"
|
|
92
|
+
verdict: allow
|
|
93
|
+
hints: { safety: normal, parallel: false, approval: auto }
|
|
94
|
+
- tool: Bash
|
|
95
|
+
pattern: "git push *"
|
|
96
|
+
verdict: warn_confirm
|
|
97
|
+
hints: { safety: low, parallel: false, approval: needs_approval }
|
|
98
|
+
- tool: Read
|
|
99
|
+
pattern: "*"
|
|
100
|
+
verdict: allow
|
|
101
|
+
hints: { safety: normal, parallel: true, approval: auto }
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Hints are advisory — they inform model scheduling but do not enforce. Inspired by [ouroboros PR #353](https://github.com/Q00/ouroboros/pull/353) capability graph pattern.
|
|
105
|
+
|
|
70
106
|
## Code Harness Integration (AutoHarness)
|
|
71
107
|
|
|
72
108
|
When a synthesized harness exists for an agent (`.claude/outputs/harnesses/{agent-name}-*.yaml`), action-validator can use it for enhanced validation:
|
|
@@ -87,3 +123,7 @@ This skill is an advisory layer, not a hard enforcement mechanism:
|
|
|
87
123
|
- **Does**: Emit warnings, log scope violations, suggest corrections
|
|
88
124
|
- **Does NOT**: Block tool execution, modify agent behavior, override R021
|
|
89
125
|
- **Future**: May integrate with PreToolUse hooks for automated checking (see R021 promotion criteria)
|
|
126
|
+
|
|
127
|
+
## Related Guide
|
|
128
|
+
|
|
129
|
+
- `guides/harness-engineering/` — 하네스 엔지니어링 통합 가이드 (Behavior Control Layer 관점에서 action-validator 위치)
|
|
@@ -333,3 +333,7 @@ Reads the bundle and applies the `active_agents` list to the current project by
|
|
|
333
333
|
- The `.inactive/` directory is git-tracked so deactivation decisions are visible in history
|
|
334
334
|
- Manager and system agents are unconditionally protected from deactivation
|
|
335
335
|
- Target directory defaults to the project root where Claude Code is running, not the omcustom harness directory
|
|
336
|
+
|
|
337
|
+
## Related Guide
|
|
338
|
+
|
|
339
|
+
- `guides/harness-engineering/` — 하네스 엔지니어링 통합 가이드 (Project Profile Learning 관점에서 adaptive-harness 위치)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diagram-design
|
|
3
|
+
description: Brand-consistent editorial diagrams — SVG generation for release notes, architecture docs, and marketing materials
|
|
4
|
+
scope: package
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
source:
|
|
7
|
+
type: external
|
|
8
|
+
origin: github
|
|
9
|
+
url: https://github.com/cathrynlavery/diagram-design
|
|
10
|
+
version: main
|
|
11
|
+
user-invocable: true
|
|
12
|
+
allowed-tools: [Read, Write, Edit, Bash]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# diagram-design
|
|
16
|
+
|
|
17
|
+
## 목적
|
|
18
|
+
|
|
19
|
+
브랜드 일치 에디토리얼 다이어그램 생성. 릴리즈 노트, ARCHITECTURE.md, 슬라이드 인포그래픽 등 마케팅/문서용 SVG 다이어그램에 특화.
|
|
20
|
+
|
|
21
|
+
웹사이트의 디자인 시스템(팔레트·타이포그래피)을 자동 추출해 브랜드 일치 SVG 다이어그램 13종을 생성한다. 각 다이어그램은 3가지 변형(minimal light / minimal dark / full editorial)으로 제공된다. 빌드 단계·외부 의존성·Mermaid 없이 자립 동작한다.
|
|
22
|
+
|
|
23
|
+
## 담당 에이전트
|
|
24
|
+
|
|
25
|
+
- `arch-documenter` — 시스템 아키텍처 다이어그램 (Mermaid/PlantUML)과 경계 구분
|
|
26
|
+
- `fe-design-expert` — 브랜드 디자인 토큰 정합성 검토
|
|
27
|
+
|
|
28
|
+
## 사용
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/diagram-design <description>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 제약
|
|
35
|
+
|
|
36
|
+
- `scope: package` — 코어 스킬이 아닌 선택 등록 스킬 (기본 `init`에서 제외)
|
|
37
|
+
- 외부 업스트림 버전에 의존 — `mgr-updater`가 추적
|
|
38
|
+
- `mcp__eraser__`의 오프라인 대안으로 포지셔닝
|
|
39
|
+
|
|
40
|
+
## 참조
|
|
41
|
+
|
|
42
|
+
- `.claude/agents/fe-design-expert.md`
|
|
43
|
+
- `.claude/agents/arch-documenter.md`
|
|
44
|
+
- `guides/impeccable-design/` (관련 디자인 가이드)
|
|
45
|
+
- 내재화 배경: issue #963
|
|
@@ -93,3 +93,7 @@ Results saved to `.claude/outputs/sessions/{YYYY-MM-DD}/harness-eval-{HHmmss}.md
|
|
|
93
93
|
## Attribution
|
|
94
94
|
|
|
95
95
|
Evaluation framework based on research by [revfactory/claude-code-harness](https://github.com/revfactory/claude-code-harness). Adapted for oh-my-customcode's evaluator-optimizer pipeline with permission.
|
|
96
|
+
|
|
97
|
+
## Related Guide
|
|
98
|
+
|
|
99
|
+
- `guides/harness-engineering/` — 하네스 엔지니어링 통합 가이드 (Benchmark Evaluation Layer 관점에서 harness-eval 위치)
|
|
@@ -163,3 +163,28 @@ Agents Audited:
|
|
|
163
163
|
|
|
164
164
|
Summary: 5 agents checked, 1 warning
|
|
165
165
|
```
|
|
166
|
+
|
|
167
|
+
## Artifact Channel Read Pattern
|
|
168
|
+
|
|
169
|
+
R006 Artifact Channel Protocol을 소비하는 표준 패턴. 병렬 에이전트가 각자 `.claude/outputs/sessions/{date}/{skill}-{HHmmss}.md`에 결과를 작성하면, result-aggregation이 경로 N개를 받아 단일 요약을 생성합니다.
|
|
170
|
+
|
|
171
|
+
### 입력 형식
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
paths = [
|
|
175
|
+
".claude/outputs/sessions/2026-04-24/agent1-100200.md",
|
|
176
|
+
".claude/outputs/sessions/2026-04-24/agent2-100300.md",
|
|
177
|
+
...
|
|
178
|
+
]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 집계 규칙
|
|
182
|
+
|
|
183
|
+
1. 각 경로를 Read 도구로 읽음 (본문 inline 전달 금지 — R006 원칙 준수)
|
|
184
|
+
2. 파일별 요약 추출 (status + key findings)
|
|
185
|
+
3. 단일 요약으로 압축 — R013 ecomode Aggregation Format 재사용
|
|
186
|
+
|
|
187
|
+
### 참조
|
|
188
|
+
|
|
189
|
+
- R006 `MUST-agent-design.md` Artifact Channel Protocol (source contract)
|
|
190
|
+
- R013 `SHOULD-ecomode.md` Deep Insight Context Handoff Pattern (budget 맥락)
|
|
@@ -153,3 +153,31 @@ The `skill-extractor-analyzer.sh` Stop hook provides a lightweight pre-analysis:
|
|
|
153
153
|
- **Dry-run mode**: Preview without side effects
|
|
154
154
|
- **Advisory hook**: Stop hook is advisory-only (exit 0)
|
|
155
155
|
- **Confidence transparency**: All proposals show confidence scores
|
|
156
|
+
|
|
157
|
+
## --mode failure (Skillify Pattern)
|
|
158
|
+
|
|
159
|
+
feedback memory에 누적된 실패 패턴을 분석하여 영구 구조(스킬 또는 규칙 확장)로 전환하는 모드.
|
|
160
|
+
|
|
161
|
+
### 입력
|
|
162
|
+
|
|
163
|
+
- `.claude/agent-memory*/feedback_*.md` (누적된 실패 메모리)
|
|
164
|
+
- MEMORY.md의 Feedback Memories 섹션
|
|
165
|
+
|
|
166
|
+
### 처리
|
|
167
|
+
|
|
168
|
+
1. 각 feedback memory의 **Why/How to apply** 필드에서 공통 패턴 추출
|
|
169
|
+
2. 3회 이상 반복되는 패턴을 "failure candidate"로 격상
|
|
170
|
+
3. 후보 각각에 대해:
|
|
171
|
+
- 기존 스킬 확장으로 해결 가능? → 스킬 업데이트 제안
|
|
172
|
+
- 규칙 명문화가 더 적합? → R016 Matrix "Skill Promotion" 열에 등록
|
|
173
|
+
- 신규 스킬이 필요? → context fork cap (12/12) 여부 확인 후 제안
|
|
174
|
+
|
|
175
|
+
### 출력
|
|
176
|
+
|
|
177
|
+
`.claude/outputs/sessions/{date}/skill-extractor-failure-{HH}.md` 아티팩트 (R006 Artifact Channel Protocol)
|
|
178
|
+
|
|
179
|
+
### 참조
|
|
180
|
+
|
|
181
|
+
- R016 `MUST-continuous-improvement.md` Defect Response Matrix — Skill Promotion 열
|
|
182
|
+
- Skillify 내재화 배경: issue #972
|
|
183
|
+
- context fork cap: `.claude/rules/MUST-agent-design.md` Skill Frontmatter "Context Fork Criteria"
|
package/templates/CLAUDE.md
CHANGED
|
@@ -115,11 +115,11 @@ project/
|
|
|
115
115
|
+-- CLAUDE.md # 진입점
|
|
116
116
|
+-- .claude/
|
|
117
117
|
| +-- agents/ # 서브에이전트 정의 (48 파일)
|
|
118
|
-
| +-- skills/ # 스킬 (
|
|
118
|
+
| +-- skills/ # 스킬 (113 디렉토리)
|
|
119
119
|
| +-- rules/ # 전역 규칙 (R000-R022)
|
|
120
120
|
| +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
|
|
121
121
|
| +-- contexts/ # 컨텍스트 파일 (ecomode)
|
|
122
|
-
+-- guides/ # 레퍼런스 문서 (
|
|
122
|
+
+-- guides/ # 레퍼런스 문서 (42 토픽)
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
## 오케스트레이션
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Browser Automation Part 2: Lightweight CDP Alternatives
|
|
2
|
+
|
|
3
|
+
> oh-my-customcode의 browser automation 패턴 시리즈 Part 2
|
|
4
|
+
> Part 1: 01-browser-automation-patterns.md (Playwright 기반 무거운 스택)
|
|
5
|
+
|
|
6
|
+
## 배경
|
|
7
|
+
|
|
8
|
+
Part 1의 Playwright 기반 스택은 강력하지만 런타임/의존성 비용이 큽니다. scout #970 (Browser Harness: LLM이 직접 helpers.py를 확장하는 자기치유형 Chrome 자동화 프레임워크)에서 제시된 패턴은 **CDP 직접 제어 + LLM 자기치유** 조합으로 경량 대안을 제공합니다.
|
|
9
|
+
|
|
10
|
+
## 핵심 패턴
|
|
11
|
+
|
|
12
|
+
### 1. CDP 직접 제어 (Chrome DevTools Protocol)
|
|
13
|
+
|
|
14
|
+
Playwright/Puppeteer 없이 raw CDP 세션을 열어 브라우저를 제어하는 방식입니다. Python의 `pychrome`, Node의 `chrome-remote-interface` 같은 경량 클라이언트를 사용합니다.
|
|
15
|
+
|
|
16
|
+
**이점:**
|
|
17
|
+
- **번들 크기**: Playwright(~100MB 이상)를 제거하고 CDP 클라이언트 단일 패키지로 대체
|
|
18
|
+
- **Latency**: Playwright의 추상화 레이어를 건너뛰어 브라우저 명령 왕복이 짧아짐
|
|
19
|
+
- **디버깅 용이성**: CDP 메시지가 raw JSON이므로 로그에서 프로토콜 수준 트레이스 확인 가능
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
# CDP 직접 연결 예시 (pychrome)
|
|
23
|
+
import pychrome
|
|
24
|
+
|
|
25
|
+
browser = pychrome.Browser(url="http://127.0.0.1:9222")
|
|
26
|
+
tab = browser.new_tab()
|
|
27
|
+
tab.start()
|
|
28
|
+
tab.Network.enable()
|
|
29
|
+
tab.Page.navigate(url="https://example.com")
|
|
30
|
+
tab.wait(1)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**적합한 상황**: 커스텀 CDP 이벤트 리스닝(네트워크 인터셉트, 콘솔 스트리밍), 이미 Chrome이 `--remote-debugging-port`로 실행 중인 환경, Playwright 설치 불가 환경(컨테이너 크기 제한 등).
|
|
34
|
+
|
|
35
|
+
### 2. 자기치유 helpers.py 확장
|
|
36
|
+
|
|
37
|
+
Browser Harness 패턴의 핵심: LLM이 자동화 실패 시 `helpers.py` 파일에 새 헬퍼 함수를 직접 추가하거나 기존 함수를 수정하여 선택자 drift에 대응합니다.
|
|
38
|
+
|
|
39
|
+
**동작 원리:**
|
|
40
|
+
1. 에이전트가 특정 DOM 선택자(`#submit-btn`)로 클릭을 시도
|
|
41
|
+
2. 선택자 변경으로 실패 → CDP 에러 반환
|
|
42
|
+
3. LLM이 현재 페이지 DOM을 분석 → 새 선택자 추론
|
|
43
|
+
4. `helpers.py`에 `click_submit()` 함수를 수정/추가
|
|
44
|
+
5. 이후 같은 작업은 수정된 헬퍼를 재사용
|
|
45
|
+
|
|
46
|
+
이 패턴은 oh-my-customcode의 `harness-synthesizer`가 에이전트 액션을 사후 검증하고 verifier/filter/policy를 런타임 생성하는 개념과 **개념적 친화성**이 있습니다. harness-synthesizer가 에이전트 동작 제약을 합성하듯, Browser Harness는 브라우저 조작 함수를 합성합니다.
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
# helpers.py — LLM이 실패 시 자동으로 추가하는 패턴
|
|
50
|
+
def click_submit(tab):
|
|
51
|
+
# v1: 선택자 drift 전
|
|
52
|
+
# tab.Runtime.evaluate(expression='document.querySelector("#submit-btn").click()')
|
|
53
|
+
|
|
54
|
+
# v2: LLM이 DOM 분석 후 자동 수정
|
|
55
|
+
tab.Runtime.evaluate(
|
|
56
|
+
expression='document.querySelector("[data-testid=submit]").click()'
|
|
57
|
+
)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 3. 실패 복구 루프
|
|
61
|
+
|
|
62
|
+
CDP 에러 → LLM 분석 → helper 수정 → 재시도로 이어지는 자기치유 루프 구조입니다.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
CDP 에러 수신
|
|
66
|
+
↓
|
|
67
|
+
LLM: 에러 분류 (선택자 drift / 타임아웃 / 네트워크)
|
|
68
|
+
↓
|
|
69
|
+
├─ 선택자 drift → DOM 스냅샷 요청 → 새 선택자 추론 → helpers.py 수정
|
|
70
|
+
├─ 타임아웃 → 대기 전략 조정 → helpers.py wait 함수 수정
|
|
71
|
+
└─ 네트워크 → 재시도 backoff 조정 → helpers.py retry 정책 수정
|
|
72
|
+
↓
|
|
73
|
+
재시도 (최대 3회)
|
|
74
|
+
↓
|
|
75
|
+
성공 → helpers.py 변경 사항 커밋 (영구 학습)
|
|
76
|
+
실패 → 에러 보고 + 수동 개입 요청
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**재시도 한도**: 무한 루프 방지를 위해 최대 3회. 3회 실패 시 에러 컨텍스트를 포함한 상세 보고서 반환.
|
|
80
|
+
|
|
81
|
+
## oh-my-customcode 적용 가능성
|
|
82
|
+
|
|
83
|
+
| 요소 | 현재 자산 | Browser Harness 패턴 보강 |
|
|
84
|
+
|------|----------|-------------------------|
|
|
85
|
+
| 브라우저 자동화 | claude-in-chrome MCP, playwright-compress | 경량 CDP 대안 (옵션) |
|
|
86
|
+
| 자기치유 | harness-synthesizer (verifier/filter/policy) | LLM-driven helper mutation |
|
|
87
|
+
| 관찰/디버깅 | claude-in-chrome MCP 도구 | CDP raw session 제어 |
|
|
88
|
+
| 출력 압축 | playwright-compress (Layer 4) PostToolUse hook | CDP 이벤트 스트림 직접 필터링 |
|
|
89
|
+
|
|
90
|
+
## 통합 권고
|
|
91
|
+
|
|
92
|
+
- **현상 유지**: Playwright 기반 스택이 claude-in-chrome MCP + playwright-compress로 이미 성숙. 즉시 교체 불필요
|
|
93
|
+
- **조건부 채택**: CDP 직접 제어가 필요한 경우 (커스텀 프로토콜 검사, 극도의 경량화, 컨테이너 크기 제한) 이 가이드를 참고하여 별도 에이전트 구성
|
|
94
|
+
- **학습 채택**: 자기치유 루프 아이디어를 harness-synthesizer에 반영 가능 — verifier 모드에서 실패 패턴 감지 시 policy YAML을 런타임 갱신하는 방향으로 확장
|
|
95
|
+
|
|
96
|
+
## Deferred
|
|
97
|
+
|
|
98
|
+
- 실제 CDP 클라이언트 스킬 구현 (관심 축적 시 별도 이슈)
|
|
99
|
+
- harness-synthesizer의 자기치유 루프 확장 사례 (`guides/harness-engineering/` 와 연계)
|
|
100
|
+
- helpers.py mutation 기록을 `.claude/outputs/harnesses/` 에 영구 저장하는 컨벤션 정의
|
|
101
|
+
|
|
102
|
+
## 참조
|
|
103
|
+
|
|
104
|
+
- Part 1: `guides/browser-automation/01-browser-automation-patterns.md`
|
|
105
|
+
- `guides/harness-engineering/` — 하네스 엔지니어링 통합 가이드
|
|
106
|
+
- `.claude/skills/harness-synthesizer/SKILL.md`
|
|
107
|
+
- `claude-in-chrome` MCP tool (settings.json `mcpServers` 참고)
|
|
108
|
+
- [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) — CDP 공식 레퍼런스
|
|
109
|
+
- 내재화 배경: issue #970
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# graphify Integration Reference
|
|
2
|
+
|
|
3
|
+
> 외부 도구 graphify의 개요 및 oh-my-customcode 스택 관계
|
|
4
|
+
> 내재화 배경: issue #977 (scout:integrate)
|
|
5
|
+
|
|
6
|
+
## graphify 개요
|
|
7
|
+
|
|
8
|
+
graphify는 code/docs/paper corpus를 queryable knowledge graph로 전환하는 외부 도구입니다. Python 기반, 로컬 실행, 그래프 DB 백엔드 옵션 제공.
|
|
9
|
+
|
|
10
|
+
### 핵심 기능
|
|
11
|
+
|
|
12
|
+
| 기능 | 설명 |
|
|
13
|
+
|------|------|
|
|
14
|
+
| 엔티티 추출 | 소스 파일에서 함수, 클래스, 모듈, 개념, 용어 등 구조적 엔티티를 자동으로 식별 및 추출 |
|
|
15
|
+
| 관계 그래프 구축 | 추출된 엔티티 간 의존 관계, 참조 관계, 의미적 유사성을 방향성 그래프(DAG)로 모델링 |
|
|
16
|
+
| 쿼리 인터페이스 | Cypher 또는 SPARQL 유사 질의 언어로 그래프를 탐색 — "A를 참조하는 모든 모듈", "B 개념과 가장 가까운 엔티티 5개" 등 구조화 질의 지원 |
|
|
17
|
+
| 다중 corpus 지원 | 코드 저장소, 마크다운 문서, arXiv PDF 등 이종 소스를 단일 그래프로 통합 가능 |
|
|
18
|
+
| 백엔드 선택 | 인메모리(소규모), Neo4j(중대형), SQLite 기반 lightweight 옵션 중 선택 가능 |
|
|
19
|
+
|
|
20
|
+
## oh-my-customcode 기존 자산과의 관계
|
|
21
|
+
|
|
22
|
+
| 기능 | 기존 자산 | graphify 차별점 |
|
|
23
|
+
|------|----------|----------------|
|
|
24
|
+
| 코드베이스 검색 | Grep, Glob, Explore agent | 구조화된 엔티티-관계 질의 — 키워드 매칭이 아닌 그래프 트래버설 |
|
|
25
|
+
| 문서 검색 | wiki-rag (wiki/index.yaml) | 자동 엔티티 추출 + 외부 corpus(arXiv 논문 등) 포함 가능 |
|
|
26
|
+
| 온톨로지 | ontology-rag MCP | 외부 corpus 포함, 대규모 이종 소스 통합에 특화 |
|
|
27
|
+
| RAG enrichment | R019 dual-layer (Layer-1: ontology-rag, Layer-2: wiki-rag) | Layer-3 후보로 식별됨 — 통합 deferred |
|
|
28
|
+
|
|
29
|
+
### 현재 스택 위치
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
사용자 질의
|
|
33
|
+
↓
|
|
34
|
+
[Layer-1] ontology-rag MCP ← 내부 온톨로지 그래프 기반
|
|
35
|
+
↓
|
|
36
|
+
[Layer-2] wiki-rag (wiki/index.yaml) ← 프로젝트 위키 인덱스 기반
|
|
37
|
+
↓
|
|
38
|
+
에이전트 라우팅 결정
|
|
39
|
+
|
|
40
|
+
[Layer-3 후보] graphify ← 외부 corpus / 대규모 이종 소스 — 현재 deferred
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 통합 옵션
|
|
44
|
+
|
|
45
|
+
| 옵션 | 설명 | 상태 |
|
|
46
|
+
|------|------|------|
|
|
47
|
+
| A. 참고만 | graphify를 독립 도구로 유지, 필요 시 수동 활용 | 권고 (v0.105.0) |
|
|
48
|
+
| B. 외부 스킬 등록 | `scope: package` + `source.external`로 공식 통합 | v0.106.0+ 검토 |
|
|
49
|
+
| C. R019 Layer-3 통합 | ontology-rag/wiki-rag와 함께 라우팅 enrichment에 활용 | 별도 이슈 이관 |
|
|
50
|
+
|
|
51
|
+
### 옵션 B 스킬 등록 예시 (참고용)
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
# .claude/skills/graphify-query/SKILL.md 예시 (미생성)
|
|
55
|
+
---
|
|
56
|
+
name: graphify-query
|
|
57
|
+
description: Query graphify knowledge graph for entity-relationship exploration
|
|
58
|
+
scope: package
|
|
59
|
+
source:
|
|
60
|
+
type: external
|
|
61
|
+
origin: github
|
|
62
|
+
url: https://github.com/graphify/graphify
|
|
63
|
+
version: stable
|
|
64
|
+
---
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 권고
|
|
68
|
+
|
|
69
|
+
**현재 (v0.105.0)**: 옵션 A — 이 가이드를 reference로만 유지. 실제 통합은 사용 케이스 축적 후.
|
|
70
|
+
|
|
71
|
+
**조건부 격상 (v0.106.0+)**: 다음 조건 중 하나 충족 시 옵션 B 검토:
|
|
72
|
+
- 프로젝트 내 corpus가 1,000+ 파일 규모로 성장
|
|
73
|
+
- wiki-rag/ontology-rag 한계가 명확히 드러남 (false positive율 상승, 다중 corpus 질의 실패 등)
|
|
74
|
+
- graphify 업스트림이 안정화 (major version 출시)
|
|
75
|
+
|
|
76
|
+
## Deferred
|
|
77
|
+
|
|
78
|
+
- 실제 graphify 스킬 등록 (옵션 B) — 사용 케이스 축적 후 재평가
|
|
79
|
+
- R019 Layer-3 라우팅 enrichment 통합 (옵션 C) — 별도 이슈 등록 예정
|
|
80
|
+
- graphify query interface를 MCP 도구로 래핑 — ontology-rag MCP 패턴 참고
|
|
81
|
+
|
|
82
|
+
## 참조
|
|
83
|
+
|
|
84
|
+
- `.claude/skills/wiki/SKILL.md` — 위키 생성/유지 스킬 (Karpathy LLM Wiki 패턴)
|
|
85
|
+
- `.claude/skills/wiki-rag/SKILL.md` — wiki/index.yaml 기반 RAG 조회 스킬
|
|
86
|
+
- `.claude/skills/ontology-rag/SKILL.md` — ontology-rag MCP 기반 라우팅 enrichment
|
|
87
|
+
- `.claude/rules/SHOULD-ontology-rag-routing.md` — R019 dual-layer enrichment 규칙
|
|
88
|
+
- 내재화 배경: issue #977
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Harness Engineering
|
|
2
|
+
|
|
3
|
+
> Deep Insight 3부작 교훈을 oh-my-customcode 컴파일레이션 메타포와 정렬한 내재화 가이드
|
|
4
|
+
> 출처 내재화: #973 (Part 1), #974 (Part 2), #976 (Part 3)
|
|
5
|
+
|
|
6
|
+
## 목적
|
|
7
|
+
|
|
8
|
+
하네스 엔지니어링은 **에이전트의 행동 제어 + 인프라 격리**를 설계 1급 시민으로 끌어올리는 실천입니다. 단순 프롬프트 튜닝을 넘어, 에이전트가 (1) 자신의 능력을 선언하고 (2) 검증 가능한 경계 내에서 실행하며 (3) 상호 핸드오프할 수 있도록 하는 구조적 규율입니다.
|
|
9
|
+
|
|
10
|
+
oh-my-customcode는 이미 이 규율의 핵심 자산을 보유하고 있습니다. 본 가이드는 새 프리미티브를 도입하는 것이 아니라, 기존 에이전트·스킬·규칙이 하네스 엔지니어링이라는 공통 언어로 어떻게 연결되는지를 명문화합니다.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. 3-Layer Hierarchy (Part 1 내재화)
|
|
15
|
+
|
|
16
|
+
### 프로덕션 Multi-Agent 시스템의 5가지 반복 문제
|
|
17
|
+
|
|
18
|
+
외부 연구(Deep Insight #973)에서 추출한 패턴을 oh-my-customcode 맥락으로 재해석합니다.
|
|
19
|
+
|
|
20
|
+
| # | 문제 | oh-my-customcode 매핑 |
|
|
21
|
+
|---|------|----------------------|
|
|
22
|
+
| 1 | **오케스트레이터 오염** — 조율자가 직접 작업을 실행해 단일 책임 원칙 붕괴 | R010: 오케스트레이터는 파일 수정 금지. 서브에이전트에 위임 |
|
|
23
|
+
| 2 | **컨텍스트 압축 시 규칙 망각** — 컨텍스트 창 한계에서 MUST 규칙이 증발 | PostCompact hook이 R007/R008/R009/R010/R018을 재주입 |
|
|
24
|
+
| 3 | **비구조적 병렬 실행** — 독립 작업을 순차 실행해 지연 누적 | R009: 2+ 독립 태스크는 반드시 병렬. 최대 5 동시 인스턴스 |
|
|
25
|
+
| 4 | **핸드오프 불투명** — 에이전트 간 결과 전달 경로 불명확 | R015: 라우팅 의도 투명화. `[Intent Detected]` 형식 표시 |
|
|
26
|
+
| 5 | **능력 초과 행동** — 에이전트가 선언된 도구 범위 밖을 실행 | action-validator 스킬이 프리-플라이트 경계 검사 담당 |
|
|
27
|
+
|
|
28
|
+
### Coordinator / Planner / Supervisor / Executor 계층
|
|
29
|
+
|
|
30
|
+
Deep Insight가 제안하는 4계층 구조는 oh-my-customcode에 이미 구현되어 있습니다.
|
|
31
|
+
|
|
32
|
+
| 역할 | oh-my-customcode 매핑 | 핵심 책임 |
|
|
33
|
+
|------|----------------------|----------|
|
|
34
|
+
| **Coordinator** | 메인 대화 + routing skills | 요청 수신 → 에이전트 라우팅 → 결과 집약. R010에 따라 파일 수정 금지 |
|
|
35
|
+
| **Planner** | `deep-plan`, `release-plan`, `sdd-dev` | 작업 분해 → 의존성 분석 → 실행 순서 계획 |
|
|
36
|
+
| **Supervisor** | `mgr-sauron` (R017 검증) | 구조 정합성 검증. 커밋/푸시 전 필수 통과 관문 |
|
|
37
|
+
| **Executor** | 전문가 에이전트 (`lang-*`, `be-*`, `fe-*`, `infra-*` 등) | 단일 도메인 실행. 선언된 `tools` 프리미티브만 사용 |
|
|
38
|
+
|
|
39
|
+
계층 위반의 대표 패턴과 교정:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
# 위반: Coordinator가 직접 파일 수정
|
|
43
|
+
메인 대화 → Write(".claude/agents/new.md", content) ← R010 위반
|
|
44
|
+
|
|
45
|
+
# 교정: Executor에게 위임
|
|
46
|
+
메인 대화 → Agent(mgr-creator, mode: "bypassPermissions") → Write(".claude/agents/new.md", content)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Tracker 체크포인트 패턴 (v0.106.0+ 이관)
|
|
50
|
+
|
|
51
|
+
현재 파이프라인 상태 추적은 `/tmp/.claude-pipeline-{PID}.json` 파일과 `.claude/outputs/sessions/{YYYY-MM-DD}/` 아티팩트 규약으로 구현되어 있습니다. 전용 Tracker 에이전트(dag-orchestration / pipeline-guards 통합형)는 `context: fork` cap 확장 이후 후속 릴리즈로 이관합니다.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 2. Context Engineering (Part 2 내재화)
|
|
56
|
+
|
|
57
|
+
### Context Window 한계 극복 원칙
|
|
58
|
+
|
|
59
|
+
| 원칙 | 설명 | oh-my-customcode 구현 |
|
|
60
|
+
|------|------|----------------------|
|
|
61
|
+
| **Per-agent budget allocation** | 태스크 유형별 컨텍스트 예산 분리 | R013 task-type-aware thresholds (research 40% / impl 50% / review 60% / management 70%) |
|
|
62
|
+
| **Artifact handoff over inline transfer** | 대용량 결과는 메모리 전달 대신 파일 아티팩트로 핸드오프 | R006 Artifact Output Convention: `.claude/outputs/sessions/{날짜}/` |
|
|
63
|
+
| **Result aggregation as compression** | 하위 에이전트 결과를 집약·압축해 상위 컨텍스트에 전달 | `result-aggregation` 스킬, R013 ecomode `[Batch Complete]` 형식 |
|
|
64
|
+
| **PostCompact rule re-injection** | 컨텍스트 압축 후 핵심 규칙 재주입 | R021 PostCompact hook → R007/R008/R009/R010/R018 재로드 |
|
|
65
|
+
|
|
66
|
+
### oh-my-customcode 구현 현황
|
|
67
|
+
|
|
68
|
+
| 기법 | 현재 위치 | Deep Insight 보강 포인트 |
|
|
69
|
+
|------|----------|------------------------|
|
|
70
|
+
| Task-type budget | R013 SHOULD-ecomode.md | Per-agent dimension 추가 — 동일 태스크라도 에이전트 모델(haiku vs opus)에 따라 예산 차등 적용 검토 |
|
|
71
|
+
| Artifact transfer | R006 Artifact Output Convention | "Channel Protocol" 용어 명문화 — 스킬 간 핸드오프 규약 표준화 |
|
|
72
|
+
| Compression | `result-aggregation` + ecomode `concise` 출력 스타일 | Channel read pattern 추가 — 아티팩트 파일을 직접 읽는 패턴과 집약된 요약만 수신하는 패턴 구분 |
|
|
73
|
+
| Compaction guard | PostCompact hook (SessionStart fallback) | 컴팩션 감지 시 즉시 MEMORY.md 로드 + 규칙 재활성화 |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 3. Harness Engineering (Part 3 내재화)
|
|
78
|
+
|
|
79
|
+
### 행동 제어 (Behavior Control)
|
|
80
|
+
|
|
81
|
+
에이전트가 **선언된 능력의 경계 내에서만 동작하도록 강제하는 메커니즘**입니다.
|
|
82
|
+
|
|
83
|
+
| 레이어 | 구현체 | 작동 방식 |
|
|
84
|
+
|--------|--------|----------|
|
|
85
|
+
| 선언적 경계 | R006 agent frontmatter `tools`, `domain`, `limitations` | 에이전트 정의 시점에 허용 도구 범위를 명시 |
|
|
86
|
+
| 사전 검증 | `action-validator` 스킬 | 도구 호출 전 선언 범위 대비 일탈 경고 (advisory) |
|
|
87
|
+
| 합성 하네스 | `harness-synthesizer` 스킬 | YAML 검증 규칙 자동 생성 → action-validator 코드-검증 모드로 연동 |
|
|
88
|
+
| 정책 캐시 | `action-validator` Policy Cache Pattern | 반복 워크플로우(mgr-gitnerd git-commit 등)의 검증 결정을 재사용 |
|
|
89
|
+
|
|
90
|
+
**Enforcement 수준 선택 기준** (R021 advisory-first 원칙 준수):
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
기본: advisory (verifier 모드) — 경고만, 실행 차단 없음
|
|
94
|
+
opt-in: hard-enforce (filter 모드, --hard-enforce 플래그) — 명시적 사용자 동의 후만
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 인프라 격리 (Infrastructure Isolation)
|
|
98
|
+
|
|
99
|
+
에이전트 실행 환경을 프로젝트 기본값으로부터 격리해 사이드 이펙트를 방지합니다.
|
|
100
|
+
|
|
101
|
+
| 격리 수준 | 프리미티브 | 활성화 방법 |
|
|
102
|
+
|----------|-----------|-----------|
|
|
103
|
+
| **Git worktree** | R006 `isolation: worktree` | 별도 브랜치에서 에이전트 실행 → 메인 브랜치 오염 방지 |
|
|
104
|
+
| **Sandbox** | R006 `isolation: sandbox` + `sandboxFailIfUnavailable: true` | restricted bash 환경에서 실행 |
|
|
105
|
+
| **Tool tier 제한** | R002 Permission Tiers (Tier 1-6) | `disallowedTools` 프리미티브로 티어별 도구 차단 |
|
|
106
|
+
| **Sensitive path guard** | CC sensitive path 처리 | `.claude/` 하위 Bash 사용 시 Write/Edit 도구로 우회 (#960, #961) |
|
|
107
|
+
|
|
108
|
+
### 언어적 명문화 vs 신규 도입
|
|
109
|
+
|
|
110
|
+
본 가이드는 **신규 프리미티브 도입이 아니라 기존 자산의 언어적 승격**입니다. R006의 `isolation`, R021 advisory enforcement, `.claude/outputs/` 아티팩트 규약은 모두 하네스 엔지니어링의 실체입니다. "Harness Engineering"이라는 용어로 이들을 통합 지칭하는 것이 이 가이드의 기여입니다.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 4. oh-my-customcode 하네스 스킬 매핑
|
|
115
|
+
|
|
116
|
+
| 스킬 | 하네스 차원 | 주요 책임 |
|
|
117
|
+
|------|-----------|----------|
|
|
118
|
+
| `harness-synthesizer` | 합성 | AutoHarness-inspired verifier/filter/policy YAML 하네스 자동 생성. 결과물: `.claude/outputs/harnesses/{agent}-{mode}.yaml` |
|
|
119
|
+
| `action-validator` | 사전 검증 | 도구 호출 전 선언 범위 확인. Policy Cache로 반복 워크플로우 검증 재사용. Capability Hints (Opus 4.7+) 지원 |
|
|
120
|
+
| `adaptive-harness` | 진화 | 프로젝트 프로파일(`.claude/project-profile.yaml`) 학습. `--learn`으로 실패 패턴 추출 → R016 연동 |
|
|
121
|
+
| `harness-eval` | 평가 | 15개 SE 벤치마크 기반 에이전트 품질 점수화. 기준선: 49.5 → 79.3점 (60% 개선) |
|
|
122
|
+
|
|
123
|
+
### 관련 조율/라우팅 스킬
|
|
124
|
+
|
|
125
|
+
| 스킬 | 연관성 |
|
|
126
|
+
|------|--------|
|
|
127
|
+
| `dag-orchestration` | Coordinator 계층의 DAG 실행 흐름 제어 |
|
|
128
|
+
| `worker-reviewer-pipeline` | Worker/Reviewer 역할 분리로 Supervisor 패턴 구현 |
|
|
129
|
+
| `evaluator-optimizer` | harness-eval 루브릭을 입력으로 반복 최적화 루프 실행 |
|
|
130
|
+
| `pipeline-guards` | action-validator 하네스 체크를 파이프라인 품질 게이트로 연동 |
|
|
131
|
+
|
|
132
|
+
### 스킬 간 통합 흐름
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
/harness-synthesizer --agent {name} --mode verifier
|
|
136
|
+
→ .claude/outputs/harnesses/{name}-verifier.yaml 생성
|
|
137
|
+
→ action-validator code-verified 모드로 로드
|
|
138
|
+
→ pipeline-guards 품질 게이트로 참조
|
|
139
|
+
→ evaluator-optimizer sprint contract 기준으로 활용
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
/omcustom:adaptive-harness --learn
|
|
144
|
+
→ .claude/outputs/ + .claude/agent-memory/ 분석
|
|
145
|
+
→ 실패 패턴 발견 → R016 규칙 업데이트 권고
|
|
146
|
+
→ harness-synthesizer 트리거 (패턴별 하네스 재합성)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 5. 교차 참조
|
|
152
|
+
|
|
153
|
+
### 내부 가이드
|
|
154
|
+
|
|
155
|
+
| 가이드 | 연관성 |
|
|
156
|
+
|--------|--------|
|
|
157
|
+
| `guides/multi-provider-exec/` | OpenHarness의 provider profile switching 패턴 채용. 멀티 프로바이더 실행 시 각 프로바이더별 하네스 고려 |
|
|
158
|
+
| `guides/multi-model-routing/` | Claude 모델 선택 전략. 하네스 비용-품질 트레이드오프(haiku 검증 vs opus 실행)와 연결 |
|
|
159
|
+
| `guides/skill-bundle-design/` | Author/Test/Troubleshoot tri-pattern이 하네스 Verifier/Filter/Policy 3-mode와 구조적으로 대응 |
|
|
160
|
+
| `guides/worktree-lifecycle/` | Git worktree 격리 패턴. R006 `isolation: worktree` 실제 운영 참조 |
|
|
161
|
+
|
|
162
|
+
### 규칙
|
|
163
|
+
|
|
164
|
+
| 규칙 | 연관 포인트 |
|
|
165
|
+
|------|-----------|
|
|
166
|
+
| R002 (Permission Tiers) | Tier 1-6 도구 분류가 action-validator의 파일 범위 검사 기반 |
|
|
167
|
+
| R005 (Capability-aware Tool Scheduling) | ouroboros PR #353 capability graph 패턴. action-validator Capability Hints와 직접 연동 |
|
|
168
|
+
| R006 (Agent Design) | `tools`, `domain`, `limitations`, `isolation` 필드가 하네스 행동 제어의 선언 계층 |
|
|
169
|
+
| R009 (Parallel Execution) | Executor 병렬화 원칙. adaptive-harness `--scan`의 병렬 Glob/Grep 호출 근거 |
|
|
170
|
+
| R010 (Orchestrator Coordination) | Coordinator 계층의 파일 수정 금지 + Universal bypassPermissions 강제 |
|
|
171
|
+
| R013 (Ecomode) | Context budget thresholds가 Context Engineering 섹션의 per-agent 예산 할당 기반 |
|
|
172
|
+
| R017 (Sync Verification) | mgr-sauron이 Supervisor 계층 역할. 하네스 구조 변경 후 R017 검증 필수 |
|
|
173
|
+
| R018 (Agent Teams) | 3+ 에이전트 또는 review cycle → Agent Teams. 하네스 설계 검토에도 적용 |
|
|
174
|
+
| R021 (Enforcement Policy) | Advisory-first 모델. 하네스 hard-enforce는 명시적 opt-in만 허용 |
|
|
175
|
+
|
|
176
|
+
### 스킬
|
|
177
|
+
|
|
178
|
+
`token-efficiency-audit` — 하네스 컨텍스트 예산 감사에 활용. 스킬 실행 비용 최적화.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 6. Deferred (v0.106.0+)
|
|
183
|
+
|
|
184
|
+
향후 릴리즈로 이관된 항목들입니다. 현재 구조가 안정화된 후 순차 구현합니다.
|
|
185
|
+
|
|
186
|
+
| 항목 | 이관 이유 | 예상 릴리즈 |
|
|
187
|
+
|------|----------|-----------|
|
|
188
|
+
| **Tracker 체크포인트 에이전트** — dag-orchestration / pipeline-guards 통합형 전용 Tracker | `context: fork` cap(현재 12/12) 확장 필요 | v0.106.0+ |
|
|
189
|
+
| **hierarchical-agent-topology 스킬** — 4계층 구조를 자동 검증하는 전용 스킬 | fork 스킬 cap 해소 후 추가 | v0.106.0+ |
|
|
190
|
+
| **sdd-dev Harness Decision Record 템플릿** — 하네스 설계 결정을 ADR 형식으로 기록 | sdd-dev 스킬 업데이트와 병행 | v0.107.0+ |
|
|
191
|
+
| **harness-synthesizer 2단계 격리 구현 예시** — Base64 인코딩 + subprocess 격리의 실제 YAML 예시 | 보안 리뷰 후 추가 | v0.107.0+ |
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 참고
|
|
196
|
+
|
|
197
|
+
이 가이드는 Deep Insight 시리즈 (#973/#974/#976) 내재화 결과입니다. 원본 외부 자료 링크는 각 이슈 본문을 참조하세요.
|
|
198
|
+
|
|
199
|
+
구현된 스킬 파일 위치:
|
|
200
|
+
- `.claude/skills/harness-synthesizer/SKILL.md`
|
|
201
|
+
- `.claude/skills/action-validator/SKILL.md`
|
|
202
|
+
- `.claude/skills/adaptive-harness/SKILL.md`
|
|
203
|
+
- `.claude/skills/harness-eval/SKILL.md`
|
package/templates/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.105.0",
|
|
3
3
|
"lastUpdated": "2026-04-18T00:00:00.000Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"name": "skills",
|
|
19
19
|
"path": ".claude/skills",
|
|
20
20
|
"description": "Reusable skill modules (includes slash commands)",
|
|
21
|
-
"files":
|
|
21
|
+
"files": 113
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "guides",
|
|
25
25
|
"path": "guides",
|
|
26
26
|
"description": "Reference documentation",
|
|
27
|
-
"files":
|
|
27
|
+
"files": 42
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "hooks",
|