oh-my-customcode 0.78.2 → 0.79.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/dist/cli/index.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/templates/.claude/hooks/hooks.json +10 -0
- package/templates/.claude/hooks/scripts/rule-deletion-guard.sh +60 -0
- package/templates/.claude/rules/MUST-agent-design.md +21 -0
- package/templates/.claude/rules/MUST-enforcement-policy.md +7 -1
- package/templates/manifest.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -9325,7 +9325,7 @@ var init_package = __esm(() => {
|
|
|
9325
9325
|
workspaces: [
|
|
9326
9326
|
"packages/*"
|
|
9327
9327
|
],
|
|
9328
|
-
version: "0.
|
|
9328
|
+
version: "0.79.0",
|
|
9329
9329
|
description: "Batteries-included agent harness for Claude Code",
|
|
9330
9330
|
type: "module",
|
|
9331
9331
|
bin: {
|
|
@@ -9373,11 +9373,11 @@ var init_package = __esm(() => {
|
|
|
9373
9373
|
yaml: "^2.8.2"
|
|
9374
9374
|
},
|
|
9375
9375
|
devDependencies: {
|
|
9376
|
-
"@anthropic-ai/sdk": "^0.
|
|
9376
|
+
"@anthropic-ai/sdk": "^0.82.0",
|
|
9377
9377
|
"@biomejs/biome": "^2.3.12",
|
|
9378
9378
|
"@types/bun": "^1.3.6",
|
|
9379
9379
|
"@types/js-yaml": "^4.0.9",
|
|
9380
|
-
"@types/nodemailer": "^
|
|
9380
|
+
"@types/nodemailer": "^8.0.0",
|
|
9381
9381
|
"js-yaml": "^4.1.0",
|
|
9382
9382
|
nodemailer: "^8.0.1",
|
|
9383
9383
|
typescript: "^6.0.2",
|
package/dist/index.js
CHANGED
|
@@ -1820,7 +1820,7 @@ var package_default = {
|
|
|
1820
1820
|
workspaces: [
|
|
1821
1821
|
"packages/*"
|
|
1822
1822
|
],
|
|
1823
|
-
version: "0.
|
|
1823
|
+
version: "0.79.0",
|
|
1824
1824
|
description: "Batteries-included agent harness for Claude Code",
|
|
1825
1825
|
type: "module",
|
|
1826
1826
|
bin: {
|
|
@@ -1868,11 +1868,11 @@ var package_default = {
|
|
|
1868
1868
|
yaml: "^2.8.2"
|
|
1869
1869
|
},
|
|
1870
1870
|
devDependencies: {
|
|
1871
|
-
"@anthropic-ai/sdk": "^0.
|
|
1871
|
+
"@anthropic-ai/sdk": "^0.82.0",
|
|
1872
1872
|
"@biomejs/biome": "^2.3.12",
|
|
1873
1873
|
"@types/bun": "^1.3.6",
|
|
1874
1874
|
"@types/js-yaml": "^4.0.9",
|
|
1875
|
-
"@types/nodemailer": "^
|
|
1875
|
+
"@types/nodemailer": "^8.0.0",
|
|
1876
1876
|
"js-yaml": "^4.1.0",
|
|
1877
1877
|
nodemailer: "^8.0.1",
|
|
1878
1878
|
typescript: "^6.0.2",
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"workspaces": [
|
|
4
4
|
"packages/*"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.79.0",
|
|
7
7
|
"description": "Batteries-included agent harness for Claude Code",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"bin": {
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"yaml": "^2.8.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@anthropic-ai/sdk": "^0.
|
|
54
|
+
"@anthropic-ai/sdk": "^0.82.0",
|
|
55
55
|
"@biomejs/biome": "^2.3.12",
|
|
56
56
|
"@types/bun": "^1.3.6",
|
|
57
57
|
"@types/js-yaml": "^4.0.9",
|
|
58
|
-
"@types/nodemailer": "^
|
|
58
|
+
"@types/nodemailer": "^8.0.0",
|
|
59
59
|
"js-yaml": "^4.1.0",
|
|
60
60
|
"nodemailer": "^8.0.1",
|
|
61
61
|
"typescript": "^6.0.2",
|
|
@@ -92,6 +92,16 @@
|
|
|
92
92
|
],
|
|
93
93
|
"description": "RTK auto-intercept — transparently rewrites CLI commands through RTK proxy when available (R015 advisory)"
|
|
94
94
|
},
|
|
95
|
+
{
|
|
96
|
+
"matcher": "tool == \"Bash\" && tool_input.command matches \"(rm|git rm|mv|unlink|claude/rules)\"",
|
|
97
|
+
"hooks": [
|
|
98
|
+
{
|
|
99
|
+
"type": "command",
|
|
100
|
+
"command": "bash .claude/hooks/scripts/rule-deletion-guard.sh"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"description": "Block rule file deletion — requires individual user confirmation per rule (R001 safety)"
|
|
104
|
+
},
|
|
95
105
|
{
|
|
96
106
|
"matcher": "tool == \"Task\" || tool == \"Agent\"",
|
|
97
107
|
"hooks": [
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# rule-deletion-guard.sh — Block rule file deletion without individual user confirmation
|
|
3
|
+
# Requires: jq
|
|
4
|
+
|
|
5
|
+
set -uo pipefail
|
|
6
|
+
|
|
7
|
+
input=$(cat)
|
|
8
|
+
|
|
9
|
+
# Dependency check — allow if jq missing
|
|
10
|
+
if ! command -v jq &>/dev/null; then
|
|
11
|
+
echo "$input"
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
# Parse tool input
|
|
16
|
+
tool=$(echo "$input" | jq -r '.tool // ""' 2>/dev/null) || { echo "$input"; exit 0; }
|
|
17
|
+
cmd=$(echo "$input" | jq -r '.tool_input.command // ""' 2>/dev/null) || { echo "$input"; exit 0; }
|
|
18
|
+
|
|
19
|
+
# Only check Bash tool
|
|
20
|
+
if [ "$tool" != "Bash" ]; then
|
|
21
|
+
echo "$input"
|
|
22
|
+
exit 0
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Check if command would delete parent directories containing rules
|
|
26
|
+
if echo "$cmd" | grep -qE '(^|\s)(rm|git\s+rm|mv|unlink)\s' && echo "$cmd" | grep -qE '\.claude/?(\s|$)'; then
|
|
27
|
+
echo "[Hook] ⛔ RULE DELETION BLOCKED — Parent directory deletion detected" >&2
|
|
28
|
+
echo "[Hook] This command would delete the entire .claude/ directory including all rules." >&2
|
|
29
|
+
echo "[Hook] Delete rules individually with user confirmation." >&2
|
|
30
|
+
exit 2
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Check if command targets .claude/rules/ for deletion (including mv, unlink)
|
|
34
|
+
if echo "$cmd" | grep -qE '(^|\s)(rm|git\s+rm|mv|unlink)\s' && echo "$cmd" | grep -qE '\.claude/rules(/|\s|$)'; then
|
|
35
|
+
# Extract target files
|
|
36
|
+
targets=$(echo "$cmd" | grep -oE '\.claude/rules/[^ ]+' | tr '\n' ', ' | sed 's/,$//')
|
|
37
|
+
target_count=$(echo "$cmd" | grep -oE '\.claude/rules/[^ ]+' | wc -l | tr -d ' ')
|
|
38
|
+
|
|
39
|
+
# Check for glob/wildcard patterns or multiple targets
|
|
40
|
+
if echo "$cmd" | grep -qE '\.claude/rules/\*|\.claude/rules/[^ ]*\*' || [ "$target_count" -gt 1 ]; then
|
|
41
|
+
echo "[Hook] ⛔ RULE DELETION BLOCKED — Multiple rules detected" >&2
|
|
42
|
+
echo "[Hook] Targets: $targets" >&2
|
|
43
|
+
echo "[Hook] Rule files must be deleted ONE AT A TIME with user confirmation." >&2
|
|
44
|
+
echo "[Hook] Delete each rule individually after asking: \"정말 {파일명}을(를) 삭제하시겠습니까?\"" >&2
|
|
45
|
+
exit 2
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# Single rule file
|
|
49
|
+
filename=$(basename "$targets" 2>/dev/null || echo "$targets")
|
|
50
|
+
echo "[Hook] ⛔ RULE DELETION BLOCKED" >&2
|
|
51
|
+
echo "[Hook] Target: $filename" >&2
|
|
52
|
+
echo "[Hook] Rule files require individual user confirmation before deletion." >&2
|
|
53
|
+
echo "[Hook] Ask the user: \"정말 ${filename}을(를) 삭제하시겠습니까?\"" >&2
|
|
54
|
+
echo "[Hook] Only proceed after explicit user approval." >&2
|
|
55
|
+
exit 2
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Not a rule deletion — pass through
|
|
59
|
+
echo "$input"
|
|
60
|
+
exit 0
|
|
@@ -59,8 +59,11 @@ limitations: # Negative capability declarations
|
|
|
59
59
|
- "cannot execute tests"
|
|
60
60
|
- "cannot modify code"
|
|
61
61
|
domain: backend # backend | frontend | data-engineering | devops | universal
|
|
62
|
+
disableSkillShellExecution: true # Disable inline shell execution in skills (v2.1.91+)
|
|
62
63
|
```
|
|
63
64
|
|
|
65
|
+
> **Note**: When `disableSkillShellExecution` is enabled (v2.1.91+), skills that rely on inline shell execution (e.g., `codex-exec`, `gemini-exec`, `rtk-exec`) will have their shell blocks disabled. This is a security hardening option.
|
|
66
|
+
|
|
64
67
|
> **Note**: `isolation`, `background`, `maxTurns`, `maxTokens`, `mcpServers`, `hooks`, `permissionMode`, `disallowedTools`, `limitations` are supported in Claude Code v2.1.63+. Hook types `PostCompact`, `Elicitation`, `ElicitationResult` require v2.1.76+. `CwdChanged`, `FileChanged` hook events and `managed-settings.d/` drop-in directory require v2.1.83+. Conditional `if` field for hooks requires v2.1.85+.
|
|
65
68
|
|
|
66
69
|
## Hook Event Types
|
|
@@ -99,6 +102,17 @@ All supported hook event types in Claude Code. Agents and skills can reference t
|
|
|
99
102
|
| `http` | POST to HTTP endpoint | External integrations, webhooks |
|
|
100
103
|
| `agent` | Spawn agent to handle event | Complex event-driven workflows |
|
|
101
104
|
|
|
105
|
+
### PreToolUse Hook Return Values
|
|
106
|
+
|
|
107
|
+
| Return | Behavior | CC Version |
|
|
108
|
+
|--------|----------|------------|
|
|
109
|
+
| `exit 0` | Allow tool execution | All |
|
|
110
|
+
| `exit 1` | Block silently | All |
|
|
111
|
+
| `exit 2` + stderr | Block with message | All |
|
|
112
|
+
| `{"decision": "defer"}` | Pause execution; resume with `-p --resume` | v2.1.89+ |
|
|
113
|
+
|
|
114
|
+
The `defer` decision allows headless sessions to pause at a tool call for human review.
|
|
115
|
+
|
|
102
116
|
### Hook Matcher Syntax
|
|
103
117
|
|
|
104
118
|
```yaml
|
|
@@ -225,6 +239,12 @@ Fast Mode uses the same model with faster output. Activated via `/fast` toggle o
|
|
|
225
239
|
|
|
226
240
|
When Fast Mode is active, it reduces effective reasoning depth but does NOT override the `effort` frontmatter field. The effort field controls task complexity allocation; Fast Mode controls output generation speed.
|
|
227
241
|
|
|
242
|
+
### Default Effort Change (CC v2.1.94+)
|
|
243
|
+
|
|
244
|
+
Starting with Claude Code v2.1.94, the default effort level changed from `medium` to `high` for API-key, Bedrock/Vertex/Foundry, Team, and Enterprise users. Console (free-tier) users retain `medium` as the default.
|
|
245
|
+
|
|
246
|
+
This means agents WITHOUT an explicit `effort` field now run at `high` effort by default on paid tiers. To maintain previous behavior, set `effort: medium` explicitly in agent frontmatter.
|
|
247
|
+
|
|
228
248
|
## Skill Frontmatter
|
|
229
249
|
|
|
230
250
|
Location: `.claude/skills/{name}/SKILL.md`
|
|
@@ -255,6 +275,7 @@ hooks: # Skill-specific hooks (same syntax as agent
|
|
|
255
275
|
paths: ["src/**/*.ts"] # Conditional loading — skill auto-injected when matching files are open
|
|
256
276
|
shell: "bash" # Shell for embedded script execution
|
|
257
277
|
allowed-tools: [Read, Write, Bash] # Restrict tools available during skill execution
|
|
278
|
+
keep-coding-instructions: true # Preserve coding instructions in plugin output styles (v2.1.94+)
|
|
258
279
|
```
|
|
259
280
|
|
|
260
281
|
When both an agent and its invoked skill specify `effort`, the skill's value takes precedence (more specific invocation-time setting).
|
|
@@ -10,7 +10,7 @@ oh-my-customcode uses an **advisory-first enforcement model**. Most rules are en
|
|
|
10
10
|
|
|
11
11
|
| Tier | Mechanism | Rules | Behavior |
|
|
12
12
|
|------|-----------|-------|----------|
|
|
13
|
-
| Hard Block | PreToolUse hook, exit
|
|
13
|
+
| Hard Block | PreToolUse hook, exit 2 | stage-blocker, dev-server tmux, rule-deletion-guard | Prevents tool execution |
|
|
14
14
|
| Soft Block | Stop hook prompt | R011 session-end saves | Auto-performs then approves |
|
|
15
15
|
| Advisory | PostToolUse hooks | R007, R008, R009, R010, R018 | Warns via stderr, never blocks |
|
|
16
16
|
| Prompt-based | CLAUDE.md + rules/ + PostCompact | All MUST rules | Behavioral guidance in context |
|
|
@@ -33,6 +33,12 @@ If advisory enforcement proves insufficient for specific rules, these are candid
|
|
|
33
33
|
|
|
34
34
|
Promotion requires: (1) measured violation rate data, (2) user approval, (3) rollback plan.
|
|
35
35
|
|
|
36
|
+
### Promoted to Hard Block
|
|
37
|
+
|
|
38
|
+
| Hook | Date | Justification |
|
|
39
|
+
|------|------|---------------|
|
|
40
|
+
| `rule-deletion-guard.sh` | 2026-04-08 | User-requested: rule files must require individual confirmation before deletion. Prevents accidental bulk deletion of project rules. |
|
|
41
|
+
|
|
36
42
|
## Integration
|
|
37
43
|
|
|
38
44
|
| Rule | Interaction |
|
package/templates/manifest.json
CHANGED