rskim 2.10.0 → 3.0.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.
Files changed (2) hide show
  1. package/README.md +47 -9
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -67,8 +67,8 @@ skim --clear-cache
67
67
 
68
68
  ## Features
69
69
 
70
- - **12 Languages**: TypeScript, JavaScript, Python, Rust, Go, Java, C, C++, Markdown, JSON, YAML, TOML
71
- - **5 Transformation Modes**: Structure, Signatures, Types, Minimal, Full
70
+ - **18 Languages**: TypeScript, JavaScript, Python, Rust, Go, Java, C, C++, C#, Ruby, SQL, Kotlin, Swift, Bash, Markdown, JSON, YAML, TOML
71
+ - **6 Transformation Modes**: Structure, Signatures, Types, Full, Minimal, Pseudo
72
72
  - **Fast**: 14.6ms for 3000-line files (3x faster than target)
73
73
  - **Cached**: 40-50x speedup on repeated processing (enabled by default)
74
74
  - **Multi-file**: Glob patterns with parallel processing (`skim 'src/**/*.ts'`)
@@ -90,17 +90,18 @@ skim <FILE>
90
90
  ```bash
91
91
  Options:
92
92
  -m, --mode <MODE> Transformation mode [default: structure]
93
- [possible values: structure, signatures, types, minimal, full]
93
+ [possible values: structure, signatures, types, full, minimal, pseudo]
94
94
  -l, --language <LANGUAGE> Override language detection (alias: --lang)
95
95
  [possible values: typescript, javascript, python, rust, go, java,
96
- c, cpp, markdown, json, yaml, toml]
96
+ markdown, json, yaml, c, cpp, toml, csharp, ruby, sql, kotlin,
97
+ swift, bash]
97
98
  --filename <PATH> Hint filename for stdin language detection
98
99
  --tokens <N> Target token budget (cascades through modes to fit)
99
100
  --max-lines <N> Maximum output lines (AST-aware truncation)
100
101
  -j, --jobs <JOBS> Number of parallel jobs [default: number of CPUs]
101
102
  --no-header Don't print file path headers for multi-file output
102
103
  --no-cache Disable caching (caching is enabled by default)
103
- --clear-cache Clear all cached files and exit
104
+ --clear-cache Clear the parser cache and old search index data, and exit
104
105
  --show-stats Show token reduction statistics
105
106
  -h, --help Print help
106
107
  -V, --version Print version
@@ -108,9 +109,15 @@ Options:
108
109
 
109
110
  ## Transformation Modes
110
111
 
112
+ Reduction figures below are targets, not gates. Structure mode's only measured
113
+ value is 60.3%, on the production TypeScript codebase in the repository
114
+ README's reduction tables, and the range is stated wide enough to contain it.
115
+ No CI gate defends any of these ranges — the only reduction ratio the test
116
+ suite asserts is `> 0.30`, on the JSON and YAML structure-mode fixtures.
117
+
111
118
  ### Structure Mode (Default)
112
119
 
113
- Removes function bodies while preserving signatures (70-80% reduction).
120
+ Removes function bodies while preserving signatures (60-80% reduction).
114
121
 
115
122
  ```bash
116
123
  skim file.ts
@@ -187,6 +194,31 @@ Returns original code unchanged (0% reduction).
187
194
  skim file.rs --mode full
188
195
  ```
189
196
 
197
+ ### Minimal Mode
198
+
199
+ Strips non-doc comments at module and class level while keeping all code intact.
200
+ Doc comments, comments inside function bodies, module header comments, and
201
+ shebangs are preserved (reduction unverified — see the note above).
202
+
203
+ ```bash
204
+ skim file.py --mode minimal
205
+ ```
206
+
207
+ ### Pseudo Mode
208
+
209
+ Strips syntactic noise — type annotations, decorators, statement semicolons —
210
+ while preserving logic flow, names, values, visibility modifiers, and function
211
+ return types (reduction unverified — see the note above). What is stripped
212
+ varies by language: TypeScript and Rust keep parameter types; TypeScript also
213
+ keeps its type-level member annotations (interface / type-literal members and
214
+ index signatures, with their `readonly`) and the `;` that separates them; and
215
+ Rust removes only statement semicolons — its declaration terminators and the
216
+ array-length `;` of `[u8; 32]` survive — plus non-doc comments.
217
+
218
+ ```bash
219
+ skim file.ts --mode pseudo
220
+ ```
221
+
190
222
  ## Examples
191
223
 
192
224
  ### Explore a codebase
@@ -233,14 +265,20 @@ cat *.py | skim - --language=python
233
265
 
234
266
  | Language | Extensions | Auto-detected |
235
267
  |------------|--------------------|---------------|
236
- | TypeScript | `.ts`, `.tsx` | ✅ |
237
- | JavaScript | `.js`, `.jsx`, `.mjs` | ✅ |
238
- | Python | `.py` | ✅ |
268
+ | TypeScript | `.ts`, `.tsx`, `.mts`, `.cts` | ✅ |
269
+ | JavaScript | `.js`, `.jsx`, `.cjs`, `.mjs` | ✅ |
270
+ | Python | `.py`, `.pyi` | ✅ |
239
271
  | Rust | `.rs` | ✅ |
240
272
  | Go | `.go` | ✅ |
241
273
  | Java | `.java` | ✅ |
242
274
  | C | `.c`, `.h` | ✅ |
243
275
  | C++ | `.cpp`, `.hpp`, `.cc`, `.hh`, `.cxx`, `.hxx` | ✅ |
276
+ | C# | `.cs` | ✅ |
277
+ | Ruby | `.rb` | ✅ |
278
+ | SQL | `.sql` | ✅ |
279
+ | Kotlin | `.kt`, `.kts` | ✅ |
280
+ | Swift | `.swift` | ✅ |
281
+ | Bash | `.sh`, `.bash` | ✅ |
244
282
  | Markdown | `.md`, `.markdown` | ✅ |
245
283
  | JSON | `.json` | ✅ |
246
284
  | YAML | `.yaml`, `.yml` | ✅ |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rskim",
3
- "version": "2.10.0",
3
+ "version": "3.0.0",
4
4
  "description": "Smart code reader - streaming code transformation for AI agents",
5
5
  "keywords": [
6
6
  "code",
@@ -34,12 +34,12 @@
34
34
  "node": ">=16"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@rskim/cli-darwin-arm64": "2.10.0",
38
- "@rskim/cli-darwin-x64": "2.10.0",
39
- "@rskim/cli-linux-arm64": "2.10.0",
40
- "@rskim/cli-linux-x64": "2.10.0",
41
- "@rskim/cli-linux-arm64-musl": "2.10.0",
42
- "@rskim/cli-linux-x64-musl": "2.10.0",
43
- "@rskim/cli-win32-x64": "2.10.0"
37
+ "@rskim/cli-darwin-arm64": "3.0.0",
38
+ "@rskim/cli-darwin-x64": "3.0.0",
39
+ "@rskim/cli-linux-arm64": "3.0.0",
40
+ "@rskim/cli-linux-x64": "3.0.0",
41
+ "@rskim/cli-linux-arm64-musl": "3.0.0",
42
+ "@rskim/cli-linux-x64-musl": "3.0.0",
43
+ "@rskim/cli-win32-x64": "3.0.0"
44
44
  }
45
45
  }