oh-my-customcode 0.18.4 → 0.19.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/dist/cli/index.js +0 -3
- package/dist/index.js +0 -3
- package/package.json +1 -1
- package/templates/.claude/hooks/hooks.json +19 -3
- package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +41 -0
- package/templates/.claude/hooks/scripts/git-delegation-guard.sh +36 -0
- package/templates/.claude/hooks/scripts/session-env-check.sh +44 -0
- package/templates/.claude/hooks/scripts/stop-console-audit.sh +46 -0
- package/templates/.claude/rules/MUST-agent-teams.md +16 -14
- package/templates/.claude/rules/MUST-parallel-execution.md +18 -0
- package/templates/.claude/skills/codex-exec/SKILL.md +29 -2
- package/templates/.claude/skills/de-lead-routing/SKILL.md +27 -13
- package/templates/.claude/skills/dev-lead-routing/SKILL.md +30 -14
- package/templates/.claude/skills/intent-detection/patterns/agent-triggers.yaml +30 -2
- package/templates/.claude/skills/qa-lead-routing/SKILL.md +13 -13
- package/templates/.claude/skills/secretary-routing/SKILL.md +13 -13
- package/templates/.claude/skills/structured-dev-cycle/SKILL.md +14 -3
package/dist/cli/index.js
CHANGED
|
@@ -14083,9 +14083,6 @@ async function installComponent(targetDir, component, options) {
|
|
|
14083
14083
|
return false;
|
|
14084
14084
|
}
|
|
14085
14085
|
const templatePath = getComponentPath(component);
|
|
14086
|
-
if (!templatePath) {
|
|
14087
|
-
return false;
|
|
14088
|
-
}
|
|
14089
14086
|
const destPath = join4(targetDir, templatePath);
|
|
14090
14087
|
const destExists = await fileExists(destPath);
|
|
14091
14088
|
if (destExists && !options.force && !options.backup) {
|
package/dist/index.js
CHANGED
|
@@ -980,9 +980,6 @@ async function installComponent(targetDir, component, options) {
|
|
|
980
980
|
return false;
|
|
981
981
|
}
|
|
982
982
|
const templatePath = getComponentPath(component);
|
|
983
|
-
if (!templatePath) {
|
|
984
|
-
return false;
|
|
985
|
-
}
|
|
986
983
|
const destPath = join3(targetDir, templatePath);
|
|
987
984
|
const destExists = await fileExists(destPath);
|
|
988
985
|
if (destExists && !options.force && !options.backup) {
|
package/package.json
CHANGED
|
@@ -72,9 +72,25 @@
|
|
|
72
72
|
{
|
|
73
73
|
"type": "command",
|
|
74
74
|
"command": "bash .claude/hooks/scripts/git-delegation-guard.sh"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "command",
|
|
78
|
+
"command": "bash .claude/hooks/scripts/agent-teams-advisor.sh"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"description": "HUD statusline + R010 git delegation guard + R018 Agent Teams advisor on Task spawn"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"SessionStart": [
|
|
85
|
+
{
|
|
86
|
+
"matcher": "*",
|
|
87
|
+
"hooks": [
|
|
88
|
+
{
|
|
89
|
+
"type": "command",
|
|
90
|
+
"command": "bash .claude/hooks/scripts/session-env-check.sh"
|
|
75
91
|
}
|
|
76
92
|
],
|
|
77
|
-
"description": "
|
|
93
|
+
"description": "Check codex CLI and Agent Teams availability at session start"
|
|
78
94
|
}
|
|
79
95
|
],
|
|
80
96
|
"PostToolUse": [
|
|
@@ -155,10 +171,10 @@
|
|
|
155
171
|
"hooks": [
|
|
156
172
|
{
|
|
157
173
|
"type": "command",
|
|
158
|
-
"command": "
|
|
174
|
+
"command": "bash .claude/hooks/scripts/stop-console-audit.sh"
|
|
159
175
|
}
|
|
160
176
|
],
|
|
161
|
-
"description": "Final
|
|
177
|
+
"description": "Final console.log audit and session diagnostics before session ends"
|
|
162
178
|
}
|
|
163
179
|
]
|
|
164
180
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Agent Teams Advisor Hook
|
|
5
|
+
# Trigger: PreToolUse, tool == "Task"
|
|
6
|
+
# Purpose: Track Task tool usage count per session and warn when Agent Teams may be more appropriate
|
|
7
|
+
# Protocol: stdin JSON -> process -> stdout pass-through, exit 0 always (advisory only)
|
|
8
|
+
|
|
9
|
+
input=$(cat)
|
|
10
|
+
|
|
11
|
+
# Extract task info from input
|
|
12
|
+
agent_type=$(echo "$input" | jq -r '.tool_input.subagent_type // "unknown"')
|
|
13
|
+
prompt_preview=$(echo "$input" | jq -r '.tool_input.description // ""' | head -c 60)
|
|
14
|
+
|
|
15
|
+
# Session-scoped counter using parent PID as session identifier
|
|
16
|
+
COUNTER_FILE="/tmp/.claude-task-count-${PPID}"
|
|
17
|
+
|
|
18
|
+
# Read and increment counter
|
|
19
|
+
if [ -f "$COUNTER_FILE" ]; then
|
|
20
|
+
COUNT=$(cat "$COUNTER_FILE")
|
|
21
|
+
COUNT=$((COUNT + 1))
|
|
22
|
+
else
|
|
23
|
+
COUNT=1
|
|
24
|
+
fi
|
|
25
|
+
echo "$COUNT" > "$COUNTER_FILE"
|
|
26
|
+
|
|
27
|
+
# Warn from 2nd Task call onward -- Agent Teams may be more appropriate
|
|
28
|
+
if [ "$COUNT" -ge 2 ]; then
|
|
29
|
+
echo "" >&2
|
|
30
|
+
echo "--- [R018 Advisor] Task tool call #${COUNT} in this session ---" >&2
|
|
31
|
+
echo " WARNING: Multiple Task calls detected. Consider Agent Teams if:" >&2
|
|
32
|
+
echo " * 3+ agents needed for this work" >&2
|
|
33
|
+
echo " * Review -> fix -> re-review cycle exists" >&2
|
|
34
|
+
echo " * Agents need shared state or coordination" >&2
|
|
35
|
+
echo " Current: Task(${agent_type}) -- ${prompt_preview}" >&2
|
|
36
|
+
echo "-----------------------------------------------------------" >&2
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Always pass through -- advisory only, never blocks
|
|
40
|
+
echo "$input"
|
|
41
|
+
exit 0
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# R010 git-delegation-guard hook
|
|
3
|
+
# Warns when git operations are delegated to a non-mgr-gitnerd agent via Task tool.
|
|
4
|
+
# WARN only - does NOT block (exit 0, passes input through).
|
|
5
|
+
|
|
6
|
+
input=$(cat)
|
|
7
|
+
|
|
8
|
+
agent_type=$(echo "$input" | jq -r '.tool_input.subagent_type // ""')
|
|
9
|
+
prompt=$(echo "$input" | jq -r '.tool_input.prompt // ""')
|
|
10
|
+
|
|
11
|
+
# Only warn when the delegated agent is NOT mgr-gitnerd
|
|
12
|
+
if [ "$agent_type" != "mgr-gitnerd" ]; then
|
|
13
|
+
git_keywords=(
|
|
14
|
+
"git commit"
|
|
15
|
+
"git push"
|
|
16
|
+
"git revert"
|
|
17
|
+
"git merge"
|
|
18
|
+
"git rebase"
|
|
19
|
+
"git checkout"
|
|
20
|
+
"git branch"
|
|
21
|
+
"git reset"
|
|
22
|
+
"git cherry-pick"
|
|
23
|
+
"git tag"
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
for keyword in "${git_keywords[@]}"; do
|
|
27
|
+
if echo "$prompt" | grep -qi "$keyword"; then
|
|
28
|
+
echo "[Hook] WARNING: R010 violation detected - git operation ('$keyword') delegated to '$agent_type' instead of 'mgr-gitnerd'" >&2
|
|
29
|
+
echo "[Hook] Per R010, all git operations (commit/push/branch/merge/etc.) MUST be delegated to mgr-gitnerd" >&2
|
|
30
|
+
break
|
|
31
|
+
fi
|
|
32
|
+
done
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Always pass through - this hook is advisory only
|
|
36
|
+
echo "$input"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Session Environment Check Hook
|
|
5
|
+
# Trigger: SessionStart
|
|
6
|
+
# Purpose: Check availability of codex CLI and Agent Teams, report via stderr
|
|
7
|
+
# Protocol: stdin JSON -> stdout pass-through, exit 0 always
|
|
8
|
+
|
|
9
|
+
input=$(cat)
|
|
10
|
+
|
|
11
|
+
echo "" >&2
|
|
12
|
+
echo "--- [Session Environment Check] ---" >&2
|
|
13
|
+
|
|
14
|
+
# Check codex CLI availability
|
|
15
|
+
CODEX_STATUS="unavailable"
|
|
16
|
+
if command -v codex >/dev/null 2>&1; then
|
|
17
|
+
if [ -n "${OPENAI_API_KEY:-}" ]; then
|
|
18
|
+
CODEX_STATUS="available (authenticated)"
|
|
19
|
+
else
|
|
20
|
+
CODEX_STATUS="installed but OPENAI_API_KEY not set"
|
|
21
|
+
fi
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Check Agent Teams availability
|
|
25
|
+
AGENT_TEAMS_STATUS="disabled"
|
|
26
|
+
if [ "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-0}" = "1" ]; then
|
|
27
|
+
AGENT_TEAMS_STATUS="enabled"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Write status to file for other hooks to reference
|
|
31
|
+
STATUS_FILE="/tmp/.claude-env-status-${PPID}"
|
|
32
|
+
cat > "$STATUS_FILE" << ENVEOF
|
|
33
|
+
codex=${CODEX_STATUS}
|
|
34
|
+
agent_teams=${AGENT_TEAMS_STATUS}
|
|
35
|
+
ENVEOF
|
|
36
|
+
|
|
37
|
+
# Report to stderr (visible in conversation)
|
|
38
|
+
echo " codex CLI: ${CODEX_STATUS}" >&2
|
|
39
|
+
echo " Agent Teams: ${AGENT_TEAMS_STATUS}" >&2
|
|
40
|
+
echo "------------------------------------" >&2
|
|
41
|
+
|
|
42
|
+
# Pass through
|
|
43
|
+
echo "$input"
|
|
44
|
+
exit 0
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Stop hook: Final audit for console.log and session diagnostics
|
|
3
|
+
# Always exits 0 (never blocks session termination)
|
|
4
|
+
# Ref: https://github.com/baekenough/oh-my-customcode/issues/206
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
input=$(cat)
|
|
9
|
+
|
|
10
|
+
# --- Session diagnostics ---
|
|
11
|
+
# Output session status for debugging stop evaluator false positives
|
|
12
|
+
echo "[Stop] Session termination audit starting..." >&2
|
|
13
|
+
|
|
14
|
+
# Check for background task output files (helps diagnose evaluator false positives)
|
|
15
|
+
bg_task_files=$(find /tmp -maxdepth 1 -name "claude-*.output" 2>/dev/null | wc -l | tr -d ' ')
|
|
16
|
+
if [ "$bg_task_files" -gt 0 ]; then
|
|
17
|
+
echo "[Stop] Background task output files found: ${bg_task_files} (informational only — these are normal)" >&2
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# --- Console.log audit ---
|
|
21
|
+
if git rev-parse --git-dir > /dev/null 2>&1; then
|
|
22
|
+
modified_files=$(git diff --name-only HEAD 2>/dev/null | grep -E '\.(ts|tsx|js|jsx)$' || true)
|
|
23
|
+
|
|
24
|
+
if [ -n "$modified_files" ]; then
|
|
25
|
+
has_console=false
|
|
26
|
+
while IFS= read -r file; do
|
|
27
|
+
if [ -f "$file" ]; then
|
|
28
|
+
if grep -q "console\.log" "$file" 2>/dev/null; then
|
|
29
|
+
echo "[Stop] WARNING: console.log found in $file" >&2
|
|
30
|
+
has_console=true
|
|
31
|
+
fi
|
|
32
|
+
fi
|
|
33
|
+
done <<< "$modified_files"
|
|
34
|
+
|
|
35
|
+
if [ "$has_console" = true ]; then
|
|
36
|
+
echo "[Stop] Remove console.log statements before committing" >&2
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
echo "[Stop] Audit complete. Session safe to terminate." >&2
|
|
42
|
+
|
|
43
|
+
# CRITICAL: Always pass through input and exit 0
|
|
44
|
+
# This hook MUST NEVER block session termination
|
|
45
|
+
echo "$input"
|
|
46
|
+
exit 0
|
|
@@ -35,16 +35,16 @@ BEFORE using Task tool for 2+ agent tasks, this check is **ENFORCED**:
|
|
|
35
35
|
║ YES → MUST check criteria #2-#5 ║
|
|
36
36
|
║ NO → Proceed with Task tool ║
|
|
37
37
|
║ ║
|
|
38
|
-
║ 2.
|
|
39
|
-
║
|
|
40
|
-
║
|
|
41
|
-
║ 5. Is research requiring synthesis? → Agent Teams ║
|
|
38
|
+
║ 2. Will 3+ agents be involved? ║
|
|
39
|
+
║ YES → MUST use Agent Teams ║
|
|
40
|
+
║ NO → Check #3 ║
|
|
42
41
|
║ ║
|
|
43
|
-
║
|
|
44
|
-
║
|
|
45
|
-
║ →
|
|
42
|
+
║ 3. Is there a review → fix → re-review cycle? ║
|
|
43
|
+
║ YES → MUST use Agent Teams ║
|
|
44
|
+
║ NO → Proceed with Task tool ║
|
|
46
45
|
║ ║
|
|
47
|
-
║
|
|
46
|
+
║ Simple rule: 3+ agents OR review cycle → Agent Teams ║
|
|
47
|
+
║ Everything else → Task tool ║
|
|
48
48
|
╚══════════════════════════════════════════════════════════════════╝
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -156,12 +156,14 @@ TeamCreate → TaskCreate → Task(spawn members) → SendMessage(coordinate)
|
|
|
156
156
|
|
|
157
157
|
## Fallback
|
|
158
158
|
|
|
159
|
-
When Agent Teams unavailable: use Task tool with R009/R010 rules.
|
|
159
|
+
When Agent Teams unavailable: use Task tool with R009/R010 rules.
|
|
160
|
+
When Agent Teams available: actively prefer it for qualifying tasks. This is not optional.
|
|
160
161
|
|
|
161
162
|
## Cost Awareness
|
|
162
163
|
|
|
163
|
-
Agent Teams
|
|
164
|
-
-
|
|
165
|
-
- No
|
|
166
|
-
- Simple independent subtasks
|
|
167
|
-
|
|
164
|
+
Agent Teams actively preferred for qualifying collaborative tasks. Use Task tool only when:
|
|
165
|
+
- 1-2 agents with no inter-dependency
|
|
166
|
+
- No review → fix cycles
|
|
167
|
+
- Simple independent subtasks
|
|
168
|
+
|
|
169
|
+
Do NOT avoid Agent Teams solely for cost reasons when criteria are met.
|
|
@@ -15,12 +15,30 @@ Independent (MUST parallelize):
|
|
|
15
15
|
|
|
16
16
|
Examples: creating multiple agents, reviewing multiple files, batch operations on different resources.
|
|
17
17
|
|
|
18
|
+
## Agent Teams Gate (R018 Integration)
|
|
19
|
+
|
|
20
|
+
Before spawning parallel Task instances, evaluate Agent Teams eligibility:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
2+ independent tasks detected
|
|
24
|
+
↓
|
|
25
|
+
Is Agent Teams available? (env or tools check)
|
|
26
|
+
├─ NO → Proceed with Task tool (standard R009)
|
|
27
|
+
└─ YES → Check eligibility:
|
|
28
|
+
├─ 3+ agents needed? → Agent Teams (MUST)
|
|
29
|
+
├─ Review → fix cycle? → Agent Teams (MUST)
|
|
30
|
+
└─ Neither → Task tool (standard R009)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This gate is MANDATORY when Agent Teams is enabled. Skipping it is a violation of both R009 and R018.
|
|
34
|
+
|
|
18
35
|
## Self-Check
|
|
19
36
|
|
|
20
37
|
Before writing/editing multiple files:
|
|
21
38
|
1. Are files independent? → YES: spawn parallel Task agents
|
|
22
39
|
2. Using Write/Edit sequentially for 2+ files? → STOP, parallelize
|
|
23
40
|
3. Specialized agent available? → Use it (not general-purpose)
|
|
41
|
+
4. Agent Teams available + 3+ agents or review cycle? → YES: use Agent Teams instead of Task
|
|
24
42
|
|
|
25
43
|
### Common Violations to Avoid
|
|
26
44
|
|
|
@@ -134,7 +134,7 @@ codex-exec requires the Codex CLI binary to be installed and authenticated. The
|
|
|
134
134
|
|
|
135
135
|
If either check fails, this skill cannot be used. Fall back to Claude agents for the task.
|
|
136
136
|
|
|
137
|
-
> **Note**:
|
|
137
|
+
> **Note**: This skill is invoked via `/codex-exec` command, delegated by the orchestrator, or suggested by routing skills when codex is available. The intent-detection system can trigger it for research (xhigh) and code generation (hybrid) workflows.
|
|
138
138
|
|
|
139
139
|
## Agent Teams Integration
|
|
140
140
|
|
|
@@ -154,7 +154,7 @@ Orchestrator delegates generation task
|
|
|
154
154
|
|
|
155
155
|
## Research Workflow
|
|
156
156
|
|
|
157
|
-
When the orchestrator detects a research/information gathering request:
|
|
157
|
+
When the orchestrator or intent-detection detects a research/information gathering request (routing_rule in agent-triggers.yaml):
|
|
158
158
|
|
|
159
159
|
1. **Check Codex availability**: Verify `codex` binary and `OPENAI_API_KEY`
|
|
160
160
|
2. **If available**: Execute with xhigh reasoning effort for thorough research
|
|
@@ -175,3 +175,30 @@ When the orchestrator detects a research/information gathering request:
|
|
|
175
175
|
| medium | General tasks | Balanced | Standard |
|
|
176
176
|
| high | Complex analysis | Slower | Deep |
|
|
177
177
|
| xhigh | Research & investigation | Slowest | Maximum |
|
|
178
|
+
|
|
179
|
+
## Code Generation Workflow
|
|
180
|
+
|
|
181
|
+
When routing skills detect a code generation task and codex is available:
|
|
182
|
+
|
|
183
|
+
1. **Check availability**: Verify codex CLI via `/tmp/.claude-env-status-*`
|
|
184
|
+
2. **If available + new file creation**: Suggest hybrid workflow
|
|
185
|
+
3. **Hybrid pattern**:
|
|
186
|
+
- codex-exec generates initial code (fast, broad generation)
|
|
187
|
+
- Claude expert reviews for quality, patterns, best practices
|
|
188
|
+
- Iterate if needed
|
|
189
|
+
|
|
190
|
+
### Suitable Tasks
|
|
191
|
+
- New file scaffolding
|
|
192
|
+
- Boilerplate generation
|
|
193
|
+
- Test stub creation
|
|
194
|
+
- Documentation generation
|
|
195
|
+
|
|
196
|
+
### Unsuitable Tasks
|
|
197
|
+
- Modifying existing code (Claude expert better at understanding context)
|
|
198
|
+
- Architecture decisions (requires reasoning, not generation)
|
|
199
|
+
- Bug fixes (requires deep code understanding)
|
|
200
|
+
|
|
201
|
+
### Code Generation Command Pattern
|
|
202
|
+
```
|
|
203
|
+
/codex-exec "Generate {description} following {framework} best practices" --effort high --full-auto
|
|
204
|
+
```
|
|
@@ -45,6 +45,33 @@ Routes data engineering tasks to appropriate DE expert agents. This skill contai
|
|
|
45
45
|
| Kafka configs, `*.properties` (Kafka), `streams/*.java` | de-kafka-expert |
|
|
46
46
|
| Snowflake SQL, warehouse DDL | de-snowflake-expert |
|
|
47
47
|
|
|
48
|
+
## Routing Decision (Priority Order)
|
|
49
|
+
|
|
50
|
+
Before routing via Task tool, evaluate in this order:
|
|
51
|
+
|
|
52
|
+
### Step 1: Agent Teams Eligibility (R018)
|
|
53
|
+
Check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
|
|
54
|
+
|
|
55
|
+
| Scenario | Preferred |
|
|
56
|
+
|----------|-----------|
|
|
57
|
+
| Single-tool DE task | Task Tool |
|
|
58
|
+
| Multi-tool pipeline design (3+ tools) | Agent Teams |
|
|
59
|
+
| Cross-tool data quality analysis | Agent Teams |
|
|
60
|
+
| Quick DAG/model validation | Task Tool |
|
|
61
|
+
|
|
62
|
+
### Step 2: Codex-Exec Hybrid (Code Generation)
|
|
63
|
+
For **new pipeline code**, **DAG scaffolding**, or **SQL model generation**:
|
|
64
|
+
|
|
65
|
+
1. Check `/tmp/.claude-env-status-*` for codex availability
|
|
66
|
+
2. If codex available → suggest hybrid workflow for code generation
|
|
67
|
+
3. If codex unavailable → use DE expert directly
|
|
68
|
+
|
|
69
|
+
**Suitable**: New DAG files, dbt model scaffolding, SQL template generation
|
|
70
|
+
**Unsuitable**: Existing pipeline modification, architecture decisions, data quality analysis
|
|
71
|
+
|
|
72
|
+
### Step 3: Expert Selection
|
|
73
|
+
Route to appropriate DE expert based on tool/framework detection.
|
|
74
|
+
|
|
48
75
|
## Command Routing
|
|
49
76
|
|
|
50
77
|
```
|
|
@@ -242,19 +269,6 @@ Delegate to mgr-creator with context:
|
|
|
242
269
|
- Unfamiliar data formats or connectors
|
|
243
270
|
- Data tool detected in project but no specialist agent
|
|
244
271
|
|
|
245
|
-
## Agent Teams Awareness
|
|
246
|
-
|
|
247
|
-
Before routing via Task tool, check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
|
|
248
|
-
|
|
249
|
-
**Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
|
|
250
|
-
|
|
251
|
-
| Scenario | Preferred |
|
|
252
|
-
|----------|-----------|
|
|
253
|
-
| Single-tool DE task | Task Tool |
|
|
254
|
-
| Multi-tool pipeline design (3+ tools) | Agent Teams |
|
|
255
|
-
| Cross-tool data quality analysis | Agent Teams |
|
|
256
|
-
| Quick DAG/model validation | Task Tool |
|
|
257
|
-
|
|
258
272
|
## Usage
|
|
259
273
|
|
|
260
274
|
This skill is NOT user-invocable. It should be automatically triggered when the main conversation detects data engineering intent.
|
|
@@ -73,6 +73,36 @@ user-invocable: false
|
|
|
73
73
|
| Code review/implementation | sonnet |
|
|
74
74
|
| Quick validation/search | haiku |
|
|
75
75
|
|
|
76
|
+
## Routing Decision (Priority Order)
|
|
77
|
+
|
|
78
|
+
Before selecting an expert agent, evaluate in this order:
|
|
79
|
+
|
|
80
|
+
### Step 1: Agent Teams Eligibility (R018)
|
|
81
|
+
Check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
|
|
82
|
+
|
|
83
|
+
| Scenario | Preferred |
|
|
84
|
+
|----------|-----------|
|
|
85
|
+
| Single-language review | Task Tool |
|
|
86
|
+
| Multi-language code review (3+) | Agent Teams |
|
|
87
|
+
| Code review + fix cycle | Agent Teams |
|
|
88
|
+
| Cross-layer debugging (FE + BE + DB) | Agent Teams |
|
|
89
|
+
| Simple file search/validation | Task Tool |
|
|
90
|
+
|
|
91
|
+
### Step 2: Codex-Exec Hybrid (Implementation Tasks)
|
|
92
|
+
For **new file creation**, **boilerplate**, or **test code generation**:
|
|
93
|
+
|
|
94
|
+
1. Check `/tmp/.claude-env-status-*` for codex availability
|
|
95
|
+
2. If codex available → suggest hybrid workflow:
|
|
96
|
+
- codex-exec generates initial code (strength: fast generation)
|
|
97
|
+
- Claude expert reviews and refines (strength: reasoning, quality)
|
|
98
|
+
3. If codex unavailable → use Claude expert directly
|
|
99
|
+
|
|
100
|
+
**Suitable**: New file creation, boilerplate, scaffolding, test code
|
|
101
|
+
**Unsuitable**: Existing code modification, architecture decisions, bug fixes
|
|
102
|
+
|
|
103
|
+
### Step 3: Expert Agent Selection
|
|
104
|
+
Route to appropriate language/framework expert based on file extension and keyword mapping.
|
|
105
|
+
|
|
76
106
|
## Routing Rules
|
|
77
107
|
|
|
78
108
|
Multi-language: detect all languages, route to parallel experts (max 4). Single-language: route to matching expert. Cross-layer (frontend + backend): multiple experts in parallel.
|
|
@@ -100,18 +130,4 @@ Delegate to mgr-creator with context:
|
|
|
100
130
|
- New framework keyword (e.g., "Flutter 앱 리뷰해줘", "Rails API 만들어줘")
|
|
101
131
|
- Language detected but no specialist exists
|
|
102
132
|
|
|
103
|
-
## Agent Teams Awareness
|
|
104
|
-
|
|
105
|
-
Before routing via Task tool, check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
|
|
106
|
-
|
|
107
|
-
**Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
|
|
108
|
-
|
|
109
|
-
| Scenario | Preferred |
|
|
110
|
-
|----------|-----------|
|
|
111
|
-
| Single-language review | Task Tool |
|
|
112
|
-
| Multi-language code review (3+) | Agent Teams |
|
|
113
|
-
| Code review + fix cycle | Agent Teams |
|
|
114
|
-
| Cross-layer debugging (FE + BE + DB) | Agent Teams |
|
|
115
|
-
| Simple file search/validation | Task Tool |
|
|
116
|
-
|
|
117
133
|
Not user-invocable. Auto-triggered on development intent.
|
|
@@ -322,7 +322,36 @@ agents:
|
|
|
322
322
|
- gather
|
|
323
323
|
base_confidence: 50
|
|
324
324
|
action_weight: 30
|
|
325
|
-
|
|
325
|
+
routing_rule: "MUST use codex-exec --effort xhigh when codex available, fallback to WebFetch/WebSearch"
|
|
326
|
+
|
|
327
|
+
# ---------------------------------------------------------------------------
|
|
328
|
+
# Code Generation (hybrid workflow, skill-based)
|
|
329
|
+
# ---------------------------------------------------------------------------
|
|
330
|
+
code-generation-workflow:
|
|
331
|
+
keywords:
|
|
332
|
+
korean:
|
|
333
|
+
- 구현
|
|
334
|
+
- 만들어
|
|
335
|
+
- 생성해
|
|
336
|
+
- 작성해
|
|
337
|
+
- 스캐폴딩
|
|
338
|
+
- 보일러플레이트
|
|
339
|
+
english:
|
|
340
|
+
- implement
|
|
341
|
+
- create
|
|
342
|
+
- generate
|
|
343
|
+
- scaffold
|
|
344
|
+
- boilerplate
|
|
345
|
+
- "write code"
|
|
346
|
+
file_patterns: []
|
|
347
|
+
supported_actions:
|
|
348
|
+
- implement
|
|
349
|
+
- create
|
|
350
|
+
- generate
|
|
351
|
+
- scaffold
|
|
352
|
+
base_confidence: 30
|
|
353
|
+
action_weight: 25
|
|
354
|
+
routing_rule: "Suggest codex-exec hybrid when codex available and task is new file creation"
|
|
326
355
|
|
|
327
356
|
# Managers (continued)
|
|
328
357
|
mgr-gitnerd:
|
|
@@ -374,4 +403,3 @@ agents:
|
|
|
374
403
|
file_patterns: []
|
|
375
404
|
supported_actions: [manage, create, coordinate]
|
|
376
405
|
base_confidence: 40
|
|
377
|
-
|
|
@@ -18,6 +18,19 @@ Coordinates QA team activities by routing tasks to qa-planner, qa-writer, and qa
|
|
|
18
18
|
| qa-writer | Documentation | Test cases, test reports, templates |
|
|
19
19
|
| qa-engineer | Execution | Test results, defect reports, coverage reports |
|
|
20
20
|
|
|
21
|
+
## Routing Decision (Priority Order)
|
|
22
|
+
|
|
23
|
+
Before routing via Task tool, evaluate Agent Teams eligibility first:
|
|
24
|
+
|
|
25
|
+
**Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
|
|
26
|
+
|
|
27
|
+
| Scenario | Preferred |
|
|
28
|
+
|----------|-----------|
|
|
29
|
+
| Single QA phase (plan/write/execute) | Task Tool |
|
|
30
|
+
| Full QA cycle (plan + write + execute + report) | Agent Teams |
|
|
31
|
+
| Quality analysis (parallel strategy + results) | Agent Teams |
|
|
32
|
+
| Quick test validation | Task Tool |
|
|
33
|
+
|
|
21
34
|
## Command Routing
|
|
22
35
|
|
|
23
36
|
```
|
|
@@ -287,19 +300,6 @@ Delegate to mgr-creator with context:
|
|
|
287
300
|
- Specialized QA methodologies (e.g., "뮤테이션 테스트 전략 만들어줘")
|
|
288
301
|
- Performance/security testing tools not covered by existing agents
|
|
289
302
|
|
|
290
|
-
## Agent Teams Awareness
|
|
291
|
-
|
|
292
|
-
Before routing via Task tool, check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
|
|
293
|
-
|
|
294
|
-
**Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
|
|
295
|
-
|
|
296
|
-
| Scenario | Preferred |
|
|
297
|
-
|----------|-----------|
|
|
298
|
-
| Single QA phase (plan/write/execute) | Task Tool |
|
|
299
|
-
| Full QA cycle (plan + write + execute + report) | Agent Teams |
|
|
300
|
-
| Quality analysis (parallel strategy + results) | Agent Teams |
|
|
301
|
-
| Quick test validation | Task Tool |
|
|
302
|
-
|
|
303
303
|
## Usage
|
|
304
304
|
|
|
305
305
|
This skill is NOT user-invocable. It should be automatically triggered when the main conversation detects QA intent.
|
|
@@ -23,6 +23,19 @@ Routes agent management tasks to the appropriate manager agent. This skill conta
|
|
|
23
23
|
| sys-memory-keeper | Memory operations | "save memory", "recall", "memory search" |
|
|
24
24
|
| sys-naggy | TODO management | "todo", "track tasks", "task list" |
|
|
25
25
|
|
|
26
|
+
## Routing Decision (Priority Order)
|
|
27
|
+
|
|
28
|
+
Before routing via Task tool, evaluate Agent Teams eligibility first:
|
|
29
|
+
|
|
30
|
+
**Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
|
|
31
|
+
|
|
32
|
+
| Scenario | Preferred |
|
|
33
|
+
|----------|-----------|
|
|
34
|
+
| Single manager task | Task Tool |
|
|
35
|
+
| Batch agent creation (3+) | Agent Teams |
|
|
36
|
+
| Multi-round verification (sauron) | Task Tool |
|
|
37
|
+
| Agent audit + fix cycle | Agent Teams |
|
|
38
|
+
|
|
26
39
|
## Command Routing
|
|
27
40
|
|
|
28
41
|
```
|
|
@@ -76,19 +89,6 @@ When command requires multiple independent operations:
|
|
|
76
89
|
| sys-memory-keeper | sonnet | Memory operations, search |
|
|
77
90
|
| sys-naggy | haiku | Simple TODO tracking |
|
|
78
91
|
|
|
79
|
-
## Agent Teams Awareness
|
|
80
|
-
|
|
81
|
-
Before routing via Task tool, check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
|
|
82
|
-
|
|
83
|
-
**Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
|
|
84
|
-
|
|
85
|
-
| Scenario | Preferred |
|
|
86
|
-
|----------|-----------|
|
|
87
|
-
| Single manager task | Task Tool |
|
|
88
|
-
| Batch agent creation (3+) | Agent Teams |
|
|
89
|
-
| Multi-round verification (sauron) | Task Tool |
|
|
90
|
-
| Agent audit + fix cycle | Agent Teams |
|
|
91
|
-
|
|
92
92
|
## No Match Fallback
|
|
93
93
|
|
|
94
94
|
When no manager agent matches the request but the task is clearly management-related:
|
|
@@ -77,6 +77,15 @@ A PreToolUse hook in `.claude/hooks/hooks.json` checks this marker and blocks Wr
|
|
|
77
77
|
└── Output: Implementation complete
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
**Codex-Exec Hybrid Option**: When entering Stage 3:
|
|
81
|
+
1. Check `/tmp/.claude-env-status-*` for codex CLI availability
|
|
82
|
+
2. If available AND task involves new file creation:
|
|
83
|
+
- Suggest: `[Codex Hybrid Available] New file generation can use codex-exec for faster scaffolding. Orchestrator may delegate initial code generation to codex-exec, then have Claude expert review.`
|
|
84
|
+
3. If unavailable → proceed with standard implementation via Claude experts
|
|
85
|
+
|
|
86
|
+
Suitable for codex hybrid: new files, boilerplate, test stubs, scaffolding
|
|
87
|
+
Not suitable: modifying existing code, architecture-dependent changes
|
|
88
|
+
|
|
80
89
|
**Exit criteria**: All planned files created/modified, tests written.
|
|
81
90
|
|
|
82
91
|
### Stage 4: Verify Implementation
|
|
@@ -127,12 +136,14 @@ Stage 2 (Verify Plan) and Stage 4 (Verify Implementation) can invoke the `multi-
|
|
|
127
136
|
The stage marker file (`/tmp/.claude-dev-stage`) is read by a PreToolUse hook that enforces tool restrictions. This provides a safety net beyond instruction-based compliance.
|
|
128
137
|
|
|
129
138
|
### With Agent Teams
|
|
130
|
-
For complex tasks,
|
|
139
|
+
For complex tasks, Agent Teams is **preferred** when available (R018):
|
|
131
140
|
- Plan: architect agent
|
|
132
|
-
- Verify: reviewer agent(s)
|
|
133
|
-
- Implement: domain expert agent
|
|
141
|
+
- Verify: reviewer agent(s) — multi-model-verification via Agent Teams
|
|
142
|
+
- Implement: domain expert agent (+ codex-exec hybrid if available)
|
|
134
143
|
- Compound: QA agent
|
|
135
144
|
|
|
145
|
+
When Agent Teams is enabled AND task involves 3+ agents or review→fix cycles, using Agent Teams is MANDATORY per R018.
|
|
146
|
+
|
|
136
147
|
## When to Use
|
|
137
148
|
|
|
138
149
|
| Task Complexity | Recommended Cycle |
|