indexer-cli 0.3.4 → 0.3.6
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 +27 -2
- package/dist/cli/commands/context-pack.d.ts +2 -0
- package/dist/cli/commands/context-pack.js +182 -0
- package/dist/cli/commands/context-pack.js.map +1 -0
- package/dist/cli/commands/search.js +2 -2
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/skills.js +81 -57
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/entry.js +2 -0
- package/dist/cli/entry.js.map +1 -1
- package/dist/core/types.d.ts +66 -0
- package/dist/engine/context-pack.d.ts +70 -0
- package/dist/engine/context-pack.js +735 -0
- package/dist/engine/context-pack.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -53,8 +53,9 @@ npx indexer-cli search "authentication middleware" --txt
|
|
|
53
53
|
|
|
54
54
|
After `init`, the repo contains focused skills like `.claude/skills/semantic-search/SKILL.md`,
|
|
55
55
|
`.claude/skills/repo-structure/SKILL.md`, `.claude/skills/repo-context/SKILL.md`, and
|
|
56
|
-
`.claude/skills/dependency-trace/SKILL.md`, so coding agents can load
|
|
57
|
-
|
|
56
|
+
`.claude/skills/dependency-trace/SKILL.md`, plus `.claude/skills/context-pack/SKILL.md`, so coding agents can load
|
|
57
|
+
the right indexed discovery workflow for `npx indexer-cli search`, `npx indexer-cli structure`,
|
|
58
|
+
`npx indexer-cli architecture`, `npx indexer-cli context`, `npx indexer-cli context-pack`,
|
|
58
59
|
`npx indexer-cli explain`, and `npx indexer-cli deps` before they start burning tokens on broad filesystem scans.
|
|
59
60
|
|
|
60
61
|
## Why agents save tokens with this
|
|
@@ -82,6 +83,7 @@ npx indexer-cli search "<query>"
|
|
|
82
83
|
npx indexer-cli structure --path-prefix src/<area>
|
|
83
84
|
npx indexer-cli architecture
|
|
84
85
|
npx indexer-cli context --scope relevant-to:src/<area>
|
|
86
|
+
npx indexer-cli context-pack "fix changed scope output"
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
By default, discovery commands now return JSON. Use `--txt` whenever you want human-readable output instead.
|
|
@@ -173,6 +175,29 @@ without pulling in entire files.
|
|
|
173
175
|
| `--max-deps <number>` | 30 | Maximum number of dependency edges to output |
|
|
174
176
|
| `--include-fixtures` | — | Include fixture/vendor paths in output |
|
|
175
177
|
|
|
178
|
+
### `npx indexer-cli context-pack <task>`
|
|
179
|
+
|
|
180
|
+
Build a token-aware routing pack for a coding task. The command selects likely modules, explains why they were chosen,
|
|
181
|
+
returns a compact architecture and structure slice, and suggests the next files to read before deeper exploration.
|
|
182
|
+
|
|
183
|
+
| Option | Default | Description |
|
|
184
|
+
|------------------------|-----------|------------------------------------------------------------------|
|
|
185
|
+
| `--budget <number>` | profile | Token budget: `800`, `1500`, or `2500` |
|
|
186
|
+
| `--profile <profile>` | balanced | `routing`, `balanced`, or `deep` |
|
|
187
|
+
| `--scope <scope>` | all | `all`, `changed`, `relevant-to:<path>`, or `path-prefix:<path>` |
|
|
188
|
+
| `--max-modules <n>` | profile | Maximum number of routed modules |
|
|
189
|
+
| `--max-files <n>` | profile | Maximum number of files in the structure slice |
|
|
190
|
+
| `--max-snippets <n>` | profile | Maximum number of semantic evidence snippets |
|
|
191
|
+
| `--min-score <number>` | — | Filter out semantic hits below this score (0..1) |
|
|
192
|
+
| `--explain-symbols` | — | Include symbol signatures in the pack output |
|
|
193
|
+
| `--txt` | — | Output as human-readable text |
|
|
194
|
+
|
|
195
|
+
Budget profiles are tuned for agent workflows:
|
|
196
|
+
|
|
197
|
+
- `routing` (~800 tokens): selected scope, module goals, next reads
|
|
198
|
+
- `balanced` (~1500 tokens): routing plus compact structure and architecture slices
|
|
199
|
+
- `deep` (~2500 tokens): balanced output plus evidence snippets when confidence is low or investigation is deeper
|
|
200
|
+
|
|
176
201
|
### `npx indexer-cli explain <symbol>`
|
|
177
202
|
|
|
178
203
|
Show context for a symbol: its signature, callers, and containing module. Use this to quickly understand what a
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerContextPackCommand = registerContextPackCommand;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const config_js_1 = require("../../core/config.js");
|
|
9
|
+
const logger_js_1 = require("../../core/logger.js");
|
|
10
|
+
const types_js_1 = require("../../core/types.js");
|
|
11
|
+
const ollama_js_1 = require("../../embedding/ollama.js");
|
|
12
|
+
const context_pack_js_1 = require("../../engine/context-pack.js");
|
|
13
|
+
const git_js_1 = require("../../engine/git.js");
|
|
14
|
+
const searcher_js_1 = require("../../engine/searcher.js");
|
|
15
|
+
const sqlite_js_1 = require("../../storage/sqlite.js");
|
|
16
|
+
const vectors_js_1 = require("../../storage/vectors.js");
|
|
17
|
+
const help_text_js_1 = require("../help-text.js");
|
|
18
|
+
const output_mode_js_1 = require("../output-mode.js");
|
|
19
|
+
const ensure_indexed_js_1 = require("./ensure-indexed.js");
|
|
20
|
+
function parseBudget(input) {
|
|
21
|
+
if (!input) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const budget = Number.parseInt(input, 10);
|
|
25
|
+
if (![800, 1500, 2500].includes(budget)) {
|
|
26
|
+
throw new Error("--budget must be one of: 800, 1500, 2500.");
|
|
27
|
+
}
|
|
28
|
+
return budget;
|
|
29
|
+
}
|
|
30
|
+
function parseProfile(input) {
|
|
31
|
+
if (!input) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
if (input === "routing" || input === "balanced" || input === "deep") {
|
|
35
|
+
return input;
|
|
36
|
+
}
|
|
37
|
+
throw new Error("--profile must be one of: routing, balanced, deep.");
|
|
38
|
+
}
|
|
39
|
+
function parsePositiveInt(optionName, input) {
|
|
40
|
+
if (!input) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const parsed = Number.parseInt(input, 10);
|
|
44
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
45
|
+
throw new Error(`${optionName} must be a positive integer.`);
|
|
46
|
+
}
|
|
47
|
+
return parsed;
|
|
48
|
+
}
|
|
49
|
+
function parseMinScore(input) {
|
|
50
|
+
if (!input) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
const parsed = Number.parseFloat(input);
|
|
54
|
+
if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
|
|
55
|
+
throw new Error("--min-score must be a number between 0 and 1.");
|
|
56
|
+
}
|
|
57
|
+
return parsed;
|
|
58
|
+
}
|
|
59
|
+
function formatText(result) {
|
|
60
|
+
console.log("## Selected Scope\n");
|
|
61
|
+
console.log(`Modules: ${result.selected_scope.pathPrefixes.length > 0 ? result.selected_scope.pathPrefixes.join(", ") : "(none)"}`);
|
|
62
|
+
console.log(`Confidence: ${(result.selected_scope.confidence * 100).toFixed(0)}% (${result._meta.confidenceBand})`);
|
|
63
|
+
for (const reason of result.selected_scope.why) {
|
|
64
|
+
console.log(`- ${reason}`);
|
|
65
|
+
}
|
|
66
|
+
if (result.module_goals.length > 0) {
|
|
67
|
+
console.log("\n## Module Goals\n");
|
|
68
|
+
for (const goal of result.module_goals) {
|
|
69
|
+
console.log(`${goal.module} — ${goal.goal} (${(goal.confidence * 100).toFixed(0)}%)`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (result.structure_slice.files.length > 0) {
|
|
73
|
+
console.log("\n## Structure Slice\n");
|
|
74
|
+
for (const file of result.structure_slice.files) {
|
|
75
|
+
console.log(`${file.path} [${file.module}]`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (result.structure_slice.keySymbols.length > 0) {
|
|
79
|
+
console.log("\n## Key Symbols\n");
|
|
80
|
+
for (const symbol of result.structure_slice.keySymbols) {
|
|
81
|
+
const signature = symbol.signature ? ` — ${symbol.signature}` : "";
|
|
82
|
+
console.log(`${symbol.file}::${symbol.name} (${symbol.kind})${signature}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (result.semantic_hits.length > 0) {
|
|
86
|
+
console.log("\n## Semantic Hits\n");
|
|
87
|
+
for (const hit of result.semantic_hits) {
|
|
88
|
+
const symbol = hit.primarySymbol ? `, symbol: ${hit.primarySymbol}` : "";
|
|
89
|
+
console.log(`${hit.filePath} (score: ${hit.score.toFixed(2)}${symbol}) — ${hit.reason}`);
|
|
90
|
+
if (hit.snippet) {
|
|
91
|
+
console.log(hit.snippet);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (result.next_reads.length > 0) {
|
|
96
|
+
console.log("\n## Next Reads\n");
|
|
97
|
+
for (const nextRead of result.next_reads) {
|
|
98
|
+
console.log(`${nextRead.file} — ${nextRead.reason}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
console.log("\n## Meta\n");
|
|
102
|
+
console.log(`Budget: ${result._meta.budget} (${result._meta.profile})`);
|
|
103
|
+
console.log(`Estimated tokens: ${result._meta.estimatedTokens}`);
|
|
104
|
+
console.log(`Omitted: ${result._meta.omitted.join(", ")}`);
|
|
105
|
+
}
|
|
106
|
+
function registerContextPackCommand(program) {
|
|
107
|
+
program
|
|
108
|
+
.command("context-pack <task>")
|
|
109
|
+
.description("Build a token-aware routing pack for an agent task")
|
|
110
|
+
.addHelpText("after", `\n${help_text_js_1.PROJECT_ROOT_COMMAND_HELP}\n`)
|
|
111
|
+
.option("--budget <number>", "token budget: 800, 1500, or 2500")
|
|
112
|
+
.option("--profile <profile>", "routing, balanced, or deep")
|
|
113
|
+
.option("--scope <scope>", "all, changed, relevant-to:<path>, or path-prefix:<path>")
|
|
114
|
+
.option("--max-modules <number>", "maximum number of modules in the pack")
|
|
115
|
+
.option("--max-files <number>", "maximum number of files in the structure slice")
|
|
116
|
+
.option("--max-snippets <number>", "maximum number of semantic evidence snippets")
|
|
117
|
+
.option("--min-score <number>", "filter out semantic hits below the given score (0..1)")
|
|
118
|
+
.option("--explain-symbols", "include symbol signatures in the pack output")
|
|
119
|
+
.option("--txt", "output results as human-readable text")
|
|
120
|
+
.action(async (task, options) => {
|
|
121
|
+
const resolvedProjectPath = process.cwd();
|
|
122
|
+
const dataDir = node_path_1.default.join(resolvedProjectPath, ".indexer-cli");
|
|
123
|
+
const dbPath = node_path_1.default.join(dataDir, "db.sqlite");
|
|
124
|
+
const isJson = (0, output_mode_js_1.isJsonOutput)(options);
|
|
125
|
+
(0, logger_js_1.initLogger)(dataDir);
|
|
126
|
+
config_js_1.config.load(dataDir);
|
|
127
|
+
const metadata = new sqlite_js_1.SqliteMetadataStore(dbPath);
|
|
128
|
+
const vectors = new vectors_js_1.SqliteVecVectorStore({
|
|
129
|
+
dbPath,
|
|
130
|
+
vectorSize: config_js_1.config.get("vectorSize"),
|
|
131
|
+
});
|
|
132
|
+
const embedder = new ollama_js_1.OllamaEmbeddingProvider(config_js_1.config.get("ollamaBaseUrl"), config_js_1.config.get("embeddingModel"), config_js_1.config.get("indexBatchSize"), config_js_1.config.get("indexConcurrency"), config_js_1.config.get("ollamaNumCtx"));
|
|
133
|
+
const searchEngine = new searcher_js_1.SearchEngine(metadata, vectors, embedder, resolvedProjectPath);
|
|
134
|
+
const builder = new context_pack_js_1.ContextPackBuilder(metadata, searchEngine, new git_js_1.SimpleGitOperations(), resolvedProjectPath);
|
|
135
|
+
try {
|
|
136
|
+
await metadata.initialize();
|
|
137
|
+
await (0, ensure_indexed_js_1.ensureIndexed)(metadata, resolvedProjectPath, {
|
|
138
|
+
silent: isJson,
|
|
139
|
+
});
|
|
140
|
+
await Promise.all([vectors.initialize(), embedder.initialize()]);
|
|
141
|
+
const snapshot = await metadata.getLatestCompletedSnapshot(types_js_1.DEFAULT_PROJECT_ID);
|
|
142
|
+
if (!snapshot) {
|
|
143
|
+
throw new Error("Auto-indexing did not produce a completed snapshot.");
|
|
144
|
+
}
|
|
145
|
+
const result = await builder.build(types_js_1.DEFAULT_PROJECT_ID, snapshot.id, task, {
|
|
146
|
+
budget: parseBudget(options?.budget),
|
|
147
|
+
profile: parseProfile(options?.profile),
|
|
148
|
+
scope: options?.scope,
|
|
149
|
+
maxModules: parsePositiveInt("--max-modules", options?.maxModules),
|
|
150
|
+
maxFiles: parsePositiveInt("--max-files", options?.maxFiles),
|
|
151
|
+
maxSnippets: parsePositiveInt("--max-snippets", options?.maxSnippets),
|
|
152
|
+
minScore: parseMinScore(options?.minScore),
|
|
153
|
+
explainSymbols: options?.explainSymbols,
|
|
154
|
+
excludePathPatterns: config_js_1.config.get("excludePaths"),
|
|
155
|
+
});
|
|
156
|
+
if (isJson) {
|
|
157
|
+
console.log(JSON.stringify(result, null, 2));
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
formatText(result);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
165
|
+
if (isJson) {
|
|
166
|
+
console.error(JSON.stringify({ error: message }, null, 2));
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
console.error(`Context-pack command failed: ${message}`);
|
|
170
|
+
}
|
|
171
|
+
process.exitCode = 1;
|
|
172
|
+
}
|
|
173
|
+
finally {
|
|
174
|
+
await Promise.allSettled([
|
|
175
|
+
metadata.close(),
|
|
176
|
+
vectors.close(),
|
|
177
|
+
embedder.close(),
|
|
178
|
+
]);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=context-pack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-pack.js","sourceRoot":"","sources":["../../../src/cli/commands/context-pack.ts"],"names":[],"mappings":";;;;;AAyIA,gEAuIC;AAhRD,0DAA6B;AAE7B,oDAA8C;AAC9C,oDAAkD;A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AM,CAAC,GAAG,CAAC,cAAc,CAAC;aAC/C,CACD,CAAC;YAEF,IAAI,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC9C,CAAC;iBAAM,CAAC;gBACP,UAAU,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,OAAO,GACZ,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACxD,IAAI,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5D,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,KAAK,CAAC,gCAAgC,OAAO,EAAE,CAAC,CAAC;YAC1D,CAAC;YACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACtB,CAAC;gBAAS,CAAC;YACV,MAAM,OAAO,CAAC,UAAU,CAAC;gBACxB,QAAQ,CAAC,KAAK,EAAE;gBAChB,OAAO,CAAC,KAAK,EAAE;gBACf,QAAQ,CAAC,KAAK,EAAE;aAChB,CAAC,CAAC;QACJ,CAAC;IACF,CAAC,CACD,CAAC;AACJ,CAAC"}
|
|
@@ -151,7 +151,7 @@ function registerSearchCommand(program) {
|
|
|
151
151
|
if (!snapshot) {
|
|
152
152
|
throw new Error("Auto-indexing did not produce a completed snapshot.");
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const maxFiles = Number.parseInt(options?.maxFiles ?? "3", 10);
|
|
155
155
|
const rawFields = parseSearchFields(options?.fields);
|
|
156
156
|
const fields = resolveOutputFields(rawFields, {
|
|
157
157
|
omitContent: options?.omitContent,
|
|
@@ -164,7 +164,7 @@ function registerSearchCommand(program) {
|
|
|
164
164
|
.map((value) => value.trim())
|
|
165
165
|
.filter(Boolean);
|
|
166
166
|
const results = await searchEngine.search(types_js_1.DEFAULT_PROJECT_ID, snapshot.id, query, {
|
|
167
|
-
topK: Number.isFinite(
|
|
167
|
+
topK: Number.isFinite(maxFiles) && maxFiles > 0 ? maxFiles : 3,
|
|
168
168
|
pathPrefix: options?.pathPrefix,
|
|
169
169
|
chunkTypes,
|
|
170
170
|
includeContent: fields.includes("content"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/cli/commands/search.ts"],"names":[],"mappings":";;;;;AA+JA,sDAuKC;AAtUD,
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/cli/commands/search.ts"],"names":[],"mappings":";;;;;AA+JA,sDAuKC;AAtUD,0DAA6B;AAE7B,oDAA8C;AAC9C,kDAAyD;AACzD,oDAAkD;AAClD,yDAAoE;AACpE,0DAAwD;AACxD,uDAA8D;AAC9D,yDAAgE;AAChE,kDAA4D;AAC5D,sDAAiD;AACjD,2DAAoD;AAEpD,MAAM,aAAa,GAAG;IACrB,UAAU;IACV,WAAW;IACX,SAAS;IACT,OAAO;IACP,eAAe;IACf,SAAS;CACA,CAAC;AAWX,SAAS,iBAAiB,CAAC,KAAc;IACxC,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,GAAG,aAAa,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,GAAG,CACxB,KAAK;SACH,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;SAC5B,MAAM,CAAC,OAAO,CAAC,CACjB,CAAC;IACF,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CA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AAQ,CAAC,SAAS,CAAC,EAAE,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,uBAAuB,CAAC,CAAC;gBACxD,CAAC;YACF,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,OAAO,GACZ,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACxD,IAAI,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5D,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,KAAK,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAC;YAC5C,CAAC;YACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACtB,CAAC;gBAAS,CAAC;YACV,MAAM,OAAO,CAAC,UAAU,CAAC;gBACxB,QAAQ,CAAC,KAAK,EAAE;gBAChB,OAAO,CAAC,KAAK,EAAE;gBACf,QAAQ,CAAC,KAAK,EAAE;aAChB,CAAC,CAAC;QACJ,CAAC;IACF,CAAC,CACD,CAAC;AACJ,CAAC"}
|
|
@@ -13,10 +13,6 @@ function renderSkill(definition) {
|
|
|
13
13
|
"",
|
|
14
14
|
definition.purpose,
|
|
15
15
|
"",
|
|
16
|
-
"## Auto-load when",
|
|
17
|
-
"",
|
|
18
|
-
...definition.autoLoadWhen.map((item) => `- ${item}`),
|
|
19
|
-
"",
|
|
20
16
|
"## Rules",
|
|
21
17
|
"",
|
|
22
18
|
...definition.rules.map((item) => `- ${item}`),
|
|
@@ -24,9 +20,9 @@ function renderSkill(definition) {
|
|
|
24
20
|
if (definition.skipWhen && definition.skipWhen.length > 0) {
|
|
25
21
|
sections.push("", "## Skip when", "", ...definition.skipWhen.map((item) => `- ${item}`));
|
|
26
22
|
}
|
|
27
|
-
sections.push("", "##
|
|
28
|
-
if (definition.
|
|
29
|
-
sections.push("", "##
|
|
23
|
+
sections.push("", "## Command samples", "", "Use one matching example; these are alternatives, not a sequence.", "", "```bash", ...definition.commandSamples, "```");
|
|
24
|
+
if (definition.cliReference && definition.cliReference.length > 0) {
|
|
25
|
+
sections.push("", "## CLI reference", "", ...definition.cliReference.map((item) => `- ${item}`));
|
|
30
26
|
}
|
|
31
27
|
return `${sections.join("\n")}\n`;
|
|
32
28
|
}
|
|
@@ -34,17 +30,13 @@ const SKILL_DEFINITIONS = [
|
|
|
34
30
|
{
|
|
35
31
|
name: "semantic-search",
|
|
36
32
|
directory: "semantic-search",
|
|
37
|
-
description:
|
|
33
|
+
description: `description: PREFER over grep for conceptual questions like "how does X work", "how is X calculated", or any question about behavior/flow. Use when the user asks about a concept, behavior, or flow — not a specific symbol or literal string.`,
|
|
38
34
|
heading: "Use semantic-search for implementation hunting",
|
|
39
35
|
purpose: "Use this when the agent already knows it needs semantic search results, not a tree or architecture map. Keep the prompt short and centered on the code concept to find.",
|
|
40
36
|
allowedTools: ["Bash(npx indexer-cli search:*)"],
|
|
41
|
-
autoLoadWhen: [
|
|
42
|
-
"Find where a feature, function, handler, or pattern is implemented",
|
|
43
|
-
"Search for examples of a concept across the repo",
|
|
44
|
-
"Narrow discovery by path, chunk type, score, or fields",
|
|
45
|
-
],
|
|
46
37
|
rules: [
|
|
47
|
-
|
|
38
|
+
`**2-4 domain-specific words**: "how claim prize", "billing webhook", "quiz scoring"`,
|
|
39
|
+
`Do NOT write long queries with synonyms — it dilutes ranking.`,
|
|
48
40
|
"Prefer compact JSON fields first; include content only after the right chunk is found.",
|
|
49
41
|
"Use --path-prefix or --chunk-types when you already know the likely area.",
|
|
50
42
|
],
|
|
@@ -52,28 +44,25 @@ const SKILL_DEFINITIONS = [
|
|
|
52
44
|
"You need a file tree or symbol inventory instead of search results",
|
|
53
45
|
"You already know the exact file and line range to inspect",
|
|
54
46
|
],
|
|
55
|
-
|
|
47
|
+
commandSamples: [
|
|
56
48
|
'npx indexer-cli search "<query>"',
|
|
57
49
|
'npx indexer-cli search "<query>" --path-prefix src/<area>',
|
|
58
50
|
'npx indexer-cli search "<query>" --chunk-types impl,types',
|
|
59
51
|
],
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
52
|
+
cliReference: [
|
|
53
|
+
"Positional args: <query>.",
|
|
54
|
+
"Options: --max-files <number>, --path-prefix <string>, --chunk-types <string>, --fields <list>, --min-score <number>, --include-content.",
|
|
55
|
+
"Allowed --chunk-types values: full_file, imports, preamble, declaration, module_section, impl, types.",
|
|
56
|
+
"Allowed --fields values: filePath, startLine, endLine, score, primarySymbol, content.",
|
|
63
57
|
],
|
|
64
58
|
},
|
|
65
59
|
{
|
|
66
60
|
name: "repo-structure",
|
|
67
61
|
directory: "repo-structure",
|
|
68
|
-
description: "Use
|
|
62
|
+
description: "Use when you need the file-and-symbol layout of a directory or subsystem before reading implementation details.",
|
|
69
63
|
heading: "Use repo-structure for tree and symbol-map questions",
|
|
70
64
|
purpose: "Use this when the agent needs to see how files and symbols are organized in an area of the repo before reading implementation details.",
|
|
71
65
|
allowedTools: ["Bash(npx indexer-cli structure:*)"],
|
|
72
|
-
autoLoadWhen: [
|
|
73
|
-
"Show the file tree for a module or directory",
|
|
74
|
-
"List symbols by area or symbol kind",
|
|
75
|
-
"Limit structure output to a path prefix or max depth",
|
|
76
|
-
],
|
|
77
66
|
rules: [
|
|
78
67
|
"Prefer structure when layout matters more than implementation snippets.",
|
|
79
68
|
"Use --path-prefix and --kind to keep output focused.",
|
|
@@ -83,27 +72,24 @@ const SKILL_DEFINITIONS = [
|
|
|
83
72
|
"You need dependency relationships rather than physical structure",
|
|
84
73
|
"You need semantic search results rather than a tree",
|
|
85
74
|
],
|
|
86
|
-
|
|
75
|
+
commandSamples: [
|
|
87
76
|
"npx indexer-cli structure",
|
|
88
77
|
"npx indexer-cli structure --path-prefix src/<area>",
|
|
89
78
|
"npx indexer-cli structure --kind function",
|
|
90
79
|
],
|
|
91
|
-
|
|
92
|
-
"
|
|
80
|
+
cliReference: [
|
|
81
|
+
"Output: JSON by default; use --txt for human-readable text.",
|
|
82
|
+
"Options: --path-prefix <string>, --kind <string>, --max-depth <number>, --max-files <number>, --txt.",
|
|
83
|
+
"Allowed --kind values: function, class, method, interface, type, variable, module, signal.",
|
|
93
84
|
],
|
|
94
85
|
},
|
|
95
86
|
{
|
|
96
87
|
name: "repo-architecture",
|
|
97
88
|
directory: "repo-architecture",
|
|
98
|
-
description: "Use
|
|
89
|
+
description: "Use when you need a high-level view of entry points, modules, and cross-module dependencies in a subsystem or repo.",
|
|
99
90
|
heading: "Use repo-architecture for dependency-graph questions",
|
|
100
91
|
purpose: "Use this when the agent needs a high-level snapshot of modules, entry points, and dependency shape before going deeper.",
|
|
101
92
|
allowedTools: ["Bash(npx indexer-cli architecture:*)"],
|
|
102
|
-
autoLoadWhen: [
|
|
103
|
-
"Identify entry points or major modules",
|
|
104
|
-
"Inspect dependency-map shape across an area of the repo",
|
|
105
|
-
"Understand architecture before refactoring or large changes",
|
|
106
|
-
],
|
|
107
93
|
rules: [
|
|
108
94
|
"Use architecture when the question is about system shape, not a single symbol.",
|
|
109
95
|
"Filter by path prefix when only one subsystem matters.",
|
|
@@ -113,23 +99,22 @@ const SKILL_DEFINITIONS = [
|
|
|
113
99
|
"You need callers/callees for one specific file or symbol",
|
|
114
100
|
"You need dense narrative context instead of a graph-shaped overview",
|
|
115
101
|
],
|
|
116
|
-
|
|
102
|
+
commandSamples: [
|
|
117
103
|
"npx indexer-cli architecture",
|
|
118
104
|
"npx indexer-cli architecture --path-prefix src/<area>",
|
|
119
105
|
],
|
|
106
|
+
cliReference: [
|
|
107
|
+
"Output: JSON by default; use --txt for human-readable text.",
|
|
108
|
+
"Options: --path-prefix <string>, --include-fixtures, --txt.",
|
|
109
|
+
],
|
|
120
110
|
},
|
|
121
111
|
{
|
|
122
112
|
name: "repo-context",
|
|
123
113
|
directory: "repo-context",
|
|
124
|
-
description: "Use
|
|
114
|
+
description: "Use when you need a compact summary of the whole repo, current changes, or one area without opening many files.",
|
|
125
115
|
heading: "Use repo-context for dense summaries",
|
|
126
116
|
purpose: "Use this when the agent wants a compressed view of a subsystem, changed area, or dependency neighborhood without opening many files.",
|
|
127
117
|
allowedTools: ["Bash(npx indexer-cli context:*)"],
|
|
128
|
-
autoLoadWhen: [
|
|
129
|
-
"Summarize the current project or a changed area",
|
|
130
|
-
"Collect context relevant to one path before editing",
|
|
131
|
-
"Get dependency-limited snapshots for prompt building",
|
|
132
|
-
],
|
|
133
118
|
rules: [
|
|
134
119
|
"Prefer context when you want breadth over exact source snippets.",
|
|
135
120
|
"Use --scope to target all, changed, or relevant-to:<path>.",
|
|
@@ -139,25 +124,55 @@ const SKILL_DEFINITIONS = [
|
|
|
139
124
|
"You need exact implementation locations or ranked chunks",
|
|
140
125
|
"You need a file tree or architecture graph instead of a summary",
|
|
141
126
|
],
|
|
142
|
-
|
|
127
|
+
commandSamples: [
|
|
143
128
|
"npx indexer-cli context",
|
|
144
129
|
"npx indexer-cli context --scope changed",
|
|
145
130
|
"npx indexer-cli context --scope relevant-to:src/<area>",
|
|
146
131
|
],
|
|
147
|
-
|
|
132
|
+
cliReference: [
|
|
133
|
+
"Output: JSON by default; use --txt for human-readable text.",
|
|
134
|
+
"Options: --scope <scope>, --max-deps <number>, --include-fixtures, --txt.",
|
|
135
|
+
"Allowed --scope values: all, changed, relevant-to:<path>.",
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "context-pack",
|
|
140
|
+
directory: "context-pack",
|
|
141
|
+
description: "Use when you want one small routing pack that picks the most relevant repo area, explains why, and suggests the next files to read before deeper discovery.",
|
|
142
|
+
heading: "Use context-pack for token-aware repo routing",
|
|
143
|
+
purpose: "Use this when the agent has a concrete task but does not yet know which module to inspect first. Start here to get selected scope, module goals, compact structure, and next reads without broad blind discovery.",
|
|
144
|
+
allowedTools: ["Bash(npx indexer-cli context-pack:*)"],
|
|
145
|
+
rules: [
|
|
146
|
+
"Pass the actual task phrasing as the positional argument so routing can infer intent and likely ownership.",
|
|
147
|
+
"Prefer the default balanced profile first; switch to routing for fast triage or deep when confidence is low and you need evidence snippets.",
|
|
148
|
+
"Use --scope when you already know the search should stay near changed files or one path prefix.",
|
|
149
|
+
"Use --explain-symbols only when symbol signatures are worth the extra tokens.",
|
|
150
|
+
],
|
|
151
|
+
skipWhen: [
|
|
152
|
+
"You already know the exact file, module, or symbol to inspect next",
|
|
153
|
+
"You need raw semantic hits only; use semantic-search for that",
|
|
154
|
+
],
|
|
155
|
+
commandSamples: [
|
|
156
|
+
'npx indexer-cli context-pack "fix changed scope output"',
|
|
157
|
+
'npx indexer-cli context-pack "add search ranking debug output" --scope path-prefix:src/engine',
|
|
158
|
+
'npx indexer-cli context-pack "why is init writing stale skills" --profile deep --scope changed',
|
|
159
|
+
],
|
|
160
|
+
cliReference: [
|
|
161
|
+
"Positional args: <task>.",
|
|
162
|
+
"Output: JSON by default; use --txt for human-readable text.",
|
|
163
|
+
"Options: --budget <number>, --profile <profile>, --scope <scope>, --max-modules <number>, --max-files <number>, --max-snippets <number>, --min-score <number>, --explain-symbols, --txt.",
|
|
164
|
+
"Allowed --profile values: routing, balanced, deep.",
|
|
165
|
+
"Allowed --scope values: all, changed, relevant-to:<path>, path-prefix:<path>.",
|
|
166
|
+
"Allowed --budget values: 800, 1500, 2500.",
|
|
167
|
+
],
|
|
148
168
|
},
|
|
149
169
|
{
|
|
150
170
|
name: "symbol-explain",
|
|
151
171
|
directory: "symbol-explain",
|
|
152
|
-
description: "Use
|
|
172
|
+
description: "Use when the symbol name is already known and you need its signature, module context, and callers fast.",
|
|
153
173
|
heading: "Use symbol-explain for one symbol at a time",
|
|
154
174
|
purpose: "Use this when the task centers on one function, class, type, or symbol and the agent needs signature, usage, and containing module context fast.",
|
|
155
175
|
allowedTools: ["Bash(npx indexer-cli explain:*)"],
|
|
156
|
-
autoLoadWhen: [
|
|
157
|
-
"Understand what one symbol does",
|
|
158
|
-
"Inspect the signature and callers of one function or class",
|
|
159
|
-
"Get targeted context before editing a known symbol",
|
|
160
|
-
],
|
|
161
176
|
rules: [
|
|
162
177
|
"Use explain only when the symbol name is already known.",
|
|
163
178
|
"Do not use this skill for symbol discovery; use it only once the symbol name is already known.",
|
|
@@ -167,20 +182,23 @@ const SKILL_DEFINITIONS = [
|
|
|
167
182
|
"You need to discover candidate symbols first",
|
|
168
183
|
"You need repo-wide structure rather than one-symbol context",
|
|
169
184
|
],
|
|
170
|
-
|
|
185
|
+
commandSamples: [
|
|
186
|
+
"npx indexer-cli explain <symbol>",
|
|
187
|
+
"npx indexer-cli explain <file>::<symbol>",
|
|
188
|
+
],
|
|
189
|
+
cliReference: [
|
|
190
|
+
"Positional args: <symbol> or <file>::<symbol>.",
|
|
191
|
+
"Output: JSON by default; use --txt for human-readable text.",
|
|
192
|
+
"Options: --txt.",
|
|
193
|
+
],
|
|
171
194
|
},
|
|
172
195
|
{
|
|
173
196
|
name: "dependency-trace",
|
|
174
197
|
directory: "dependency-trace",
|
|
175
|
-
description: "Use
|
|
198
|
+
description: "Use when you already know the file or module to trace and need callers, callees, or likely change impact.",
|
|
176
199
|
heading: "Use dependency-trace for impact analysis",
|
|
177
200
|
purpose: "Use this when the agent needs to know who imports a module, what it imports, or how far change impact may spread.",
|
|
178
201
|
allowedTools: ["Bash(npx indexer-cli deps:*)"],
|
|
179
|
-
autoLoadWhen: [
|
|
180
|
-
"Trace callers or callees for a module or symbol",
|
|
181
|
-
"Estimate change impact before refactoring",
|
|
182
|
-
"Follow dependency chains in one direction or both",
|
|
183
|
-
],
|
|
184
202
|
rules: [
|
|
185
203
|
"Use deps when the question is about relationships, not source snippets.",
|
|
186
204
|
"Set --direction callers or --direction callees when only one side matters.",
|
|
@@ -190,12 +208,18 @@ const SKILL_DEFINITIONS = [
|
|
|
190
208
|
"You need a repo-wide architecture snapshot rather than one trace",
|
|
191
209
|
"You do not yet know the path or symbol to trace",
|
|
192
210
|
],
|
|
193
|
-
|
|
211
|
+
commandSamples: [
|
|
194
212
|
"npx indexer-cli deps <path>",
|
|
195
213
|
"npx indexer-cli deps <path> --direction callers",
|
|
196
214
|
"npx indexer-cli deps <path> --direction callees",
|
|
197
215
|
],
|
|
198
|
-
|
|
216
|
+
cliReference: [
|
|
217
|
+
"Positional args: <path>.",
|
|
218
|
+
"Output: JSON by default; use --txt for human-readable text.",
|
|
219
|
+
"Options: --direction <dir>, --depth <n>, --txt.",
|
|
220
|
+
"Allowed --direction values: callers, callees, both.",
|
|
221
|
+
"Behavior: --depth is effectively clamped to the range 1..5.",
|
|
222
|
+
],
|
|
199
223
|
},
|
|
200
224
|
];
|
|
201
225
|
exports.GENERATED_SKILLS = SKILL_DEFINITIONS.map((definition) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/cli/commands/skills.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/cli/commands/skills.ts"],"names":[],"mappings":";;;AAaA,SAAS,WAAW,CAAC,UAA2B;IAC/C,MAAM,QAAQ,GAAG;QAChB,KAAK;QACL,SAAS,UAAU,CAAC,IAAI,EAAE;QAC1B,gBAAgB,UAAU,CAAC,WAAW,EAAE;QACxC,kBAAkB,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACtD,KAAK;QACL,EAAE;QACF,KAAK,UAAU,CAAC,OAAO,EAAE;QACzB,EAAE;QACF,UAAU,CAAC,OAAO;QAClB,EAAE;QACF,UAAU;QACV,EAAE;QACF,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;KAC9C,CAAC;IAEF,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CA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SACjD;QACD,cAAc,EAAE;YACf,6BAA6B;YAC7B,iDAAiD;YACjD,iDAAiD;SACjD;QACD,YAAY,EAAE;YACb,0BAA0B;YAC1B,6DAA6D;YAC7D,iDAAiD;YACjD,qDAAqD;YACrD,6DAA6D;SAC7D;KACD;CACD,CAAC;AAQW,QAAA,gBAAgB,GAAqB,iBAAiB,CAAC,GAAG,CACtE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,SAAS,EAAE,UAAU,CAAC,SAAS;IAC/B,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC;CAChC,CAAC,CACF,CAAC;AAEW,QAAA,2BAA2B,GAAG,wBAAgB,CAAC,GAAG,CAC9D,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAC1B,CAAC"}
|
package/dist/cli/entry.js
CHANGED
|
@@ -9,6 +9,7 @@ const architecture_js_1 = require("./commands/architecture.js");
|
|
|
9
9
|
const uninstall_js_1 = require("./commands/uninstall.js");
|
|
10
10
|
const setup_js_1 = require("./commands/setup.js");
|
|
11
11
|
const context_js_1 = require("./commands/context.js");
|
|
12
|
+
const context_pack_js_1 = require("./commands/context-pack.js");
|
|
12
13
|
const explain_js_1 = require("./commands/explain.js");
|
|
13
14
|
const deps_js_1 = require("./commands/deps.js");
|
|
14
15
|
const version_js_1 = require("./version.js");
|
|
@@ -40,6 +41,7 @@ commander_1.program
|
|
|
40
41
|
(0, structure_js_1.registerStructureCommand)(commander_1.program);
|
|
41
42
|
(0, architecture_js_1.registerArchitectureCommand)(commander_1.program);
|
|
42
43
|
(0, context_js_1.registerContextCommand)(commander_1.program);
|
|
44
|
+
(0, context_pack_js_1.registerContextPackCommand)(commander_1.program);
|
|
43
45
|
(0, explain_js_1.registerExplainCommand)(commander_1.program);
|
|
44
46
|
(0, deps_js_1.registerDepsCommand)(commander_1.program);
|
|
45
47
|
(0, uninstall_js_1.registerUninstallCommand)(commander_1.program);
|