feat(parser): Markdown and YAML knowledge extractors
What
Adds two regex-based extractors so the graph can index knowledge files that have no bundled tree-sitter grammar:
- Markdown (
.md/.mdx/.qmd): headings →Sectionnodes, nesting →CONTAINSedges, links (backtick filenames,[[wikilinks]],[text](x.md)) →REFERENCESedges. Fenced code blocks are skipped. - YAML (
.yaml/.yml): top-level keys →Sectionnodes, registry-styleid:/name:list entries →Typenodes, withCONTAINSedges. Pure regex, no PyYAML dependency.
Why
Both reuse the existing NodeInfo/EdgeInfo schema and the shared CONTAINS/REFERENCES edge kinds, so documentation and config land in the same graph as code: a spec.md can REFERENCES the source file it describes, and a CRON-123 registry entry becomes a queryable node. Helpful for repos that mix code with specs, docs and config registries.
Approach
Follows the existing pattern for grammar-less inputs (_parse_rescript, _parse_sql): extension mapping in EXTENSION_TO_LANGUAGE, dispatch in parse_bytes, dedicated _parse_markdown / _parse_yaml methods.
Tests
tests/test_knowledge_extractors.py — 4 cases (headings/nesting, fenced-code skip, references, yaml entries). ruff check passes clean, pytest green locally.