feat(bmad): support alphanumeric IDs and introduce agile timeline dashboard#6
Open
magalz wants to merge 5 commits intoDevHDI:mainfrom
Open
feat(bmad): support alphanumeric IDs and introduce agile timeline dashboard#6magalz wants to merge 5 commits intoDevHDI:mainfrom
magalz wants to merge 5 commits intoDevHDI:mainfrom
Conversation
Add full support for alphanumeric epic and story IDs alongside existing
numeric IDs. Enables projects like agenda-clubber to use meaningful ID
prefixes (e.g. DevOps/Infra → di, Housekeeping → hk).
Changes:
- Parser regex updates: accept [a-z][a-z0-9_/-]* as epic/story prefix
- Normalization: lowercase + slash→hyphen (DevOps/Infra → devops-infra)
- Backfill correlation: link stories to epics via epic.stories[] when
filename prefix doesn't match epic ID (e.g. di.1 → devops-infra)
- UI sort: use localeCompare({ numeric: true }) for natural ordering
- Story-file discovery: accept alpha-N-title.md in addition to N-N-title.md
New tests: 30+ test cases covering alphanumeric parsing, normalization,
backfill logic, and mixed numeric+alpha epics.
Documentation: added "Epic and Story Naming Conventions" section to README
with examples and explanation of automatic epic-story linking.
Backward compatible: all existing numeric-only projects parse unchanged.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Implement short IDs for epics (prefix-based) and stories (order-based) - Update UI badges to use short IDs and show full ID on hover - Tighten parser to ignore BMAD prompt and retrospective files - Enforce declaration check: ignore story files not in epics.md or sprint-status.yaml - Support nested story IDs (e.g., HKP.1.2 -> 1.2) - Log orphan/duplicate stories in Health Report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR enhances the BMAD artifact parser to support alphanumeric IDs (e.g.,
DI-1,HK-1.2), allowing teams to use semantic prefixes for Epics and Stories. It also includes UI component updates to display this tracking data correctly.Issue
The dashboard and parser rigidly expected numeric-only IDs (e.g.,
1-1-title). If teams created epics "on the fly" using semantic acronyms or names (likeDIfor DevOps/Infra orHKfor Housekeeping), the parser failed to recognize them. Consequently, these non-numeric epics and their associated stories were completely ignored and hidden from the dashboard.Proposed Change
The system natively understands and extracts alphanumeric identifiers (e.g.,
DI-1,HK-1). This ensures that epics created outside the standard numeric sequence are correctly tracked, correlated with their stories, and fully visible on the dashboard, preventing blind spots in project visibility.Changes Made & Flow
1. Alphanumeric Parsing & Normalization
Flow: The core regex patterns in the parsers were updated to accept alphanumeric strings (e.g.,
[a-z][a-z0-9_-]*). When an alphanumeric ID is found (likeDevOps/Infra), a new normalization utility safely converts it to a standard slug format (e.g.,devops-infra). This guarantees that semantic prefixes from both filenames and frontmatter are cleanly extracted while remaining backward compatible with purely numeric IDs.src/lib/bmad/parser.tssrc/lib/bmad/parse-epic-file.tssrc/lib/bmad/parse-story.tssrc/lib/bmad/parse-sprint-status.tssrc/lib/bmad/parse-epics.tssrc/lib/bmad/utils.ts2. Enhanced Correlation & Strict Filtering
Flow: The linking engine was upgraded with a two-way "backfill" strategy. If a story's inferred epic ID (e.g.,
DI) does not strictly match any existing epic ID (e.g.,devops-infra), the system performs a reverse lookup. It scans the list of stories extracted directly from the Epic's markdown body. If the Epic explicitly lists that story, the engine confidently links them together and updates the story'sepicId. Furthermore, this logic enforces strict declaration checks: story artifacts are now only correlated and displayed if they are explicitly declared within an Epic's markdown body or the sprint plan. This actively prevents stale or duplicate orphan story files (e.g., an abandoned1.5artifact) from accidentally surfacing on the dashboard and causing rendering errors.src/lib/bmad/correlate.tssrc/lib/bmad/types.ts3. UI & Agile Dashboard Updates
Flow: Dashboard components were upgraded to gracefully render the new alphanumeric data. A new
getEpicShortIdutility dynamically derives a clean, abbreviated prefix for Epics by reverse-engineering it from its child stories (e.g., looking at storyDI-1.2to label the Epic asDI). For Stories, the UI splits the full identifier to display only the order/numbering (e.g., extracting1.2). This allows badges and headers to remain visually compact on the board, while keeping the full ID (likedevops-infra) accessible via hover tooltips. Sorting mechanisms were also updated to use natural alphanumeric sorting.src/components/dashboard/epics-list.tsxsrc/components/dashboard/sprint-summary-card.tsxsrc/components/epics/epic-timeline-card.tsxsrc/components/epics/epics-browser.tsxREADME.md(Added documentation for naming conventions)4. Cross-Platform Security Bugfix
Flow: Fixed a silent path resolution bug that caused security validations to fail on Windows machines. The code now actively sanitizes native Windows path separators (
\) to POSIX-style slashes (/) before verifying if the files belong to the authorized_bmaddirectory, preventing false "Access denied" errors locally.src/lib/content-provider/local-provider.tsTesting & Validation
src/lib/bmad/__tests__/*pnpm lint,pnpm test, andpnpm buildpass locally on both POSIX and native Windows environments.Closes #[Issue_Number]