Rust workspace for building Repository Planning Graphs (RPGs) — semantic code understanding via MCP.
cargo fmt --all # format
cargo clippy --workspace --all-targets -- -D warnings # lint
cargo test --workspace # test (640+ tests)
cargo build --release -p rpg-mcp # release binaryBefore every commit: run fmt, clippy, and test. All three must pass. Do not skip or suppress warnings.
fix/*— bug fixesfeat/*— new featuresdocs/*— documentation onlychore/*— tooling, deps, version bumps
Use conventional commits:
fix:bug fixfeat:new featurechore:tooling, version bump, depsdocs:documentationrefactor:code restructure (no behavior change)test:adding or fixing tests
- Open a GitHub issue describing the problem or feature
- Create a branch from
main(fix/issue-descriptionorfeat/issue-description) - Make commits on the branch
- Open a PR referencing the issue (
Closes #NorRef #N) - Merge via squash merge (
gh pr merge --squash --delete-branch) - Pull main locally after merge
- Bump version in root
Cargo.toml([workspace.package] version) ANDnpm/package.json - Run
cargo fmt && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace - Commit:
chore: bump version to X.Y.Z - Tag:
git tag vX.Y.Z - Push:
git push origin main && git push origin vX.Y.Z - The release workflow auto-builds binaries, creates a GitHub release, and publishes to npm
crates/
rpg-core/ # Graph data model, storage, schema, LCA
rpg-parser/ # Tree-sitter entity extraction (Rust, Python, JS/TS, Go, Java, C/C++)
rpg-encoder/ # Semantic lifting, grounding, dependency resolution
rpg-nav/ # Search, explore, fetch, export (navigation layer)
rpg-cli/ # CLI binary
rpg-mcp/ # MCP server binary (stdio JSON-RPC)
crates/rpg-encoder/src/prompts/*.md— LLM prompt templates (included viainclude_str!)crates/rpg-mcp/src/prompts/server_instructions.md— LIFTER PROTOCOLcrates/rpg-core/src/graph.rs— Core graph data model (Entity, RPGraph, EdgeKind)crates/rpg-encoder/src/grounding.rs— Dependency resolution + artifact grounding
- All serialized maps use
BTreeMapfor deterministic JSON output - Edges are sorted by
(source, target, kind)before serialization lifting_coverage()excludes Module entities (they get features via aggregation)- The connected coding agent IS the LLM for lifting (no API key needed)
- Edge kinds: Imports, Invokes, Inherits, Composes, Renders, ReadsState, WritesState, Dispatches, DataFlow, Contains
The GitHub Actions workflow runs: fmt --check, clippy -D warnings, test --workspace. All must pass for PRs.