oh-my-customcode 0.20.0 → 0.22.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 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** | 41 agents, 55 skills, 22 guides, 18 rules, 2 hooks, 4 contexts, ontology graph - ready to use out of the box |
24
+ | **Batteries Included** | 41 agents, 63 skills, 22 guides, 18 rules, 2 hooks, 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 |
@@ -124,20 +124,20 @@ 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 (58)
127
+ ### Skills (63)
128
128
 
129
129
  | Category | Count | Skills |
130
130
  |----------|-------|--------|
131
131
  | **Routing** | 4 | secretary-routing, dev-lead-routing, de-lead-routing, qa-lead-routing |
132
132
  | **Best Practices** | 18 | go-best-practices, python-best-practices, typescript-best-practices, kotlin-best-practices, rust-best-practices, react-best-practices, fastapi-best-practices, springboot-best-practices, go-backend-best-practices, docker-best-practices, aws-best-practices, postgres-best-practices, supabase-postgres-best-practices, redis-best-practices, airflow-best-practices, dbt-best-practices, kafka-best-practices, snowflake-best-practices |
133
- | **Development** | 5 | dev-review, dev-refactor, create-agent, intent-detection, web-design-guidelines |
133
+ | **Development** | 6 | dev-review, dev-refactor, create-agent, intent-detection, web-design-guidelines, analysis |
134
134
  | **Data Engineering** | 2 | spark-best-practices, pipeline-architecture-patterns |
135
135
  | **Optimization** | 3 | optimize-analyze, optimize-bundle, optimize-report |
136
136
  | **Memory** | 3 | memory-save, memory-recall, memory-management |
137
137
  | **Package Management** | 3 | npm-publish, npm-version, npm-audit |
138
138
  | **Operations** | 7 | update-docs, update-external, audit-agents, fix-refs, sauron-watch, monitoring-setup, claude-code-bible |
139
139
  | **Utilities** | 5 | lists, help, status, result-aggregation, writing-clearly-and-concisely |
140
- | **Quality & Workflow** | 4 | multi-model-verification, structured-dev-cycle, model-escalation, stuck-recovery |
140
+ | **Quality & Workflow** | 9 | multi-model-verification, structured-dev-cycle, model-escalation, stuck-recovery, dag-orchestration, task-decomposition, worker-reviewer-pipeline, pr-auto-improve, pipeline-guards |
141
141
  | **Deploy** | 2 | vercel-deploy, codex-exec |
142
142
  | **External** | 1 | skills-sh-search |
143
143
 
@@ -225,7 +225,7 @@ your-project/
225
225
  │ ├── be-fastapi-expert.md
226
226
  │ ├── mgr-creator.md
227
227
  │ └── ...
228
- ├── skills/ # Skill modules (55 directories, each with SKILL.md)
228
+ ├── skills/ # Skill modules (63 directories, each with SKILL.md)
229
229
  │ ├── go-best-practices/
230
230
  │ ├── react-best-practices/
231
231
  │ ├── secretary-routing/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "description": "Batteries-included agent harness for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: dag-orchestration
3
+ description: YAML-based DAG workflow engine with topological execution and failure strategies
4
+ ---
5
+
6
+ # DAG Orchestration Skill
7
+
8
+ Defines and executes directed acyclic graph (DAG) workflows. The orchestrator uses this skill to plan multi-step tasks with dependencies, execute them in topologically-sorted order, and handle failures.
9
+
10
+ **Orchestrator-only** — only the main conversation uses this skill (R010). Subagents execute individual nodes.
11
+
12
+ ## Workflow Spec Format
13
+
14
+ ```yaml
15
+ # .claude/workflows/<name>.yaml or inline in conversation
16
+ workflow:
17
+ name: feature-implementation
18
+ description: Implement a new feature with tests and docs
19
+
20
+ nodes:
21
+ - id: analyze
22
+ agent: Explore
23
+ model: haiku
24
+ prompt: "Analyze codebase for integration points"
25
+
26
+ - id: implement
27
+ agent: lang-typescript-expert
28
+ model: sonnet
29
+ prompt: "Implement the feature"
30
+ depends_on: [analyze]
31
+
32
+ - id: test
33
+ agent: qa-engineer
34
+ model: sonnet
35
+ prompt: "Write and run tests"
36
+ depends_on: [implement]
37
+
38
+ - id: review
39
+ agent: lang-typescript-expert
40
+ model: opus
41
+ prompt: "Code review"
42
+ depends_on: [implement]
43
+
44
+ - id: docs
45
+ agent: arch-documenter
46
+ model: sonnet
47
+ prompt: "Update documentation"
48
+ depends_on: [implement]
49
+
50
+ - id: commit
51
+ agent: mgr-gitnerd
52
+ model: sonnet
53
+ prompt: "Commit changes"
54
+ depends_on: [test, review, docs]
55
+
56
+ config:
57
+ max_parallel: 4 # R009 limit
58
+ failure_strategy: stop # stop | skip | retry
59
+ retry_count: 2 # Max retries per node (if strategy=retry)
60
+ timeout_per_node: 300 # Seconds per node (0 = no limit)
61
+ ```
62
+
63
+ ## Execution Algorithm — Kahn's Topological Sort
64
+
65
+ ```
66
+ 1. Parse workflow YAML
67
+ 2. Build adjacency list and in-degree map
68
+ 3. Validate: detect cycles (error if found)
69
+ 4. Initialize queue with nodes where in-degree = 0
70
+ 5. While queue is not empty:
71
+ a. Dequeue up to max_parallel nodes
72
+ b. Execute nodes in parallel via Task tool (R009)
73
+ c. On completion:
74
+ - Success → decrement in-degree of dependents
75
+ - Failure → apply failure_strategy
76
+ d. Enqueue newly-ready nodes (in-degree = 0)
77
+ 6. Verify all nodes executed (detect unreachable nodes)
78
+ ```
79
+
80
+ ## Execution Rules
81
+
82
+ | Rule | Detail |
83
+ |------|--------|
84
+ | Max parallel | 4 concurrent nodes (R009) |
85
+ | Agent Teams gate | 3+ parallel nodes → check R018 eligibility |
86
+ | Orchestrator only | DAG scheduling runs in main conversation (R010) |
87
+ | Node execution | Each node = one Task tool call to specified agent |
88
+ | State tracking | `/tmp/.claude-dag-$PPID.json` |
89
+
90
+ ## Failure Strategies
91
+
92
+ | Strategy | Behavior |
93
+ |----------|----------|
94
+ | `stop` | Halt entire DAG on first failure (default) |
95
+ | `skip` | Mark failed node as skipped, continue dependents with warning |
96
+ | `retry` | Retry failed node up to `retry_count` times, then stop |
97
+
98
+ ## State File Format
99
+
100
+ ```json
101
+ {
102
+ "workflow": "feature-implementation",
103
+ "started_at": "2026-03-07T10:00:00Z",
104
+ "status": "running",
105
+ "nodes": {
106
+ "analyze": {"status": "completed", "started": "...", "completed": "..."},
107
+ "implement": {"status": "running", "started": "..."},
108
+ "test": {"status": "pending"},
109
+ "review": {"status": "pending"},
110
+ "docs": {"status": "pending"},
111
+ "commit": {"status": "blocked", "blocked_by": ["test", "review", "docs"]}
112
+ },
113
+ "execution_order": [["analyze"], ["implement"], ["test", "review", "docs"], ["commit"]]
114
+ }
115
+ ```
116
+
117
+ ## Display Format
118
+
119
+ ```
120
+ [DAG] feature-implementation — 6 nodes
121
+ [Layer 0] analyze ← running
122
+ [Layer 1] implement ← pending (depends: analyze)
123
+ [Layer 2] test, review, docs ← pending (parallel, depends: implement)
124
+ [Layer 3] commit ← blocked (depends: test, review, docs)
125
+ ```
126
+
127
+ Progress:
128
+ ```
129
+ [DAG Progress] 3/6 nodes completed
130
+ ✓ analyze (12s)
131
+ ✓ implement (45s)
132
+ → test (running)
133
+ → review (running)
134
+ → docs (running)
135
+ ○ commit (blocked)
136
+ ```
137
+
138
+ ## Common Workflow Templates
139
+
140
+ ### Feature Implementation
141
+ ```yaml
142
+ nodes: [analyze → implement → [test, review, docs] → commit]
143
+ ```
144
+
145
+ ### Code Review + Fix
146
+ ```yaml
147
+ nodes: [review → fix → re-review → commit]
148
+ failure_strategy: retry
149
+ ```
150
+
151
+ ### Multi-Language Project
152
+ ```yaml
153
+ nodes: [
154
+ analyze → [impl-frontend, impl-backend, impl-db] → integration-test → commit
155
+ ]
156
+ ```
157
+
158
+ ### Refactoring
159
+ ```yaml
160
+ nodes: [
161
+ analyze → plan → [refactor-1, refactor-2, refactor-3] → test → review → commit
162
+ ]
163
+ ```
164
+
165
+ ## Integration
166
+
167
+ | Rule | Integration |
168
+ |------|-------------|
169
+ | R009 | Max 4 parallel nodes; independent nodes MUST parallelize |
170
+ | R010 | DAG scheduler runs only in orchestrator |
171
+ | R015 | Display DAG plan before execution |
172
+ | R018 | 3+ parallel nodes → check Agent Teams eligibility |
173
+ | model-escalation | Node failures feed into task-outcome-recorder |
174
+ | stuck-recovery | Repeated node failures trigger stuck detection |
175
+
176
+ ## Inline DAG
177
+
178
+ For ad-hoc workflows without a YAML file:
179
+
180
+ ```
181
+ [DAG Plan]
182
+ 1. analyze (Explore:haiku)
183
+ 2. implement (lang-typescript-expert:sonnet) ← depends: 1
184
+ 3. test (qa-engineer:sonnet) ← depends: 2
185
+ 4. review (lang-typescript-expert:opus) ← depends: 2
186
+ 5. commit (mgr-gitnerd:sonnet) ← depends: 3, 4
187
+
188
+ Execute? [Y/n]
189
+ ```
190
+
191
+ The orchestrator builds the DAG from this inline format and executes using the same algorithm.
192
+
193
+ ## Limitations
194
+
195
+ - No cycles allowed (DAG = acyclic)
196
+ - Max 20 nodes per workflow (complexity guard)
197
+ - Nested DAGs not supported (flatten instead)
198
+ - Cross-workflow dependencies not supported
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: pipeline-guards
3
+ description: Safety constraints and quality gates for pipeline and workflow execution
4
+ ---
5
+
6
+ # Pipeline Guards Skill
7
+
8
+ Defines mandatory safety constraints for all pipeline, workflow, and iterative execution within the oh-my-customcode system. Prevents infinite loops, enforces timeouts, and establishes quality gates.
9
+
10
+ **System-wide** — these guards apply to dag-orchestration, worker-reviewer-pipeline, and any iterative process.
11
+
12
+ ## Guard Limits
13
+
14
+ | Guard | Default | Hard Cap | Applies To |
15
+ |-------|---------|----------|------------|
16
+ | Max iterations | 3 | 5 | worker-reviewer-pipeline |
17
+ | Max DAG nodes | 20 | 30 | dag-orchestration |
18
+ | Max parallel agents | 4 | 4 | R009 (all pipelines) |
19
+ | Timeout per node | 300s | 600s | dag-orchestration nodes |
20
+ | Timeout per pipeline | 900s | 1800s | worker-reviewer-pipeline |
21
+ | Max retry count | 2 | 3 | Failure retry strategies |
22
+ | Max PR improvement items | 20 | 50 | pr-auto-improve |
23
+
24
+ ## Enforcement
25
+
26
+ Guards are enforced at two levels:
27
+
28
+ ### Level 1: Skill-Level (Soft)
29
+ Each skill checks guard limits before execution:
30
+
31
+ ```
32
+ Before starting pipeline:
33
+ 1. Check max_iterations ≤ hard cap
34
+ 2. Check timeout ≤ hard cap
35
+ 3. Check node count ≤ hard cap
36
+ If any exceeded → warn user, use hard cap value
37
+ ```
38
+
39
+ ### Level 2: Hook-Level (Hard)
40
+ The stuck-detector hook monitors for guard violations:
41
+
42
+ ```
43
+ PostToolUse → check:
44
+ - Iteration count > max_iterations?
45
+ - Elapsed time > timeout?
46
+ - Same error repeated > max_retry?
47
+ If any → emit advisory to stderr
48
+ ```
49
+
50
+ ## Quality Gates
51
+
52
+ ### Pipeline Quality Gate
53
+ ```
54
+ [Quality Gate Check]
55
+ ├── Critical issues: {count} (must be 0)
56
+ ├── Major issues: {count} (must be ≤ threshold)
57
+ ├── Minor issues: {count} (informational)
58
+ └── Gate: PASS | FAIL
59
+ ```
60
+
61
+ ### DAG Completion Gate
62
+ ```
63
+ [DAG Completion Gate]
64
+ ├── Nodes completed: {n}/{total}
65
+ ├── Nodes failed: {count}
66
+ ├── Nodes skipped: {count}
67
+ └── Gate: PASS | PARTIAL | FAIL
68
+ ```
69
+
70
+ ## Escalation Integration
71
+
72
+ When guards are triggered, they integrate with existing advisory systems:
73
+
74
+ | Event | Action |
75
+ |-------|--------|
76
+ | Max iterations reached | → stuck-recovery advisory |
77
+ | Repeated failures | → model-escalation advisory |
78
+ | Timeout approaching (80%) | → warn user, suggest early termination |
79
+ | Hard cap hit | → force stop, report to user |
80
+
81
+ ## Guard Configuration
82
+
83
+ Pipelines can override defaults (within hard caps):
84
+
85
+ ```yaml
86
+ # In pipeline/workflow spec
87
+ guards:
88
+ max_iterations: 4 # Override default 3, cannot exceed 5
89
+ timeout_per_node: 120 # Override default 300s
90
+ timeout_pipeline: 600 # Override default 900s
91
+ quality_gate: all_pass # all_pass | majority_pass
92
+ ```
93
+
94
+ ## Kill Switch
95
+
96
+ When a pipeline or workflow must be terminated:
97
+
98
+ ```
99
+ [Kill Switch] Activated
100
+ ├── Reason: {max_iterations | timeout | user_request | stuck_detected}
101
+ ├── Pipeline: {name}
102
+ ├── Progress: {completed}/{total} steps
103
+ ├── Preserved state: /tmp/.claude-pipeline-$PPID.json
104
+ └── Action: Stopped gracefully, state saved for resume
105
+ ```
106
+
107
+ The kill switch:
108
+ 1. Signals all running agents to complete current operation
109
+ 2. Does NOT terminate mid-write (waits for current tool call)
110
+ 3. Saves pipeline state for potential resume
111
+ 4. Reports final status to user
112
+
113
+ ## State Preservation
114
+
115
+ On guard-triggered termination:
116
+
117
+ ```json
118
+ {
119
+ "pipeline": "feature-review",
120
+ "terminated_at": "2026-03-07T10:15:00Z",
121
+ "reason": "max_iterations_reached",
122
+ "completed_iterations": 3,
123
+ "last_verdict": "FAIL",
124
+ "remaining_issues": [
125
+ {"severity": "major", "file": "src/auth.ts", "line": 42, "description": "..."}
126
+ ],
127
+ "worker_last_output": "...",
128
+ "resumable": true
129
+ }
130
+ ```
131
+
132
+ ## Display Format
133
+
134
+ Guard warnings appear inline:
135
+
136
+ ```
137
+ [Guard] ⚠ Iteration 3/3 — final attempt
138
+ [Guard] ⚠ Timeout 80% (240s/300s) — consider early termination
139
+ [Guard] 🛑 Max iterations reached — pipeline stopped
140
+ [Guard] 🛑 Hard timeout (600s) — force stop
141
+ ```
142
+
143
+ ## Integration
144
+
145
+ | Rule/Skill | Integration |
146
+ |------------|-------------|
147
+ | R009 | Max parallel agents enforced (hard cap: 4) |
148
+ | R010 | Guards run in orchestrator only |
149
+ | R015 | Guard warnings displayed transparently |
150
+ | dag-orchestration | Node count and timeout limits |
151
+ | worker-reviewer-pipeline | Iteration and pipeline timeout limits |
152
+ | pr-auto-improve | Improvement item count limits |
153
+ | stuck-recovery | Guard triggers feed into stuck detection |
154
+ | model-escalation | Repeated failures trigger escalation advisory |
155
+
156
+ ## Override Policy
157
+
158
+ - Defaults can be overridden in pipeline spec (within hard caps)
159
+ - Hard caps can ONLY be changed by modifying this skill file
160
+ - User cannot bypass hard caps at runtime
161
+ - All overrides are logged and displayed (R015)
162
+
163
+ ## Limitations
164
+
165
+ - Guards are advisory at skill level, hard at hook level
166
+ - Cannot prevent infinite loops in agent reasoning (only tool call patterns)
167
+ - State preservation is best-effort (process crash = state loss)
168
+ - Resume from saved state requires user confirmation
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: pr-auto-improve
3
+ description: Opt-in post-PR analysis and improvement suggestions for code quality enhancement
4
+ ---
5
+
6
+ # PR Auto-Improvement Skill
7
+
8
+ Analyzes pull requests after creation and suggests targeted improvements. **Strictly opt-in** — never runs automatically. User must explicitly request PR improvement.
9
+
10
+ **Advisory-only** — suggests improvements, never force-pushes or modifies PRs without approval (R010).
11
+
12
+ ## Activation
13
+
14
+ | Trigger | Behavior |
15
+ |---------|----------|
16
+ | User says "improve this PR" | Activate analysis |
17
+ | User says "review PR #N" | Activate analysis |
18
+ | PR created automatically | Do NOT activate (opt-in only) |
19
+ | CI fails on PR | Suggest activation, do not auto-run |
20
+
21
+ ## Analysis Pipeline
22
+
23
+ ```
24
+ 1. Fetch PR diff (gh pr diff)
25
+ 2. Categorize changes by type:
26
+ - New code → check patterns, naming, structure
27
+ - Modified code → check consistency, regression risk
28
+ - Deleted code → check for orphaned references
29
+ 3. Run improvement checks (see checklist below)
30
+ 4. Generate improvement report
31
+ 5. User approves → create follow-up commit(s)
32
+ ```
33
+
34
+ ## Improvement Checklist
35
+
36
+ | Category | Checks |
37
+ |----------|--------|
38
+ | **Code Quality** | Naming consistency, dead code, duplication, complexity |
39
+ | **Type Safety** | Missing types, `any` usage, assertion safety |
40
+ | **Error Handling** | Unhandled promises, missing try-catch, error propagation |
41
+ | **Testing** | Missing test coverage for new functions, edge cases |
42
+ | **Documentation** | Missing JSDoc for public APIs, outdated README refs |
43
+ | **Security** | Hardcoded values, injection risks, permission checks |
44
+ | **Performance** | Unnecessary re-renders, N+1 queries, missing indexes |
45
+
46
+ ## Report Format
47
+
48
+ ```
49
+ [PR Auto-Improve] PR #{number} — {title}
50
+ ├── Files analyzed: {count}
51
+ ├── Improvements found: {count}
52
+
53
+ ├── [Code Quality] ({count} items)
54
+ │ ├── {file:line} — {description}
55
+ │ └── {file:line} — {description}
56
+
57
+ ├── [Testing] ({count} items)
58
+ │ └── {file} — Missing test for {function}
59
+
60
+ ├── [Documentation] ({count} items)
61
+ │ └── {file:line} — {description}
62
+
63
+ └── Estimated effort: {low|medium|high}
64
+
65
+ Apply improvements? [Y/n/select]
66
+ ```
67
+
68
+ ## Improvement Modes
69
+
70
+ | Mode | Behavior |
71
+ |------|----------|
72
+ | `all` | Apply all suggested improvements |
73
+ | `select` | User picks which improvements to apply |
74
+ | `report` | Report only, no changes (default) |
75
+
76
+ ## Implementation Flow
77
+
78
+ ```
79
+ User: "improve PR #215"
80
+ → Orchestrator activates pr-auto-improve
81
+ → Fetch PR diff via mgr-gitnerd
82
+ → Analyze with appropriate expert agent(s)
83
+ → Generate report
84
+ → User selects improvements
85
+ → Delegate fixes to specialist agents (R010)
86
+ → mgr-gitnerd creates follow-up commit
87
+ ```
88
+
89
+ ## Agent Selection for Fixes
90
+
91
+ | File Type | Agent |
92
+ |-----------|-------|
93
+ | *.ts, *.tsx | lang-typescript-expert |
94
+ | *.py | lang-python-expert |
95
+ | *.go | lang-golang-expert |
96
+ | *.kt | lang-kotlin-expert |
97
+ | *.java | lang-java21-expert |
98
+ | *.rs | lang-rust-expert |
99
+ | Test files | qa-engineer |
100
+ | Docs, README | arch-documenter |
101
+ | Mixed | Multiple agents in parallel (R009) |
102
+
103
+ ## Integration
104
+
105
+ | Rule | Integration |
106
+ |------|-------------|
107
+ | R009 | Multiple file fixes execute in parallel |
108
+ | R010 | Orchestrator coordinates analysis and fix delegation |
109
+ | R015 | Full transparency on what improvements are suggested and why |
110
+ | R018 | 3+ fix agents → Agent Teams for coordination |
111
+ | worker-reviewer-pipeline | Can chain: auto-improve → worker-reviewer for critical fixes |
112
+ | pipeline-guards | Improvement count capped by guard limits |
113
+
114
+ ## Opt-In Safeguards
115
+
116
+ - **NEVER** auto-activates on PR creation
117
+ - **NEVER** pushes changes without user approval
118
+ - **NEVER** modifies PR description or labels without approval
119
+ - Report mode is default; changes require explicit "apply" command
120
+ - All git operations go through mgr-gitnerd (R010)
121
+
122
+ ## Limitations
123
+
124
+ - Analyzes only the PR diff, not the entire codebase
125
+ - Cannot detect architectural issues (use dev-review for that)
126
+ - Max 50 files per analysis (skip larger PRs with warning)
127
+ - Does not run tests (delegates to qa-engineer if needed)
@@ -0,0 +1,181 @@
1
+ ---
2
+ name: task-decomposition
3
+ description: Auto-decompose large tasks into DAG-compatible parallel subtasks
4
+ ---
5
+
6
+ # Task Decomposition Skill
7
+
8
+ Analyzes task complexity and decomposes large tasks into smaller, parallelizable subtasks compatible with the DAG orchestration skill. The orchestrator uses this as a planning frontend before execution.
9
+
10
+ ## Trigger Conditions
11
+
12
+ Decomposition is **recommended** when any of these thresholds are met:
13
+
14
+ | Trigger | Threshold | Rationale |
15
+ |---------|-----------|-----------|
16
+ | Estimated duration | > 30 minutes | Too long for single agent |
17
+ | Files affected | > 3 files | Parallelizable across files |
18
+ | Domains involved | > 2 domains | Requires multiple specialists |
19
+ | Agent types needed | > 2 types | Cross-specialty coordination |
20
+
21
+ ## Decomposition Process
22
+
23
+ ```
24
+ 1. Analyze task scope
25
+ ├── Estimate duration, file count, domains
26
+ ├── Identify required agent types
27
+ └── Check trigger thresholds
28
+
29
+ 2. If thresholds met → decompose:
30
+ ├── Break into atomic subtasks (single agent, single concern)
31
+ ├── Identify dependencies between subtasks
32
+ ├── Map subtasks to agents (use routing skills)
33
+ └── Generate DAG workflow spec
34
+
35
+ 3. Present plan to user (R015 transparency)
36
+ ├── Show decomposed subtasks with agents
37
+ ├── Show dependency graph
38
+ ├── Show estimated parallel execution time
39
+ └── Request confirmation before execution
40
+
41
+ 4. Execute via dag-orchestration skill
42
+ ```
43
+
44
+ ## Decomposition Heuristics
45
+
46
+ ### By File Independence
47
+ ```
48
+ Task: "Update auth module across 5 files"
49
+ ├── auth.ts → lang-typescript-expert
50
+ ├── middleware.ts → lang-typescript-expert
51
+ ├── config.ts → lang-typescript-expert (independent)
52
+ ├── auth.test.ts → qa-engineer (depends: auth.ts)
53
+ └── README.md → arch-documenter (depends: all above)
54
+
55
+ DAG: [auth.ts, middleware.ts, config.ts] → auth.test.ts → README.md
56
+ ```
57
+
58
+ ### By Domain Separation
59
+ ```
60
+ Task: "Add user profile feature with API and UI"
61
+ ├── API endpoint → be-express-expert
62
+ ├── Database schema → db-postgres-expert
63
+ ├── Frontend component → fe-vercel-agent
64
+ └── Integration test → qa-engineer
65
+
66
+ DAG: [API, DB] → Frontend → Integration test
67
+ (API and DB are independent, Frontend needs both)
68
+ ```
69
+
70
+ ### By Layer
71
+ ```
72
+ Task: "Implement order processing in Spring Boot"
73
+ ├── Domain model → lang-kotlin-expert
74
+ ├── Repository → be-springboot-expert (depends: domain)
75
+ ├── Service → be-springboot-expert (depends: domain, repository)
76
+ ├── Controller → be-springboot-expert (depends: service)
77
+ └── Tests → qa-engineer (depends: all)
78
+
79
+ DAG: domain → [repository] → service → controller → tests
80
+ ```
81
+
82
+ ## Output Format
83
+
84
+ ### Decomposition Plan
85
+ ```
86
+ [Task Decomposition]
87
+ ├── Original: "Add user authentication with JWT"
88
+ ├── Complexity: High (4 files, 3 domains, ~45 min)
89
+ ├── Decomposed into 5 subtasks:
90
+
91
+ │ [1] analyze (Explore:haiku)
92
+ │ Scan codebase for existing auth patterns
93
+
94
+ │ [2] implement-auth (lang-typescript-expert:sonnet)
95
+ │ Implement JWT signing and validation
96
+ │ Depends: [1]
97
+
98
+ │ [3] implement-middleware (lang-typescript-expert:sonnet)
99
+ │ Create auth middleware
100
+ │ Depends: [1]
101
+
102
+ │ [4] write-tests (qa-engineer:sonnet)
103
+ │ Write auth tests
104
+ │ Depends: [2, 3]
105
+
106
+ │ [5] commit (mgr-gitnerd:sonnet)
107
+ │ Commit all changes
108
+ │ Depends: [4]
109
+
110
+ ├── Parallel layers: 3 (max 2 concurrent in layer 2)
111
+ ├── Estimated time: ~20 min (vs ~45 min sequential)
112
+ └── Proceed? [Y/n]
113
+ ```
114
+
115
+ ### Generated DAG Spec
116
+ ```yaml
117
+ workflow:
118
+ name: auto-decomposed-auth
119
+ description: "Auto-decomposed: Add user authentication with JWT"
120
+
121
+ nodes:
122
+ - id: analyze
123
+ agent: Explore
124
+ model: haiku
125
+ prompt: "Scan codebase for existing auth patterns"
126
+ - id: implement-auth
127
+ agent: lang-typescript-expert
128
+ model: sonnet
129
+ prompt: "Implement JWT signing and validation"
130
+ depends_on: [analyze]
131
+ - id: implement-middleware
132
+ agent: lang-typescript-expert
133
+ model: sonnet
134
+ prompt: "Create auth middleware"
135
+ depends_on: [analyze]
136
+ - id: write-tests
137
+ agent: qa-engineer
138
+ model: sonnet
139
+ prompt: "Write auth tests"
140
+ depends_on: [implement-auth, implement-middleware]
141
+ - id: commit
142
+ agent: mgr-gitnerd
143
+ model: sonnet
144
+ prompt: "Commit all changes"
145
+ depends_on: [write-tests]
146
+
147
+ config:
148
+ max_parallel: 4
149
+ failure_strategy: stop
150
+ ```
151
+
152
+ ## Atomic Task Criteria
153
+
154
+ A subtask is **atomic** when it meets ALL of:
155
+ - Single agent can handle it
156
+ - Single concern (one logical change)
157
+ - Independently testable outcome
158
+ - < 15 minutes estimated duration
159
+ - < 3 files affected
160
+
161
+ If a subtask is not atomic → decompose further (max 2 levels deep).
162
+
163
+ ## Skip Decomposition When
164
+
165
+ | Condition | Reason |
166
+ |-----------|--------|
167
+ | Single file edit | Already atomic |
168
+ | < 10 minutes estimated | Overhead not worth it |
169
+ | User explicitly requests "just do it" | User override |
170
+ | Single domain, single agent | No parallelization benefit |
171
+
172
+ ## Integration
173
+
174
+ | Component | Integration |
175
+ |-----------|-------------|
176
+ | dag-orchestration | Generates DAG specs consumed by dag-orchestration |
177
+ | Routing skills | Uses dev-lead/de-lead/qa-lead routing for agent mapping |
178
+ | R009 | Maximizes parallelization within max-4 limit |
179
+ | R010 | Decomposition happens in orchestrator only |
180
+ | R015 | Plan displayed before execution for user approval |
181
+ | R018 | 3+ agents in plan → check Agent Teams eligibility |
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: worker-reviewer-pipeline
3
+ description: Worker-Reviewer iterative pipeline for quality-critical code with review cycles
4
+ ---
5
+
6
+ # Worker-Reviewer Pipeline Skill
7
+
8
+ Defines an iterative Worker→Reviewer pipeline where one agent implements changes and another reviews them. The cycle repeats until quality criteria are met or max iterations reached.
9
+
10
+ **Orchestrator-only** — only the main conversation activates this pipeline (R010). Worker and Reviewer are subagents.
11
+
12
+ ## When to Activate
13
+
14
+ | Condition | Activate? |
15
+ |-----------|-----------|
16
+ | Quality-critical code changes (auth, security, payments) | Yes |
17
+ | Complex refactoring touching 5+ files | Yes |
18
+ | User explicitly requests review cycle | Yes |
19
+ | Simple file edits, config changes | No |
20
+ | Documentation-only changes | No |
21
+
22
+ ## Pipeline Spec Format
23
+
24
+ ```yaml
25
+ pipeline:
26
+ name: feature-review
27
+ description: Implement and review a feature
28
+
29
+ worker:
30
+ agent: lang-typescript-expert # or appropriate specialist
31
+ model: sonnet
32
+ prompt: "Implement the feature based on requirements"
33
+
34
+ reviewer:
35
+ agent: lang-typescript-expert # can be same or different specialist
36
+ model: opus # often higher model for review
37
+ prompt: "Review implementation for correctness, security, performance"
38
+
39
+ config:
40
+ max_iterations: 3 # Max review cycles (default: 3)
41
+ quality_gate: all_pass # all_pass | majority_pass | custom
42
+ auto_commit: false # Auto-commit on quality pass (via mgr-gitnerd)
43
+ ```
44
+
45
+ ## Execution Flow
46
+
47
+ ```
48
+ 1. Orchestrator activates pipeline
49
+ 2. Worker agent implements changes
50
+ 3. Reviewer agent reviews Worker's output
51
+ 4. Reviewer produces verdict:
52
+ - PASS → Pipeline complete, proceed to next step
53
+ - FAIL(issues) → Worker receives feedback, re-implements
54
+ 5. Repeat 3-4 until PASS or max_iterations reached
55
+ 6. If max_iterations reached without PASS:
56
+ - Report partial results to user
57
+ - Recommend manual review
58
+ ```
59
+
60
+ ## Review Verdict Format
61
+
62
+ Reviewer MUST output a structured verdict:
63
+
64
+ ```
65
+ [Review Verdict]
66
+ ├── Status: PASS | FAIL
67
+ ├── Iteration: {n}/{max}
68
+ ├── Issues Found: {count}
69
+ │ ├── [Critical] {description} — {file:line}
70
+ │ ├── [Major] {description} — {file:line}
71
+ │ └── [Minor] {description} — {file:line}
72
+ └── Summary: {one-line}
73
+ ```
74
+
75
+ ## Quality Gates
76
+
77
+ | Gate | Criteria |
78
+ |------|----------|
79
+ | `all_pass` | Zero Critical or Major issues (default) |
80
+ | `majority_pass` | Zero Critical, ≤2 Minor issues allowed |
81
+ | `custom` | User-defined in pipeline spec |
82
+
83
+ ## Integration with Agent Teams (R018)
84
+
85
+ When Agent Teams is enabled, the pipeline SHOULD use Agent Teams:
86
+
87
+ ```
88
+ TeamCreate("review-pipeline")
89
+ Worker (team member) ←→ Reviewer (team member)
90
+ SendMessage for feedback exchange
91
+ Shared TaskList for tracking issues
92
+ ```
93
+
94
+ When Agent Teams is NOT available, falls back to sequential Task tool calls:
95
+ ```
96
+ Task(worker) → result → Task(reviewer) → verdict → Task(worker) → ...
97
+ ```
98
+
99
+ ## Display Format
100
+
101
+ ```
102
+ [Pipeline] feature-review — Worker: lang-typescript-expert, Reviewer: lang-typescript-expert
103
+ [Iteration 1/3] Worker implementing...
104
+ [Iteration 1/3] Reviewer reviewing...
105
+ [Review] FAIL — 2 issues (1 Major, 1 Minor)
106
+ [Iteration 2/3] Worker fixing issues...
107
+ [Iteration 2/3] Reviewer re-reviewing...
108
+ [Review] PASS — 0 issues
109
+ [Pipeline Complete] 2 iterations, quality gate passed
110
+ ```
111
+
112
+ ## Common Pipeline Templates
113
+
114
+ ### Security-Critical Feature
115
+ ```yaml
116
+ worker: {agent: lang-typescript-expert, model: sonnet}
117
+ reviewer: {agent: lang-typescript-expert, model: opus}
118
+ config: {max_iterations: 3, quality_gate: all_pass}
119
+ ```
120
+
121
+ ### Cross-Language Integration
122
+ ```yaml
123
+ worker: {agent: lang-golang-expert, model: sonnet}
124
+ reviewer: {agent: be-go-backend-expert, model: opus}
125
+ config: {max_iterations: 2, quality_gate: all_pass}
126
+ ```
127
+
128
+ ### Quick Review
129
+ ```yaml
130
+ worker: {agent: lang-python-expert, model: sonnet}
131
+ reviewer: {agent: lang-python-expert, model: sonnet}
132
+ config: {max_iterations: 1, quality_gate: majority_pass}
133
+ ```
134
+
135
+ ## Integration
136
+
137
+ | Rule | Integration |
138
+ |------|-------------|
139
+ | R009 | Worker and Reviewer can run in parallel with other pipelines |
140
+ | R010 | Pipeline orchestration runs only in main conversation |
141
+ | R015 | Display pipeline plan and review verdicts transparently |
142
+ | R018 | Agent Teams preferred when available for Worker↔Reviewer messaging |
143
+ | pipeline-guards | Max iterations and timeout enforced by pipeline-guards |
144
+ | model-escalation | Worker failures feed into escalation tracking |
145
+ | stuck-recovery | Repeated FAIL verdicts trigger stuck detection advisory |
146
+
147
+ ## Limitations
148
+
149
+ - Max 3 iterations by default (configurable, hard cap at 5 via pipeline-guards)
150
+ - Worker and Reviewer must be different agent instances (same type allowed)
151
+ - Nested pipelines not supported (use dag-orchestration for complex flows)
152
+ - Pipeline does not auto-commit; orchestrator decides post-pipeline actions
@@ -18,7 +18,7 @@
18
18
  "name": "skills",
19
19
  "path": ".claude/skills",
20
20
  "description": "Reusable skill modules (includes slash commands)",
21
- "files": 58
21
+ "files": 63
22
22
  },
23
23
  {
24
24
  "name": "guides",