-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Bug Description
The statusline displays ADRs β0/0 but this value is hardcoded and never actually counts ADRs.
Location
dist/src/commands/hooks.js line ~3035:
`${c.cyan}ADRs${c.reset} ${c.dim}β0/0${c.reset} ${c.dim}β${c.reset} ` +Expected Behavior
The ADR count should be dynamic. There's already a getADRStatus() function in statusline-generator.js that:
- Checks for
adr-compliance.jsonin.claude-flow/metrics/ - Falls back to scanning
docs/adrs/,docs/adr/, etc. for ADR files - Counts files matching
ADR-*.mdpattern - Checks for
Status: AcceptedorStatus: Implementedin content
But this function is never called by the hooks.js statusline command.
Suggested Fix
Option A: Wire up getADRStatus() in hooks.js
Option B (Better): Query the memory system instead of scanning files
// ADRs indexed in memory are more reliable than file scanning
const adrCount = await memorySearch({ namespace: 'architecture', pattern: 'adr-*' });This would:
- Use the existing memory indexing that users set up
- Support custom ADR locations (not just hardcoded paths)
- Be consistent with how other project docs are accessed
- Handle markdown formatting variations (bold
**Status**:vs plainStatus:)
Additional Context
- The
docs/adrspath requirement is also too rigid - projects have ADRs in various locations - The status detection fails on
**Status**: Accepted(markdown bold) - only matchesStatus: Accepted - The JSON output (
--json) doesn't include ADR data at all
Environment
- claude-flow v3.0.0-alpha.185
- Discovered while setting up doc indexing for a Rust project with ADRs in
docs/helix/02-design/adrs/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels