Add cross-link-candidates deterministic CLI subcommand (resolves #118) - #122
Merged
Conversation
Literal, case-insensitive title/alias matching against catalog.jsonl, scoped to the session's own pages as sources and every other catalog entry as a potential target. Skips code blocks, frontmatter, and mentions already wrapped in [[...]].
Contributor
|
Version hint: minor Comment ID: Display version hint-auto-generated |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wiki-toolkit cross-link-candidates <page-paths...>subcommand inwiki_toolkit/wiki.py/cli.py, alongsidebuild/lint.catalog.jsonltitles/aliases, excluding the session's own pages as targets; scans only the session's own page bodies (never a full-vault rescan).[[...]]. One candidate per(page, target), preferring a title match over an alias match.{page, target, mention_text, match_type}.Part of #116, from the chartered cross-linker map #94. Closes #118.
Test plan
tests/test_wiki.py: registry building, literal match behavior (code blocks, frontmatter, already-linked, case-insensitivity), title/alias precedence, own-page exclusion, output shape.CliRunneradapter test intests/test_cli.py: argument parsing, delegation, exit code, JSONL output.uv run pytest(225 passed),uv run ruff check/format,uv run mypyall clean.