claude-token-saver 3.30.1 โ 3.34.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/README.en.md +75 -4
- package/README.md +75 -4
- package/bin/cli.js +45 -4
- package/package.json +1 -1
- package/presets/model-rules.json +115 -0
- package/presets/ratchet-rules.json +38 -0
- package/src/advice.js +8 -5
- package/src/brief.js +1 -1
- package/src/commands/install.js +107 -2
- package/src/commands/route-scan.js +25 -2
- package/src/commands/seed.js +105 -0
- package/src/config.js +25 -0
- package/src/cost.js +6 -1
- package/src/demo.js +8 -7
- package/src/formatters/statusline.js +8 -2
- package/src/formatters/table.js +7 -5
- package/src/harness-analyzer.cjs +9 -4
- package/src/harness.js +21 -8
- package/src/history.js +6 -3
- package/src/hook-manager.js +31 -24
- package/src/hook.cjs +23 -11
- package/src/installer.js +54 -8
- package/src/korean-style.js +11 -3
- package/src/model-rules.js +55 -7
- package/src/parser.js +88 -6
- package/src/route-scan.js +6 -7
- package/src/seed-rules.js +280 -0
- package/src/session-cache.js +5 -1
- package/src/session-records.js +14 -2
- package/src/stats.js +17 -4
- package/src/stdin-payload.js +20 -4
- package/presets/ratchet-rules.md +0 -16
package/README.en.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/claude-token-saver)
|
|
4
4
|
|
|
5
|
+
๐ **[Project page](https://rootstudioyaml.github.io/claude-token-saver/)**
|
|
6
|
+
|
|
5
7
|
# claude-token-saver
|
|
6
8
|
|
|
7
9
|
**Shows what it saved, on two lines.** It moves the easy work your expensive model keeps repeating onto cheaper ones, and turns documents the model cannot read into Markdown. Both figures are ledger entries rather than estimates, and whichever saved more takes the top line. Zero dependencies, one-line install.
|
|
@@ -112,13 +114,36 @@ Outside a terminal โ npm `postinstall`, CI, piped stdin โ the question is sk
|
|
|
112
114
|
|
|
113
115
|
> โ ๏ธ Avoid `sudo` global installs โ the Skill lands in root's `~/.claude` instead of yours. Use nvm/fnm/Volta or `npm config set prefix ~/.npm-global`.
|
|
114
116
|
|
|
117
|
+
### What the install turns on, and what stays manual
|
|
118
|
+
|
|
119
|
+
Everything that costs nothing until it is needed is on after a plain install. The only manual items are the ones that change Claude Code's own settings or need a human to pick a scope.
|
|
120
|
+
|
|
121
|
+
| Feature | After install | How to turn it off |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| statusline (diagnostic chips, savings ledger) | on | `claude-token-saver uninstall` |
|
|
124
|
+
| `/claude-token-saver` Skill | on | same |
|
|
125
|
+
| SessionStart hook (route-scan refresh) | on | same |
|
|
126
|
+
| UserPromptSubmit hook (brief injection) | on | same |
|
|
127
|
+
| First route-scan (last 14 days of logs) | runs once during the install | n/a |
|
|
128
|
+
| ๐
ท Harness 5 principles (`~/.claude/CLAUDE.md`) | on (shown and confirmed once at a terminal) | `harness uninit --global`, `CTS_NO_HARNESS=1` |
|
|
129
|
+
| doc2md hooks (Read, Edit/Write, prompt) | on | `doc2md off`, `CTS_NO_DOC2MD=1` |
|
|
130
|
+
| doc2md converter (markitdown venv) | offered at a terminal; an unattended install prints the command | install later with `doc2md install-converter` |
|
|
131
|
+
| Korean writing guidance | on when the locale is Korean (asked at a terminal) | `korean off`, `CTS_NO_KOREAN=1` |
|
|
132
|
+
| compact-window warning chip | on | `compact-window off` |
|
|
133
|
+
| Update-available chip | on | `CTS_NO_UPDATE_CHECK=1` |
|
|
134
|
+
| **Pinning compact-window** (`autoCompactWindow` 500k) | **off โ run it yourself** | `compact-window set --global` or `--project` |
|
|
135
|
+
| **Model-fitting rules** (`ratchet-model.md` delegations) | **candidates are proposed only** | review and approve with `route-scan rules` |
|
|
136
|
+
| `handoff` (back up work before a cap) | an on-demand command | n/a |
|
|
137
|
+
|
|
138
|
+
`compact-window set` writes into Claude Code's `settings.json` and a human has to choose global or project scope, so it is never run for you. Model-fitting rules keep an approval step for the same reason: which work belongs on a cheaper tier is your call.
|
|
139
|
+
|
|
115
140
|
## Reading the statusline
|
|
116
141
|
|
|
117
142
|
Once the savings ledger has entries it renders as **two rows** โ routing savings on row 1, diagnostics on row 2.
|
|
118
143
|
|
|
119
144
|
```
|
|
120
145
|
๐ Routing saved $2.09 | fableโsonnet 1ร $0.72 ยท opusโhaiku 1ร $0.57
|
|
121
|
-
โ Ctx
|
|
146
|
+
โ Ctx 500k+ ยท ๐
ท 5/5 ยท ๐ค Opus 5 ยท ๐ง Cache hit 98.8% ยท โณ Cache expires 59:46 ยท โฆ current โโโโโโ 62% ๐ 21:33 ยท ๐
weekly โโโโโโ 38% ๐ Tue 19:33 ยท ๐ฆ Ctx 47% of 1M ยท ๐ฐ Cache saved $1.0K ยท last 1d
|
|
122
147
|
```
|
|
123
148
|
|
|
124
149
|
With an empty ledger (no measured delegation yet) row 1 is not drawn and the layout stays single-line. If your build renders only the first row (some macOS Claude Code versions), pass `--single-line`.
|
|
@@ -142,7 +167,7 @@ When something is wrong, a **warning chip leads the line**:
|
|
|
142
167
|
๐จ 5H โโโโโโ 94% ๐ 12:36 ยท ๐
ท 5/5 ยท ๐ค Opus 4.8 ยท ๐ง Cache hit 72.1% ยท โ Cache miss ยท ๐
weekly โโโโโโ 12% ๐ Sun 14:26 ยท ๐ฆ Ctx 200k ยท last 1d
|
|
143
168
|
```
|
|
144
169
|
|
|
145
|
-
Chips โ `๐จ 5H/7D NN%` (cap imminent) ยท `โ Ctx
|
|
170
|
+
Chips โ `๐จ 5H/7D NN%` (cap imminent) ยท `โ Ctx 500k+` (a single request actually exceeded 500k) ยท `โ Cache miss` ยท `โ Input spike` ยท `โ Output heavy` ยท `โ Call surge` ยท `โ Rebuild churn` ยท `โ 5m TTL`. When both windows cross 90% at once, the sooner-resetting one is promoted to ๐จ and the other stays visible as a red segment (v2.16.0+).
|
|
146
171
|
|
|
147
172
|
### When a chip appears
|
|
148
173
|
|
|
@@ -175,7 +200,7 @@ Run these in your shell (inside Claude Code, the `/claude-token-saver` Skill is
|
|
|
175
200
|
| `claude-token-saver install` | Manually register Skill + statusline |
|
|
176
201
|
| `claude-token-saver uninstall [--purge]` | Remove the hooks, statusline and skill it registered. Recorded savings are kept unless `--purge` is given |
|
|
177
202
|
|
|
178
|
-
|
|
203
|
+
The output language is decided once, at install time: a terminal install proposes the system locale and asks whether to use Korean, while an unattended install records what the locale says. Once recorded it is never asked again, not even on an upgrade. Change it later with `mode ko` / `mode en`, or pin it for a scripted install with `CTS_LANG=ko` / `CTS_LANG=en`. Statusline chips stay symbolic either way.
|
|
179
204
|
|
|
180
205
|
<details>
|
|
181
206
|
<summary>All CLI options</summary>
|
|
@@ -214,6 +239,7 @@ Bootstrap five engineering principles (Ratchet ยท Evidence ยท PEV ยท Structured
|
|
|
214
239
|
claude-token-saver harness init # this project
|
|
215
240
|
claude-token-saver harness init --global # ~/.claude/CLAUDE.md โ every project
|
|
216
241
|
claude-token-saver harness check # current score (global fallback honored)
|
|
242
|
+
claude-token-saver harness analyze # run the transcript analysis manually (no hook needed); refreshes harness-state.json
|
|
217
243
|
claude-token-saver harness promote <N> --project|--global # warning #N โ ratchet rule (scope required)
|
|
218
244
|
claude-token-saver harness promote "<rule text>" --project|--global # register your own hand-written rules the same way
|
|
219
245
|
claude-token-saver harness pull # register the package's curated ratchet rules into your global ratchet (opt-in, dedupes)
|
|
@@ -222,7 +248,8 @@ claude-token-saver harness off | on # toggle the ๐
ท chip
|
|
|
222
248
|
```
|
|
223
249
|
|
|
224
250
|
- `promote` **requires** `--project`/`--global` in non-TTY contexts (scripts, LLM calls) โ a scope choice is never silently made for the caller.
|
|
225
|
-
- `pull` registers the **author-curated ratchet rules** bundled with the package (`presets/ratchet-rules.
|
|
251
|
+
- `pull` registers the **author-curated ratchet rules** bundled with the package (`presets/ratchet-rules.json` โ only general-purpose rules promoted from real recurring mistakes) into your global ratchet (`~/.claude/ratchet.md`). `install`/`init` never auto-inject anything; `pull` is always opt-in and idempotent. Drop any rule you dislike with `harness rm`.
|
|
252
|
+
- `seed` offers the same presets **one at a time**. Where `pull` registers the whole ratchet set in one go, `seed` covers the model-fitting presets too and asks about each of them in the first session after an install or upgrade ([below](#-seed-delegation-that-works-from-the-first-session)).
|
|
226
253
|
- ๐
ทโ runtime warnings (`ratchet?` `no-evidence` `PEV-skip`) expire after 30 minutes, subdirectory sessions match their project correctly, and PEV-skip counts only mutating tools (Edit/Write/Bash) so read-only research sessions don't trip it (v2.16.0+).
|
|
227
254
|
|
|
228
255
|
<details>
|
|
@@ -304,6 +331,32 @@ For environments the learner cannot reach, write the mapping yourself in `<userD
|
|
|
304
331
|
|
|
305
332
|
That file holds internal identifiers in plain text โ do not commit it. On a direct-API machine it is never created and behaviour is unchanged.
|
|
306
333
|
|
|
334
|
+
## ๐ฑ seed: delegation that works from the first session
|
|
335
|
+
|
|
336
|
+
The model-fitting ratchet (`ratchet-model.md`) **starts empty.** A rule exists only after route-scan has seen the same kind of work recur in your own logs and you have approved that candidate. So a fresh install delegates nothing, and keeps delegating nothing for days โ precisely the stretch where the savings would matter most.
|
|
337
|
+
|
|
338
|
+
`seed` fills that gap from presets bundled with the package.
|
|
339
|
+
|
|
340
|
+
| Presets | What they cover | File |
|
|
341
|
+
|---|---|---|
|
|
342
|
+
| 9 model-fitting | running commands, lookup, status checks, questions about pasted logs, read-and-summarize โ each with a T2 (haiku) and a T1 (sonnet) rule | `presets/model-rules.json` |
|
|
343
|
+
| 6 ratchet | general-purpose rules promoted from mistakes that actually recurred | `presets/ratchet-rules.json` |
|
|
344
|
+
|
|
345
|
+
**How they get registered:** in the first session after an install or upgrade, the SessionStart hook hands the pending presets to the model, which walks the user through them **one at a time**. Each answer runs one of these immediately:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
claude-token-saver seed # pending presets + recorded answers
|
|
349
|
+
claude-token-saver seed accept <id> --global|--project # register one (scope required)
|
|
350
|
+
claude-token-saver seed accept all --global # when the user says "register them all"
|
|
351
|
+
claude-token-saver seed skip <id> # decline โ never offered again
|
|
352
|
+
claude-token-saver seed reset # clear the answers and offer everything again
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
- **Nothing is written without a yes to that specific rule.** A declined rule stays declined across upgrades; a later release only surfaces the presets it actually added.
|
|
356
|
+
- A preset is withheld when you already approved a rule of the same shape (same tier and category).
|
|
357
|
+
- A seeded rule **does not pass someone else's statistics off as yours.** It is recorded as `preset (curated)` until a scan measures real firings and delegations, and then those numbers replace it. If its delegated error rate crosses the threshold it gets the same review flag as any other rule.
|
|
358
|
+
- The scope must be stated as `--global` or `--project`. The hook environment is non-TTY, so the CLI cannot ask โ the model confirms with the user and passes the flag.
|
|
359
|
+
|
|
307
360
|
## ๐ฐ๐ท Korean writing guidance
|
|
308
361
|
|
|
309
362
|
Injects guidance that corrects how Claude writes Korean (dropped sentence parts, noun-stopped sentences, translationese, em-dash overuse) **once per session.**
|
|
@@ -613,6 +666,24 @@ Also update `statusLine.command` in `~/.claude/settings.json` to `claude-token-s
|
|
|
613
666
|
|
|
614
667
|
## Release notes
|
|
615
668
|
|
|
669
|
+
### v3.34.0 (2026-09-10)
|
|
670
|
+
- **The output language is chosen at install time.** With nothing recorded it used to fall back to English in silence, so a Korean user read English reports until they happened to find `mode ko`. A terminal install now proposes the system locale and asks whether to use Korean; an unattended install records what the locale says. Once recorded it is never asked again, and a scripted install can pin it with `CTS_LANG=ko|en`.
|
|
671
|
+
- **Fixed a locale-detection defect.** An explicit `LANG=en_US.UTF-8` was overruled on macOS, where detection went on to read the system locale (`AppleLocale`) and answered "Korean". A POSIX locale variable that is set now counts as the answer; the system locale is consulted only when all of them are empty, which is the macOS GUI-shell case the fallback was for.
|
|
672
|
+
- Language is the first step of the install, so the harness, doc2md and seed notices below it all print in the chosen language.
|
|
673
|
+
|
|
674
|
+
### v3.33.0 (2026-09-10)
|
|
675
|
+
- **`seed`: delegation works from the first session.** The model-fitting ratchet started empty, so a fresh install delegated nothing for days โ until enough of the user's own history accumulated and a candidate was approved. The package now bundles **9 model-fitting presets** (`presets/model-rules.json`) and **6 ratchet presets** (`presets/ratchet-rules.json`), and the SessionStart hook hands the pending ones to the model in the first session after an install or upgrade so it can ask about them **one at a time**.
|
|
676
|
+
- **Answers are recorded for good.** A declined preset is not re-offered after an upgrade; only presets a later release actually added show up. A preset is withheld entirely when a rule of the same tier and category is already registered. Commands: `seed`, `seed accept <id> --global|--project`, `seed skip <id>`, `seed reset`.
|
|
677
|
+
- **A seeded rule does not report someone else's statistics as yours.** It reads `preset (curated)` until a scan measures real firings and delegations, then those numbers take over. Its delegated error rate gets the same review flag as any other rule.
|
|
678
|
+
- **Ratchet presets are bilingual now.** `presets/ratchet-rules.md` became `presets/ratchet-rules.json` with both languages per rule: the text is injected into the model's context, so a Korean-only rule pulled an English session's answers into Korean. Ids come from the Korean text, so revising an English wording keeps the user's answer.
|
|
679
|
+
- **One template for rule sentences.** route-scan and seed both compose through `modelRuleBaseText()`, so a reworded rule cannot mean two different things depending on which producer wrote it.
|
|
680
|
+
|
|
681
|
+
### v3.32.0 (2026-09-10)
|
|
682
|
+
- **The context warning moved from 200k to 500k.** A brand-new session clears 200k from the system prompt plus a couple of file reads, so `โ Ctx 200k+` was on almost permanently and therefore said nothing. The chip is now `โ Ctx 500k+` and fires only when a single request really carried more than 500k input tokens. The `๐ฆ Ctx` segment also waits for 500k before turning yellow โ being on a 1M window is no longer a warning by itself.
|
|
683
|
+
- **Old history still resolves.** The legacy `โ Ctx 200k+` chip and the old detail string (`Single-request context exceeded 200k`) are still parsed.
|
|
684
|
+
- **doc2md is enabled by the install.** Registering the hooks is two entries in `settings.json` and costs nothing until a document appears, yet until now only people who found `doc2md on` themselves benefited. The converter (a markitdown venv) takes minutes to build, so it is offered at a terminal and merely printed as a command on an unattended install. Opt out with `doc2md off` or `CTS_NO_DOC2MD=1`.
|
|
685
|
+
- **Documented which features the install turns on and which stay manual.** The only manual ones left are `compact-window set` (writes Claude Code settings and needs an explicit scope) and approving model-fitting rules.
|
|
686
|
+
|
|
616
687
|
### v3.27.0 (2026-09-04)
|
|
617
688
|
- **A document path in the prompt is finally caught.** The 3.26.x `PreToolUse(Read)` hook never reached the formats it was written for: Claude Code refuses pptx/xlsx/docx as binary *before* running any hook. Measured โ a `.pdf` Read fires the hook, a `.pptx` Read in the same session leaves no hook log entry. Interception now also happens at `UserPromptSubmit`, which sees the raw prompt: paths there are converted and the conversion is handed back as context. `@path`, quoted and relative forms all count.
|
|
618
689
|
- **A session-start note was added.** It tells the model two things it cannot work out alone: that a binary-file refusal is answered by `doc2md <path>`, and that if the user attached a document, they should be asked for a path next time. An attachment bills its entire contents into the context, and no hook event receives attachment content, so there is nothing the tool itself can do about it.
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/claude-token-saver)
|
|
4
4
|
|
|
5
|
+
๐ **[ํ๋ก์ ํธ ์๊ฐ ํ์ด์ง](https://rootstudioyaml.github.io/claude-token-saver/)**
|
|
6
|
+
|
|
5
7
|
# claude-token-saver
|
|
6
8
|
|
|
7
9
|
**์๋ ๋์ ๋ ์ค๋ก ๋ณด์ฌ ์ค๋๋ค.** ๋น์ผ ๋ชจ๋ธ์ด ๋ฐ๋ณตํ๋ ์ฌ์ด ์์
์ ์ผ ๋ชจ๋ธ๋ก ๋ด๋ ค๋ณด๋ด๊ณ , ๋ชจ๋ธ์ด ์ฝ์ง ๋ชปํ๋ ๋ฌธ์๋ฅผ Markdown ์ผ๋ก ๋ฐ๊ฟ๋๋ค. ๋ ์ ๊ฐ์ก ๋ชจ๋ ์ถ์ ์ด ์๋๋ผ ์์ฅ ๊ธฐ๋ก์ด๊ณ , ๋ ๋ง์ด ์๋ ์ชฝ์ด ์ฒซ ์ค์ ์ฐจ์งํฉ๋๋ค. ์์กด์ฑ 0, ์ค์น ํ ์ค.
|
|
@@ -111,13 +113,36 @@ npm i -g claude-token-saver
|
|
|
111
113
|
|
|
112
114
|
> โ ๏ธ sudo๋ก ๊ธ๋ก๋ฒ ์ค์น๋ฅผ ํ๋ฉด Skill์ด ์ฌ์ฉ์ ๊ณ์ ์ด ์๋๋ผ root์ `~/.claude`์ ๋ฑ๋ก๋๋ ํจ์ ์ด ์์ต๋๋ค. nvm์ด๋ fnm, Volta๋ฅผ ์ฌ์ฉํด ์ฌ์ฉ์ ์์ญ์ ์ค์นํ๊ธฐ๋ฅผ ๊ถ์ฅํฉ๋๋ค.
|
|
113
115
|
|
|
116
|
+
### ์ค์นํ๋ฉด ์ผ์ง๋ ๊ธฐ๋ฅ๊ณผ ์ง์ ์ผ์ผ ํ๋ ๊ธฐ๋ฅ
|
|
117
|
+
|
|
118
|
+
์ค์น ์์ ์ ๋น์ฉ์ด ๋ค์ง ์๋ ๊ธฐ๋ฅ์ ์ ๋ถ ์๋์ผ๋ก ์ผ์ง๋๋ค. ์๋์ผ๋ก ๋จ๊ฒจ ๋ ํญ๋ชฉ์ Claude Code ์์ฒด์ ์ค์ ์ ๋ฐ๊พธ๊ฑฐ๋, ์ ์ฉ ๋ฒ์๋ฅผ ์ฌ๋์ด ์ ํด ์ฃผ์ด์ผ ํ๋ ๊ฒ๋ค๋ฟ์
๋๋ค.
|
|
119
|
+
|
|
120
|
+
| ๊ธฐ๋ฅ | ์ค์น ์งํ ์ํ | ๋๋ ๋ฐฉ๋ฒ |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| statusline (์ง๋จ ์นฉยท์ ๊ฐ ์์ฅ) | ์ผ์ง | `claude-token-saver uninstall` |
|
|
123
|
+
| `/claude-token-saver` Skill | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
124
|
+
| SessionStart ํ
(route-scan ์ฌ๋ถ์) | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
125
|
+
| UserPromptSubmit ํ
(brief ์ฃผ์
) | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
126
|
+
| ์ต์ด route-scan (์ต๊ทผ 14์ผ ๋ก๊ทธ ๋ถ์) | ์ค์น ์ค ์ฆ์ 1ํ ์คํ | ํด๋น ์์ต๋๋ค |
|
|
127
|
+
| ๐
ท Harness 5์์น (`~/.claude/CLAUDE.md`) | ์ผ์ง (ํฐ๋ฏธ๋์์๋ ๋ด์ฉ์ ๋ณด์ฌ ์ฃผ๊ณ ํ ๋ฒ ๋ฌป์ต๋๋ค) | `harness uninit --global` ยท `CTS_NO_HARNESS=1` |
|
|
128
|
+
| doc2md ํ
(ReadยทEditยทWriteยทํ๋กฌํํธ) | ์ผ์ง | `doc2md off` ยท `CTS_NO_DOC2MD=1` |
|
|
129
|
+
| doc2md ๋ณํ๊ธฐ(markitdown venv) | ํฐ๋ฏธ๋์์ ์ค์น ์ฌ๋ถ๋ฅผ ๋ฌป๊ณ , ๋น๋ํํ ์ค์น์์๋ ๋ช
๋ น๋ง ์๋ดํฉ๋๋ค | `doc2md install-converter` ๋ก ๋์ค์ ์ค์น |
|
|
130
|
+
| ํ๊ตญ์ด ๋ฌธ์ฒด ์ง์นจ | ์์คํ
๋ก์ผ์ผ์ด ํ๊ตญ์ด๋ฉด ์ผ์ง (ํฐ๋ฏธ๋์์๋ ๋ฌป์ต๋๋ค) | `korean off` ยท `CTS_NO_KOREAN=1` |
|
|
131
|
+
| compact-window ๊ฒฝ๊ณ ์นฉ | ์ผ์ง | `compact-window off` |
|
|
132
|
+
| ์
๋ฐ์ดํธ ์๋ด ์นฉ | ์ผ์ง | `CTS_NO_UPDATE_CHECK=1` |
|
|
133
|
+
| **compact-window ๊ฐ ๊ณ ์ ** (`autoCompactWindow` 500k) | **๊บผ์ง โ ์ง์ ์คํํด์ผ ํฉ๋๋ค** | `compact-window set --global` ๋๋ `--project` |
|
|
134
|
+
| **๋ชจ๋ธ ํผํ
๋ฃฐ ์น์ธ** (`ratchet-model.md` ์์ ๋ฃฐ) | **ํ๋ณด๋ง ์ ์ํฉ๋๋ค** | `route-scan rules` ๋ก ํ์ธํ๊ณ ์น์ธยท์ญ์ |
|
|
135
|
+
| `handoff` (ํ๋ ์๋ฐ ์ ์์
๋ฐฑ์
) | ํ์ํ ๋ ์ง์ ์คํํ๋ ๋ช
๋ น์
๋๋ค | ํด๋น ์์ต๋๋ค |
|
|
136
|
+
|
|
137
|
+
`compact-window set` ์ Claude Code ์ `settings.json` ์ ๊ฐ์ ์ ๊ณ , ์ ์ญ๊ณผ ํ๋ก์ ํธ ์ค ์ด๋์ ์ ์์ง๋ ์ฌ๋์ด ์ ํด์ผ ํ๋ฏ๋ก ์๋์ผ๋ก ์คํํ์ง ์์ต๋๋ค. ๋ชจ๋ธ ํผํ
๋ฃฐ๋ ๊ฐ์ ์ด์ ๋ก ์น์ธ ๋จ๊ณ๋ฅผ ๋จ๊ฒจ ๋์์ต๋๋ค. ์ด๋ค ์์
์ ๋ ์ผ ํฐ์ด์ ๋งก๊ธธ์ง๋ ์ฌ์ฉ์์ ํ๋จ์ด ํ์ํฉ๋๋ค.
|
|
138
|
+
|
|
114
139
|
## statusline ์ฝ๋ ๋ฒ
|
|
115
140
|
|
|
116
141
|
์ ๊ฐ ์์ฅ์ ๊ธฐ๋ก์ด ์์ด๋ฉด statusline์ด **๋ ์ค๋ก** ์ถ๋ ฅ๋ฉ๋๋ค. ์ฒซ์งธ ์ค์๋ ๋ผ์ฐํ
์ ๊ฐ์ก๋ง ํ์ํ๊ณ , ๋์งธ ์ค์๋ ์ง๋จ ์นฉ์ ํ์ํฉ๋๋ค.
|
|
117
142
|
|
|
118
143
|
```
|
|
119
144
|
๐ Routing saved $2.09 | fableโsonnet 1ร $0.72 ยท opusโhaiku 1ร $0.57
|
|
120
|
-
โ Ctx
|
|
145
|
+
โ Ctx 500k+ ยท ๐
ท 5/5 ยท ๐ค Opus 5 ยท ๐ง Cache hit 98.8% ยท โณ Cache expires 59:46 ยท โฆ current โโโโโโ 62% ๐ 21:33 ยท ๐
weekly โโโโโโ 38% ๐ Tue 19:33 ยท ๐ฆ Ctx 47% of 1M ยท ๐ฐ Cache saved $1.0K ยท last 1d
|
|
121
146
|
```
|
|
122
147
|
|
|
123
148
|
์์ฅ์ด ๋น์ด ์์ผ๋ฉด, ๋ค์ ๋งํด ์์ง ์ค์ธก๋ ์์์ด ์์ผ๋ฉด ์ฒซ์งธ ์ค์ ๊ทธ๋ฆฌ์ง ์๊ณ ์ข
์ ์ฒ๋ผ ํ ์ค๋ก ์ถ๋ ฅํฉ๋๋ค. ์ผ๋ถ ํ๊ฒฝ(๊ตฌ๋ฒ์ macOS Claude Code)์์ ์ฒซ์งธ ์ค๋ง ํ์๋๋ค๋ฉด `--single-line` ์ต์
์ผ๋ก ํ ์ค ๋ ์ด์์์ ์ ์งํ์ญ์์ค.
|
|
@@ -141,7 +166,7 @@ npm i -g claude-token-saver
|
|
|
141
166
|
๐จ 5H โโโโโโ 94% ๐ 12:36 ยท ๐
ท 5/5 ยท ๐ค Opus 4.8 ยท ๐ง Cache hit 72.1% ยท โ Cache miss ยท ๐
weekly โโโโโโ 12% ๐ Sun 14:26 ยท ๐ฆ Ctx 200k ยท last 1d
|
|
142
167
|
```
|
|
143
168
|
|
|
144
|
-
์นฉ์ ์ข
๋ฅ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. `๐จ 5H/7D NN%`(ํ๋ ์๋ฐ) ยท `โ Ctx
|
|
169
|
+
์นฉ์ ์ข
๋ฅ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. `๐จ 5H/7D NN%`(ํ๋ ์๋ฐ) ยท `โ Ctx 500k+`(๋จ์ผ ์์ฒญ์ด ์ค์ ๋ก 500k๋ฅผ ์ด๊ณผ) ยท `โ Cache miss` ยท `โ Input spike` ยท `โ Output heavy` ยท `โ Call surge` ยท `โ Rebuild churn` ยท `โ 5m TTL`. ๋ ์๋๊ฐ ๋์์ 90%๋ฅผ ๋์ผ๋ฉด ๋ฆฌ์
์ด ๋ ์๋ฐํ ์ชฝ์ ๐จ๋ก ์ฌ๋ฆฌ๊ณ , ๋๋จธ์ง ํ๋๋ ๋นจ๊ฐ ์ธ๊ทธ๋จผํธ๋ก ๊ณ์ ํ์ํฉ๋๋ค (v2.16.0 ์ด์).
|
|
145
170
|
|
|
146
171
|
### ๊ฒฝ๊ณ ์นฉ์ด ๋ด์ ๋
|
|
147
172
|
|
|
@@ -174,7 +199,7 @@ Claude Code ์์์ `/claude-token-saver` Skill์ ์คํํ๊ฑฐ๋, ์นฉ์ ์
|
|
|
174
199
|
| `claude-token-saver install` | Skillยทstatusline ์๋ ๋ฑ๋ก |
|
|
175
200
|
| `claude-token-saver uninstall [--purge]` | ๋ฑ๋กํ ํ
ยทstatuslineยทSkill ์ ๊ฑฐ. ๊ธฐ๋ก๋ ์ ๊ฐ์ก์ ๋จ๊ธฐ๋ฉฐ, `--purge` ๋ฅผ ๋ถ์ด๋ฉด ์ํ ๋๋ ํฐ๋ฆฌ๊น์ง ์ง์๋๋ค |
|
|
176
201
|
|
|
177
|
-
์ถ๋ ฅ ์ธ์ด๋ `mode ko
|
|
202
|
+
์ถ๋ ฅ ์ธ์ด๋ ์ค์นํ ๋ ํ ๋ฒ ์ ํฉ๋๋ค. ํฐ๋ฏธ๋์์ ์ค์นํ๋ฉด ์์คํ
๋ก์ผ์ผ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ ์ํ๊ณ ํ๊ตญ์ด๋ฅผ ์ธ์ง ๋ฌผ์ด๋ณด๋ฉฐ, ๋น๋ํํ ์ค์น์์๋ ๋ก์ผ์ผ ํ์ ์ ๊ทธ๋๋ก ๊ธฐ๋กํฉ๋๋ค. ํ ๋ฒ ๊ธฐ๋ก๋๋ฉด ์
๊ทธ๋ ์ด๋ํด๋ ๋ค์ ๋ฌป์ง ์์ต๋๋ค. ๋์ค์ ๋ฐ๊ฟ ๋๋ `mode ko`๋ `mode en`์ ์ฐ๊ณ , ์คํฌ๋ฆฝํธ์์ ์ค์นํ ๋๋ `CTS_LANG=ko` ๋๋ `CTS_LANG=en`์ผ๋ก ์ง์ ํ ์ ์์ต๋๋ค. statusline์ ์นฉ์ ์ธ์ ๋ ๊ธฐํธ๋ก ํ์ํฉ๋๋ค. ์ ์ฒด ์ต์
์ [์๋ฌธ README](./README.en.md#options)๋ฅผ ์ฐธ๊ณ ํ์ญ์์ค.
|
|
178
203
|
|
|
179
204
|
## โฌ ์
๋ฐ์ดํธ ์๋ด
|
|
180
205
|
|
|
@@ -194,6 +219,7 @@ statusline์ ๋ํ ์์๋ฅผ ๋์ธ ์ ์๊ณ , 300๋ฐ๋ฆฌ์ด๋ง๋ค ๋ค์ ๊ทธ
|
|
|
194
219
|
claude-token-saver harness init # ์ด ํ๋ก์ ํธ์ ์
์
|
|
195
220
|
claude-token-saver harness init --global # ~/.claude/CLAUDE.md, ๋ชจ๋ ํ๋ก์ ํธ์ ์ ์ฉ
|
|
196
221
|
claude-token-saver harness check # ํ์ฌ ์ ์ (๊ธ๋ก๋ฒ fallback ์ธ์ )
|
|
222
|
+
claude-token-saver harness analyze # ํ
์์ด๋ ์๋์ผ๋ก ์ ์ฌ ๋ถ์์ ์คํํด harness-state.json ๊ฐฑ์
|
|
197
223
|
claude-token-saver harness promote <N> --project|--global # ๊ฒฝ๊ณ #N โ ratchet ๋ฃฐ (์ค์ฝํ ํ์)
|
|
198
224
|
claude-token-saver harness promote "<๋ฃฐ ํ
์คํธ>" --project|--global # ๋ด๊ฐ ์ง์ ์ ์ํ ๋ฃฐ๋ ๊ฐ์ ๋ช
๋ น์ผ๋ก ๋ฑ๋ก
|
|
199
225
|
claude-token-saver harness pull # ํจํค์ง ๋๋ด ํ๋ ์ด์
๋ฃฐ โ ๋ด ๊ธ๋ก๋ฒ ๋ซ์ณ์ ๋ฑ๋ก (opt-in, ์ค๋ณต ์คํต)
|
|
@@ -202,7 +228,8 @@ claude-token-saver harness off | on # ๐
ท ํ์ ํ ๊ธ
|
|
|
202
228
|
```
|
|
203
229
|
|
|
204
230
|
- `promote`๋ non-TTY ํ๊ฒฝ(์คํฌ๋ฆฝํธ๋ LLM ํธ์ถ)์์ `--project` ๋๋ `--global` ํ๋๊ทธ๊ฐ **๋ฐ๋์ ํ์ํฉ๋๋ค.** ์ ์ฉ ๋ฒ์๊ฐ ์ฌ์ฉ์์๊ฒ ๋ฌป์ง ์์ ์ฑ ๊ฒฐ์ ๋๋ ์ฌ๊ณ ๋ฅผ ๋ง๊ธฐ ์ํ ์ค๊ณ์
๋๋ค.
|
|
205
|
-
- `pull`์ ํจํค์ง์ ๋๋ด๋ **์ ์์ ํ๋ ์ด์
๋ซ์ณ ๋ฃฐ**(`presets/ratchet-rules.
|
|
231
|
+
- `pull`์ ํจํค์ง์ ๋๋ด๋ **์ ์์ ํ๋ ์ด์
๋ซ์ณ ๋ฃฐ**(`presets/ratchet-rules.json` โ ์ค์ ๋ฐ๋ณต ์ฌ๊ณ ์์ ์น๊ฒฉ๋ ๋ฒ์ฉ ๋ฃฐ๋ง)์ ๋ด ๊ธ๋ก๋ฒ ๋ซ์ณ(`~/.claude/ratchet.md`)์ ๋ฑ๋กํฉ๋๋ค. ์ค์น(`install`)๋ `init`์ ์๋ฌด๊ฒ๋ ์๋ ์ฃผ์
ํ์ง ์์ผ๋ฉฐ, `pull`์ ํญ์ opt-in์ด๊ณ ์ฌ์คํํด๋ ์ค๋ณต์ด ์์ต๋๋ค(๋ฉฑ๋ฑ). ๋ง์์ ์ ๋๋ ๋ฃฐ์ `harness rm`์ผ๋ก ์ ๊ฑฐํ๋ฉด ๋ฉ๋๋ค.
|
|
232
|
+
- `seed`๋ ๊ฐ์ ํ๋ฆฌ์
์ **ํ ๊ฑด์ฉ** ๋ฌผ์ด๋ณด๋ ๊ฒฝ๋ก์
๋๋ค. `pull`์ด ๋ซ์ณ ๋ฃฐ ์ ์ฒด๋ฅผ ํ ๋ฒ์ ๋ฑ๋กํ๋ ๋ช
๋ น์ธ ๋ฐ ๋ฐํด, `seed`๋ ๋ชจ๋ธ ํผํ
ํ๋ฆฌ์
๊น์ง ํฌํจํด ์ค์นยท์
๊ทธ๋ ์ด๋ ํ ์ฒซ ์ธ์
์์ ํ ๊ฑด์ฉ ์ ์ํฉ๋๋ค ([์๋](#-seed-์ค์น-์งํ๋ถํฐ-์์์ด-๊ฑธ๋ฆฌ๊ฒ-ํ๋-์์-๋ฃฐ)).
|
|
206
233
|
- ๐
ทโ ๋ฐํ์ ๊ฒฝ๊ณ (`ratchet?` `no-evidence` `PEV-skip`)๋ 30๋ถ ํ ์๋ ๋ง๋ฃ๋๊ณ , ํ์ ๋๋ ํฐ๋ฆฌ ์ธ์
๋ ํ๋ก์ ํธ์ ์ฌ๋ฐ๋ฅด๊ฒ ๋งค์นญ๋ฉ๋๋ค. PEV-skip์ ๋ณ๊ฒฝ์ฑ ๋๊ตฌ(Edit/Write/Bash)๋ง ์นด์ดํธํด ์ฝ๊ธฐ ์์ฃผ ์ธ์
์์๋ ๋ฐ๋ํ์ง ์์ต๋๋ค (v2.16.0+).
|
|
207
234
|
|
|
208
235
|
<details>
|
|
@@ -294,6 +321,32 @@ v3.10.0๋ถํฐ๋ ํ๋กํ์ผ ID๋ฅผ ์ญํ (mainยทopusยทsonnetยทhaiku)๋ก ๋๋
|
|
|
294
321
|
|
|
295
322
|
์ด ํ์ผ์๋ ์ฌ๋ด ์๋ณ์๊ฐ ํ๋ฌธ์ผ๋ก ๋จ์ผ๋ฏ๋ก ์ ์ฅ์์ ์ปค๋ฐํ์ง ๋ง์ญ์์ค. ๊ฒ์ดํธ์จ์ด๋ฅผ ์ฐ์ง ์๋ ํ๊ฒฝ์์๋ ํ์ผ์ด ์์ ๋ง๋ค์ด์ง์ง ์๊ณ ๊ธฐ์กด ๋์์ด ๊ทธ๋๋ก ์ ์ง๋ฉ๋๋ค.
|
|
296
323
|
|
|
324
|
+
## ๐ฑ seed: ์ค์น ์งํ๋ถํฐ ์์์ด ๊ฑธ๋ฆฌ๊ฒ ํ๋ ์์ ๋ฃฐ
|
|
325
|
+
|
|
326
|
+
๋ชจ๋ธ ํผํ
๋ซ์ณ(`ratchet-model.md`)์ **๋น ํ์ผ๋ก ์์ํฉ๋๋ค.** route-scan์ด ์ฌ์ฉ์์ ๋ก๊ทธ์์ ๊ฐ์ ์ ํ์ ์์
์ ์ฌ๋ฌ ๋ฒ ๊ด์ธกํ๊ณ , ์ฌ์ฉ์๊ฐ ๊ทธ ํ๋ณด๋ฅผ ์น์ธํด์ผ ๋ฃฐ์ด ์๊น๋๋ค. ์ฆ ๊ฐ ์ค์นํ ์ํ์์๋ ์์์ด ํ ๊ฑด๋ ๊ฑธ๋ฆฌ์ง ์๊ณ , ๊ทธ ์ํ๊ฐ ๋ฉฐ์น ์ด์ด์ง๋๋ค. ์ ์ ์ ๊ฐ ํจ๊ณผ๊ฐ ๊ฐ์ฅ ํด ์๊ธฐ์
๋๋ค.
|
|
327
|
+
|
|
328
|
+
`seed`๋ ํจํค์ง์ ๋๋ด๋ ํ๋ฆฌ์
์ผ๋ก ๊ทธ ๊ณต๋ฐฑ์ ๋ฉ์๋๋ค.
|
|
329
|
+
|
|
330
|
+
| ํ๋ฆฌ์
| ๋ด์ฉ | ํ์ผ |
|
|
331
|
+
|---|---|---|
|
|
332
|
+
| ๋ชจ๋ธ ํผํ
9๊ฑด | ๋ช
๋ น ์คํยทํ์ยท์ํ ํ์ธยท๋ถ์ฌ๋ฃ์ ๋ก๊ทธ ์ง๋ฌธยท์ฝ๊ธฐ ์์ฝ, ๊ฐ ์ ํ์ T2(haiku)์ T1(sonnet) ๋ฃฐ | `presets/model-rules.json` |
|
|
333
|
+
| ๋ซ์ณ 6๊ฑด | ์ค์ ๋ฐ๋ณต ์ฌ๊ณ ์์ ์น๊ฒฉ๋ ๋ฒ์ฉ ๋ฃฐ | `presets/ratchet-rules.json` |
|
|
334
|
+
|
|
335
|
+
**๋ฑ๋ก ์ ์ฐจ:** ์ค์น๋ ์
๊ทธ๋ ์ด๋ ํ ์ฒซ ์ธ์
์์ SessionStart ํ
์ด ๋๊ธฐ ์ค์ธ ํ๋ฆฌ์
์ ๋ชจ๋ธ์๊ฒ ์ ๋ฌํ๊ณ , ๋ชจ๋ธ์ด **ํ ๊ฑด์ฉ ์์๋๋ก** ๋ฑ๋ก ์ฌ๋ถ๋ฅผ ๋ฌป์ต๋๋ค. ์ฌ์ฉ์๊ฐ ๋ตํ๋ฉด ๊ทธ ์๋ฆฌ์์ ์๋ ๋ช
๋ น์ ์คํํฉ๋๋ค.
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
claude-token-saver seed # ๋๊ธฐ ์ค์ธ ํ๋ฆฌ์
๊ณผ ์๋ต ๊ธฐ๋ก
|
|
339
|
+
claude-token-saver seed accept <id> --global|--project # ํ ๊ฑด ๋ฑ๋ก (์ ์ฉ ๋ฒ์ ํ์)
|
|
340
|
+
claude-token-saver seed accept all --global # ์ฌ์ฉ์๊ฐ "์ ๋ถ ๋ฑ๋ก"์ด๋ผ๊ณ ๋ตํ ๊ฒฝ์ฐ
|
|
341
|
+
claude-token-saver seed skip <id> # ๊ฑฐ์ โ ๋ค์ ๋ฌป์ง ์์ต๋๋ค
|
|
342
|
+
claude-token-saver seed reset # ์๋ต ๊ธฐ๋ก์ ์ง์ ์ ์ฒด๋ฅผ ๋ค์ ์ ์ ๋์์ผ๋ก
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
- **์น์ธ ์์ด๋ ์๋ฌด๊ฒ๋ ๊ธฐ๋ก๋์ง ์์ต๋๋ค.** ๊ฑฐ์ ํ ๋ฃฐ์ ์
๊ทธ๋ ์ด๋ ํ์๋ ๋ค์ ๋ฌป์ง ์๊ณ , ์ ๋ฆด๋ฆฌ์ค์์ ์ถ๊ฐ๋ ํ๋ฆฌ์
๋ง ๋ค์ ์ธ์
์ ์ ์๋ฉ๋๋ค.
|
|
346
|
+
- ์ฌ์ฉ์๊ฐ ์ด๋ฏธ ๊ฐ์ ์ ํ(๊ฐ์ ํฐ์ดยท์นดํ
๊ณ ๋ฆฌ)์ ๋ฃฐ์ ์ง์ ์น์ธํด ๋์๋ค๋ฉด ๊ทธ ํ๋ฆฌ์
์ ์ ์ํ์ง ์์ต๋๋ค.
|
|
347
|
+
- ํ๋ฆฌ์
์ผ๋ก ๋ฑ๋กํ ๋ฃฐ์ **๋จ์ ํต๊ณ๋ฅผ ๋ด ๊ฒ์ฒ๋ผ ํ์ํ์ง ์์ต๋๋ค.** ๋ฑ๋ก ์งํ์๋ `preset (curated)`๋ก ์ ํ๊ณ , ์ดํ ์ค์บ์์ ์ค์ ๋ฐํ์ ์์ ๊ฒฐ๊ณผ๊ฐ ์ธก์ ๋๋ฉด ๊ทธ ์์น๋ก ๋์ฒด๋ฉ๋๋ค. ์์ ์๋ฌ์จ์ด ๊ธฐ์ค์ ๋์ผ๋ฉด ๋ค๋ฅธ ๋ฃฐ๊ณผ ๋๊ฐ์ด ์ฌ๊ฒํ ํ๋๊ทธ๊ฐ ๋ถ์ต๋๋ค.
|
|
348
|
+
- ์ ์ฉ ๋ฒ์๋ `--global`๊ณผ `--project` ์ค ๋ฐ๋์ ๋ช
์ํด์ผ ํฉ๋๋ค. ํ
ํ๊ฒฝ์ non-TTY๋ผ CLI๊ฐ ์ง์ ๋ฌผ์ ์ ์์ผ๋ฏ๋ก, ๋ชจ๋ธ์ด ์ฌ์ฉ์์๊ฒ ํ์ธํ ๋ค ํ๋๊ทธ๋ฅผ ๋ถ์ฌ ์คํํฉ๋๋ค.
|
|
349
|
+
|
|
297
350
|
## ๐ฐ๐ท ํ๊ตญ์ด ๋ฌธ์ฒด ์ง์นจ
|
|
298
351
|
|
|
299
352
|
Claude๊ฐ ํ๊ตญ์ด๋ก ์ธ ๋ ๋ํ๋๋ ๋ฌธ์ฒด ๊ฒฐํจ(๋ฌธ์ฅ ์ฑ๋ถ ์๋ต, ๋ช
์ฌํ ์ข
๊ฒฐ, ๋ฒ์ญ์ฒด, ์ ๋์ ๋จ์ฉ)์ ๊ต์ ํ๋ ์ง์นจ์ **์ธ์
์์ ์ ํ ๋ฒ ์ฃผ์
ํฉ๋๋ค.**
|
|
@@ -585,6 +638,24 @@ npm uninstall -g claude-cache-monitor && npm i -g claude-token-saver
|
|
|
585
638
|
|
|
586
639
|
## ๋ฆด๋ฆฌ์ค ๋
ธํธ
|
|
587
640
|
|
|
641
|
+
### v3.34.0 (2026-09-10)
|
|
642
|
+
- **์ถ๋ ฅ ์ธ์ด๋ฅผ ์ค์นํ ๋ ์ ํฉ๋๋ค.** ์ง๊ธ๊น์ง๋ ๊ธฐ๋ก์ด ์์ผ๋ฉด ์กฐ์ฉํ ์์ด๋ก ๋จ์ด์ ธ์, ํ๊ตญ์ด ์ฌ์ฉ์๋ `mode ko`๋ฅผ ์ฐ์ฐํ ๋ฐ๊ฒฌํ ๋๊น์ง ์์ด ๋ฆฌํฌํธ๋ฅผ ์ฝ์์ต๋๋ค. ์ด์ ํฐ๋ฏธ๋ ์ค์น์์๋ ์์คํ
๋ก์ผ์ผ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ ์ํ๊ณ ํ๊ตญ์ด๋ฅผ ์ธ์ง ๋ฌผ์ด๋ณด๋ฉฐ, ๋น๋ํํ ์ค์น์์๋ ๋ก์ผ์ผ ํ์ ์ ๊ธฐ๋กํฉ๋๋ค. ํ ๋ฒ ๊ธฐ๋ก๋๋ฉด ์
๊ทธ๋ ์ด๋ํด๋ ๋ค์ ๋ฌป์ง ์๊ณ , ์คํฌ๋ฆฝํธ ์ค์น๋ `CTS_LANG=ko|en`์ผ๋ก ๊ณ ์ ํ ์ ์์ต๋๋ค.
|
|
643
|
+
- **๋ก์ผ์ผ ํ์ ์ ๊ฒฐํจ์ ๊ณ ์ณค์ต๋๋ค.** `LANG=en_US.UTF-8`์ด ์ง์ ๋ผ ์์ด๋ macOS์์๋ ์์คํ
๋ก์ผ์ผ(`AppleLocale`)๊น์ง ์ฝ์ด ํ๊ตญ์ด๋ก ํ์ ํ์ต๋๋ค. ์ด์ POSIX ๋ก์ผ์ผ ๋ณ์๊ฐ ๊ฐ์ ๊ฐ๊ณ ์์ผ๋ฉด ๊ทธ ๊ฐ์ ๋ต์ผ๋ก ๋ฐ์๋ค์ด๊ณ , ๋ณ์๊ฐ ๋ชจ๋ ๋น์ด ์์ ๋์๋ง ์์คํ
๋ก์ผ์ผ์ ๋ด
๋๋ค. ์ด ๋๋น์ฑ
์ `LANG`์ด ๋น์ด ์๋ macOS GUI ์
ธ์ ์ํ ๊ฒ์ด์์ต๋๋ค.
|
|
644
|
+
- ์ธ์ด๋ ์ค์น ์ ์ฐจ์ ์ฒซ ๋จ๊ณ์
๋๋ค. ๊ทธ ์๋์ harnessยทdoc2mdยทseed ์๋ด๊ฐ ๋ชจ๋ ์ ํํ ์ธ์ด๋ก ์ถ๋ ฅ๋ฉ๋๋ค.
|
|
645
|
+
|
|
646
|
+
### v3.33.0 (2026-09-10)
|
|
647
|
+
- **`seed`: ์ค์น ์งํ๋ถํฐ ์์์ด ๊ฑธ๋ฆฝ๋๋ค.** ๋ชจ๋ธ ํผํ
๋ซ์ณ์ ๋น ํ์ผ๋ก ์์ํด์, ์ฌ์ฉ์ ๋ก๊ทธ์ ๊ฐ์ ์ ํ์ ์์
์ด ์์ด๊ณ ํ๋ณด๋ฅผ ์น์ธํ ๋๊น์ง ๋ฉฐ์น ๊ฐ ์์์ด ํ ๊ฑด๋ ๊ฑธ๋ฆฌ์ง ์์์ต๋๋ค. ์ด์ ํจํค์ง์ **๋ชจ๋ธ ํผํ
ํ๋ฆฌ์
9๊ฑด**(`presets/model-rules.json`)๊ณผ **๋ซ์ณ ํ๋ฆฌ์
6๊ฑด**(`presets/ratchet-rules.json`)์ ๋๋ดํ๊ณ , ์ค์นยท์
๊ทธ๋ ์ด๋ ํ ์ฒซ ์ธ์
์์ SessionStart ํ
์ด ์ด๋ฅผ ๋ชจ๋ธ์๊ฒ ์ ๋ฌํด **ํ ๊ฑด์ฉ** ๋ฑ๋ก ์ฌ๋ถ๋ฅผ ๋ฌป์ต๋๋ค.
|
|
648
|
+
- **์๋ต์ ์๊ตฌ ๊ธฐ๋ก๋ฉ๋๋ค.** ๊ฑฐ์ ํ ํ๋ฆฌ์
์ ์
๊ทธ๋ ์ด๋ ํ์๋ ๋ค์ ๋ฌป์ง ์๊ณ , ์ ๋ฆด๋ฆฌ์ค์์ ์ถ๊ฐ๋ ํญ๋ชฉ๋ง ์ ์๋ฉ๋๋ค. ์ด๋ฏธ ๊ฐ์ ํฐ์ดยท์นดํ
๊ณ ๋ฆฌ์ ๋ฃฐ์ ์น์ธํด ๋์๋ค๋ฉด ๊ทธ ํ๋ฆฌ์
์ ์ ์ ๋์์์ ๋น ์ง๋๋ค. ๋ช
๋ น: `seed` ยท `seed accept <id> --global|--project` ยท `seed skip <id>` ยท `seed reset`.
|
|
649
|
+
- **ํ๋ฆฌ์
๋ฃฐ์ ๋จ์ ํต๊ณ๋ฅผ ๋ด ๊ฒ์ฒ๋ผ ์ ์ง ์์ต๋๋ค.** ๋ฑ๋ก ์งํ์๋ `preset (curated)`๋ก ํ๊ธฐํ๊ณ , ์ดํ ์ค์บ์ด ์ค์ ๋ฐํยท์์ ๊ฒฐ๊ณผ๋ฅผ ์ธก์ ํ๋ฉด ๊ทธ ์์น๋ก ๋์ฒดํฉ๋๋ค. ์์ ์๋ฌ์จ์ด ๊ธฐ์ค์ ๋์ผ๋ฉด ๋ค๋ฅธ ๋ฃฐ๊ณผ ๋์ผํ๊ฒ ์ฌ๊ฒํ ํ๋๊ทธ๊ฐ ๋ถ์ต๋๋ค.
|
|
650
|
+
- **๋ซ์ณ ํ๋ฆฌ์
์ ์๊ตญ์ด๋ก ์ ๊ณตํฉ๋๋ค.** `presets/ratchet-rules.md`๋ฅผ `presets/ratchet-rules.json`์ผ๋ก ๋ฐ๊พธ๊ณ ๋ฃฐ๋ง๋ค ํ๊ตญ์ด์ ์์ด๋ฅผ ํจ๊ป ๋ด์์ต๋๋ค. ๋ฃฐ ํ
์คํธ๋ ๋ชจ๋ธ ์ปจํ
์คํธ์ ์ฃผ์
๋๋ฏ๋ก, ํ๊ตญ์ด๋ง ์์ผ๋ฉด ์์ด ์ธ์
์ ์๋ต๊น์ง ํ๊ตญ์ด๋ก ๋๋ ค๊ฐ๋๋ค. ์๋ณ์๋ ํ๊ตญ์ด ์๋ฌธ์์ ๋ฝ์ ์์ด ๋ฌธ์ฅ์ ๋ค๋ฌ์ด๋ ์ฌ์ฉ์์ ์๋ต์ด ์ ์ง๋ฉ๋๋ค.
|
|
651
|
+
- **๋ฃฐ ๋ฌธ์ฅ ํ
ํ๋ฆฟ์ ํ ๊ณณ์ผ๋ก ํฉ์ณค์ต๋๋ค.** route-scan๊ณผ seed๊ฐ ๊ฐ์ `modelRuleBaseText()`๋ฅผ ์ฐ๋ฏ๋ก, ๋ฌธ๊ตฌ๋ฅผ ๊ณ ์น ๋ ๋ ์์ฐ์์ ํํ์ด ๊ฐ๋ผ์ง ์ ์์ต๋๋ค.
|
|
652
|
+
|
|
653
|
+
### v3.32.0 (2026-09-10)
|
|
654
|
+
- **์ปจํ
์คํธ ๊ฒฝ๊ณ ๊ธฐ์ค์ 200k ์์ 500k ๋ก ์ฌ๋ ธ์ต๋๋ค.** ์ค์น ์งํ์ ์ ์ธ์
๋ ์์คํ
ํ๋กฌํํธ์ ํ์ผ ๋ช ๊ฐ๋ง ์ฝ์ผ๋ฉด 200k ๋ฅผ ๋๊ธฐ๋ฏ๋ก, `โ Ctx 200k+` ๋ ๊ฑฐ์ ํญ์ ๋ ์๋ ์นฉ์ด์๊ณ ๊ทธ๋งํผ ์๋ฌด ์ ๋ณด๋ ์ฃผ์ง ๋ชปํ์ต๋๋ค. ์นฉ์ `โ Ctx 500k+` ๋ก ๋ฐ๋์๊ณ , ๋จ์ผ ์์ฒญ์ด ์ค์ ๋ก 500k ๋ฅผ ๋๊ธธ ๋๋ง ๋น๋๋ค. `๐ฆ Ctx` ์ธ๊ทธ๋จผํธ๋ 500k ๋ฅผ ๋๊ฒจ์ผ ๋
ธ๋์์ผ๋ก ๋ฐ๋๋๋ค. 1M ์๋๋ฅผ ์ฐ๊ณ ์๋ค๋ ์ฌ์ค ์์ฒด๋ ๋ ์ด์ ๊ฒฝ๊ณ ๊ฐ ์๋๋๋ค.
|
|
655
|
+
- **์์ ํ์คํ ๋ฆฌ๋ ๊ทธ๋๋ก ์ฝํ๋๋ค.** `โ Ctx 200k+` ์นฉ๊ณผ ๊ตฌ ๋ํ
์ผ ๋ฌธ๊ตฌ(`Single-request context exceeded 200k`)๋ ๊ณ์ ํด์ํฉ๋๋ค.
|
|
656
|
+
- **doc2md ๋ฅผ ์ค์น ๋ ์๋์ผ๋ก ์ผญ๋๋ค.** ํ
๋ฑ๋ก์ `settings.json` ํญ๋ชฉ ๋ ๊ฐ์ผ ๋ฟ์ด๊ณ ๋ฌธ์๋ฅผ ์ฝ์ง ์์ผ๋ฉด ๋น์ฉ์ด ๋ฐ์ํ์ง ์๋๋ฐ, ๊ทธ๋์์ `doc2md on` ์ ์ง์ ์ฐพ์๋ธ ์ฌ๋๋ง ์ผ์ต๋๋ค. ๋ณํ๊ธฐ(markitdown venv)๋ ์ค์น์ ๋ช ๋ถ์ด ๊ฑธ๋ฆฌ๋ฏ๋ก ํฐ๋ฏธ๋์์๋ง ๋ฌผ์ด๋ณด๊ณ , ๋น๋ํํ ์ค์น์์๋ ๋ช
๋ น๋ง ์๋ดํฉ๋๋ค. ๋๋ ค๋ฉด `doc2md off` ๋๋ `CTS_NO_DOC2MD=1` ์ ์ฐ์ญ์์ค.
|
|
657
|
+
- **์ค์น ์งํ ์ผ์ง๋ ๊ธฐ๋ฅ๊ณผ ์ง์ ์ผ์ผ ํ๋ ๊ธฐ๋ฅ์ ๋ฌธ์์ ํ๋ก ์ ๋ฆฌํ์ต๋๋ค.** ์๋์ผ๋ก ๋จ์ ํญ๋ชฉ์ `compact-window set`(Claude Code ์ค์ ์ ๊ฐ์ ์ ๊ณ ์ ์ฉ ๋ฒ์๋ฅผ ์ฌ๋์ด ์ ํด์ผ ํจ)๊ณผ ๋ชจ๋ธ ํผํ
๋ฃฐ ์น์ธ๋ฟ์
๋๋ค.
|
|
658
|
+
|
|
588
659
|
### v3.27.0 (2026-09-04)
|
|
589
660
|
- **๋ฌธ์ ๊ฒฝ๋ก๋ฅผ ํ๋กฌํํธ์ ์ ์ผ๋ฉด ์ด์ ์ค์ ๋ก ๊ฑธ๋ฆฝ๋๋ค.** 3.26.x ์ `PreToolUse(Read)` ํ
์ ์ ์ ๋ชฉํํ ํ์์ ๋ฟ์ง ๋ชปํ์ต๋๋ค. Claude Code ๊ฐ pptxยทxlsxยทdocx ๋ฅผ ์ด์ง ํ์ผ์ด๋ผ๋ฉฐ ํ
๋ณด๋ค ๋จผ์ ๊ฑฐ๋ถํ๊ธฐ ๋๋ฌธ์
๋๋ค(์ค์ธก: `.pdf` Read ๋ ํ
์ด ์คํ๋๊ณ `.pptx` Read ๋ ํ
๊ธฐ๋ก์ด ๋จ์ง ์์ต๋๋ค). ๊ฐ์
์ง์ ์ `UserPromptSubmit` ์ผ๋ก ๋ํ, ํ๋กฌํํธ์ ์ ํ ๊ฒฝ๋ก๋ฅผ ๋ณํํ ๋ค ๋ณํ๋ณธ ๊ฒฝ๋ก๋ฅผ ์ปจํ
์คํธ๋ก ๋ฃ์ต๋๋ค. `@๊ฒฝ๋ก`ยท๋ฐ์ดํยท์๋ ๊ฒฝ๋ก๋ฅผ ๋ชจ๋ ์ธ์ํฉ๋๋ค.
|
|
590
661
|
- **์ธ์
์์ ์๋ด๋ฌธ์ ์ถ๊ฐํ์ต๋๋ค.** ๋ ๊ฐ์ง๋ฅผ ๋ชจ๋ธ์๊ฒ ์๋ฆฝ๋๋ค. `Read` ๊ฐ ์ด์ง ํ์ผ์ด๋ผ๋ฉฐ ๊ฑฐ๋ถํ๋ฉด `doc2md <๊ฒฝ๋ก>` ๋ฅผ ์คํํ ๊ฒ, ๊ทธ๋ฆฌ๊ณ ์ฌ์ฉ์๊ฐ ๋ฌธ์๋ฅผ ์ง์ ์ฒจ๋ถํ์ผ๋ฉด ๋ค์๋ถํฐ ๊ฒฝ๋ก๋ก ๋ฌ๋ผ๊ณ ์๋ดํ ๊ฒ์
๋๋ค. ์ฒจ๋ถ๋ ๋ด์ฉ ์ ์ฒด๊ฐ ์ปจํ
์คํธ์ ์ค๋ ค ํ ํฐ์ ํฌ๊ฒ ์ฐ๋๋ฐ, ์ด๋ค ํ
์ด๋ฒคํธ๋ ์ฒจ๋ถ ๋ด์ฉ์ ๋ฐ์ง ๋ชปํด ๋๊ตฌ๊ฐ ๊ฐ์
ํ ๋ฐฉ๋ฒ์ด ์์ต๋๋ค.
|
package/bin/cli.js
CHANGED
|
@@ -87,9 +87,43 @@ function readUpdateChip() {
|
|
|
87
87
|
const KNOWN_SUBCOMMANDS = new Set([
|
|
88
88
|
'last', 'brief', 'history', 'handoff', 'install', 'uninstall', 'mode', 'korean',
|
|
89
89
|
'doc2md', 'harness', 'route-scan', 'compact-window', 'update-check', 'upgrade',
|
|
90
|
+
'seed',
|
|
90
91
|
]);
|
|
91
92
|
|
|
93
|
+
const USAGE = `claude-token-saver โ Claude Code token usage, cache health, and model routing
|
|
94
|
+
|
|
95
|
+
Usage:
|
|
96
|
+
claude-token-saver default report (last 30 days)
|
|
97
|
+
claude-token-saver --days 7 last 7 days
|
|
98
|
+
claude-token-saver --format json JSON output
|
|
99
|
+
claude-token-saver --format csv CSV output
|
|
100
|
+
claude-token-saver --project myproj filter by project
|
|
101
|
+
claude-token-saver route-scan detect recurring easy work โ delegation candidates
|
|
102
|
+
claude-token-saver install set up skill/hooks/statusline
|
|
103
|
+
claude-token-saver install --yes take the defaults without asking
|
|
104
|
+
claude-token-saver uninstall remove everything install added
|
|
105
|
+
claude-token-saver harness check score the harness setup in CLAUDE.md
|
|
106
|
+
claude-token-saver harness analyze run the harness transcript analysis manually
|
|
107
|
+
claude-token-saver last most recent warning + how to handle it
|
|
108
|
+
claude-token-saver history recent warning transitions
|
|
109
|
+
claude-token-saver handoff write a session handoff file
|
|
110
|
+
claude-token-saver upgrade install the latest release
|
|
111
|
+
claude-token-saver --install-hook install cache-monitor PostToolUse hook
|
|
112
|
+
claude-token-saver --uninstall-hook remove that hook
|
|
113
|
+
claude-token-saver --statusline one-line output for Claude Code statusline
|
|
114
|
+
--verbose / --no-color / --icon / --no-timer / --single-line
|
|
115
|
+
|
|
116
|
+
Run any subcommand with --help for its own options where available.
|
|
117
|
+
`;
|
|
118
|
+
|
|
92
119
|
async function main() {
|
|
120
|
+
// Help must never fall through to the default report โ that runs a full
|
|
121
|
+
// 30-day scan, which is the opposite of what someone asking for help wants.
|
|
122
|
+
if (hasFlag('--help') || hasFlag('-h') || args[0] === 'help') {
|
|
123
|
+
process.stdout.write(USAGE);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
|
|
93
127
|
// A hook invocation names a subcommand and expects either silence or that
|
|
94
128
|
// subcommand's own protocol on stdout. If this build does not have the
|
|
95
129
|
// subcommand โ an older global install against a newer settings.json, which
|
|
@@ -191,6 +225,13 @@ async function main() {
|
|
|
191
225
|
return (await import('../src/commands/doc2md.js')).run({ args, hasFlag });
|
|
192
226
|
}
|
|
193
227
|
|
|
228
|
+
// Subcommand: seed โ register the bundled starter rules (model-fitting
|
|
229
|
+
// presets + curated ratchet rules), one answer at a time.
|
|
230
|
+
// claude-token-saver seed | seed accept <id> --global|--project | seed skip <id>
|
|
231
|
+
if (args[0] === 'seed') {
|
|
232
|
+
return (await import('../src/commands/seed.js')).run({ args, hasFlag });
|
|
233
|
+
}
|
|
234
|
+
|
|
194
235
|
// Subcommand: harness โ manage the project's CLAUDE.md harness rules.
|
|
195
236
|
// claude-token-saver harness init # write CLAUDE.md (5 sections) + ratchet.md
|
|
196
237
|
// claude-token-saver harness uninit # remove harness block from CLAUDE.md (backup kept)
|
|
@@ -466,14 +507,14 @@ async function main() {
|
|
|
466
507
|
}
|
|
467
508
|
|
|
468
509
|
// For statusline: attach a single-word chip only when there's something
|
|
469
|
-
// actionable right now.
|
|
470
|
-
// if the most recent session
|
|
510
|
+
// actionable right now. A context over the 500k warn line is always shown;
|
|
511
|
+
// otherwise only fire if the most recent session appears in the spike list.
|
|
471
512
|
let spikeChip = null;
|
|
472
513
|
let chipDetail = null;
|
|
473
514
|
if (format === 'statusline') {
|
|
474
|
-
if (contextWindow.
|
|
515
|
+
if (contextWindow.overWarn) {
|
|
475
516
|
spikeChip = chipForIssues([], contextWindow);
|
|
476
|
-
chipDetail = `Single-request context exceeded
|
|
517
|
+
chipDetail = `Single-request context exceeded 500k (max ${Math.round(contextWindow.maxContext / 1000)}k tokens)`;
|
|
477
518
|
} else {
|
|
478
519
|
const recentSession = sessions
|
|
479
520
|
.slice()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-token-saver",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0",
|
|
4
4
|
"description": "Route the easy work your expensive Claude model keeps repeating down to haiku/sonnet โ post-hoc session analysis, no realtime router, no extra LLM calls.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"note": [
|
|
3
|
+
"Curated tier-delegation presets bundled with the package โ the model-fitting",
|
|
4
|
+
"counterpart to presets/ratchet-rules.md. These were promoted from the author's",
|
|
5
|
+
"own route-scan candidates over months of real sessions, then stripped of the",
|
|
6
|
+
"originating examples, project paths and recurrence counts: what carries over is",
|
|
7
|
+
"the shape of the work (category, tier, agent, cap), not the author's transcripts.",
|
|
8
|
+
"Each entry is offered one at a time at session start; nothing is registered",
|
|
9
|
+
"without the user saying yes. Caps are the defaults a scan would calibrate to;",
|
|
10
|
+
"later scans refresh the stats on whatever the user accepts.",
|
|
11
|
+
"Rule sentences are composed at accept time from modelRuleBaseText() so that a",
|
|
12
|
+
"reworded template never leaves this file stale."
|
|
13
|
+
],
|
|
14
|
+
"presets": [
|
|
15
|
+
{
|
|
16
|
+
"id": "run-t2",
|
|
17
|
+
"tier": "T2",
|
|
18
|
+
"category": "run",
|
|
19
|
+
"label": "๋ช
๋ น ์คํ (๋น๋ยทํ
์คํธยทgit)",
|
|
20
|
+
"labelEn": "running commands (build/test/git)",
|
|
21
|
+
"agent": "haiku-runner",
|
|
22
|
+
"example": "npm test ๋๋ ค๋ด",
|
|
23
|
+
"exampleEn": "run npm test",
|
|
24
|
+
"budget": { "calls": 8, "out": 1500 }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "run-t1",
|
|
28
|
+
"tier": "T1",
|
|
29
|
+
"category": "run",
|
|
30
|
+
"label": "๋ช
๋ น ์คํ (๋น๋ยทํ
์คํธยทgit)",
|
|
31
|
+
"labelEn": "running commands (build/test/git)",
|
|
32
|
+
"agent": "sonnet",
|
|
33
|
+
"example": "๋น๋ํ๊ณ ์คํจํ ํ
์คํธ๋ง ๋ณด์ฌ์ค",
|
|
34
|
+
"exampleEn": "build it and show only the failing tests",
|
|
35
|
+
"budget": { "calls": null, "out": 6000 }
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "explore-t2",
|
|
39
|
+
"tier": "T2",
|
|
40
|
+
"category": "explore",
|
|
41
|
+
"label": "ํ์ยท์กฐํ (ํ์ผ/๊ฐ ์ฐพ๊ธฐ)",
|
|
42
|
+
"labelEn": "lookup (finding files/values)",
|
|
43
|
+
"agent": "haiku-explore",
|
|
44
|
+
"example": "์ด ์ค์ ๊ฐ ์ด๋ ํ์ผ์ ์์ด?",
|
|
45
|
+
"exampleEn": "which file holds this config value?",
|
|
46
|
+
"budget": { "calls": 8, "out": 1500 }
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "explore-t1",
|
|
50
|
+
"tier": "T1",
|
|
51
|
+
"category": "explore",
|
|
52
|
+
"label": "ํ์ยท์กฐํ (ํ์ผ/๊ฐ ์ฐพ๊ธฐ)",
|
|
53
|
+
"labelEn": "lookup (finding files/values)",
|
|
54
|
+
"agent": "sonnet",
|
|
55
|
+
"example": "์ด ํจ์๋ฅผ ํธ์ถํ๋ ๊ณณ ์ ๋ถ ์ฐพ์์ค",
|
|
56
|
+
"exampleEn": "find every caller of this function",
|
|
57
|
+
"budget": { "calls": null, "out": 6000 }
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "check-t2",
|
|
61
|
+
"tier": "T2",
|
|
62
|
+
"category": "check",
|
|
63
|
+
"label": "์ํ ํ์ธยท๊ฒ์ฆ",
|
|
64
|
+
"labelEn": "status checks / verification",
|
|
65
|
+
"agent": "haiku-explore",
|
|
66
|
+
"example": "์ง๊ธ ๋ฐฐํฌ๋ ๋ฒ์ ์ด ๋ญ์ง ํ์ธํด์ค",
|
|
67
|
+
"exampleEn": "check which version is deployed right now",
|
|
68
|
+
"budget": { "calls": 8, "out": 1500 }
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "check-t1",
|
|
72
|
+
"tier": "T1",
|
|
73
|
+
"category": "check",
|
|
74
|
+
"label": "์ํ ํ์ธยท๊ฒ์ฆ",
|
|
75
|
+
"labelEn": "status checks / verification",
|
|
76
|
+
"agent": "sonnet",
|
|
77
|
+
"example": "๋ง์ด๊ทธ๋ ์ด์
์ด ์ค์ ๋ก ์ ์ฉ๋๋์ง ํ์ธํด์ค",
|
|
78
|
+
"exampleEn": "verify the migration actually applied",
|
|
79
|
+
"budget": { "calls": null, "out": 6000 }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "paste-t2",
|
|
83
|
+
"tier": "T2",
|
|
84
|
+
"category": "paste",
|
|
85
|
+
"label": "๋ถ์ฌ๋ฃ์ ํ๋ฉดยท๋ก๊ทธ ์ง๋ฌธ",
|
|
86
|
+
"labelEn": "questions about pasted screens/logs",
|
|
87
|
+
"agent": "haiku-explore",
|
|
88
|
+
"example": "์ด ์๋ฌ ๋ก๊ทธ๋ ๋ฌด์จ ๋ป์ด์ผ?",
|
|
89
|
+
"exampleEn": "what does this error log mean?",
|
|
90
|
+
"budget": { "calls": 8, "out": 1500 }
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "paste-t1",
|
|
94
|
+
"tier": "T1",
|
|
95
|
+
"category": "paste",
|
|
96
|
+
"label": "๋ถ์ฌ๋ฃ์ ํ๋ฉดยท๋ก๊ทธ ์ง๋ฌธ",
|
|
97
|
+
"labelEn": "questions about pasted screens/logs",
|
|
98
|
+
"agent": "sonnet",
|
|
99
|
+
"example": "์ด ์คํํธ๋ ์ด์ค์์ ์ด๋ ๋ชจ๋์ด ์ฃฝ์ ๊ฑด์ง ์ง์ด์ค",
|
|
100
|
+
"exampleEn": "point out which module failed in this stack trace",
|
|
101
|
+
"budget": { "calls": null, "out": 8000 }
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "read-t2",
|
|
105
|
+
"tier": "T2",
|
|
106
|
+
"category": "read",
|
|
107
|
+
"label": "์ฝ๊ธฐยท์์ฝยท์ค๋ช
",
|
|
108
|
+
"labelEn": "reading / summarizing / explaining",
|
|
109
|
+
"agent": "haiku-explore",
|
|
110
|
+
"example": "์ด README ์์ฝํด์ค",
|
|
111
|
+
"exampleEn": "summarize this README",
|
|
112
|
+
"budget": { "calls": 8, "out": 1900 }
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"note": [
|
|
3
|
+
"Curated ratchet rules bundled with the package โ promoted from mistakes that",
|
|
4
|
+
"actually recurred in the author's sessions, not from theory. `harness pull`",
|
|
5
|
+
"registers the whole set at once; `seed` offers them one at a time and records",
|
|
6
|
+
"each answer. Both read this file, so there is one source for the wording.",
|
|
7
|
+
"Each rule carries both languages because the text is injected into the model's",
|
|
8
|
+
"context, where a Korean-only rule would steer an English session into Korean.",
|
|
9
|
+
"Ids are derived from the `ko` text (the canonical one), so a rule keeps its",
|
|
10
|
+
"identity โ and a user's 'no' โ when the English wording is revised."
|
|
11
|
+
],
|
|
12
|
+
"rules": [
|
|
13
|
+
{
|
|
14
|
+
"ko": "์น fetch/search์์ robotsยทUA ์ฐจ๋จ('unable to fetch' ๋ฑ)์ด ๋ฐ์ํ๋ฉด โ curl์ ๋ธ๋ผ์ฐ์ UA(Mozilla/5.0 ... Chrome/...) ํค๋๋ฅผ ๋ถ์ฌ ์ฌ์๋. reddit ๋ฑ์ .json ์๋ํฌ์ธํธ + UA ์กฐํฉ์ผ๋ก ์ ๊ทผ ๊ฐ๋ฅ",
|
|
15
|
+
"en": "When a web fetch/search is blocked by robots or user-agent checks ('unable to fetch' and similar) โ retry with curl carrying a browser UA header (Mozilla/5.0 ... Chrome/...). Sites like reddit also answer on their .json endpoints with that UA"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"ko": "ratchet ๋ฃฐ promote ํธ์ถ ์ง์ ์ฌ์ฉ์์๊ฒ scope(project/global)๋ฅผ ๋จผ์ ๋ฌป๋๋ค โ Bash ํ๊ฒฝ์ non-TTY๋ผ CLI readline ํ๋กฌํํธ๊ฐ ์ ๋จ๋ฏ๋ก, ํธ์ถ์(LLM)๊ฐ ๋์ ๋ฌป๊ณ --project/--global ํ๋๊ทธ๋ฅผ ๋ช
์ํด ์คํ",
|
|
19
|
+
"en": "Ask the user for the scope (project or global) before calling ratchet promote โ the Bash environment is non-TTY, so the CLI's readline prompt never appears; the caller (the model) has to ask and pass --project/--global explicitly"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"ko": "์๋ํ ๋๊ตฌ๊ฐ grepยท์ ๊ท์์ผ๋ก ์ฐพ๋ ๋ง์ปค ํ
์คํธ(ํค๋ยท์ต์ปคยทํค์๋ ๋ผ์ธ)๋ ๋ฆฌํฉํฐ๋งยท์์ถยท์์ ๊ธ์ง โ ์ ํ ๋งค์นญ ๊ฒ์ถ์ ํ ๊ธ์๋ง ๋ฐ๋์ด๋ ๊นจ์ง",
|
|
23
|
+
"en": "Never refactor, compress or reword marker text that an automated tool finds by grep or regex (headings, anchors, keyword lines) โ exact-match detection breaks on a single changed character"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"ko": "์๋ํ ์ค๊ณ์์ vision/screenshot ๋ฃจํ๊ฐ ๋ณด์ด๋ฉด โ ํธ์ถ ๊ฐ๋ฅํ ํจ์ยทAPIยทMCP tool๋ถํฐ ์ฐพ๋๋ค. ํต์ ๊ฐ๋ฅํ ๋ด๋ถ ๋๊ตฌ๋ ๋ฌด์กฐ๊ฑด API, ํต์ ๋ถ๊ฐ ์ธ๋ถ SaaS๋ง vision ์ฐจ์ ์ฑ
. ์ธํฐํ์ด์ค๋ฅผ ๋ฐ๊พผ ๋ค์ ๋ชจ๋ธ์ ๋ด๋ฆฐ๋ค โ ๊ฑฐ๊พธ๋ก ๊ฐ๋ฉด ํ ํฐ ํญ๋ฐ",
|
|
27
|
+
"en": "When an automation design calls for a vision/screenshot loop โ look for a callable function, API or MCP tool first. Anything you control gets an API; vision is the fallback only for external SaaS you cannot change. Fix the interface before lowering the model โ doing it the other way round explodes the token cost"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"ko": "์
๋ ฅ ๋ฐ์ดํฐ(ground-truth) ๋ณ๊ฒฝ ์ ๊ทธ์ ์์กดํ๋ ๋ชจ๋ ํ์ ์์ฐ์ ๋๊น์ง ์ฌ์์ฑํ๋ค โ ์ค๊ฐ ๋จ๊ณ๋ฅผ ์๋ตํ๋ฉด stale ์ฐ์ถ๋ฌผ์ด ์ ์
๋ ฅ ์์ ์นํ ๊ฒฐ๊ณผ๊ฐ ๊นจ์ง",
|
|
31
|
+
"en": "When the ground-truth input changes, regenerate every derived asset all the way through โ skipping an intermediate step leaves a stale artifact sitting on top of the new input and the result breaks"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"ko": "ํ์ยท์กฐํยท์ํ ํ์ธยท๋ช
๋ น ์คํ ๊ฐ์ ๋จ์ ์์ฒญ์ `model: haiku` ์๋ธ์์ด์ ํธ๋ก ์์ํด ์์ ๋ชจ๋ธ ํ ํฐ์ ์๋๋ค (์ฝ๊ธฐ ์ ์ฉ preset ์์ด์ ํธ๊ฐ ์ด๋ฏธ ์์ผ๋ฉด ๊ทธ๊ฑธ ์ฐ๊ณ , ์์ผ๋ฉด ํฐ์ด๋ง ๋ด๋ ค์ ์์)",
|
|
35
|
+
"en": "Delegate simple requests โ lookup, status checks, running commands โ to a `model: haiku` subagent to keep the expensive model's tokens for real work (use an existing read-only preset agent when there is one; otherwise delegate with the tier lowered)"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
package/src/advice.js
CHANGED
|
@@ -514,6 +514,8 @@ export const ISSUE_TIPS = {
|
|
|
514
514
|
* need a fallback so history.js can still surface the right tip.
|
|
515
515
|
*/
|
|
516
516
|
export const CHIP_TO_CODES = {
|
|
517
|
+
'โ Ctx 500k+': ['LARGE_INPUT_PER_REQUEST'],
|
|
518
|
+
// Legacy chip name (pre-v3.32, when the threshold was 200k).
|
|
517
519
|
'โ Ctx 200k+': ['LARGE_INPUT_PER_REQUEST'],
|
|
518
520
|
// Legacy chip name (pre-v2.18) โ kept so `last`/`history` can still resolve
|
|
519
521
|
// codes from history files written by older versions.
|
|
@@ -545,11 +547,12 @@ export const CAP_TIPS = {
|
|
|
545
547
|
* shown to a global audience.
|
|
546
548
|
*/
|
|
547
549
|
export function chipForIssues(issues, contextWindow) {
|
|
548
|
-
// Fires on *actual usage* (a real request carried
|
|
549
|
-
// on the model merely supporting 1M
|
|
550
|
-
//
|
|
551
|
-
//
|
|
552
|
-
|
|
550
|
+
// Fires on *actual usage* (a real request carried more than
|
|
551
|
+
// CONTEXT_WARN_TOKENS), not on the model merely supporting 1M. The old 200k
|
|
552
|
+
// line fired on a brand-new session โ system prompt plus a couple of file
|
|
553
|
+
// reads already clears it โ so it warned constantly and told nobody
|
|
554
|
+
// anything. 500k is where the per-turn re-billing is worth interrupting for.
|
|
555
|
+
if (contextWindow?.overWarn) return 'โ Ctx 500k+';
|
|
553
556
|
const codes = issues.map((i) => i.code);
|
|
554
557
|
if (codes.includes('LARGE_INPUT_PER_REQUEST')) return 'โ Input spike';
|
|
555
558
|
if (codes.includes('BUCKET_5M_DOMINANT') || codes.includes('BUCKET_5M_DOMINANT_GATEWAY')) return 'โ 5m TTL';
|
package/src/brief.js
CHANGED
|
@@ -227,7 +227,7 @@ export async function runBrief({ sessionId, transcriptPath, now = Date.now() })
|
|
|
227
227
|
for (const [kind, x] of fresh) {
|
|
228
228
|
items.push(kind === 'route'
|
|
229
229
|
? `์ ์์ ํ๋ณด๊ฐ ๊ฐ์ง๋์์ต๋๋ค โ "${x.label}" ์ ํ ${x.count}ํ ๋ฐ๋ณต(statusline์ route? R${x.id} ์นฉ). ๋ฑ๋ก: claude-token-saver harness promote R${x.id} --project|--global (์ ์ฉ ๋ฒ์๋ ์ฌ์ฉ์์๊ฒ ํ์ธ) / ๋ฌด์: route-scan dismiss ${x.id}`
|
|
230
|
-
: `์น์ธ๋ ์์ ๋ฃฐ์ ์ต๊ทผ ์๋ฌ์จ์ด ๊ธฐ์ค(20%)์ ๋์์ต๋๋ค โ "${x.label}" (statusline์ rule-health ์นฉ). ์กฐ๊ฑด ์ขํ๊ธฐ/์ ๊ฑฐ๋ฅผ ์ฌ์ฉ์์ ์์ํ์ธ์: claude-token-saver route-scan rules`);
|
|
230
|
+
: `์น์ธ๋ ์์ ๋ฃฐ์ ์ต๊ทผ ์๋ฌ์จ์ด ๊ธฐ์ค(20%)์ ๋์์ต๋๋ค โ "${x.label}" (${x.healthSource === 'delegated' ? `์์ ์คํ ${x.delegatedRuns}๊ฑด ์ค ์๋ฌ์จ ${Math.round((x.delegatedErrRate || 0) * 100)}%` : `์ ์ฌ ์ํผ์๋ ๊ธฐ์ค ์๋ฌ์จ ${Math.round((x.errRate || 0) * 100)}%`}, statusline์ rule-health ์นฉ). ์กฐ๊ฑด ์ขํ๊ธฐ/์ ๊ฑฐ๋ฅผ ์ฌ์ฉ์์ ์์ํ์ธ์: claude-token-saver route-scan rules`);
|
|
231
231
|
}
|
|
232
232
|
s.briefed = [...briefed];
|
|
233
233
|
} catch { /* caches unreadable โ ctx briefing above still applies */ }
|