skillwiki 0.10.78 → 0.10.80
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/dist/{chunk-5XT6MBWA.js → chunk-GPUK2IAW.js} +1 -1
- package/dist/{chunk-CLF6DZ6C.js → chunk-NX3PJ3NK.js} +67 -7
- package/dist/cli.js +41 -23
- package/dist/{managed-write-preflight-LSG2Y24X.js → managed-write-preflight-DEPLZAA6.js} +1 -1
- package/dist/skillwiki-mcp.js +2 -2
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/.codex-plugin/plugin.json +1 -1
- package/skills/.cursor-plugin/plugin.json +1 -1
- package/skills/package.json +1 -1
- package/skills/skills/skillwiki-mcp/SKILL.md +3 -1
- package/skills/skills/using-skillwiki/SKILL.md +3 -3
- package/skills/skills/using-skillwiki/activation.md +1 -1
- package/skills/skills/wiki-query/SKILL.md +1 -0
- package/skills/skillwiki-mcp/SKILL.md +3 -1
- package/skills/using-skillwiki/SKILL.md +3 -3
- package/skills/using-skillwiki/activation.md +1 -1
- package/skills/wiki-query/SKILL.md +1 -0
|
@@ -3304,7 +3304,7 @@ function buildCliSurface() {
|
|
|
3304
3304
|
program.command("canvas");
|
|
3305
3305
|
program.command("eval").option("--base <git-ref>").option("--top <n>").option("--wiki <name>");
|
|
3306
3306
|
program.command("overlap").option("--wiki <name>");
|
|
3307
|
-
program.command("query").option("--limit <n>").option("--include-pending").option("--hybrid").option("--wiki <name>");
|
|
3307
|
+
program.command("query").option("--limit <n>").option("--include-pending").option("--scope <scope>").option("--hybrid").option("--wiki <name>");
|
|
3308
3308
|
program.command("vectors");
|
|
3309
3309
|
program.command("sources");
|
|
3310
3310
|
program.command("orphans").option("--wiki <name>");
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
snapshotterAliasForLocalHost,
|
|
41
41
|
toUndirectedWeighted,
|
|
42
42
|
writeDotenv
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-GPUK2IAW.js";
|
|
44
44
|
import {
|
|
45
45
|
atomicWriteText,
|
|
46
46
|
prepareTypedPage
|
|
@@ -1125,8 +1125,46 @@ function findPluginInstallations(home, key = PLUGIN_KEY) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
const codexPlugin = findCodexPlugin(home, key, parsed.pluginName, parsed.marketplace);
|
|
1127
1127
|
if (codexPlugin) installs.push(codexPlugin);
|
|
1128
|
+
const grokPlugin = findGrokPlugin(home, key, parsed.pluginName, parsed.marketplace);
|
|
1129
|
+
if (grokPlugin) installs.push(grokPlugin);
|
|
1128
1130
|
return installs;
|
|
1129
1131
|
}
|
|
1132
|
+
function findGrokPlugin(home, key, pluginName, marketplace) {
|
|
1133
|
+
const pluginsRoot = join6(home, ".grok", "installed-plugins");
|
|
1134
|
+
if (!existsSync3(pluginsRoot)) return null;
|
|
1135
|
+
let entries;
|
|
1136
|
+
try {
|
|
1137
|
+
entries = readdirSync(pluginsRoot, { withFileTypes: true });
|
|
1138
|
+
} catch {
|
|
1139
|
+
return null;
|
|
1140
|
+
}
|
|
1141
|
+
let best = null;
|
|
1142
|
+
for (const entry of entries) {
|
|
1143
|
+
if (!entry.isDirectory()) continue;
|
|
1144
|
+
const installPath = join6(pluginsRoot, entry.name);
|
|
1145
|
+
let manifest;
|
|
1146
|
+
try {
|
|
1147
|
+
manifest = JSON.parse(readFileSync2(join6(installPath, ".claude-plugin", "plugin.json"), "utf8"));
|
|
1148
|
+
} catch {
|
|
1149
|
+
continue;
|
|
1150
|
+
}
|
|
1151
|
+
if (manifest.name !== pluginName) continue;
|
|
1152
|
+
if (typeof manifest.version !== "string" || manifest.version.length === 0) continue;
|
|
1153
|
+
const candidate = {
|
|
1154
|
+
channel: "grok",
|
|
1155
|
+
label: "Grok",
|
|
1156
|
+
key,
|
|
1157
|
+
pluginName,
|
|
1158
|
+
marketplace,
|
|
1159
|
+
installPath,
|
|
1160
|
+
version: manifest.version
|
|
1161
|
+
};
|
|
1162
|
+
if (!best || semverGt(candidate.version, best.version)) {
|
|
1163
|
+
best = candidate;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
return best;
|
|
1167
|
+
}
|
|
1130
1168
|
function findCodexPlugin(home, key, pluginName, marketplace) {
|
|
1131
1169
|
const config = readCodexPluginConfig(home, key, marketplace);
|
|
1132
1170
|
if (!config?.enabled) return null;
|
|
@@ -2676,6 +2714,9 @@ function pluginUpdateCommand(plugin, currentVersion) {
|
|
|
2676
2714
|
if (plugin.channel === "claude") {
|
|
2677
2715
|
return "claude plugin update skillwiki@llm-wiki";
|
|
2678
2716
|
}
|
|
2717
|
+
if (plugin.channel === "grok") {
|
|
2718
|
+
return "grok plugin update skillwiki";
|
|
2719
|
+
}
|
|
2679
2720
|
if (plugin.sourceType === "git") {
|
|
2680
2721
|
return "codex plugin marketplace upgrade llm-wiki && codex plugin remove skillwiki@llm-wiki && codex plugin add skillwiki@llm-wiki";
|
|
2681
2722
|
}
|
|
@@ -6208,11 +6249,24 @@ var CONCEPT_INDICATORS = /* @__PURE__ */ new Set([
|
|
|
6208
6249
|
"model",
|
|
6209
6250
|
"definition"
|
|
6210
6251
|
]);
|
|
6252
|
+
function resolveQueryScope(value) {
|
|
6253
|
+
const scope = value ?? "typed";
|
|
6254
|
+
if (scope === "typed" || scope === "work" || scope === "all") return scope;
|
|
6255
|
+
return null;
|
|
6256
|
+
}
|
|
6211
6257
|
async function runQuery(input) {
|
|
6212
6258
|
const scan = await scanVault(input.vault);
|
|
6213
6259
|
if (!scan.ok) return { exitCode: ExitCode.VAULT_PATH_INVALID, result: scan };
|
|
6260
|
+
const scope = resolveQueryScope(input.scope);
|
|
6261
|
+
if (!scope) {
|
|
6262
|
+
return {
|
|
6263
|
+
exitCode: ExitCode.USAGE,
|
|
6264
|
+
result: err("USAGE", { message: "scope must be typed, work, or all" })
|
|
6265
|
+
};
|
|
6266
|
+
}
|
|
6214
6267
|
const limit = input.limit ?? 10;
|
|
6215
6268
|
const queryTerms = tokenize2(input.text);
|
|
6269
|
+
const candidates = queryCandidates(scan.data.typedKnowledge, scan.data.workItems, scope);
|
|
6216
6270
|
if (queryTerms.length === 0) {
|
|
6217
6271
|
return {
|
|
6218
6272
|
exitCode: ExitCode.OK,
|
|
@@ -6221,12 +6275,12 @@ async function runQuery(input) {
|
|
|
6221
6275
|
}
|
|
6222
6276
|
const graph = await loadOrBuildGraph(input.vault);
|
|
6223
6277
|
const pages = [];
|
|
6224
|
-
for (const p of
|
|
6278
|
+
for (const p of candidates) {
|
|
6225
6279
|
const text = await readPage(p);
|
|
6226
6280
|
const fm = extractFrontmatter(text);
|
|
6227
6281
|
if (!fm.ok) continue;
|
|
6228
6282
|
const title = String(fm.data.title ?? "");
|
|
6229
|
-
const type = String(fm.data.type ?? "");
|
|
6283
|
+
const type = String(fm.data.type ?? (p.relPath.includes("/work/") ? "work" : ""));
|
|
6230
6284
|
const tags = Array.isArray(fm.data.tags) ? fm.data.tags.map(String) : [];
|
|
6231
6285
|
const sources = Array.isArray(fm.data.sources) ? fm.data.sources.map(String) : [];
|
|
6232
6286
|
const split = splitFrontmatter(text);
|
|
@@ -6320,6 +6374,11 @@ ${pendingSources.length} matching pending source(s)` : "no matching pages found"
|
|
|
6320
6374
|
})
|
|
6321
6375
|
};
|
|
6322
6376
|
}
|
|
6377
|
+
function queryCandidates(typedKnowledge, workItems, scope) {
|
|
6378
|
+
if (scope === "work") return workItems;
|
|
6379
|
+
if (scope === "all") return [...typedKnowledge, ...workItems];
|
|
6380
|
+
return typedKnowledge;
|
|
6381
|
+
}
|
|
6323
6382
|
function scoreSourceOverlap(page, allPages, seedPaths) {
|
|
6324
6383
|
if (page.sources.length === 0) return 0;
|
|
6325
6384
|
let total = 0;
|
|
@@ -6601,17 +6660,18 @@ function registerMcpTools(server) {
|
|
|
6601
6660
|
server.registerTool(
|
|
6602
6661
|
"skillwiki.query",
|
|
6603
6662
|
{
|
|
6604
|
-
description: "Ranked vault query
|
|
6663
|
+
description: "Ranked vault query. Default scope is typed knowledge. Use scope=work or all for Layer-3 work items. Returns Result envelope JSON.",
|
|
6605
6664
|
inputSchema: z.object({
|
|
6606
6665
|
...vaultFields,
|
|
6607
6666
|
text: z.string().min(1).describe("Query text"),
|
|
6608
|
-
limit: z.number().int().positive().optional().describe("Max results (default 10)")
|
|
6667
|
+
limit: z.number().int().positive().optional().describe("Max results (default 10)"),
|
|
6668
|
+
scope: z.enum(["typed", "work", "all"]).optional().describe("typed (default), work, or all")
|
|
6609
6669
|
})
|
|
6610
6670
|
},
|
|
6611
|
-
async ({ vault, wiki, text, limit }) => runMcpToolHandler("skillwiki.query", { vault, wiki }, async () => {
|
|
6671
|
+
async ({ vault, wiki, text, limit, scope }) => runMcpToolHandler("skillwiki.query", { vault, wiki }, async () => {
|
|
6612
6672
|
const v = await resolveMcpVault({ vault, wiki });
|
|
6613
6673
|
if (!v.ok) return formatToolResult({ exitCode: 25, result: v });
|
|
6614
|
-
const r = await runQuery({ vault: v.data.vault, text, limit });
|
|
6674
|
+
const r = await runQuery({ vault: v.data.vault, text, limit, scope });
|
|
6615
6675
|
return formatToolResult(r);
|
|
6616
6676
|
})
|
|
6617
6677
|
);
|
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
snapshotterHealthChecks,
|
|
51
51
|
upsertIndexEntry,
|
|
52
52
|
vectorIndexStatus
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-NX3PJ3NK.js";
|
|
54
54
|
import {
|
|
55
55
|
normalizeDistTag,
|
|
56
56
|
readCache,
|
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
supersedeStaleReviewRequiredJournals,
|
|
152
152
|
taxonomyCommentForPage,
|
|
153
153
|
writeDotenv
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-GPUK2IAW.js";
|
|
155
155
|
import {
|
|
156
156
|
assertTargetInsideVault,
|
|
157
157
|
atomicWriteText,
|
|
@@ -1456,13 +1456,13 @@ function mergeLogConflictStages(input) {
|
|
|
1456
1456
|
const out = [];
|
|
1457
1457
|
const deduped = [];
|
|
1458
1458
|
const push = (entry) => {
|
|
1459
|
-
const
|
|
1460
|
-
if (
|
|
1461
|
-
if (seenMarkers.has(
|
|
1462
|
-
deduped.push(
|
|
1459
|
+
const marker = publishId(entry);
|
|
1460
|
+
if (marker) {
|
|
1461
|
+
if (seenMarkers.has(marker)) {
|
|
1462
|
+
deduped.push(marker);
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
|
-
seenMarkers.add(
|
|
1465
|
+
seenMarkers.add(marker);
|
|
1466
1466
|
} else if (seenExact.has(entry)) {
|
|
1467
1467
|
return;
|
|
1468
1468
|
} else {
|
|
@@ -1768,10 +1768,27 @@ import { join as join10 } from "path";
|
|
|
1768
1768
|
function day(event) {
|
|
1769
1769
|
return event.occurred_at.slice(0, 10);
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function renderLogEventMarker(event) {
|
|
1772
1772
|
return `<!-- skillwiki-log-event:${event.operation_id} -->`;
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function verbatimField(event) {
|
|
1775
|
+
if (event.kind === "legacy-log-entry" && typeof event.metadata.legacy_markdown === "string") {
|
|
1776
|
+
return event.metadata.legacy_markdown;
|
|
1777
|
+
}
|
|
1778
|
+
if (event.kind === "log-append" && typeof event.metadata.appended_markdown === "string") {
|
|
1779
|
+
return event.metadata.appended_markdown;
|
|
1780
|
+
}
|
|
1781
|
+
return void 0;
|
|
1782
|
+
}
|
|
1783
|
+
function verbatimMarkdown(raw, event) {
|
|
1784
|
+
const text = raw.trimEnd();
|
|
1785
|
+
const mark = renderLogEventMarker(event);
|
|
1786
|
+
return text.includes(mark) ? text : `${text}
|
|
1787
|
+
${mark}`;
|
|
1788
|
+
}
|
|
1789
|
+
function renderLogEventBody(event) {
|
|
1790
|
+
const raw = verbatimField(event);
|
|
1791
|
+
if (raw !== void 0) return verbatimMarkdown(raw, event);
|
|
1775
1792
|
if (event.kind === "page-publish" || event.kind === "project-page-publish") {
|
|
1776
1793
|
const tax = Array.isArray(event.metadata.taxonomy_added) ? event.metadata.taxonomy_added : [];
|
|
1777
1794
|
const project = typeof event.metadata.project === "string" ? event.metadata.project : void 0;
|
|
@@ -1782,12 +1799,6 @@ function bodyFor(event) {
|
|
|
1782
1799
|
event.note ? `- Note: ${event.note}` : ""
|
|
1783
1800
|
].filter(Boolean).join("\n");
|
|
1784
1801
|
}
|
|
1785
|
-
if (event.kind === "legacy-log-entry" && typeof event.metadata.legacy_markdown === "string") {
|
|
1786
|
-
const legacy = event.metadata.legacy_markdown.trimEnd();
|
|
1787
|
-
if (legacy.includes(marker(event))) return legacy;
|
|
1788
|
-
return `${legacy}
|
|
1789
|
-
${marker(event)}`;
|
|
1790
|
-
}
|
|
1791
1802
|
if (event.kind === "session-brief" || event.kind === "archive" || event.kind === "remove" || event.kind === "log-entry") {
|
|
1792
1803
|
return [
|
|
1793
1804
|
`- Target: ${event.target}`,
|
|
@@ -1817,12 +1828,18 @@ function renderLogProjection(events) {
|
|
|
1817
1828
|
""
|
|
1818
1829
|
];
|
|
1819
1830
|
for (const event of ordered) {
|
|
1820
|
-
if (event
|
|
1821
|
-
const block =
|
|
1831
|
+
if (verbatimField(event) !== void 0) {
|
|
1832
|
+
const block = renderLogEventBody(event);
|
|
1822
1833
|
lines.push(block.endsWith("\n") ? block.trimEnd() : block, "");
|
|
1823
1834
|
continue;
|
|
1824
1835
|
}
|
|
1825
|
-
lines.push(
|
|
1836
|
+
lines.push(
|
|
1837
|
+
`## [${day(event)}] ${event.kind} | ${event.target}`,
|
|
1838
|
+
"",
|
|
1839
|
+
renderLogEventBody(event),
|
|
1840
|
+
renderLogEventMarker(event),
|
|
1841
|
+
""
|
|
1842
|
+
);
|
|
1826
1843
|
}
|
|
1827
1844
|
return `${lines.join("\n").replace(/\n+$/, "")}
|
|
1828
1845
|
`;
|
|
@@ -6292,8 +6309,8 @@ async function runPipelinePreview(strategy, prepared, vault) {
|
|
|
6292
6309
|
let logAppended;
|
|
6293
6310
|
try {
|
|
6294
6311
|
const logText = await readFile13(logPath, "utf8");
|
|
6295
|
-
const
|
|
6296
|
-
logAppended = !logText.includes(
|
|
6312
|
+
const marker = strategy.publisherKind === "page" ? `<!-- skillwiki-page-publish:${prepared.operationId} -->` : `<!-- skillwiki-project-page-publish:${prepared.operationId} -->`;
|
|
6313
|
+
logAppended = !logText.includes(marker);
|
|
6297
6314
|
} catch (error) {
|
|
6298
6315
|
const result = err("FILE_NOT_FOUND", { path: logPath, ...strategy.publisherKind === "page" ? { message: String(error) } : {} });
|
|
6299
6316
|
return { exitCode: ExitCode.FILE_NOT_FOUND, result };
|
|
@@ -10542,7 +10559,7 @@ async function emitManagedVaultWrite(vault, command, mutate, opts) {
|
|
|
10542
10559
|
if (dirty) {
|
|
10543
10560
|
return emit(dirty, void 0, { postCommit: false });
|
|
10544
10561
|
}
|
|
10545
|
-
const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-
|
|
10562
|
+
const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-DEPLZAA6.js");
|
|
10546
10563
|
const run = await runManagedWriteTransaction2({
|
|
10547
10564
|
vault,
|
|
10548
10565
|
command,
|
|
@@ -10591,7 +10608,7 @@ program.command("overlap [vault]").description("detect typed-knowledge pages tha
|
|
|
10591
10608
|
if (!v.ok) emit({ exitCode: v.exitCode, result: v.payload });
|
|
10592
10609
|
else emit(await runOverlap({ vault: v.vault }), v.vault);
|
|
10593
10610
|
});
|
|
10594
|
-
program.command("query <text> [vault]").description("score and rank vault pages by relevance to a query").option("--limit <n>", "max results to return", (s) => parseInt(s, 10), 10).option("--include-pending", "include a separate pending-evidence channel").option("--hybrid", "RRF-fuse 4-signal ranks with the local TF-IDF cache").option("--wiki <name>", "wiki profile name").action(async (text, vault, opts) => {
|
|
10611
|
+
program.command("query <text> [vault]").description("score and rank vault pages by relevance to a query").option("--limit <n>", "max results to return", (s) => parseInt(s, 10), 10).option("--include-pending", "include a separate pending-evidence channel").option("--scope <scope>", "typed, work, or all (default typed)").option("--hybrid", "RRF-fuse 4-signal ranks with the local TF-IDF cache").option("--wiki <name>", "wiki profile name").action(async (text, vault, opts) => {
|
|
10595
10612
|
const v = await resolveVaultArg(vault, opts.wiki);
|
|
10596
10613
|
if (!v.ok) emit({ exitCode: v.exitCode, result: v.payload });
|
|
10597
10614
|
else emit(await runQuery({
|
|
@@ -10599,7 +10616,8 @@ program.command("query <text> [vault]").description("score and rank vault pages
|
|
|
10599
10616
|
vault: v.vault,
|
|
10600
10617
|
limit: opts.limit,
|
|
10601
10618
|
includePending: opts.includePending,
|
|
10602
|
-
hybrid: opts.hybrid
|
|
10619
|
+
hybrid: opts.hybrid,
|
|
10620
|
+
scope: opts.scope
|
|
10603
10621
|
}), v.vault, { postCommit: false });
|
|
10604
10622
|
});
|
|
10605
10623
|
var sourcesCmd = program.command("sources").description("inspect raw-source lifecycle state");
|
package/dist/skillwiki-mcp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runSkillwikiMcpStdio
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NX3PJ3NK.js";
|
|
5
5
|
import "./chunk-7I2TPIV5.js";
|
|
6
6
|
import "./chunk-KFEOMMWK.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-GPUK2IAW.js";
|
|
8
8
|
import "./chunk-BPJ5KWIT.js";
|
|
9
9
|
import "./chunk-NPTIYO2S.js";
|
|
10
10
|
import "./chunk-OMO45AHI.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.80",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.80",
|
|
4
4
|
"description": "Project-aware Karpathy-style knowledge base: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by HTTP MCP wiki_capture.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "karlorz"
|
package/skills/package.json
CHANGED
|
@@ -33,7 +33,7 @@ Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (a
|
|
|
33
33
|
On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
|
|
34
34
|
|
|
35
35
|
1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
|
|
36
|
-
2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content`. Do not
|
|
36
|
+
2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content` (optional `operation_id` is 64 hex). Success returns a receipt (`operation_id`, `event_path`, hashes, `s3_verified`). Verify the exact block via `wiki_read_page(event_path)`. Do not require reading `log.md`. If `log.md` is over 256 KiB, full `wiki_read_page("log.md")` returns `PAGE_TOO_LARGE`; use `tail_bytes` only to browse the newest end.
|
|
37
37
|
3. **Feature-detect work-item and page-publish tools**:
|
|
38
38
|
- When the server advertises `wiki_workitem_write`: use it to create, mutate, or close work items under `projects/<slug>/work/**` or update `projects/<slug>/knowledge.md`, and to save Layer-3 workspace markdown: `projects/<slug>/README.md`, `projects/<slug>/architecture/**/*.md`, `projects/<slug>/requirements/**/*.md`, `projects/<slug>/compound/**/*.md`. Pass `path`, `content`, and `base_sha256` of existing bytes (from `wiki_read_page` or local mirror). On `FILE_CHANGED`, re-read and retry once. Deployed servers that predate the workspace-family allowlist deny those paths — treat that `PATH_DENIED` as "server predates this release"; STOP, do not fall back.
|
|
39
39
|
- When the server advertises `wiki_page_publish`: use it to publish typed Layer-2 pages (`entities/`, `concepts/`, `comparisons/`, `queries/`, `meta/`) using the same CAS protocol.
|
|
@@ -44,6 +44,8 @@ On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/`
|
|
|
44
44
|
|
|
45
45
|
Local `~/wiki` (or `skillwiki path`) is fine for reads. MCP read tools are optional. Prefer ordinary file reads of the local mirror.
|
|
46
46
|
|
|
47
|
+
`wiki_query` is typed knowledge only unless `scope` is `work` or `all`. For queued work, doctor, plugin-drift, or MCP diagnose questions, call `wiki_context` first (active_work) or pass `scope: "work"` / `"all"`. Do not treat a top typed packet hit as the live work queue.
|
|
48
|
+
|
|
47
49
|
## Errors
|
|
48
50
|
|
|
49
51
|
Report handshake, capture, and append failures literally. If tools are missing after a 401 or `missing_prereq`, stop and tell the operator to export `SKILLWIKI_MCP_TOKEN`, run `grok plugin update skillwiki`, and start a new session. Do not fall back to local `raw/transcripts/` writes.
|
|
@@ -184,7 +184,7 @@ If the vault has `.WIKI_GIT_FROZEN`:
|
|
|
184
184
|
|-------|----------------|
|
|
185
185
|
| `wiki-init` | Bootstrap a vault and install `_Templates/web-clipper/llm-wiki-clippings.json` plus import guidance |
|
|
186
186
|
| `wiki-ingest` | Convert URLs, files, or pasted text into typed-knowledge pages |
|
|
187
|
-
| `wiki-query` | Search typed knowledge by default; explicitly requested fresh/raw evidence uses the separate pending channel |
|
|
187
|
+
| `wiki-query` | Search typed knowledge by default; work-queue / doctor / MCP diagnose questions use `wiki_context` or `--scope work` / `--scope all`; explicitly requested fresh/raw evidence uses the separate pending channel |
|
|
188
188
|
| `wiki-lint` | Vault health and lint checks; use `health` for whole-system reports and `lint --summary` for bounded lint buckets |
|
|
189
189
|
| `wiki-crystallize` | Distill the current working session into a typed-knowledge page |
|
|
190
190
|
| `wiki-audit` | Verify raw provenance references and source frontmatter integrity |
|
|
@@ -192,7 +192,7 @@ If the vault has `.WIKI_GIT_FROZEN`:
|
|
|
192
192
|
| `wiki-remove` | Remove maintained pages; exact raw disposal uses the separate attended `sources dispose` flow |
|
|
193
193
|
| `wiki-reingest` | Detect drift in raw sources (sha256 comparison) and re-ingest updated content |
|
|
194
194
|
| `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes (captures via wiki_capture on leaf hosts; local raw/transcripts/ only on authoring hosts) |
|
|
195
|
-
| `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts |
|
|
195
|
+
| `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts. `wiki_log_append` returns a receipt; verify via `wiki_read_page(event_path)`. Use `wiki_read_page` `tail_bytes` to browse oversized `log.md`. |
|
|
196
196
|
| `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) into vault pages |
|
|
197
197
|
| `proj-init` | Bootstrap a project workspace (README, requirements, architecture) |
|
|
198
198
|
| `proj-work` | Open or run a work item under a project's work/ directory |
|
|
@@ -286,7 +286,7 @@ Before asking questions or running scheduled maintenance, resolve the session ki
|
|
|
286
286
|
## Typical Workflow
|
|
287
287
|
1. **Init** (`wiki-init`) — create vault, set domain and taxonomy
|
|
288
288
|
2. **Ingest** (`wiki-ingest`) — add sources, build pages
|
|
289
|
-
3. **Query** (`wiki-query`) — search typed knowledge; explicitly include pending captures for fresh/raw intent
|
|
289
|
+
3. **Query** (`wiki-query`) — search typed knowledge; work-queue / doctor / MCP questions use `wiki_context` or `--scope work` / `--scope all`; explicitly include pending captures for fresh/raw intent
|
|
290
290
|
4. **Lint** (`wiki-lint`) — periodic health checks
|
|
291
291
|
5. **Crystallize** (`wiki-crystallize`) — save session insights as pages
|
|
292
292
|
6. **Audit** (`wiki-audit`) — verify source integrity
|
|
@@ -80,7 +80,7 @@ Mutating tools (wiki_workitem_write, wiki_page_publish) enforce CAS concurrency
|
|
|
80
80
|
|
|
81
81
|
### Capture Kinds
|
|
82
82
|
Ad-hoc records via wiki_capture require kind in: task | idea | bug | note.
|
|
83
|
-
Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries.
|
|
83
|
+
Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries. Success returns a receipt; verify via wiki_read_page(event_path). Do not require reading log.md. wiki_read_page accepts optional tail_bytes for browsing oversized pages.
|
|
84
84
|
|
|
85
85
|
### Sensitive Content
|
|
86
86
|
Never send credentials, API keys, auth tokens, passwords, or PII. Redact sensitive values using [REDACTED:<kind>] (e.g. [REDACTED:token]) before writing.
|
|
@@ -14,6 +14,7 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
14
14
|
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
15
15
|
1. **Determine scope.** Ask the user once if ambiguous: vault | current project | project+concepts.
|
|
16
16
|
- Ordinary questions are typed-knowledge-first. Run `skillwiki query "<text>" [vault]` without widening into raw captures. Default ranking is 4-signal only. Optional `skillwiki query "<text>" --hybrid` RRF-fuses that ranking with a rebuildable TF-IDF cache (`skillwiki vectors rebuild`); if the cache is missing, stop and rebuild instead of silently falling back.
|
|
17
|
+
- Setup, MCP, doctor, plugin-drift, or "open work" questions are not typed-knowledge searches. Call `wiki_context` (active_work) or `skillwiki query "<text>" --scope work` / `--scope all`. Default typed query never ranks `projects/*/work`.
|
|
17
18
|
- Explicit freshness language — `new`, `recent`, `fresh`, `clipped`, `raw`, `pending`, `undigested`, `unprocessed`, `not yet ingested`, or `not yet integrated` — requests the pending evidence channel. Run `skillwiki sources pending [vault]` for inventory and `skillwiki query "<text>" [vault] --include-pending` for synthesis support.
|
|
18
19
|
2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
|
|
19
20
|
3. **Compute overlap.** `skillwiki overlap <vault>`.
|
|
@@ -33,7 +33,7 @@ Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (a
|
|
|
33
33
|
On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
|
|
34
34
|
|
|
35
35
|
1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
|
|
36
|
-
2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content`. Do not
|
|
36
|
+
2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content` (optional `operation_id` is 64 hex). Success returns a receipt (`operation_id`, `event_path`, hashes, `s3_verified`). Verify the exact block via `wiki_read_page(event_path)`. Do not require reading `log.md`. If `log.md` is over 256 KiB, full `wiki_read_page("log.md")` returns `PAGE_TOO_LARGE`; use `tail_bytes` only to browse the newest end.
|
|
37
37
|
3. **Feature-detect work-item and page-publish tools**:
|
|
38
38
|
- When the server advertises `wiki_workitem_write`: use it to create, mutate, or close work items under `projects/<slug>/work/**` or update `projects/<slug>/knowledge.md`, and to save Layer-3 workspace markdown: `projects/<slug>/README.md`, `projects/<slug>/architecture/**/*.md`, `projects/<slug>/requirements/**/*.md`, `projects/<slug>/compound/**/*.md`. Pass `path`, `content`, and `base_sha256` of existing bytes (from `wiki_read_page` or local mirror). On `FILE_CHANGED`, re-read and retry once. Deployed servers that predate the workspace-family allowlist deny those paths — treat that `PATH_DENIED` as "server predates this release"; STOP, do not fall back.
|
|
39
39
|
- When the server advertises `wiki_page_publish`: use it to publish typed Layer-2 pages (`entities/`, `concepts/`, `comparisons/`, `queries/`, `meta/`) using the same CAS protocol.
|
|
@@ -44,6 +44,8 @@ On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/`
|
|
|
44
44
|
|
|
45
45
|
Local `~/wiki` (or `skillwiki path`) is fine for reads. MCP read tools are optional. Prefer ordinary file reads of the local mirror.
|
|
46
46
|
|
|
47
|
+
`wiki_query` is typed knowledge only unless `scope` is `work` or `all`. For queued work, doctor, plugin-drift, or MCP diagnose questions, call `wiki_context` first (active_work) or pass `scope: "work"` / `"all"`. Do not treat a top typed packet hit as the live work queue.
|
|
48
|
+
|
|
47
49
|
## Errors
|
|
48
50
|
|
|
49
51
|
Report handshake, capture, and append failures literally. If tools are missing after a 401 or `missing_prereq`, stop and tell the operator to export `SKILLWIKI_MCP_TOKEN`, run `grok plugin update skillwiki`, and start a new session. Do not fall back to local `raw/transcripts/` writes.
|
|
@@ -184,7 +184,7 @@ If the vault has `.WIKI_GIT_FROZEN`:
|
|
|
184
184
|
|-------|----------------|
|
|
185
185
|
| `wiki-init` | Bootstrap a vault and install `_Templates/web-clipper/llm-wiki-clippings.json` plus import guidance |
|
|
186
186
|
| `wiki-ingest` | Convert URLs, files, or pasted text into typed-knowledge pages |
|
|
187
|
-
| `wiki-query` | Search typed knowledge by default; explicitly requested fresh/raw evidence uses the separate pending channel |
|
|
187
|
+
| `wiki-query` | Search typed knowledge by default; work-queue / doctor / MCP diagnose questions use `wiki_context` or `--scope work` / `--scope all`; explicitly requested fresh/raw evidence uses the separate pending channel |
|
|
188
188
|
| `wiki-lint` | Vault health and lint checks; use `health` for whole-system reports and `lint --summary` for bounded lint buckets |
|
|
189
189
|
| `wiki-crystallize` | Distill the current working session into a typed-knowledge page |
|
|
190
190
|
| `wiki-audit` | Verify raw provenance references and source frontmatter integrity |
|
|
@@ -192,7 +192,7 @@ If the vault has `.WIKI_GIT_FROZEN`:
|
|
|
192
192
|
| `wiki-remove` | Remove maintained pages; exact raw disposal uses the separate attended `sources dispose` flow |
|
|
193
193
|
| `wiki-reingest` | Detect drift in raw sources (sha256 comparison) and re-ingest updated content |
|
|
194
194
|
| `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes (captures via wiki_capture on leaf hosts; local raw/transcripts/ only on authoring hosts) |
|
|
195
|
-
| `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts |
|
|
195
|
+
| `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts. `wiki_log_append` returns a receipt; verify via `wiki_read_page(event_path)`. Use `wiki_read_page` `tail_bytes` to browse oversized `log.md`. |
|
|
196
196
|
| `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) into vault pages |
|
|
197
197
|
| `proj-init` | Bootstrap a project workspace (README, requirements, architecture) |
|
|
198
198
|
| `proj-work` | Open or run a work item under a project's work/ directory |
|
|
@@ -286,7 +286,7 @@ Before asking questions or running scheduled maintenance, resolve the session ki
|
|
|
286
286
|
## Typical Workflow
|
|
287
287
|
1. **Init** (`wiki-init`) — create vault, set domain and taxonomy
|
|
288
288
|
2. **Ingest** (`wiki-ingest`) — add sources, build pages
|
|
289
|
-
3. **Query** (`wiki-query`) — search typed knowledge; explicitly include pending captures for fresh/raw intent
|
|
289
|
+
3. **Query** (`wiki-query`) — search typed knowledge; work-queue / doctor / MCP questions use `wiki_context` or `--scope work` / `--scope all`; explicitly include pending captures for fresh/raw intent
|
|
290
290
|
4. **Lint** (`wiki-lint`) — periodic health checks
|
|
291
291
|
5. **Crystallize** (`wiki-crystallize`) — save session insights as pages
|
|
292
292
|
6. **Audit** (`wiki-audit`) — verify source integrity
|
|
@@ -80,7 +80,7 @@ Mutating tools (wiki_workitem_write, wiki_page_publish) enforce CAS concurrency
|
|
|
80
80
|
|
|
81
81
|
### Capture Kinds
|
|
82
82
|
Ad-hoc records via wiki_capture require kind in: task | idea | bug | note.
|
|
83
|
-
Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries.
|
|
83
|
+
Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries. Success returns a receipt; verify via wiki_read_page(event_path). Do not require reading log.md. wiki_read_page accepts optional tail_bytes for browsing oversized pages.
|
|
84
84
|
|
|
85
85
|
### Sensitive Content
|
|
86
86
|
Never send credentials, API keys, auth tokens, passwords, or PII. Redact sensitive values using [REDACTED:<kind>] (e.g. [REDACTED:token]) before writing.
|
|
@@ -14,6 +14,7 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
14
14
|
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
15
15
|
1. **Determine scope.** Ask the user once if ambiguous: vault | current project | project+concepts.
|
|
16
16
|
- Ordinary questions are typed-knowledge-first. Run `skillwiki query "<text>" [vault]` without widening into raw captures. Default ranking is 4-signal only. Optional `skillwiki query "<text>" --hybrid` RRF-fuses that ranking with a rebuildable TF-IDF cache (`skillwiki vectors rebuild`); if the cache is missing, stop and rebuild instead of silently falling back.
|
|
17
|
+
- Setup, MCP, doctor, plugin-drift, or "open work" questions are not typed-knowledge searches. Call `wiki_context` (active_work) or `skillwiki query "<text>" --scope work` / `--scope all`. Default typed query never ranks `projects/*/work`.
|
|
17
18
|
- Explicit freshness language — `new`, `recent`, `fresh`, `clipped`, `raw`, `pending`, `undigested`, `unprocessed`, `not yet ingested`, or `not yet integrated` — requests the pending evidence channel. Run `skillwiki sources pending [vault]` for inventory and `skillwiki query "<text>" [vault] --include-pending` for synthesis support.
|
|
18
19
|
2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
|
|
19
20
|
3. **Compute overlap.** `skillwiki overlap <vault>`.
|