Problem
Citation-manager validate currently passes folder links as valid citations. While these are syntactically correct markdown links, they cause issues in practice:
- Obsidian: Cannot preview folder links (shows broken preview)
- User expectation: Links should point to readable content
- False positives: Invalid links pass validation
Reproduction Steps
- Validate a file containing a folder link:
- [Research Examples](research/) - Sample interviews and brick extractions
- Observe validation passes with no warnings:
Citation Validation Report
==========================
VALID CITATIONS (2)
├─ Line 99: [Architecture Principles](../ARCHITECTURE-PRINCIPLES.md)
└─ Line 100: [Full Architecture](ARCHITECTURE-Evidence-Tracker.md)
ALL CITATIONS VALID
Note: The folder link research/ at line 101 is not even detected/reported.
Proposed Solution
Add validation check for folder links:
if (fs.statSync(resolvedPath).isDirectory()) {
warnings.push({
line,
type: 'folder-link',
message: 'Link points to folder, not file. Obsidian cannot preview folders.',
suggestion: 'Link to a specific file or create an index.md'
});
}
Impact
- Severity: Medium - causes UX issues but has workaround
- Frequency: Common in documentation structure
- Detection: Silent failure (passes validation)
Related
- Component: CitationValidator
- Tool: citation-manager
- Context: PostToolUse hook validation
Acceptance Criteria
Definition of Done
Problem
Citation-manager validate currently passes folder links as valid citations. While these are syntactically correct markdown links, they cause issues in practice:
Reproduction Steps
Note: The folder link
research/at line 101 is not even detected/reported.Proposed Solution
Add validation check for folder links:
Impact
Related
Acceptance Criteria
research/,./docs/)Definition of Done
npm run build -w tools/citation-manager && npm link -w tools/citation-manager