oh-my-customcodex 0.5.8 → 0.5.10
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 +4 -4
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +4 -1
- package/templates/.claude/rules/MUST-agent-teams.md +85 -246
- package/templates/.claude/rules/MUST-completion-verification.md +12 -0
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +20 -0
- package/templates/.claude/rules/MUST-permissions.md +6 -0
- package/templates/.claude/rules/MUST-safety.md +7 -0
- package/templates/.claude/rules/SHOULD-interaction.md +11 -0
- package/templates/.claude/skills/de-lead-routing/SKILL.md +6 -13
- package/templates/.claude/skills/dev-lead-routing/SKILL.md +6 -13
- package/templates/.claude/skills/intent-detection/SKILL.md +7 -9
- package/templates/.claude/skills/research/SKILL.md +8 -23
- package/templates/.claude/skills/roundtable-debate/SKILL.md +3 -4
- package/templates/.claude/skills/skill-extractor/SKILL.md +165 -73
- package/templates/.claude/skills/structured-dev-cycle/SKILL.md +7 -10
- package/templates/AGENTS.md.en +1 -2
- package/templates/AGENTS.md.ko +1 -2
- package/templates/CLAUDE.md +2 -2
- package/templates/CLAUDE.md.en +1 -2
- package/templates/CLAUDE.md.ko +1 -2
- package/templates/README.md +2 -2
- package/templates/guides/claude-code/15-version-compatibility.md +24 -0
- package/templates/guides/multi-agent-debate-patterns/README.md +1 -1
- package/templates/guides/multi-provider-exec/README.md +9 -79
- package/templates/manifest.json +3 -3
- package/templates/.claude/skills/agora/SKILL.md +0 -209
- package/templates/.claude/skills/codex-exec/SKILL.md +0 -218
- package/templates/.claude/skills/codex-exec/scripts/codex-wrapper.cjs +0 -433
- package/templates/.claude/skills/gemini-exec/SKILL.md +0 -215
- package/templates/.claude/skills/gemini-exec/scripts/gemini-wrapper.cjs +0 -485
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
**[한국어 문서 (Korean)](./README_ko.md)**
|
|
15
15
|
|
|
16
|
-
50 agents.
|
|
16
|
+
50 agents. 120 skills. 22 rules. One command.
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npm install -g oh-my-customcodex && cd your-project && omcustomcodex init
|
|
@@ -135,7 +135,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
|
|
|
135
135
|
|
|
136
136
|
---
|
|
137
137
|
|
|
138
|
-
### Skills (
|
|
138
|
+
### Skills (120)
|
|
139
139
|
|
|
140
140
|
| Category | Count | Includes |
|
|
141
141
|
|----------|-------|----------|
|
|
@@ -148,7 +148,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
|
|
|
148
148
|
| Package | 3 | npm-publish, npm-version, npm-audit |
|
|
149
149
|
| Optimization | 3 | optimize-analyze, optimize-bundle, optimize-report |
|
|
150
150
|
| Security | 3 | adversarial-review, cve-triage, jinja2-prompts |
|
|
151
|
-
| Other |
|
|
151
|
+
| Other | 10 | claude-native, gitlab, visual-ralph, visual-verdict, vercel-deploy, skills-sh-search, result-aggregation, writing-clearly-and-concisely, and more |
|
|
152
152
|
|
|
153
153
|
Skills use a 3-tier scope system: `core` (universal), `harness` (agent/skill maintenance), `package` (project-specific).
|
|
154
154
|
|
|
@@ -288,7 +288,7 @@ your-project/
|
|
|
288
288
|
│ ├── contexts/ # 4 shared context files
|
|
289
289
|
│ └── ontology/ # Knowledge graph for RAG
|
|
290
290
|
├── .agents/
|
|
291
|
-
│ └── skills/ #
|
|
291
|
+
│ └── skills/ # 120 installed skill modules
|
|
292
292
|
└── guides/ # 51 reference documents
|
|
293
293
|
```
|
|
294
294
|
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -57,7 +57,8 @@ echo "$COUNT" > "$COUNTER_FILE"
|
|
|
57
57
|
if [ "$BATCH_ISSUES" -ge 3 ] && [ "$COUNT" -eq 1 ]; then
|
|
58
58
|
echo "" >&2
|
|
59
59
|
echo "--- [R018 Advisor] Batch context detected (${BATCH_ISSUES} issues) ---" >&2
|
|
60
|
-
echo " RECOMMENDATION: Use Agent Teams (TeamCreate) for this batch." >&2
|
|
60
|
+
echo " RECOMMENDATION: Use Agent Teams (TeamCreate) for this batch unless work is a mechanical disjoint-file refactor with explicit write scopes." >&2
|
|
61
|
+
echo " VERIFY DONE WITH: git diff/status, rg/grep, scripts/tests; team task status is advisory only." >&2
|
|
61
62
|
echo " Current: Agent(${agent_type}) -- ${prompt_preview}" >&2
|
|
62
63
|
echo "-----------------------------------------------------------" >&2
|
|
63
64
|
elif [ "$COUNT" -ge 2 ]; then
|
|
@@ -67,6 +68,8 @@ elif [ "$COUNT" -ge 2 ]; then
|
|
|
67
68
|
echo " * 3+ agents needed for this work" >&2
|
|
68
69
|
echo " * Review -> fix -> re-review cycle exists" >&2
|
|
69
70
|
echo " * Agents need shared state or coordination" >&2
|
|
71
|
+
echo " NOTE: For mechanical disjoint-file refactors, bounded standalone agents may avoid Team runtime overhead." >&2
|
|
72
|
+
echo " VERIFY DONE WITH: git diff/status, rg/grep, scripts/tests; task status alone is not proof." >&2
|
|
70
73
|
echo " Current: Agent(${agent_type}) -- ${prompt_preview}" >&2
|
|
71
74
|
echo "-----------------------------------------------------------" >&2
|
|
72
75
|
fi
|
|
@@ -6,296 +6,135 @@
|
|
|
6
6
|
|
|
7
7
|
## Detection
|
|
8
8
|
|
|
9
|
-
Available when `OMCODEX_AGENT_TEAMS=1` or TeamCreate/SendMessage
|
|
9
|
+
Available when `OMCODEX_AGENT_TEAMS=1` or `TeamCreate` / `SendMessage` exists.
|
|
10
10
|
|
|
11
11
|
## Decision Matrix
|
|
12
12
|
|
|
13
13
|
| Scenario | Preferred | Reason |
|
|
14
14
|
|----------|-----------|--------|
|
|
15
15
|
| Simple independent subtasks | Agent Tool | Lower cost, no coordination overhead |
|
|
16
|
-
|
|
|
16
|
+
| Mechanical disjoint-file refactors/deletions | Agent Tool | Explicit write scopes can avoid Team runtime overhead/stalls |
|
|
17
|
+
| Sequential-dependency init/scaffolding | Agent Tool | Avoid blocked agents polling |
|
|
17
18
|
| Multi-step with shared state | **Agent Teams** | Shared task list, peer messaging |
|
|
18
|
-
| Research requiring discussion | **Agent Teams** | Iterative discovery
|
|
19
|
-
| Cost-sensitive batch ops | Agent Tool | Minimal token overhead |
|
|
19
|
+
| Research requiring discussion | **Agent Teams** | Iterative discovery and synthesis |
|
|
20
20
|
| Complex debugging across modules | **Agent Teams** | Cross-module state sharing |
|
|
21
21
|
| Code review + fix cycle | **Agent Teams** | Review → fix → re-review loop |
|
|
22
|
-
| Single file operations | Agent Tool | Overkill for simple tasks |
|
|
23
22
|
| Dynamic agent creation + usage | **Agent Teams** | Create → test → iterate cycle |
|
|
24
|
-
| Multi-issue release batch | **Agent Teams** | Shared task tracking
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
| Scope | Tool |
|
|
31
|
-
|
|
32
|
-
| Intra-session | `SendMessage` (Agent Teams) |
|
|
33
|
-
| Cross-session | `send_message` (claude-peers-mcp) |
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## Self-Check
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
║ 1. Is Agent Teams available? ║
|
|
51
|
-
║ YES → check criteria #2-#5 ║
|
|
52
|
-
║ NO → Proceed with Agent tool ║
|
|
53
|
-
║ ║
|
|
54
|
-
║ 2. Will 3+ agents be involved? ║
|
|
55
|
-
║ YES → use Agent Teams ║
|
|
56
|
-
║ NO → Check #3 ║
|
|
57
|
-
║ ║
|
|
58
|
-
║ 3. Is there a review → fix → re-review cycle? ║
|
|
59
|
-
║ YES → use Agent Teams ║
|
|
60
|
-
║ NO → Check #4 ║
|
|
61
|
-
║ ║
|
|
62
|
-
║ 4. Are 2+ issues being fixed in the same release batch? ║
|
|
63
|
-
║ YES → prefer Agent Teams (coordination benefit) ║
|
|
64
|
-
║ NO → Check #5 ║
|
|
65
|
-
║ ║
|
|
66
|
-
║ 5. Are tasks sequentially dependent (init/scaffold)? ║
|
|
67
|
-
║ YES → prefer Agent Tool (single agent, no coordination) ║
|
|
68
|
-
║ NO → Continue with Agent Teams ║
|
|
69
|
-
║ ║
|
|
70
|
-
║ Simple rule: 3+ agents OR review cycle → use Agent Teams ║
|
|
71
|
-
║ Sequential deps / scaffolding → Agent Tool (single agent) ║
|
|
72
|
-
║ 2+ issues in same batch → prefer Agent Teams ║
|
|
73
|
-
║ Everything else → Agent tool ║
|
|
74
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
23
|
+
| Multi-issue release batch | **Agent Teams** | Shared task tracking and coordinated release |
|
|
24
|
+
|
|
25
|
+
When enabled and criteria match, Agent Teams is required.
|
|
26
|
+
|
|
27
|
+
## Scope: Intra-Session vs Cross-Session
|
|
28
|
+
|
|
29
|
+
| Scope | Tool | Use Case |
|
|
30
|
+
|-------|------|----------|
|
|
31
|
+
| Intra-session | `SendMessage` (Agent Teams) | Multi-agent collaboration in one session |
|
|
32
|
+
| Cross-session | `send_message` (claude-peers-mcp) | Multi-terminal/project coordination |
|
|
33
|
+
|
|
34
|
+
Do not confuse these mechanisms.
|
|
35
|
+
|
|
36
|
+
## Self-Check Before Agent Tool
|
|
37
|
+
|
|
38
|
+
Quick rule: explicit user preference for plain subagents wins. Otherwise use Teams for 3+ agents, review cycles, shared state, complex debugging, dynamic creation, or multi-issue batches; use Agent Tool for 1-2 simple tasks, sequential scaffolding, or mechanical disjoint-file batches with explicit scopes.
|
|
39
|
+
|
|
40
|
+
<!-- DETAIL: Self-Check Before Agent Tool
|
|
41
|
+
0. Did the user explicitly prefer plain subagents this session? YES → Agent Tool.
|
|
42
|
+
1. Is Agent Teams unavailable? YES → Agent Tool with R009/R010.
|
|
43
|
+
2. Will 3+ agents be involved? YES → Agent Teams.
|
|
44
|
+
3. Is there a review → fix → re-review cycle? YES → Agent Teams.
|
|
45
|
+
4. Are 2+ issues fixed in the same release batch? YES → prefer Agent Teams.
|
|
46
|
+
5. Are tasks sequentially dependent init/scaffold work? YES → Agent Tool.
|
|
47
|
+
6. Is this a mechanical disjoint-file refactor/deletion batch with explicit write scopes where Team runtime overhead or stall risk exceeds coordination value? YES → Agent Tool allowed.
|
|
48
|
+
7. Otherwise, use Agent Teams when collaboration or shared state has material value.
|
|
75
49
|
-->
|
|
76
50
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<!-- DETAIL:
|
|
82
|
-
|
|
83
|
-
║ BEFORE SPAWNING TEAM MEMBERS: ║
|
|
84
|
-
║ ║
|
|
85
|
-
║ 1. How many members does this team need? N = ___ ║
|
|
86
|
-
║ 2. Am I spawning ALL N members in THIS message? ║
|
|
87
|
-
║ YES → Good. Continue. ║
|
|
88
|
-
║ NO → Spawn all N members in this message before proceeding. ║
|
|
89
|
-
║ ║
|
|
90
|
-
║ Partial spawn (e.g., 1/3) = needs correction ║
|
|
91
|
-
║ Sequential spawn (one per message) = needs correction ║
|
|
92
|
-
║ All at once in single message = correct ║
|
|
93
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
51
|
+
## Spawn Completeness
|
|
52
|
+
|
|
53
|
+
Spawn all members for a parallel team slice in one message; partial/sequential spawning needs correction.
|
|
54
|
+
|
|
55
|
+
<!-- DETAIL: Spawn Completeness
|
|
56
|
+
Before spawning, count required members (N) and spawn all N in one message. Partial spawn (1/N) and one-member-per-message sequencing break the team contract because early workers begin without the intended peer set and shared coordination context.
|
|
94
57
|
-->
|
|
95
58
|
|
|
96
|
-
|
|
97
|
-
When an external skill instructs using Agent tool but R018 criteria are met:
|
|
59
|
+
## External Skill Conflict Resolution
|
|
98
60
|
|
|
99
|
-
|
|
100
|
-
|------------|--------------|------------|
|
|
101
|
-
| "Use Agent tool for N tasks" | 3+ agents → Teams | Use Agent Teams, follow skill logic |
|
|
102
|
-
| "Sequential agent spawning" | Independent tasks → parallel | Parallelize per R009 |
|
|
103
|
-
| "Skip coordination" | Shared state → Teams | Use Teams for coordination |
|
|
61
|
+
External skills define workflow; R018 defines execution method. Keep skill logic but use Teams when R018 criteria match.
|
|
104
62
|
|
|
105
|
-
|
|
106
|
-
|
|
63
|
+
<!-- DETAIL: External Skill Conflict Resolution
|
|
64
|
+
Examples:
|
|
65
|
+
- Skill says “Use Agent tool for N tasks”; R018 says 3+ agents → use Agent Teams.
|
|
66
|
+
- Skill suggests sequential spawning; R009 says independent tasks → spawn in parallel.
|
|
67
|
+
- Skill says “skip coordination”; shared state/review cycles → use Team coordination.
|
|
68
|
+
-->
|
|
69
|
+
|
|
70
|
+
## Retrospective Hardening
|
|
71
|
+
|
|
72
|
+
- Mechanical disjoint-file refactors/deletions may use standalone parallel agents when prompts have explicit write scopes and Team runtime overhead or stall risk outweighs coordination value.
|
|
73
|
+
- Agent Teams task status is advisory only; verify completion with deterministic evidence such as `git diff`, `git status`, search, scripts, tests, or build output.
|
|
74
|
+
- Split giant delegated prompts by domain, file group, and write scope so assignees can finish without touching another agent's files.
|
|
75
|
+
- Do not misuse `AskUserQuestion` or other user-facing prompts for internal coordination; use peer channels, runtime state, or repository evidence.
|
|
76
|
+
- In zsh snippets, avoid the reserved `status` variable; use names like `exit_status` or `cmd_status`.
|
|
77
|
+
|
|
78
|
+
<!-- DETAIL: Retrospective Hardening
|
|
79
|
+
#1430/#1431 hardening intent:
|
|
80
|
+
- Mechanical disjoint-file batches are not inherently collaborative. Standalone agents may be safer when each owns a non-overlapping file set and Team runtime coordination would add token cost, idle polling, or stall risk.
|
|
81
|
+
- Team task status, TaskList state, member status, and peer claims are coordination signals, not proof. The orchestrator must confirm outcomes through repository state and repeatable commands before declaring completion.
|
|
82
|
+
- Giant prompts create cross-scope edits and confused ownership. Split by domain/file group/write scope, include explicit boundaries, and require agents to report rather than self-assign extra work.
|
|
83
|
+
- AskUserQuestion is for human decisions, not internal agent coordination. Internal coordination belongs in Agent Teams peer messages, cross-session peer messaging, runtime state, or direct repo evidence.
|
|
84
|
+
- zsh reserves `status`; shell snippets that assign to it can fail. Use `exit_status`, `cmd_status`, or another non-reserved name.
|
|
107
85
|
-->
|
|
108
86
|
|
|
109
87
|
## Common Violations
|
|
110
88
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
❌ WRONG: Agent Teams enabled, 3+ research tasks using Agent tool
|
|
123
|
-
Agent(Explore):haiku → Analysis 1
|
|
124
|
-
Agent(Explore):haiku → Analysis 2
|
|
125
|
-
Agent(Explore):haiku → Analysis 3
|
|
126
|
-
|
|
127
|
-
✓ CORRECT: TeamCreate → spawn researchers → coordinate via shared task list
|
|
128
|
-
TeamCreate("research-team")
|
|
129
|
-
Agent(researcher-1) → Analysis 1 ┐
|
|
130
|
-
Agent(researcher-2) → Analysis 2 ├─ Spawned as team members
|
|
131
|
-
Agent(researcher-3) → Analysis 3 ┘
|
|
132
|
-
SendMessage(coordinate)
|
|
133
|
-
|
|
134
|
-
❌ WRONG: Code review + fix as independent Agents
|
|
135
|
-
Agent(reviewer) → "Review code"
|
|
136
|
-
(receive result)
|
|
137
|
-
Agent(implementer) → "Fix issues"
|
|
138
|
-
(receive result)
|
|
139
|
-
Agent(reviewer) → "Re-review"
|
|
140
|
-
|
|
141
|
-
✓ CORRECT: Agent Teams for review-fix cycle
|
|
142
|
-
TeamCreate("review-fix")
|
|
143
|
-
Agent(reviewer) + Agent(implementer) → team members
|
|
144
|
-
reviewer → SendMessage(implementer, "issues found")
|
|
145
|
-
implementer → fixes → SendMessage(reviewer, "fixed")
|
|
146
|
-
reviewer → re-reviews → done
|
|
147
|
-
|
|
148
|
-
❌ WRONG: Spawning team members one at a time
|
|
149
|
-
TeamCreate("research-team")
|
|
150
|
-
Message 1: Agent(researcher-1) → Analysis 1 (only 1/3 spawned)
|
|
151
|
-
Message 2: Agent(researcher-2) → Analysis 2 (late spawn)
|
|
152
|
-
Message 3: Agent(researcher-3) → Analysis 3 (late spawn)
|
|
153
|
-
|
|
154
|
-
✓ CORRECT: All members in a single message
|
|
155
|
-
TeamCreate("research-team")
|
|
156
|
-
Single message:
|
|
157
|
-
Agent(researcher-1) → Analysis 1 ┐
|
|
158
|
-
Agent(researcher-2) → Analysis 2 ├─ ALL spawned together
|
|
159
|
-
Agent(researcher-3) → Analysis 3 ┘
|
|
160
|
-
|
|
161
|
-
❌ WRONG: Completed member modifies other member's files
|
|
162
|
-
svelte-projects completes task → browses TaskList → edits agent-teams-advisor.sh (hook-fixer's scope)
|
|
163
|
-
|
|
164
|
-
✓ CORRECT: Completed member reports and waits
|
|
165
|
-
svelte-projects completes task → SendMessage("Task complete") → waits silently
|
|
89
|
+
Wrong: 3+ collaborative standalone agents, uncoordinated review/fix loops, or one-at-a-time team spawns. Correct: create team, spawn together, coordinate via `SendMessage`, verify deterministically.
|
|
90
|
+
|
|
91
|
+
<!-- DETAIL: Common Violations
|
|
92
|
+
Wrong: three researchers launched as unrelated Agent calls while Agent Teams is available.
|
|
93
|
+
Correct: TeamCreate("research-team") + researcher-1/2/3 spawned together + SendMessage coordination.
|
|
94
|
+
|
|
95
|
+
Wrong: reviewer → implementer → reviewer as disconnected calls.
|
|
96
|
+
Correct: reviewer and implementer are team members; reviewer sends findings, implementer fixes, reviewer re-checks.
|
|
97
|
+
|
|
98
|
+
Wrong: completed member browses TaskList and edits another member's files.
|
|
99
|
+
Correct: completed member reports completion and waits silently unless reassigned by the lead.
|
|
166
100
|
-->
|
|
167
101
|
|
|
168
102
|
## Cost Guidelines
|
|
169
103
|
|
|
170
|
-
|
|
171
|
-
|----------|-----------|-------------|
|
|
172
|
-
| Agent count | 1-2 | 3+ |
|
|
173
|
-
| Inter-task dependency | None | Present |
|
|
174
|
-
| Iteration cycles | None | Present (review→fix→re-review) |
|
|
175
|
-
| Estimated duration | < 3 min | > 3 min |
|
|
176
|
-
| Shared state needed | No | Yes |
|
|
104
|
+
Agent Tool: 1-2 simple independent agents. Agent Teams: 3+ agents, shared state, review cycles, complex work, multi-issue batches, or dynamic creation.
|
|
177
105
|
|
|
178
106
|
## Team Patterns
|
|
179
107
|
|
|
180
|
-
|
|
181
|
-
Hybrid: Review+Fix, Create+Validate, Multi-Expert, Dynamic Creation, Codex Hybrid.
|
|
108
|
+
Common patterns: Research, Development, Debug, Dynamic Creation, and Codex Hybrid.
|
|
182
109
|
|
|
183
110
|
<!-- DETAIL: Team Patterns
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
### Hybrid Patterns
|
|
190
|
-
- Review+Fix: reviewer + implementer (reviewer finds issues → implementer fixes → reviewer re-checks)
|
|
191
|
-
- Create+Validate: mgr-creator + qa-engineer (create agent → validate → iterate)
|
|
192
|
-
- Multi-Expert: expert-1 + expert-2 + coordinator (cross-domain tasks requiring multiple specialties)
|
|
193
|
-
|
|
194
|
-
### Dynamic Patterns
|
|
195
|
-
- Dynamic Creation: mgr-creator + domain-expert (create new agent → immediately use for pending task)
|
|
196
|
-
- Codex Hybrid: codex-exec-agent + claude-reviewer (Codex generates → Claude reviews/refines)
|
|
197
|
-
|
|
198
|
-
### Codex-Exec Integration
|
|
199
|
-
When both Agent Teams and codex-exec are available:
|
|
200
|
-
1. Claude agent analyzes requirements
|
|
201
|
-
2. codex-exec generates implementation (Codex strength: code generation)
|
|
202
|
-
3. Claude agent reviews and refines (Claude strength: reasoning, quality)
|
|
203
|
-
4. Iterate via team messaging until quality meets standards
|
|
204
|
-
|
|
205
|
-
| Step | Agent | Model |
|
|
206
|
-
|------|-------|-------|
|
|
207
|
-
| Analysis | Claude team member | sonnet/opus |
|
|
208
|
-
| Generation | codex-exec | (Codex default) |
|
|
209
|
-
| Review | Claude team member | sonnet |
|
|
210
|
-
| Refinement | Appropriate expert | sonnet |
|
|
211
|
-
|
|
212
|
-
### Dynamic Agent Creation in Teams
|
|
213
|
-
When Agent Teams creates a new agent via mgr-creator:
|
|
214
|
-
1. Team lead identifies missing expertise
|
|
215
|
-
2. Spawns mgr-creator as team member
|
|
216
|
-
3. mgr-creator creates agent with auto-discovered skills
|
|
217
|
-
4. New agent joins team immediately
|
|
218
|
-
5. Team continues with expanded capabilities
|
|
111
|
+
Research: parallel researchers gather evidence; synthesizer merges and checks conflicts.
|
|
112
|
+
Development: implementer changes code, reviewer challenges, tester verifies.
|
|
113
|
+
Debug: investigators isolate causes across modules; fixer implements after evidence converges.
|
|
114
|
+
Dynamic Creation: mgr-creator creates missing expertise, validator checks immediate usability.
|
|
115
|
+
Codex Hybrid: codex-exec generates implementation, Claude team member reviews/refines, then verification closes the loop.
|
|
219
116
|
-->
|
|
220
117
|
|
|
221
118
|
## Blocked Agent Behavior
|
|
222
119
|
|
|
223
|
-
|
|
224
|
-
Post-completion: report via SendMessage, wait silently. Do NOT browse TaskList or modify files outside scope.
|
|
120
|
+
Prefer deferred spawn over idle polling. Blocked/completed members wait silently, check infrequently, and never edit outside scope.
|
|
225
121
|
|
|
226
122
|
<!-- DETAIL: Blocked Agent Behavior
|
|
227
|
-
|
|
228
|
-
|----------|------|---------|
|
|
229
|
-
| Deferred spawn | Dependency chain is clear | No wasted tokens; spawn after blocker completes |
|
|
230
|
-
| Silent wait | Agent already spawned, short wait expected | Minimal overhead |
|
|
231
|
-
| Reassign | Agent blocked >2 min with no progress | Reuse agent for unblocked work |
|
|
232
|
-
|
|
233
|
-
### Prompt Guidelines for Team Members
|
|
234
|
-
When spawning agents that may be blocked:
|
|
235
|
-
1. Include explicit instruction: "If your task is blocked, wait silently. Do NOT send periodic status messages."
|
|
236
|
-
2. Set check interval: "Check TaskList once per minute, not continuously."
|
|
237
|
-
3. Prefer deferred spawn when the dependency resolution time is unpredictable.
|
|
238
|
-
4. Post-completion instruction: "After completing your task, report via SendMessage and wait. Do NOT explore or modify files outside your scope."
|
|
239
|
-
5. Explicit scope boundary: "Your scope is limited to: {file list or directory}. Do NOT modify files outside this scope."
|
|
240
|
-
|
|
241
|
-
### Anti-Pattern: Idle Polling
|
|
242
|
-
❌ WRONG: Blocked agent sends repeated status messages
|
|
243
|
-
docker-dev: "Task #1 still pending..." (×5 messages, wasting tokens)
|
|
244
|
-
|
|
245
|
-
✓ CORRECT: Deferred spawn after dependency resolves
|
|
246
|
-
(Task #1 completes) → then spawn docker-dev for Task #3
|
|
247
|
-
|
|
248
|
-
✓ ALSO CORRECT: Silent wait with infrequent checks
|
|
249
|
-
docker-dev spawned with: "Wait silently if blocked. Check TaskList once per minute."
|
|
250
|
-
|
|
251
|
-
### Post-Completion Scope Constraint
|
|
252
|
-
| Behavior | Correct | Wrong |
|
|
253
|
-
|----------|---------|-------|
|
|
254
|
-
| Task completed | Report completion via SendMessage, wait silently | Browse TaskList for other work |
|
|
255
|
-
| No more tasks | Exit or wait for team shutdown | Explore/modify files outside original scope |
|
|
256
|
-
| See unfinished work | Report to team lead, do NOT self-assign | Edit files that belong to other members |
|
|
257
|
-
|
|
258
|
-
### Self-Check (After Task Completion)
|
|
259
|
-
╔══════════════════════════════════════════════════════════════════╗
|
|
260
|
-
║ AFTER COMPLETING YOUR ASSIGNED TASK: ║
|
|
261
|
-
║ ║
|
|
262
|
-
║ 1. Did I complete ONLY my assigned task? ║
|
|
263
|
-
║ YES → Report completion ║
|
|
264
|
-
║ NO → Revert scope-violation changes ║
|
|
265
|
-
║ ║
|
|
266
|
-
║ 2. Are there files modified outside my task scope? ║
|
|
267
|
-
║ YES → This is a violation — revert ║
|
|
268
|
-
║ NO → Good ║
|
|
269
|
-
║ ║
|
|
270
|
-
║ 3. Am I about to explore/modify files for "other tasks"? ║
|
|
271
|
-
║ YES → STOP. Report to team lead instead ║
|
|
272
|
-
║ NO → Good. Wait silently or exit ║
|
|
273
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
123
|
+
Strategies: defer spawn when dependency chain is clear; silent wait for short blocks; reassign after sustained blocking. Prompts should say: “If blocked, wait silently. Check TaskList at most once per minute. After completing, report via SendMessage and do not browse or edit outside your scope.”
|
|
274
124
|
-->
|
|
275
125
|
|
|
276
126
|
## Lifecycle
|
|
277
127
|
|
|
278
|
-
`TeamCreate → TaskCreate → Agent(spawn members) → SendMessage → TaskUpdate → ... → TeamDelete`.
|
|
128
|
+
`TeamCreate → TaskCreate → Agent(spawn members) → SendMessage → TaskUpdate → ... → TeamDelete`.
|
|
279
129
|
|
|
280
130
|
<!-- DETAIL: Lifecycle diagram
|
|
281
|
-
|
|
282
|
-
TeamCreate → TaskCreate → Agent(spawn members) → SendMessage(coordinate)
|
|
283
|
-
→ TaskUpdate(progress) → ... → shutdown members → TeamDelete
|
|
284
|
-
```
|
|
131
|
+
TeamCreate → TaskCreate → Agent(spawn members) → SendMessage(coordinate) → TaskUpdate(progress) → verify → shutdown members → TeamDelete.
|
|
285
132
|
-->
|
|
286
133
|
|
|
287
134
|
## Fallback
|
|
288
135
|
|
|
289
|
-
|
|
290
|
-
When Agent Teams available: actively prefer it for qualifying tasks.
|
|
291
|
-
|
|
292
|
-
## Cost Awareness
|
|
293
|
-
|
|
294
|
-
Agent Teams actively preferred for qualifying collaborative tasks. Use Agent tool only when:
|
|
295
|
-
- 1-2 agents with no inter-dependency
|
|
296
|
-
- No review → fix cycles
|
|
297
|
-
- Simple independent subtasks
|
|
136
|
+
If Teams unavailable, use Agent tool with R009/R010. If available, prefer Teams for qualifying collaboration.
|
|
298
137
|
|
|
299
|
-
|
|
138
|
+
## Active Preference Rule
|
|
300
139
|
|
|
301
|
-
|
|
140
|
+
Default to Teams for multi-step/multi-issue collaboration. Fall back only for simple single-issue work, explicit user preference, sequential scaffolding, or low-coordination mechanical disjoint-file batches.
|
|
@@ -22,6 +22,18 @@ Before declaring any task `[Done]`, verify completion against task-type-specific
|
|
|
22
22
|
|
|
23
23
|
Before [Done]: (1) Verify ACTUAL outcome not just attempt — "ran command" ≠ "succeeded". (2) Check task-type criteria above. (3) No unchecked items. (4) Would bet $100 it's complete.
|
|
24
24
|
|
|
25
|
+
## Workflow Prompt and Verifier Ground Truth
|
|
26
|
+
|
|
27
|
+
When a workflow delegates to `agent()` or equivalent subagent calls, complete the full prompt string before the call. Do not append guardrails, fact sheets, or critical constraints to the returned value after the agent has already run.
|
|
28
|
+
|
|
29
|
+
Verifier lanes must receive the ground-truth sources needed to check cross-cutting claims, especially external URLs, cluster DNS/service names, credentials metadata, release facts, and infrastructure identifiers. A verifier cannot validate a fact that was never provided and is not present in the inspected source.
|
|
30
|
+
|
|
31
|
+
## Read-Before-Characterize Diagnostics
|
|
32
|
+
|
|
33
|
+
Do not characterize logs, traces, or diagnostics as an "error loop", "root cause", "flaky test", or similar conclusion before reading the relevant evidence. First capture the observed symptom, then inspect the authoritative log/output/source, then label the failure mode.
|
|
34
|
+
|
|
35
|
+
For large or noisy logs, read a representative targeted slice before making permanent workflow, rule, template, or release-process changes. If the initial characterization changes after reading, report the correction explicitly.
|
|
36
|
+
|
|
25
37
|
## Diagnostic Hypothesis Verification
|
|
26
38
|
|
|
27
39
|
When a failure diagnosis would cause a permanent workflow, rule, template, or release-process change, the diagnosis must be treated as a hypothesis until it is directly verified.
|
|
@@ -116,6 +116,26 @@ Main Conversation (orchestrator)
|
|
|
116
116
|
```
|
|
117
117
|
-->
|
|
118
118
|
|
|
119
|
+
## Subagent Scope-Creep STOP Protocol
|
|
120
|
+
|
|
121
|
+
Before delegating broad work, decompose it into narrow domains with explicit write/command boundaries. For example, do not hand one agent an open-ended "migrate + backfill + fix infra" prompt when the work can split into data migration, credential handling, tunnel/networking, dashboard verification, and release notes.
|
|
122
|
+
|
|
123
|
+
The orchestrator must stop and redesign a delegated lane when any of these occur:
|
|
124
|
+
|
|
125
|
+
1. The same subagent trips the security classifier twice on one assignment.
|
|
126
|
+
2. The subagent requests or attempts privileged actions outside the delegated scope.
|
|
127
|
+
3. The subagent chains from an approved action into a different credential, tunnel, namespace, pod, cluster, account, or shared service.
|
|
128
|
+
4. The user corrects the agent for acting beyond the requested scope.
|
|
129
|
+
|
|
130
|
+
Required STOP response:
|
|
131
|
+
|
|
132
|
+
1. Stop that subagent lane; do not retry the same broad prompt.
|
|
133
|
+
2. Preserve evidence and summarize the exact scope breach.
|
|
134
|
+
3. Redesign the task into smaller bounded lanes with explicit allowed and forbidden actions.
|
|
135
|
+
4. Reconfirm authorization before any irreversible shared-infrastructure or credential action.
|
|
136
|
+
|
|
137
|
+
Thirteen repeated security trips or repeated privileged retries are an anti-pattern: after the second trip, continuing without redesign is a coordination failure.
|
|
138
|
+
|
|
119
139
|
## Common Violations
|
|
120
140
|
|
|
121
141
|
Key violations to avoid (file writes, git commands, bundled operations — all must be delegated):
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
| 5: Conditional | TeamCreate, TeamDelete, SendMessage, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskStop, TaskOutput | Available when Agent Teams enabled |
|
|
14
14
|
| 6: MCP | ListMcpResourcesTool, ReadMcpResourceTool, CronCreate, CronDelete, CronList, RemoteTrigger | MCP/extension tools, available when servers configured |
|
|
15
15
|
|
|
16
|
+
## Privileged Scope Boundaries
|
|
17
|
+
|
|
18
|
+
- Approval for one privileged action does not authorize follow-on privileged chaining. A request to remove one tunnel, secret, pod, namespace object, or credential does not authorize creating a replacement, rotating credentials, deleting adjacent resources, or executing inside production workloads.
|
|
19
|
+
- Treat credential-store reads as sensitive even when the tool is otherwise available. Never paste raw secret values or full credential-store transcripts into chat; use redacted names, fingerprints, or boolean verification results.
|
|
20
|
+
- Reconfirm scope before irreversible shared infrastructure or credential actions, including production pod exec/write, Kubernetes secret mutation, public tunnel creation, credential rotation, and shared namespace deletion.
|
|
21
|
+
|
|
16
22
|
## File Access
|
|
17
23
|
|
|
18
24
|
| Operation | Allowed | Prohibited |
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
| Commands | `rm -rf /` or broad deletes, shutdown/restart, sudo/su, network config changes |
|
|
12
12
|
| External | Access URLs without approval, send user data externally, download/execute unknown scripts |
|
|
13
13
|
|
|
14
|
+
## Credential and Shared-Infrastructure Guardrails
|
|
15
|
+
|
|
16
|
+
- Do not dump credential-store contents, `.env` files, OAuth material, kube secrets, or secret-manager values into transcripts, logs, issue bodies, or summaries. Report only the minimum redacted key names or verification status required for the task.
|
|
17
|
+
- Do not rotate, delete, recreate, or replace credentials unless the user explicitly requested that exact credential action.
|
|
18
|
+
- Before irreversible action on shared infrastructure or credentials, reconfirm the target, namespace/account/project, requested scope, rollback path, and user authorization.
|
|
19
|
+
- Stop instead of chaining privileged actions when the next step would affect a different credential, tunnel, namespace, pod, cluster, account, or shared service than the user requested.
|
|
20
|
+
|
|
14
21
|
## Required Before Destructive Operations
|
|
15
22
|
|
|
16
23
|
Verify target, assess impact scope, check recoverability, get user approval.
|
|
@@ -27,6 +27,17 @@
|
|
|
27
27
|
| Ambiguous | `[Confirm] Understood "{request}" as {interpretation}. Proceed?` |
|
|
28
28
|
| Risky | `[Warning] This action has {risk}. Continue? Yes: {action} / No: Cancel` |
|
|
29
29
|
|
|
30
|
+
## External Product UI Claims
|
|
31
|
+
|
|
32
|
+
Avoid presenting unverified external product UI field names, button labels, or step-by-step paths as fact. Product consoles change frequently and screenshots/docs may be stale.
|
|
33
|
+
|
|
34
|
+
When UI evidence is not directly verified:
|
|
35
|
+
|
|
36
|
+
- State that the UI path is an inference or may vary by account/version.
|
|
37
|
+
- Prefer stable facts already observed in the environment: URLs, config keys, resource IDs, CLI output, or API results.
|
|
38
|
+
- Ask the user to map those verified values into the current UI instead of inventing missing fields.
|
|
39
|
+
- If exact UI steps are required, verify against current official docs or a live screenshot before giving precise labels.
|
|
40
|
+
|
|
30
41
|
## Multiple Tasks
|
|
31
42
|
|
|
32
43
|
- Dependent: Sequential
|
|
@@ -61,24 +61,17 @@ Check if Agent Teams is available (`OMCODEX_AGENT_TEAMS=1` or TeamCreate/SendMes
|
|
|
61
61
|
| Cross-tool data quality analysis | Agent Teams |
|
|
62
62
|
| Quick DAG/model validation | Agent Tool |
|
|
63
63
|
|
|
64
|
-
### Step 2:
|
|
64
|
+
### Step 2: External Interop Guidance (Code Generation)
|
|
65
65
|
For **new pipeline code**, **DAG scaffolding**, or **SQL model generation**:
|
|
66
66
|
|
|
67
|
-
1.
|
|
68
|
-
2. If
|
|
69
|
-
|
|
70
|
-
- codex-exec generates initial code (strength: fast generation)
|
|
71
|
-
- Selected DE expert reviews and refines codex output (strength: reasoning, quality)
|
|
72
|
-
3. If codex unavailable but gemini available → delegate to `/gemini-exec` for scaffolding:
|
|
73
|
-
- Display: `[Gemini Hybrid] Delegating to gemini-exec...`
|
|
74
|
-
- gemini-exec generates initial code
|
|
75
|
-
- Selected DE expert reviews and refines output
|
|
76
|
-
4. If RTK available (`RTK=available` in env status) → optionally wrap DE expert output through RTK to reduce token consumption by 60-90%:
|
|
67
|
+
1. Use the selected DE expert as the default implementation path.
|
|
68
|
+
2. If the native Claude Code plugin `openai/codex-plugin-cc` is explicitly installed and requested, it may provide Codex interop for scaffolding before expert review.
|
|
69
|
+
3. If RTK is available (`RTK=available` in env status), optionally wrap DE expert output through `rtk-exec` to reduce token consumption by 60-90%:
|
|
77
70
|
- Display: `[RTK Proxy] Token optimization active via rtk-exec`
|
|
78
71
|
- RTK acts as a transparent proxy — no change to expert selection
|
|
79
|
-
|
|
72
|
+
4. Otherwise display `[External CLI] Not requested — proceeding with {expert} directly` and use the expert directly.
|
|
80
73
|
|
|
81
|
-
**Suitable**: New DAG files, dbt model scaffolding, SQL template generation
|
|
74
|
+
**Suitable for optional plugin interop**: New DAG files, dbt model scaffolding, SQL template generation
|
|
82
75
|
**Unsuitable**: Existing pipeline modification, architecture decisions, data quality analysis
|
|
83
76
|
|
|
84
77
|
### Step 3: Expert Selection
|