sdtk-wiki-kit 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,10 @@
2
2
 
3
3
  `sdtk-wiki-kit` is the standalone SDTK-WIKI Foundation/Beta toolkit package for
4
4
  project-local wiki, document graph, provenance, lint/gap analysis, local source
5
- intake, grounded Ask, and report-first second-brain maintenance workflows.
5
+ intake, grounded Ask, and report-first local wiki maintenance workflows.
6
+
7
+ Package version in this source snapshot: `0.1.4`
8
+ CLI command: `sdtk-wiki`
6
9
 
7
10
  SDTK-WIKI is the canonical home for new SDTK wiki work. The older
8
11
  `sdtk-spec atlas` commands remain a compatibility path for free graph/viewer
@@ -28,7 +31,7 @@ Implemented in the Foundation/Beta package:
28
31
  | Capability | Command |
29
32
  |---|---|
30
33
  | Initialize SDTK-WIKI workspace | `sdtk-wiki init` |
31
- | Build a personal-brain without timestamp variables | `sdtk-wiki ingest`, `sdtk-wiki compile --mode safe --apply`, `sdtk-wiki query` |
34
+ | Build a local wiki without timestamp variables | `sdtk-wiki ingest`, `sdtk-wiki compile --mode safe --apply`, `sdtk-wiki query` |
32
35
  | Build graph, viewer, generated pages, and provenance | `sdtk-wiki atlas build` |
33
36
  | Open local viewer | `sdtk-wiki atlas open` |
34
37
  | Watch markdown sources and rebuild | `sdtk-wiki atlas watch` |
@@ -39,11 +42,12 @@ Implemented in the Foundation/Beta package:
39
42
  | Generate local discovery plan from gap evidence | `sdtk-wiki wiki discover --plan` |
40
43
  | Generate local discovery plan with beginner facade | `sdtk-wiki discover --plan` |
41
44
  | Run report-first maintenance cycle | `sdtk-wiki maintain --mode safe` |
45
+ | Write opt-in GitHub enrichment review report | `sdtk-wiki enrich --source github --mode review` |
42
46
  | Generate semantic extraction dry-run report | `sdtk-wiki wiki extract --dry-run` |
43
47
  | Generate compile dry-run preview and JSON sidecar | `sdtk-wiki wiki compile --dry-run` |
44
48
  | Apply an approved compile JSON sidecar | `sdtk-wiki wiki compile --apply --yes` |
45
- | Search generated personal-brain pages locally | `sdtk-wiki search` |
46
- | Query generated personal-brain pages locally | `sdtk-wiki query` |
49
+ | Search generated local wiki pages locally | `sdtk-wiki search` |
50
+ | Query generated local wiki pages locally | `sdtk-wiki query` |
47
51
  | Ask grounded questions over built graph | `sdtk-wiki ask` with `wiki.ask` entitlement/runtime preconditions |
48
52
  | Save one redacted query record after successful Ask | `sdtk-wiki ask --save-query` with `wiki.ask` entitlement/runtime preconditions |
49
53
 
@@ -60,17 +64,20 @@ Not implemented in the Foundation/Beta runtime:
60
64
 
61
65
  | Path | Meaning |
62
66
  |---|---|
63
- | `.sdtk/wiki` | SDTK-WIKI workspace root |
67
+ | `wiki` | canonical human-facing local wiki output |
68
+ | `.sdtk/wiki` | internal SDTK-WIKI workspace root |
64
69
  | `.sdtk/wiki/graph` | graph/viewer output |
65
70
  | `.sdtk/wiki/pages` | generated managed wiki pages |
66
71
  | `.sdtk/wiki/raw` | metadata-only raw/source registry |
67
72
  | `.sdtk/wiki/provenance` | source/build/ingest provenance |
68
73
  | `.sdtk/wiki/reports` | lint, prune, discover, and compile preview reports |
69
- | `.sdtk/wiki/personal-brain` | generated semantic personal-brain pages from explicit apply |
74
+ | `.sdtk/wiki/personal-brain` | legacy generated semantic pages, readable as fallback only |
70
75
  | `.sdtk/wiki/queries` | opt-in redacted Ask query records |
71
76
  | `.sdtk/atlas` | legacy Atlas compatibility output, readable only |
72
77
 
73
- SDTK-WIKI writes only under project-local `.sdtk/wiki`. It must not auto-delete,
78
+ SDTK-WIKI writes human-facing generated wiki pages under project-local `wiki/`.
79
+ Internal state, reports, provenance, raw registry, graph, logs, and legacy
80
+ fallback pages stay under project-local `.sdtk/wiki`. It must not auto-delete,
74
81
  auto-migrate, or rewrite `.sdtk/atlas`.
75
82
 
76
83
  Existing `sdtk-spec atlas init|build|open|watch|status` commands remain the R1
@@ -95,9 +102,9 @@ Open the viewer:
95
102
  sdtk-wiki atlas open --project-path .
96
103
  ```
97
104
 
98
- ## Simple Personal-Brain Flow
105
+ ## Simple Local Wiki Flow
99
106
 
100
- Use this when you want the shortest local second-brain path and do not need to
107
+ Use this when you want the shortest local wiki path and do not need to
101
108
  inspect timestamped JSON files:
102
109
 
103
110
  ```powershell
@@ -108,6 +115,7 @@ sdtk-wiki query "multi-agent"
108
115
  sdtk-wiki lint
109
116
  sdtk-wiki discover --plan
110
117
  sdtk-wiki maintain --mode safe
118
+ sdtk-wiki enrich --source github --mode review
111
119
  ```
112
120
 
113
121
  Behavior:
@@ -115,10 +123,13 @@ Behavior:
115
123
  - `ingest` runs local semantic extraction and writes a report.
116
124
  - `compile --mode safe --apply` creates or refreshes the compile preview/JSON
117
125
  sidecar internally, then applies the sidecar contract.
118
- - `query` is deterministic local search over `.sdtk/wiki/personal-brain`; it
126
+ - `query` is deterministic local search over `wiki/`, with legacy
127
+ `.sdtk/wiki/personal-brain` fallback; it
119
128
  does not use premium Ask, LLM/RAG, web fetch, or query history.
120
129
  - `discover` and `maintain` are report-first and do not apply, delete, archive,
121
130
  fetch web sources, or mutate `.sdtk/atlas`.
131
+ - `enrich` is explicit opt-in review mode. It writes local review evidence and
132
+ does not fetch GitHub or apply changes.
122
133
 
123
134
  Interactive viewer flow:
124
135
 
@@ -182,7 +193,7 @@ source records and writes the latest
182
193
  `semantic-extraction-dry-run-*.json` report under `.sdtk/wiki/reports`.
183
194
 
184
195
  This is the beginner-friendly facade for `sdtk-wiki wiki extract --dry-run`.
185
- It does not mutate source files, personal-brain pages, raw/provenance state,
196
+ It does not mutate source files, local wiki pages, raw/provenance state,
186
197
  graph outputs, web sources, Ask state, or `.sdtk/atlas`.
187
198
 
188
199
  Supported JSON repository records may be an array or an object containing a
@@ -312,7 +323,8 @@ are rejected for apply.
312
323
  Apply behavior:
313
324
 
314
325
  - requires `--apply --yes`
315
- - writes only under `.sdtk/wiki/personal-brain`
326
+ - writes only under `wiki/` for new canonical output
327
+ - legacy `.sdtk/wiki/personal-brain` sidecars remain readable for compatibility
316
328
  - create-only or same-content no-op
317
329
  - no overwrite with different content
318
330
  - no delete, archive, rewrite, or reorder
@@ -325,8 +337,8 @@ Apply behavior:
325
337
  sdtk-wiki search --project-path <path> "<query>"
326
338
  ```
327
339
 
328
- Searches generated personal-brain Markdown pages under
329
- `.sdtk/wiki/personal-brain/**/*.md`.
340
+ Searches generated local wiki Markdown pages under `wiki/**/*.md`, falling
341
+ back to `.sdtk/wiki/personal-brain/**/*.md` for legacy workspaces.
330
342
 
331
343
  Search is deterministic, read-only, and non-premium. It does not require
332
344
  `wiki.ask` entitlement, does not call an LLM/RAG runtime, does not write query
@@ -396,7 +408,7 @@ Preview a compile plan without applying it:
396
408
  sdtk-wiki wiki compile --plan <local-plan.md-or-json> --project-path . --dry-run
397
409
  ```
398
410
 
399
- Build a personal-brain from local Markdown sources and search it:
411
+ Build a local wiki from local Markdown sources and search it:
400
412
 
401
413
  ```powershell
402
414
  sdtk-wiki ingest docs
@@ -421,13 +433,13 @@ sdtk-wiki ask --project-path . --question "Which docs describe the deployment pa
421
433
  ```
422
434
 
423
435
  This flow requires valid `wiki.ask` entitlement/runtime preconditions. Use
424
- `sdtk-wiki search` for non-premium local validation of generated
425
- personal-brain pages.
436
+ `sdtk-wiki search` for non-premium local validation of generated local wiki
437
+ pages.
426
438
 
427
439
  ## Foundation/Beta Boundaries
428
440
 
429
441
  This release is local-first and report-first. It is a foundation for a
430
- second-brain workflow, not a fully autonomous second brain.
442
+ local wiki workflow, not a fully autonomous second brain.
431
443
 
432
444
  Do not claim the Foundation/Beta runtime includes:
433
445
 
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "sdtk-wiki-kit",
3
- "version": "0.1.3",
4
- "description": "Project-local wiki and knowledge graph toolkit for SDTK workspaces.",
5
- "bin": {
6
- "sdtk-wiki": "bin/sdtk-wiki.js"
7
- },
8
- "main": "src/index.js",
9
- "type": "commonjs",
10
- "files": [
11
- "bin/",
12
- "src/",
13
- "assets/keys/sdtk-entitlement-public.pem",
14
- "assets/atlas/build_atlas.py",
15
- "assets/atlas/doc_atlas_viewer_template.html",
16
- "assets/atlas/vendor/mermaid.min.js"
17
- ],
18
- "scripts": {
19
- "test": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; Set-Location '..\\..\\..\\..'; python -m unittest tests.test_sdtk_wiki_cli\"",
20
- "pack:smoke": "npm pack --dry-run"
21
- },
22
- "engines": {
23
- "node": ">=18.13.0"
24
- },
25
- "keywords": [
26
- "sdtk-wiki",
27
- "wiki",
28
- "knowledge-graph",
29
- "cli",
30
- "toolkit"
31
- ],
32
- "license": "MIT",
33
- "repository": {
34
- "type": "git",
35
- "url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
36
- "directory": "products/sdtk-wiki/distribution/sdtk-wiki-kit"
37
- },
38
- "homepage": "https://github.com/codexsdtk/sdtk-toolkit/tree/main/products/sdtk-wiki/distribution/sdtk-wiki-kit",
39
- "bugs": {
40
- "url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
41
- },
42
- "publishConfig": {
43
- "access": "public"
44
- }
45
- }
1
+ {
2
+ "name": "sdtk-wiki-kit",
3
+ "version": "0.2.0",
4
+ "description": "Project-local wiki and knowledge graph toolkit for SDTK workspaces.",
5
+ "bin": {
6
+ "sdtk-wiki": "bin/sdtk-wiki.js"
7
+ },
8
+ "main": "src/index.js",
9
+ "type": "commonjs",
10
+ "files": [
11
+ "bin/",
12
+ "src/",
13
+ "assets/keys/sdtk-entitlement-public.pem",
14
+ "assets/atlas/build_atlas.py",
15
+ "assets/atlas/doc_atlas_viewer_template.html",
16
+ "assets/atlas/vendor/mermaid.min.js"
17
+ ],
18
+ "scripts": {
19
+ "test": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; Set-Location '..\\..\\..\\..'; python -m unittest tests.test_sdtk_wiki_cli tests.test_sdtk_wiki_context\"",
20
+ "pack:smoke": "npm pack --dry-run"
21
+ },
22
+ "engines": {
23
+ "node": ">=18.13.0"
24
+ },
25
+ "keywords": [
26
+ "sdtk-wiki",
27
+ "wiki",
28
+ "knowledge-graph",
29
+ "cli",
30
+ "toolkit"
31
+ ],
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
36
+ "directory": "products/sdtk-wiki/distribution/sdtk-wiki-kit"
37
+ },
38
+ "homepage": "https://github.com/codexsdtk/sdtk-toolkit/tree/main/products/sdtk-wiki/distribution/sdtk-wiki-kit",
39
+ "bugs": {
40
+ "url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ }
45
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ const { parseFlags } = require("../lib/args");
4
+ const { ValidationError } = require("../lib/errors");
5
+ const { writeContextPack } = require("../lib/wiki-context-pack");
6
+
7
+ const CONTEXT_FLAG_DEFS = {
8
+ help: { type: "boolean", alias: "h" },
9
+ topic: { type: "string" },
10
+ budget: { type: "string" },
11
+ "project-path": { type: "string" },
12
+ out: { type: "string" },
13
+ };
14
+
15
+ function parseContextFlags(args) {
16
+ return parseFlags(args || [], CONTEXT_FLAG_DEFS);
17
+ }
18
+
19
+ function printContextHelp() {
20
+ console.log(`SDTK-WIKI Context Pack
21
+
22
+ Usage:
23
+ sdtk-wiki context --topic launch --budget 4000 --project-path .
24
+
25
+ Purpose:
26
+ Write a budgeted, source-linked context pack for compact/resume handoff.
27
+
28
+ Behavior:
29
+ Local-only. No network, no iii-sdk, no raw prompt dump.`);
30
+ return 0;
31
+ }
32
+
33
+ function parseBudget(value) {
34
+ if (value === undefined) {
35
+ return 4000;
36
+ }
37
+ const budget = Number(value);
38
+ if (!Number.isInteger(budget) || budget <= 0) {
39
+ throw new ValidationError("--budget must be a positive integer.");
40
+ }
41
+ return budget;
42
+ }
43
+
44
+ function cmdContext(args) {
45
+ const { flags } = parseContextFlags(args || []);
46
+ if (flags.help) {
47
+ return printContextHelp();
48
+ }
49
+ if (!flags.topic || !String(flags.topic).trim()) {
50
+ throw new ValidationError("--topic is required.");
51
+ }
52
+ const result = writeContextPack(flags["project-path"], {
53
+ topic: flags.topic,
54
+ budget: parseBudget(flags.budget),
55
+ out: flags.out,
56
+ });
57
+ console.log(
58
+ `Context pack: ${result.selected} items, ${result.pinned} pinned, ${result.tokens}/${result.budget} tokens, ${result.pagedOut} paged out -> ${result.path}`
59
+ );
60
+ return 0;
61
+ }
62
+
63
+ module.exports = {
64
+ cmdContext,
65
+ parseContextFlags,
66
+ printContextHelp,
67
+ };
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ const { parseFlags } = require("../lib/args");
4
+ const { ValidationError } = require("../lib/errors");
5
+ const { runWikiGithubEnrichmentReview } = require("../lib/wiki-enrich");
6
+
7
+ const ENRICH_FLAG_DEFS = {
8
+ help: { type: "boolean", alias: "h" },
9
+ "project-path": { type: "string" },
10
+ source: { type: "string" },
11
+ mode: { type: "string" },
12
+ };
13
+
14
+ function cmdEnrichHelp() {
15
+ console.log(`SDTK-WIKI Enrich
16
+
17
+ Usage:
18
+ sdtk-wiki enrich --source github --mode review [--project-path <path>]
19
+
20
+ Purpose:
21
+ Write an explicit opt-in GitHub enrichment review report from local wiki evidence.
22
+
23
+ Safety:
24
+ Review mode only in R1.
25
+ No network fetch, page rewrite, source mutation, apply, entitlement change, or .sdtk/atlas mutation.
26
+ Network-backed metadata verification requires a later controller-approved slice.`);
27
+ return 0;
28
+ }
29
+
30
+ function cmdEnrich(args) {
31
+ const { flags } = parseFlags(args || [], ENRICH_FLAG_DEFS);
32
+ if (flags.help) return cmdEnrichHelp();
33
+ if (flags.source !== "github") {
34
+ throw new ValidationError("sdtk-wiki enrich requires --source github in R1. No project files were changed.");
35
+ }
36
+ const mode = flags.mode || "review";
37
+ if (mode !== "review") {
38
+ throw new ValidationError("sdtk-wiki enrich supports only --mode review in R1. No project files were changed.");
39
+ }
40
+ const result = runWikiGithubEnrichmentReview({ projectPath: flags["project-path"] });
41
+ console.log(`[wiki] GitHub enrichment review: ${result.markdownPath}`);
42
+ console.log(`[wiki] JSON report: ${result.jsonPath}`);
43
+ console.log(`[wiki] Candidates: ${result.records.length}`);
44
+ console.log("[wiki] Review-only local metadata. No network fetch, page rewrite, source mutation, or .sdtk/atlas mutation was performed.");
45
+ return 0;
46
+ }
47
+
48
+ module.exports = {
49
+ cmdEnrich,
50
+ cmdEnrichHelp,
51
+ };
@@ -12,6 +12,7 @@ Usage:
12
12
  sdtk-wiki query --help
13
13
  sdtk-wiki discover --help
14
14
  sdtk-wiki maintain --help
15
+ sdtk-wiki enrich --help
15
16
  sdtk-wiki atlas build --help
16
17
  sdtk-wiki atlas open --help
17
18
  sdtk-wiki atlas watch --help
@@ -24,7 +25,7 @@ Usage:
24
25
  sdtk-wiki search --help
25
26
  sdtk-wiki lint --help
26
27
 
27
- Simple personal-brain workflow:
28
+ Simple local wiki workflow:
28
29
  sdtk-wiki init --no-open
29
30
  sdtk-wiki ingest <source-root>
30
31
  sdtk-wiki compile --mode safe [--apply]
@@ -36,10 +37,11 @@ Simple personal-brain workflow:
36
37
  R1 command model:
37
38
  init Initialize the SDTK-WIKI workspace.
38
39
  ingest Run local semantic extraction without handling timestamped JSON.
39
- compile Run safe personal-brain compile preview, optionally apply.
40
- query Search generated personal-brain pages locally without premium Ask.
40
+ compile Run safe local wiki compile preview, optionally apply to wiki/.
41
+ query Search generated local wiki pages without premium Ask.
41
42
  discover Write a local-only discovery plan from WIKI gap evidence.
42
43
  maintain Run safe lint, discover, and compile-preview maintenance reports.
44
+ enrich Write explicit opt-in GitHub enrichment review reports.
43
45
  atlas build Build graph/viewer plus local wiki pages/provenance.
44
46
  atlas open Open or serve the local graph viewer.
45
47
  atlas watch Watch markdown sources and rebuild the graph.
@@ -47,9 +49,9 @@ R1 command model:
47
49
  wiki ingest Register one local source in metadata-only raw/provenance state.
48
50
  wiki prune Write a report-only dry-run stale managed-page review.
49
51
  wiki discover Write a local-only discovery plan from WIKI gap evidence.
50
- wiki compile Preview or explicitly apply local personal-brain compile plans.
52
+ wiki compile Preview or explicitly apply local wiki compile plans.
51
53
  ask Ask grounded questions over the built SDTK-WIKI graph.
52
- search Search generated personal-brain pages locally without premium Ask.
54
+ search Search generated local wiki pages without premium Ask.
53
55
  lint Write a report-first, non-destructive wiki lint report.
54
56
 
55
57
  Advanced/audit workflow:
@@ -57,15 +59,17 @@ Advanced/audit workflow:
57
59
  sdtk-wiki wiki compile --plan <extract-json> --dry-run
58
60
  sdtk-wiki wiki compile --plan <apply-json> --apply --yes
59
61
  sdtk-wiki search "<query>"
62
+ sdtk-wiki enrich --source github --mode review
60
63
 
61
64
  Workspace paths:
62
- .sdtk/wiki New SDTK-WIKI workspace target.
65
+ wiki/ Canonical human-facing local wiki output target.
66
+ .sdtk/wiki Internal SDTK-WIKI state target.
63
67
  .sdtk/wiki/graph New SDTK-WIKI graph output target.
64
- .sdtk/wiki/pages Generated local wiki page target.
68
+ .sdtk/wiki/pages Internal graph/wiki compatibility page target.
65
69
  .sdtk/wiki/raw Metadata-only local source registry target.
66
70
  .sdtk/wiki/provenance Generated source provenance target.
67
71
  .sdtk/atlas Legacy Atlas workspace, readable for compatibility.
68
- Write paths must stay under project-local .sdtk/wiki.
72
+ Human-facing generated wiki paths must stay under project-local wiki/.
69
73
 
70
74
  Compatibility:
71
75
  Existing sdtk-spec atlas commands remain the R1 compatibility path.
@@ -78,13 +82,14 @@ Premium Ask:
78
82
  Query history, discover, compile, and cleanup automation are not enabled in R1.
79
83
 
80
84
  Local Search:
81
- sdtk-wiki query Beginner-friendly local deterministic search over .sdtk/wiki/personal-brain.
82
- sdtk-wiki search Deterministic, read-only local search over .sdtk/wiki/personal-brain.
85
+ sdtk-wiki query Beginner-friendly local deterministic search over wiki/, with legacy .sdtk/wiki/personal-brain fallback.
86
+ sdtk-wiki search Deterministic, read-only local search over wiki/, with legacy .sdtk/wiki/personal-brain fallback.
83
87
  Does not require wiki.ask entitlement and does not perform LLM/RAG behavior.
84
88
 
85
89
  Maintenance:
86
90
  sdtk-wiki discover --plan is a top-level alias for local-only discovery planning.
87
91
  sdtk-wiki maintain --mode safe runs report-first lint/discover/compile-preview checks without apply.
92
+ sdtk-wiki enrich --source github --mode review writes a local-only enrichment review report.
88
93
  sdtk-wiki wiki prune --dry-run is report-only and writes under .sdtk/wiki/reports.
89
94
  It never deletes, archives, applies, or mutates .sdtk/atlas.`);
90
95
  console.log(`
@@ -92,7 +97,7 @@ Maintenance:
92
97
  It never fetches web sources, ingests sources, compiles pages, applies edits, prunes, or mutates .sdtk/atlas.`);
93
98
  console.log(`
94
99
  sdtk-wiki wiki compile --dry-run writes a markdown preview plus JSON sidecar under .sdtk/wiki/reports.
95
- sdtk-wiki wiki compile --apply --yes consumes only the JSON sidecar and writes create-only personal-brain pages.
100
+ sdtk-wiki wiki compile --apply --yes consumes only the JSON sidecar and writes create-only local wiki pages under wiki/.
96
101
  It never rewrites pages, mutates raw/provenance files, or mutates .sdtk/atlas.`);
97
102
  return 0;
98
103
  }
@@ -21,7 +21,7 @@ Output:
21
21
  Behavior:
22
22
  Findings are written to the report and do not auto-modify wiki or source files.
23
23
  Source-quality checks report mojibake-like text, missing source URLs, weak titles, duplicate repo/source candidates, low-confidence extraction, and raw/graph/provenance coverage mismatch.
24
- Personal-brain quality metrics report frontmatter coverage, required sections, source refs, internal links, stub ratio, giant pages, density, and source evidence coverage.
24
+ Local wiki quality metrics report frontmatter coverage, required sections, source refs, internal links, stub ratio, giant pages, density, and source evidence coverage.
25
25
  Completed lint runs exit 0 even when findings exist.
26
26
  Missing workspace or fatal report-write failures exit non-zero.
27
27
 
@@ -101,7 +101,7 @@ Purpose:
101
101
 
102
102
  Safety:
103
103
  Local sources only.
104
- No source mutation, personal-brain page writes, graph rebuild, web fetch, Ask, raw/provenance mutation, or .sdtk/atlas mutation.
104
+ No source mutation, local wiki page writes, graph rebuild, web fetch, Ask, raw/provenance mutation, or .sdtk/atlas mutation.
105
105
 
106
106
  Next:
107
107
  sdtk-wiki compile --mode safe`);
@@ -132,7 +132,7 @@ Usage:
132
132
  sdtk-wiki query [--project-path <path>] [--json] [--limit <n>] "<query>"
133
133
 
134
134
  Purpose:
135
- Deterministically search generated personal-brain Markdown pages.
135
+ Deterministically search generated local wiki Markdown pages.
136
136
 
137
137
  Behavior:
138
138
  Local search only.
@@ -195,7 +195,7 @@ function cmdIngest(args) {
195
195
  console.log(`[wiki] Tool candidates: ${extraction.tool_entities.length}`);
196
196
  console.log(`[wiki] Concept candidates: ${extraction.concepts.length}`);
197
197
  console.log(`[wiki] Quality findings: ${extraction.source_quality_findings.length}`);
198
- console.log("[wiki] No source files, personal-brain pages, raw/provenance state, graph outputs, or atlas compatibility files were modified.");
198
+ console.log("[wiki] No source files, local wiki pages, raw/provenance state, graph outputs, or atlas compatibility files were modified.");
199
199
  console.log("[wiki] Next: sdtk-wiki compile --mode safe");
200
200
  return 0;
201
201
  }
@@ -264,8 +264,9 @@ function cmdCompile(args) {
264
264
  }
265
265
  console.log(`[wiki] Created files: ${result.created.length}`);
266
266
  console.log(`[wiki] Unchanged files: ${result.unchanged.length}`);
267
+ console.log(`[wiki] Scaffold created/skipped: ${result.scaffoldCreated.length}/${result.scaffoldSkipped.length}`);
267
268
  console.log(`[wiki] Source-quality warnings: ${result.sourceQualityWarningCount}`);
268
- console.log("[wiki] No source files, raw sources, provenance descriptors, or atlas compatibility files were modified.");
269
+ console.log("[wiki] Canonical local wiki output is <project>/wiki; .sdtk/wiki remains internal state. No source files, raw sources, provenance descriptors, or atlas compatibility files were modified.");
269
270
  console.log("[wiki] Next: sdtk-wiki query \"multi-agent\"");
270
271
  return 0;
271
272
  }
@@ -22,10 +22,10 @@ Usage:
22
22
  sdtk-wiki search --project-path <path> --json --limit 10 "Claude Code"
23
23
 
24
24
  Purpose:
25
- Deterministically search generated personal-brain Markdown pages.
25
+ Deterministically search generated local wiki Markdown pages.
26
26
 
27
27
  Inputs:
28
- .sdtk/wiki/personal-brain/**/*.md
28
+ wiki/**/*.md, falling back to .sdtk/wiki/personal-brain/**/*.md for legacy workspaces.
29
29
 
30
30
  Behavior:
31
31
  Read-only and non-premium.
@@ -38,14 +38,15 @@ function printHumanResult(result) {
38
38
  const lines = [
39
39
  `Query: ${result.query}`,
40
40
  `Search mode: ${result.searchMode}`,
41
- `Personal brain: ${result.personalBrainPath}`,
41
+ `Wiki content: ${result.wikiContentPath}`,
42
+ `Wiki content mode: ${result.wikiContentMode}`,
42
43
  `Scanned files: ${result.scannedFiles}`,
43
44
  `Matches: ${result.totalMatches}`,
44
45
  "",
45
46
  ];
46
47
 
47
48
  if (result.matches.length === 0) {
48
- lines.push("No local personal-brain matches found.");
49
+ lines.push("No local wiki matches found.");
49
50
  } else {
50
51
  result.matches.forEach((match, index) => {
51
52
  lines.push(`${index + 1}. ${match.path}`);
@@ -37,7 +37,7 @@ function cmdWikiExtractHelp() {
37
37
  sdtk-wiki wiki extract --project-path <path> --source-root <path> --dry-run
38
38
 
39
39
  Purpose:
40
- Write a local semantic extraction dry-run report for SDTK-WIKI personal-brain generation.
40
+ Write a local semantic extraction dry-run report for SDTK-WIKI local wiki generation.
41
41
 
42
42
  Writes:
43
43
  .sdtk/wiki/reports/semantic-extraction-dry-run-YYYYMMDD-HHMMSSZ.json
@@ -45,7 +45,7 @@ Writes:
45
45
  Safety:
46
46
  Dry-run report only.
47
47
  Local Markdown and supported JSON source roots only; remote URLs are rejected.
48
- No personal-brain pages, managed pages, raw sources, provenance state, atlas compatibility files, web fetch, Ask, compile/apply, prune, delete, archive, or source files are modified.`);
48
+ No local wiki pages, managed pages, raw sources, provenance state, atlas compatibility files, web fetch, Ask, compile/apply, prune, delete, archive, or source files are modified.`);
49
49
  return 0;
50
50
  }
51
51
 
@@ -60,13 +60,13 @@ Purpose:
60
60
  Writes:
61
61
  .sdtk/wiki/reports/compile-dry-run-preview-YYYY-MM-DD.md
62
62
  .sdtk/wiki/reports/compile-apply-plan-YYYY-MM-DD.json
63
- .sdtk/wiki/personal-brain/... only when --apply --yes is used with an apply JSON sidecar
63
+ wiki/... only when --apply --yes is used with an apply JSON sidecar
64
64
 
65
65
  Safety:
66
66
  Dry-run remains preview-only.
67
67
  Apply consumes only record_type sdtk_wiki_compile_apply_plan JSON sidecars.
68
68
  Markdown plans and semantic extraction JSON are rejected for apply.
69
- Apply is create-only or same-content no-op under .sdtk/wiki/personal-brain.
69
+ Apply is create-only or same-content no-op under project-local wiki/.
70
70
  No delete, archive, rewrite, reorder, raw source, provenance, atlas compatibility, discover, prune, query-history, or release mutation.
71
71
  Unknown operation types are reported as unsupported_operation and cause a non-zero exit after the report is written.`);
72
72
  return 0;
@@ -225,11 +225,12 @@ function cmdWikiCompile(args) {
225
225
  console.log(`[wiki] Compile apply plan: ${result.planPath}`);
226
226
  console.log(`[wiki] Created files: ${result.created.length}`);
227
227
  console.log(`[wiki] Unchanged files: ${result.unchanged.length}`);
228
+ console.log(`[wiki] Scaffold created/skipped: ${result.scaffoldCreated.length}/${result.scaffoldSkipped.length}`);
228
229
  console.log(`[wiki] Source-quality warnings: ${result.sourceQualityWarningCount}`);
229
230
  if (result.sourceQualityWarningCount > 0) {
230
231
  console.log("[wiki] Source-quality findings were present in the apply plan; pages were still applied because --yes was explicit.");
231
232
  }
232
- console.log("[wiki] No source files, raw sources, provenance descriptors, or atlas compatibility files were modified.");
233
+ console.log("[wiki] Canonical local wiki output is <project>/wiki; .sdtk/wiki remains internal state. No source files, raw sources, provenance descriptors, or atlas compatibility files were modified.");
233
234
  return 0;
234
235
  }
235
236
  if (!flags["dry-run"]) {
@@ -274,7 +275,7 @@ function cmdWikiExtract(args) {
274
275
  console.log(`[wiki] Tool candidates: ${extraction.tool_entities.length}`);
275
276
  console.log(`[wiki] Concept candidates: ${extraction.concepts.length}`);
276
277
  console.log(`[wiki] Quality findings: ${extraction.source_quality_findings.length}`);
277
- console.log("[wiki] No personal-brain pages, raw sources, provenance state, or atlas compatibility files were modified.");
278
+ console.log("[wiki] No local wiki pages, raw sources, provenance state, or atlas compatibility files were modified.");
278
279
  return 0;
279
280
  }
280
281