ktg-plugin-marketplace/plugins/voyage/tests
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
..
commands feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
fixtures feat(voyage): add anchor-parser.mjs with placement validation — v4.2 Step 3 2026-05-09 12:52:46 +02:00
helpers feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
hooks fix(voyage): permanently block cloud metadata endpoints in OTLP validator (CWE-918) 2026-05-09 10:23:51 +02:00
integration test(voyage): add tests/integration/profile-jaccard-smoke.test.mjs — cross-tier smoke per research/02 2026-05-09 09:58:02 +02:00
lib feat(voyage): add markdown-write.mjs + revision-guard.mjs + forward-compat policy comments — v4.2 Step 1 2026-05-09 12:48:40 +02:00
parsers feat(voyage): add anchor-parser.mjs with placement validation — v4.2 Step 3 2026-05-09 12:52:46 +02:00
synthetic test(voyage): extend plan-determinism.test.mjs — SC #10 forward-compat block 2026-05-09 10:00:08 +02:00
validators test(voyage): pin forward-compat for revision/source_annotations/annotation_digest/revision_reason — v4.2 Step 2 2026-05-09 12:50:22 +02:00