Extends kei-sage with substrate-atom indexing layer per locked schema §Graph / discovery contract. New modules (all ≤ 200 LOC, Constructor Pattern): - src/atom_parse.rs — frontmatter splitter, wikilink parser, id splitter - src/atoms.rs — AtomKind + FromStr, AtomRecord, discover_atoms, resolve_wikilinks - src/atom_index.rs — persists atoms as Units + atom_related edges into existing Store - src/atom_cli.rs — 4 subcommand handlers New CLI subcommands (default root ~/.claude/agents/_primitives/_rust): - atoms-discover — walks atoms/*.md, prints table - atoms-rank — PageRank over wikilink edges (composes w/ existing vault) - atoms-related <atom-id> — BFS from atom - atoms-search <query> — FTS over frontmatter + body Tolerant scan: invalid frontmatter → stderr warn + continue (never abort). [[rules/...]] wikilinks filtered at edge resolution per scope (rules integration deferred to follow-up). Tests: 9 unit + 6 integration smoke + 8 pre-existing = 23/23 green. Zero regression. Single new dep: serde_yaml 0.9. Stream C of substrate v1 parallel build. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 lines
599 B
TOML
26 lines
599 B
TOML
[package]
|
|
name = "kei-sage"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
description = "Obsidian-style knowledge graph (SQLite + FTS5). Port of LBM internal/sage."
|
|
|
|
[[bin]]
|
|
name = "kei-sage"
|
|
path = "src/main.rs"
|
|
|
|
[lib]
|
|
name = "kei_sage"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
rusqlite = { version = "0.31", features = ["bundled"] }
|
|
clap = { version = "4", features = ["derive"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
serde_yaml = "0.9"
|
|
anyhow = "1"
|
|
chrono = { version = "0.4", default-features = false, features = ["clock"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|