ktg-plugin-marketplace/plugins/voyage/lib/parsers
Kjell Tore Guttormsen fb733ae149 feat(voyage): add anchor-parser.mjs with placement validation — v4.2 Step 3
lib/parsers/anchor-parser.mjs (~190 LoC):
- parseAnchors(md) -> Anchor[] (id, target, line, snippet?, intent?)
- addAnchors(md, anchors) -> md_with_anchors
- stripAnchors(md_with_anchors) -> md (byte-identical)
- validateAnchorPlacement(md, anchors) -> errors for list-item / fenced-block / indent

Format: <!-- voyage:anchor id="ANN-NNNN" target="<slug>" line="<N>" -->
Block-level only, on its own line (col 0), blank-line separation.

Test fixture annotation-example.md with single ANN-0001 anchor — referenced by SC12 quickstart.
14 tests pass (parseAnchors, addAnchors, stripAnchors, validateAnchorPlacement).
2026-05-09 12:52:46 +02:00
..
anchor-parser.mjs feat(voyage): add anchor-parser.mjs with placement validation — v4.2 Step 3 2026-05-09 12:52:46 +02:00
arg-parser.mjs feat(voyage): add --profile valued flag to arg-parser FLAG_SCHEMA — v4.1 SC #4 2026-05-09 09:22:01 +02:00
bash-normalize.mjs feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
finding-id.mjs feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
jaccard.mjs feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
manifest-yaml.mjs feat(voyage): add OPTIONAL_STRING_KEYS path to manifest-yaml — profile_used additive 2026-05-09 09:23:32 +02:00
plan-schema.mjs feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
profile-jaccard.mjs test(voyage): add tests/integration/profile-jaccard-smoke.test.mjs — cross-tier smoke per research/02 2026-05-09 09:58:02 +02:00
project-discovery.mjs chore(voyage): scrub ultra-cc-architect references from source 2026-05-05 15:51:17 +02:00