Skip to content

Add cross-link-candidates deterministic CLI subcommand (resolves #118) - #122

Merged
coordt merged 1 commit into
mainfrom
feature/118-cross-link-candidates-cli
Aug 10, 2026
Merged

Add cross-link-candidates deterministic CLI subcommand (resolves #118)#122
coordt merged 1 commit into
mainfrom
feature/118-cross-link-candidates-cli

Conversation

@coordt

@coordt coordt commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • New wiki-toolkit cross-link-candidates <page-paths...> subcommand in wiki_toolkit/wiki.py/cli.py, alongside build/lint.
  • Builds its match registry from catalog.jsonl titles/aliases, excluding the session's own pages as targets; scans only the session's own page bodies (never a full-vault rescan).
  • Literal, case-insensitive matching that skips code fences, frontmatter, and mentions already wrapped in [[...]]. One candidate per (page, target), preferring a title match over an alias match.
  • Outputs JSONL: {page, target, mention_text, match_type}.

Part of #116, from the chartered cross-linker map #94. Closes #118.

Test plan

  • Unit tests in tests/test_wiki.py: registry building, literal match behavior (code blocks, frontmatter, already-linked, case-insensitivity), title/alias precedence, own-page exclusion, output shape.
  • CliRunner adapter test in tests/test_cli.py: argument parsing, delegation, exit code, JSONL output.
  • uv run pytest (225 passed), uv run ruff check/format, uv run mypy all clean.

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 [[...]].
@github-actions

Copy link
Copy Markdown
Contributor

Version hint: minor
Current version: 0.23.0
New version (when merged): 0.24.0

Comment ID: Display version hint-auto-generated

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callowayproject.github.io/wiki-toolkit/pr-preview/pr-122/

Built to branch gh-pages at 2026-08-10 19:15 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@coordt
coordt merged commit 03d0f65 into main Aug 10, 2026
7 checks passed
@coordt
coordt deleted the feature/118-cross-link-candidates-cli branch August 10, 2026 19:20
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.

Cross-linker: cross-link-candidates deterministic CLI subcommand

1 participant