wiki-graph 0.3.1 → 0.4.1

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 (44) hide show
  1. package/README.md +17 -0
  2. package/dist/cli.js +2221 -37548
  3. package/dist/cli.js.map +1 -1
  4. package/dist/data/editor/text_compressor.jinja +17 -13
  5. package/dist/data/help/commands/archive/next.jinja +7 -2
  6. package/dist/data/help/commands/gc.jinja +2 -1
  7. package/dist/data/help/commands/legacy/migrate.jinja +6 -1
  8. package/dist/data/help/commands/legacy.jinja +3 -2
  9. package/dist/data/help/commands/library-predicate.jinja +296 -0
  10. package/dist/data/help/commands/library.jinja +237 -0
  11. package/dist/data/help/commands/maintenance/chapter/add.jinja +3 -3
  12. package/dist/data/help/commands/maintenance/chapter/list.jinja +4 -4
  13. package/dist/data/help/commands/maintenance/chapter/move.jinja +4 -4
  14. package/dist/data/help/commands/maintenance/chapter/remove.jinja +1 -1
  15. package/dist/data/help/commands/maintenance/chapter/reset.jinja +1 -1
  16. package/dist/data/help/commands/maintenance/chapter/set-source.jinja +2 -2
  17. package/dist/data/help/commands/maintenance/chapter/set-summary.jinja +1 -1
  18. package/dist/data/help/commands/maintenance/chapter/set-title.jinja +3 -3
  19. package/dist/data/help/commands/maintenance/chapter/tree.jinja +6 -6
  20. package/dist/data/help/commands/maintenance/chapter.jinja +10 -10
  21. package/dist/data/help/commands/maintenance/meta.jinja +7 -7
  22. package/dist/data/help/commands/maintenance/upgrade.jinja +35 -0
  23. package/dist/data/help/commands/maintenance.jinja +23 -0
  24. package/dist/data/help/commands/predicate.jinja +204 -28
  25. package/dist/data/help/commands/root.jinja +10 -3
  26. package/dist/data/help/commands/uri.jinja +165 -6
  27. package/dist/data/help/topics/config.jinja +10 -3
  28. package/dist/data/help/topics/library.jinja +90 -0
  29. package/dist/data/help/topics/readiness.jinja +32 -2
  30. package/dist/data/help/topics/recipe.jinja +42 -17
  31. package/dist/data/help/topics/runtime.jinja +20 -3
  32. package/dist/data/help/topics/uri.jinja +53 -25
  33. package/dist/gc-worker.d.ts +1 -0
  34. package/dist/gc-worker.js +548 -0
  35. package/dist/gc-worker.js.map +1 -0
  36. package/dist/index.cjs +12678 -33444
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +36 -2649
  39. package/dist/index.d.ts +36 -2649
  40. package/dist/index.js +12901 -33331
  41. package/dist/index.js.map +1 -1
  42. package/dist/queue-worker.js +1367 -24052
  43. package/dist/queue-worker.js.map +1 -1
  44. package/package.json +15 -3
@@ -98,6 +98,9 @@ Notes:
98
98
  - Run this before broad Reading Graph, Reading Summary, or Knowledge Graph work.
99
99
  - The report includes content counts, FTS index readiness, generation coverage, retrieval guidance, recommended next commands, planning estimates, and concurrency hints.
100
100
  - Use `--json` for a machine-readable report with the same recommendations.
101
+ {% if libraryContext.isArchiveShortcut %}
102
+ - This library archive shortcut inspects one managed archive's readiness; it is not a library-level health report.
103
+ {% endif %}
101
104
  {% elif predicate == "add" and target.name == "chapter-collection-scope" %}
102
105
  Purpose:
103
106
  Add a chapter to the archive.
@@ -115,30 +118,59 @@ Purpose:
115
118
  Add a local generation job.
116
119
 
117
120
  Usage:
118
- {{ commandName }} {{ uri }} add --input <archive-uri|chapter-uri> --task reading-graph|reading-summary|knowledge-graph --accept-cost [--boost] [--llm <json>] [--prompt <text>]
121
+ {{ commandName }} {{ uri }} add --input <archive-uri|chapter-uri> --task reading-graph|reading-summary|knowledge-graph --accept-cost [--depth <N>] [--boost] [--llm <json>] [--prompt <text>]
119
122
 
120
123
  Notes:
121
124
  - Generation jobs may call an LLM provider and incur cost.
122
- - Archive input adds jobs for all eligible chapters; chapter input adds one job.
125
+ - Archive input adds jobs for all eligible chapters; chapter input expands to the chapter subtree by default.
126
+ - Use `--depth <N>` with archive or chapter input to limit affected chapters. For archive input, depth is measured from the archive's root chapters; for chapter input, it is measured from the specified chapter. `--depth 0` means only the relevant root chapters or specified chapter.
123
127
  - `--llm <json>` stores a job-local LLM object; it does not update `wikg://local/config/llm`.
124
128
  {% elif predicate == "move" %}
125
129
  Purpose:
126
130
  Move this chapter in the chapter tree.
127
131
 
128
132
  Usage:
129
- {{ commandName }} {{ uri }} move [--parent <chapter-uri>] [--after <chapter-uri>] [--before <chapter-uri>]
133
+ {{ commandName }} {{ uri }} move --parent <chapter-uri> [--first|--last] [--json]
134
+ {{ commandName }} {{ uri }} move --root [--first|--last] [--json]
135
+ {{ commandName }} {{ uri }} move --before <chapter-uri> [--json]
136
+ {{ commandName }} {{ uri }} move --after <chapter-uri> [--json]
137
+ {{ commandName }} {{ uri }} move --first [--json]
138
+ {{ commandName }} {{ uri }} move --last [--json]
139
+
140
+ Notes:
141
+ - Moves only the chapter tree node. Source text, Reading Graph data, and summary stay attached to the same internal chapter record.
142
+ - `--parent <chapter-uri>` moves the chapter under another chapter.
143
+ - `--root` moves the chapter to the top level.
144
+ - `--before <chapter-uri>` or `--after <chapter-uri>` moves the chapter next to the target chapter.
145
+ - `--first` or `--last` moves within the target parent when combined with `--parent` or `--root`.
146
+ - Without `--parent` or `--root`, `--first` and `--last` reorder within the current parent.
147
+ - Cannot move a chapter into or next to its own descendant.
130
148
  {% elif predicate == "remove" %}
131
149
  Purpose:
132
150
  Remove this chapter.
133
151
 
134
152
  Usage:
135
- {{ commandName }} {{ uri }} remove [--confirm]
153
+ {{ commandName }} {{ uri }} remove [--recursive] [--json]
154
+
155
+ Notes:
156
+ - Removes the target chapter from the TOC tree.
157
+ - Removes that chapter's source text, Reading Graph data, and summary.
158
+ - Fails when the chapter has children unless `--recursive` is provided.
159
+ - With `--recursive`, removes the whole selected subtree and its stored data.
160
+ - This is a destructive in-place edit. Read the chapter tree first when the archive is important.
136
161
  {% elif predicate == "reset" %}
137
162
  Purpose:
138
163
  Delete later-stage artifacts for this chapter.
139
164
 
140
165
  Usage:
141
- {{ commandName }} {{ uri }} reset --to source|reading-graph|reading-summary|knowledge-graph [--confirm]
166
+ {{ commandName }} {{ uri }} reset --to planned|source|reading-graph [--json]
167
+
168
+ Notes:
169
+ - `planned` deletes source text, Reading Graph data, and summary.
170
+ - `source` keeps source text and deletes Reading Graph data and summary.
171
+ - `reading-graph` keeps source text and Reading Graph data, and deletes summary.
172
+ - `reading-summary` and `knowledge-graph` are not supported reset targets.
173
+ - Reset is destructive and may discard generated work.
142
174
  {% elif predicate == "set" %}
143
175
  {% if target.name == "chapter-tree-object" %}
144
176
  Purpose:
@@ -191,6 +223,21 @@ Usage:
191
223
  Notes:
192
224
  - This changes what the job will generate when resumed or picked up by a worker.
193
225
  - Use `{{ commandName }} {{ uri }} --help` to inspect the current job target first.
226
+ {% elif target.name == "metadata-object" %}
227
+ Purpose:
228
+ Replace this metadata map with a JSON object.
229
+
230
+ Usage:
231
+ {{ commandName }} {{ uri }} set <json> [--json]
232
+ {{ commandName }} {{ uri }} set --input <path|-> [--json]
233
+ {{ commandName }} {{ uri }} set --json-input <json> [--json]
234
+
235
+ Notes:
236
+ - Metadata shape depends on whether this is archive metadata or object metadata.
237
+ - `--json-input <json>` reads an inline JSON object.
238
+ - `--input <path|->` reads a JSON object from a file or stdin.
239
+ - `--json` controls output shape; it is not JSON input.
240
+ - `put`, `delete`, and `clear` are usually safer for single-key metadata edits.
194
241
  {% elif target.name == "local-config-section" %}
195
242
  Purpose:
196
243
  Replace this entire local config section with a JSON object.
@@ -247,19 +294,6 @@ Examples:
247
294
  {{ commandName }} {{ uri }} set '{"job":3,"request":6}'
248
295
  {{ commandName }} {{ uri }} set --json-input '{"job":2,"request":4}'
249
296
  {% endif %}
250
- {% elif "/meta" in uri %}
251
- Purpose:
252
- Replace this metadata object from a JSON object or input value.
253
-
254
- Usage:
255
- {{ commandName }} {{ uri }} set <json> [--json]
256
- {{ commandName }} {{ uri }} set --input <path|-> [--json]
257
- {{ commandName }} {{ uri }} set --json-input <json> [--json]
258
-
259
- Notes:
260
- - Metadata shape depends on whether this is archive metadata or object metadata.
261
- - Use `--input -` when metadata JSON should come from stdin.
262
- - `put`, `delete`, and `clear` are usually safer for single-key metadata edits.
263
297
  {% else %}
264
298
  Purpose:
265
299
  This URI target has no generic `set` behavior.
@@ -271,26 +305,55 @@ Notes:
271
305
  - `set` is target-specific. Use the URI help page to find the writable child resource or supported predicate.
272
306
  {% endif %}
273
307
  {% elif predicate == "clear" %}
308
+ {% if target.name == "chapter-title-object" %}
309
+ Purpose:
310
+ Remove this chapter's explicit title.
311
+ {% elif target.name == "metadata-object" %}
312
+ Purpose:
313
+ Clear this metadata map.
314
+ {% else %}
274
315
  Purpose:
275
316
  Clear this writable resource or local config section.
317
+ {% endif %}
276
318
 
277
319
  Usage:
278
- {{ commandName }} {{ uri }} clear
320
+ {{ commandName }} {{ uri }} clear{% if target.name == "metadata-object" %} [--json]{% endif %}
279
321
 
280
- {% if target.name == "local-config-section" %}
322
+ {% if target.name == "chapter-title-object" %}
281
323
  Notes:
282
- - Clears every key in this local config section, including secrets.
283
- - No confirmation prompt is shown.
284
- - Success output is the now-empty JSON object: `{}`.
285
- {% elif "/meta" in uri %}
324
+ - Removes the explicit title for this chapter.
325
+ - This does not delete the chapter, source text, Reading Graph data, or summary.
326
+ {% elif target.name == "metadata-object" %}
286
327
  Notes:
287
328
  - Clears all metadata keys for this metadata object.
288
329
  - No confirmation prompt is shown.
330
+ - This does not delete the archive object or generated graph data.
331
+ {% elif target.name == "local-config-section" %}
332
+ Notes:
333
+ - Clears every key in this local config section, including secrets.
334
+ - No confirmation prompt is shown.
335
+ - Success output is the now-empty JSON object: `{}`.
289
336
  {% else %}
290
337
  Notes:
291
338
  - This predicate is only available on URI targets that explicitly support clearing.
292
339
  {% endif %}
293
340
  {% elif predicate == "enable" %}
341
+ {% if target.name == "index-object" and libraryContext.isLibraryWide %}
342
+ Purpose:
343
+ Build or rebuild this library's aggregate search index.
344
+
345
+ Usage:
346
+ {{ commandName }} {{ uri }} enable [--jsonl]
347
+
348
+ Notes:
349
+ - This is a full rebuild from registered present archives.
350
+ - Missing or unreadable library archive members are skipped and reported.
351
+ - Progress is emitted as text by default, or line-delimited events with `--jsonl`.
352
+ - `--json` is not supported for enable because progress is streamed.
353
+ - Library indexes are local derived state under Wiki Graph staging, not files inside the library folder.
354
+ - Rebuild holds the library write lock; concurrent `arc scan`, `arc add`, `path set`, `disable`, archive `path set`, or archive `remove` commands for the same library cannot run at the same time.
355
+ - Archive writes can mark the aggregate index dirty; rebuild again before relying on library-wide query when status reports dirty or stale.
356
+ {% else %}
294
357
  Purpose:
295
358
  Enable searchable FTS index support for this archive on this machine.
296
359
 
@@ -306,7 +369,21 @@ Notes:
306
369
  - Text success output is a short status summary.
307
370
  - With `--jsonl`, progress is emitted as line-delimited event records such as step/status/error records.
308
371
  - After enable succeeds, `--query`, `related --query`, and `evidence --query` become available.
372
+ {% endif %}
309
373
  {% elif predicate == "disable" %}
374
+ {% if target.name == "index-object" and libraryContext.isLibraryWide %}
375
+ Purpose:
376
+ Disable this library index and remove its current local materialization.
377
+
378
+ Usage:
379
+ {{ commandName }} {{ uri }} disable [--json]
380
+
381
+ Notes:
382
+ - This does not delete the library registry, metadata, folder, or managed `.wikg` archives.
383
+ - Library-wide object `--query` and object scope enumeration will fail until the index is enabled again.
384
+ - Library indexes do not support archive-style `embed` or `external` modes.
385
+ - Disable holds the library write lock and cannot run concurrently with membership changes or index rebuild for the same library.
386
+ {% else %}
310
387
  Purpose:
311
388
  Disable searchable FTS index support for this archive and remove the current index materialization.
312
389
 
@@ -317,7 +394,19 @@ Notes:
317
394
  - Disabling removes the current local or embedded index materialization.
318
395
  - After disable succeeds, `--query`, `related --query`, and `evidence --query` are unavailable until `enable` or `embed` is run again.
319
396
  - Use this when intentionally dropping index state, not as routine cleanup after generation.
397
+ {% endif %}
320
398
  {% elif predicate == "embed" %}
399
+ {% if target.name == "index-object" and libraryContext.isLibraryWide %}
400
+ Purpose:
401
+ This library index does not support embedded archive index storage.
402
+
403
+ Usage:
404
+ {{ commandName }} {{ uri }} enable --help
405
+
406
+ Notes:
407
+ - Library indexes are local derived state under Wiki Graph staging.
408
+ - Use `enable` to build the library index or `disable` to remove it.
409
+ {% else %}
321
410
  Purpose:
322
411
  Use an archive-embedded searchable FTS index.
323
412
 
@@ -329,7 +418,19 @@ Notes:
329
418
  - After embedding, CLI archive writes keep the embedded index synchronized automatically.
330
419
  - This makes the archive more portable, but increases archive size.
331
420
  - Use it when distributing a `.wikg` with keyword retrieval ready for another machine.
421
+ {% endif %}
332
422
  {% elif predicate == "external" %}
423
+ {% if target.name == "index-object" and libraryContext.isLibraryWide %}
424
+ Purpose:
425
+ This library index does not support archive externalization.
426
+
427
+ Usage:
428
+ {{ commandName }} {{ uri }} enable --help
429
+
430
+ Notes:
431
+ - Library indexes are already local derived state under Wiki Graph staging.
432
+ - Use `enable` to build the library index or `disable` to remove it.
433
+ {% else %}
333
434
  Purpose:
334
435
  Use external local-cache storage for the searchable FTS index.
335
436
 
@@ -339,13 +440,23 @@ Usage:
339
440
  Notes:
340
441
  - This switches the index storage policy back to local cache outside the `.wikg` archive.
341
442
  - The archive no longer carries embedded index data.
342
- - If query support is needed on this machine after externalizing, run `{{ commandName }} {{ uri }} enable`.
443
+ - Externalizing does not guarantee a current local materialization on this machine.
444
+ - Run `{{ commandName }} {{ uri }} enable` to build or repair local query support after switching to external storage.
445
+ {% endif %}
343
446
  {% elif predicate == "clean" %}
344
447
  Purpose:
345
448
  Remove completed local generation jobs.
346
449
 
347
450
  Usage:
348
451
  {{ commandName }} {{ uri }} clean
452
+
453
+ Notes:
454
+ - Removes succeeded, failed, and canceled jobs whose status has not changed for at least seven days.
455
+ - Deletes those job records plus their workspace, cache, log, and event files.
456
+ - Does not remove waiting, running, paused, or recently finished jobs.
457
+ - Does not stop workers or cancel active jobs.
458
+ - Does not support `--json`, `--jsonl`, `--dry-run`, or `--confirm`; output is a short text count.
459
+ - Use `{{ commandName }} gc --help` for broader runtime cleanup and dry-run support.
349
460
  {% elif predicate == "watch" %}
350
461
  Purpose:
351
462
  Follow durable local job progress.
@@ -377,14 +488,30 @@ Purpose:
377
488
  Usage:
378
489
  {{ commandName }} {{ uri }} boost
379
490
  {% elif predicate == "put" %}
491
+ {% if target.name == "metadata-object" %}
492
+ Purpose:
493
+ Set one metadata key.
494
+
495
+ Usage:
496
+ {{ commandName }} {{ uri }} put <key> <value> [--json]
497
+ {{ commandName }} {{ uri }} put <key> --json-input <json> [--json]
498
+ {{ commandName }} {{ uri }} put <key> --input <path|-> [--json]
499
+
500
+ Notes:
501
+ - Positional `<value>` is stored as a string.
502
+ - `--json-input <json>` stores a JSON value.
503
+ - `--input <path|->` reads a value from a file or stdin.
504
+ - `--json` controls output shape; it is not JSON input.
505
+ - Metadata keys are command arguments, not URI segments.
506
+ {% else %}
380
507
  Purpose:
381
508
  Set one key in this local config section.
382
509
 
383
510
  Usage:
384
- {{ commandName }} {{ uri }} put <key> <value>
385
- {{ commandName }} {{ uri }} put <key> --json-input <json>
511
+ {{ commandName }} {{ uri }} put <key> <value> [--json]
512
+ {{ commandName }} {{ uri }} put <key> --json-input <json> [--json]
386
513
  {% if "/llm" in uri %}
387
- {{ commandName }} {{ uri }} put <key> --secret
514
+ {{ commandName }} {{ uri }} put <key> --secret [--json]
388
515
  {% endif %}
389
516
 
390
517
  {% if target.name == "local-config-section" %}
@@ -407,12 +534,25 @@ Keys:
407
534
  Notes:
408
535
  - Positional `<value>` is stored as a string.
409
536
  - `--json-input` stores a JSON value and is useful for numeric config sections.
537
+ - `--json` controls output shape; it is not JSON input.
410
538
  {% if "/llm" in uri %}
411
539
  - `--secret` reads the value from an interactive terminal without echoing it; use it for `apiKey`.
412
540
  {% endif %}
413
541
  - Success output is the full section JSON with sensitive values masked.
414
542
  {% endif %}
543
+ {% endif %}
415
544
  {% elif predicate == "delete" %}
545
+ {% if target.name == "metadata-object" %}
546
+ Purpose:
547
+ Delete one metadata key.
548
+
549
+ Usage:
550
+ {{ commandName }} {{ uri }} delete <key> [--json]
551
+
552
+ Notes:
553
+ - Deletes the key if present; deleting an absent key leaves the metadata map unchanged.
554
+ - Metadata keys are command arguments, not URI segments.
555
+ {% else %}
416
556
  Purpose:
417
557
  Delete one key from this local config section.
418
558
 
@@ -425,16 +565,27 @@ Notes:
425
565
  - Success output is the full section JSON after deletion.
426
566
  - Key aliases are normalized where supported, for example `api-key` to `apiKey`.
427
567
  {% endif %}
568
+ {% endif %}
428
569
  {% elif predicate == "test" %}
570
+ {% if "/concurrent" in uri %}
571
+ Purpose:
572
+ Validate this local concurrency config section.
573
+ {% else %}
429
574
  Purpose:
430
575
  Test connectivity for this local config section.
576
+ {% endif %}
431
577
 
432
578
  Usage:
433
579
  {{ commandName }} {{ uri }} test [--json]
434
580
 
435
581
  Notes:
582
+ {% if "/concurrent" in uri %}
583
+ - Validates that configured `job` and `request` limits are positive integers.
584
+ - This does not contact an external service.
585
+ {% else %}
436
586
  - For `llm`, this sends a small request to the configured model.
437
587
  - For `wikispine`, this checks the built-in fetch service or local `wikispine` command.
588
+ {% endif %}
438
589
  - Text success output is intentionally short.
439
590
  - With `--json`, success and failure both return `{ "ok": true|false, ... }`; failures set a non-zero exit code.
440
591
  - Without `--json`, failures print the command error. Use `{{ commandName }} help readiness` and `{{ commandName }} help config` to recover.
@@ -443,6 +594,28 @@ Notes:
443
594
  {% endif %}
444
595
  {% endif %}
445
596
 
597
+ {% if libraryContext.isLibraryUri %}
598
+ Library context:
599
+ - This predicate runs through a library URI, not a standalone `.wikg` locator.
600
+ {% if libraryContext.isLibraryWide %}
601
+ - Library-wide object predicates use the aggregate library index and may fail when that index is missing, dirty, or stale.
602
+ - Interpret results with the returned archive/member provenance; cite the specific returned evidence or member.
603
+ {% endif %}
604
+ {% if target.name == "chapter-collection-scope" or target.name == "chapter-scope" or target.name == "chapter-source-object" or target.name == "chapter-summary-object" or target.name == "chapter-title-object" or target.name == "chapter-tree-object" or target.name == "chapter-state-object" %}
605
+ - Library archive shortcuts such as `wikg://lib/arc/<archive-id>/chapter/part` apply the predicate to one managed archive.
606
+ {% elif target.name == "triple-object" or target.name == "triple-scope" %}
607
+ - Library archive shortcuts such as `wikg://lib/arc/<archive-id>/triple/Q8018/discusses/Q123` apply the predicate to one managed archive.
608
+ {% elif target.name == "chunk-object" or target.name == "chunk-scope" %}
609
+ - Library archive shortcuts such as `wikg://lib/arc/<archive-id>/chunk/12` apply the predicate to one managed archive.
610
+ {% elif target.name == "index-object" and libraryContext.isLibraryWide %}
611
+ - Library index shortcuts such as `wikg://lib/index` apply the predicate to the aggregate library index.
612
+ {% elif target.name == "index-object" %}
613
+ - Library archive shortcuts such as `wikg://lib/arc/<archive-id>/index` apply the predicate to one managed archive.
614
+ {% else %}
615
+ - Library archive shortcuts such as `wikg://lib/arc/<archive-id>/entity/Q8018` apply the predicate to one managed archive.
616
+ {% endif %}
617
+ {% endif %}
618
+
446
619
  Related help:
447
620
  - {{ commandName }} {{ uri }} --help
448
621
  - {{ commandName }} help uri
@@ -458,3 +631,6 @@ Related help:
458
631
  {% if target.name == "local-config-section" %}
459
632
  - {{ commandName }} help config
460
633
  {% endif %}
634
+ {% if libraryContext.isLibraryUri %}
635
+ - {{ commandName }} help library
636
+ {% endif %}
@@ -41,7 +41,7 @@ Core concepts:
41
41
  - Cursor: a continuation token consumed by `{{ commandName }} next`.
42
42
 
43
43
  Important object families:
44
- chapter, chunk, entity, triple, summary, index, job, config, meta.
44
+ chapter, chunk, entity, triple, summary, index, library, job, config, meta.
45
45
 
46
46
  What to learn where:
47
47
  - Normal workflow, object choice, and practical Agent behavior:
@@ -50,6 +50,8 @@ What to learn where:
50
50
  {{ commandName }} help readiness
51
51
  - URI grammar, scope/object routing, pagination, and short URI handling:
52
52
  {{ commandName }} help uri
53
+ - Library registries, managed archive folders, path binding, and aggregate indexes:
54
+ {{ commandName }} help library
53
55
  - Input/output formats, inference, stdin, stdout, import, export, transform, JSON, and JSONL:
54
56
  {{ commandName }} help format
55
57
  - Local LLM, concurrency, and WikiSpine provider configuration:
@@ -61,18 +63,23 @@ Help contract:
61
63
  The CLI help system is part of the product contract. When you do not know what a target or operation supports, ask the CLI for the next document.
62
64
  - Use `{{ commandName }} <uri> --help` to inspect a URI command, its default behavior, and supported predicates.
63
65
  - Use `{{ commandName }} <uri> <predicate> --help` to inspect a URI-bound predicate command.
64
- - Use `{{ commandName }} <non-predicate-command> --help` for non-predicate commands such as `transform`, `gc`, `legacy`, and `next`.
66
+ - Use `{{ commandName }} <non-predicate-command> --help` for non-predicate commands such as `transform`, `gc`, `maintenance`, `legacy`, and `next`.
65
67
  - Use `{{ commandName }} help <topic>` for cross-command concepts, constraints, and runtime behavior.
66
68
  - Treat `{{ commandName }} --help` as the root page of the same help system.
67
- - Use `{{ commandName }} legacy migrate --help` only when upgrading an `.sdpub` archive.
69
+ - Use `{{ commandName }} maintenance upgrade --help` for home, `.wikg`, library, and `.sdpub` upgrades.
70
+ - `{{ commandName }} legacy migrate --help` is a deprecated compatibility alias for `.sdpub` migration.
68
71
 
69
72
  Non-predicate command entry points:
70
73
  {{ commandName }} transform --help
71
74
  {{ commandName }} next --help
72
75
  {{ commandName }} gc --help
76
+ {{ commandName }} maintenance --help
73
77
  {{ commandName }} legacy --help
74
78
  {{ commandName }} help [topic] [--help|-h]
75
79
 
80
+ Library entry point:
81
+ {{ commandName }} wikg://lib --help
82
+
76
83
  Help topics:
77
84
  {% for topic in helpTopics %}
78
85
  - {{ commandName }} help {{ topic.name }}