oh-my-customcode 0.19.3 → 0.19.4
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/package.json
CHANGED
|
@@ -27,16 +27,34 @@ if [ "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-0}" = "1" ]; then
|
|
|
27
27
|
AGENT_TEAMS_STATUS="enabled"
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
|
+
# Git workflow reminder
|
|
31
|
+
CURRENT_BRANCH="unknown"
|
|
32
|
+
if command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
33
|
+
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
34
|
+
fi
|
|
35
|
+
|
|
30
36
|
# Write status to file for other hooks to reference
|
|
31
37
|
STATUS_FILE="/tmp/.claude-env-status-${PPID}"
|
|
32
38
|
cat > "$STATUS_FILE" << ENVEOF
|
|
33
39
|
codex=${CODEX_STATUS}
|
|
34
40
|
agent_teams=${AGENT_TEAMS_STATUS}
|
|
41
|
+
git_branch=${CURRENT_BRANCH}
|
|
35
42
|
ENVEOF
|
|
36
43
|
|
|
37
44
|
# Report to stderr (visible in conversation)
|
|
38
45
|
echo " codex CLI: ${CODEX_STATUS}" >&2
|
|
39
46
|
echo " Agent Teams: ${AGENT_TEAMS_STATUS}" >&2
|
|
47
|
+
echo "" >&2
|
|
48
|
+
echo " [Git Workflow Reminder]" >&2
|
|
49
|
+
echo " Current branch: ${CURRENT_BRANCH}" >&2
|
|
50
|
+
if [ "$CURRENT_BRANCH" = "develop" ] || [ "$CURRENT_BRANCH" = "main" ] || [ "$CURRENT_BRANCH" = "master" ]; then
|
|
51
|
+
echo " ⚠ You are on a protected branch!" >&2
|
|
52
|
+
echo " ⚠ Create a feature branch before making changes:" >&2
|
|
53
|
+
echo " git checkout -b feat/your-feature develop" >&2
|
|
54
|
+
else
|
|
55
|
+
echo " ✓ Feature branch detected" >&2
|
|
56
|
+
fi
|
|
57
|
+
echo " Rules: feature branch → commit → push → PR → merge" >&2
|
|
40
58
|
echo "------------------------------------" >&2
|
|
41
59
|
|
|
42
60
|
# Pass through
|
|
@@ -48,6 +48,28 @@ BEFORE using Task tool for 2+ agent tasks, this check is **ENFORCED**:
|
|
|
48
48
|
╚══════════════════════════════════════════════════════════════════╝
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
### Spawn Completeness Check (MANDATORY)
|
|
52
|
+
|
|
53
|
+
When spawning Agent Teams members:
|
|
54
|
+
|
|
55
|
+
**ALL members MUST be spawned in a SINGLE message.** Partial spawning is a VIOLATION of both R018 and R009.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
59
|
+
║ BEFORE SPAWNING TEAM MEMBERS: ║
|
|
60
|
+
║ ║
|
|
61
|
+
║ 1. How many members does this team need? N = ___ ║
|
|
62
|
+
║ 2. Am I spawning ALL N members in THIS message? ║
|
|
63
|
+
║ YES → Good. Continue. ║
|
|
64
|
+
║ NO → STOP. This is a VIOLATION. ║
|
|
65
|
+
║ All N members MUST be in the same message. ║
|
|
66
|
+
║ ║
|
|
67
|
+
║ Partial spawn (e.g., 1/3) = VIOLATION ║
|
|
68
|
+
║ Sequential spawn (one per message) = VIOLATION ║
|
|
69
|
+
║ All at once in single message = CORRECT ║
|
|
70
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
71
|
+
```
|
|
72
|
+
|
|
51
73
|
## Common Violations
|
|
52
74
|
|
|
53
75
|
```
|
|
@@ -87,6 +109,19 @@ BEFORE using Task tool for 2+ agent tasks, this check is **ENFORCED**:
|
|
|
87
109
|
Task(frontend-dev) + Task(backend-dev) → team members
|
|
88
110
|
Shared TaskList for interface contracts
|
|
89
111
|
SendMessage for API schema coordination
|
|
112
|
+
|
|
113
|
+
❌ WRONG: Spawning team members one at a time
|
|
114
|
+
TeamCreate("research-team")
|
|
115
|
+
Message 1: Task(researcher-1) → Analysis 1 (only 1/3 spawned)
|
|
116
|
+
Message 2: Task(researcher-2) → Analysis 2 (late spawn)
|
|
117
|
+
Message 3: Task(researcher-3) → Analysis 3 (late spawn)
|
|
118
|
+
|
|
119
|
+
✓ CORRECT: All members in a single message
|
|
120
|
+
TeamCreate("research-team")
|
|
121
|
+
Single message:
|
|
122
|
+
Task(researcher-1) → Analysis 1 ┐
|
|
123
|
+
Task(researcher-2) → Analysis 2 ├─ ALL spawned together
|
|
124
|
+
Task(researcher-3) → Analysis 3 ┘
|
|
90
125
|
```
|
|
91
126
|
|
|
92
127
|
## Cost Guidelines
|
|
@@ -39,6 +39,7 @@ Before writing/editing multiple files:
|
|
|
39
39
|
2. Using Write/Edit sequentially for 2+ files? → STOP, parallelize
|
|
40
40
|
3. Specialized agent available? → Use it (not general-purpose)
|
|
41
41
|
4. Agent Teams available + 3+ agents or review cycle? → YES: use Agent Teams instead of Task
|
|
42
|
+
5. Agent Teams members? → ALL members MUST spawn in a single message (no partial spawning)
|
|
42
43
|
|
|
43
44
|
### Common Violations to Avoid
|
|
44
45
|
|
|
@@ -79,6 +80,18 @@ Before writing/editing multiple files:
|
|
|
79
80
|
Task(lang-kotlin-expert → usecase queries) ├─ All spawned together
|
|
80
81
|
Task(be-springboot-expert → persistence) │
|
|
81
82
|
Task(be-springboot-expert → security) ┘
|
|
83
|
+
|
|
84
|
+
❌ WRONG: Agent Teams partial spawn (1 of N members)
|
|
85
|
+
TeamCreate("feature-team")
|
|
86
|
+
Message 1: Task(member-1) ← only 1/3 spawned, VIOLATION
|
|
87
|
+
Message 2: Task(member-2) ← sequential, VIOLATION
|
|
88
|
+
Message 3: Task(member-3) ← sequential, VIOLATION
|
|
89
|
+
|
|
90
|
+
✓ CORRECT: All Agent Teams members in single message
|
|
91
|
+
TeamCreate("feature-team")
|
|
92
|
+
Task(member-1) ┐
|
|
93
|
+
Task(member-2) ├─ Single message, all at once
|
|
94
|
+
Task(member-3) ┘
|
|
82
95
|
```
|
|
83
96
|
|
|
84
97
|
## Execution Rules
|