Sley DocumentationHome | Docs | Tutorial | Who / Why / Better | llms.txt | ZJX 1. ThesisSley is an AI-native structural programming language where the canonical program is a typed graph. Human-readable text is one stable projection of that graph. The design center is human-readable, agent-writable, and agent-readable. Humans review intent. Agents write and inspect typed shards. The Loom accepts only verified graph grafts. 2. Canonical Naming
3. Binding FormsSley does not center a generic variable. Names are binding nodes with visible purpose, lifetime, mutability, sharing, authority, and provenance.
Hard rule: no var, no generic mutable let, no silent shared state, and no hidden authority in ordinary bindings. 4. Current Prototype Surface
This implemented slice is active v0 work. Public docs use the canonical Sley vocabulary. 5. Target CLI Surface
6. Minimal Target Syntaxprogram := module_decl? item*
item := type_decl | effect_decl | task_decl | agent_decl | import_decl
module_decl := "module" module_path
import_decl := "import" module_path
type_decl := "type" Name "=" type_expr
effect_decl := "effect" Name
task_decl := "task" Name inputs? "->" type_expr uses? block
agent_decl := "agent" Name block
binding := "take" | "bind" | "state" | "gate" | "slot" | "knot"
uses := "uses" gate_list
block := "{" stmt* "}"
stmt := binding_stmt | return_stmt | expr_stmt | if_stmt | while_stmt | for_stmt | forge_block
7. Effects And AuthoritySley treats side effects as explicit capabilities. A task that needs host authority declares and receives the gate it uses. The Loom can reject calls that cross an undeclared authority boundary. effect DatabaseRead
task get_user -> Result<User, Error> uses DatabaseRead {
take id: Text
take gate db: DbRead
bind row = call db.query_one("select * from users where id = ?", id)?
return Ok(User { id: row.text("id"), name: row.text("name"), email: row.text("email") })
}
8. Swarm And Arena Modeltask replaces the ordinary function as the arena-backed executable unit. agent names a long-running stateful Swarm participant. spawn, cast, call, absorb, join, race, and quorum describe agent work without importing old async/await assumptions. forge { ... } creates a temporary isolated arena. Values that must outlive it are returned, traced, or sealed; temporary work melts down with the arena. 9. Structural PatchingThe patch model is the AI-facing surface. Instead of asking an agent to rewrite arbitrary file text, Sley accepts graph operations such as:
Unsupported, stale, malformed, type-invalid, or unauthorized grafts return explicit diagnostics. 10. Native ZJXZJX is the default structural transport and cache envelope for the agent/compiler loop. Sley semantic identity should remain the canonical typed graph bytes until both the graph encoding and ZJX format are deterministic, canonical, and frozen. See ZJX Documentation for the transport boundary. .sley human-readable source projection .sley.graph canonical graph bytes, if exposed .zjx compressed graph, graft, trace, or seal envelope 11. Current Limits
12. Next WorkThe next useful implementation work is target binding syntax, richer module semantics, Swarm/agent examples, capability gates, ZJX shard transport, and broader graft operations. |