Skip to content

fix(ruflo-adr): parse bullet-prefixed metadata from adr-create template (#2659) - #2755

Open
michaelaperez-byte wants to merge 1 commit into
ruvnet:mainfrom
michaelaperez-byte:loop/T22-adr-bullet-metadata-parse
Open

fix(ruflo-adr): parse bullet-prefixed metadata from adr-create template (#2659)#2755
michaelaperez-byte wants to merge 1 commit into
ruvnet:mainfrom
michaelaperez-byte:loop/T22-adr-bullet-metadata-parse

Conversation

@michaelaperez-byte

Copy link
Copy Markdown
Contributor

Summary

Fixes #2659 — ruflo-adr adr-index parser drops Status/Date/Tags for bullet-prefixed metadata from adr-create's own template.

Root cause

adr-create's template (SKILL.md step 3) writes ADR metadata as a bullet list:

- **Status**: proposed
- **Date**: 2026-07-13
- **Tags**: golden-corpus, ddd, microservices

adr-index's parser (plugins/ruflo-adr/scripts/lib/parse-adrs.mjs) reads these fields with ^-anchored regexes that require the field marker at the start of the line. The leading - from adr-create's own template breaks the ^ anchor, so Status/Date/Tags silently come back empty/unknown for every ADR created via adr-create's documented template.

Fix

Add (?:[-*]\s*)? after each ^ anchor in 5 regex locations to tolerate an optional leading list marker:

  1. parseStatus v3-style regex (line ~93)
  2. parseStatus MADR full-bold regex (line ~97)
  3. parseDate regex (line ~109)
  4. parseTags regex (line ~120)
  5. parseLinks REL function template literal (line ~160)

No new dependencies. No changes to adr-create's template (parser-side loosening is safer since adr-create is the authoring tool and adr-index is the consumer).

Regression test

New standalone Node test: v3/@claude-flow/cli/__tests__/issue-2659-adr-bullet-metadata.test.mjs (23 assertions):

  • Source-level: verifies all 5 regexes include the bullet-tolerance guard
  • Functional: parseAdr on bullet-prefixed ADR text → correct Status/Date/Tags/Links
  • Backward-compat: old non-bullet format (**Status**: accepted) still works

Verification

Independent detached-HEAD worktree (/tmp/ruflo-verify-T22 at e03c33f):

  • Gate 1: node --check exit 0 ✓
  • Gate 2: regression test 23/23 PASS ✓
  • Gate 3: diff review — exactly 5 regex changes, +16/-5 ✓
  • Gate 4: backward compat — both bullet and non-bullet tested ✓
  • Gate 5: no scope creep — 2 files only (1 modified + 1 new test) ✓
  • Gate 6: functional sanity — all 4 manual regex constructions return expected values ✓

Closes #2659

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.

ruflo-adr: adr-index doesn't recognize adr-create's own bullet-list metadata format — Status/Date/Tags parse as empty/unknown

1 participant