indexer-cli 0.3.5 → 0.3.7
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 -23
- 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"}
|
|
@@ -20,9 +20,9 @@ function renderSkill(definition) {
|
|
|
20
20
|
if (definition.skipWhen && definition.skipWhen.length > 0) {
|
|
21
21
|
sections.push("", "## Skip when", "", ...definition.skipWhen.map((item) => `- ${item}`));
|
|
22
22
|
}
|
|
23
|
-
sections.push("", "##
|
|
24
|
-
if (definition.
|
|
25
|
-
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}`));
|
|
26
26
|
}
|
|
27
27
|
return `${sections.join("\n")}\n`;
|
|
28
28
|
}
|
|
@@ -30,12 +30,13 @@ const SKILL_DEFINITIONS = [
|
|
|
30
30
|
{
|
|
31
31
|
name: "semantic-search",
|
|
32
32
|
directory: "semantic-search",
|
|
33
|
-
description: "
|
|
33
|
+
description: "FIRST choice for concept and behavior questions. Load this before grep when the task asks how something works, is calculated, or flows through the codebase rather than pointing to an exact symbol or literal string.",
|
|
34
34
|
heading: "Use semantic-search for implementation hunting",
|
|
35
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.",
|
|
36
36
|
allowedTools: ["Bash(npx indexer-cli search:*)"],
|
|
37
37
|
rules: [
|
|
38
|
-
|
|
38
|
+
`**2-4 domain-specific words**: "how claim prize", "billing webhook", "quiz scoring"`,
|
|
39
|
+
`Do NOT write long queries with synonyms — it dilutes ranking.`,
|
|
39
40
|
"Prefer compact JSON fields first; include content only after the right chunk is found.",
|
|
40
41
|
"Use --path-prefix or --chunk-types when you already know the likely area.",
|
|
41
42
|
],
|
|
@@ -43,20 +44,22 @@ const SKILL_DEFINITIONS = [
|
|
|
43
44
|
"You need a file tree or symbol inventory instead of search results",
|
|
44
45
|
"You already know the exact file and line range to inspect",
|
|
45
46
|
],
|
|
46
|
-
|
|
47
|
+
commandSamples: [
|
|
47
48
|
'npx indexer-cli search "<query>"',
|
|
48
49
|
'npx indexer-cli search "<query>" --path-prefix src/<area>',
|
|
49
50
|
'npx indexer-cli search "<query>" --chunk-types impl,types',
|
|
50
51
|
],
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
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.",
|
|
54
57
|
],
|
|
55
58
|
},
|
|
56
59
|
{
|
|
57
60
|
name: "repo-structure",
|
|
58
61
|
directory: "repo-structure",
|
|
59
|
-
description: "
|
|
62
|
+
description: "FIRST choice for file-and-symbol layout questions. Load this before opening many files when you need the shape of a directory or subsystem before reading implementation details.",
|
|
60
63
|
heading: "Use repo-structure for tree and symbol-map questions",
|
|
61
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.",
|
|
62
65
|
allowedTools: ["Bash(npx indexer-cli structure:*)"],
|
|
@@ -69,19 +72,21 @@ const SKILL_DEFINITIONS = [
|
|
|
69
72
|
"You need dependency relationships rather than physical structure",
|
|
70
73
|
"You need semantic search results rather than a tree",
|
|
71
74
|
],
|
|
72
|
-
|
|
75
|
+
commandSamples: [
|
|
73
76
|
"npx indexer-cli structure",
|
|
74
77
|
"npx indexer-cli structure --path-prefix src/<area>",
|
|
75
78
|
"npx indexer-cli structure --kind function",
|
|
76
79
|
],
|
|
77
|
-
|
|
78
|
-
"
|
|
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.",
|
|
79
84
|
],
|
|
80
85
|
},
|
|
81
86
|
{
|
|
82
87
|
name: "repo-architecture",
|
|
83
88
|
directory: "repo-architecture",
|
|
84
|
-
description: "
|
|
89
|
+
description: "FIRST choice for high-level repo shape questions. Load this before manual exploration when you need entry points, major modules, and cross-module dependencies for a subsystem or repo.",
|
|
85
90
|
heading: "Use repo-architecture for dependency-graph questions",
|
|
86
91
|
purpose: "Use this when the agent needs a high-level snapshot of modules, entry points, and dependency shape before going deeper.",
|
|
87
92
|
allowedTools: ["Bash(npx indexer-cli architecture:*)"],
|
|
@@ -94,15 +99,19 @@ const SKILL_DEFINITIONS = [
|
|
|
94
99
|
"You need callers/callees for one specific file or symbol",
|
|
95
100
|
"You need dense narrative context instead of a graph-shaped overview",
|
|
96
101
|
],
|
|
97
|
-
|
|
102
|
+
commandSamples: [
|
|
98
103
|
"npx indexer-cli architecture",
|
|
99
104
|
"npx indexer-cli architecture --path-prefix src/<area>",
|
|
100
105
|
],
|
|
106
|
+
cliReference: [
|
|
107
|
+
"Output: JSON by default; use --txt for human-readable text.",
|
|
108
|
+
"Options: --path-prefix <string>, --include-fixtures, --txt.",
|
|
109
|
+
],
|
|
101
110
|
},
|
|
102
111
|
{
|
|
103
112
|
name: "repo-context",
|
|
104
113
|
directory: "repo-context",
|
|
105
|
-
description: "
|
|
114
|
+
description: "FIRST choice for changed-area and subsystem summaries. Load this before opening many files when you need whole-repo orientation, changed-scope context, or a dependency-neighborhood snapshot without exact implementation snippets.",
|
|
106
115
|
heading: "Use repo-context for dense summaries",
|
|
107
116
|
purpose: "Use this when the agent wants a compressed view of a subsystem, changed area, or dependency neighborhood without opening many files.",
|
|
108
117
|
allowedTools: ["Bash(npx indexer-cli context:*)"],
|
|
@@ -115,17 +124,52 @@ const SKILL_DEFINITIONS = [
|
|
|
115
124
|
"You need exact implementation locations or ranked chunks",
|
|
116
125
|
"You need a file tree or architecture graph instead of a summary",
|
|
117
126
|
],
|
|
118
|
-
|
|
127
|
+
commandSamples: [
|
|
119
128
|
"npx indexer-cli context",
|
|
120
129
|
"npx indexer-cli context --scope changed",
|
|
121
130
|
"npx indexer-cli context --scope relevant-to:src/<area>",
|
|
122
131
|
],
|
|
123
|
-
|
|
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: "START HERE when the task is concrete, the owning repo area is unclear, and no more specific skill already matches. Load this before broad search to pick the most relevant repo area, explain why, and suggest the next files to read.",
|
|
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
|
+
],
|
|
124
168
|
},
|
|
125
169
|
{
|
|
126
170
|
name: "symbol-explain",
|
|
127
171
|
directory: "symbol-explain",
|
|
128
|
-
description: "
|
|
172
|
+
description: "FIRST choice once the symbol name is known. Load this before manual caller/signature tracing to get one symbol's signature, module context, and callers fast.",
|
|
129
173
|
heading: "Use symbol-explain for one symbol at a time",
|
|
130
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.",
|
|
131
175
|
allowedTools: ["Bash(npx indexer-cli explain:*)"],
|
|
@@ -138,12 +182,20 @@ const SKILL_DEFINITIONS = [
|
|
|
138
182
|
"You need to discover candidate symbols first",
|
|
139
183
|
"You need repo-wide structure rather than one-symbol context",
|
|
140
184
|
],
|
|
141
|
-
|
|
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
|
+
],
|
|
142
194
|
},
|
|
143
195
|
{
|
|
144
196
|
name: "dependency-trace",
|
|
145
197
|
directory: "dependency-trace",
|
|
146
|
-
description: "
|
|
198
|
+
description: "FIRST choice once the file or module is known and impact matters. Load this before manual import tracing to see callers, callees, and likely change impact.",
|
|
147
199
|
heading: "Use dependency-trace for impact analysis",
|
|
148
200
|
purpose: "Use this when the agent needs to know who imports a module, what it imports, or how far change impact may spread.",
|
|
149
201
|
allowedTools: ["Bash(npx indexer-cli deps:*)"],
|
|
@@ -156,12 +208,18 @@ const SKILL_DEFINITIONS = [
|
|
|
156
208
|
"You need a repo-wide architecture snapshot rather than one trace",
|
|
157
209
|
"You do not yet know the path or symbol to trace",
|
|
158
210
|
],
|
|
159
|
-
|
|
211
|
+
commandSamples: [
|
|
160
212
|
"npx indexer-cli deps <path>",
|
|
161
213
|
"npx indexer-cli deps <path> --direction callers",
|
|
162
214
|
"npx indexer-cli deps <path> --direction callees",
|
|
163
215
|
],
|
|
164
|
-
|
|
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
|
+
],
|
|
165
223
|
},
|
|
166
224
|
];
|
|
167
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":";;;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,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3D,QAAQ,CAAC,IAAI,CACZ,EAAE,EACF,cAAc,EACd,EAAE,EACF,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CACjD,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,IAAI,CACZ,EAAE,EACF,
|
|
1
|
+
{"version":3,"file":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AE,CAAC,iCAAiC,CAAC;QACjD,KAAK,EAAE;YACN,yDAAyD;YACzD,gGAAgG;YAChG,sEAAsE;SACtE;QACD,QAAQ,EAAE;YACT,8CAA8C;YAC9C,6DAA6D;SAC7D;QACD,cAAc,EAAE;YACf,kCAAkC;YAClC,0CAA0C;SAC1C;QACD,YAAY,EAAE;YACb,gDAAgD;YAChD,6DAA6D;YAC7D,iBAAiB;SACjB;KACD;IACD;QACC,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,kBAAkB;QAC7B,WAAW,EACV,6JAA6J;QAC9J,OAAO,EAAE,0CAA0C;QACnD,OAAO,EACN,mHAAmH;QACpH,YAAY,EAAE,CAAC,8BAA8B,CAAC;QAC9C,KAAK,EAAE;YACN,yEAAyE;YACzE,4EAA4E;YAC5E,uDAAuD;SACvD;QACD,QAAQ,EAAE;YACT,kEAAkE;YAClE,iDAAiD;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);
|
package/dist/cli/entry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/cli/entry.ts"],"names":[],"mappings":";;AAAA,yCAAoC;AACpC,gDAAyD;AACzD,kDAA2D;AAC3D,oDAA6D;AAC7D,0DAAmE;AACnE,gEAAyE;AACzE,0DAAmE;AACnE,kDAA2D;AAC3D,sDAA+D;AAC/D,sDAA+D;AAC/D,gDAAyD;AACzD,6CAAuC;AACvC,6DAA0D;AAC1D,iDAA2D;AAE3D,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAC;IAC5C,yBAAyB;IACzB,gBAAgB;IAChB,mBAAmB;IACnB,0BAA0B;CAC1B,CAAC,CAAC;AAEH,SAAS,sBAAsB,CAAC,KAAc;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,EAAE,CAAC;QACvE,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAA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