skillwiki 0.10.73 → 0.10.76
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-R5SDVKHS.js → chunk-5XT6MBWA.js} +4 -1
- package/dist/{chunk-YKVJ2A3O.js → chunk-CLF6DZ6C.js} +258 -59
- package/dist/cli.js +161 -19
- package/dist/{managed-write-preflight-PUEJOXJO.js → managed-write-preflight-LSG2Y24X.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/agents/proj-work.md +10 -4
- package/skills/package.json +1 -1
- package/skills/proj-work/SKILL.md +7 -5
- package/skills/skills/proj-work/SKILL.md +7 -5
- package/skills/skills/skillwiki-mcp/SKILL.md +11 -2
- package/skills/skills/using-skillwiki/SKILL.md +5 -4
- package/skills/skills/wiki-lint/SKILL.md +2 -2
- package/skills/skills/wiki-sync/SKILL.md +2 -2
- package/skills/skillwiki-mcp/SKILL.md +11 -2
- package/skills/using-skillwiki/SKILL.md +5 -4
- package/skills/wiki-lint/SKILL.md +2 -2
- package/skills/wiki-sync/SKILL.md +2 -2
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-CLF6DZ6C.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-5XT6MBWA.js";
|
|
155
155
|
import {
|
|
156
156
|
assertTargetInsideVault,
|
|
157
157
|
atomicWriteText,
|
|
@@ -4246,24 +4246,45 @@ function parseCoreSemver(version) {
|
|
|
4246
4246
|
if (!m) return null;
|
|
4247
4247
|
return { major: parseInt(m[1], 10), minor: parseInt(m[2], 10), patch: parseInt(m[3], 10) };
|
|
4248
4248
|
}
|
|
4249
|
+
function isAtLeast(parsed, major, minor, patch) {
|
|
4250
|
+
return parsed.major > major || parsed.major === major && parsed.minor > minor || parsed.major === major && parsed.minor === minor && parsed.patch >= patch;
|
|
4251
|
+
}
|
|
4252
|
+
function isBelow(parsed, major, minor, patch) {
|
|
4253
|
+
return !isAtLeast(parsed, major, minor, patch);
|
|
4254
|
+
}
|
|
4249
4255
|
function needs0101Migration(previousVersion, newVersion) {
|
|
4250
4256
|
const p = parseCoreSemver(previousVersion);
|
|
4251
4257
|
const n = parseCoreSemver(newVersion);
|
|
4252
4258
|
if (!p || !n) return false;
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4259
|
+
return isBelow(p, 0, 10, 1) && isAtLeast(n, 0, 10, 1);
|
|
4260
|
+
}
|
|
4261
|
+
function needsHttpMcpMigration(previousVersion, newVersion) {
|
|
4262
|
+
const p = parseCoreSemver(previousVersion);
|
|
4263
|
+
const n = parseCoreSemver(newVersion);
|
|
4264
|
+
if (!p || !n) return false;
|
|
4265
|
+
return isBelow(p, 0, 10, 70) && isAtLeast(n, 0, 10, 70);
|
|
4256
4266
|
}
|
|
4257
4267
|
function migrationNotesForUpgrade(previousVersion, newVersion) {
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4268
|
+
const notes = [];
|
|
4269
|
+
if (needs0101Migration(previousVersion, newVersion)) {
|
|
4270
|
+
notes.push(
|
|
4271
|
+
"Migration 0.10.1:",
|
|
4272
|
+
"- pull helper resolves from dist/ + host vault-sync install",
|
|
4273
|
+
"- run: skillwiki doctor",
|
|
4274
|
+
"- if managed writes blocked: skillwiki sync journal list",
|
|
4275
|
+
"- then: skillwiki sync journal clear-stale --dry-run",
|
|
4276
|
+
"- legacy override: SKILLWIKI_VAULT_SYNC_PULL_HELPER=<path-to-wiki-pull-with-auto-resolve.sh>"
|
|
4277
|
+
);
|
|
4278
|
+
}
|
|
4279
|
+
if (needsHttpMcpMigration(previousVersion, newVersion)) {
|
|
4280
|
+
notes.push(
|
|
4281
|
+
"Migration HTTP MCP:",
|
|
4282
|
+
"- upgrade the plugin channel, then start a new session (plugin instructions do not hot-swap)",
|
|
4283
|
+
"- run: skillwiki doctor --check-mcp",
|
|
4284
|
+
"- frozen-leaf hosts write via HTTP MCP only; do not local-write raw/transcripts/ or vault git"
|
|
4285
|
+
);
|
|
4286
|
+
}
|
|
4287
|
+
return notes;
|
|
4267
4288
|
}
|
|
4268
4289
|
function resolveGlobalSkillsRoot() {
|
|
4269
4290
|
try {
|
|
@@ -10272,8 +10293,119 @@ async function postCommit(vault, exitCode) {
|
|
|
10272
10293
|
clearLastOp(vault);
|
|
10273
10294
|
}
|
|
10274
10295
|
|
|
10296
|
+
// src/commands/mcp-auth.ts
|
|
10297
|
+
import { readFileSync as readFileSync17, writeFileSync as writeFileSync8 } from "fs";
|
|
10298
|
+
|
|
10299
|
+
// src/utils/mcp-token-map.ts
|
|
10300
|
+
import { createHash as createHash7, randomBytes } from "crypto";
|
|
10301
|
+
import yaml from "js-yaml";
|
|
10302
|
+
var HOST_ID_RE = /^[a-z][a-z0-9-]{1,62}$/;
|
|
10303
|
+
function parseMcpTokenMap(yamlText) {
|
|
10304
|
+
const parsed = yaml.load(yamlText);
|
|
10305
|
+
const map = /* @__PURE__ */ new Map();
|
|
10306
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
10307
|
+
return map;
|
|
10308
|
+
}
|
|
10309
|
+
const records = parsed;
|
|
10310
|
+
const nested = records.tokens;
|
|
10311
|
+
const source = nested && typeof nested === "object" && !Array.isArray(nested) ? nested : records;
|
|
10312
|
+
for (const [hash, hostId] of Object.entries(source)) {
|
|
10313
|
+
if (hash === "tokens") continue;
|
|
10314
|
+
if (typeof hostId !== "string" || hostId.length === 0) continue;
|
|
10315
|
+
const normalized = hash.trim().toLowerCase();
|
|
10316
|
+
if (!/^[0-9a-f]{64}$/.test(normalized)) continue;
|
|
10317
|
+
map.set(normalized, hostId);
|
|
10318
|
+
}
|
|
10319
|
+
return map;
|
|
10320
|
+
}
|
|
10321
|
+
function generateHostBearer(rng) {
|
|
10322
|
+
const bytes = (rng ?? (() => randomBytes(32)))();
|
|
10323
|
+
const raw = bytes.toString("base64url");
|
|
10324
|
+
const hashHex = createHash7("sha256").update(raw, "utf8").digest("hex");
|
|
10325
|
+
return { raw, hashHex };
|
|
10326
|
+
}
|
|
10327
|
+
function appendHostHash(yamlText, hashHex, hostId) {
|
|
10328
|
+
if (!HOST_ID_RE.test(hostId)) {
|
|
10329
|
+
return { error: "INVALID_HOST_ID" };
|
|
10330
|
+
}
|
|
10331
|
+
const map = parseMcpTokenMap(yamlText);
|
|
10332
|
+
const normalizedHash = hashHex.trim().toLowerCase();
|
|
10333
|
+
if ([...map.values()].includes(hostId)) {
|
|
10334
|
+
return { error: "DUPLICATE_HOST_ID" };
|
|
10335
|
+
}
|
|
10336
|
+
if (map.has(normalizedHash)) {
|
|
10337
|
+
return { error: "DUPLICATE_HASH" };
|
|
10338
|
+
}
|
|
10339
|
+
return { yaml: yamlText.replace(/\s*$/, "") + `
|
|
10340
|
+
${normalizedHash}: ${hostId}
|
|
10341
|
+
` };
|
|
10342
|
+
}
|
|
10343
|
+
|
|
10344
|
+
// src/commands/mcp-auth.ts
|
|
10345
|
+
function isEnoent(error) {
|
|
10346
|
+
return error.code === "ENOENT";
|
|
10347
|
+
}
|
|
10348
|
+
function preflight(error) {
|
|
10349
|
+
return { exitCode: ExitCode.PREFLIGHT_FAILED, result: err(error) };
|
|
10350
|
+
}
|
|
10351
|
+
async function runMcpAuthIssueHost(input) {
|
|
10352
|
+
const isTty = input.isTty ?? Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
10353
|
+
const readFile22 = input.readFile ?? readFileSync17;
|
|
10354
|
+
const writeFile10 = input.writeFile ?? writeFileSync8;
|
|
10355
|
+
const stderrWrite = input.stderrWrite ?? ((s) => {
|
|
10356
|
+
process.stderr.write(s);
|
|
10357
|
+
});
|
|
10358
|
+
const write = Boolean(input.write);
|
|
10359
|
+
const mapPath = input.mapPath;
|
|
10360
|
+
const hostId = input.hostId;
|
|
10361
|
+
if (!mapPath) return preflight("MAP_PATH_REQUIRED");
|
|
10362
|
+
if (!HOST_ID_RE.test(hostId)) return preflight("INVALID_HOST_ID");
|
|
10363
|
+
if (write && !isTty) return preflight("NO_TTY");
|
|
10364
|
+
let yamlText = "";
|
|
10365
|
+
try {
|
|
10366
|
+
yamlText = readFile22(mapPath, "utf8");
|
|
10367
|
+
} catch (error) {
|
|
10368
|
+
if (!isEnoent(error)) throw error;
|
|
10369
|
+
}
|
|
10370
|
+
const map = parseMcpTokenMap(yamlText);
|
|
10371
|
+
if ([...map.values()].includes(hostId)) return preflight("DUPLICATE_HOST_ID");
|
|
10372
|
+
if (!write) {
|
|
10373
|
+
return {
|
|
10374
|
+
exitCode: ExitCode.OK,
|
|
10375
|
+
result: ok({
|
|
10376
|
+
host_id: hostId,
|
|
10377
|
+
hash_prefix: "",
|
|
10378
|
+
map_path: mapPath,
|
|
10379
|
+
wrote: false
|
|
10380
|
+
})
|
|
10381
|
+
};
|
|
10382
|
+
}
|
|
10383
|
+
const { raw, hashHex } = generateHostBearer(input.rng);
|
|
10384
|
+
const appended = appendHostHash(yamlText, hashHex, hostId);
|
|
10385
|
+
if ("error" in appended) return preflight(appended.error);
|
|
10386
|
+
try {
|
|
10387
|
+
writeFile10(mapPath, appended.yaml, { encoding: "utf8", mode: 416 });
|
|
10388
|
+
} catch (error) {
|
|
10389
|
+
if (isEnoent(error)) {
|
|
10390
|
+
return { exitCode: ExitCode.FILE_NOT_FOUND, result: err("FILE_NOT_FOUND") };
|
|
10391
|
+
}
|
|
10392
|
+
throw error;
|
|
10393
|
+
}
|
|
10394
|
+
stderrWrite(`issued host_id=${hostId} copy once: ${raw}
|
|
10395
|
+
`);
|
|
10396
|
+
return {
|
|
10397
|
+
exitCode: ExitCode.OK,
|
|
10398
|
+
result: ok({
|
|
10399
|
+
host_id: hostId,
|
|
10400
|
+
hash_prefix: hashHex.slice(0, 8),
|
|
10401
|
+
map_path: mapPath,
|
|
10402
|
+
wrote: true
|
|
10403
|
+
})
|
|
10404
|
+
};
|
|
10405
|
+
}
|
|
10406
|
+
|
|
10275
10407
|
// src/commands/write-preflight.ts
|
|
10276
|
-
import { existsSync as existsSync15, readFileSync as
|
|
10408
|
+
import { existsSync as existsSync15, readFileSync as readFileSync18, statSync as statSync5 } from "fs";
|
|
10277
10409
|
async function runWritePreflightCommand(input) {
|
|
10278
10410
|
if (!existsSync15(input.vault) || !statSync5(input.vault).isDirectory()) {
|
|
10279
10411
|
return {
|
|
@@ -10289,7 +10421,7 @@ async function runWritePreflightCommand(input) {
|
|
|
10289
10421
|
result: err("FILE_NOT_FOUND", { path: input.priorArtifactFile })
|
|
10290
10422
|
};
|
|
10291
10423
|
}
|
|
10292
|
-
priorText =
|
|
10424
|
+
priorText = readFileSync18(input.priorArtifactFile, "utf8");
|
|
10293
10425
|
}
|
|
10294
10426
|
const checkList = input.checks ? input.checks.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
|
|
10295
10427
|
const result = runWritePreflight({
|
|
@@ -10410,7 +10542,7 @@ async function emitManagedVaultWrite(vault, command, mutate, opts) {
|
|
|
10410
10542
|
if (dirty) {
|
|
10411
10543
|
return emit(dirty, void 0, { postCommit: false });
|
|
10412
10544
|
}
|
|
10413
|
-
const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-
|
|
10545
|
+
const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-LSG2Y24X.js");
|
|
10414
10546
|
const run = await runManagedWriteTransaction2({
|
|
10415
10547
|
vault,
|
|
10416
10548
|
command,
|
|
@@ -11043,13 +11175,14 @@ configCmd.command("get <key>").description("print the value of a config key").ac
|
|
|
11043
11175
|
configCmd.command("set <key> <value>").description("set a config key value").action(async (key, value) => emit(await runConfigSet({ key, value, home: process.env.HOME ?? "" })));
|
|
11044
11176
|
configCmd.command("list").option("--profiles", "show wiki profiles summary", false).description("list all config key=value pairs").action(async (opts) => emit(await runConfigList({ home: process.env.HOME ?? "", profiles: !!opts.profiles })));
|
|
11045
11177
|
configCmd.command("path").description("print the config file path").action(async () => emit(await runConfigPath({ home: process.env.HOME ?? "" })));
|
|
11046
|
-
program.command("doctor").description("diagnose skillwiki setup issues").option("--check-snapshotter", "SSH-probe fleet snapshotter (short timeout)", false).action(async (opts) => emit(await runDoctor({
|
|
11178
|
+
program.command("doctor").description("diagnose skillwiki setup issues").option("--check-snapshotter", "SSH-probe fleet snapshotter (short timeout)", false).option("--check-mcp", "live-handshake HTTP MCP initialize + tools/list (network)", false).action(async (opts) => emit(await runDoctor({
|
|
11047
11179
|
home: process.env.HOME ?? "",
|
|
11048
11180
|
envValue: process.env.WIKI_PATH,
|
|
11049
11181
|
argv: process.argv,
|
|
11050
11182
|
currentVersion: pkg.version,
|
|
11051
11183
|
cwd: process.cwd(),
|
|
11052
|
-
checkSnapshotter: !!opts.checkSnapshotter
|
|
11184
|
+
checkSnapshotter: !!opts.checkSnapshotter,
|
|
11185
|
+
checkMcp: !!opts.checkMcp
|
|
11053
11186
|
})));
|
|
11054
11187
|
program.command("status [vault]").description("output vault diagnostics").option("--wiki <name>", "wiki profile name").action(async (vault, opts) => {
|
|
11055
11188
|
const v = await resolveVaultArg(vault, opts.wiki);
|
|
@@ -11634,6 +11767,15 @@ vectorsCmd.command("prune-page [vault]").description("prune deleted pages from t
|
|
|
11634
11767
|
program.command("mcp").description("start stdio Model Context Protocol server (read-only vault tools)").action(async () => {
|
|
11635
11768
|
await runSkillwikiMcpStdio();
|
|
11636
11769
|
});
|
|
11770
|
+
var mcpAuthCmd = program.command("mcp-auth").description("attended HTTP MCP host-id bearer issuance (metal)");
|
|
11771
|
+
mcpAuthCmd.command("issue-host").description("append a host-id hash to the metal map; print raw once on a TTY").requiredOption("--host-id <id>", "host identity to bind").option("--map <path>", "hash map file (defaults to SKILLWIKI_MCP_TOKEN_MAP)").option("--write", "append the hash (default is dry-run)", false).action(async (opts) => {
|
|
11772
|
+
const mapPath = opts.map || process.env.SKILLWIKI_MCP_TOKEN_MAP || "";
|
|
11773
|
+
emit(await runMcpAuthIssueHost({
|
|
11774
|
+
hostId: String(opts.hostId),
|
|
11775
|
+
mapPath,
|
|
11776
|
+
write: !!opts.write
|
|
11777
|
+
}));
|
|
11778
|
+
});
|
|
11637
11779
|
for (const w of getDeprecatedWarnings(process.env.HOME ?? "")) {
|
|
11638
11780
|
process.stderr.write(w + "\n");
|
|
11639
11781
|
}
|
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-CLF6DZ6C.js";
|
|
5
5
|
import "./chunk-7I2TPIV5.js";
|
|
6
6
|
import "./chunk-KFEOMMWK.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-5XT6MBWA.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.76",
|
|
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.76",
|
|
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"
|
|
@@ -21,10 +21,15 @@ You are a project work item manager specializing in creating and executing work
|
|
|
21
21
|
|
|
22
22
|
**Execution Process:**
|
|
23
23
|
|
|
24
|
-
If `$VAULT/.WIKI_GIT_FROZEN` exists after `skillwiki path`:
|
|
24
|
+
If `$VAULT/.WIKI_GIT_FROZEN` exists after `skillwiki path`:
|
|
25
|
+
- Existing work folder reads are allowed.
|
|
26
|
+
- Git add/commit/push and wiki-sync remain **fail closed**.
|
|
27
|
+
- **If live MCP tools include `wiki_workitem_write`**: create, mutate, or close work items via MCP `wiki_workitem_write` (using CAS base_sha256). Do not write local files in `~/wiki`.
|
|
28
|
+
- **If live MCP tools include `wiki_page_publish`**: publish typed pages via MCP `wiki_page_publish` CAS.
|
|
29
|
+
- **If those tools are absent**: capture a close note via HTTP MCP `wiki_capture` or STOP. Do not local-write.
|
|
25
30
|
|
|
26
31
|
### Creating a New Work Item
|
|
27
|
-
1. **Resolve vault.** Run `skillwiki path`. If `.WIKI_GIT_FROZEN` exists,
|
|
32
|
+
1. **Resolve vault.** Run `skillwiki path`. If `.WIKI_GIT_FROZEN` exists, follow the freeze rule above (MCP `wiki_workitem_write` when advertised; otherwise STOP). Do not local-create.
|
|
28
33
|
2. **Determine slug and kind.** From task prompt: kind (`feature` | `issue` | `refactor` | `decision`) and work slug.
|
|
29
34
|
3. **Create folder.** `projects/{slug}/work/YYYY-MM-DD-{work-slug}/`.
|
|
30
35
|
4. **Write spec.md.** Frontmatter with kind, status=planned, project wikilink. Body with context and scope.
|
|
@@ -55,13 +60,14 @@ Return:
|
|
|
55
60
|
- Log entries appended
|
|
56
61
|
|
|
57
62
|
**Stop Conditions:**
|
|
58
|
-
- `$VAULT/.WIKI_GIT_FROZEN` exists and the task would create, mutate, or close a work item
|
|
63
|
+
- `$VAULT/.WIKI_GIT_FROZEN` exists and the task would create, mutate, or close a work item when `wiki_workitem_write` is absent from live MCP tools
|
|
59
64
|
- `validate` non-zero
|
|
60
65
|
- Conflicting work folder name
|
|
61
66
|
- No project context and no `playground` fallback
|
|
62
67
|
|
|
63
68
|
**Forbidden:**
|
|
64
|
-
- Creating or mutating work items on a vault that has `.WIKI_GIT_FROZEN`
|
|
69
|
+
- Creating or mutating local work items on a vault that has `.WIKI_GIT_FROZEN` (use MCP `wiki_workitem_write` when advertised)
|
|
70
|
+
- `git add` / `git commit` / `git push` on a vault that has `.WIKI_GIT_FROZEN`
|
|
65
71
|
- Writing spec/plan files outside the work folder
|
|
66
72
|
- Marking `status: completed` without a `completed:` date
|
|
67
73
|
- Accepting tasks.md DONE labels without independent disk verification
|
package/skills/package.json
CHANGED
|
@@ -33,9 +33,10 @@ Standard four + project context (project README, last ~5 work logs).
|
|
|
33
33
|
After `skillwiki path`, if `$VAULT/.WIKI_GIT_FROZEN` exists:
|
|
34
34
|
|
|
35
35
|
- **Reads** of existing work folders are allowed.
|
|
36
|
-
- **
|
|
37
|
-
- **
|
|
38
|
-
-
|
|
36
|
+
- **Git fail-closed:** Git add/commit/push / `wiki-sync`: still **fail closed**. GitHub is sg01 `wiki-snapshot`.
|
|
37
|
+
- **If the live MCP tool list includes `wiki_workitem_write`**: create, mutate, or close work items via MCP `wiki_workitem_write`. Read current bytes (`wiki_read_page` sha256 or local file hash), pass `path`, `content`, `base_sha256`. On `FILE_CHANGED`, re-read and retry once. Never local-write `~/wiki`.
|
|
38
|
+
- **If the live MCP tool list includes `wiki_page_publish`**: publish typed Layer-2 pages via MCP `wiki_page_publish` with the same CAS. Do not run local `skillwiki page publish` on the frozen leaf.
|
|
39
|
+
- **If those tools are absent** (daemon still captures-only): capture a close note via HTTP MCP `wiki_capture` (`kind: note` or `task`) or STOP. Do not local-write. Do not claim the tools exist.
|
|
39
40
|
|
|
40
41
|
## Executing an Existing Work Item
|
|
41
42
|
|
|
@@ -99,12 +100,13 @@ Rules:
|
|
|
99
100
|
- **Re-marking without doing**: do not simply re-write tasks.md to say DONE without applying the corresponding fix. The next session will find the same gap.
|
|
100
101
|
|
|
101
102
|
## Stop conditions
|
|
102
|
-
- `$VAULT/.WIKI_GIT_FROZEN` exists and the user asked to create, mutate, or close a work item — capture via `wiki_capture` or STOP; do not local-write.
|
|
103
|
+
- `$VAULT/.WIKI_GIT_FROZEN` exists and the user asked to create, mutate, or close a work item when `wiki_workitem_write` is absent from the live MCP tool list — capture via `wiki_capture` or STOP; do not local-write.
|
|
103
104
|
- `validate` non-zero.
|
|
104
105
|
- Conflicting work folder name.
|
|
105
106
|
|
|
106
107
|
## Forbidden
|
|
107
|
-
- Creating or mutating work items on a vault that has `.WIKI_GIT_FROZEN
|
|
108
|
+
- Creating or mutating local work items on a vault that has `.WIKI_GIT_FROZEN` (use MCP `wiki_workitem_write` when advertised).
|
|
109
|
+
- `git add` / `git commit` / `git push` on a vault that has `.WIKI_GIT_FROZEN`.
|
|
108
110
|
- Writing spec/plan files outside the work folder.
|
|
109
111
|
- Marking `status: completed` without a `completed:` date.
|
|
110
112
|
- Accepting tasks.md status labels without independent disk verification.
|
|
@@ -33,9 +33,10 @@ Standard four + project context (project README, last ~5 work logs).
|
|
|
33
33
|
After `skillwiki path`, if `$VAULT/.WIKI_GIT_FROZEN` exists:
|
|
34
34
|
|
|
35
35
|
- **Reads** of existing work folders are allowed.
|
|
36
|
-
- **
|
|
37
|
-
- **
|
|
38
|
-
-
|
|
36
|
+
- **Git fail-closed:** Git add/commit/push / `wiki-sync`: still **fail closed**. GitHub is sg01 `wiki-snapshot`.
|
|
37
|
+
- **If the live MCP tool list includes `wiki_workitem_write`**: create, mutate, or close work items via MCP `wiki_workitem_write`. Read current bytes (`wiki_read_page` sha256 or local file hash), pass `path`, `content`, `base_sha256`. On `FILE_CHANGED`, re-read and retry once. Never local-write `~/wiki`.
|
|
38
|
+
- **If the live MCP tool list includes `wiki_page_publish`**: publish typed Layer-2 pages via MCP `wiki_page_publish` with the same CAS. Do not run local `skillwiki page publish` on the frozen leaf.
|
|
39
|
+
- **If those tools are absent** (daemon still captures-only): capture a close note via HTTP MCP `wiki_capture` (`kind: note` or `task`) or STOP. Do not local-write. Do not claim the tools exist.
|
|
39
40
|
|
|
40
41
|
## Executing an Existing Work Item
|
|
41
42
|
|
|
@@ -99,12 +100,13 @@ Rules:
|
|
|
99
100
|
- **Re-marking without doing**: do not simply re-write tasks.md to say DONE without applying the corresponding fix. The next session will find the same gap.
|
|
100
101
|
|
|
101
102
|
## Stop conditions
|
|
102
|
-
- `$VAULT/.WIKI_GIT_FROZEN` exists and the user asked to create, mutate, or close a work item — capture via `wiki_capture` or STOP; do not local-write.
|
|
103
|
+
- `$VAULT/.WIKI_GIT_FROZEN` exists and the user asked to create, mutate, or close a work item when `wiki_workitem_write` is absent from the live MCP tool list — capture via `wiki_capture` or STOP; do not local-write.
|
|
103
104
|
- `validate` non-zero.
|
|
104
105
|
- Conflicting work folder name.
|
|
105
106
|
|
|
106
107
|
## Forbidden
|
|
107
|
-
- Creating or mutating work items on a vault that has `.WIKI_GIT_FROZEN
|
|
108
|
+
- Creating or mutating local work items on a vault that has `.WIKI_GIT_FROZEN` (use MCP `wiki_workitem_write` when advertised).
|
|
109
|
+
- `git add` / `git commit` / `git push` on a vault that has `.WIKI_GIT_FROZEN`.
|
|
108
110
|
- Writing spec/plan files outside the work folder.
|
|
109
111
|
- Marking `status: completed` without a `completed:` date.
|
|
110
112
|
- Accepting tasks.md status labels without independent disk verification.
|
|
@@ -16,19 +16,28 @@ SkillWiki captures are HTTP MCP only (`type: http`). Claude/Grok use `SKILLWIKI_
|
|
|
16
16
|
- Resolve the installed plugin root from `GROK_PLUGIN_ROOT`, falling back to `CLAUDE_PLUGIN_ROOT`, and run `python3 "$PLUGIN_ROOT/scripts/check_readiness.py" --apply --json` before the first SkillWiki MCP call.
|
|
17
17
|
- **Cursor / Grok Bot:** the Cursor-native plugin requires `SKILLWIKI_MCP_TOKEN` under **Plugins → Configure**. It pins `https://wiki.karldigi.dev/mcp`. Grok Bot does not inherit Mac process env or `~/.cursor/mcp.json`. `failed_to_load` with no token box means this package is missing; after this package is installed, Configure is the token field (same pattern as grok-search).
|
|
18
18
|
- `missing_prereq` means `SKILLWIKI_MCP_TOKEN` is absent from process environment; stop and ask for a bearer. Do not invent a stdio MCP.
|
|
19
|
+
- A new host (a machine that should write the wiki for the first time) needs an issued host-id bearer before handshake can pass. The operator runs `skillwiki mcp-auth issue-host --host-id <id> --write` on metal (TTY required). The client pastes the printed value into process env or host Configure. Do not auto-write `mcp.env`, `mcp.json`, or Grok `config.toml`. Do not invent a second admin skill. A local vault/FUSE mirror is optional.
|
|
20
|
+
- First-run order: install plugin/CLI → operator issues on metal → paste into process env or Configure → **new session** → `skillwiki doctor --check-mcp` → one write (`wiki_capture`, work-item write, or page publish).
|
|
19
21
|
- `in_sync` means the probe has a usable URL/token decision.
|
|
20
22
|
- A 401 is an MCP handshake failure, not a readiness-probe status. Report that the token is missing or rejected and stop.
|
|
21
23
|
- Grok SessionStart cannot inject the parent MCP environment. A restart cannot supply a missing token.
|
|
22
24
|
- Never auto-source `mcp.env` or auto-write `~/.cursor/mcp.json`, Grok `config.toml`, or `mcp.env`.
|
|
23
25
|
- Never print the bearer token.
|
|
24
26
|
|
|
25
|
-
##
|
|
27
|
+
## Upgrade / migration
|
|
28
|
+
|
|
29
|
+
Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (and the CLI where that host has one), then start a **new session** — plugin instructions do not hot-swap. The operator check is the same `skillwiki doctor` as metal: default rows cover URL/auth presence and frozen-leaf write-path; `skillwiki doctor --check-mcp` does the live initialize handshake. Do not invent a second admin skill or HTTP MCP admin tool. `wiki_status` remains daemon health only.
|
|
30
|
+
|
|
31
|
+
## Writes
|
|
26
32
|
|
|
27
33
|
On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
|
|
28
34
|
|
|
29
35
|
1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
|
|
30
36
|
2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content`. Do not rewrite log history.
|
|
31
|
-
3.
|
|
37
|
+
3. **Feature-detect work-item and page-publish tools**:
|
|
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`. Pass `path`, `content`, and `base_sha256` of existing bytes (from `wiki_read_page` or local mirror). On `FILE_CHANGED`, re-read and retry once.
|
|
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.
|
|
40
|
+
- When those tools are **absent** from the live tool list (e.g. server is captures-only): do not call them or claim they exist. If `$VAULT/.WIKI_GIT_FROZEN` exists, fall back to capturing a close note via `wiki_capture` or STOP. Work-item close remains unavailable on the frozen leaf without `wiki_workitem_write`. Do not `git commit` / `wiki-push` against `~/wiki`.
|
|
32
41
|
|
|
33
42
|
## Reads
|
|
34
43
|
|
|
@@ -170,8 +170,9 @@ If the vault has `.WIKI_GIT_FROZEN`:
|
|
|
170
170
|
| Intent | Allowed? | How |
|
|
171
171
|
|---|---|---|
|
|
172
172
|
| Capture note/idea/bug/task | Yes | HTTP MCP `wiki_capture` / `wiki_log_append` |
|
|
173
|
-
| Close or mutate a work item (`projects/*/work/**`, `knowledge.md`) |
|
|
174
|
-
|
|
|
173
|
+
| Close or mutate a work item (`projects/*/work/**`, `knowledge.md`) | Conditional | If live MCP tools include `wiki_workitem_write`, mutate/close via MCP CAS; if absent, capture a close note via MCP `wiki_capture` or STOP. Never local-write. |
|
|
174
|
+
| Publish typed Layer-2 page (`concepts/`, `queries/`, etc.) | Conditional | If live MCP tools include `wiki_page_publish`, publish via MCP CAS; if absent, STOP. Do not run local `skillwiki page publish`. |
|
|
175
|
+
| `wiki-sync` push/commit | **No** | Git fail-closed. GitHub is sg01 `wiki-snapshot`. |
|
|
175
176
|
| Read local `~/wiki` | Yes | Mirror reads only |
|
|
176
177
|
| `/wiki-add-task <text>` | You're in an interactive session on an authoring host | Creates `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md` with ad-hoc capture frontmatter |
|
|
177
178
|
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) on an authoring host | Create a new `.md` file in `raw/transcripts/` — dev-loop discovers it on next cycle; do not edit it after capture |
|
|
@@ -241,11 +242,11 @@ for code changes.
|
|
|
241
242
|
|
|
242
243
|
## CLI Backbone
|
|
243
244
|
All skills are backed by the `skillwiki` CLI — a deterministic tool with no LLM calls. It handles path resolution, config management, validation, health reporting, and linting. Skills invoke it via Bash for the mechanical parts and use the active agent for the creative parts.
|
|
244
|
-
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `vectors rebuild`, `vectors status`, `sources pending`, `sources compile`, `sources review`, `sources reviews`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`, `mcp`.
|
|
245
|
+
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `vectors rebuild`, `vectors status`, `sources pending`, `sources compile`, `sources review`, `sources reviews`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`, `mcp`, `mcp-auth`.
|
|
245
246
|
Optional read-only MCP (`skillwiki mcp`) exposes pending/compile/review list tools. Do not use MCP for compile claim, publish, or review writes.
|
|
246
247
|
`skillwiki claim` binds a transcript to a work item only through an exact `raw/transcripts/...` path in `source:` / `sources:` / `closes:`. A `--project` that contradicts the capture's explicit project is rejected. `skillwiki stale --project` uses exact normalized slugs, not substring matching. `skillwiki claims audit` is the read-only integrity report for duplicate, malformed, dangling, cross-project, and unbacked claims; it never rewrites captures or work items.
|
|
247
248
|
|
|
248
|
-
Run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail` for a bounded whole-system report that includes the nonblocking source-lifecycle backlog. Pending captures are informational and do not make health fail. Run `skillwiki lint <vault> --summary` for lint-only bucket counts with capped examples and details commands. Run `skillwiki doctor` to diagnose setup/runtime issues only. Run `skillwiki config list` to see current configuration.
|
|
249
|
+
Run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail` for a bounded whole-system report that includes the nonblocking source-lifecycle backlog. Pending captures are informational and do not make health fail. Run `skillwiki lint <vault> --summary` for lint-only bucket counts with capped examples and details commands. Run `skillwiki doctor` to diagnose setup/runtime issues only, including HTTP MCP URL/auth presence and the frozen-leaf write path. Pass `--check-mcp` for a live initialize handshake and pin/tool-list lag; the default doctor path does not contact HTTP MCP. New hosts need an issued host-id bearer from metal `skillwiki mcp-auth issue-host` before handshake can pass. There is no second MCP admin skill. Run `skillwiki config list` to see current configuration.
|
|
249
250
|
|
|
250
251
|
## Runtime Host Context and Fleet Freshness
|
|
251
252
|
Resolve the active project vault with `skillwiki path` first. Then pass that exact path to `skillwiki --human fleet context <vault>` for host identity and safety guidance. `fleet context` is authoritative for host identity. It overrides stale injected SessionStart context, remembered workspace context, and prior conversation summaries. `fleet context` is local and network-free; it reports `identity_status`, resolver trace, warnings, and the fact that remote freshness was not checked.
|
|
@@ -11,13 +11,13 @@ Standard four reads.
|
|
|
11
11
|
## Steps
|
|
12
12
|
0. Resolve vault: `skillwiki path` (record source for context).
|
|
13
13
|
- **CRITICAL**: Verify the correct vault when the user has multiple wiki instances (e.g., ~/wiki vs ~/wiki-fin). User may explicitly specify which vault to target — confirm before destructive operations.
|
|
14
|
-
1. For a whole-system health report, run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail`. Read the JSON envelope from stdout or the report file. Treat `skillwiki doctor` as setup/runtime diagnostics only, not a vault-content health report.
|
|
14
|
+
1. For a whole-system health report, run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail`. Read the JSON envelope from stdout or the report file. Treat `skillwiki doctor` as setup/runtime diagnostics only, not a vault-content health report. HTTP MCP URL, pin lag, handshake, and frozen-leaf write-path belong to `skillwiki doctor` (pass `--check-mcp` for the live handshake). Do not use this skill for client/plugin fleet upgrades.
|
|
15
15
|
2. For lint-only maintenance, run `skillwiki lint <vault> --summary`. This returns bounded bucket counts, capped examples, and `details_command` hints without full item arrays.
|
|
16
16
|
3. Drill into important buckets with `skillwiki lint <vault> --only <bucket>` when examples are insufficient for remediation.
|
|
17
17
|
4. Reason over findings; present grouped by severity with concrete suggested actions per kind. If the CLI was recently updated with new lint checks, re-running lint on the full vault may flag pre-existing pages that predate the new rule — treat these as legitimate findings, not false positives.
|
|
18
18
|
5. Treat `sensitive_content` as a security error. Drill down with `skillwiki lint <vault> --only sensitive_content --human`; never print the secret value. Raw findings are report/quarantine-only: `--fix` must not redact, rewrite, or recompute existing raw evidence. Maintained-page repairs may proceed only through their approved write workflow.
|
|
19
19
|
6. If `log_rotate_needed` is present and the user consents, run `skillwiki log-rotate <vault> --apply`. Otherwise leave alone.
|
|
20
|
-
7. **Post-migration verification**: If the user recently migrated content (e.g., moved entity/concept pages to another vault), re-run `skillwiki lint <vault> --summary` and verify that broken_wikilinks count decreased. Remaining broken links for migrated content indicate pages still referencing the moved files — these should be cleaned up (remove citations or migrate the referencing pages too).
|
|
20
|
+
7. **Post-migration verification**: If the user recently migrated **vault content** (e.g., moved entity/concept pages to another vault), re-run `skillwiki lint <vault> --summary` and verify that broken_wikilinks count decreased. Remaining broken links for migrated content indicate pages still referencing the moved files — these should be cleaned up (remove citations or migrate the referencing pages too). This step is content moves only — not HTTP MCP client/plugin upgrades (those use `skillwiki doctor --check-mcp`).
|
|
21
21
|
8. Append a `log.md` entry summarizing lint counts only when the user asked to record the maintenance result. Do not log routine `health` reports by default.
|
|
22
22
|
## Stop conditions
|
|
23
23
|
None — lint reports all findings even on per-page errors.
|
|
@@ -20,7 +20,7 @@ If `$VAULT/.WIKI_GIT_FROZEN` exists, **fail closed** before any stash, commit, p
|
|
|
20
20
|
|
|
21
21
|
- Do **not** `git add`, `git commit`, `git pull`, `git push`, or `skillwiki sync push`.
|
|
22
22
|
- Captures go through HTTP MCP `wiki_capture` / `wiki_log_append`.
|
|
23
|
-
-
|
|
23
|
+
- Work items mutate/close via MCP `wiki_workitem_write` when advertised by the live MCP server; if absent, capture a close note via MCP `wiki_capture` or STOP. Never local-write or git-commit on the frozen leaf.
|
|
24
24
|
- GitHub promotion is sg01 `wiki-snapshot`, not this leaf.
|
|
25
25
|
- Report the freeze marker and stop. Do not treat dirty `~/wiki` as a sync job.
|
|
26
26
|
|
|
@@ -220,7 +220,7 @@ High-signal safety rule:
|
|
|
220
220
|
Some older deployments separated a cloud-backed live vault from a Git snapshot worktree. That architecture still exists on protected snapshotters, but the snapshot worktree is **pipeline-internal**. Historical recipes that rsync into the worktree, reset it hard to origin/main, or run snapshot shell scripts by hand are obsolete and must not be copied.
|
|
221
221
|
|
|
222
222
|
## Stop conditions
|
|
223
|
-
- `$VAULT/.WIKI_GIT_FROZEN` exists — frozen leaf; refuse git close/sync. Captures via HTTP MCP; work-item close
|
|
223
|
+
- `$VAULT/.WIKI_GIT_FROZEN` exists — frozen leaf; refuse git close/sync. Captures via HTTP MCP; work-item close uses MCP `wiki_workitem_write` if advertised, else fallback capture or STOP.
|
|
224
224
|
- `skillwiki sync status` reports `not_a_repo` — the vault is not a git repository. On protected snapshotters this is expected for the FUSE live path; do not switch to `/root/wiki-git` to force a push.
|
|
225
225
|
- Lint errors are found before a push — do not push until resolved.
|
|
226
226
|
- `git push` or `git pull` fails with a network error — report and stop.
|
|
@@ -16,19 +16,28 @@ SkillWiki captures are HTTP MCP only (`type: http`). Claude/Grok use `SKILLWIKI_
|
|
|
16
16
|
- Resolve the installed plugin root from `GROK_PLUGIN_ROOT`, falling back to `CLAUDE_PLUGIN_ROOT`, and run `python3 "$PLUGIN_ROOT/scripts/check_readiness.py" --apply --json` before the first SkillWiki MCP call.
|
|
17
17
|
- **Cursor / Grok Bot:** the Cursor-native plugin requires `SKILLWIKI_MCP_TOKEN` under **Plugins → Configure**. It pins `https://wiki.karldigi.dev/mcp`. Grok Bot does not inherit Mac process env or `~/.cursor/mcp.json`. `failed_to_load` with no token box means this package is missing; after this package is installed, Configure is the token field (same pattern as grok-search).
|
|
18
18
|
- `missing_prereq` means `SKILLWIKI_MCP_TOKEN` is absent from process environment; stop and ask for a bearer. Do not invent a stdio MCP.
|
|
19
|
+
- A new host (a machine that should write the wiki for the first time) needs an issued host-id bearer before handshake can pass. The operator runs `skillwiki mcp-auth issue-host --host-id <id> --write` on metal (TTY required). The client pastes the printed value into process env or host Configure. Do not auto-write `mcp.env`, `mcp.json`, or Grok `config.toml`. Do not invent a second admin skill. A local vault/FUSE mirror is optional.
|
|
20
|
+
- First-run order: install plugin/CLI → operator issues on metal → paste into process env or Configure → **new session** → `skillwiki doctor --check-mcp` → one write (`wiki_capture`, work-item write, or page publish).
|
|
19
21
|
- `in_sync` means the probe has a usable URL/token decision.
|
|
20
22
|
- A 401 is an MCP handshake failure, not a readiness-probe status. Report that the token is missing or rejected and stop.
|
|
21
23
|
- Grok SessionStart cannot inject the parent MCP environment. A restart cannot supply a missing token.
|
|
22
24
|
- Never auto-source `mcp.env` or auto-write `~/.cursor/mcp.json`, Grok `config.toml`, or `mcp.env`.
|
|
23
25
|
- Never print the bearer token.
|
|
24
26
|
|
|
25
|
-
##
|
|
27
|
+
## Upgrade / migration
|
|
28
|
+
|
|
29
|
+
Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (and the CLI where that host has one), then start a **new session** — plugin instructions do not hot-swap. The operator check is the same `skillwiki doctor` as metal: default rows cover URL/auth presence and frozen-leaf write-path; `skillwiki doctor --check-mcp` does the live initialize handshake. Do not invent a second admin skill or HTTP MCP admin tool. `wiki_status` remains daemon health only.
|
|
30
|
+
|
|
31
|
+
## Writes
|
|
26
32
|
|
|
27
33
|
On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
|
|
28
34
|
|
|
29
35
|
1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
|
|
30
36
|
2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content`. Do not rewrite log history.
|
|
31
|
-
3.
|
|
37
|
+
3. **Feature-detect work-item and page-publish tools**:
|
|
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`. Pass `path`, `content`, and `base_sha256` of existing bytes (from `wiki_read_page` or local mirror). On `FILE_CHANGED`, re-read and retry once.
|
|
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.
|
|
40
|
+
- When those tools are **absent** from the live tool list (e.g. server is captures-only): do not call them or claim they exist. If `$VAULT/.WIKI_GIT_FROZEN` exists, fall back to capturing a close note via `wiki_capture` or STOP. Work-item close remains unavailable on the frozen leaf without `wiki_workitem_write`. Do not `git commit` / `wiki-push` against `~/wiki`.
|
|
32
41
|
|
|
33
42
|
## Reads
|
|
34
43
|
|
|
@@ -170,8 +170,9 @@ If the vault has `.WIKI_GIT_FROZEN`:
|
|
|
170
170
|
| Intent | Allowed? | How |
|
|
171
171
|
|---|---|---|
|
|
172
172
|
| Capture note/idea/bug/task | Yes | HTTP MCP `wiki_capture` / `wiki_log_append` |
|
|
173
|
-
| Close or mutate a work item (`projects/*/work/**`, `knowledge.md`) |
|
|
174
|
-
|
|
|
173
|
+
| Close or mutate a work item (`projects/*/work/**`, `knowledge.md`) | Conditional | If live MCP tools include `wiki_workitem_write`, mutate/close via MCP CAS; if absent, capture a close note via MCP `wiki_capture` or STOP. Never local-write. |
|
|
174
|
+
| Publish typed Layer-2 page (`concepts/`, `queries/`, etc.) | Conditional | If live MCP tools include `wiki_page_publish`, publish via MCP CAS; if absent, STOP. Do not run local `skillwiki page publish`. |
|
|
175
|
+
| `wiki-sync` push/commit | **No** | Git fail-closed. GitHub is sg01 `wiki-snapshot`. |
|
|
175
176
|
| Read local `~/wiki` | Yes | Mirror reads only |
|
|
176
177
|
| `/wiki-add-task <text>` | You're in an interactive session on an authoring host | Creates `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md` with ad-hoc capture frontmatter |
|
|
177
178
|
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) on an authoring host | Create a new `.md` file in `raw/transcripts/` — dev-loop discovers it on next cycle; do not edit it after capture |
|
|
@@ -241,11 +242,11 @@ for code changes.
|
|
|
241
242
|
|
|
242
243
|
## CLI Backbone
|
|
243
244
|
All skills are backed by the `skillwiki` CLI — a deterministic tool with no LLM calls. It handles path resolution, config management, validation, health reporting, and linting. Skills invoke it via Bash for the mechanical parts and use the active agent for the creative parts.
|
|
244
|
-
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `vectors rebuild`, `vectors status`, `sources pending`, `sources compile`, `sources review`, `sources reviews`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`, `mcp`.
|
|
245
|
+
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `vectors rebuild`, `vectors status`, `sources pending`, `sources compile`, `sources review`, `sources reviews`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`, `mcp`, `mcp-auth`.
|
|
245
246
|
Optional read-only MCP (`skillwiki mcp`) exposes pending/compile/review list tools. Do not use MCP for compile claim, publish, or review writes.
|
|
246
247
|
`skillwiki claim` binds a transcript to a work item only through an exact `raw/transcripts/...` path in `source:` / `sources:` / `closes:`. A `--project` that contradicts the capture's explicit project is rejected. `skillwiki stale --project` uses exact normalized slugs, not substring matching. `skillwiki claims audit` is the read-only integrity report for duplicate, malformed, dangling, cross-project, and unbacked claims; it never rewrites captures or work items.
|
|
247
248
|
|
|
248
|
-
Run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail` for a bounded whole-system report that includes the nonblocking source-lifecycle backlog. Pending captures are informational and do not make health fail. Run `skillwiki lint <vault> --summary` for lint-only bucket counts with capped examples and details commands. Run `skillwiki doctor` to diagnose setup/runtime issues only. Run `skillwiki config list` to see current configuration.
|
|
249
|
+
Run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail` for a bounded whole-system report that includes the nonblocking source-lifecycle backlog. Pending captures are informational and do not make health fail. Run `skillwiki lint <vault> --summary` for lint-only bucket counts with capped examples and details commands. Run `skillwiki doctor` to diagnose setup/runtime issues only, including HTTP MCP URL/auth presence and the frozen-leaf write path. Pass `--check-mcp` for a live initialize handshake and pin/tool-list lag; the default doctor path does not contact HTTP MCP. New hosts need an issued host-id bearer from metal `skillwiki mcp-auth issue-host` before handshake can pass. There is no second MCP admin skill. Run `skillwiki config list` to see current configuration.
|
|
249
250
|
|
|
250
251
|
## Runtime Host Context and Fleet Freshness
|
|
251
252
|
Resolve the active project vault with `skillwiki path` first. Then pass that exact path to `skillwiki --human fleet context <vault>` for host identity and safety guidance. `fleet context` is authoritative for host identity. It overrides stale injected SessionStart context, remembered workspace context, and prior conversation summaries. `fleet context` is local and network-free; it reports `identity_status`, resolver trace, warnings, and the fact that remote freshness was not checked.
|
|
@@ -11,13 +11,13 @@ Standard four reads.
|
|
|
11
11
|
## Steps
|
|
12
12
|
0. Resolve vault: `skillwiki path` (record source for context).
|
|
13
13
|
- **CRITICAL**: Verify the correct vault when the user has multiple wiki instances (e.g., ~/wiki vs ~/wiki-fin). User may explicitly specify which vault to target — confirm before destructive operations.
|
|
14
|
-
1. For a whole-system health report, run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail`. Read the JSON envelope from stdout or the report file. Treat `skillwiki doctor` as setup/runtime diagnostics only, not a vault-content health report.
|
|
14
|
+
1. For a whole-system health report, run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail`. Read the JSON envelope from stdout or the report file. Treat `skillwiki doctor` as setup/runtime diagnostics only, not a vault-content health report. HTTP MCP URL, pin lag, handshake, and frozen-leaf write-path belong to `skillwiki doctor` (pass `--check-mcp` for the live handshake). Do not use this skill for client/plugin fleet upgrades.
|
|
15
15
|
2. For lint-only maintenance, run `skillwiki lint <vault> --summary`. This returns bounded bucket counts, capped examples, and `details_command` hints without full item arrays.
|
|
16
16
|
3. Drill into important buckets with `skillwiki lint <vault> --only <bucket>` when examples are insufficient for remediation.
|
|
17
17
|
4. Reason over findings; present grouped by severity with concrete suggested actions per kind. If the CLI was recently updated with new lint checks, re-running lint on the full vault may flag pre-existing pages that predate the new rule — treat these as legitimate findings, not false positives.
|
|
18
18
|
5. Treat `sensitive_content` as a security error. Drill down with `skillwiki lint <vault> --only sensitive_content --human`; never print the secret value. Raw findings are report/quarantine-only: `--fix` must not redact, rewrite, or recompute existing raw evidence. Maintained-page repairs may proceed only through their approved write workflow.
|
|
19
19
|
6. If `log_rotate_needed` is present and the user consents, run `skillwiki log-rotate <vault> --apply`. Otherwise leave alone.
|
|
20
|
-
7. **Post-migration verification**: If the user recently migrated content (e.g., moved entity/concept pages to another vault), re-run `skillwiki lint <vault> --summary` and verify that broken_wikilinks count decreased. Remaining broken links for migrated content indicate pages still referencing the moved files — these should be cleaned up (remove citations or migrate the referencing pages too).
|
|
20
|
+
7. **Post-migration verification**: If the user recently migrated **vault content** (e.g., moved entity/concept pages to another vault), re-run `skillwiki lint <vault> --summary` and verify that broken_wikilinks count decreased. Remaining broken links for migrated content indicate pages still referencing the moved files — these should be cleaned up (remove citations or migrate the referencing pages too). This step is content moves only — not HTTP MCP client/plugin upgrades (those use `skillwiki doctor --check-mcp`).
|
|
21
21
|
8. Append a `log.md` entry summarizing lint counts only when the user asked to record the maintenance result. Do not log routine `health` reports by default.
|
|
22
22
|
## Stop conditions
|
|
23
23
|
None — lint reports all findings even on per-page errors.
|