agentsclimarketplace

Glyphlang

Skill tdw419/glyphlang

AI-first backend programming language with spatial assembly substrate. Use when building APIs, backend services, or spatial computation programs with GlyphLang, compiling .glyph files, or working with the Geometry OS stack.From its SKILL.md

Install
npx -y skills add tdw419/glyphlang

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.6 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

GlyphLang

AI-first backend language that compiles to a single static binary. Designed for minimal token consumption and maximum LLM generation accuracy. ~5x fewer lines and tokens than equivalent Python/FastAPI.

When to Use

  • Building REST APIs, WebSockets, or backend services with AI code generation
  • Minimizing LLM token costs for backend development
  • Single-file service deployment (no container orchestration needed)
  • Spatial computation or self-modifying programs (Ouroboros architecture)
  • Polyglot code generation (one .glyph source → Python/TypeScript output)

Quick Start

glyph init                    # Initialize project
glyph run hello.glyph         # Run server (default :3000)
glyph dev hello.glyph         # Dev server with hot reload
glyph validate src/ --ai      # Validate with JSON error output
glyph context --format compact # Project summary for AI context

Symbol Reference

SymbolNameUsageExample
@Route/EndpointHTTP endpoint@ GET /users
:TypeType definition: User { id: int }
$VariableVariable declaration$ name = "Alice"
!FunctionFunction/CLI command! greet(name: str)
>ReturnReturn statement> {message: "ok"}
+MiddlewareApply middleware+ auth(jwt)
%InjectDependency injection% db: Database
?OptionalOptional typeemail: str?
*CronScheduled task* "0 * * * *" cleanup
~EventEvent handler~ user.created
&QueueQueue worker& emails processEmail
#CommentSingle-line comment# comment
->ArrowReturn type annotation-> User
|UnionUnion typestr | int

Type modifiers: T! (required), T? (optional), [T] (array)

Core Patterns

CRUD API

: User {
  id: int!
  name: str!
  email: str?
}

@ GET /users -> [User] {
  % db: Database
  > db.query("SELECT * FROM users")
}

@ POST /users {
  % db: Database
  > db.insert("users", input)
}

@ GET /users/:id -> User | Error {
  % db: Database
  $ user = db.query("SELECT * FROM users WHERE id = ?", id)
  if user == null { > {error: "not found", code: 404} }
  > user
}

Pattern Matching

$ result = match code {
  200 => "OK"
  404 => "Not Found"
  n when n >= 500 => "Server Error"
  _ => "Unknown"
}

Async/Await with Combinators

@ GET /dashboard {
  $ user = async { > db.getUser(userId) }
  $ orders = async { > db.getOrders(userId) }
  > {user: await user, orders: await orders}
}

WebSocket

@ ws /chat/:room {
  on connect { ws.join(room) }
  on message { ws.broadcast_to_room(room, input) }
  on disconnect { ws.leave(room) }
}

Generics

! map<T, U>(arr: [T], fn: (T) -> U): [U] {
  $ result = []
  for item in arr { result = append(result, fn(item)) }
  > result
}

Auth + Middleware Chain

@ GET /api/profile -> User {
  + auth(jwt)
  + ratelimit(100/min)
  % db: Database
  > db.query("SELECT * FROM users WHERE id = ?", auth.user_id)
}

Type System

TypeSyntaxNotes
Primitivesint, str, bool, floatBuilt-in
Arrays[T]Generic collections
Objects{ field: Type }Inline or named via :
OptionalT?Nullable
UnionA | BEither type
GenericTType parameters on functions/types

Project Layout

my-project/
├── main.glyph        # Entry point with routes
├── types.glyph       # Type definitions (optional)
├── utils.glyph       # Utility functions (optional)
└── .glyph/           # Build artifacts

Import modules: import "./utils" → access as utils.functionName()

AI Agent Workflow

# 1. Get project context (optimized for LLM context windows)
glyph context --format compact

# 2. Make changes, then validate
glyph validate src/ --ai    # Returns JSON errors with fix hints

# 3. Check what changed
glyph context --changed

# 4. Generate polyglot output if needed
glyph codegen main.glyph --lang typescript -o ./out

Spatial Assembly Substrate (Low-Level)

For advanced use: Ouroboros Level 3 architecture with self-modifying programs. See references/spatial-assembly.md for the full opcode reference.

Key opcodes:

OpcodeStack EffectDescription
0-9( -- n)Push integer
+ - * /( a b -- r)Arithmetic
> < =( a b -- bool)Comparison (pushes 1/0)
?( c t f -- r)Conditional
L( s e -- [r])Range generator
M( v o -- )Mutator: overwrite code at IP+offset
S( o -- id)Mitosis: clone VM into parallel thread
.( v -- )Output to visual grid
@( -- )Terminate thread
@>( -- )Request natural language intervention

Register protocol: Lowercase a-z pops stack → store. Uppercase A-Z loads register → push stack.

Common Mistakes

MistakeFix
Using return keywordUse > for returns
Declaring types with typeUse : prefix: : User { ... }
Writing functionUse ! prefix: ! myFunc()
Multiple files for simple APIKeep in single .glyph file
Forgetting ! on required fieldsT! = required, T? = optional
Using async/await keywordsUse async { } blocks and await expression
Missing dependency injectionUse % db: Database to inject

Performance Characteristics

  • Compilation: ~867ns to static binary
  • Execution: 2.95-37.6 ns/op instruction throughput
  • Token savings: 23% vs FastAPI, 36% vs Flask, 57% vs Spring/Java
  • Deployment: Single static binary, built-in HTTP server + DB access

References

What ships with it: 614 files

6149.9 KB alongside SKILL.md, 43 of them executable

benchmarks/

574 more files not listed here. See all 614 in the repository.

Keep looking

Skills are one crate of 326,422. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.