oh-my-customcode 0.33.1 → 0.34.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 +19 -19
- package/package.json +1 -1
- package/templates/.claude/hooks/scripts/stuck-detector.sh +61 -1
- package/templates/.claude/hooks/scripts/task-outcome-recorder.sh +2 -1
- package/templates/.claude/rules/MUST-agent-design.md +2 -2
- package/templates/.claude/skills/analysis/SKILL.md +2 -2
- package/templates/.claude/skills/audit-agents/SKILL.md +1 -1
- package/templates/.claude/skills/create-agent/SKILL.md +1 -1
- package/templates/.claude/skills/dev-refactor/SKILL.md +11 -0
- package/templates/.claude/skills/dev-review/SKILL.md +11 -0
- package/templates/.claude/skills/evaluator-optimizer/SKILL.md +256 -0
- package/templates/.claude/skills/fix-refs/SKILL.md +1 -1
- package/templates/.claude/skills/help/SKILL.md +2 -2
- package/templates/.claude/skills/lists/SKILL.md +2 -2
- package/templates/.claude/skills/monitoring-setup/SKILL.md +1 -1
- package/templates/.claude/skills/npm-audit/SKILL.md +1 -1
- package/templates/.claude/skills/npm-publish/SKILL.md +1 -1
- package/templates/.claude/skills/npm-version/SKILL.md +1 -1
- package/templates/.claude/skills/research/SKILL.md +13 -0
- package/templates/.claude/skills/sauron-watch/SKILL.md +1 -1
- package/templates/.claude/skills/status/SKILL.md +2 -2
- package/templates/.claude/skills/task-decomposition/SKILL.md +13 -0
- package/templates/.claude/skills/update-docs/SKILL.md +1 -1
- package/templates/.claude/skills/update-external/SKILL.md +1 -1
- package/templates/.claude/skills/worker-reviewer-pipeline/SKILL.md +10 -0
- package/templates/CLAUDE.md.en +21 -21
- package/templates/CLAUDE.md.ko +21 -21
- package/templates/guides/claude-code/12-workflow-patterns.md +182 -0
- package/templates/manifest.json +3 -3
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Like oh-my-zsh transformed shell customization, oh-my-customcode makes personali
|
|
|
21
21
|
|
|
22
22
|
| Feature | Description |
|
|
23
23
|
|---------|-------------|
|
|
24
|
-
| **Batteries Included** | 44 agents,
|
|
24
|
+
| **Batteries Included** | 44 agents, 71 skills, 25 guides, 19 rules, 1 hook, 4 contexts, ontology graph - ready to use out of the box |
|
|
25
25
|
| **Sub-Agent Model** | Supports hierarchical agent orchestration with specialized roles |
|
|
26
26
|
| **Dead Simple Customization** | Create a folder + markdown file = new agent or skill |
|
|
27
27
|
| **Mix and Match** | Use built-in components, create your own, or combine both |
|
|
@@ -101,7 +101,7 @@ All commands are invoked inside the Claude Code conversation.
|
|
|
101
101
|
|
|
102
102
|
| Command | Description |
|
|
103
103
|
|---------|-------------|
|
|
104
|
-
| `/analysis` | Analyze project and auto-configure agents, skills, rules |
|
|
104
|
+
| `/omcustom:analysis` | Analyze project and auto-configure agents, skills, rules |
|
|
105
105
|
| `/research` | 10-team parallel deep analysis with cross-verification |
|
|
106
106
|
|
|
107
107
|
#### Development
|
|
@@ -115,11 +115,11 @@ All commands are invoked inside the Claude Code conversation.
|
|
|
115
115
|
|
|
116
116
|
| Command | Description |
|
|
117
117
|
|---------|-------------|
|
|
118
|
-
| `/create-agent` | Create new agent |
|
|
119
|
-
| `/update-docs` | Sync project structure and documentation |
|
|
120
|
-
| `/update-external` | Update agents from external sources |
|
|
121
|
-
| `/audit-agents` | Audit agent dependencies |
|
|
122
|
-
| `/fix-refs` | Fix broken references |
|
|
118
|
+
| `/omcustom:create-agent` | Create new agent |
|
|
119
|
+
| `/omcustom:update-docs` | Sync project structure and documentation |
|
|
120
|
+
| `/omcustom:update-external` | Update agents from external sources |
|
|
121
|
+
| `/omcustom:audit-agents` | Audit agent dependencies |
|
|
122
|
+
| `/omcustom:fix-refs` | Fix broken references |
|
|
123
123
|
|
|
124
124
|
#### Memory
|
|
125
125
|
|
|
@@ -128,13 +128,13 @@ All commands are invoked inside the Claude Code conversation.
|
|
|
128
128
|
| `/memory-save` | Save session context to claude-mem |
|
|
129
129
|
| `/memory-recall` | Search and recall memories |
|
|
130
130
|
|
|
131
|
-
#### DevOps &
|
|
131
|
+
#### DevOps & Package Management
|
|
132
132
|
|
|
133
133
|
| Command | Description |
|
|
134
134
|
|---------|-------------|
|
|
135
|
-
| `/npm-publish` | Publish package to npm registry |
|
|
136
|
-
| `/npm-version` | Semantic version management |
|
|
137
|
-
| `/npm-audit` | Dependency security audit |
|
|
135
|
+
| `/omcustom:npm-publish` | Publish package to npm registry |
|
|
136
|
+
| `/omcustom:npm-version` | Semantic version management |
|
|
137
|
+
| `/omcustom:npm-audit` | Dependency security audit |
|
|
138
138
|
|
|
139
139
|
#### Optimization
|
|
140
140
|
|
|
@@ -148,14 +148,14 @@ All commands are invoked inside the Claude Code conversation.
|
|
|
148
148
|
|
|
149
149
|
| Command | Description |
|
|
150
150
|
|---------|-------------|
|
|
151
|
-
| `/sauron-watch` | Full R017 sync verification |
|
|
152
|
-
| `/monitoring-setup` | OTel console monitoring enable/disable |
|
|
151
|
+
| `/omcustom:sauron-watch` | Full R017 sync verification |
|
|
152
|
+
| `/omcustom:monitoring-setup` | OTel console monitoring enable/disable |
|
|
153
153
|
| `/codex-exec` | Execute Codex CLI prompt |
|
|
154
154
|
| `/deep-plan` | Research-validated planning (research → plan → verify) |
|
|
155
155
|
| `/structured-dev-cycle` | 6-phase structured development cycle |
|
|
156
|
-
| `/lists` | Show all available commands |
|
|
157
|
-
| `/status` | System status and health checks |
|
|
158
|
-
| `/help` | Help information |
|
|
156
|
+
| `/omcustom:lists` | Show all available commands |
|
|
157
|
+
| `/omcustom:status` | System status and health checks |
|
|
158
|
+
| `/omcustom:help` | Help information |
|
|
159
159
|
|
|
160
160
|
---
|
|
161
161
|
|
|
@@ -179,7 +179,7 @@ All commands are invoked inside the Claude Code conversation.
|
|
|
179
179
|
| **Security** | 1 | sec-codeql-expert |
|
|
180
180
|
| **Total** | **44** | |
|
|
181
181
|
|
|
182
|
-
### Skills (
|
|
182
|
+
### Skills (71)
|
|
183
183
|
|
|
184
184
|
| Category | Count | Skills |
|
|
185
185
|
|----------|-------|--------|
|
|
@@ -192,7 +192,7 @@ All commands are invoked inside the Claude Code conversation.
|
|
|
192
192
|
| **Package Management** | 3 | npm-publish, npm-version, npm-audit |
|
|
193
193
|
| **Operations** | 7 | update-docs, update-external, audit-agents, fix-refs, sauron-watch, monitoring-setup, claude-code-bible |
|
|
194
194
|
| **Utilities** | 5 | lists, help, status, result-aggregation, writing-clearly-and-concisely |
|
|
195
|
-
| **Quality & Workflow** |
|
|
195
|
+
| **Quality & Workflow** | 11 | multi-model-verification, structured-dev-cycle, model-escalation, stuck-recovery, dag-orchestration, task-decomposition, worker-reviewer-pipeline, pr-auto-improve, pipeline-guards, deep-plan, evaluator-optimizer |
|
|
196
196
|
| **Security** | 2 | cve-triage, jinja2-prompts |
|
|
197
197
|
| **Research** | 1 | research |
|
|
198
198
|
| **Deploy** | 2 | vercel-deploy, codex-exec |
|
|
@@ -281,7 +281,7 @@ your-project/
|
|
|
281
281
|
│ │ ├── be-fastapi-expert.md
|
|
282
282
|
│ │ ├── mgr-creator.md
|
|
283
283
|
│ │ └── ...
|
|
284
|
-
│ ├── skills/ # Skill modules (
|
|
284
|
+
│ ├── skills/ # Skill modules (71 directories, each with SKILL.md)
|
|
285
285
|
│ │ ├── go-best-practices/
|
|
286
286
|
│ │ ├── react-best-practices/
|
|
287
287
|
│ │ ├── secretary-routing/
|
package/package.json
CHANGED
|
@@ -4,7 +4,12 @@ set -euo pipefail
|
|
|
4
4
|
# Stuck Detector Hook
|
|
5
5
|
# Trigger: PostToolUse, tool matches "Edit|Write|Bash|Task|Agent"
|
|
6
6
|
# Purpose: Detect repetitive failure loops and advise recovery
|
|
7
|
-
# Protocol: stdin JSON -> process -> stdout pass-through
|
|
7
|
+
# Protocol: stdin JSON -> process -> stdout pass-through
|
|
8
|
+
# - exit 0: advisory (normal cases, < HARD_BLOCK_THRESHOLD repetitions)
|
|
9
|
+
# - exit 1: hard block (extreme stuck loops, >= HARD_BLOCK_THRESHOLD repetitions)
|
|
10
|
+
|
|
11
|
+
# Hard block threshold: consecutive identical operations before blocking
|
|
12
|
+
HARD_BLOCK_THRESHOLD=5
|
|
8
13
|
|
|
9
14
|
input=$(cat)
|
|
10
15
|
|
|
@@ -120,6 +125,61 @@ if [ "$stuck_detected" = true ]; then
|
|
|
120
125
|
echo "----------------------------------------" >&2
|
|
121
126
|
fi
|
|
122
127
|
|
|
128
|
+
# --- Hard Block Detection (extreme stuck loops) ---
|
|
129
|
+
# Check if the same operation has been repeated HARD_BLOCK_THRESHOLD+ times consecutively.
|
|
130
|
+
# This catches cases where advisory warnings are being ignored.
|
|
131
|
+
|
|
132
|
+
hard_block=false
|
|
133
|
+
hard_block_reason=""
|
|
134
|
+
|
|
135
|
+
if [ -f "$HISTORY_FILE" ]; then
|
|
136
|
+
last_n=$(tail -"$HARD_BLOCK_THRESHOLD" "$HISTORY_FILE" 2>/dev/null)
|
|
137
|
+
last_n_count=$(echo "$last_n" | wc -l | tr -d ' ')
|
|
138
|
+
|
|
139
|
+
if [ "$last_n_count" -ge "$HARD_BLOCK_THRESHOLD" ]; then
|
|
140
|
+
# Check 1: Same file edited HARD_BLOCK_THRESHOLD+ times consecutively
|
|
141
|
+
if [ -n "$file_path" ]; then
|
|
142
|
+
escaped_path=$(echo "$file_path" | sed 's/[.[\*^$()+?{|]/\\&/g')
|
|
143
|
+
consecutive_file=$(echo "$last_n" | grep -c "\"path\":\"${escaped_path}\"" 2>/dev/null || echo "0")
|
|
144
|
+
if [ "$consecutive_file" -ge "$HARD_BLOCK_THRESHOLD" ]; then
|
|
145
|
+
hard_block=true
|
|
146
|
+
hard_block_reason="Same file ($(basename "$file_path")) edited ${consecutive_file} consecutive times"
|
|
147
|
+
fi
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
# Check 2: Same error repeated HARD_BLOCK_THRESHOLD+ times consecutively
|
|
151
|
+
if [ "$hard_block" = false ] && [ "$is_error" = "true" ] && [ -n "$error_hash" ]; then
|
|
152
|
+
consecutive_error=$(echo "$last_n" | grep -c "\"error_hash\":\"${error_hash}\"" 2>/dev/null || echo "0")
|
|
153
|
+
if [ "$consecutive_error" -ge "$HARD_BLOCK_THRESHOLD" ]; then
|
|
154
|
+
hard_block=true
|
|
155
|
+
hard_block_reason="Same error repeated ${consecutive_error} consecutive times"
|
|
156
|
+
fi
|
|
157
|
+
fi
|
|
158
|
+
|
|
159
|
+
# Check 3: Same tool+target combination HARD_BLOCK_THRESHOLD+ times consecutively
|
|
160
|
+
if [ "$hard_block" = false ] && [ -n "$file_path" ]; then
|
|
161
|
+
escaped_path=$(echo "$file_path" | sed 's/[.[\*^$()+?{|]/\\&/g')
|
|
162
|
+
consecutive_tool_target=$(echo "$last_n" | grep "\"tool\":\"${tool_name}\"" | grep -c "\"path\":\"${escaped_path}\"" 2>/dev/null || echo "0")
|
|
163
|
+
if [ "$consecutive_tool_target" -ge "$HARD_BLOCK_THRESHOLD" ]; then
|
|
164
|
+
hard_block=true
|
|
165
|
+
hard_block_reason="${tool_name} called on $(basename "$file_path") ${consecutive_tool_target} consecutive times"
|
|
166
|
+
fi
|
|
167
|
+
fi
|
|
168
|
+
fi
|
|
169
|
+
fi
|
|
170
|
+
|
|
171
|
+
if [ "$hard_block" = true ]; then
|
|
172
|
+
echo "" >&2
|
|
173
|
+
echo "=== [Stuck Detection] HARD BLOCK ===" >&2
|
|
174
|
+
echo " ${hard_block_reason}" >&2
|
|
175
|
+
echo " Threshold: ${HARD_BLOCK_THRESHOLD} consecutive identical operations" >&2
|
|
176
|
+
echo " Action: Blocking this tool call to break the stuck loop." >&2
|
|
177
|
+
echo " Recovery: Step back, re-read the error, and try a fundamentally different approach." >&2
|
|
178
|
+
echo "=====================================" >&2
|
|
179
|
+
echo "$input"
|
|
180
|
+
exit 1
|
|
181
|
+
fi
|
|
182
|
+
|
|
123
183
|
# Pass through
|
|
124
184
|
echo "$input"
|
|
125
185
|
exit 0
|
|
@@ -34,9 +34,10 @@ entry=$(jq -n \
|
|
|
34
34
|
--arg agent "$agent_type" \
|
|
35
35
|
--arg model "$model" \
|
|
36
36
|
--arg outcome "$outcome" \
|
|
37
|
+
--arg pattern "unknown" \
|
|
37
38
|
--arg desc "$description" \
|
|
38
39
|
--arg err "$error_summary" \
|
|
39
|
-
'{timestamp: $ts, agent_type: $agent, model: $model, outcome: $outcome, description: $desc, error_summary: $err}')
|
|
40
|
+
'{timestamp: $ts, agent_type: $agent, model: $model, outcome: $outcome, pattern_used: $pattern, description: $desc, error_summary: $err}')
|
|
40
41
|
|
|
41
42
|
echo "$entry" >> "$OUTCOME_FILE"
|
|
42
43
|
|
|
@@ -165,10 +165,10 @@ Use `context: fork` for skills that orchestrate multi-agent workflows. Cap at **
|
|
|
165
165
|
| Multi-agent coordination patterns | Single-agent reference skills |
|
|
166
166
|
| Task decomposition/planning | External tool integrations |
|
|
167
167
|
|
|
168
|
-
Current skills with `context: fork` (
|
|
168
|
+
Current skills with `context: fork` (9/10 cap):
|
|
169
169
|
- secretary-routing, dev-lead-routing, de-lead-routing, qa-lead-routing
|
|
170
170
|
- dag-orchestration, task-decomposition, worker-reviewer-pipeline
|
|
171
|
-
- pipeline-guards
|
|
171
|
+
- pipeline-guards, deep-plan
|
|
172
172
|
|
|
173
173
|
## Naming
|
|
174
174
|
|
|
@@ -9,6 +9,17 @@ argument-hint: "<file-or-directory> [--lang <language>]"
|
|
|
9
9
|
|
|
10
10
|
Refactor code for better structure, naming, and patterns using language-specific expert agents.
|
|
11
11
|
|
|
12
|
+
## When NOT to Use
|
|
13
|
+
|
|
14
|
+
| Scenario | Better Alternative |
|
|
15
|
+
|----------|--------------------|
|
|
16
|
+
| Renaming only (no structural change) | IDE rename refactoring or `sed` |
|
|
17
|
+
| Formatting cleanup | Run formatter (`prettier`, `gofmt`, `black`) |
|
|
18
|
+
| No test coverage for target code | Write tests first (`/structured-dev-cycle`) |
|
|
19
|
+
| Moving files between directories | `git mv` via mgr-gitnerd |
|
|
20
|
+
|
|
21
|
+
**Pre-execution check**: Verify test coverage exists for the refactoring target. Refactoring without tests risks silent regressions.
|
|
22
|
+
|
|
12
23
|
## Parameters
|
|
13
24
|
|
|
14
25
|
| Name | Type | Required | Description |
|
|
@@ -9,6 +9,17 @@ argument-hint: "<file-or-directory> [--lang <language>]"
|
|
|
9
9
|
|
|
10
10
|
Review code for best practices using language-specific expert agents.
|
|
11
11
|
|
|
12
|
+
## When NOT to Use
|
|
13
|
+
|
|
14
|
+
| Scenario | Better Alternative |
|
|
15
|
+
|----------|--------------------|
|
|
16
|
+
| Formatting/style issues only | Run linter or formatter directly (`prettier`, `gofmt`, `black`) |
|
|
17
|
+
| Single syntax error | IDE/LSP diagnostics |
|
|
18
|
+
| Auto-generated code | Skip — generated code follows its own conventions |
|
|
19
|
+
| Pre-commit quick check | Git hooks with linter integration |
|
|
20
|
+
|
|
21
|
+
**Pre-execution check**: If the issue is purely formatting, run the appropriate formatter first.
|
|
22
|
+
|
|
12
23
|
## Parameters
|
|
13
24
|
|
|
14
25
|
| Name | Type | Required | Description |
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: evaluator-optimizer
|
|
3
|
+
description: Parameterized evaluator-optimizer loop for quality-critical output with configurable rubrics
|
|
4
|
+
scope: core
|
|
5
|
+
user-invocable: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Evaluator-Optimizer Skill
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
General-purpose iterative refinement loop. A generator agent produces output, an evaluator agent scores it against a configurable rubric, and the loop continues until the quality gate is met or max iterations are reached.
|
|
13
|
+
|
|
14
|
+
This skill generalizes the worker-reviewer-pipeline pattern beyond code review to any domain requiring quality-critical output: documentation, architecture decisions, test plans, configurations, and more.
|
|
15
|
+
|
|
16
|
+
## Configuration Schema
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
evaluator-optimizer:
|
|
20
|
+
generator:
|
|
21
|
+
agent: {subagent_type} # Agent that produces output
|
|
22
|
+
model: sonnet # Default model
|
|
23
|
+
evaluator:
|
|
24
|
+
agent: {subagent_type} # Agent that reviews output
|
|
25
|
+
model: opus # Evaluator benefits from stronger reasoning
|
|
26
|
+
rubric:
|
|
27
|
+
- criterion: {name}
|
|
28
|
+
weight: {0.0-1.0}
|
|
29
|
+
description: {what to evaluate}
|
|
30
|
+
quality_gate:
|
|
31
|
+
type: all_pass | majority_pass | score_threshold
|
|
32
|
+
threshold: 0.8 # For score_threshold type
|
|
33
|
+
max_iterations: 3 # Default, hard cap: 5
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameter Details
|
|
37
|
+
|
|
38
|
+
| Parameter | Required | Default | Description |
|
|
39
|
+
|-----------|----------|---------|-------------|
|
|
40
|
+
| `generator.agent` | Yes | — | Subagent type that produces output |
|
|
41
|
+
| `generator.model` | No | `sonnet` | Model for generation |
|
|
42
|
+
| `evaluator.agent` | Yes | — | Subagent type that evaluates output |
|
|
43
|
+
| `evaluator.model` | No | `opus` | Model for evaluation (stronger reasoning preferred) |
|
|
44
|
+
| `rubric` | Yes | — | List of evaluation criteria with weights |
|
|
45
|
+
| `quality_gate.type` | No | `score_threshold` | Gate strategy |
|
|
46
|
+
| `quality_gate.threshold` | No | `0.8` | Score threshold (for `score_threshold` type) |
|
|
47
|
+
| `max_iterations` | No | `3` | Max refinement loops (hard cap: 5) |
|
|
48
|
+
|
|
49
|
+
## Quality Gate Types
|
|
50
|
+
|
|
51
|
+
| Type | Behavior |
|
|
52
|
+
|------|----------|
|
|
53
|
+
| `all_pass` | Every rubric criterion must pass |
|
|
54
|
+
| `majority_pass` | >50% of weighted criteria pass |
|
|
55
|
+
| `score_threshold` | Weighted average score >= threshold |
|
|
56
|
+
|
|
57
|
+
### Gate Evaluation Logic
|
|
58
|
+
|
|
59
|
+
- **all_pass**: Each criterion scored individually. All must receive `pass: true`.
|
|
60
|
+
- **majority_pass**: Sum weights of passing criteria. If > 0.5 of total weight, gate passes.
|
|
61
|
+
- **score_threshold**: Compute weighted average: `sum(score_i * weight_i) / sum(weight_i)`. Compare against threshold.
|
|
62
|
+
|
|
63
|
+
## Workflow
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
1. Generator produces output
|
|
67
|
+
→ Orchestrator spawns generator agent with task prompt
|
|
68
|
+
→ Generator returns output artifact
|
|
69
|
+
|
|
70
|
+
2. Evaluator scores against rubric
|
|
71
|
+
→ Orchestrator spawns evaluator agent with:
|
|
72
|
+
- The output artifact
|
|
73
|
+
- The rubric criteria
|
|
74
|
+
- Instructions to produce verdict JSON
|
|
75
|
+
→ Evaluator returns structured verdict
|
|
76
|
+
|
|
77
|
+
3. Quality gate check:
|
|
78
|
+
- PASS → return output + final verdict
|
|
79
|
+
- FAIL → extract feedback, append to generator prompt → iteration N+1
|
|
80
|
+
|
|
81
|
+
4. Max iterations reached → return best output + warning
|
|
82
|
+
→ "Best" = output from iteration with highest weighted score
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Iteration Flow Diagram
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
┌─────────────────────────────────────────────────┐
|
|
89
|
+
│ Orchestrator │
|
|
90
|
+
│ │
|
|
91
|
+
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
|
92
|
+
│ │ Generate │───→│ Evaluate │───→│ Gate │ │
|
|
93
|
+
│ │ (iter N) │ │ │ │ Check │ │
|
|
94
|
+
│ └──────────┘ └──────────┘ └────┬─────┘ │
|
|
95
|
+
│ ↑ │ │
|
|
96
|
+
│ │ ┌──────────┐ FAIL │ PASS │
|
|
97
|
+
│ └─────────│ Feedback │←────────┘ │ │
|
|
98
|
+
│ └──────────┘ ↓ │
|
|
99
|
+
│ Return │
|
|
100
|
+
└─────────────────────────────────────────────────┘
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Stopping Criteria Display
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
[Evaluator-Optimizer]
|
|
107
|
+
├── Generator: {agent}:{model}
|
|
108
|
+
├── Evaluator: {agent}:{model}
|
|
109
|
+
├── Max iterations: {max_iterations} (hard cap: 5)
|
|
110
|
+
├── Quality gate: {type} (threshold: {threshold})
|
|
111
|
+
└── Rubric: {N} criteria
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Display this at the start of the loop to provide transparency into the refinement configuration.
|
|
115
|
+
|
|
116
|
+
## Verdict Format
|
|
117
|
+
|
|
118
|
+
The evaluator MUST return a structured verdict in this format:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"status": "pass | fail",
|
|
123
|
+
"iteration": 2,
|
|
124
|
+
"score": 0.85,
|
|
125
|
+
"rubric_results": [
|
|
126
|
+
{"criterion": "clarity", "pass": true, "score": 0.9, "feedback": "Clear structure and logical flow"},
|
|
127
|
+
{"criterion": "accuracy", "pass": true, "score": 0.8, "feedback": "All facts verified, one minor imprecision in section 3"}
|
|
128
|
+
],
|
|
129
|
+
"improvement_summary": "Section 3 terminology tightened. Examples added to section 2."
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Verdict Fields
|
|
134
|
+
|
|
135
|
+
| Field | Type | Description |
|
|
136
|
+
|-------|------|-------------|
|
|
137
|
+
| `status` | `pass` or `fail` | Overall quality gate result |
|
|
138
|
+
| `iteration` | number | Current iteration number (1-indexed) |
|
|
139
|
+
| `score` | number (0.0-1.0) | Weighted average score across all criteria |
|
|
140
|
+
| `rubric_results` | array | Per-criterion evaluation details |
|
|
141
|
+
| `improvement_summary` | string | Summary of changes from previous iteration (empty on iteration 1) |
|
|
142
|
+
|
|
143
|
+
## Domain Examples
|
|
144
|
+
|
|
145
|
+
| Domain | Generator | Evaluator | Rubric Focus |
|
|
146
|
+
|--------|-----------|-----------|--------------|
|
|
147
|
+
| Code review | `lang-*-expert` | opus reviewer | Correctness, style, security |
|
|
148
|
+
| Documentation | `arch-documenter` | opus reviewer | Completeness, clarity, accuracy |
|
|
149
|
+
| Architecture | Plan agent | opus reviewer | No SPOFs, no circular deps |
|
|
150
|
+
| Test plans | `qa-planner` | `qa-engineer` | Coverage, edge cases, feasibility |
|
|
151
|
+
| Agent creation | `mgr-creator` | opus reviewer | Frontmatter validity, R006 compliance |
|
|
152
|
+
| Security audit | `sec-codeql-expert` | opus reviewer | Vulnerability coverage, false positive rate |
|
|
153
|
+
|
|
154
|
+
### Example: Documentation Review
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
evaluator-optimizer:
|
|
158
|
+
generator:
|
|
159
|
+
agent: arch-documenter
|
|
160
|
+
model: sonnet
|
|
161
|
+
evaluator:
|
|
162
|
+
agent: general-purpose
|
|
163
|
+
model: opus
|
|
164
|
+
rubric:
|
|
165
|
+
- criterion: completeness
|
|
166
|
+
weight: 0.3
|
|
167
|
+
description: All sections present, no gaps in coverage
|
|
168
|
+
- criterion: clarity
|
|
169
|
+
weight: 0.3
|
|
170
|
+
description: Clear language, no ambiguity, proper examples
|
|
171
|
+
- criterion: accuracy
|
|
172
|
+
weight: 0.25
|
|
173
|
+
description: All technical details correct and verifiable
|
|
174
|
+
- criterion: consistency
|
|
175
|
+
weight: 0.15
|
|
176
|
+
description: Consistent terminology, formatting, and style
|
|
177
|
+
quality_gate:
|
|
178
|
+
type: score_threshold
|
|
179
|
+
threshold: 0.8
|
|
180
|
+
max_iterations: 3
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Example: Code Implementation
|
|
184
|
+
|
|
185
|
+
```yaml
|
|
186
|
+
evaluator-optimizer:
|
|
187
|
+
generator:
|
|
188
|
+
agent: lang-typescript-expert
|
|
189
|
+
model: sonnet
|
|
190
|
+
evaluator:
|
|
191
|
+
agent: general-purpose
|
|
192
|
+
model: opus
|
|
193
|
+
rubric:
|
|
194
|
+
- criterion: correctness
|
|
195
|
+
weight: 0.35
|
|
196
|
+
description: Code compiles, logic is correct, edge cases handled
|
|
197
|
+
- criterion: style
|
|
198
|
+
weight: 0.2
|
|
199
|
+
description: Follows project conventions, clean and readable
|
|
200
|
+
- criterion: security
|
|
201
|
+
weight: 0.25
|
|
202
|
+
description: No injection risks, proper input validation
|
|
203
|
+
- criterion: performance
|
|
204
|
+
weight: 0.2
|
|
205
|
+
description: No unnecessary allocations, efficient algorithms
|
|
206
|
+
quality_gate:
|
|
207
|
+
type: all_pass
|
|
208
|
+
max_iterations: 3
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Integration
|
|
212
|
+
|
|
213
|
+
| Rule | Integration |
|
|
214
|
+
|------|-------------|
|
|
215
|
+
| R009 | Generator and evaluator run sequentially (dependent — evaluator needs generator output) |
|
|
216
|
+
| R010 | Orchestrator configures and invokes the loop; generator and evaluator agents execute via Agent tool |
|
|
217
|
+
| R007 | Each iteration displays agent identification for both generator and evaluator |
|
|
218
|
+
| R008 | Tool calls within generator/evaluator follow tool identification rules |
|
|
219
|
+
| R013 | Ecomode: return verdict summary only, skip per-criterion details |
|
|
220
|
+
| R015 | Display configuration block at loop start for intent transparency |
|
|
221
|
+
|
|
222
|
+
## Ecomode Behavior
|
|
223
|
+
|
|
224
|
+
When ecomode is active (R013), compress output:
|
|
225
|
+
|
|
226
|
+
**Normal mode:**
|
|
227
|
+
```
|
|
228
|
+
[Evaluator-Optimizer] Iteration 2/3
|
|
229
|
+
├── Generator: lang-typescript-expert:sonnet → produced 45-line module
|
|
230
|
+
├── Evaluator: general-purpose:opus → scored 0.85
|
|
231
|
+
├── Rubric: correctness ✓(0.9), style ✓(0.8), security ✓(0.85), performance ✓(0.8)
|
|
232
|
+
└── Gate: score_threshold(0.8) → PASS
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Ecomode:**
|
|
236
|
+
```
|
|
237
|
+
[EO] iter 2/3 → 0.85 → PASS
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Error Handling
|
|
241
|
+
|
|
242
|
+
| Scenario | Action |
|
|
243
|
+
|----------|--------|
|
|
244
|
+
| Generator fails to produce output | Retry once with simplified prompt; if still fails, abort with error |
|
|
245
|
+
| Evaluator returns malformed verdict | Retry once; if still malformed, treat as fail with score 0.0 |
|
|
246
|
+
| Max iterations reached without passing | Return best-scored output with warning: "Quality gate not met after {N} iterations" |
|
|
247
|
+
| Rubric has zero total weight | Reject configuration, report error before starting loop |
|
|
248
|
+
| Hard cap exceeded in config | Clamp `max_iterations` to 5, emit warning |
|
|
249
|
+
|
|
250
|
+
## Constraints
|
|
251
|
+
|
|
252
|
+
- This skill does NOT use `context: fork` — it operates within the caller's context
|
|
253
|
+
- Generator and evaluator MUST be different agent invocations (no self-review)
|
|
254
|
+
- The evaluator prompt MUST include the full rubric to ensure consistent scoring
|
|
255
|
+
- Iteration state (best score, best output) is tracked by the orchestrator
|
|
256
|
+
- The hard cap of 5 iterations prevents runaway refinement loops
|
|
@@ -20,6 +20,17 @@ Orchestrates 10 parallel research teams for comprehensive deep analysis of any t
|
|
|
20
20
|
/research Rust async runtime comparison
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
## When NOT to Use
|
|
24
|
+
|
|
25
|
+
| Scenario | Better Alternative |
|
|
26
|
+
|----------|--------------------|
|
|
27
|
+
| Simple factual question | Direct answer or single WebSearch |
|
|
28
|
+
| Single-file code review | `/dev-review` with specific file |
|
|
29
|
+
| Known solution implementation | `/structured-dev-cycle` |
|
|
30
|
+
| Topic with < 3 comparison dimensions | Single Explore agent |
|
|
31
|
+
|
|
32
|
+
**Pre-execution check**: If the query can be answered with < 3 sources, skip 10-team research.
|
|
33
|
+
|
|
23
34
|
## Architecture — 4 Phases
|
|
24
35
|
|
|
25
36
|
### Phase 1: Parallel Research (10 teams, batched per R009)
|
|
@@ -258,6 +269,8 @@ Before execution:
|
|
|
258
269
|
└── Phase 4: Report + GitHub issue
|
|
259
270
|
|
|
260
271
|
Estimated: {time} | Teams: 10 | Models: sonnet → opus → codex
|
|
272
|
+
Stopping: max 30 verification rounds, convergence at 0 contradictions
|
|
273
|
+
Cost: ~$8-15 (10 teams × sonnet + opus verification)
|
|
261
274
|
Execute? [Y/n]
|
|
262
275
|
```
|
|
263
276
|
|
|
@@ -20,6 +20,19 @@ Decomposition is **recommended** when any of these thresholds are met:
|
|
|
20
20
|
| Domains involved | > 2 domains | Requires multiple specialists |
|
|
21
21
|
| Agent types needed | > 2 types | Cross-specialty coordination |
|
|
22
22
|
|
|
23
|
+
### Step 0: Pattern Selection
|
|
24
|
+
|
|
25
|
+
Before decomposing, select the appropriate workflow pattern:
|
|
26
|
+
|
|
27
|
+
| Pattern | When to Use | Primitive |
|
|
28
|
+
|---------|-------------|-----------|
|
|
29
|
+
| Sequential | Steps must execute in order, each depends on previous | dag-orchestration (linear) |
|
|
30
|
+
| Parallel | Independent subtasks with no shared state | Agent tool (R009) or Agent Teams (R018) |
|
|
31
|
+
| Evaluator-Optimizer | Quality-critical output needing iterative refinement | worker-reviewer-pipeline |
|
|
32
|
+
| Orchestrator | Complex multi-step with dynamic routing | Routing skills (secretary/dev-lead/de-lead/qa-lead) |
|
|
33
|
+
|
|
34
|
+
**Decision**: If task has independent subtasks → Parallel. If quality-critical → add EO review cycle. If multi-step with dependencies → Sequential/Orchestrator.
|
|
35
|
+
|
|
23
36
|
## Decomposition Process
|
|
24
37
|
|
|
25
38
|
```
|
|
@@ -98,6 +98,16 @@ When Agent Teams is NOT available, falls back to sequential Agent tool calls:
|
|
|
98
98
|
Agent(worker) → result → Agent(reviewer) → verdict → Agent(worker) → ...
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
## Stopping Criteria Display
|
|
102
|
+
|
|
103
|
+
Before execution, display:
|
|
104
|
+
```
|
|
105
|
+
[Worker-Reviewer Pipeline]
|
|
106
|
+
├── Max iterations: {max_iterations} (default: 3, hard cap: 5)
|
|
107
|
+
├── Quality gate: {pass_threshold}% approval required
|
|
108
|
+
└── Early stop: All reviewers approve → stop immediately
|
|
109
|
+
```
|
|
110
|
+
|
|
101
111
|
## Display Format
|
|
102
112
|
|
|
103
113
|
```
|
package/templates/CLAUDE.md.en
CHANGED
|
@@ -151,31 +151,31 @@ Violation = immediate correction. No exception for "small changes".
|
|
|
151
151
|
|
|
152
152
|
| Command | Description |
|
|
153
153
|
|---------|-------------|
|
|
154
|
-
| `/analysis` | Analyze project and auto-configure customizations |
|
|
155
|
-
| `/create-agent` | Create a new agent |
|
|
156
|
-
| `/update-docs` | Sync documentation with project structure |
|
|
157
|
-
| `/update-external` | Update agents from external sources |
|
|
158
|
-
| `/audit-agents` | Audit agent dependencies |
|
|
159
|
-
| `/fix-refs` | Fix broken references |
|
|
154
|
+
| `/omcustom:analysis` | Analyze project and auto-configure customizations |
|
|
155
|
+
| `/omcustom:create-agent` | Create a new agent |
|
|
156
|
+
| `/omcustom:update-docs` | Sync documentation with project structure |
|
|
157
|
+
| `/omcustom:update-external` | Update agents from external sources |
|
|
158
|
+
| `/omcustom:audit-agents` | Audit agent dependencies |
|
|
159
|
+
| `/omcustom:fix-refs` | Fix broken references |
|
|
160
160
|
| `/dev-review` | Review code for best practices |
|
|
161
161
|
| `/dev-refactor` | Refactor code |
|
|
162
162
|
| `/memory-save` | Save session context to claude-mem |
|
|
163
163
|
| `/memory-recall` | Search and recall memories |
|
|
164
|
-
| `/monitoring-setup` | Enable/disable OTel console monitoring |
|
|
165
|
-
| `/npm-publish` | Publish package to npm registry |
|
|
166
|
-
| `/npm-version` | Manage semantic versions |
|
|
167
|
-
| `/npm-audit` | Audit dependencies |
|
|
164
|
+
| `/omcustom:monitoring-setup` | Enable/disable OTel console monitoring |
|
|
165
|
+
| `/omcustom:npm-publish` | Publish package to npm registry |
|
|
166
|
+
| `/omcustom:npm-version` | Manage semantic versions |
|
|
167
|
+
| `/omcustom:npm-audit` | Audit dependencies |
|
|
168
168
|
| `/codex-exec` | Execute Codex CLI prompts |
|
|
169
169
|
| `/optimize-analyze` | Analyze bundle and performance |
|
|
170
170
|
| `/optimize-bundle` | Optimize bundle size |
|
|
171
171
|
| `/optimize-report` | Generate optimization report |
|
|
172
172
|
| `/research` | 10-team parallel deep analysis and cross-verification |
|
|
173
173
|
| `/deep-plan` | Research-validated planning (research → plan → verify) |
|
|
174
|
-
| `/sauron-watch` | Full R017 verification |
|
|
174
|
+
| `/omcustom:sauron-watch` | Full R017 verification |
|
|
175
175
|
| `/structured-dev-cycle` | 6-stage structured development cycle (Plan → Verify → Implement → Verify → Compound → Done) |
|
|
176
|
-
| `/lists` | Show all available commands |
|
|
177
|
-
| `/status` | Show system status |
|
|
178
|
-
| `/help` | Show help information |
|
|
176
|
+
| `/omcustom:lists` | Show all available commands |
|
|
177
|
+
| `/omcustom:status` | Show system status |
|
|
178
|
+
| `/omcustom:help` | Show help information |
|
|
179
179
|
|
|
180
180
|
## Project Structure
|
|
181
181
|
|
|
@@ -184,7 +184,7 @@ project/
|
|
|
184
184
|
+-- CLAUDE.md # Entry point
|
|
185
185
|
+-- .claude/
|
|
186
186
|
| +-- agents/ # Subagent definitions (44 files)
|
|
187
|
-
| +-- skills/ # Skills (
|
|
187
|
+
| +-- skills/ # Skills (71 directories)
|
|
188
188
|
| +-- rules/ # Global rules (R000-R019)
|
|
189
189
|
| +-- hooks/ # Hook scripts (memory, HUD)
|
|
190
190
|
| +-- contexts/ # Context files (ecomode)
|
|
@@ -250,15 +250,15 @@ Task tool + routing skills remain the fallback for simple/cost-sensitive tasks.
|
|
|
250
250
|
|
|
251
251
|
```bash
|
|
252
252
|
# Project analysis
|
|
253
|
-
/analysis
|
|
253
|
+
/omcustom:analysis
|
|
254
254
|
|
|
255
255
|
# Show all commands
|
|
256
|
-
/lists
|
|
256
|
+
/omcustom:lists
|
|
257
257
|
|
|
258
258
|
# Agent management
|
|
259
|
-
/create-agent my-agent
|
|
260
|
-
/update-docs
|
|
261
|
-
/audit-agents
|
|
259
|
+
/omcustom:create-agent my-agent
|
|
260
|
+
/omcustom:update-docs
|
|
261
|
+
/omcustom:audit-agents
|
|
262
262
|
|
|
263
263
|
# Code review
|
|
264
264
|
/dev-review src/main.go
|
|
@@ -268,7 +268,7 @@ Task tool + routing skills remain the fallback for simple/cost-sensitive tasks.
|
|
|
268
268
|
/memory-recall authentication
|
|
269
269
|
|
|
270
270
|
# Verification
|
|
271
|
-
/sauron-watch
|
|
271
|
+
/omcustom:sauron-watch
|
|
272
272
|
```
|
|
273
273
|
|
|
274
274
|
## External Dependencies
|
package/templates/CLAUDE.md.ko
CHANGED
|
@@ -151,31 +151,31 @@ oh-my-customcode로 구동됩니다.
|
|
|
151
151
|
|
|
152
152
|
| 커맨드 | 설명 |
|
|
153
153
|
|--------|------|
|
|
154
|
-
| `/analysis` | 프로젝트 분석 및 자동 커스터마이징 |
|
|
155
|
-
| `/create-agent` | 새 에이전트 생성 |
|
|
156
|
-
| `/update-docs` | 프로젝트 구조와 문서 동기화 |
|
|
157
|
-
| `/update-external` | 외부 소스에서 에이전트 업데이트 |
|
|
158
|
-
| `/audit-agents` | 에이전트 의존성 감사 |
|
|
159
|
-
| `/fix-refs` | 깨진 참조 수정 |
|
|
154
|
+
| `/omcustom:analysis` | 프로젝트 분석 및 자동 커스터마이징 |
|
|
155
|
+
| `/omcustom:create-agent` | 새 에이전트 생성 |
|
|
156
|
+
| `/omcustom:update-docs` | 프로젝트 구조와 문서 동기화 |
|
|
157
|
+
| `/omcustom:update-external` | 외부 소스에서 에이전트 업데이트 |
|
|
158
|
+
| `/omcustom:audit-agents` | 에이전트 의존성 감사 |
|
|
159
|
+
| `/omcustom:fix-refs` | 깨진 참조 수정 |
|
|
160
160
|
| `/dev-review` | 코드 베스트 프랙티스 리뷰 |
|
|
161
161
|
| `/dev-refactor` | 코드 리팩토링 |
|
|
162
162
|
| `/memory-save` | 세션 컨텍스트를 claude-mem에 저장 |
|
|
163
163
|
| `/memory-recall` | 메모리 검색 및 리콜 |
|
|
164
|
-
| `/monitoring-setup` | OTel 콘솔 모니터링 활성화/비활성화 |
|
|
165
|
-
| `/npm-publish` | npm 레지스트리에 패키지 배포 |
|
|
166
|
-
| `/npm-version` | 시맨틱 버전 관리 |
|
|
167
|
-
| `/npm-audit` | 의존성 감사 |
|
|
164
|
+
| `/omcustom:monitoring-setup` | OTel 콘솔 모니터링 활성화/비활성화 |
|
|
165
|
+
| `/omcustom:npm-publish` | npm 레지스트리에 패키지 배포 |
|
|
166
|
+
| `/omcustom:npm-version` | 시맨틱 버전 관리 |
|
|
167
|
+
| `/omcustom:npm-audit` | 의존성 감사 |
|
|
168
168
|
| `/codex-exec` | Codex CLI 프롬프트 실행 |
|
|
169
169
|
| `/optimize-analyze` | 번들 및 성능 분석 |
|
|
170
170
|
| `/optimize-bundle` | 번들 크기 최적화 |
|
|
171
171
|
| `/optimize-report` | 최적화 리포트 생성 |
|
|
172
172
|
| `/research` | 10-team 병렬 딥 분석 및 교차 검증 |
|
|
173
173
|
| `/deep-plan` | 연구 검증 기반 계획 수립 (research → plan → verify) |
|
|
174
|
-
| `/sauron-watch` | 전체 R017 검증 |
|
|
174
|
+
| `/omcustom:sauron-watch` | 전체 R017 검증 |
|
|
175
175
|
| `/structured-dev-cycle` | 6단계 구조적 개발 사이클 (Plan → Verify → Implement → Verify → Compound → Done) |
|
|
176
|
-
| `/lists` | 모든 사용 가능한 커맨드 표시 |
|
|
177
|
-
| `/status` | 시스템 상태 표시 |
|
|
178
|
-
| `/help` | 도움말 표시 |
|
|
176
|
+
| `/omcustom:lists` | 모든 사용 가능한 커맨드 표시 |
|
|
177
|
+
| `/omcustom:status` | 시스템 상태 표시 |
|
|
178
|
+
| `/omcustom:help` | 도움말 표시 |
|
|
179
179
|
|
|
180
180
|
## 프로젝트 구조
|
|
181
181
|
|
|
@@ -184,7 +184,7 @@ project/
|
|
|
184
184
|
+-- CLAUDE.md # 진입점
|
|
185
185
|
+-- .claude/
|
|
186
186
|
| +-- agents/ # 서브에이전트 정의 (44 파일)
|
|
187
|
-
| +-- skills/ # 스킬 (
|
|
187
|
+
| +-- skills/ # 스킬 (71 디렉토리)
|
|
188
188
|
| +-- rules/ # 전역 규칙 (R000-R019)
|
|
189
189
|
| +-- hooks/ # 훅 스크립트 (메모리, HUD)
|
|
190
190
|
| +-- contexts/ # 컨텍스트 파일 (ecomode)
|
|
@@ -250,15 +250,15 @@ Claude Code의 Agent Teams 기능이 활성화되어 있으면 (`CLAUDE_CODE_EXP
|
|
|
250
250
|
|
|
251
251
|
```bash
|
|
252
252
|
# 프로젝트 분석
|
|
253
|
-
/analysis
|
|
253
|
+
/omcustom:analysis
|
|
254
254
|
|
|
255
255
|
# 모든 커맨드 표시
|
|
256
|
-
/lists
|
|
256
|
+
/omcustom:lists
|
|
257
257
|
|
|
258
258
|
# 에이전트 관리
|
|
259
|
-
/create-agent my-agent
|
|
260
|
-
/update-docs
|
|
261
|
-
/audit-agents
|
|
259
|
+
/omcustom:create-agent my-agent
|
|
260
|
+
/omcustom:update-docs
|
|
261
|
+
/omcustom:audit-agents
|
|
262
262
|
|
|
263
263
|
# 코드 리뷰
|
|
264
264
|
/dev-review src/main.go
|
|
@@ -268,7 +268,7 @@ Claude Code의 Agent Teams 기능이 활성화되어 있으면 (`CLAUDE_CODE_EXP
|
|
|
268
268
|
/memory-recall authentication
|
|
269
269
|
|
|
270
270
|
# 검증
|
|
271
|
-
/sauron-watch
|
|
271
|
+
/omcustom:sauron-watch
|
|
272
272
|
```
|
|
273
273
|
|
|
274
274
|
## 외부 의존성
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# 워크플로우 패턴
|
|
2
|
+
|
|
3
|
+
AI 에이전트 작업에 적합한 워크플로우 패턴 선택 가이드
|
|
4
|
+
|
|
5
|
+
## 패턴 분류
|
|
6
|
+
|
|
7
|
+
### 1. 순차 체인 (Sequential Chain)
|
|
8
|
+
|
|
9
|
+
**사용 시점**: 각 단계가 이전 출력에 의존하는 순서대로 실행해야 할 때
|
|
10
|
+
**프리미티브**: dag-orchestration (선형 모드)
|
|
11
|
+
**예시**: 입력 파싱 → 변환 → 검증 → 출력
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
[단계 1] 입력 파싱
|
|
15
|
+
↓
|
|
16
|
+
[단계 2] 데이터 변환
|
|
17
|
+
↓
|
|
18
|
+
[단계 3] 결과 검증
|
|
19
|
+
↓
|
|
20
|
+
[단계 4] 출력 생성
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**적합한 경우**:
|
|
24
|
+
- 이전 단계 결과가 다음 단계 입력이 될 때
|
|
25
|
+
- 실패 시 롤백이 필요한 다단계 배포
|
|
26
|
+
- 순서가 보장되어야 하는 데이터 파이프라인
|
|
27
|
+
|
|
28
|
+
### 2. 병렬 팬아웃 (Parallel Fan-Out)
|
|
29
|
+
|
|
30
|
+
**사용 시점**: 공유 상태가 없는 독립적인 하위 작업들
|
|
31
|
+
**프리미티브**: Agent 도구 (R009) 또는 Agent Teams (R018)
|
|
32
|
+
**예시**: 4개 파일 동시 리뷰, 10개 주제 병렬 리서치
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
[오케스트레이터]
|
|
36
|
+
/ | \
|
|
37
|
+
[에이전트 1] [에이전트 2] [에이전트 3]
|
|
38
|
+
\ | /
|
|
39
|
+
[결과 집계]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**적합한 경우**:
|
|
43
|
+
- 파일 간 의존성이 없는 멀티파일 코드 리뷰
|
|
44
|
+
- 여러 주제의 병렬 리서치
|
|
45
|
+
- 독립적인 컴포넌트 생성
|
|
46
|
+
|
|
47
|
+
**에이전트 수에 따른 선택**:
|
|
48
|
+
|
|
49
|
+
| 에이전트 수 | 권장 방법 |
|
|
50
|
+
|------------|---------|
|
|
51
|
+
| 1-2개 | Agent 도구 (R009) |
|
|
52
|
+
| 3개 이상 | Agent Teams (R018) |
|
|
53
|
+
| 리뷰 사이클 포함 | Agent Teams (R018) |
|
|
54
|
+
|
|
55
|
+
### 3. 평가자-최적화기 (Evaluator-Optimizer)
|
|
56
|
+
|
|
57
|
+
**사용 시점**: 반복적인 개선이 필요한 품질 중요 출력
|
|
58
|
+
**프리미티브**: worker-reviewer-pipeline, evaluator-optimizer
|
|
59
|
+
**예시**: 코드 리뷰 → 수정 → 재리뷰 사이클
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
[구현자] → 초안 생성
|
|
63
|
+
↓
|
|
64
|
+
[리뷰어] → 이슈 발견
|
|
65
|
+
↓
|
|
66
|
+
[구현자] → 수정 적용
|
|
67
|
+
↓
|
|
68
|
+
[리뷰어] → 품질 검증 통과?
|
|
69
|
+
├─ NO → 재수정 (max_iterations 까지)
|
|
70
|
+
└─ YES → 완료
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**적합한 경우**:
|
|
74
|
+
- 품질 기준이 명확한 코드 생성
|
|
75
|
+
- 문서 초안 작성 및 개선
|
|
76
|
+
- 반복적인 검증이 필요한 설계 결정
|
|
77
|
+
|
|
78
|
+
**필수 설정**: `max_iterations` 항상 지정 (무한 루프 방지)
|
|
79
|
+
|
|
80
|
+
### 4. 오케스트레이터-워커 (Orchestrator-Workers)
|
|
81
|
+
|
|
82
|
+
**사용 시점**: 중간 결과에 따라 동적 라우팅이 필요한 복잡한 다단계 작업
|
|
83
|
+
**프리미티브**: 라우팅 스킬 (secretary/dev-lead/de-lead/qa-lead)
|
|
84
|
+
**예시**: 사용자 요청 → 의도 감지 → 전문가 라우팅 → 결과 집계
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
[사용자 요청]
|
|
88
|
+
↓
|
|
89
|
+
[오케스트레이터]
|
|
90
|
+
├─ secretary-routing → mgr-*, sys-*
|
|
91
|
+
├─ dev-lead-routing → lang-*, be-*, fe-*
|
|
92
|
+
├─ de-lead-routing → de-*
|
|
93
|
+
└─ qa-lead-routing → qa-*
|
|
94
|
+
↓
|
|
95
|
+
[전문가 에이전트 실행]
|
|
96
|
+
↓
|
|
97
|
+
[결과 집계 → 사용자]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**적합한 경우**:
|
|
101
|
+
- 도메인 전문 지식이 필요한 작업
|
|
102
|
+
- 사전에 필요한 에이전트를 알 수 없는 동적 작업
|
|
103
|
+
- 여러 전문 분야에 걸친 복합 작업
|
|
104
|
+
|
|
105
|
+
## 패턴 선택 결정 트리
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
작업 수신
|
|
109
|
+
├── 단일 단계, 반복 불필요?
|
|
110
|
+
│ └── YES → 직접 실행 (패턴 불필요)
|
|
111
|
+
├── 독립적인 하위 작업 여러 개?
|
|
112
|
+
│ ├── YES, 1-2 에이전트 → 병렬 팬아웃 (Agent 도구)
|
|
113
|
+
│ └── YES, 3+ 에이전트 → 병렬 팬아웃 (Agent Teams)
|
|
114
|
+
├── 품질 중요 출력?
|
|
115
|
+
│ └── YES → 평가자-최적화기
|
|
116
|
+
├── 단계들이 서로 의존?
|
|
117
|
+
│ ├── 선형 의존 → 순차 체인
|
|
118
|
+
│ └── 복잡한 의존 → 오케스트레이터-워커
|
|
119
|
+
└── 동적 라우팅 필요?
|
|
120
|
+
└── YES → 오케스트레이터-워커
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 패턴 조합
|
|
124
|
+
|
|
125
|
+
복잡한 작업은 여러 패턴을 조합하여 구성할 수 있습니다.
|
|
126
|
+
|
|
127
|
+
| 조합 | 예시 |
|
|
128
|
+
|------|------|
|
|
129
|
+
| 병렬 + 평가자-최적화기 | 여러 파일 리뷰, 각각에 리뷰 사이클 적용 |
|
|
130
|
+
| 순차 + 병렬 | 파싱 → 병렬 처리 팬아웃 → 집계 |
|
|
131
|
+
| 오케스트레이터 + 평가자-최적화기 | 전문가 라우팅 → 전문가가 리뷰 사이클 사용 |
|
|
132
|
+
| 병렬 + 순차 | 독립 리서치 팀 → 순차 보고서 합성 |
|
|
133
|
+
|
|
134
|
+
## 안티패턴
|
|
135
|
+
|
|
136
|
+
| 안티패턴 | 문제점 | 수정 방법 |
|
|
137
|
+
|----------|--------|----------|
|
|
138
|
+
| 병렬화 가능한 작업을 순차 실행 | 시간 낭비 | R009 독립성 기준 확인 |
|
|
139
|
+
| 단순 쿼리에 10팀 리서치 적용 | 과도한 토큰 소비 | research "사용 금지 시점" 확인 |
|
|
140
|
+
| 종료 기준 없는 평가자-최적화기 루프 | 무한 반복 위험 | 항상 max_iterations 설정 |
|
|
141
|
+
| 결과 집계 없는 병렬 실행 | 결과 손실 | result-aggregation 스킬 사용 |
|
|
142
|
+
| 전문가가 있는데 general-purpose 사용 | 품질 저하 | R010 위임 규칙 확인 |
|
|
143
|
+
| 오케스트레이터가 직접 파일 수정 | R010 위반 | 전문 에이전트에 위임 |
|
|
144
|
+
|
|
145
|
+
## 비용 고려사항
|
|
146
|
+
|
|
147
|
+
| 패턴 | 상대 비용 | 적합한 시점 |
|
|
148
|
+
|------|----------|------------|
|
|
149
|
+
| 직접 실행 | $ | 단순 작업 |
|
|
150
|
+
| 순차 체인 | $$ | 의존적인 단계들 |
|
|
151
|
+
| 병렬 (2-4 에이전트) | $$$ | 시간 중요 독립 작업 |
|
|
152
|
+
| 평가자-최적화기 (3-5회 반복) | $$$$ | 품질 중요 결과물 |
|
|
153
|
+
| 전체 리서치 (10팀) | $$$$$ | 포괄적 커버리지가 필요한 복잡한 분석 |
|
|
154
|
+
|
|
155
|
+
### 비용 최적화 원칙
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
탐색 → haiku (파일 검색, 구조 파악)
|
|
159
|
+
구현 → sonnet (코딩, 문서 작성)
|
|
160
|
+
판단 → opus (아키텍처 결정, 복잡한 리뷰)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## oh-my-customcode 패턴 매핑
|
|
164
|
+
|
|
165
|
+
| 패턴 | oh-my-customcode 프리미티브 | 규칙 |
|
|
166
|
+
|------|---------------------------|------|
|
|
167
|
+
| 순차 체인 | dag-orchestration (linear) | R010 |
|
|
168
|
+
| 병렬 팬아웃 (소규모) | Agent 도구 | R009 |
|
|
169
|
+
| 병렬 팬아웃 (대규모) | Agent Teams | R018 |
|
|
170
|
+
| 평가자-최적화기 | worker-reviewer-pipeline | R009, R018 |
|
|
171
|
+
| 오케스트레이터-워커 | Routing 스킬 | R010, R015 |
|
|
172
|
+
| 리서치 | /research (10팀 병렬) | R009, R018 |
|
|
173
|
+
| 계획 수립 | /deep-plan (research → plan → verify) | R009, R018 |
|
|
174
|
+
|
|
175
|
+
## 참고 문서
|
|
176
|
+
|
|
177
|
+
- R009: Parallel Execution Rules
|
|
178
|
+
- R010: Orchestrator Coordination Rules
|
|
179
|
+
- R018: Agent Teams Rules
|
|
180
|
+
- `.claude/skills/dag-orchestration/SKILL.md`
|
|
181
|
+
- `.claude/skills/worker-reviewer-pipeline/SKILL.md`
|
|
182
|
+
- `.claude/skills/task-decomposition/SKILL.md`
|
package/templates/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"lastUpdated": "2026-03-
|
|
2
|
+
"version": "0.34.0",
|
|
3
|
+
"lastUpdated": "2026-03-14T00:00:00.000Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "rules",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"name": "skills",
|
|
19
19
|
"path": ".claude/skills",
|
|
20
20
|
"description": "Reusable skill modules (includes slash commands)",
|
|
21
|
-
"files":
|
|
21
|
+
"files": 71
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "guides",
|