Skip to content

Draft: Add repo-local knowledge graph extension slice#709

Closed
muness wants to merge 3 commits into
mainfrom
feat/local-knowledge-graph
Closed

Draft: Add repo-local knowledge graph extension slice#709
muness wants to merge 3 commits into
mainfrom
feat/local-knowledge-graph

Conversation

@muness

@muness muness commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Draft implementation home for the experimental RNA local-knowledge graph slice.

Selected approach from open-horizon-labs/book solution-space:

  • keep one repo graph surface;
  • add generic repo-local/custom relationship mechanics upstream in RNA;
  • keep book vocabulary local to the book repo;
  • prove the mechanism with one quote/source → claim/fact → manuscript section/paragraph corpus shape.

Closes #707.
Targets #708.

Execution constraints

This PR must fail the tempting shortcuts:

  • mapping supports/requires_verification onto References or DependsOn;
  • storing relationship semantics only in metadata;
  • hardcoding book-specific core enum variants such as Quote, Claim, Chapter, or Supports.

Planned verification

  • cargo check --lib
  • targeted tests for custom edge persist/load/traversal/search behavior
  • targeted fixture for local knowledge artifact extraction

Notes

Draft PR created before implementation per repo workflow. This is intentionally experimental until the custom relationship mechanics and first extractor slice prove themselves.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3db336b8-115a-4aed-ae23-f63d87ffe699

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/local-knowledge-graph

Comment @coderabbitai help to get the list of available commands.

@muness

muness commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

Experimental slice implemented

Implemented the first RNA-side local-knowledge graph slice on this draft PR.

What changed

  • Added EdgeKind::Other(String) and parser support so repo-local relationship labels survive as true graph edge kinds instead of being dropped on load.
  • Added default PageRank weight for custom edges.
  • Updated extractor config edge resolution to accept custom edge labels.
  • Added markdown rna frontmatter extraction for source-first local knowledge nodes and relationships.
  • Documented local knowledge declarations and custom edge semantics.

Risk-retirement checks covered

  • Custom edge label persists/reloads/traverses: server::store::tests::custom_edge_kind_survives_persist_load_and_traversal.
  • Unknown edge labels parse as custom edges instead of disappearing: server::store::tests::parse_edge_kind_preserves_unknown_labels_as_custom_edges.
  • Markdown local knowledge source artifact emits NodeKind::Other + EdgeKind::Other: extract::markdown::tests::test_markdown_local_knowledge_frontmatter_emits_custom_node_and_edge.
  • Search renders custom edge labels: service::search::tests::test_search_neighbors_displays_custom_edge_label.

Manual local-build fixture

Built target/debug/repo-native-alignment, created a temporary book-shaped fixture using the book overview, scanned it, and verified traversal:

  • incoming supports from quote/source to claim;
  • outgoing consumed_by_section from claim to manuscript section.

This confirms the first authoring/review question is mechanically answerable: what supports this claim, and which manuscript node consumes it?

Verification commands run

  • cargo check --lib
  • cargo test server::store::tests --lib
  • cargo test test_markdown_local_knowledge_frontmatter_emits_custom_node_and_edge --lib
  • cargo test test_search_neighbors_displays_custom_edge_label --lib
  • cargo build --bin repo-native-alignment
  • local fixture scan/search with target/debug/repo-native-alignment

@muness

muness commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

Closing this draft as superseded by the content-native restart plan in #711-#715. The draft frontmatter/local-knowledge slice is useful learning but no longer the target high-bar implementation. Keep #707/PR #710 as infrastructure; replace #708/#709 with content-derived Markdown AST, provenance, and domain pack work.

@muness

muness commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

Superseded by #711-#715.

@muness muness closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support repo-local custom relationship edge kinds

1 participant