@ninjaxtools/slopdex 0.26.0 → 0.27.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.md CHANGED
@@ -22,7 +22,7 @@ The main supported functions are
22
22
  - `slopdex map [PATH]...`
23
23
  <br/>show a map/skeleton of the code structure
24
24
 
25
- `search` does a vector searche of code, and markdown, and when enabled generated code descriptions.
25
+ `search` does a vector search of code, configuration and markup files, and, when enabled, generated code descriptions.
26
26
 
27
27
  `cross-search` also does a vector search but compares all functions with each other (scope can be limited with additional options) and helps with finding duplicated code, or code that is not necessarily duplicated but spread out across the codebase (with `--cohesion`).
28
28
 
@@ -56,7 +56,7 @@ $ slopdex search "validate an authenticated session"
56
56
  ...
57
57
  ```
58
58
 
59
- The index tracks the current git commit and is created or updated on every command and stored in `.slopdex/index.sqlite`. Add `.slopdex/` to your repository's `.gitignore` to prevent it from being committed.
59
+ The index tracks the current Git commit and is created or updated on every command that uses it. Index data is stored in the current user's cache folder and project settings are stored in `.slopdex/config.json` (add `.slopdex` to `.gitignore`). See also [cache configuration](docs/reference.md#shared-provider-artifacts).
60
60
 
61
61
  ### Code map/skeleton
62
62
 
@@ -70,7 +70,7 @@ $ slopdex map -g '*.md' -e '^Guide\.Setup' -i --format json
70
70
  $ slopdex map --no-reindex
71
71
  ```
72
72
 
73
- The `map` command can be used to generate a source code skeleton that strips most of the code implementation but retains many of the structurally useful information that can act as an index into the source code. The resulting index output is most useful to conserve tokens and improve the agentic programming experience.
73
+ The `map` command can be used to generate a source code skeleton that strips most of the code implementation but retains structurally useful information that can act as an index into the source code, which improves context usage.
74
74
 
75
75
  See the [selector reference](docs/reference.md#shared-selectors).
76
76
 
@@ -126,7 +126,7 @@ $ slopdex config fallback-model opencode-go/muse-spark-1.3-contributor
126
126
 
127
127
  The fallback-model is used if the main model reports an error, and if the fallback-model reports an error the main model is tried again.
128
128
 
129
- File and function descriptions are cached. Function descriptions will only be regenerated when functions change. File descriptions need to be regenerated explcitily with the `reindex-files` command.
129
+ File and function descriptions are cached by source and description context, so renaming a file can reuse its descriptions. Function changes or a changed file-description context can require new callable descriptions. File descriptions after edits can be refreshed explicitly with `reindex-files`.
130
130
 
131
131
  ### Interactive Config
132
132
 
@@ -144,7 +144,7 @@ The intention of the `describe` command is to use a low-cost model to summarise
144
144
  $ slopdex describe "I want to implement a new rpc endpoint"
145
145
  ```
146
146
 
147
- For the best matching files (configured with `--describe-full-file-threshold`, default `0.8`) the full file contents are used.
147
+ The LLM receives expanded text search results with indexed code from callers and callees up to two edges away by default; it does not receive whole-file source.
148
148
 
149
149
  ### Find duplicate code
150
150
 
@@ -213,17 +213,15 @@ $ slopdex cross-search --cross-file-only --cohesion --threshold 0.8
213
213
  ```
214
214
  ### Use with agents
215
215
 
216
- Just put this in your `AGENTS.md` file, no skill required:
216
+ Just put this in your `AGENTS.md` file and adjust as desired, no skill necessary:
217
217
 
218
218
  ```
219
- - use `slopdex map -g <glob> <files or directories...>` to obtain a compact structural code skeleton, and then perform targeted reads for implementation details. Line numbers are indicated in square brackets (e.g [5] means line 5, and [5-10] means lines 5 to 10). To filter for specific symbols, use `-e`. To only include specific kinds of symbols use `-k` with `imports`, `fns`, `consts`, `types`, or `classes`. For example: `slopdex map -g "*.ts" -i -e "manager|main" src`.
220
- - use semantic code search to find code with: `slopdex search "..." --threshold 0.5`
221
- - when reviewing uncommitted code avoid introducing duplicates by looking for related matches: `slopdex cross-search --uncommitted --threshold 0.8`
222
- - don't use `*` as the glob since that circumvents the default ignore rules.
219
+ - use `slopdex map -g "<glob>" -i -e "<regex>" <files or directories...>` to obtain a compact structural code skeleton, and then perform targeted reads using the line numbers for implementation details. To filter for specific symbols, use `-e`. To only include specific kinds of symbols use `-k` with `imports`, `fns`, `consts`, `types`, or `classes`.
220
+ - use semantic code search to find code with: `slopdex search "<query>" --threshold 0.5`; vary the search query if you get no results
221
+ - when reviewing uncommitted code avoid introducing duplicates by looking for related matches: `slopdex cross-search --uncommitted --cross-file-only --threshold 0.8`
222
+ - when tasked to do advanced codebase analysis, use `slopdex --help` first to see all options
223
223
  ```
224
224
 
225
- Any other use, like doing a full `cross-search` is probably better done interactively with the agent, in which case you can just ask the agent to run `slopdex --help` to get usage information.
226
-
227
225
  ### Reranking
228
226
 
229
227
  Optionally a second-stage reranker can be enabled for all query-search commands:
@@ -240,10 +238,12 @@ $ slopdex config reranker cohere
240
238
  ```console
241
239
  $ slopdex cross-search \
242
240
  --target-root /path/to/other/repo \
243
- --target-index /path/to/other/repo/.slopdex/index.sqlite \
241
+ --target-index /path/to/other/index.sqlite \
244
242
  --threshold 0.9
245
243
  ```
246
244
 
245
+ Pass the target's `indexPath` from `slopdex --root /path/to/other/repo --format json status` (or a custom `--index` path) as `--target-index`.
246
+
247
247
  ### Inspect index health
248
248
 
249
249
  If some functions can't be indexed a warning is printed. Index errors can be investigated and fixed with the `index-errors` command to ensure the index is complete.
@@ -19,7 +19,7 @@
19
19
  "hasInstallScript": true,
20
20
  "license": "MIT",
21
21
  "name": "@ninjaxtools/slopdex",
22
- "version": "0.26.0"
22
+ "version": "0.27.0"
23
23
  },
24
24
  "node_modules/detect-libc": {
25
25
  "engines": {
@@ -48,5 +48,5 @@
48
48
  }
49
49
  },
50
50
  "requires": true,
51
- "version": "0.26.0"
51
+ "version": "0.27.0"
52
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/ninjaxtools/slopdex/releases/download/v0.26.0"
3
+ "https://github.com/ninjaxtools/slopdex/releases/download/v0.27.0"
4
4
  ],
5
5
  "bin": {
6
6
  "slopdex": "run-slopdex.js"
@@ -80,7 +80,7 @@
80
80
  "zipExt": ".tar.xz"
81
81
  }
82
82
  },
83
- "version": "0.26.0",
83
+ "version": "0.27.0",
84
84
  "volta": {
85
85
  "node": "18.14.1",
86
86
  "npm": "9.5.0"