claude-compass 0.1.0 → 0.1.2
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/README.md +24 -5
- package/package.json +2 -2
- package/src/init.js +0 -7
package/README.md
CHANGED
|
@@ -16,13 +16,32 @@ One-line note appended to .claude/pending-updates.md
|
|
|
16
16
|
↓
|
|
17
17
|
Session ends → SessionEnd hook prints a summary if 3+ changes logged
|
|
18
18
|
↓
|
|
19
|
-
You
|
|
19
|
+
You type "update CLAUDE.md" in chat (or run claude-compass update)
|
|
20
20
|
↓
|
|
21
21
|
claude-md-updater agent reads pending-updates.md + CLAUDE.md
|
|
22
22
|
Makes surgical updates, clears the log
|
|
23
23
|
Prints: "CLAUDE.md updated — 2 entries added, 1 updated, 9 skipped"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
## Why the update step is intentional
|
|
27
|
+
|
|
28
|
+
The two parts of claude-compass are split deliberately:
|
|
29
|
+
|
|
30
|
+
- **Logging is fully automatic.** Every file write is captured by the hook with zero effort and zero cost. You never think about it.
|
|
31
|
+
- **Updating is manual.** You decide when to sync — typically at a natural stopping point, once a day, or when finishing a feature.
|
|
32
|
+
|
|
33
|
+
This split matters because most file edits don't change anything worth documenting. Running the agent after every session would spend tokens deciding "nothing changed" the majority of the time. Triggering it yourself costs about the same tokens but only when it actually has something useful to do.
|
|
34
|
+
|
|
35
|
+
## Token usage
|
|
36
|
+
|
|
37
|
+
| Part | Tokens | Frequency |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| PostToolUse hook | **0** | Every file write |
|
|
40
|
+
| SessionEnd hook | **0** | Every session end |
|
|
41
|
+
| `claude-md-updater` agent | ~2,000–4,000 | Only when you trigger it |
|
|
42
|
+
|
|
43
|
+
At current API rates, one full sync costs less than **$0.01**. Running it once a day for a year is roughly $2–3 total.
|
|
44
|
+
|
|
26
45
|
## Requirements
|
|
27
46
|
|
|
28
47
|
- [Claude Code](https://claude.ai/code) CLI
|
|
@@ -47,7 +66,7 @@ This will:
|
|
|
47
66
|
- Copy hooks into `.claude/hooks/`
|
|
48
67
|
- Register hooks in `~/.claude/settings.json`
|
|
49
68
|
- Install the `claude-md-updater` agent into `.claude/agents/`
|
|
50
|
-
- Create a `CLAUDE.md` stub if one doesn't exist (
|
|
69
|
+
- Create a `CLAUDE.md` stub if one doesn't exist (leaves any existing one untouched)
|
|
51
70
|
|
|
52
71
|
## Commands
|
|
53
72
|
|
|
@@ -104,12 +123,12 @@ Everything else gets a one-line entry in `pending-updates.md`.
|
|
|
104
123
|
|
|
105
124
|
## Updating CLAUDE.md
|
|
106
125
|
|
|
107
|
-
When you
|
|
126
|
+
When the session-end hook reminds you there are pending changes, either:
|
|
108
127
|
|
|
109
128
|
1. Type `update CLAUDE.md` in the Claude Code chat, or
|
|
110
|
-
2. Run `claude-compass update` in the terminal — it will
|
|
129
|
+
2. Run `claude-compass update` in the terminal — it will show you exactly what to type
|
|
111
130
|
|
|
112
|
-
The `claude-md-updater` agent reads the pending log, decides what's significant enough to document, makes surgical edits to `CLAUDE.md`, and clears the log.
|
|
131
|
+
The `claude-md-updater` agent reads the pending log, decides what's significant enough to document, makes surgical edits to `CLAUDE.md`, and clears the log.
|
|
113
132
|
|
|
114
133
|
## License
|
|
115
134
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-compass",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Automatic CLAUDE.md lifecycle management for Claude Code",
|
|
5
5
|
"bin": {
|
|
6
|
-
"claude-compass": "
|
|
6
|
+
"claude-compass": "bin/claude-compass.js"
|
|
7
7
|
},
|
|
8
8
|
"keywords": [
|
|
9
9
|
"claude",
|
package/src/init.js
CHANGED
|
@@ -24,13 +24,6 @@ async function run() {
|
|
|
24
24
|
console.warn(' claude-compass works best inside a git repo, but continuing anyway.\n');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
// Backup existing CLAUDE.md
|
|
28
|
-
if (fs.existsSync(claudeMdPath)) {
|
|
29
|
-
const backupPath = claudeMdPath + '.backup';
|
|
30
|
-
fs.copyFileSync(claudeMdPath, backupPath);
|
|
31
|
-
console.log(` Backed up existing CLAUDE.md → CLAUDE.md.backup`);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
27
|
// Create .claude directories
|
|
35
28
|
fs.mkdirSync(contextDir, { recursive: true });
|
|
36
29
|
fs.mkdirSync(agentsDir, { recursive: true });
|