You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-49Lines changed: 32 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,8 @@
11
11
<br/>
12
12
13
13
<palign="center">
14
-
Plotnik is a query language for source code.<br/>
15
-
Queries extract relevant structured data.<br/>
16
-
Transactions allow granular, atomic edits.
14
+
A type-safe query language for source code.<br/>
15
+
Query in, typed data out.
17
16
</p>
18
17
19
18
<br/>
@@ -28,7 +27,7 @@
28
27
<br/>
29
28
30
29
<palign="center">
31
-
⚠️ <ahref="#roadmap">ALPHA STAGE</a>: not for production use ⚠️<br/>
30
+
⚠️ <ahref="#status">ALPHA STAGE</a>: not for production use ⚠️<br/>
32
31
</p>
33
32
34
33
<br/>
@@ -38,7 +37,7 @@
38
37
39
38
Tree-sitter solved parsing. It powers syntax highlighting and code navigation at GitHub, drives the editing experience in Zed, Helix, and Neovim. It gives you a fast, accurate, incremental syntax tree for virtually any language.
40
39
41
-
The hard problem now is what comes _after_ parsing: extraction of meaning from the tree, and safe transformation back to source:
40
+
The hard problem now is what comes _after_ parsing: extracting structured data from the tree:
42
41
43
42
```typescript
44
43
function extractFunction(node:SyntaxNode):FunctionInfo|null {
Every extraction requires a new function, each one a potential source of bugs that won't surface until production. And once you've extracted what you need, applying changes back to the source requires careful span tracking, validation, and error handling—another layer of brittle code.
59
+
Every extraction requires a new function, each one a potential source of bugs that won't surface until production.
61
60
62
61
## The solution
63
62
@@ -81,8 +80,6 @@ interface FunctionInfo {
81
80
82
81
This structure is guaranteed by the query engine. No defensive programming needed.
83
82
84
-
Once extraction is complete, Plotnik will support **transactions** to apply validated changes back to the source. The same typed nodes used for extraction become targets for transformation—completing the loop from source to structured data and back to source.
@@ -193,53 +205,24 @@ for (const stmt of result.statements) {
193
205
194
206
For the detailed specification, see the [Language Reference](docs/lang-reference.md).
195
207
196
-
## Supported Languages
197
-
198
-
Plotnik uses [arborium](https://github.com/bearcove/arborium), a batteries-included tree-sitter grammar collection with 60+ permissively-licensed languages out of the box.
199
-
200
-
## Roadmap
201
-
202
-
### Ignition: the parser ✓
208
+
## Documentation
203
209
204
-
The foundation is complete: a resilient parser that recovers from errors and keeps going.
-[Language Reference](docs/lang-reference.md) — Complete syntax and semantics
212
+
-[Type System](docs/type-system.md) — How output types are inferred from queries
213
+
-[Runtime Engine](docs/runtime-engine.md) — VM execution model (for contributors)
205
214
206
-
-[x] Resilient parser
207
-
-[x] Rich diagnostics
208
-
-[x] Name resolution
209
-
-[x] Recursion validation
210
-
-[x] Structural validation
211
-
212
-
### Liftoff: type inference
213
-
214
-
The schema infrastructure is built. Type inference is next.
215
-
216
-
-[x]`node-types.json` parsing and schema representation
217
-
-[x] Proc macro for compile-time schema embedding
218
-
-[x] Statically bundled languages with node type info
219
-
-[x] Query validation against language schemas (unstable)
220
-
-[x] Type inference
215
+
## Supported Languages
221
216
222
-
### Acceleration: query engine
217
+
Plotnik bundles 15 languages out of the box: Bash, C, C++, CSS, Go, HTML, Java, JavaScript, JSON, Python, Rust, TOML, TSX, TypeScript, and YAML. The underlying [arborium](https://github.com/bearcove/arborium) collection includes 60+ permissively-licensed grammars—additional languages can be enabled as needed.
223
218
224
-
-[x] Runtime execution with backtracking cursor walker
225
-
-[x] Query IR
226
-
-[ ] Advanced validation powered by `grammar.json` (production rules, precedence)
227
-
-[ ] Match result API with typed accessors
219
+
## Status
228
220
229
-
### Orbit: developer experience
221
+
**Working now:** Parser with error recovery, type inference, query execution, CLI tools (`check`, `dump`, `infer`, `exec`, `trace`, `tree`, `langs`).
230
222
231
-
The CLI foundation exists. The full developer experience is ahead.
223
+
**Next up:**CLI distribution (Homebrew, npm), language bindings (TypeScript/WASM, Python), LSP server, editor extensions.
232
224
233
-
-[x] CLI framework with `debug`, `docs`, `langs`, `exec`, `types` commands
0 commit comments