Commit f6e6a90
Add source code analysis via tree-sitter (v0.3.0)
- vajra-source: parses source code from 9 languages (Rust, Python, Go,
JavaScript, TypeScript, Java, C, C++, Ruby) into Vajra Documents via
tree-sitter CST-to-JSON conversion. Auto-detects language from file
extension. Feature-gated grammars for minimal binary size.
- vajra-domain-source: plugin with 6 type recognizers (snake_case,
camelCase, PascalCase, SCREAMING_SNAKE, import paths, source file
paths) and 6 relationship hints for code structures.
- CLI: source code is a first-class input format. `vajra inspect main.rs`
works. All existing commands (stats, essence, anomalies, fingerprint,
drift) work on code with zero changes.
- Tests: 13 unit + 9 property suites (10K cases) + 23 chaos tests for
vajra-source; 30 unit + 6 property suites for vajra-domain-source.
Chaos covers empty input, malformed code, deep nesting, wide params,
unicode, null bytes, cross-language, config edges.
- Corpus: 4 source fixtures (Rust, Python, Go, JavaScript) in
corpus/source/ for golden test integration.
- Docs: updated mdbook (formats, architecture, plugins, testing),
README, CLAUDE.md, prd.md.
990 tests, 0 failures, 0 clippy warnings, 16 crates.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 6566f74 commit f6e6a90
29 files changed
Lines changed: 2589 additions & 54 deletions
File tree
- corpus/source
- docs/src
- vajra-cli
- src
- vajra-core/benches
- vajra-domain-source
- src
- tests
- vajra-source
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
92 | 108 | | |
93 | 109 | | |
94 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
0 commit comments