You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "occam",
3
3
"displayName": "Occam",
4
-
"version": "0.3.0",
4
+
"version": "0.4.0",
5
5
"description": "Write the right amount of code. An always-on right-sizing ruleset for AI coding agents, fewer tokens, compact code, no under-engineering.",
// On Claude Code the plugin's PostToolUse hook compacts output automatically.
27
-
// Other agents can't rewrite tool output from a hook, so the rule tells the
28
-
// agent to run noisy commands through `occam run` instead (works on any agent).
29
33
constbody=isClaude
30
34
? target.body
31
35
: target.body+
@@ -36,9 +40,36 @@ export function init(agent) {
36
40
writeFileSync(dest,body);
37
41
38
42
process.stdout.write(`occam: right-sizing rule on for ${a} → wrote ${target.path}\n`);
39
-
process.stdout.write(
40
-
isClaude
41
-
? `input compaction is automatic via the plugin: /plugin marketplace add borghei/occam\n`
42
-
: `input side included: the rule now runs noisy commands through \`occam run\`. keep occam on PATH (npm i -g github:borghei/occam).\n`,
43
-
);
43
+
if(isClaude){
44
+
process.stdout.write(`input compaction is automatic via the plugin: /plugin marketplace add borghei/occam\n`);
45
+
}elseif(isCodex){
46
+
wireCodexHook();
47
+
}else{
48
+
process.stdout.write(`input side included: the rule runs noisy commands through \`occam run\`. keep occam on PATH (npm i -g github:borghei/occam).\n`);
49
+
}
50
+
}
51
+
52
+
// Wire (or merge into) .codex/hooks.json a PreToolUse hook that rewrites noisy
53
+
// commands to `occam run`. Never clobbers an unparseable file.
0 commit comments