Skip to content

Refresh Wiki Graph public docs#103

Merged
Moskize91 merged 16 commits into
mainfrom
codex/prune-public-docs
Jul 6, 2026
Merged

Refresh Wiki Graph public docs#103
Moskize91 merged 16 commits into
mainfrom
codex/prune-public-docs

Conversation

@Moskize91

Copy link
Copy Markdown
Contributor

Summary

  • prune outdated public markdown docs and rewrite the Chinese/English README around the Wiki Graph positioning
  • document .wikg, Knowledge Graph, summary generation, URI handling, and common workflows
  • simplify chapter source input behavior and align CLI help/tests with the current create/import flow

Validation

  • pnpm test -- archive-chapter args
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Summary by CodeRabbit

  • New Features
    • Updated the CLI experience for chapter, summary, tree, and metadata actions to support file input and stdin via --input -.
    • Added clearer URI handling for source and summary sentence ranges, now shown as 1-based and inclusive.
  • Bug Fixes
    • Improved error handling for missing or malformed inputs and unknown URI targets.
    • Source-range links and evidence references now display consistent numbering.
  • Documentation
    • Rebranded the docs to Wiki Graph and refreshed quick start, workflows, and command help examples.

Walkthrough

Changes

This PR rebrands documentation from SpineDigest to Wiki Graph, rewriting README files and removing several standalone architecture/CLI/library/quickstart/ai-agents docs in English and Chinese. It unifies CLI content input handling across chapter and metadata commands to use --input <path|-> (supporting stdin via -), replacing the previous --stage/TTY-based input logic, and removes the addStage field and related parsing. Source/summary sentence range URIs shift from 0-based to 1-based inclusive numbering in archive-view.ts, with corresponding help template updates and adjusted error messages. Extensive test updates reflect the new sentence-range identifiers and new --input/stdin behaviors, including rejection cases for missing input and unsupported --stage usage.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant CLIArgs as args.ts
  participant ArchiveChapter as archive-chapter.ts
  participant ArchiveView as archive-view.ts

  User->>CLIArgs: chapter add --input <path|->
  CLIArgs->>CLIArgs: normalize args (reject --stage)
  CLIArgs->>ArchiveChapter: parsed args (no addStage)
  ArchiveChapter->>ArchiveChapter: readContentText(args)
  ArchiveChapter->>ArchiveView: formatTextStreamRangeUri(sentence indices)
  ArchiveView-->>ArchiveChapter: 1-based sentence range URI
  ArchiveChapter-->>User: chapter created (planned or sourced)
Loading

Possibly related PRs

  • oomol-lab/wiki-graph#89: Both PRs modify the same chapter maintenance help templates (chapter.jinja, set-source.jinja, set-summary.jinja) for input/usage syntax.
  • oomol-lab/wiki-graph#98: Both PRs touch URI-first help/routing logic in src/cli/args.ts, including parseArchiveUriFirstArguments and URI help target classification.
  • oomol-lab/wiki-graph#99: Both PRs update data/help/commands/maintenance/chapter*.jinja templates to reflect newer --input-based command forms.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is related, but it does not use the required <type>(<scope>): <subject> format. Rename it to something like docs: refresh Wiki Graph public docs and keep the subject in English.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly matches the documentation and CLI updates in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/prune-public-docs

Comment @coderabbitai help to get the list of available commands.

@Moskize91 Moskize91 merged commit b610b06 into main Jul 6, 2026
2 of 3 checks passed
@Moskize91 Moskize91 deleted the codex/prune-public-docs branch July 6, 2026 09:37

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
data/help/commands/maintenance/chapter/add.jinja (1)

10-21: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Remove --llm from chapter add help
chapter add rejects --llm in the CLI parser, so this usage line is stale. Drop it from data/help/commands/maintenance/chapter/add.jinja (and the shared chapter help if that template feeds this output).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@data/help/commands/maintenance/chapter/add.jinja` around lines 10 - 21, The
`chapter add` help text is out of sync with the CLI parser because it still
advertises `--llm`, which the command rejects. Update the usage line in the
`add.jinja` template to remove `--llm`, and check the shared chapter help
template if it generates the same `chapter add` output so both stay consistent
with the `chapter add` command behavior.
src/cli/args.ts (1)

856-921: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Handle .../meta --help in URI-first help routing. parseArchiveUriFirstArguments() calls classifyArchiveUriHelpTarget() before metadata parsing, so a URI like wikg://.../meta --help still reaches this switch and throws Unknown Wiki Graph URI target. Add a meta target here or route metadata URIs through the metadata help path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli/args.ts` around lines 856 - 921, `classifyArchiveUriHelpTarget()`
does not recognize metadata URIs, so `wikg://.../meta --help` is being rejected
as an unknown target. Update the URI-first help routing in `src/cli/args.ts` to
either map `meta` to the metadata help target or pass metadata URIs into the
existing metadata help path before this classifier runs. Use the existing
`parseArchiveUriFirstArguments()` and `classifyArchiveUriHelpTarget()` flow to
add the missing `meta` handling without affecting the other archive URI targets.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@data/help/commands/maintenance/chapter/add.jinja`:
- Around line 10-21: The `chapter add` help text is out of sync with the CLI
parser because it still advertises `--llm`, which the command rejects. Update
the usage line in the `add.jinja` template to remove `--llm`, and check the
shared chapter help template if it generates the same `chapter add` output so
both stay consistent with the `chapter add` command behavior.

In `@src/cli/args.ts`:
- Around line 856-921: `classifyArchiveUriHelpTarget()` does not recognize
metadata URIs, so `wikg://.../meta --help` is being rejected as an unknown
target. Update the URI-first help routing in `src/cli/args.ts` to either map
`meta` to the metadata help target or pass metadata URIs into the existing
metadata help path before this classifier runs. Use the existing
`parseArchiveUriFirstArguments()` and `classifyArchiveUriHelpTarget()` flow to
add the missing `meta` handling without affecting the other archive URI targets.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f6fef936-5158-494e-a313-f1c487683cd1

📥 Commits

Reviewing files that changed from the base of the PR and between 91fc62d and 187a99d.

📒 Files selected for processing (38)
  • README.md
  • README_zh-CN.md
  • data/help/commands/maintenance/chapter.jinja
  • data/help/commands/maintenance/chapter/add.jinja
  • data/help/commands/maintenance/chapter/set-source.jinja
  • data/help/commands/maintenance/chapter/set-summary.jinja
  • data/help/commands/maintenance/chapter/tree.jinja
  • data/help/commands/maintenance/meta.jinja
  • data/help/commands/predicate.jinja
  • data/help/commands/uri.jinja
  • data/help/topics/format.jinja
  • data/help/topics/uri.jinja
  • docs/en/ai-agents.md
  • docs/en/architecture.md
  • docs/en/cli.md
  • docs/en/library.md
  • docs/en/quickstart.md
  • docs/fragment-sizing.md
  • docs/releasing.md
  • docs/zh-CN/ai-agents.md
  • docs/zh-CN/architecture.md
  • docs/zh-CN/cli.md
  • docs/zh-CN/library.md
  • docs/zh-CN/quickstart.md
  • src/archive/query/archive-view.ts
  • src/cli/archive-chapter.ts
  • src/cli/archive.ts
  • src/cli/args.ts
  • src/cli/object-metadata.ts
  • src/evidence-selection/README.md
  • test/README.md
  • test/archive/query/archive-view.test.ts
  • test/cli/README.md
  • test/cli/archive-chapter.test.ts
  • test/cli/archive.test.ts
  • test/cli/args.test.ts
  • test/cli/object-metadata.test.ts
  • test/fixtures/README.md
💤 Files with no reviewable changes (16)
  • docs/zh-CN/library.md
  • docs/releasing.md
  • src/evidence-selection/README.md
  • test/cli/README.md
  • docs/en/library.md
  • docs/en/quickstart.md
  • test/README.md
  • docs/en/cli.md
  • docs/zh-CN/ai-agents.md
  • docs/en/architecture.md
  • docs/zh-CN/architecture.md
  • docs/zh-CN/cli.md
  • test/fixtures/README.md
  • docs/zh-CN/quickstart.md
  • docs/en/ai-agents.md
  • docs/fragment-sizing.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant