Skip to content

fix(citation-validator): normalize colons and backslash-brackets in anchor matching#101

Merged
WesleyMFrederick merged 5 commits intomainfrom
citation-manager/issue-100
Feb 19, 2026
Merged

fix(citation-validator): normalize colons and backslash-brackets in anchor matching#101
WesleyMFrederick merged 5 commits intomainfrom
citation-manager/issue-100

Conversation

@WesleyMFrederick
Copy link
Copy Markdown
Owner

@WesleyMFrederick WesleyMFrederick commented Feb 19, 2026

Summary

  • Fixes two false-positive patterns in findFlexibleAnchorMatchcleanMarkdownForComparison
  • Bug 1: Colon normalization — replace : with space to match Obsidian's heading anchor behavior
  • Bug 2: Backslash/bracket stripping — remove \ escape chars and lone [/] brackets
  • Also fixes pre-existing biome.json config (was referencing Biome 2.3.13 schema with Biome 1.9.4 installed)

Additional issues resolved

Regression Tests

Test plan

  • RED: Failing tests written for each bug pattern
  • GREEN: Minimal fixes to cleanMarkdownForComparison and validateAnchorExists
  • All 435 tests pass (1 pre-existing env failure unrelated)
  • Build succeeds (npm run build -w tools/citation-manager)
  • No breaking changes — block anchor check emits warnings, not errors

Closes #100
Closes #36
Closes #27
Closes #81

🤖 Generated with Claude Code

WesleyMFrederick and others added 2 commits February 19, 2026 11:44
Adds comprehensive GSD system including:
- 11 agent markdown files for task planning and execution
- Continuous learning command framework
- GSD file manifest and package configuration
- Domain-driven design (DDD) skill and templates
- OpenSpec changes for evidence tagging, Slack MCP, and transcript extraction

Also updates:
- User prompt submit hook improvements
- Settings configuration enhancements
- Baseline evidence verification skill
- MyWorkflow schema and all template types (design, proposal, spec, tasks, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…leanMarkdownForComparison

Fixes two false-positive patterns in findFlexibleAnchorMatch (issue #100):

1. Colon normalization: replace ':' with space to match Obsidian's heading
   anchor behavior (Obsidian: colon → space, not empty string).
2. Backslash/bracket stripping: remove '\' escape chars and lone '['/']'
   brackets, which Obsidian strips during its own heading comparison.

Also fixes pre-existing biome.json config issues: 'files.includes' and
'assist' keys invalid in Biome 1.9.4; migrated to correct 1.9.4 schema
with 'files.ignore' and 'organizeImports'.

Closes: #100

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
WesleyMFrederick and others added 2 commits February 19, 2026 12:28
Removes invalid link to cc-workflows-workspace-architecture.md
which has been deleted from the archive. This resolves the last
remaining validation error from issue #36.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…in-heading anchor

Add test fixture and regression test to verify that the cleanMarkdownForComparison fix from issue #100 also resolves issue #27 (backtick anchors in headings). This ensures that anchor matching correctly handles backticks in heading text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@WesleyMFrederick
Copy link
Copy Markdown
Owner Author

Additionally resolves #36 (false positives for internal anchor patterns)

Issue #36 reported 19 false positives on ARCHITECTURE-Citation-Manager.md for internal anchors with URL-encoded spaces and dot-separated C4 patterns (e.g., #Citation%20Manager.ContentExtractor).

The colon and bracket normalization in cleanMarkdownForComparison from this PR resolves all 19 false positives. The file now validates 54/54 clean.

The 1 real broken link (line 723, archived file reference) was already removed from the file in a prior commit.

…f exists

When a link references a block anchor without the caret prefix (e.g.,
#decision-skills instead of #^decision-skills), the validator now emits
a warning suggesting the correct format. The link still resolves (valid
with warning) since Obsidian handles both formats, but the caret form
is canonical.

The check correctly skips caret-ref definitions (^anchor patterns that
ARE the block anchor) and only flags markdown links that reference block
anchors without the caret prefix.

Closes #81

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@WesleyMFrederick WesleyMFrederick merged commit 3406e7f into main Feb 19, 2026
1 check failed
@WesleyMFrederick WesleyMFrederick deleted the citation-manager/issue-100 branch February 19, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment