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
<divclass="ow-terminal__line ow-terminal__line--hint">You're ready. Just use <spanclass="ow-terminal__hl">'claude'</span> as normal — OpenWolf is watching.</div>
161
+
<divclass="ow-terminal__line ow-terminal__line--hint">You're ready. Just use <spanclass="ow-terminal__hl">'claude'</span> as normal. OpenWolf is watching.</div>
162
162
</div>
163
163
</div>
164
164
</div>
@@ -231,7 +231,7 @@ const archFiles = [
231
231
<divclass="ow-step__num">02</div>
232
232
<divclass="ow-step__content">
233
233
<h3class="ow-step__title">Work Normally</h3>
234
-
<pclass="ow-step__desc">Just use <code>claude</code> as you always do. Hooks fire invisibly — tracking, learning, enforcing. You don't interact with any of it.</p>
234
+
<pclass="ow-step__desc">Just use <code>claude</code> as you always do. Hooks fire invisibly, tracking, learning, enforcing. You don't interact with any of it.</p>
Copy file name to clipboardExpand all lines: docs/hooks.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Hooks
2
2
3
-
OpenWolf registers 6 hooks with Claude Code. They fire automatically on every action — no user interaction required.
3
+
OpenWolf registers 6 hooks with Claude Code. They fire automatically on every action. No user interaction required.
4
4
5
5
All hooks are **pure Node.js file I/O**. No network calls, no AI, no external dependencies. They read JSON on stdin from Claude Code and communicate via exit codes and stderr.
6
6
@@ -59,8 +59,8 @@ All hooks are **pure Node.js file I/O**. No network calls, no AI, no external de
59
59
60
60
**What it does:**
61
61
1. Checks if this file was already read this session
62
-
2. If repeated: writes a warning to stderr —_"⚡ OpenWolf: file.ts was already read this session (~380 tokens)"_
63
-
3. Looks up the file in `anatomy.md` and prints the description — _"📋 OpenWolf anatomy: file.ts — Main entry point (~380 tok)"_
62
+
2. If repeated: writes a warning to stderr._"⚡ OpenWolf: file.ts was already read this session (~380 tokens)"_
63
+
3. Looks up the file in `anatomy.md` and prints the description. _"📋 OpenWolf anatomy: file.ts, Main entry point (~380 tok)"_
64
64
4. Records anatomy hit or miss in the session tracker
65
65
66
66
**Behavior:** Always exits 0 (allows the read). Warnings only, never blocks.
@@ -78,7 +78,7 @@ All hooks are **pure Node.js file I/O**. No network calls, no AI, no external de
78
78
**What it does:**
79
79
1. Reads `cerebrum.md` and extracts entries from the `## Do-Not-Repeat` section
80
80
2. For each entry, checks if the content being written contains flagged patterns
81
-
3. If matched: writes a warning to stderr — _"⚠️ OpenWolf cerebrum warning: 'never use var' — check your code"_
81
+
3. If matched: writes a warning to stderr. _"⚠️ OpenWolf cerebrum warning: 'never use var', check your code"_
82
82
83
83
**Pattern matching:** Simple regex on quoted strings and "never use X" / "avoid X" phrases. No LLM involved.
84
84
@@ -109,9 +109,9 @@ All hooks are **pure Node.js file I/O**. No network calls, no AI, no external de
1.**Updates `anatomy.md`** — reads the written file, extracts a description, estimates tokens, upserts the entry in the correct directory section. Writes atomically (temp + rename).
113
-
2.**Appends to `memory.md`** — logs the action with timestamp, file path, and token estimate.
114
-
3.**Records in `_session.json`** — file, action type, tokens, timestamp.
112
+
1.**Updates `anatomy.md`**: reads the written file, extracts a description, estimates tokens, upserts the entry in the correct directory section. Writes atomically (temp + rename).
113
+
2.**Appends to `memory.md`**: logs the action with timestamp, file path, and token estimate.
114
+
3.**Records in `_session.json`**: file, action type, tokens, timestamp.
115
115
116
116
**Timeout:** 10 seconds (longer because anatomy update involves file parsing)
0 commit comments