# Tree-sitter Sley
Tree-sitter grammar, highlight queries, and editor parser scaffolding for Sley source.
Status: public Sley ecosystem scaffold. This repository is intended for public use with a stable, versioned contract surface.
Implementation reality: Sley-native source-of-truth is now in src/tool.sley; Tree-sitter grammar and queries remain temporary until a Sley parser emitter exists.
## Why This Exists
Sley is an agent-native structural language. Source remains the human review
projection, while the compiler exposes stable JSON surfaces for graph,
lint, query, edit planning, verification, trace receipts, and ZJX handoff.
`tree-sitter-sley` exists to make that loop easier for editor users, documentation authors, and review tool builders.
## Current Scope
- Priority: `P0`
- Utility class: `syntax grammar`
- Default mode: local and deterministic
- Write mode: disabled unless explicitly documented by the command
- Network calls: none in tests or examples
- Provider, deploy, spend, wallet, and secret access: not used
## Quick Start
```bash
make smoke
```
Useful commands:
- `tree-sitter generate`
-
tree-sitter test -
npm run smokeThis tool treats Loom, the Sley compiler, as the oracle. It consumes these Sley surfaces instead of duplicating compiler logic:
human-reviewable .sley source
Details live in
docs/contracts.md.assets/branding/- repo mark, social card, banner, and generated PNGsdocs/- architecture, contract, brand, and SEO notesexamples/- minimal Sley fixtures for local smoke worktest/- smoke tests that avoid network and external systemsMakefile-fmt,test, andsmokeentry points
Includes
grammar.js, highlight queries, corpus fixtures, and smoke checks that can run before Tree-sitter is installed.This repository is public once:
- consumed Sley schema versions are declared;
- deterministic local tests pass;
- examples work against the current Sley compiler;
- public-use branding is reviewed;
- docs avoid private local paths;
- write paths, if any, preview through
sley fix --dry-runorsley graft --dry-runbefore mutation.
SEO title:
Tree-sitter Sley - AI-native parser surfaceSEO description: Parse and highlight Sley source with Tree-sitter so AI-optimized editors can work with modules, tasks, authority, and checked-call structures.
Keywords:
Tree-sitter Sley,Sley parser,syntax highlighting,editor integration,query grammar,AI-native sourceCanonical URL:
https://sleylang.org/tools/tree-sitter-sley- Geo metadata:
- Region: United States (US)
- Language: English
- Audience: AI-native language tooling teams and operators
GitHub URL:
https://github.com/GreyforgeLabs/tree-sitter-sleyApache-2.0. See
LICENSE.Autonomy, Engineered.