@intentic/claude-plugin 1.325.0 → 1.327.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/.claude-plugin/plugin.json +1 -1
- package/dist/fileq.mjs +71332 -71203
- package/dist/notes-evidence.mjs +61 -13
- package/dist/retrieve-output.mjs +9 -4
- package/dist/session-start.mjs +264 -97
- package/dist/stats.mjs +61 -16
- package/generated/skills/field-notes/SKILL.md +1 -1
- package/generated/skills/iq/SKILL.md +9 -3
- package/package.json +4 -4
package/dist/stats.mjs
CHANGED
|
@@ -75,9 +75,6 @@ var MECHANISMS = {
|
|
|
75
75
|
map: { metrics: [ROOT_LISTINGS, CALLS_BEFORE_TARGET], sampleUnit: "opening turns", sample: openingTurn },
|
|
76
76
|
// The brief rides the whole session, so turn 40 is as much evidence as turn 1.
|
|
77
77
|
notes: { metrics: [FAILED_CALLS, CALLS_BEFORE_TARGET], sampleUnit: "conversations", sample: meanOfTurns },
|
|
78
|
-
// Judged on what the long form was written to prevent: calls that fail, calls spent before reaching the work, and
|
|
79
|
-
// the round trips its batching and context-reuse paragraphs ask the agent not to spend.
|
|
80
|
-
guidance: { metrics: [FAILED_CALLS, CALLS_BEFORE_TARGET, ROUND_TRIPS], sampleUnit: "conversations", sample: meanOfTurns },
|
|
81
78
|
// Judged on what it is for, the prompt each call carries, and on what it could cost: a model that has lost a result
|
|
82
79
|
// it needed runs the tool again (more round trips) or guesses (more calls that fail).
|
|
83
80
|
clearing: { metrics: [CONTEXT_PER_CALL, ROUND_TRIPS, FAILED_CALLS], sampleUnit: "conversations", sample: meanOfTurns }
|
|
@@ -125,6 +122,53 @@ var measureExperiment = (turns, design) => {
|
|
|
125
122
|
import { readdirSync, readFileSync } from "node:fs";
|
|
126
123
|
import { basename, dirname, join } from "node:path";
|
|
127
124
|
|
|
125
|
+
// ../../_search/iq/src/recall/transcript/lines.ts
|
|
126
|
+
var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
127
|
+
var asString = (value) => typeof value === "string" ? value : void 0;
|
|
128
|
+
var typeOf = (line) => asString(line["type"]);
|
|
129
|
+
var INTERRUPTION = "[Request interrupted by user";
|
|
130
|
+
var kindOf = (line, text) => {
|
|
131
|
+
if (line["isMeta"] === true) {
|
|
132
|
+
return "meta";
|
|
133
|
+
}
|
|
134
|
+
if (line["isCompactSummary"] === true) {
|
|
135
|
+
return "compaction";
|
|
136
|
+
}
|
|
137
|
+
if (text.startsWith("<local-command-")) {
|
|
138
|
+
return "local-command";
|
|
139
|
+
}
|
|
140
|
+
if (text.startsWith("<command-")) {
|
|
141
|
+
return "command";
|
|
142
|
+
}
|
|
143
|
+
return text.startsWith(INTERRUPTION) ? "interruption" : "typed";
|
|
144
|
+
};
|
|
145
|
+
var promptOf = (line) => {
|
|
146
|
+
if (typeOf(line) !== "user") {
|
|
147
|
+
return void 0;
|
|
148
|
+
}
|
|
149
|
+
const content = asRecord(line["message"])?.["content"];
|
|
150
|
+
let text;
|
|
151
|
+
if (typeof content === "string") {
|
|
152
|
+
text = content;
|
|
153
|
+
} else if (Array.isArray(content)) {
|
|
154
|
+
const texts = [];
|
|
155
|
+
for (const block of content) {
|
|
156
|
+
const record = asRecord(block);
|
|
157
|
+
if (record?.["type"] === "tool_result") {
|
|
158
|
+
return { kind: "tool-result", text: "" };
|
|
159
|
+
}
|
|
160
|
+
const blockText = record?.["type"] === "text" ? asString(record["text"]) : void 0;
|
|
161
|
+
if (blockText !== void 0) {
|
|
162
|
+
texts.push(blockText);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
text = texts.join("\n");
|
|
166
|
+
} else {
|
|
167
|
+
return void 0;
|
|
168
|
+
}
|
|
169
|
+
return { kind: kindOf(line, text), text };
|
|
170
|
+
};
|
|
171
|
+
|
|
128
172
|
// ../agent-context/src/tool-calls.ts
|
|
129
173
|
import { isAbsolute, relative } from "node:path";
|
|
130
174
|
var DISPLAY_NAMES = {
|
|
@@ -138,7 +182,10 @@ var DISPLAY_NAMES = {
|
|
|
138
182
|
webfetch: "WebFetch",
|
|
139
183
|
websearch: "WebSearch",
|
|
140
184
|
task: "Task",
|
|
141
|
-
patch: "Edit"
|
|
185
|
+
patch: "Edit",
|
|
186
|
+
// The page tools a chat draws from (the sandbox's agent/pages), named for a reader rather than by their server.
|
|
187
|
+
mcp__ui__show_page: "Show page",
|
|
188
|
+
mcp__ui__ask_page: "Ask on a page"
|
|
142
189
|
};
|
|
143
190
|
var BROWSER_TOOL = /^mcp__.+__browser_(.+)$/;
|
|
144
191
|
var BROWSER_VERB_NAMES = { take_screenshot: "screenshot" };
|
|
@@ -337,16 +384,9 @@ var isMissing = (error) => {
|
|
|
337
384
|
const code = typeof error === "object" && error !== null ? error.code : void 0;
|
|
338
385
|
return code === "ENOENT" || code === "ENOTDIR";
|
|
339
386
|
};
|
|
340
|
-
var
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
const content = line.message?.content;
|
|
345
|
-
if (Array.isArray(content) && content.some((block) => block["type"] === "tool_result")) {
|
|
346
|
-
return void 0;
|
|
347
|
-
}
|
|
348
|
-
const text = textOf(content);
|
|
349
|
-
return text.startsWith("<local-command-") ? void 0 : text;
|
|
387
|
+
var promptOf2 = (line) => {
|
|
388
|
+
const prompt = promptOf(line);
|
|
389
|
+
return prompt?.kind === "typed" || prompt?.kind === "command" ? prompt.text : void 0;
|
|
350
390
|
};
|
|
351
391
|
var callsOf = (line, options, subagent) => {
|
|
352
392
|
const content = line.message?.content;
|
|
@@ -382,7 +422,12 @@ var failuresOf = (line) => {
|
|
|
382
422
|
return [];
|
|
383
423
|
}
|
|
384
424
|
return content.flatMap(
|
|
385
|
-
(block) => block["type"] === "tool_result" && block["is_error"] === true && typeof block["tool_use_id"] === "string" ? [
|
|
425
|
+
(block) => block["type"] === "tool_result" && block["is_error"] === true && typeof block["tool_use_id"] === "string" ? [
|
|
426
|
+
{
|
|
427
|
+
id: block["tool_use_id"],
|
|
428
|
+
text: (typeof block["content"] === "string" ? block["content"] : textOf(block["content"])).slice(0, FAILURE_TEXT_CHARS)
|
|
429
|
+
}
|
|
430
|
+
] : []
|
|
386
431
|
);
|
|
387
432
|
};
|
|
388
433
|
var readClaudeTranscript = (text, options) => {
|
|
@@ -396,7 +441,7 @@ var readClaudeTranscript = (text, options) => {
|
|
|
396
441
|
}
|
|
397
442
|
sessionId ??= line.sessionId;
|
|
398
443
|
cwd ??= line.cwd;
|
|
399
|
-
const prompt =
|
|
444
|
+
const prompt = promptOf2(line);
|
|
400
445
|
if (prompt !== void 0) {
|
|
401
446
|
turns.push({ index: turns.length, at: stampOf(line) ?? turns.at(-1)?.at ?? 0, prompt, calls: [], failures: [] });
|
|
402
447
|
continue;
|
|
@@ -13,7 +13,7 @@ The evidence is the digest below: this project's own Claude Code sessions, read
|
|
|
13
13
|
|
|
14
14
|
Rank by what it costs a turn NOT to know: how often sessions hit it, how much it costs when they do, and whether they could have found it out cheaply themselves. Rank 1 is the costliest gap. Rank on recent sessions only, and recount every percentage from them rather than carrying the old one forward: a trap sessions stopped hitting, because the code or the environment has since fixed it, drops down or out however costly it once was.
|
|
15
15
|
|
|
16
|
-
SIZE IS PART OF THE RANKING. The intentic plugin sends the
|
|
16
|
+
SIZE IS PART OF THE RANKING. The intentic plugin sends the `meta` block on every turn, then whole sections in rank order until the owner's budget runs out (4,000 characters by default, `meta` included), and stops at the first section that does not fit, so one long section silences every rank below it. The priority table is the order, never sent, so keep its cells to a few words for whoever opens the file; keep each section under about 700 characters, and split anything longer into two ranks. Leave out what every turn is already told elsewhere (the system prompt's working rules, the skills it lists, the search teaching): repeating it spends the budget twice.
|
|
17
17
|
|
|
18
18
|
VERIFY EVERY FACT AGAINST THIS PROJECT BEFORE YOU WRITE IT DOWN. A transcript from six weeks ago is a hypothesis: run the command, list the directory, check the port. A brief that is confidently wrong is worse than no brief, because every turn reads it and none of them will doubt it.
|
|
19
19
|
|
|
@@ -11,6 +11,8 @@ Pick by what you already know:
|
|
|
11
11
|
- **You know the file** (stack trace, failing test) → `iq outline <path>` for its shape, then `iq read <path>::<symbol>`; `iq context path:line` when all you have is a line.
|
|
12
12
|
- **You know the symbol, but want its anchor or callers** → `iq def X` / `iq refs X` — one call, not grep-then-filter.
|
|
13
13
|
- **You don't know where it lives** → bare `iq "…"`. No separate verb for questions.
|
|
14
|
+
- **You have text off a screenshot** (a label, an error, a toast) → bare `iq "the text as shown"`, filled-in values and all. Text the workspace holds verbatim leads the answer; UI text in a translation catalog resolves to its key and answers with the component that renders it, so do not `rg` the key afterwards.
|
|
15
|
+
- **You have an address** (`/agents`, `/sandbox/agent?section=tools`) → `iq '/sandbox/agent?section=tools'`. It answers with the route declaration, the view it loads, and the branch each parameter and query value selects.
|
|
14
16
|
- **Checking your own edit** → `grep`/`rg`. Verification is not discovery.
|
|
15
17
|
|
|
16
18
|
```
|
|
@@ -32,12 +34,16 @@ iq "where do we enforce the secrets floor?"
|
|
|
32
34
|
| several at once | `iq multi "def foo" "refs bar"` |
|
|
33
35
|
| do an answer's anchors hold? | `iq verify answer.md` (or pipe it in) |
|
|
34
36
|
|
|
35
|
-
Every answer opens with a capsule (`answer:`, `candidates:`, `more:`). Read that and stop — do not pipe through `head`; `--budget` already caps output.
|
|
37
|
+
Every answer opens with a capsule (`answer:`, `candidates:`, `more:`). Read that and stop — do not pipe through `head`; `--budget` already caps output. Lines under `answer:` say what it resolved through and what is next to it:
|
|
38
|
+
|
|
39
|
+
- `key: agents.agentActions.noConversationLeft · …/en.json:8 (+4 locales) · used at …/agentActions.ts:178` — the translation key UI text matched, and where code uses it.
|
|
40
|
+
- `route: /sandbox/:tab? at …/router/index.ts:375 loads …/SandboxHub.vue`, then one `tab=agent: …` line per value followed into the view.
|
|
41
|
+
- `siblings: pictureQuickLook.ts · ChatImageThumb.test.ts · …` — the other source files in the answer's folder, the ones iq ranked first. iq usually lands in the right folder; when the answer is a near miss, pick the neighbour from here instead of searching again. Scope with `--in`, `--repo`, `--lang`, `--glob`. Wrong grep habits (`iq search`, `iq ask`) are rewritten to `q`; use canonical forms next time. Full verb list: `iq --help`.
|
|
36
42
|
|
|
37
43
|
A question's `answer:` line ends with a verdict:
|
|
38
44
|
|
|
39
|
-
- `confident` — the top result
|
|
40
|
-
- `ambiguous` — the
|
|
45
|
+
- `confident` — the top result scored as an answer on its own and clearly ahead of the rest, or is an exact match (one translation key, one route, one definition). Read it and stop.
|
|
46
|
+
- `ambiguous` — the most common word: nothing stood out enough to be sure. The answer is usually among the top files, their `siblings:` and the `candidates:`; compare those rather than searching again.
|
|
41
47
|
- `weak` — no result scored as a likely answer, so what you asked about probably does not exist in this workspace. Stop and say so, or rephrase once in the code's own words (the name you would expect it to have). A second `weak` means it is not here. Do not read on through the candidates or fall back to grep hunting for it.
|
|
42
48
|
|
|
43
49
|
**Session recall:** `iq sessions grab "topic"` for ranked excerpts from past sessions; `iq sessions files "topic"` for files those sessions touched. Verify load-bearing hits against current code.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/claude-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.327.0",
|
|
4
4
|
"description": "The intentic Claude Code plugin: trimmed Bash output, a project map and field notes at session start, iq search and fileq teaching, and a /intentic:stats report of what each saved",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@intentic/agent-context": "0.0.0",
|
|
43
|
-
"@intentic/fileq": "1.
|
|
44
|
-
"@intentic/iq": "1.
|
|
43
|
+
"@intentic/fileq": "1.327.0",
|
|
44
|
+
"@intentic/iq": "1.327.0",
|
|
45
45
|
"@intentic/output-cleaners": "0.0.0",
|
|
46
46
|
"@intentic/testing": "0.0.0",
|
|
47
47
|
"@intentic/tsconfig": "0.0.0",
|
|
48
48
|
"@types/bun": "1.4.2",
|
|
49
|
-
"@types/node": "24.
|
|
49
|
+
"@types/node": "24.19.1",
|
|
50
50
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
51
51
|
"esbuild": "0.28.2"
|
|
52
52
|
},
|