You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Index markdown headers to enable section validation and deep-linking #547
Indexing markdown section headers (## Heading) in the parser would unlock two capabilities from a single change:
Section validation — schemas could declare required sections and validate that observations appear in the correct section
Deep-linking — permalinks could point to sections within documents (e.g., memory://note#section)
Current State
The parser is completely section-agnostic — observations and relations are extracted by pattern matching regardless of which ## section they appear under
The validator receives flat (category, content) tuples with no section context
Section headers like ## Observations, ## Relations, ## Background are purely organizational/visual
Proposed Changes
Parser
Track which section each observation/relation was extracted from
Index section headers as searchable/queryable metadata
Preserve section context through the parse → validate pipeline
Schema Format Extension
The picoschema format could extend with a sections key:
Clarify Schema System: The issue mentions a schema system with "parser, resolver, validator, inference, diff" and 100+ tests. Verify if this refers to existing Pydantic schemas or planned features from [FEATURE] Support schema for notes #375.
Semantic search with embeddings and vectors is a fantastic feature. From the documentation, chunks are vectorized by header (I think these are the same as section) AND by observation. This is great.
While building the indexing, consider whether and how these can both be integrated to greater effect.
Activity
claude commentedon Feb 7, 2026
Claude finished @phernandez's task in 2m 38s —— View job
Issue Triage Complete
Type: Enhancement / Feature Request
Priority: Medium
Complexity: Complex (architectural changes)
Components: Parser, Schema System, MCP Tools
Label Applied:
enhancementSummary
This is a well-structured feature request to add markdown section header indexing, enabling:
memory://note#section)Related Issues
Closely Related:
[[entity#section#observation]]syntax. Issue Index markdown headers to enable section validation and deep-linking #547 provides the parser infrastructure needed to support section-aware features like Section and Observation Anchor Wikilinks Support #135.Possibly Related:
Current Architecture
The parser (
entity_parser.py:113-136) is currently section-agnostic:markdown-itwith custom plugins (observation_plugin,relation_plugin)EntityContentwith no section metadataObservationorRelationschemasRequired Changes
Parser Layer (
entity_parser.py)EntityContentto include section metadataSchema Layer (
markdown/schemas.py)sectionfield toObservationandRelationmodelsDeep-linking Support
#sectionfragmentsread_note,build_context) to support section-level addressingComplexity Assessment
Complex due to:
tests/markdown/)Recommendations
Clarify Schema System: The issue mentions a schema system with "parser, resolver, validator, inference, diff" and 100+ tests. Verify if this refers to existing Pydantic schemas or planned features from [FEATURE] Support schema for notes #375.
Coordinate with Section and Observation Anchor Wikilinks Support #135: These issues are highly synergistic - consider implementing together.
Phased Approach:
sectionfield)#sectionfragmentsConsider Observation IDs: Issue Section and Observation Anchor Wikilinks Support #135 proposes observation-level anchors (
#id-0001). Worth considering in the same effort.Next Steps
This issue is now properly triaged and ready for:
calebpickerconsulting commentedon Mar 18, 2026
Adding a thought @claude what do you think?
Semantic search with embeddings and vectors is a fantastic feature. From the documentation, chunks are vectorized by header (I think these are the same as section) AND by observation. This is great.
While building the indexing, consider whether and how these can both be integrated to greater effect.