bigpowers 2.45.2 → 2.45.3
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/.pi/package.json +1 -1
- package/CHANGELOG.md +7 -0
- package/CLAUDE.md +238 -0
- package/package.json +1 -1
package/.pi/package.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.45.3](https://github.com/danielvm-git/bigpowers/compare/v2.45.2...v2.45.3) (2026-07-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **sync:** sync generated CLAUDE.md and opencode.json artifacts ([f018e27](https://github.com/danielvm-git/bigpowers/commit/f018e27cf71d61190bf58c1ef884e100e15a8aee))
|
|
7
|
+
|
|
1
8
|
## [2.45.2](https://github.com/danielvm-git/bigpowers/compare/v2.45.1...v2.45.2) (2026-07-03)
|
|
2
9
|
|
|
3
10
|
|
package/CLAUDE.md
CHANGED
|
@@ -64,3 +64,241 @@ Before any task, run this sequence — not optional:
|
|
|
64
64
|
- Run tests after every change. Show evidence before declaring done.
|
|
65
65
|
- One clarifying question beats a wrong assumption baked into 200 lines.
|
|
66
66
|
- All written output (plans, specs, investigations) goes in specs/.
|
|
67
|
+
|
|
68
|
+
## bts toolchain
|
|
69
|
+
|
|
70
|
+
`bts` is installed. Prefer its verbs over ad-hoc shell commands.
|
|
71
|
+
|
|
72
|
+
| Task | Command | Avoid |
|
|
73
|
+
|------|---------|-------|
|
|
74
|
+
| Search code | `bts find --print <pattern>` | grep / find / cat |
|
|
75
|
+
| Interactive search | `bts find <pattern>` | manual grep pipes |
|
|
76
|
+
| Compress for context | `bts compress <file>` or `cmd \| bts compress` | summarising by hand |
|
|
77
|
+
| Repo map | `bts map` | listing files by hand |
|
|
78
|
+
| Library docs | `bts docs <lib>` | guessing from training data |
|
|
79
|
+
| Package source | `bts src <pkg>` | git clone |
|
|
80
|
+
| Toolchain health | `bts doctor` | which / command -v |
|
|
81
|
+
|
|
82
|
+
**Rules**
|
|
83
|
+
- Search with `bts find` before opening files to locate a symbol or pattern.
|
|
84
|
+
- Pipe anything > 200 lines through `bts compress` before adding to context.
|
|
85
|
+
- Run `bts map` when asked for a repo overview.
|
|
86
|
+
- Use `bts docs <lib>` before answering questions about library APIs.
|
|
87
|
+
- If a tool is missing, say so and run `bts doctor` — do not silently substitute.
|
|
88
|
+
|
|
89
|
+
<!-- BEGIN sqz-claude-guidance (auto-installed by sqz init; remove this block to disable) -->
|
|
90
|
+
|
|
91
|
+
## sqz — Context Compression (READ FIRST)
|
|
92
|
+
|
|
93
|
+
sqz is installed in this project. It compresses tool output so large
|
|
94
|
+
files, long logs, and verbose command output cost far fewer tokens.
|
|
95
|
+
There are **two ways** sqz is wired in, and you should prefer each
|
|
96
|
+
one in the situations below.
|
|
97
|
+
|
|
98
|
+
### Preferred tools (MCP)
|
|
99
|
+
|
|
100
|
+
The `sqz-mcp` server is registered in this project's MCP config. It
|
|
101
|
+
exposes three read-only tools that compress their output through the
|
|
102
|
+
sqz pipeline:
|
|
103
|
+
|
|
104
|
+
- **`sqz_read_file`** — read a file from disk and return a compressed
|
|
105
|
+
view. **PREFER this over the built-in `Read` tool** for any file
|
|
106
|
+
larger than ~2KB or any file you might read more than once in the
|
|
107
|
+
same session. Repeat reads return a 13-token `§ref:HASH§` reference
|
|
108
|
+
instead of the full content.
|
|
109
|
+
|
|
110
|
+
- **`sqz_grep`** — search files for a literal string or regex.
|
|
111
|
+
**PREFER this over the built-in `Grep`** for anything that might
|
|
112
|
+
match more than a handful of lines. Caps at 200 matches by default;
|
|
113
|
+
raise with `max_matches` if needed.
|
|
114
|
+
|
|
115
|
+
- **`sqz_list_dir`** — list a directory. Skips `.git`, `node_modules`,
|
|
116
|
+
`target`, `dist`, `build`, `vendor`, `__pycache__` so the output
|
|
117
|
+
stays focused. **PREFER this over `ls -la` via Bash** when you want
|
|
118
|
+
to see a project layout.
|
|
119
|
+
|
|
120
|
+
The built-in `Read`, `Grep`, `Glob` tools remain available. Use them for:
|
|
121
|
+
- Tiny config files (<1KB) where compression can't help.
|
|
122
|
+
- Byte-exact reads you'll hash or diff (lockfiles, signatures).
|
|
123
|
+
- Globbing (sqz has no glob tool; `Glob` is still the right choice).
|
|
124
|
+
|
|
125
|
+
### Bash commands (hooked automatically)
|
|
126
|
+
|
|
127
|
+
When you run a shell command through the `Bash` tool, a PreToolUse hook
|
|
128
|
+
rewrites it to pipe output through `sqz compress`. This is transparent:
|
|
129
|
+
you don't need to remember to add anything, but it's useful to know
|
|
130
|
+
that these commands get compressed automatically:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
git status # → git status 2>&1 | sqz compress --cmd git
|
|
134
|
+
cargo test # → cargo test 2>&1 | sqz compress --cmd cargo
|
|
135
|
+
docker ps # → docker ps 2>&1 | sqz compress --cmd docker
|
|
136
|
+
kubectl get pods # → kubectl get pods 2>&1 | sqz compress --cmd kubectl
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The rewrite is skipped for interactive commands (`vim`, `ssh`,
|
|
140
|
+
`python`), compound commands (`a && b`, `a > file.txt`), and anything
|
|
141
|
+
already going through sqz.
|
|
142
|
+
|
|
143
|
+
### Escape hatch — when you see a `§ref:HASH§` token
|
|
144
|
+
|
|
145
|
+
If tool output contains a `§ref:a1b2c3d4§` token and you need the full
|
|
146
|
+
content it points at, resolve it. Three equivalent ways:
|
|
147
|
+
|
|
148
|
+
- Shell: `/Users/danielvm/.local/bin/sqz expand a1b2c3d4` (or paste the whole token
|
|
149
|
+
`/Users/danielvm/.local/bin/sqz expand §ref:a1b2c3d4§`).
|
|
150
|
+
- MCP tool: call `expand` with `{ "prefix": "a1b2c3d4" }`.
|
|
151
|
+
- To get uncompressed output for one command: prefix it with
|
|
152
|
+
`SQZ_NO_DEDUP=1` (e.g. `SQZ_NO_DEDUP=1 git log | sqz compress`).
|
|
153
|
+
|
|
154
|
+
If the compressed output is actively making the task harder (looping
|
|
155
|
+
on refs, small retries replacing one big read), call the `passthrough`
|
|
156
|
+
MCP tool to get raw text.
|
|
157
|
+
|
|
158
|
+
### When NOT to use sqz tools
|
|
159
|
+
|
|
160
|
+
- Writing or editing files — use the built-in `Write`/`Edit` tools.
|
|
161
|
+
sqz has no write tools (by design; see issue #5 follow-up).
|
|
162
|
+
- Running commands interactively or in watch mode.
|
|
163
|
+
- Reading very small files (<1KB) where compression can't help.
|
|
164
|
+
|
|
165
|
+
<!-- END sqz-claude-guidance -->
|
|
166
|
+
|
|
167
|
+
<!-- rtk-instructions v2 -->
|
|
168
|
+
# RTK (Rust Token Killer) - Token-Optimized Commands
|
|
169
|
+
|
|
170
|
+
## Golden Rule
|
|
171
|
+
|
|
172
|
+
**Always prefix commands with `rtk`**. If RTK has a dedicated filter, it uses it. If not, it passes through unchanged. This means RTK is always safe to use.
|
|
173
|
+
|
|
174
|
+
**Important**: Even in command chains with `&&`, use `rtk`:
|
|
175
|
+
```bash
|
|
176
|
+
# ❌ Wrong
|
|
177
|
+
git add . && git commit -m "msg" && git push
|
|
178
|
+
|
|
179
|
+
# ✅ Correct
|
|
180
|
+
rtk git add . && rtk git commit -m "msg" && rtk git push
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## RTK Commands by Workflow
|
|
184
|
+
|
|
185
|
+
### Build & Compile (80-90% savings)
|
|
186
|
+
```bash
|
|
187
|
+
rtk cargo build # Cargo build output
|
|
188
|
+
rtk cargo check # Cargo check output
|
|
189
|
+
rtk cargo clippy # Clippy warnings grouped by file (80%)
|
|
190
|
+
rtk tsc # TypeScript errors grouped by file/code (83%)
|
|
191
|
+
rtk lint # ESLint/Biome violations grouped (84%)
|
|
192
|
+
rtk prettier --check # Files needing format only (70%)
|
|
193
|
+
rtk next build # Next.js build with route metrics (87%)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Test (60-99% savings)
|
|
197
|
+
```bash
|
|
198
|
+
rtk cargo test # Cargo test failures only (90%)
|
|
199
|
+
rtk go test # Go test failures only (90%)
|
|
200
|
+
rtk jest # Jest failures only (99.5%)
|
|
201
|
+
rtk vitest # Vitest failures only (99.5%)
|
|
202
|
+
rtk playwright test # Playwright failures only (94%)
|
|
203
|
+
rtk pytest # Python test failures only (90%)
|
|
204
|
+
rtk rake test # Ruby test failures only (90%)
|
|
205
|
+
rtk rspec # RSpec test failures only (60%)
|
|
206
|
+
rtk test <cmd> # Generic test wrapper - failures only
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Git (59-80% savings)
|
|
210
|
+
```bash
|
|
211
|
+
rtk git status # Compact status
|
|
212
|
+
rtk git log # Compact log (works with all git flags)
|
|
213
|
+
rtk git diff # Compact diff (80%)
|
|
214
|
+
rtk git show # Compact show (80%)
|
|
215
|
+
rtk git add # Ultra-compact confirmations (59%)
|
|
216
|
+
rtk git commit # Ultra-compact confirmations (59%)
|
|
217
|
+
rtk git push # Ultra-compact confirmations
|
|
218
|
+
rtk git pull # Ultra-compact confirmations
|
|
219
|
+
rtk git branch # Compact branch list
|
|
220
|
+
rtk git fetch # Compact fetch
|
|
221
|
+
rtk git stash # Compact stash
|
|
222
|
+
rtk git worktree # Compact worktree
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Note: Git passthrough works for ALL subcommands, even those not explicitly listed.
|
|
226
|
+
|
|
227
|
+
### GitHub (26-87% savings)
|
|
228
|
+
```bash
|
|
229
|
+
rtk gh pr view <num> # Compact PR view (87%)
|
|
230
|
+
rtk gh pr checks # Compact PR checks (79%)
|
|
231
|
+
rtk gh run list # Compact workflow runs (82%)
|
|
232
|
+
rtk gh issue list # Compact issue list (80%)
|
|
233
|
+
rtk gh api # Compact API responses (26%)
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### JavaScript/TypeScript Tooling (70-90% savings)
|
|
237
|
+
```bash
|
|
238
|
+
rtk pnpm list # Compact dependency tree (70%)
|
|
239
|
+
rtk pnpm outdated # Compact outdated packages (80%)
|
|
240
|
+
rtk pnpm install # Compact install output (90%)
|
|
241
|
+
rtk npm run <script> # Compact npm script output
|
|
242
|
+
rtk npx <cmd> # Compact npx command output
|
|
243
|
+
rtk prisma # Prisma without ASCII art (88%)
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Files & Search (60-75% savings)
|
|
247
|
+
```bash
|
|
248
|
+
rtk ls <path> # Tree format, compact (65%)
|
|
249
|
+
rtk read <file> # Code reading with filtering (60%)
|
|
250
|
+
rtk grep <pattern> # Search grouped by file (75%). Format flags (-c, -l, -L, -o, -Z) run raw.
|
|
251
|
+
rtk find <pattern> # Find grouped by directory (70%)
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Analysis & Debug (70-90% savings)
|
|
255
|
+
```bash
|
|
256
|
+
rtk err <cmd> # Filter errors only from any command
|
|
257
|
+
rtk log <file> # Deduplicated logs with counts
|
|
258
|
+
rtk json <file> # JSON structure without values
|
|
259
|
+
rtk deps # Dependency overview
|
|
260
|
+
rtk env # Environment variables compact
|
|
261
|
+
rtk summary <cmd> # Smart summary of command output
|
|
262
|
+
rtk diff # Ultra-compact diffs
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Infrastructure (85% savings)
|
|
266
|
+
```bash
|
|
267
|
+
rtk docker ps # Compact container list
|
|
268
|
+
rtk docker images # Compact image list
|
|
269
|
+
rtk docker logs <c> # Deduplicated logs
|
|
270
|
+
rtk kubectl get # Compact resource list
|
|
271
|
+
rtk kubectl logs # Deduplicated pod logs
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Network (65-70% savings)
|
|
275
|
+
```bash
|
|
276
|
+
rtk curl <url> # Compact HTTP responses (70%)
|
|
277
|
+
rtk wget <url> # Compact download output (65%)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Meta Commands
|
|
281
|
+
```bash
|
|
282
|
+
rtk gain # View token savings statistics
|
|
283
|
+
rtk gain --history # View command history with savings
|
|
284
|
+
rtk discover # Analyze Claude Code sessions for missed RTK usage
|
|
285
|
+
rtk proxy <cmd> # Run command without filtering (for debugging)
|
|
286
|
+
rtk init # Add RTK instructions to CLAUDE.md
|
|
287
|
+
rtk init --global # Add RTK to ~/.claude/CLAUDE.md
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Token Savings Overview
|
|
291
|
+
|
|
292
|
+
| Category | Commands | Typical Savings |
|
|
293
|
+
|----------|----------|-----------------|
|
|
294
|
+
| Tests | vitest, playwright, cargo test | 90-99% |
|
|
295
|
+
| Build | next, tsc, lint, prettier | 70-87% |
|
|
296
|
+
| Git | status, log, diff, add, commit | 59-80% |
|
|
297
|
+
| GitHub | gh pr, gh run, gh issue | 26-87% |
|
|
298
|
+
| Package Managers | pnpm, npm, npx | 70-90% |
|
|
299
|
+
| Files | ls, read, grep, find | 60-75% |
|
|
300
|
+
| Infrastructure | docker, kubectl | 85% |
|
|
301
|
+
| Network | curl, wget | 65-70% |
|
|
302
|
+
|
|
303
|
+
Overall average: **60-90% token reduction** on common development operations.
|
|
304
|
+
<!-- /rtk-instructions -->
|
package/package.json
CHANGED