sdtk-wiki-kit 0.1.2 → 0.1.4

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,7 @@
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
6
 
7
7
  SDTK-WIKI is the canonical home for new SDTK wiki work. The older
8
8
  `sdtk-spec atlas` commands remain a compatibility path for free graph/viewer
@@ -28,7 +28,7 @@ Implemented in the Foundation/Beta package:
28
28
  | Capability | Command |
29
29
  |---|---|
30
30
  | 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` |
31
+ | Build a local wiki without timestamp variables | `sdtk-wiki ingest`, `sdtk-wiki compile --mode safe --apply`, `sdtk-wiki query` |
32
32
  | Build graph, viewer, generated pages, and provenance | `sdtk-wiki atlas build` |
33
33
  | Open local viewer | `sdtk-wiki atlas open` |
34
34
  | Watch markdown sources and rebuild | `sdtk-wiki atlas watch` |
@@ -42,8 +42,8 @@ Implemented in the Foundation/Beta package:
42
42
  | Generate semantic extraction dry-run report | `sdtk-wiki wiki extract --dry-run` |
43
43
  | Generate compile dry-run preview and JSON sidecar | `sdtk-wiki wiki compile --dry-run` |
44
44
  | 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` |
45
+ | Search generated local wiki pages locally | `sdtk-wiki search` |
46
+ | Query generated local wiki pages locally | `sdtk-wiki query` |
47
47
  | Ask grounded questions over built graph | `sdtk-wiki ask` with `wiki.ask` entitlement/runtime preconditions |
48
48
  | Save one redacted query record after successful Ask | `sdtk-wiki ask --save-query` with `wiki.ask` entitlement/runtime preconditions |
49
49
 
@@ -60,17 +60,20 @@ Not implemented in the Foundation/Beta runtime:
60
60
 
61
61
  | Path | Meaning |
62
62
  |---|---|
63
- | `.sdtk/wiki` | SDTK-WIKI workspace root |
63
+ | `wiki` | canonical human-facing local wiki output |
64
+ | `.sdtk/wiki` | internal SDTK-WIKI workspace root |
64
65
  | `.sdtk/wiki/graph` | graph/viewer output |
65
66
  | `.sdtk/wiki/pages` | generated managed wiki pages |
66
67
  | `.sdtk/wiki/raw` | metadata-only raw/source registry |
67
68
  | `.sdtk/wiki/provenance` | source/build/ingest provenance |
68
69
  | `.sdtk/wiki/reports` | lint, prune, discover, and compile preview reports |
69
- | `.sdtk/wiki/personal-brain` | generated semantic personal-brain pages from explicit apply |
70
+ | `.sdtk/wiki/personal-brain` | legacy generated semantic pages, readable as fallback only |
70
71
  | `.sdtk/wiki/queries` | opt-in redacted Ask query records |
71
72
  | `.sdtk/atlas` | legacy Atlas compatibility output, readable only |
72
73
 
73
- SDTK-WIKI writes only under project-local `.sdtk/wiki`. It must not auto-delete,
74
+ SDTK-WIKI writes human-facing generated wiki pages under project-local `wiki/`.
75
+ Internal state, reports, provenance, raw registry, graph, logs, and legacy
76
+ fallback pages stay under project-local `.sdtk/wiki`. It must not auto-delete,
74
77
  auto-migrate, or rewrite `.sdtk/atlas`.
75
78
 
76
79
  Existing `sdtk-spec atlas init|build|open|watch|status` commands remain the R1
@@ -95,9 +98,9 @@ Open the viewer:
95
98
  sdtk-wiki atlas open --project-path .
96
99
  ```
97
100
 
98
- ## Simple Personal-Brain Flow
101
+ ## Simple Local Wiki Flow
99
102
 
100
- Use this when you want the shortest local second-brain path and do not need to
103
+ Use this when you want the shortest local wiki path and do not need to
101
104
  inspect timestamped JSON files:
102
105
 
103
106
  ```powershell
@@ -115,7 +118,8 @@ Behavior:
115
118
  - `ingest` runs local semantic extraction and writes a report.
116
119
  - `compile --mode safe --apply` creates or refreshes the compile preview/JSON
117
120
  sidecar internally, then applies the sidecar contract.
118
- - `query` is deterministic local search over `.sdtk/wiki/personal-brain`; it
121
+ - `query` is deterministic local search over `wiki/`, with legacy
122
+ `.sdtk/wiki/personal-brain` fallback; it
119
123
  does not use premium Ask, LLM/RAG, web fetch, or query history.
120
124
  - `discover` and `maintain` are report-first and do not apply, delete, archive,
121
125
  fetch web sources, or mutate `.sdtk/atlas`.
@@ -177,13 +181,20 @@ sdtk-wiki ingest <source-root> [--project-path <path>]
177
181
  sdtk-wiki ingest --source-root <source-root> [--project-path <path>]
178
182
  ```
179
183
 
180
- Runs semantic extraction over a local Markdown source root and writes the latest
184
+ Runs semantic extraction over a local Markdown source root plus supported JSON
185
+ source records and writes the latest
181
186
  `semantic-extraction-dry-run-*.json` report under `.sdtk/wiki/reports`.
182
187
 
183
188
  This is the beginner-friendly facade for `sdtk-wiki wiki extract --dry-run`.
184
- It does not mutate source files, personal-brain pages, raw/provenance state,
189
+ It does not mutate source files, local wiki pages, raw/provenance state,
185
190
  graph outputs, web sources, Ask state, or `.sdtk/atlas`.
186
191
 
192
+ Supported JSON repository records may be an array or an object containing a
193
+ `records`, `repos`, `repositories`, `items`, or `data` array. Each record can
194
+ include `repo_url`, `owner`, `repo_name`, `message_text_snippet`,
195
+ `source_link`, `topics`, and `confidence`. JSON records are local-only evidence:
196
+ SDTK-WIKI does not fetch GitHub, Facebook, or web URLs.
197
+
187
198
  ### Lint
188
199
 
189
200
  ```powershell
@@ -235,10 +246,10 @@ boundary.
235
246
  sdtk-wiki wiki extract --project-path <path> --source-root <path> --dry-run
236
247
  ```
237
248
 
238
- Reads local Markdown sources and writes a semantic extraction JSON report under
239
- `.sdtk/wiki/reports`. The report can identify local source records, GitHub
240
- tool candidates, concept candidates, relations, comparisons, syntheses, and
241
- source-quality findings.
249
+ Reads local Markdown sources and supported JSON repository records and writes a
250
+ semantic extraction JSON report under `.sdtk/wiki/reports`. The report can
251
+ identify local source records, GitHub tool candidates, concept candidates,
252
+ relations, comparisons, syntheses, and source-quality findings.
242
253
 
243
254
  Safety:
244
255
 
@@ -305,7 +316,8 @@ are rejected for apply.
305
316
  Apply behavior:
306
317
 
307
318
  - requires `--apply --yes`
308
- - writes only under `.sdtk/wiki/personal-brain`
319
+ - writes only under `wiki/` for new canonical output
320
+ - legacy `.sdtk/wiki/personal-brain` sidecars remain readable for compatibility
309
321
  - create-only or same-content no-op
310
322
  - no overwrite with different content
311
323
  - no delete, archive, rewrite, or reorder
@@ -318,8 +330,8 @@ Apply behavior:
318
330
  sdtk-wiki search --project-path <path> "<query>"
319
331
  ```
320
332
 
321
- Searches generated personal-brain Markdown pages under
322
- `.sdtk/wiki/personal-brain/**/*.md`.
333
+ Searches generated local wiki Markdown pages under `wiki/**/*.md`, falling
334
+ back to `.sdtk/wiki/personal-brain/**/*.md` for legacy workspaces.
323
335
 
324
336
  Search is deterministic, read-only, and non-premium. It does not require
325
337
  `wiki.ask` entitlement, does not call an LLM/RAG runtime, does not write query
@@ -389,7 +401,7 @@ Preview a compile plan without applying it:
389
401
  sdtk-wiki wiki compile --plan <local-plan.md-or-json> --project-path . --dry-run
390
402
  ```
391
403
 
392
- Build a personal-brain from local Markdown sources and search it:
404
+ Build a local wiki from local Markdown sources and search it:
393
405
 
394
406
  ```powershell
395
407
  sdtk-wiki ingest docs
@@ -414,13 +426,13 @@ sdtk-wiki ask --project-path . --question "Which docs describe the deployment pa
414
426
  ```
415
427
 
416
428
  This flow requires valid `wiki.ask` entitlement/runtime preconditions. Use
417
- `sdtk-wiki search` for non-premium local validation of generated
418
- personal-brain pages.
429
+ `sdtk-wiki search` for non-premium local validation of generated local wiki
430
+ pages.
419
431
 
420
432
  ## Foundation/Beta Boundaries
421
433
 
422
434
  This release is local-first and report-first. It is a foundation for a
423
- second-brain workflow, not a fully autonomous second brain.
435
+ local wiki workflow, not a fully autonomous second brain.
424
436
 
425
437
  Do not claim the Foundation/Beta runtime includes:
426
438
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdtk-wiki-kit",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Project-local wiki and knowledge graph toolkit for SDTK workspaces.",
5
5
  "bin": {
6
6
  "sdtk-wiki": "bin/sdtk-wiki.js"
@@ -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,6 +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
+ Local wiki quality metrics report frontmatter coverage, required sections, source refs, internal links, stub ratio, giant pages, density, and source evidence coverage.
24
25
  Completed lint runs exit 0 even when findings exist.
25
26
  Missing workspace or fatal report-write failures exit non-zero.
26
27
 
@@ -97,11 +97,11 @@ Usage:
97
97
  sdtk-wiki ingest --source-root <path> [--project-path <path>]
98
98
 
99
99
  Purpose:
100
- Run local semantic extraction over a Markdown source root and write a report under .sdtk/wiki/reports.
100
+ Run local semantic extraction over Markdown and supported JSON source records and write a report under .sdtk/wiki/reports.
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,15 +37,15 @@ 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
44
44
 
45
45
  Safety:
46
46
  Dry-run report only.
47
- Local Markdown 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.`);
47
+ Local Markdown and supported JSON source roots only; remote URLs are rejected.
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
 
package/src/index.js CHANGED
@@ -12,6 +12,7 @@ const {
12
12
  cmdMaintain,
13
13
  cmdQuery,
14
14
  } = require("./commands/operations");
15
+ const { cmdEnrich } = require("./commands/enrich");
15
16
  const { cmdSearch } = require("./commands/search");
16
17
  const { cmdWiki } = require("./commands/wiki");
17
18
  const { ValidationError } = require("./lib/errors");
@@ -51,6 +52,7 @@ const COMMANDS = new Set([
51
52
  "query",
52
53
  "discover",
53
54
  "maintain",
55
+ "enrich",
54
56
  ]);
55
57
 
56
58
  async function run(argv) {
@@ -90,6 +92,8 @@ async function run(argv) {
90
92
  return cmdDiscover(args);
91
93
  case "maintain":
92
94
  return cmdMaintain(args);
95
+ case "enrich":
96
+ return cmdEnrich(args);
93
97
  }
94
98
  }
95
99