oh-my-customcode 1.1.16 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/hooks/hooks.json +1 -1
- package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +0 -0
- package/templates/.claude/hooks/scripts/destructive-git-guard.sh +0 -0
- package/templates/.claude/hooks/scripts/git-delegation-guard.sh +0 -0
- package/templates/.claude/hooks/scripts/session-env-check.sh +0 -0
- package/templates/.claude/hooks/scripts/stage-blocker.sh +4 -4
- package/templates/.claude/hooks/scripts/task-state-precompact.sh +1 -1
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +3 -3
- package/templates/.claude/skills/profile/SKILL.md +6 -38
- package/templates/.claude/skills/structured-dev-cycle/SKILL.md +12 -12
- package/templates/manifest.json +1 -1
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# Stage-blocking hook: blocks Write/Edit in non-implement stages
|
|
3
3
|
# Mutual Exclusion: This hook is mutually exclusive with autonomous mode (R010).
|
|
4
|
-
# When /tmp/.claude-dev-stage exists, autonomous mode cannot be activated.
|
|
4
|
+
# When /tmp/.claude-dev-stage-$PPID exists, autonomous mode cannot be activated.
|
|
5
5
|
# When /tmp/.claude-autonomous-$PPID exists, /structured-dev-cycle should not be started.
|
|
6
6
|
# See: MUST-orchestrator-coordination.md "Autonomous Execution Mode" section.
|
|
7
|
-
if [ -f /tmp/.claude-dev-stage ]; then
|
|
8
|
-
stage=$(cat /tmp/.claude-dev-stage | tr -d '[:space:]')
|
|
7
|
+
if [ -f /tmp/.claude-dev-stage-$PPID ]; then
|
|
8
|
+
stage=$(cat /tmp/.claude-dev-stage-$PPID | tr -d '[:space:]')
|
|
9
9
|
if [ -z "$stage" ]; then exit 0; fi
|
|
10
10
|
case "$stage" in
|
|
11
11
|
plan|verify-plan|verify-impl|compound|done)
|
|
12
|
-
echo "⛔ BLOCKED: Write/Edit disabled in '$stage' stage. Only allowed during 'implement' stage. Use 'echo implement > /tmp/.claude-dev-stage' to transition."
|
|
12
|
+
echo "⛔ BLOCKED: Write/Edit disabled in '$stage' stage. Only allowed during 'implement' stage. Use 'echo implement > /tmp/.claude-dev-stage-$PPID' to transition."
|
|
13
13
|
exit 2
|
|
14
14
|
;;
|
|
15
15
|
esac
|
|
@@ -20,7 +20,7 @@ collect_state() {
|
|
|
20
20
|
[ -f "/tmp/.claude-autonomous-$PPID" ] && autonomous="true"
|
|
21
21
|
|
|
22
22
|
# Dev stage (structured-dev-cycle)
|
|
23
|
-
[ -f "/tmp/.claude-dev-stage" ] && dev_stage=$(cat "/tmp/.claude-dev-stage" 2>/dev/null)
|
|
23
|
+
[ -f "/tmp/.claude-dev-stage-$PPID" ] && dev_stage=$(cat "/tmp/.claude-dev-stage-$PPID" 2>/dev/null)
|
|
24
24
|
|
|
25
25
|
# Tool call counter
|
|
26
26
|
[ -f "/tmp/claude-tool-count-$PPID" ] && tool_count=$(cat "/tmp/claude-tool-count-$PPID" 2>/dev/null)
|
|
@@ -179,7 +179,7 @@ When the user explicitly signals full-delegation intent, the orchestrator operat
|
|
|
179
179
|
### Activation Protocol
|
|
180
180
|
|
|
181
181
|
1. User gives explicit autonomous signal (not inferred from task complexity)
|
|
182
|
-
2. Verify stage-blocker is NOT active (`/tmp/.claude-dev-stage` must not exist)
|
|
182
|
+
2. Verify stage-blocker is NOT active (`/tmp/.claude-dev-stage-$PPID` must not exist)
|
|
183
183
|
3. Create marker: `echo 1 > /tmp/.claude-autonomous-$PPID`
|
|
184
184
|
4. Announce: `[Autonomous Mode] Activated for current task scope`
|
|
185
185
|
|
|
@@ -211,7 +211,7 @@ When the user explicitly signals full-delegation intent, the orchestrator operat
|
|
|
211
211
|
### Mutual Exclusion
|
|
212
212
|
|
|
213
213
|
- Autonomous mode and `/structured-dev-cycle` (stage-blocker) are **mutually exclusive**
|
|
214
|
-
- If `/tmp/.claude-dev-stage` exists → autonomous mode CANNOT be activated
|
|
214
|
+
- If `/tmp/.claude-dev-stage-$PPID` exists → autonomous mode CANNOT be activated
|
|
215
215
|
- If autonomous mode is active → `/structured-dev-cycle` should not be started
|
|
216
216
|
|
|
217
217
|
### Self-Check
|
|
@@ -225,7 +225,7 @@ When the user explicitly signals full-delegation intent, the orchestrator operat
|
|
|
225
225
|
║ NO → Do NOT activate ║
|
|
226
226
|
║ ║
|
|
227
227
|
║ 2. Is stage-blocker inactive? ║
|
|
228
|
-
║ (/tmp/.claude-dev-stage does NOT exist) ║
|
|
228
|
+
║ (/tmp/.claude-dev-stage-$PPID does NOT exist) ║
|
|
229
229
|
║ YES → Continue ║
|
|
230
230
|
║ NO → Cannot activate (mutually exclusive) ║
|
|
231
231
|
║ ║
|
|
@@ -70,43 +70,11 @@ Profile: web-app
|
|
|
70
70
|
Disable: codex, ralph-wiggum, agent-sdk-dev, ...
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
6. Apply changes via /
|
|
73
|
+
6. Apply changes via direct Edit on `~/.claude/settings.json` (`mode: "bypassPermissions"`, CC v2.1.121+):
|
|
74
|
+
- Read `~/.claude/settings.json`, merge the computed diff into `enabledPlugins` (set enabled plugins to `true`, disabled plugins to `false`), then Write the updated JSON back.
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
#!/usr/bin/env python3
|
|
78
|
-
import json, sys
|
|
79
|
-
|
|
80
|
-
settings_path = "/Users/<user>/.claude/settings.json" # resolve from $HOME
|
|
81
|
-
with open(settings_path) as f:
|
|
82
|
-
settings = json.load(f)
|
|
83
|
-
|
|
84
|
-
profile_path = ".claude/profiles/<name>.json"
|
|
85
|
-
with open(profile_path) as f:
|
|
86
|
-
profile = json.load(f)
|
|
87
|
-
|
|
88
|
-
for plugin in profile["plugins"]["enabled"]:
|
|
89
|
-
settings.setdefault("enabledPlugins", {})[plugin] = True
|
|
90
|
-
for plugin in profile["plugins"]["disabled"]:
|
|
91
|
-
settings.setdefault("enabledPlugins", {})[plugin] = False
|
|
92
|
-
|
|
93
|
-
with open(settings_path, "w") as f:
|
|
94
|
-
json.dump(settings, f, indent=2)
|
|
95
|
-
f.write("\n")
|
|
96
|
-
|
|
97
|
-
print("Settings updated.")
|
|
98
|
-
APPLY
|
|
99
|
-
python3 /tmp/profile-apply-$$.sh
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
7. Write active marker via /tmp script:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
cat > /tmp/profile-marker-$$.sh << 'MARKER'
|
|
106
|
-
echo "<name>" > .claude/profiles/.active
|
|
107
|
-
MARKER
|
|
108
|
-
bash /tmp/profile-marker-$$.sh
|
|
109
|
-
```
|
|
76
|
+
7. Write active marker via direct Write on `.claude/profiles/.active` (`mode: "bypassPermissions"`):
|
|
77
|
+
- Write the profile `<name>` as plain text content to `.claude/profiles/.active`.
|
|
110
78
|
|
|
111
79
|
8. Confirm:
|
|
112
80
|
|
|
@@ -118,7 +86,7 @@ IMPORTANT: Restart this Claude Code session for plugin changes to take effect.
|
|
|
118
86
|
|
|
119
87
|
## Workflow: `/profile reset`
|
|
120
88
|
|
|
121
|
-
1. Remove `.claude/profiles/.active` marker via /
|
|
89
|
+
1. Remove `.claude/profiles/.active` marker via direct `Bash: /bin/rm .claude/profiles/.active` (`mode: "bypassPermissions"`)
|
|
122
90
|
2. Print: `[Done] Profile marker removed. Full plugin set will be active after restart.`
|
|
123
91
|
3. Note: does NOT revert `~/.claude/settings.json` — user should re-run `/profile load <other>` or manually restore
|
|
124
92
|
|
|
@@ -127,7 +95,7 @@ IMPORTANT: Restart this Claude Code session for plugin changes to take effect.
|
|
|
127
95
|
- Profile changes to `~/.claude/settings.json` take effect only after session restart
|
|
128
96
|
- Profiles define a subset: plugins not listed in `enabled` or `disabled` keep their current state
|
|
129
97
|
- Profile JSON `enabled`/`disabled` lists use full plugin keys: `<name>@<marketplace>` format
|
|
130
|
-
- All `.claude/` writes use
|
|
98
|
+
- All `.claude/` writes use direct Write/Edit/Bash (CC v2.1.121+, no `/tmp` wrapping — see Implementation rules above)
|
|
131
99
|
|
|
132
100
|
## Manifest Profile Integration
|
|
133
101
|
|
|
@@ -46,13 +46,13 @@ Stage state is tracked via a marker file for hook enforcement:
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
# Set stage (used by orchestrator or skill)
|
|
49
|
-
echo "plan" > /tmp/.claude-dev-stage
|
|
49
|
+
echo "plan" > /tmp/.claude-dev-stage-$PPID
|
|
50
50
|
|
|
51
51
|
# Valid stage values (all block Write/Edit except 'implement'):
|
|
52
52
|
# plan, verify-plan, implement, verify-impl, compound, done
|
|
53
53
|
|
|
54
54
|
# Clear stage (disable blocking)
|
|
55
|
-
rm -f /tmp/.claude-dev-stage
|
|
55
|
+
rm -f /tmp/.claude-dev-stage-$PPID
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
A PreToolUse hook in `.claude/hooks/hooks.json` checks this marker and blocks Write/Edit tools during non-implementation stages.
|
|
@@ -140,7 +140,7 @@ Stage 1 (Plan) maps to Claude Code's `EnterPlanMode`. When the structured cycle
|
|
|
140
140
|
Stage 2 (Verify Plan) and Stage 4 (Verify Implementation) can invoke the `multi-model-verification` skill for comprehensive review.
|
|
141
141
|
|
|
142
142
|
### With PreToolUse Hooks
|
|
143
|
-
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.
|
|
143
|
+
The stage marker file (`/tmp/.claude-dev-stage-$PPID`) is read by a PreToolUse hook that enforces tool restrictions. This provides a safety net beyond instruction-based compliance.
|
|
144
144
|
|
|
145
145
|
### With Agent Teams
|
|
146
146
|
For complex tasks, Agent Teams is **preferred** when available (R018):
|
|
@@ -165,19 +165,19 @@ When Agent Teams is enabled AND task involves 3+ agents or review→fix cycles,
|
|
|
165
165
|
|
|
166
166
|
```bash
|
|
167
167
|
# Orchestrator manages transitions:
|
|
168
|
-
echo "plan" > /tmp/.claude-dev-stage # Enter planning
|
|
169
|
-
echo "verify-plan" > /tmp/.claude-dev-stage
|
|
170
|
-
echo "implement" > /tmp/.claude-dev-stage
|
|
171
|
-
echo "verify-impl" > /tmp/.claude-dev-stage
|
|
172
|
-
echo "compound" > /tmp/.claude-dev-stage
|
|
173
|
-
echo "done" > /tmp/.claude-dev-stage
|
|
174
|
-
rm -f /tmp/.claude-dev-stage
|
|
168
|
+
echo "plan" > /tmp/.claude-dev-stage-$PPID # Enter planning
|
|
169
|
+
echo "verify-plan" > /tmp/.claude-dev-stage-$PPID # Enter plan verification
|
|
170
|
+
echo "implement" > /tmp/.claude-dev-stage-$PPID # Enter implementation
|
|
171
|
+
echo "verify-impl" > /tmp/.claude-dev-stage-$PPID # Enter impl verification
|
|
172
|
+
echo "compound" > /tmp/.claude-dev-stage-$PPID # Enter compound testing
|
|
173
|
+
echo "done" > /tmp/.claude-dev-stage-$PPID # Mark done
|
|
174
|
+
rm -f /tmp/.claude-dev-stage-$PPID # Clear (disable blocking)
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
## Limitations
|
|
178
178
|
|
|
179
|
-
- **
|
|
180
|
-
- **World-writable path**: The `/tmp/` directory is accessible to all users.
|
|
179
|
+
- **Session scoping**: The marker path is scoped by parent PID (`/tmp/.claude-dev-stage-$PPID`), so concurrent Claude Code sessions use distinct markers and do not conflict. The reader hooks (`stage-blocker.sh`, `task-state-precompact.sh`) and the writer commands above all resolve `$PPID` to the same Claude Code process, keeping the gate consistent.
|
|
180
|
+
- **World-writable path**: The `/tmp/` directory is accessible to all users. The `-$PPID` suffix isolates per-session state but does not restrict filesystem permissions; avoid storing sensitive data in the marker file.
|
|
181
181
|
|
|
182
182
|
## Permission Mode
|
|
183
183
|
|
package/templates/manifest.json
CHANGED