skillwiki 0.10.104 → 0.10.106

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.
Files changed (29) hide show
  1. package/dist/{chunk-XYXTV2YD.js → chunk-DTTKCCQ4.js} +2 -2
  2. package/dist/{chunk-QM64LUEY.js → chunk-GJC2CI3W.js} +8 -1
  3. package/dist/{chunk-KDH352MC.js → chunk-HMHMCPCE.js} +1 -1
  4. package/dist/{chunk-F5GFUYPF.js → chunk-JCDAEZVD.js} +1 -1
  5. package/dist/{chunk-PVIOU7BN.js → chunk-PGD3J2GE.js} +3 -3
  6. package/dist/{chunk-H42EY6E7.js → chunk-QU2IXZRN.js} +2 -2
  7. package/dist/{chunk-2BPOEEMW.js → chunk-Z4NCF6K6.js} +7 -7
  8. package/dist/cli.js +10 -10
  9. package/dist/{index-projection-6OHDINHT.js → index-projection-ESBJOBS7.js} +3 -3
  10. package/dist/{managed-write-preflight-ATDFVLJV.js → managed-write-preflight-AYD3CJYD.js} +4 -4
  11. package/dist/skillwiki-mcp.js +7 -7
  12. package/dist/sources-QTQSZMST.js +9 -0
  13. package/dist/vault-sync/scripts/wiki-snapshot.sh +82 -2
  14. package/package.json +1 -1
  15. package/skills/.claude-plugin/plugin.json +1 -1
  16. package/skills/.codex-plugin/plugin.json +1 -1
  17. package/skills/.cursor-plugin/plugin.json +1 -1
  18. package/skills/package.json +1 -1
  19. package/skills/scripts/check_readiness.py +14 -0
  20. package/skills/skills/skillwiki-connect/SKILL.md +1 -0
  21. package/skills/skills/skillwiki-mcp/SKILL.md +9 -6
  22. package/skills/skills/using-skillwiki/activation.md +61 -69
  23. package/skills/skills/wiki-query/SKILL.md +1 -0
  24. package/skills/skillwiki-connect/SKILL.md +1 -0
  25. package/skills/skillwiki-mcp/SKILL.md +9 -6
  26. package/skills/using-skillwiki/activation.md +61 -69
  27. package/skills/wiki-query/SKILL.md +1 -0
  28. package/templates/SCHEMA.md +6 -0
  29. package/dist/sources-OSGKH6KN.js +0 -9
@@ -3,11 +3,11 @@ import {
3
3
  ROOT_INDEX_SECTION_ORDER,
4
4
  atomicWriteText,
5
5
  buildRootIndexUniverse
6
- } from "./chunk-KDH352MC.js";
6
+ } from "./chunk-HMHMCPCE.js";
7
7
  import {
8
8
  err,
9
9
  ok
10
- } from "./chunk-QM64LUEY.js";
10
+ } from "./chunk-GJC2CI3W.js";
11
11
 
12
12
  // src/utils/index-projection.ts
13
13
  import { readFile } from "fs/promises";
@@ -161,6 +161,7 @@ var TypedKnowledgeSchema = z.object({
161
161
  }
162
162
  });
163
163
  var sha256Hex = z.string().regex(/^[0-9a-f]{64}$/);
164
+ var identityToken = z.string().min(1).max(128).regex(/^[a-zA-Z0-9_.-]+$/, "must be bounded alphanumeric token with _.-");
164
165
  var RawSourceSchema = z.object({
165
166
  title: z.string().min(1).optional(),
166
167
  source_url: z.string().nullable(),
@@ -170,7 +171,10 @@ var RawSourceSchema = z.object({
170
171
  sha256: sha256Hex.optional(),
171
172
  project: wikilink.optional(),
172
173
  work_item: wikilink.optional(),
173
- kind: z.enum(["postmortem", "session-log", "meeting-notes", "other", "idea", "bug", "task", "note"]).optional()
174
+ kind: z.enum(["postmortem", "session-log", "meeting-notes", "other", "idea", "bug", "task", "note"]).optional(),
175
+ host: identityToken.optional(),
176
+ agent_role: identityToken.optional(),
177
+ agent_id: identityToken.optional()
174
178
  }).superRefine((v, ctx) => {
175
179
  if (v.work_item !== void 0 && (v.project === void 0 || v.kind === void 0)) {
176
180
  ctx.addIssue({ code: z.ZodIssueCode.custom, message: "project and kind are required when work_item is set" });
@@ -201,6 +205,9 @@ var WorkItemSchema = z.object({
201
205
  parent: wikilink.optional(),
202
206
  related: z.array(wikilink).optional(),
203
207
  sources: z.array(z.string()).optional(),
208
+ host: identityToken.optional(),
209
+ agent_role: identityToken.optional(),
210
+ agent_id: identityToken.optional(),
204
211
  post_release_verification: PostReleaseVerificationSchema.optional()
205
212
  }).superRefine((v, ctx) => {
206
213
  if (v.status === "completed" && !v.completed) {
@@ -8,7 +8,7 @@ import {
8
8
  ok,
9
9
  scanSensitiveContent,
10
10
  scanVault
11
- } from "./chunk-QM64LUEY.js";
11
+ } from "./chunk-GJC2CI3W.js";
12
12
 
13
13
  // src/utils/atomic-write.ts
14
14
  import { randomBytes } from "crypto";
@@ -6,7 +6,7 @@ import {
6
6
  readPage,
7
7
  scanSensitiveContent,
8
8
  splitFrontmatter
9
- } from "./chunk-QM64LUEY.js";
9
+ } from "./chunk-GJC2CI3W.js";
10
10
 
11
11
  // src/utils/vault-path-safety.ts
12
12
  import { lstatSync, realpathSync } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  atomicWriteText,
4
4
  buildRootIndexUniverse
5
- } from "./chunk-KDH352MC.js";
5
+ } from "./chunk-HMHMCPCE.js";
6
6
  import {
7
7
  authorizeRawOperation,
8
8
  buildSourceReferenceIndex,
@@ -22,7 +22,7 @@ import {
22
22
  resolveExistingRegularFileInsideVault,
23
23
  stripFencedBlocks,
24
24
  writeLogEvent
25
- } from "./chunk-F5GFUYPF.js";
25
+ } from "./chunk-JCDAEZVD.js";
26
26
  import {
27
27
  ExitCode,
28
28
  FleetManifestSchema,
@@ -41,7 +41,7 @@ import {
41
41
  scanVault,
42
42
  splitFrontmatter,
43
43
  vaultIoConcurrency
44
- } from "./chunk-QM64LUEY.js";
44
+ } from "./chunk-GJC2CI3W.js";
45
45
 
46
46
  // src/utils/managed-write-preflight.ts
47
47
  import { existsSync as existsSync11 } from "fs";
@@ -8,7 +8,7 @@ import {
8
8
  readLogEvents,
9
9
  resolveExistingRegularFileInsideVault,
10
10
  writeLogEvent
11
- } from "./chunk-F5GFUYPF.js";
11
+ } from "./chunk-JCDAEZVD.js";
12
12
  import {
13
13
  ExitCode,
14
14
  RawSourceSchema,
@@ -19,7 +19,7 @@ import {
19
19
  scanSensitiveContent,
20
20
  scanVault,
21
21
  splitFrontmatter
22
- } from "./chunk-QM64LUEY.js";
22
+ } from "./chunk-GJC2CI3W.js";
23
23
 
24
24
  // src/commands/sources.ts
25
25
  import { readFile as readFile4 } from "fs/promises";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  renderRootIndex,
8
8
  writeRootIndexProjection
9
- } from "./chunk-XYXTV2YD.js";
9
+ } from "./chunk-DTTKCCQ4.js";
10
10
  import {
11
11
  CONFIG_KEYS,
12
12
  VAULT_HYGIENE_GENERATED_COMMIT_PATHS,
@@ -40,11 +40,11 @@ import {
40
40
  snapshotterAliasForLocalHost,
41
41
  toUndirectedWeighted,
42
42
  writeDotenv
43
- } from "./chunk-PVIOU7BN.js";
43
+ } from "./chunk-PGD3J2GE.js";
44
44
  import {
45
45
  atomicWriteText,
46
46
  prepareTypedPage
47
- } from "./chunk-KDH352MC.js";
47
+ } from "./chunk-HMHMCPCE.js";
48
48
  import {
49
49
  applySourceCompileClaim,
50
50
  applySourceCompilePublished,
@@ -57,11 +57,11 @@ import {
57
57
  planSourceCompileRelease,
58
58
  planSourceReview,
59
59
  runSourcesPending
60
- } from "./chunk-H42EY6E7.js";
60
+ } from "./chunk-QU2IXZRN.js";
61
61
  import {
62
62
  eventPathFor,
63
63
  writeLogEvent
64
- } from "./chunk-F5GFUYPF.js";
64
+ } from "./chunk-JCDAEZVD.js";
65
65
  import {
66
66
  CompoundSchema,
67
67
  ExitCode,
@@ -82,7 +82,7 @@ import {
82
82
  scanVault,
83
83
  splitFrontmatter,
84
84
  systemdPropertyFor
85
- } from "./chunk-QM64LUEY.js";
85
+ } from "./chunk-GJC2CI3W.js";
86
86
 
87
87
  // src/commands/log-append.ts
88
88
  import { readFile, stat } from "fs/promises";
@@ -6606,7 +6606,7 @@ async function runQuery(input) {
6606
6606
  }
6607
6607
  let pendingSources;
6608
6608
  if (input.includePending) {
6609
- const { runSourcesPending: runSourcesPending2 } = await import("./sources-OSGKH6KN.js");
6609
+ const { runSourcesPending: runSourcesPending2 } = await import("./sources-QTQSZMST.js");
6610
6610
  const pending = await runSourcesPending2({
6611
6611
  vault: input.vault,
6612
6612
  match: input.text,
package/dist/cli.js CHANGED
@@ -63,7 +63,7 @@ import {
63
63
  snapshotterHealthChecks,
64
64
  upsertIndexEntry,
65
65
  vectorIndexStatus
66
- } from "./chunk-2BPOEEMW.js";
66
+ } from "./chunk-Z4NCF6K6.js";
67
67
  import {
68
68
  normalizeDistTag,
69
69
  readCache,
@@ -76,7 +76,7 @@ import {
76
76
  UNMANAGED_START,
77
77
  renderRootIndex,
78
78
  writeRootIndexProjection
79
- } from "./chunk-XYXTV2YD.js";
79
+ } from "./chunk-DTTKCCQ4.js";
80
80
  import {
81
81
  FLEET_REL_PATH,
82
82
  REDACTED_MALFORMED_REFERENCE,
@@ -168,12 +168,12 @@ import {
168
168
  supersedeStaleReviewRequiredJournals,
169
169
  taxonomyCommentForPage,
170
170
  writeDotenv
171
- } from "./chunk-PVIOU7BN.js";
171
+ } from "./chunk-PGD3J2GE.js";
172
172
  import {
173
173
  assertTargetInsideVault,
174
174
  atomicWriteText,
175
175
  prepareTypedPage
176
- } from "./chunk-KDH352MC.js";
176
+ } from "./chunk-HMHMCPCE.js";
177
177
  import {
178
178
  applySourceDisposition,
179
179
  decodeSourceActionApproval,
@@ -181,7 +181,7 @@ import {
181
181
  inventorySources,
182
182
  planSourceDisposition,
183
183
  runSourcesPending
184
- } from "./chunk-H42EY6E7.js";
184
+ } from "./chunk-QU2IXZRN.js";
185
185
  import {
186
186
  authorizeRawOperation,
187
187
  buildSourceReferenceIndex,
@@ -198,7 +198,7 @@ import {
198
198
  resolveExistingRegularFileInsideVault,
199
199
  validateLogEvent,
200
200
  writeLogEvent
201
- } from "./chunk-F5GFUYPF.js";
201
+ } from "./chunk-JCDAEZVD.js";
202
202
  import {
203
203
  ExitCode,
204
204
  MetaSchema,
@@ -219,7 +219,7 @@ import {
219
219
  scanVault,
220
220
  splitFrontmatter,
221
221
  vaultIoConcurrency
222
- } from "./chunk-QM64LUEY.js";
222
+ } from "./chunk-GJC2CI3W.js";
223
223
 
224
224
  // src/cli.ts
225
225
  import { join as join45 } from "path";
@@ -4117,7 +4117,7 @@ ${fmRewritten}
4117
4117
  }
4118
4118
  let indexUpdated = false;
4119
4119
  if (!isRaw) {
4120
- const { renderRootIndex: renderRootIndex2, writeRootIndexProjection: writeRootIndexProjection2 } = await import("./index-projection-6OHDINHT.js");
4120
+ const { renderRootIndex: renderRootIndex2, writeRootIndexProjection: writeRootIndexProjection2 } = await import("./index-projection-ESBJOBS7.js");
4121
4121
  const before = await readFile8(join20(input.vault, "index.md"), "utf8").catch(() => "");
4122
4122
  const fullTarget = relPath.replace(/\.md$/, "");
4123
4123
  const bare = fullTarget.split("/").pop() ?? fullTarget;
@@ -4240,7 +4240,7 @@ async function runRemove(input) {
4240
4240
  if (relPath.endsWith(".md") && !relPath.startsWith("raw/")) {
4241
4241
  const { readFile: readFile24 } = await import("fs/promises");
4242
4242
  const { join: pathJoin } = await import("path");
4243
- const { renderRootIndex: renderRootIndex2, writeRootIndexProjection: writeRootIndexProjection2 } = await import("./index-projection-6OHDINHT.js");
4243
+ const { renderRootIndex: renderRootIndex2, writeRootIndexProjection: writeRootIndexProjection2 } = await import("./index-projection-ESBJOBS7.js");
4244
4244
  const before = await readFile24(pathJoin(input.vault, "index.md"), "utf8").catch(() => "");
4245
4245
  const fullTarget = relPath.replace(/\.md$/, "");
4246
4246
  const bare = fullTarget.split("/").pop() ?? fullTarget;
@@ -11207,7 +11207,7 @@ async function emitManagedVaultWrite(vault, command, mutate, opts) {
11207
11207
  if (dirty) {
11208
11208
  return emit(dirty, void 0, { postCommit: false });
11209
11209
  }
11210
- const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-ATDFVLJV.js");
11210
+ const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-AYD3CJYD.js");
11211
11211
  const run = await runManagedWriteTransaction2({
11212
11212
  vault,
11213
11213
  command,
@@ -4,9 +4,9 @@ import {
4
4
  UNMANAGED_START,
5
5
  renderRootIndex,
6
6
  writeRootIndexProjection
7
- } from "./chunk-XYXTV2YD.js";
8
- import "./chunk-KDH352MC.js";
9
- import "./chunk-QM64LUEY.js";
7
+ } from "./chunk-DTTKCCQ4.js";
8
+ import "./chunk-HMHMCPCE.js";
9
+ import "./chunk-GJC2CI3W.js";
10
10
  export {
11
11
  UNMANAGED_END,
12
12
  UNMANAGED_START,
@@ -6,10 +6,10 @@ import {
6
6
  runManagedWritePeerGate,
7
7
  runManagedWritePreflight,
8
8
  runManagedWriteTransaction
9
- } from "./chunk-PVIOU7BN.js";
10
- import "./chunk-KDH352MC.js";
11
- import "./chunk-F5GFUYPF.js";
12
- import "./chunk-QM64LUEY.js";
9
+ } from "./chunk-PGD3J2GE.js";
10
+ import "./chunk-HMHMCPCE.js";
11
+ import "./chunk-JCDAEZVD.js";
12
+ import "./chunk-GJC2CI3W.js";
13
13
  export {
14
14
  DEFAULT_MANAGED_WRITE_WAIT_MS,
15
15
  MANAGED_WRITE_POLL_INTERVAL_MS,
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runSkillwikiMcpStdio
4
- } from "./chunk-2BPOEEMW.js";
4
+ } from "./chunk-Z4NCF6K6.js";
5
5
  import "./chunk-7I2TPIV5.js";
6
- import "./chunk-XYXTV2YD.js";
7
- import "./chunk-PVIOU7BN.js";
8
- import "./chunk-KDH352MC.js";
9
- import "./chunk-H42EY6E7.js";
10
- import "./chunk-F5GFUYPF.js";
11
- import "./chunk-QM64LUEY.js";
6
+ import "./chunk-DTTKCCQ4.js";
7
+ import "./chunk-PGD3J2GE.js";
8
+ import "./chunk-HMHMCPCE.js";
9
+ import "./chunk-QU2IXZRN.js";
10
+ import "./chunk-JCDAEZVD.js";
11
+ import "./chunk-GJC2CI3W.js";
12
12
 
13
13
  // src/mcp-entry.ts
14
14
  runSkillwikiMcpStdio().catch((error) => {
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ runSourcesPending
4
+ } from "./chunk-QU2IXZRN.js";
5
+ import "./chunk-JCDAEZVD.js";
6
+ import "./chunk-GJC2CI3W.js";
7
+ export {
8
+ runSourcesPending
9
+ };
@@ -1042,6 +1042,84 @@ if [ ! -f "$SNAPSHOT_WORKTREE/index.md" ]; then
1042
1042
  exit 1
1043
1043
  fi
1044
1044
 
1045
+ # --- Post-sync direct-S3 log append race ---
1046
+ # An MCP log.md append that lands after the pre-sync parity wait (or after the
1047
+ # post-repair sync) leaves S3 log.md strictly longer than the worktree copy.
1048
+ # The post-sync gate has already refreshed expectations from direct S3. Compare
1049
+ # those bytes with the worktree before running the terminal parity gate. Only a
1050
+ # strict append of log.md with an unchanged index.md permits one more sync.
1051
+ snapshot_post_sync_log_append_race_detected() {
1052
+ [ -n "$PROJECTION_STATE_DIR" ] || return 1
1053
+ [ -f "$SNAPSHOT_WORKTREE/index.md" ] || return 1
1054
+ [ -f "$SNAPSHOT_WORKTREE/log.md" ] || return 1
1055
+ if ! cmp -s "$SNAPSHOT_WORKTREE/index.md" "$PROJECTION_STATE_DIR/expected-index.md"; then
1056
+ log "post-sync log-append race: current store index.md differs from worktree index.md; no additional sync"
1057
+ return 1
1058
+ fi
1059
+ if ! snapshot_projection_log_is_store_ahead "$SNAPSHOT_WORKTREE/log.md" "$PROJECTION_STATE_DIR/expected-log.md"; then
1060
+ log "post-sync log-append race: current store log.md is not a strict prefix extension of worktree log.md; no additional sync"
1061
+ return 1
1062
+ fi
1063
+ return 0
1064
+ }
1065
+
1066
+ # Run one additional full rclone sync with the existing RCLONE_OPTS, then repeat
1067
+ # delete-intent reconciliation, re-read the current store, and re-run the
1068
+ # existing exact worktree parity and semantic preview gates. Returns 0 only when
1069
+ # the recovery converged; the caller refuses (without a second retry) otherwise.
1070
+ snapshot_retry_sync_after_log_append_race() {
1071
+ local context="${1:-post-sync}"
1072
+ if ! rclone sync "$CLOUD_REMOTE" "$SNAPSHOT_WORKTREE" "${RCLONE_OPTS[@]}" --stats 10s 2>&1 | tee "$RCLONE_LOG"; then
1073
+ log "ERROR: $context log-append race retry rclone sync failed"
1074
+ tail -50 "$RCLONE_LOG" >> "$LOG_FILE" 2>/dev/null || true
1075
+ rm -f "$RCLONE_LOG"
1076
+ return 1
1077
+ fi
1078
+ rm -f "$RCLONE_LOG"
1079
+ log "post-sync log-append race detected; performed one additional rclone sync context=$context"
1080
+ if ! snapshot_reconcile_delete_intents; then
1081
+ log "ERROR: $context log-append race retry delete-intent reconciliation failed"
1082
+ return 1
1083
+ fi
1084
+ snapshot_gate_projection_candidate \
1085
+ "FAIL $context log-append race retry projection expectation refresh; snapshot promotion refused" \
1086
+ "FAIL $context log-append race retry projection candidate verification; snapshot promotion refused"
1087
+ }
1088
+
1089
+ # Post-sync projection gate with at most one log-append-race recovery.
1090
+ # A first failure that is not the recoverable log-append shape (or that does not
1091
+ # converge after the single retry) is logged as the terminal refusal.
1092
+ snapshot_gate_projection_candidate_with_race_retry() {
1093
+ local context="${1:-post-sync}"
1094
+ local refresh_fail="$2"
1095
+ local verify_fail="$3"
1096
+ if ! snapshot_refresh_projection_expectations_from_store; then
1097
+ log "$refresh_fail"
1098
+ return 1
1099
+ fi
1100
+ # Exact byte parity is the ordinary path. Its semantic preview is terminal:
1101
+ # a later append must not turn a preview failure into a retry.
1102
+ if [ -z "$PROJECTION_STATE_DIR" ] \
1103
+ || { cmp -s "$PROJECTION_STATE_DIR/expected-index.md" "$SNAPSHOT_WORKTREE/index.md" \
1104
+ && cmp -s "$PROJECTION_STATE_DIR/expected-log.md" "$SNAPSHOT_WORKTREE/log.md"; }; then
1105
+ if snapshot_verify_projection_candidate; then
1106
+ return 0
1107
+ fi
1108
+ log "$verify_fail"
1109
+ return 1
1110
+ fi
1111
+ if ! snapshot_post_sync_log_append_race_detected; then
1112
+ snapshot_verify_worktree_projection_parity || true
1113
+ log "$verify_fail"
1114
+ return 1
1115
+ fi
1116
+ if snapshot_retry_sync_after_log_append_race "$context"; then
1117
+ return 0
1118
+ fi
1119
+ log "$verify_fail"
1120
+ return 1
1121
+ }
1122
+
1045
1123
  # --- Delete-intent no-resurrect ---
1046
1124
  # Git is SSOT for intentional absences. After S3→worktree sync, strip any path
1047
1125
  # that has an active tombstone on origin/main and optionally prune S3.
@@ -1195,7 +1273,8 @@ snapshot_reconcile_delete_intents() {
1195
1273
  if ! snapshot_reconcile_delete_intents; then
1196
1274
  exit 1
1197
1275
  fi
1198
- if ! snapshot_gate_projection_candidate \
1276
+ if ! snapshot_gate_projection_candidate_with_race_retry \
1277
+ "post-sync" \
1199
1278
  "FAIL projection expectation refresh after sync; snapshot promotion refused" \
1200
1279
  "FAIL projection candidate verification; snapshot promotion refused"; then
1201
1280
  exit 1
@@ -1270,7 +1349,8 @@ if [ "$needs_repair" = true ]; then
1270
1349
  if ! snapshot_reconcile_delete_intents; then
1271
1350
  exit 1
1272
1351
  fi
1273
- if ! snapshot_gate_projection_candidate \
1352
+ if ! snapshot_gate_projection_candidate_with_race_retry \
1353
+ "post-repair" \
1274
1354
  "FAIL post-repair projection expectation refresh after sync; snapshot promotion refused" \
1275
1355
  "FAIL post-repair projection candidate verification; snapshot promotion refused"; then
1276
1356
  exit 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.104",
3
+ "version": "0.10.106",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.104",
3
+ "version": "0.10.106",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 22 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp, skillwiki-connect) backed by the deterministic `skillwiki` CLI.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.104",
3
+ "version": "0.10.106",
4
4
  "description": "Project-aware Karpathy-style knowledge base for Codex with 22 prompt-only skills backed by the deterministic skillwiki CLI.",
5
5
  "author": {
6
6
  "name": "karlorz",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.104",
3
+ "version": "0.10.106",
4
4
  "description": "Project-aware Karpathy-style knowledge base: 22 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp, skillwiki-connect) backed by HTTP MCP wiki_capture.",
5
5
  "author": {
6
6
  "name": "karlorz"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.10.104",
3
+ "version": "0.10.106",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",
@@ -16,12 +16,24 @@ from typing import Mapping
16
16
  PRODUCTION_MCP_URL = "https://wiki.karldigi.dev/mcp"
17
17
  TOKEN_ENV = "SKILLWIKI_MCP_TOKEN"
18
18
  URL_ENV = "SKILLWIKI_MCP_URL"
19
+ HEADLESS_OAUTH_LOOPBACK_WARNING = (
20
+ "headless_oauth_loopback: SSH is a hint that the operator browser may not "
21
+ "be this host. MCP OAuth loopback (localhost callback) binds on this host, "
22
+ "so an operator browser on another machine cannot finish it. Set "
23
+ f"{TOKEN_ENV} via process env, host Configure, or skillwiki connect "
24
+ "--from-file. Do not click the SkillWiki OAuth login on another machine."
25
+ )
19
26
 
20
27
 
21
28
  def _strip(value: str | None) -> str:
22
29
  return (value or "").strip()
23
30
 
24
31
 
32
+ def _ssh_remote_session(source: Mapping[str, str]) -> bool:
33
+ """SSH is a hint that the operator browser may not be this host (callback would bind here)."""
34
+ return bool(_strip(source.get("SSH_CONNECTION")) or _strip(source.get("SSH_TTY")))
35
+
36
+
25
37
  def probe(environ: Mapping[str, str] | None = None) -> dict:
26
38
  source = os.environ if environ is None else environ
27
39
  token = _strip(source.get(TOKEN_ENV))
@@ -30,6 +42,8 @@ def probe(environ: Mapping[str, str] | None = None) -> dict:
30
42
  reasons: list[str] = []
31
43
 
32
44
  if not token:
45
+ if _ssh_remote_session(source):
46
+ warnings.append(HEADLESS_OAUTH_LOOPBACK_WARNING)
33
47
  return {
34
48
  "status": "missing_prereq",
35
49
  "reasons": [f"{TOKEN_ENV} unset"],
@@ -21,6 +21,7 @@ Unknown-agent HTTP MCP setup. Use when the client has no SkillWiki plugin and no
21
21
  - Do **not** use 云盘 / Drive / CloudStorage as the secret path. Only a chat-attached file reaches the VM.
22
22
  - Missing `WIKI_PATH` is expected on an MCP-only leaf. Handshake pass is done.
23
23
  - Do **not** instruct the operator to paste the bearer into the chat transcript.
24
+ - Do **not** tell the operator to complete SkillWiki OAuth login in a laptop browser for an SSH/remote host. Loopback `http://localhost:<port>/callback` binds on the remote client; headed vs headless is not the discriminator, and SSH is a hint that the operator browser may not be this host. Use `skillwiki connect --from-file`.
24
25
 
25
26
  ## Paste-once prompt
26
27
 
@@ -14,8 +14,9 @@ SkillWiki captures are HTTP MCP only (`type: http`). Claude/Grok use `SKILLWIKI_
14
14
  ## First-run readiness
15
15
 
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
- - **Cursor / Grok Bot:** the Cursor-native plugin requires `SKILLWIKI_MCP_TOKEN` under **Plugins → Configure**. Optional non-secret `SKILLWIKI_EXTRA_VAULTS` (comma-separated vault ids such as `wiki-fin`) opts the client into extra vaults on the **same** connector URL. It is not a second connector, not a secret, and not written to `~/.cursor/mcp.json` or Grok `config.toml`. Server `allowed_vaults` remains the security boundary; an extra listed here but missing from the bearer still fails closed. Omit `vault=` on tools to use the handshake `default_vault` (central). 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).
17
+ - **Cursor / Grok Bot:** the Cursor-native plugin requires `SKILLWIKI_MCP_TOKEN` under **Plugins → Configure**. Optional non-secret `SKILLWIKI_EXTRA_VAULTS` (comma-separated vault ids such as `wiki-fin`) opts the client into extra vaults on the **same** connector URL. It is not a second connector, not a secret, and not written to `~/.cursor/mcp.json` or Grok `config.toml`. Server `allowed_vaults` remains the security boundary; an extra listed here but missing from the bearer still fails closed. Omit `vault=` on tools to use the live handshake `default_vault`; specify an extra vault only when requested. 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
+ - **Operator browser not on this host (SSH):** installed `.mcp.json` already sends `Authorization: Bearer ${SKILLWIKI_MCP_TOKEN}`. If the token is missing, a 401 may start MCP OAuth with `http://localhost:<port>/callback` on this host. MCP OAuth loopback binds on this host; headed vs headless is not the discriminator (DISPLAY, VNC, or local Chrome cannot complete loopback when the operator browser is on another machine), and SSH is a hint that the operator browser may not be this host. If `check_readiness.py` `warnings` contain `headless_oauth_loopback`, or the host shows an OAuth login URL over SSH: stop. Ask the operator to set `SKILLWIKI_MCP_TOKEN` (process env, Configure, or `skillwiki connect --from-file`). Do not tell the operator to click the login link on another machine. If SkillWiki tools are already connected, continue.
19
20
  - 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). Connector hosts put the printed value into process env or host Configure. Unknown agents (no plugin / no usable connector) ingest a chat-attached env file with `skillwiki connect --from-file` (or `--from-stdin`); do not instruct paste-into-chat. 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
21
  - First-run order: install plugin/CLI → operator issues on metal → connector Configure **or** unknown-agent `skillwiki connect --from-file <attachment>` → **new session** → `skillwiki doctor --check-mcp` → one write (`wiki_capture`, work-item write, or page publish).
21
22
  - `in_sync` means the probe has a usable URL/token decision.
@@ -30,12 +31,14 @@ Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (a
30
31
 
31
32
  ## Writes
32
33
 
33
- On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
34
+ Local Mac coding agents with a valid bearer are managed read-write peers through advertised MCP tools. Remote and other agents are read-mostly; they write only when explicitly authorized and the advertised tool permits the target. On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
34
35
 
35
- 1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
36
+ Check the successful write receipt's `vault_id` against the intended vault before reporting any write as saved.
37
+
38
+ 1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`. Verify its returned `path` with `wiki_read_page` in that vault.
36
39
  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
40
  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`, 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.
41
+ - 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. For work-item `spec.md` or goal-plan `plan.md`, pass optional `agent_role` / `agent_id`; the server stamps authenticated `host` and supplied agent identity into frontmatter. Supported workspace paths are: `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
42
  - 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
43
  - 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`.
41
44
  4. **`PATH_DENIED` means STOP.** Paths outside the allowlist (`projects/<slug>/history/**`, non-`.md` files such as `fleet.yaml` or `.canvas`, `AGENTS.md`/`CLAUDE.md`, raw edits, index/projection rebuilds) have no agent write path over MCP. wiki-push / `rclone copy` is **not** an agent writer: it bypasses the daemon working copy, so `wiki_read_page` cannot see those bytes until the sg01 snapshot. Never report an S3-only copy as "saved to wiki". Capture the blocked intent via `wiki_capture` and report the denial instead.
@@ -44,8 +47,8 @@ On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/`
44
47
 
45
48
  Local `~/wiki` (or `skillwiki path`) is fine for reads. MCP read tools are optional. Prefer ordinary file reads of the local mirror. Frozen-leaf agents should use HTTP `wiki_sources_pending`, `wiki_lint_summary`, `wiki_stale`, `wiki_compile_status`, and `wiki_reviews` instead of local CLI commands when those tools are advertised.
46
49
 
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.
50
+ `wiki_query` is typed knowledge only unless `scope` is `work` or `all`. For recent progress, key projects, or to-dos, feature-detect and call `wiki_progress`; apply `project`, `host`, or `agent_role` filters when requested, and present `recent_progress`, `key_projects`, and `todos` as complete bullet lists. 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
51
 
49
52
  ## Errors
50
53
 
51
- Report handshake, capture, and append failures literally. If tools are missing after a 401 or `missing_prereq`, stop and tell the operator to set `SKILLWIKI_MCP_TOKEN` via process env, host Configure, or `skillwiki connect --from-file` (unknown agents; never paste-into-chat), run `grok plugin update skillwiki`, and start a new session. Do not fall back to local `raw/transcripts/` writes.
54
+ Report handshake, capture, and append failures literally. If tools are missing after a 401 or `missing_prereq`, stop and tell the operator to set `SKILLWIKI_MCP_TOKEN` via process env, host Configure, or `skillwiki connect --from-file` (unknown agents; never paste-into-chat), run `grok plugin update skillwiki`, and start a new session. Over SSH, treat an OAuth login URL the same way: report `headless_oauth_loopback` and stop. Do not fall back to local `raw/transcripts/` writes.
@@ -1,98 +1,90 @@
1
1
  # SkillWiki Activation
2
2
 
3
- You have SkillWiki - a project-aware knowledge-base CLI + skill suite for agent harnesses.
4
- This file is loaded at session start. For full operational detail, invoke `/using-skillwiki`.
3
+ SkillWiki is the project-aware knowledge base and skill suite. This file is
4
+ session-start routing context; invoke `using-skillwiki` for full instructions.
5
5
 
6
- ## CLI Probe
6
+ ## Route
7
7
 
8
- If `skillwiki --help` fails, the CLI is unavailable. Degrade to manual file ops (grep/find) for read-only queries. Fail closed for managed mutations - never write typed pages, index, or log directly.
8
+ Use SkillWiki for vault or wiki work: setup, capture, ingestion, search, health,
9
+ provenance, lifecycle, project workspaces, decisions, sync, or graphing.
10
+ Choose the matching installed skill:
9
11
 
10
- ## When to Route
12
+ - Setup and input: `wiki-init`, `wiki-ingest`, `wiki-add-task`,
13
+ `wiki-adapter-prd`, `skillwiki-connect`.
14
+ - Read and maintain: `wiki-query`, `wiki-lint`, `wiki-audit`,
15
+ `wiki-crystallize`, `wiki-reingest`, `wiki-archive`, `wiki-remove`.
16
+ - Projects and planning: `proj-init`, `proj-work`, `proj-distill`,
17
+ `proj-decide`, `wiki-gate-plan-mode`, `dev-loop:research`.
18
+ - Fleet and visualization: `wiki-sync`, `wiki-canvas`.
19
+ - HTTP MCP capture, append, or progress query: `skillwiki-mcp`.
11
20
 
12
- Invoke a SkillWiki skill when the user: wants vault/wiki/knowledge-base operations, ingests sources or URLs, searches/queries vault content, runs health checks or lint, crystallizes a session, works with project workspaces/ADRs, captures ideas/bugs/tasks, archives pages, removes paths, detects source drift, ingests foreign PRD formats, syncs vault git, or visualizes the vault graph.
21
+ If routing is unclear, invoke `using-skillwiki` rather than guessing.
13
22
 
14
- ## Skill Map
23
+ ## CLI and Planning
15
24
 
16
- | Skill | When to Invoke |
17
- |-------|----------------|
18
- | `wiki-init` | Bootstrap a vault |
19
- | `wiki-ingest` | Convert URLs/files/text into typed-knowledge pages |
20
- | `wiki-query` | Search typed knowledge |
21
- | `wiki-lint` | Vault health and lint checks |
22
- | `wiki-crystallize` | Distill current session into a typed page |
23
- | `wiki-audit` | Verify raw provenance and source integrity |
24
- | `wiki-archive` | Archive typed pages or preserve-move raw sources |
25
- | `wiki-remove` | Hard-delete vault paths without snapshot resurrection |
26
- | `wiki-reingest` | Detect source drift and re-ingest updated content |
27
- | `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes (HTTP MCP on leaf hosts; local files on authoring hosts) |
28
- | `skillwiki-mcp` | HTTP MCP captures (`wiki_capture`, `wiki_log_append`); never local writes on leaf hosts |
29
- | `skillwiki-connect` | Unknown-agent HTTP MCP connect: `skillwiki connect --from-file` (never paste-into-chat) |
30
- | `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) |
31
- | `wiki-sync` | Safely sync vault git repository |
32
- | `wiki-canvas` | Generate Obsidian Canvas visualization |
33
- | `wiki-gate-plan-mode` | Toggle EnterPlanMode gating for brainstorming then proj-work |
34
- | `proj-init` | Bootstrap a project workspace |
35
- | `proj-work` | Open or run a work item |
36
- | `proj-distill` | Distill project compound entries into concept pages |
37
- | `proj-decide` | Write an Architectural Decision Record (ADR) |
38
- | `dev-loop:research` | Research scan of repo + vault health |
25
+ If `skillwiki --help` fails, use local tools only for read-only inspection and
26
+ fail closed for managed mutations.
39
27
 
40
- ## PRD Bridge
28
+ After architectural design approval, invoke `proj-work` and put `spec.md` in
29
+ that work item. Do not invoke `writing-plans`. Do not git commit from
30
+ brainstorming. Use standalone `test-driven-development` for bounded TDD. For UI
31
+ work, offer `visual-companion.md` once. Never create `docs/superpowers/`.
41
32
 
42
- After architectural design approval, invoke `proj-work` then write `spec.md` in that work folder. Do not invoke `writing-plans`. Do not git commit from brainstorming. Bounded TDD uses standalone `test-driven-development` when installed. For UI work, offer brainstorming `visual-companion.md` once (optional). Never create `docs/superpowers/` in any repo.
33
+ Workflow profiles are `native`, `guided`, and explicit-only `full`; selection
34
+ is `adaptive` or `fixed`. Installation or cache discovery proves availability,
35
+ not activation. Native and guided do not force Superpowers or plan-mode gating.
36
+ Only a full profile may use its configured provider flow. Invalid fixed policy
37
+ fails closed; noninteractive sessions do not prompt. Keep workflow profile,
38
+ PRD provider and stage, SkillWiki provenance, and simplify review independent.
43
39
 
44
- ## Workflow Profiles
40
+ ## Managed-Write Safety
45
41
 
46
- Resolve workflow policy before loading provider skills. Profiles are `native`,
47
- `guided`, and explicit-only `full`; selection is `adaptive` or `fixed`.
48
- Adaptive chooses only native or guided. Installation and cache discovery prove
49
- availability, never activation. Native and guided do not force Superpowers or
50
- plan-mode gating. Explicit full may use the complete configured provider flow;
51
- gate plan mode only when that flow actually uses Superpowers/TDD planning.
52
- Invalid fixed policy is unresolved and fail-closed. Noninteractive sessions do
53
- not prompt. Keep workflow profile, `prd_layer` provider, `prd_pipeline` stage
54
- template, SkillWiki provenance, and the independent simplify review gate as
55
- separate concerns.
42
+ The HTTP MCP contract below controls remote reads and mutations. Local Mac coding agents with a valid bearer are managed read-write peers through advertised MCP tools. Remote and other agents are read-mostly; they write only when explicitly authorized and the advertised MCP tool permits the target. On leaf hosts, captures use MCP, never local `raw/transcripts` or `log.md` writes. Project workspace writes use `wiki_workitem_write` with compare-and-swap; stop if the tool or path family is unavailable. A wiki push or rclone copy is not a managed
43
+ write and is not visible until the authoritative snapshot. Never use bare `rm`
44
+ or `git rm` for fleet deletion. Never auto-install SkillWiki in unattended
45
+ sessions. If required publish support is unavailable, fail closed.
56
46
 
57
- ## Fail-Closed Boundary
58
-
59
- Never write typed pages, `index.md`, or `log.md` directly. On leaf hosts, captures use HTTP MCP (`wiki_capture`), never local `raw/transcripts` or `log.md` writes. Project workspace saves (`projects/<slug>/README.md`, `architecture/`, `requirements/`, `compound/` — `.md` only) go through MCP `wiki_workitem_write` CAS; feature-detect and STOP if the tool is absent or the deployed server predates the workspace-family allowlist (`PATH_DENIED`). wiki-push / rclone is never an agent writer — an S3-only copy is invisible to `wiki_read_page` until the sg01 snapshot; never report it as "saved to wiki". Never bare `rm` or `git rm` as a fleet delete (snapshot resurrects from S3). Never auto `npm install -g skillwiki` in headless/goal/satellite sessions. If `skillwiki page publish --help` is unavailable, fail closed.
60
-
61
- ## Sensitive Content
62
-
63
- Never commit secrets, credentials, API keys, tokens, passwords, or PII to the vault. Redact using `[REDACTED:<kind>]` before filing.
47
+ Never send secrets, credentials, tokens, passwords, or personal information.
48
+ Redact with `[REDACTED:<kind>]`.
64
49
 
65
50
  <!-- mcp-instructions:begin -->
66
51
  ## SkillWiki Remote Access Contract
67
52
 
68
53
  ### Three-Plane Access Architecture
69
- - **HTTP MCP (Default)**: Primary remote access plane for AI agents. All reads and mutations go through MCP tools; local vault clone is not required.
70
- - **CLI (Opt-in)**: Local operator and authoring plane for diagnostics, linting, and health checks on provisioned machines.
71
- - **Git Clone (Opt-in)**: Storage and sync authority on metal authoring hosts; leaf/agent environments do not manage git or push to remotes.
54
+ HTTP MCP is the default agent plane. CLI is an opt-in operator plane; Git clone
55
+ is storage authority on authoring hosts. Leaf agents do not manage vault git.
72
56
 
73
57
  ### Fail-Closed Boundary
74
- HTTP MCP is the sole agent writer. Never attempt direct local file writes to typed pages (concepts, entities, comparisons, queries, meta), index.md, or log.md. Direct filesystem mutations outside MCP fail closed. Always use MCP tools (wiki_capture, wiki_log_append, wiki_workitem_write, wiki_page_publish).
58
+ HTTP MCP is the sole managed writer. Use `wiki_capture`, `wiki_log_append`,
59
+ `wiki_workitem_write`, or `wiki_page_publish`; never write typed pages,
60
+ `index.md`, or `log.md` directly.
61
+
62
+ ### Vault Selection
63
+ For the usual vault, omit `vault` and use the live handshake's `default_vault`.
64
+ Set `vault` only when an extra vault was explicitly requested. Before reporting
65
+ a write as saved, check its successful receipt's `vault_id` against the intended
66
+ vault.
75
67
 
76
68
  ### CAS Protocol (Compare-And-Swap)
77
- Mutating tools (wiki_workitem_write, wiki_page_publish) enforce CAS concurrency control to prevent clobbering:
78
- 1. Call wiki_read_page to retrieve the document and its canonical sha256.
79
- 2. Submit mutations with base_sha256 set to the read sha256.
80
- 3. If the write returns FILE_CHANGED, re-read via wiki_read_page, rebase edits against currentVersion, and retry.
69
+ For `wiki_workitem_write` or `wiki_page_publish`, read first, send the returned
70
+ sha256 as `base_sha256`, and on `FILE_CHANGED` re-read, rebase, and retry.
71
+
72
+ ### Progress Queries
73
+ Use `wiki_progress` for recent progress, key projects, or to-dos. Apply requested project, host, or agent-role filters and answer with complete bullet lists.
81
74
 
82
75
  ### Capture Kinds
83
- Ad-hoc records via wiki_capture require kind in: task | idea | bug | note.
84
- 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.
76
+ `wiki_capture` kind is `task | idea | bug | note`. Captures append to
77
+ `raw/transcripts/`. Verify its returned `path` with `wiki_read_page`.
78
+ `wiki_log_append` is append-only; verify its `event_path` with `wiki_read_page`.
79
+ Use `tail_bytes` for large pages.
85
80
 
86
81
  ### Sensitive Content
87
- Never send credentials, API keys, auth tokens, passwords, or PII. Redact sensitive values using [REDACTED:<kind>] (e.g. [REDACTED:token]) before writing.
82
+ Never send secrets or personal information. Use `[REDACTED:<kind>]`.
88
83
  <!-- mcp-instructions:end -->
89
84
 
90
- ## Drift Warning
91
-
92
- If `skillwiki doctor` mentions a version newer than this file, re-read the full `/using-skillwiki` skill for updated content.
93
-
94
- ## Canonical Paths
85
+ ## Drift and Canonical Paths
95
86
 
96
- - Full skill (logical): invoke `/using-skillwiki` or read the installed plugin skill at `<plugin-root>/using-skillwiki/SKILL.md` (repository source: `packages/skills/using-skillwiki/SKILL.md`)
97
- - Vault schema: `SCHEMA.md` at the vault root (run `skillwiki path` to resolve)
98
- - Frontier agents (`proj-work`, `proj-decide`): plugin-root `agents/<name>.md` with `model: inherit` — refresh with the active plugin channel (`grok plugin update skillwiki` on Grok)
87
+ If `skillwiki doctor` reports a newer version, invoke `using-skillwiki` again.
88
+ The full source skill is `packages/skills/using-skillwiki/SKILL.md`; resolve the
89
+ vault with `skillwiki path`. Frontier project agents are installed under the
90
+ plugin root with `model: inherit`.
@@ -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
+ - Recent progress, key-project, or to-do questions use the MCP `wiki_progress` tool when advertised. Apply requested `project`, `host`, or `agent_role` filters and render all three result sections as complete bullet lists.
17
18
  - 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`.
18
19
  - 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.
19
20
  2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
@@ -21,6 +21,7 @@ Unknown-agent HTTP MCP setup. Use when the client has no SkillWiki plugin and no
21
21
  - Do **not** use 云盘 / Drive / CloudStorage as the secret path. Only a chat-attached file reaches the VM.
22
22
  - Missing `WIKI_PATH` is expected on an MCP-only leaf. Handshake pass is done.
23
23
  - Do **not** instruct the operator to paste the bearer into the chat transcript.
24
+ - Do **not** tell the operator to complete SkillWiki OAuth login in a laptop browser for an SSH/remote host. Loopback `http://localhost:<port>/callback` binds on the remote client; headed vs headless is not the discriminator, and SSH is a hint that the operator browser may not be this host. Use `skillwiki connect --from-file`.
24
25
 
25
26
  ## Paste-once prompt
26
27
 
@@ -14,8 +14,9 @@ SkillWiki captures are HTTP MCP only (`type: http`). Claude/Grok use `SKILLWIKI_
14
14
  ## First-run readiness
15
15
 
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
- - **Cursor / Grok Bot:** the Cursor-native plugin requires `SKILLWIKI_MCP_TOKEN` under **Plugins → Configure**. Optional non-secret `SKILLWIKI_EXTRA_VAULTS` (comma-separated vault ids such as `wiki-fin`) opts the client into extra vaults on the **same** connector URL. It is not a second connector, not a secret, and not written to `~/.cursor/mcp.json` or Grok `config.toml`. Server `allowed_vaults` remains the security boundary; an extra listed here but missing from the bearer still fails closed. Omit `vault=` on tools to use the handshake `default_vault` (central). 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).
17
+ - **Cursor / Grok Bot:** the Cursor-native plugin requires `SKILLWIKI_MCP_TOKEN` under **Plugins → Configure**. Optional non-secret `SKILLWIKI_EXTRA_VAULTS` (comma-separated vault ids such as `wiki-fin`) opts the client into extra vaults on the **same** connector URL. It is not a second connector, not a secret, and not written to `~/.cursor/mcp.json` or Grok `config.toml`. Server `allowed_vaults` remains the security boundary; an extra listed here but missing from the bearer still fails closed. Omit `vault=` on tools to use the live handshake `default_vault`; specify an extra vault only when requested. 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
+ - **Operator browser not on this host (SSH):** installed `.mcp.json` already sends `Authorization: Bearer ${SKILLWIKI_MCP_TOKEN}`. If the token is missing, a 401 may start MCP OAuth with `http://localhost:<port>/callback` on this host. MCP OAuth loopback binds on this host; headed vs headless is not the discriminator (DISPLAY, VNC, or local Chrome cannot complete loopback when the operator browser is on another machine), and SSH is a hint that the operator browser may not be this host. If `check_readiness.py` `warnings` contain `headless_oauth_loopback`, or the host shows an OAuth login URL over SSH: stop. Ask the operator to set `SKILLWIKI_MCP_TOKEN` (process env, Configure, or `skillwiki connect --from-file`). Do not tell the operator to click the login link on another machine. If SkillWiki tools are already connected, continue.
19
20
  - 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). Connector hosts put the printed value into process env or host Configure. Unknown agents (no plugin / no usable connector) ingest a chat-attached env file with `skillwiki connect --from-file` (or `--from-stdin`); do not instruct paste-into-chat. 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
21
  - First-run order: install plugin/CLI → operator issues on metal → connector Configure **or** unknown-agent `skillwiki connect --from-file <attachment>` → **new session** → `skillwiki doctor --check-mcp` → one write (`wiki_capture`, work-item write, or page publish).
21
22
  - `in_sync` means the probe has a usable URL/token decision.
@@ -30,12 +31,14 @@ Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (a
30
31
 
31
32
  ## Writes
32
33
 
33
- On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
34
+ Local Mac coding agents with a valid bearer are managed read-write peers through advertised MCP tools. Remote and other agents are read-mostly; they write only when explicitly authorized and the advertised tool permits the target. On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
34
35
 
35
- 1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
36
+ Check the successful write receipt's `vault_id` against the intended vault before reporting any write as saved.
37
+
38
+ 1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`. Verify its returned `path` with `wiki_read_page` in that vault.
36
39
  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
40
  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`, 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.
41
+ - 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. For work-item `spec.md` or goal-plan `plan.md`, pass optional `agent_role` / `agent_id`; the server stamps authenticated `host` and supplied agent identity into frontmatter. Supported workspace paths are: `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
42
  - 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
43
  - 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`.
41
44
  4. **`PATH_DENIED` means STOP.** Paths outside the allowlist (`projects/<slug>/history/**`, non-`.md` files such as `fleet.yaml` or `.canvas`, `AGENTS.md`/`CLAUDE.md`, raw edits, index/projection rebuilds) have no agent write path over MCP. wiki-push / `rclone copy` is **not** an agent writer: it bypasses the daemon working copy, so `wiki_read_page` cannot see those bytes until the sg01 snapshot. Never report an S3-only copy as "saved to wiki". Capture the blocked intent via `wiki_capture` and report the denial instead.
@@ -44,8 +47,8 @@ On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/`
44
47
 
45
48
  Local `~/wiki` (or `skillwiki path`) is fine for reads. MCP read tools are optional. Prefer ordinary file reads of the local mirror. Frozen-leaf agents should use HTTP `wiki_sources_pending`, `wiki_lint_summary`, `wiki_stale`, `wiki_compile_status`, and `wiki_reviews` instead of local CLI commands when those tools are advertised.
46
49
 
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.
50
+ `wiki_query` is typed knowledge only unless `scope` is `work` or `all`. For recent progress, key projects, or to-dos, feature-detect and call `wiki_progress`; apply `project`, `host`, or `agent_role` filters when requested, and present `recent_progress`, `key_projects`, and `todos` as complete bullet lists. 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
51
 
49
52
  ## Errors
50
53
 
51
- Report handshake, capture, and append failures literally. If tools are missing after a 401 or `missing_prereq`, stop and tell the operator to set `SKILLWIKI_MCP_TOKEN` via process env, host Configure, or `skillwiki connect --from-file` (unknown agents; never paste-into-chat), run `grok plugin update skillwiki`, and start a new session. Do not fall back to local `raw/transcripts/` writes.
54
+ Report handshake, capture, and append failures literally. If tools are missing after a 401 or `missing_prereq`, stop and tell the operator to set `SKILLWIKI_MCP_TOKEN` via process env, host Configure, or `skillwiki connect --from-file` (unknown agents; never paste-into-chat), run `grok plugin update skillwiki`, and start a new session. Over SSH, treat an OAuth login URL the same way: report `headless_oauth_loopback` and stop. Do not fall back to local `raw/transcripts/` writes.
@@ -1,98 +1,90 @@
1
1
  # SkillWiki Activation
2
2
 
3
- You have SkillWiki - a project-aware knowledge-base CLI + skill suite for agent harnesses.
4
- This file is loaded at session start. For full operational detail, invoke `/using-skillwiki`.
3
+ SkillWiki is the project-aware knowledge base and skill suite. This file is
4
+ session-start routing context; invoke `using-skillwiki` for full instructions.
5
5
 
6
- ## CLI Probe
6
+ ## Route
7
7
 
8
- If `skillwiki --help` fails, the CLI is unavailable. Degrade to manual file ops (grep/find) for read-only queries. Fail closed for managed mutations - never write typed pages, index, or log directly.
8
+ Use SkillWiki for vault or wiki work: setup, capture, ingestion, search, health,
9
+ provenance, lifecycle, project workspaces, decisions, sync, or graphing.
10
+ Choose the matching installed skill:
9
11
 
10
- ## When to Route
12
+ - Setup and input: `wiki-init`, `wiki-ingest`, `wiki-add-task`,
13
+ `wiki-adapter-prd`, `skillwiki-connect`.
14
+ - Read and maintain: `wiki-query`, `wiki-lint`, `wiki-audit`,
15
+ `wiki-crystallize`, `wiki-reingest`, `wiki-archive`, `wiki-remove`.
16
+ - Projects and planning: `proj-init`, `proj-work`, `proj-distill`,
17
+ `proj-decide`, `wiki-gate-plan-mode`, `dev-loop:research`.
18
+ - Fleet and visualization: `wiki-sync`, `wiki-canvas`.
19
+ - HTTP MCP capture, append, or progress query: `skillwiki-mcp`.
11
20
 
12
- Invoke a SkillWiki skill when the user: wants vault/wiki/knowledge-base operations, ingests sources or URLs, searches/queries vault content, runs health checks or lint, crystallizes a session, works with project workspaces/ADRs, captures ideas/bugs/tasks, archives pages, removes paths, detects source drift, ingests foreign PRD formats, syncs vault git, or visualizes the vault graph.
21
+ If routing is unclear, invoke `using-skillwiki` rather than guessing.
13
22
 
14
- ## Skill Map
23
+ ## CLI and Planning
15
24
 
16
- | Skill | When to Invoke |
17
- |-------|----------------|
18
- | `wiki-init` | Bootstrap a vault |
19
- | `wiki-ingest` | Convert URLs/files/text into typed-knowledge pages |
20
- | `wiki-query` | Search typed knowledge |
21
- | `wiki-lint` | Vault health and lint checks |
22
- | `wiki-crystallize` | Distill current session into a typed page |
23
- | `wiki-audit` | Verify raw provenance and source integrity |
24
- | `wiki-archive` | Archive typed pages or preserve-move raw sources |
25
- | `wiki-remove` | Hard-delete vault paths without snapshot resurrection |
26
- | `wiki-reingest` | Detect source drift and re-ingest updated content |
27
- | `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes (HTTP MCP on leaf hosts; local files on authoring hosts) |
28
- | `skillwiki-mcp` | HTTP MCP captures (`wiki_capture`, `wiki_log_append`); never local writes on leaf hosts |
29
- | `skillwiki-connect` | Unknown-agent HTTP MCP connect: `skillwiki connect --from-file` (never paste-into-chat) |
30
- | `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) |
31
- | `wiki-sync` | Safely sync vault git repository |
32
- | `wiki-canvas` | Generate Obsidian Canvas visualization |
33
- | `wiki-gate-plan-mode` | Toggle EnterPlanMode gating for brainstorming then proj-work |
34
- | `proj-init` | Bootstrap a project workspace |
35
- | `proj-work` | Open or run a work item |
36
- | `proj-distill` | Distill project compound entries into concept pages |
37
- | `proj-decide` | Write an Architectural Decision Record (ADR) |
38
- | `dev-loop:research` | Research scan of repo + vault health |
25
+ If `skillwiki --help` fails, use local tools only for read-only inspection and
26
+ fail closed for managed mutations.
39
27
 
40
- ## PRD Bridge
28
+ After architectural design approval, invoke `proj-work` and put `spec.md` in
29
+ that work item. Do not invoke `writing-plans`. Do not git commit from
30
+ brainstorming. Use standalone `test-driven-development` for bounded TDD. For UI
31
+ work, offer `visual-companion.md` once. Never create `docs/superpowers/`.
41
32
 
42
- After architectural design approval, invoke `proj-work` then write `spec.md` in that work folder. Do not invoke `writing-plans`. Do not git commit from brainstorming. Bounded TDD uses standalone `test-driven-development` when installed. For UI work, offer brainstorming `visual-companion.md` once (optional). Never create `docs/superpowers/` in any repo.
33
+ Workflow profiles are `native`, `guided`, and explicit-only `full`; selection
34
+ is `adaptive` or `fixed`. Installation or cache discovery proves availability,
35
+ not activation. Native and guided do not force Superpowers or plan-mode gating.
36
+ Only a full profile may use its configured provider flow. Invalid fixed policy
37
+ fails closed; noninteractive sessions do not prompt. Keep workflow profile,
38
+ PRD provider and stage, SkillWiki provenance, and simplify review independent.
43
39
 
44
- ## Workflow Profiles
40
+ ## Managed-Write Safety
45
41
 
46
- Resolve workflow policy before loading provider skills. Profiles are `native`,
47
- `guided`, and explicit-only `full`; selection is `adaptive` or `fixed`.
48
- Adaptive chooses only native or guided. Installation and cache discovery prove
49
- availability, never activation. Native and guided do not force Superpowers or
50
- plan-mode gating. Explicit full may use the complete configured provider flow;
51
- gate plan mode only when that flow actually uses Superpowers/TDD planning.
52
- Invalid fixed policy is unresolved and fail-closed. Noninteractive sessions do
53
- not prompt. Keep workflow profile, `prd_layer` provider, `prd_pipeline` stage
54
- template, SkillWiki provenance, and the independent simplify review gate as
55
- separate concerns.
42
+ The HTTP MCP contract below controls remote reads and mutations. Local Mac coding agents with a valid bearer are managed read-write peers through advertised MCP tools. Remote and other agents are read-mostly; they write only when explicitly authorized and the advertised MCP tool permits the target. On leaf hosts, captures use MCP, never local `raw/transcripts` or `log.md` writes. Project workspace writes use `wiki_workitem_write` with compare-and-swap; stop if the tool or path family is unavailable. A wiki push or rclone copy is not a managed
43
+ write and is not visible until the authoritative snapshot. Never use bare `rm`
44
+ or `git rm` for fleet deletion. Never auto-install SkillWiki in unattended
45
+ sessions. If required publish support is unavailable, fail closed.
56
46
 
57
- ## Fail-Closed Boundary
58
-
59
- Never write typed pages, `index.md`, or `log.md` directly. On leaf hosts, captures use HTTP MCP (`wiki_capture`), never local `raw/transcripts` or `log.md` writes. Project workspace saves (`projects/<slug>/README.md`, `architecture/`, `requirements/`, `compound/` — `.md` only) go through MCP `wiki_workitem_write` CAS; feature-detect and STOP if the tool is absent or the deployed server predates the workspace-family allowlist (`PATH_DENIED`). wiki-push / rclone is never an agent writer — an S3-only copy is invisible to `wiki_read_page` until the sg01 snapshot; never report it as "saved to wiki". Never bare `rm` or `git rm` as a fleet delete (snapshot resurrects from S3). Never auto `npm install -g skillwiki` in headless/goal/satellite sessions. If `skillwiki page publish --help` is unavailable, fail closed.
60
-
61
- ## Sensitive Content
62
-
63
- Never commit secrets, credentials, API keys, tokens, passwords, or PII to the vault. Redact using `[REDACTED:<kind>]` before filing.
47
+ Never send secrets, credentials, tokens, passwords, or personal information.
48
+ Redact with `[REDACTED:<kind>]`.
64
49
 
65
50
  <!-- mcp-instructions:begin -->
66
51
  ## SkillWiki Remote Access Contract
67
52
 
68
53
  ### Three-Plane Access Architecture
69
- - **HTTP MCP (Default)**: Primary remote access plane for AI agents. All reads and mutations go through MCP tools; local vault clone is not required.
70
- - **CLI (Opt-in)**: Local operator and authoring plane for diagnostics, linting, and health checks on provisioned machines.
71
- - **Git Clone (Opt-in)**: Storage and sync authority on metal authoring hosts; leaf/agent environments do not manage git or push to remotes.
54
+ HTTP MCP is the default agent plane. CLI is an opt-in operator plane; Git clone
55
+ is storage authority on authoring hosts. Leaf agents do not manage vault git.
72
56
 
73
57
  ### Fail-Closed Boundary
74
- HTTP MCP is the sole agent writer. Never attempt direct local file writes to typed pages (concepts, entities, comparisons, queries, meta), index.md, or log.md. Direct filesystem mutations outside MCP fail closed. Always use MCP tools (wiki_capture, wiki_log_append, wiki_workitem_write, wiki_page_publish).
58
+ HTTP MCP is the sole managed writer. Use `wiki_capture`, `wiki_log_append`,
59
+ `wiki_workitem_write`, or `wiki_page_publish`; never write typed pages,
60
+ `index.md`, or `log.md` directly.
61
+
62
+ ### Vault Selection
63
+ For the usual vault, omit `vault` and use the live handshake's `default_vault`.
64
+ Set `vault` only when an extra vault was explicitly requested. Before reporting
65
+ a write as saved, check its successful receipt's `vault_id` against the intended
66
+ vault.
75
67
 
76
68
  ### CAS Protocol (Compare-And-Swap)
77
- Mutating tools (wiki_workitem_write, wiki_page_publish) enforce CAS concurrency control to prevent clobbering:
78
- 1. Call wiki_read_page to retrieve the document and its canonical sha256.
79
- 2. Submit mutations with base_sha256 set to the read sha256.
80
- 3. If the write returns FILE_CHANGED, re-read via wiki_read_page, rebase edits against currentVersion, and retry.
69
+ For `wiki_workitem_write` or `wiki_page_publish`, read first, send the returned
70
+ sha256 as `base_sha256`, and on `FILE_CHANGED` re-read, rebase, and retry.
71
+
72
+ ### Progress Queries
73
+ Use `wiki_progress` for recent progress, key projects, or to-dos. Apply requested project, host, or agent-role filters and answer with complete bullet lists.
81
74
 
82
75
  ### Capture Kinds
83
- Ad-hoc records via wiki_capture require kind in: task | idea | bug | note.
84
- 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.
76
+ `wiki_capture` kind is `task | idea | bug | note`. Captures append to
77
+ `raw/transcripts/`. Verify its returned `path` with `wiki_read_page`.
78
+ `wiki_log_append` is append-only; verify its `event_path` with `wiki_read_page`.
79
+ Use `tail_bytes` for large pages.
85
80
 
86
81
  ### Sensitive Content
87
- Never send credentials, API keys, auth tokens, passwords, or PII. Redact sensitive values using [REDACTED:<kind>] (e.g. [REDACTED:token]) before writing.
82
+ Never send secrets or personal information. Use `[REDACTED:<kind>]`.
88
83
  <!-- mcp-instructions:end -->
89
84
 
90
- ## Drift Warning
91
-
92
- If `skillwiki doctor` mentions a version newer than this file, re-read the full `/using-skillwiki` skill for updated content.
93
-
94
- ## Canonical Paths
85
+ ## Drift and Canonical Paths
95
86
 
96
- - Full skill (logical): invoke `/using-skillwiki` or read the installed plugin skill at `<plugin-root>/using-skillwiki/SKILL.md` (repository source: `packages/skills/using-skillwiki/SKILL.md`)
97
- - Vault schema: `SCHEMA.md` at the vault root (run `skillwiki path` to resolve)
98
- - Frontier agents (`proj-work`, `proj-decide`): plugin-root `agents/<name>.md` with `model: inherit` — refresh with the active plugin channel (`grok plugin update skillwiki` on Grok)
87
+ If `skillwiki doctor` reports a newer version, invoke `using-skillwiki` again.
88
+ The full source skill is `packages/skills/using-skillwiki/SKILL.md`; resolve the
89
+ vault with `skillwiki path`. Frontier project agents are installed under the
90
+ plugin root with `model: inherit`.
@@ -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
+ - Recent progress, key-project, or to-do questions use the MCP `wiki_progress` tool when advertised. Apply requested `project`, `host`, or `agent_role` filters and render all three result sections as complete bullet lists.
17
18
  - 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`.
18
19
  - 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.
19
20
  2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
@@ -92,6 +92,9 @@ created: YYYY-MM-DD # when capture was written
92
92
  ingested: # filled by ingest pipeline (empty at creation)
93
93
  kind: # idea | bug | task | note | other
94
94
  project: # optional: "[[slug]]" for cross-reference
95
+ host: # optional: host identity token (stamped by MCP writer)
96
+ agent_role: # optional: agent role identity token
97
+ agent_id: # optional: agent identity token
95
98
  ---
96
99
  ```
97
100
 
@@ -101,6 +104,9 @@ project: # optional: "[[slug]]" for cross-reference
101
104
  - `ingested`: Date processed into typed knowledge. **Empty at creation.** Filled by `wiki-ingest`, `wiki-crystallize`.
102
105
  - `kind`: Capture type. Affects dev-loop routing (`bug`/`task` → work items; `idea` → knowledge development).
103
106
  - `project`: Optional project cross-reference. Enables `provenance_projects:` auto-linking.
107
+ - `host`: Optional host identity token (e.g. `macos-dev`, `sg01`). Stamped by MCP writer from authenticated identity.
108
+ - `agent_role`: Optional agent role identity token (e.g. `researcher`, `worker`, `reviewer`).
109
+ - `agent_id`: Optional specific agent instance identifier.
104
110
 
105
111
  ### vs Ingested Sources
106
112
 
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- runSourcesPending
4
- } from "./chunk-H42EY6E7.js";
5
- import "./chunk-F5GFUYPF.js";
6
- import "./chunk-QM64LUEY.js";
7
- export {
8
- runSourcesPending
9
- };