feat: rowan HIR extraction (Phase 2) + MCP 9 tools + pre-commit hook#119
Merged
feat: rowan HIR extraction (Phase 2) + MCP 9 tools + pre-commit hook#119
Conversation
…, add (#98) MCP server now exposes 9 tools over stdio: - rivet_validate, rivet_list, rivet_stats (existing) - rivet_get — single artifact lookup - rivet_coverage — traceability coverage with optional rule filter - rivet_schema — schema introspection (types, links, rules) - rivet_embed — resolve computed embeds - rivet_snapshot_capture — capture project snapshot - rivet_add — create new artifact with auto-ID All tools have proper JSON Schema inputSchema.
Walks rowan YAML CST to extract Vec<SpannedArtifact> with precise byte spans for every field. Cross-validated against parse_generic_yaml(). Types: Span, SpannedArtifact, ParseDiagnostic, ParsedYamlFile Entry: extract_generic_artifacts(source) -> ParsedYamlFile Scalar conversion follows YAML 1.2 rules (true/false only, not yes/no). 10 tests: cross-validation, span accuracy, links, fields, tags, empty list, missing id, quoted values, block span, null/tilde.
Phase 2 rowan HIR: extract_generic_artifacts() walks CST to produce Vec<SpannedArtifact> with byte spans. 10 tests, cross-validated. MCP server expanded to 9 tools: get, coverage, schema, embed, snapshot_capture, add (+ original validate, list, stats). Pre-commit hook script: scripts/pre-commit (cargo fmt + clippy). Clippy allow for cloned_ref_to_slice_refs in convergence tests.
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: d30b66c | Previous: 2b7acd4 | Ratio |
|---|---|---|---|
link_graph_build/10000 |
34824028 ns/iter (± 2365589) |
22818110 ns/iter (± 1283743) |
1.53 |
This comment was automatically generated by workflow using github-action-benchmark.
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
Phase 2: Rowan HIR extraction (
yaml_hir.rs, 816 lines)extract_generic_artifacts(source)walks rowan CST →Vec<SpannedArtifact>parse_generic_yaml()— identical outputMCP server expanded to 9 tools
Pre-commit hook
scripts/pre-commit— cargo fmt + clippy checksRefs #22, #98.
🤖 Generated with Claude Code