oh-my-customcode 0.18.4 → 0.19.3

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 CHANGED
@@ -124,7 +124,7 @@ Claude Code selects the appropriate model and parallelizes independent tasks (up
124
124
  | **QA** | 3 | qa-planner, qa-writer, qa-engineer |
125
125
  | **Total** | **41** | |
126
126
 
127
- ### Skills (55)
127
+ ### Skills (56)
128
128
 
129
129
  | Category | Count | Skills |
130
130
  |----------|-------|--------|
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
- "version": "0.18.4",
3
+ "version": "0.19.3",
4
4
  "description": "Batteries-included agent harness for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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": "HUD statusline + R010 git delegation guard on Task spawn"
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": "#!/bin/bash\ninput=$(cat)\n\nif git rev-parse --git-dir > /dev/null 2>&1; then\n modified_files=$(git diff --name-only HEAD 2>/dev/null | grep -E '\\.(ts|tsx|js|jsx)$' || true)\n \n if [ -n \"$modified_files\" ]; then\n has_console=false\n while IFS= read -r file; do\n if [ -f \"$file\" ]; then\n if grep -q \"console\\.log\" \"$file\" 2>/dev/null; then\n echo \"[Hook] WARNING: console.log found in $file\" >&2\n has_console=true\n fi\n fi\n done <<< \"$modified_files\"\n \n if [ \"$has_console\" = true ]; then\n echo \"[Hook] Remove console.log statements before committing\" >&2\n fi\n fi\nfi\n\necho \"$input\""
174
+ "command": "bash .claude/hooks/scripts/stop-console-audit.sh"
159
175
  }
160
176
  ],
161
- "description": "Final audit for console.log in modified files before session ends"
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. Do 2+ agents need to coordinate? → Agent Teams
39
- 3. Is there a review/fix/iterate cycle? → Agent Teams
40
- 4. Do agents need shared state? Agent Teams
41
- ║ 5. Is research requiring synthesis? → Agent Teams ║
38
+ ║ 2. Will 3+ agents be involved?
39
+ YES MUST use Agent Teams
40
+ NOCheck #3
42
41
  ║ ║
43
- If YES to #1 AND any of #2-#5:
44
- → MUST use Agent Teams
45
- ║ → Using Task tool instead is a VIOLATION
42
+ 3. Is there a review fix → re-review cycle?
43
+ YES → MUST use Agent Teams
44
+ NOProceed with Task tool
46
45
  ║ ║
47
- Exception: Cost-sensitive batch ops with no inter-agent need
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. Both approaches produce results; Agent Teams adds coordination richness.
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 uses more tokens (full context per member + message passing). Use Task tool when:
164
- - Task takes < 3 minutes
165
- - No inter-agent communication needed
166
- - Simple independent subtasks only
167
- - Cost is the primary concern
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
 
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: analysis
3
+ description: Analyze project and auto-configure agents, skills, rules, and guides
4
+ argument-hint: "[--dry-run] [--verbose]"
5
+ ---
6
+
7
+ # Project Analysis Skill
8
+
9
+ Scan a project's tech stack, compare against installed agents/skills, and auto-configure missing items.
10
+
11
+ ## Options
12
+
13
+ ```
14
+ --dry-run Show what would be added without making changes
15
+ --verbose Show detailed detection reasoning
16
+ ```
17
+
18
+ ## Workflow
19
+
20
+ ### Step 1: Project Scan
21
+
22
+ Detect tech stack by checking indicator files and dependency manifests.
23
+
24
+ | Indicator | Files to Check | Agent | Skill |
25
+ |-----------|---------------|-------|-------|
26
+ | TypeScript | tsconfig.json, *.ts, *.tsx | lang-typescript-expert | typescript-best-practices |
27
+ | React/Next.js | next.config.*, package.json (next dep) | fe-vercel-agent | react-best-practices |
28
+ | Vue.js | vue.config.*, *.vue | fe-vuejs-agent | - |
29
+ | Svelte | svelte.config.*, *.svelte | fe-svelte-agent | - |
30
+ | Python | pyproject.toml, requirements.txt, *.py | lang-python-expert | python-best-practices |
31
+ | FastAPI | "fastapi" in imports/deps | be-fastapi-expert | fastapi-best-practices |
32
+ | Go | go.mod, *.go | lang-golang-expert | go-best-practices |
33
+ | Go Backend | go.mod + cmd/ or internal/ dirs | be-go-backend-expert | go-backend-best-practices |
34
+ | Rust | Cargo.toml, *.rs | lang-rust-expert | rust-best-practices |
35
+ | Kotlin | *.kt, build.gradle.kts | lang-kotlin-expert | kotlin-best-practices |
36
+ | Java | *.java, pom.xml | lang-java21-expert | - |
37
+ | Spring Boot | spring-boot in deps | be-springboot-expert | springboot-best-practices |
38
+ | Express.js | "express" in deps | be-express-expert | - |
39
+ | NestJS | "@nestjs" in deps | be-nestjs-expert | - |
40
+ | Docker | Dockerfile, compose.yml | infra-docker-expert | docker-best-practices |
41
+ | AWS | CDK/SAM/CloudFormation files | infra-aws-expert | aws-best-practices |
42
+ | PostgreSQL | *.sql, pg in deps | db-postgres-expert | postgres-best-practices |
43
+ | Redis | redis in deps | db-redis-expert | redis-best-practices |
44
+ | Supabase | supabase in deps/config | db-supabase-expert | supabase-postgres-best-practices |
45
+ | Airflow | dags/*.py, airflow in deps | de-airflow-expert | airflow-best-practices |
46
+ | dbt | dbt_project.yml | de-dbt-expert | dbt-best-practices |
47
+ | Kafka | kafka in deps/config | de-kafka-expert | kafka-best-practices |
48
+ | Spark | spark in deps/config | de-spark-expert | spark-best-practices |
49
+ | Snowflake | snowflake in deps/config | de-snowflake-expert | snowflake-best-practices |
50
+
51
+ **Detection logic:**
52
+
53
+ ```
54
+ 1. Read package.json / go.mod / Cargo.toml / pyproject.toml / pom.xml
55
+ 2. Glob for indicator files (tsconfig.json, *.vue, Dockerfile, etc.)
56
+ 3. Grep dependencies for framework/library names
57
+ 4. For verbose mode: log each indicator found and confidence level
58
+ ```
59
+
60
+ ### Step 2: Gap Analysis
61
+
62
+ Compare detected stack against what is already installed.
63
+
64
+ ```
65
+ 1. List existing agents: ls .claude/agents/*.md
66
+ 2. List existing skills: find .claude/skills -name "SKILL.md"
67
+ 3. For each detected indicator:
68
+ a. Check if required agent file exists → mark MISSING or PRESENT
69
+ b. Check if required skill directory exists → mark MISSING or PRESENT
70
+ 4. Build two lists:
71
+ - missing_agents[] — agents needed but not present
72
+ - missing_skills[] — skills needed but not present
73
+ 5. (Optional) Build unused list for suggestions:
74
+ - Agents present but no indicator matched → flag for review
75
+ ```
76
+
77
+ ### Step 3: Auto-Configure
78
+
79
+ Apply changes for all missing items (skip in --dry-run mode).
80
+
81
+ ```
82
+ For each missing agent:
83
+ - If agent exists in templates/.claude/agents/ → copy to .claude/agents/
84
+ - Else → delegate to mgr-creator with detected domain context
85
+
86
+ For each missing skill:
87
+ - If skill exists in templates/.claude/skills/ → copy to .claude/skills/
88
+ - Else → log as "skill not available in templates, manual setup needed"
89
+
90
+ Rules:
91
+ - Keep all existing rules (they are universal, never remove)
92
+
93
+ Guides:
94
+ - Verify guides/ directory has relevant reference docs
95
+ - Log missing guide topics as suggestions only (no auto-copy)
96
+ ```
97
+
98
+ ### Step 4: Report
99
+
100
+ Output a structured summary after the run.
101
+
102
+ ```
103
+ [analysis] Project: <detected project name or path>
104
+
105
+ Tech Stack Detected:
106
+ - TypeScript (tsconfig.json found)
107
+ - React/Next.js (next in package.json deps)
108
+ - Docker (Dockerfile found)
109
+
110
+ Agents:
111
+ + lang-typescript-expert [added]
112
+ + fe-vercel-agent [added]
113
+ ~ infra-docker-expert [already present, skipped]
114
+
115
+ Skills:
116
+ + typescript-best-practices [added]
117
+ + react-best-practices [added]
118
+ ~ docker-best-practices [already present, skipped]
119
+
120
+ Rules: no changes (universal rules kept as-is)
121
+
122
+ Guides: react/ — present
123
+ docker/ — present
124
+ typescript/ — present
125
+
126
+ Suggestions:
127
+ - infra-aws-expert not detected (no CDK/SAM files found)
128
+ - de-* agents not detected (no pipeline indicators found)
129
+
130
+ Summary: 2 agents added, 2 skills added, 0 removed
131
+ ```
132
+
133
+ **--dry-run output** prefixes all additions with `[would add]` instead of `[added]` and makes no file changes.
134
+
135
+ **--verbose output** adds a Detection section before the report:
136
+
137
+ ```
138
+ Detection Details:
139
+ tsconfig.json → TypeScript confirmed
140
+ package.json[next] → Next.js confirmed (confidence: high)
141
+ package.json[react] → React confirmed (confidence: high)
142
+ Dockerfile → Docker confirmed
143
+ no go.mod found → Go skipped
144
+ no Cargo.toml found → Rust skipped
145
+ ```
146
+
147
+ ## Example Invocation
148
+
149
+ ```
150
+ /analysis
151
+ /analysis --dry-run
152
+ /analysis --verbose
153
+ /analysis --dry-run --verbose
154
+ ```
155
+
156
+ ## Notes
157
+
158
+ - Always run `--dry-run` first on unfamiliar projects to preview changes
159
+ - Agents and skills are additive only — existing items are never removed automatically
160
+ - For stacks not in the detection table, delegate to `mgr-creator` for dynamic agent creation
161
+ - Rules are never auto-removed; they are project-universal
@@ -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**: `disable-model-invocation: true` is set intentionally. This skill must be explicitly invoked via `/codex-exec` or delegated by the orchestrator. It is NOT auto-invoked by the model.
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
- routing_note: "Uses codex-exec skill with xhigh effort when available, falls back to WebFetch/WebSearch"
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, each stage can be handled by specialized team members:
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 |
@@ -145,6 +145,7 @@ Violation = immediate correction. No exception for "small changes".
145
145
 
146
146
  | Command | Description |
147
147
  |---------|-------------|
148
+ | `/analysis` | Analyze project and auto-configure customizations |
148
149
  | `/create-agent` | Create a new agent |
149
150
  | `/update-docs` | Sync documentation with project structure |
150
151
  | `/update-external` | Update agents from external sources |
@@ -174,7 +175,7 @@ project/
174
175
  +-- CLAUDE.md # Entry point
175
176
  +-- .claude/
176
177
  | +-- agents/ # Subagent definitions (41 files)
177
- | +-- skills/ # Skills (55 directories)
178
+ | +-- skills/ # Skills (56 directories)
178
179
  | +-- rules/ # Global rules (R000-R018)
179
180
  | +-- hooks/ # Hook scripts (memory, HUD)
180
181
  | +-- contexts/ # Context files (ecomode)
@@ -238,6 +239,9 @@ Task tool + routing skills remain the fallback for simple/cost-sensitive tasks.
238
239
  ## Quick Reference
239
240
 
240
241
  ```bash
242
+ # Project analysis
243
+ /analysis
244
+
241
245
  # Show all commands
242
246
  /lists
243
247
 
@@ -145,6 +145,7 @@ oh-my-customcode로 구동됩니다.
145
145
 
146
146
  | 커맨드 | 설명 |
147
147
  |--------|------|
148
+ | `/analysis` | 프로젝트 분석 및 자동 커스터마이징 |
148
149
  | `/create-agent` | 새 에이전트 생성 |
149
150
  | `/update-docs` | 프로젝트 구조와 문서 동기화 |
150
151
  | `/update-external` | 외부 소스에서 에이전트 업데이트 |
@@ -174,7 +175,7 @@ project/
174
175
  +-- CLAUDE.md # 진입점
175
176
  +-- .claude/
176
177
  | +-- agents/ # 서브에이전트 정의 (41 파일)
177
- | +-- skills/ # 스킬 (55 디렉토리)
178
+ | +-- skills/ # 스킬 (56 디렉토리)
178
179
  | +-- rules/ # 전역 규칙 (R000-R018)
179
180
  | +-- hooks/ # 훅 스크립트 (메모리, HUD)
180
181
  | +-- contexts/ # 컨텍스트 파일 (ecomode)
@@ -238,6 +239,9 @@ Claude Code의 Agent Teams 기능이 활성화되어 있으면 (`CLAUDE_CODE_EXP
238
239
  ## 빠른 참조
239
240
 
240
241
  ```bash
242
+ # 프로젝트 분석
243
+ /analysis
244
+
241
245
  # 모든 커맨드 표시
242
246
  /lists
243
247
 
@@ -18,7 +18,7 @@
18
18
  "name": "skills",
19
19
  "path": ".claude/skills",
20
20
  "description": "Reusable skill modules (includes slash commands)",
21
- "files": 55
21
+ "files": 56
22
22
  },
23
23
  {
24
24
  "name": "guides",