Bug report
Describe the bug
Markdown files that are not named readme.md and not located under a docs/ path are silently skipped during index_documents — they produce 0 chunks even though they exist.
To reproduce
- Create a file like
knowledge/mahoo-architecture.md containing # Title\n\nsome content.
- Run
index_documents on the parent directory.
index_metadata shows 0 chunks for that file.
Expected behavior
Every .md file should be indexed as a docs source.
Environment
- agent-memory-mcp v0.9.1
- Ubuntu 24.04, Linux
Root cause
internal/rag/documents.go: processFile calls classifySourceType(relPath, "", "") with empty content, so the .md branch heuristic strings.Contains(contentLower, "# ") can never match. The result "" causes the file to be skipped. (There is a second call site in supportedSourceType with the same empty-content problem.)
Fix available
See PR #17 (classifies every .md file as docs, adds regression tests).
Bug report
Describe the bug
Markdown files that are not named
readme.mdand not located under adocs/path are silently skipped duringindex_documents— they produce 0 chunks even though they exist.To reproduce
knowledge/mahoo-architecture.mdcontaining# Title\n\nsome content.index_documentson the parent directory.index_metadatashows 0 chunks for that file.Expected behavior
Every
.mdfile should be indexed as adocssource.Environment
Root cause
internal/rag/documents.go:processFilecallsclassifySourceType(relPath, "", "")with empty content, so the.mdbranch heuristicstrings.Contains(contentLower, "# ")can never match. The result""causes the file to be skipped. (There is a second call site insupportedSourceTypewith the same empty-content problem.)Fix available
See PR #17 (classifies every
.mdfile asdocs, adds regression tests).