Implement Phase 2: markdown node model and graph index#3
Merged
Conversation
Add Node frontmatter parsing (YAML), GraphIndex with full directory scan, filesystem CRUD, and round-trip serialization preserving extra fields. Includes tests against PRD schema and example fixtures, plus a lakehouse sample node. Co-authored-by: Alex Merced <alex@alexmerced.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 2 — Markdown node model & index from the implementation plan.
Node model (
maggraph::node)NodeMetadata(id,type,source,links, plus extra fields via#[serde(flatten)])Nodestruct with body content and relative pathNode::from_file/Node::write_tofor filesystem I/OGraph index (
maggraph::index)GraphIndex::open(root_path)— full scan of*.mdfiles under the graph rootid → NodeIndexEntryandpath → idcreate_node,read_node,update_node,delete_node,rescanOther
MagGraphErrorwith node/index variantsserde_yamlandwalkdirworkspace dependenciesexamples/lakehouse/knowledge_graph/customer_churn_q2.mdplanning/PROGRESS.md— Phase 2 marked completeTesting
cargo test cargo clippy --all-targets --all-features -- -D warnings20 unit tests (12 new) covering PRD schema parsing, round-trip, scan, CRUD, duplicate detection, and the basic example fixture.
Next up
Phase 3 — wikilink parsing, adjacency, and traversal API.
Slack Thread