···11-# Superplan AT Proto Project
11+# Superplan
2233-Historical-language systems lab for a terminal Bluesky / AT Protocol client.
33+Superplan is a structured, procedural programming language inspired by early high-level languages such as ALGOL, Plankalkül, and Superplan — reimagined for modern systems experimentation.
4455-## Stack
55+This repository contains a working system where Superplan programs interact with the AT Protocol (Bluesky) through a Lisp runtime and a Rust bridge.
6677-- Superplan-26: main visible language
88-- Lisp: parser, interpreter, meta-tooling
99-- ALGOL influence: syntax and block structure
1010-- Plankalkül influence: typed data model ideas
1111-- Rust bridge: protocol edge only
77+---
1281313-## Current state
99+## Why Superplan
14101515-This repo currently includes:
1111+This project explores a simple question:
16121717-- vision and language docs
1818-- Superplan example program
1919-- Common Lisp lexer, parser, AST, pretty printer, interpreter
2020-- fake Lisp bridge process over stdin/stdout
2121-- fake Rust bridge preserving the same ABI
1313+> What if early structured languages evolved directly into modern networked systems?
22142323-## Quick start
1515+Instead of building everything in contemporary languages, this stack is deliberately split:
24162525-### 1. Install prerequisites
1717+* **Superplan** — visible application layer
1818+* **Common Lisp** — parser, AST, interpreter
1919+* **Rust** — protocol edge (AT Proto / Bluesky)
26202727-- SBCL
2828-- Rust / Cargo
2121+The result is a real system capable of:
2222+2323+* login
2424+* profile lookup
2525+* home timeline fetch
2626+* posting content
2727+2828+---
2929+3030+## Architecture
3131+3232+```
3333+Superplan (.spl)
3434+ ↓
3535+Lisp lexer / parser / AST / interpreter
3636+ ↓
3737+Bridge client (JSON over stdio)
3838+ ↓
3939+Rust AT Proto bridge
4040+ ↓
4141+Bluesky / AT Protocol
4242+```
4343+4444+---
4545+4646+## Example
4747+4848+```superplan
4949+PROGRAM HELLO
5050+5151+BEGIN
5252+ WRITE("HELLO SUPERPLAN")
5353+END
5454+```
5555+5656+---
5757+5858+## Real Example (Bluesky)
5959+6060+```superplan
6161+PROGRAM PROFILE
6262+6363+STRING ACTOR
6464+JSON PROFILE
6565+6666+PROCEDURE SHOW_PROFILE(JSON PROFILE)
6767+BEGIN
6868+ WRITE("HANDLE:")
6969+ WRITE(JSON_STRING(JSON_GET(PROFILE, "handle")))
7070+END
7171+7272+BEGIN
7373+ WRITE("ACTOR:")
7474+ ACTOR = READLINE()
7575+ PROFILE = ATP_PROFILE(ACTOR)
7676+ CALL SHOW_PROFILE(PROFILE)
7777+END
7878+```
7979+8080+---
8181+8282+## Getting Started
8383+8484+### Requirements
8585+8686+* SBCL (Common Lisp)
8787+* Rust / Cargo
29883030-### 2. Run the Rust fake bridge directly
8989+### Build the bridge
31903291```bash
3333-cd bridge
3434-cargo run
9292+cargo build --manifest-path bridge/Cargo.toml
3593```
36943737-### 3. Run the Lisp parser + interpreter
3838-3939-From repo root:
9595+### Run the Superplan program
40964197```bash
4298sbcl --script lisp-tools/parser/run.lisp
4399```
441004545-By default, the interpreter tries to launch the Rust bridge first and falls back to the Lisp bridge if Rust is unavailable.
101101+---
102102+103103+## Example Programs
104104+105105+Located in:
106106+107107+```
108108+superplan/examples/
109109+```
110110+111111+Included:
112112+113113+* `home.spl` — interactive client (timeline, profile, post, whoami)
114114+* `profile.spl` — profile lookup
115115+* `post.spl` — post creation
116116+117117+---
118118+119119+## File Extension
120120+121121+Superplan source files use:
122122+123123+```
124124+.spl
125125+```
126126+127127+(`.sp` is avoided due to GitHub Linguist mapping to SourcePawn)
128128+129129+---
130130+131131+## Project Status
132132+133133+Early but functional.
134134+135135+Currently working:
136136+137137+* Superplan parsing and execution
138138+* terminal client written in Superplan
139139+* real Bluesky profile lookup
140140+* real authenticated timeline fetch
141141+* real post creation
142142+143143+Not yet implemented:
144144+145145+* automatic token refresh
146146+* static type checking
147147+* compiled backend
148148+149149+---
150150+151151+## Repo Layout
152152+153153+* `docs/` — vision, spec, grammar, bridge ABI
154154+* `superplan/examples/` — `.spl` programs
155155+* `lisp-tools/parser/` — lexer, parser, AST, runner
156156+* `lisp-tools/interpreter/` — runtime + bridge client
157157+* `bridge/` — Rust AT Proto bridge
158158+* `editors/vscode/superplan/` — VS Code language support
159159+160160+---
161161+162162+## Design Influences
163163+164164+* ALGOL — structure and control flow
165165+* Plankalkül — typed data model thinking
166166+* Lisp — language tooling and meta-layer
167167+* modern API systems — practical integration
168168+169169+---
170170+171171+## License
172172+173173+MIT
174174+175175+---
461764747-## Repo layout
177177+## Author
481784949-- `docs/` — vision, language spec, grammar, ABI
5050-- `superplan/examples/` — `.sp` examples
5151-- `lisp-tools/parser/` — lexer, parser, AST, pretty printer, runner
5252-- `lisp-tools/interpreter/` — environment, bridge client, interpreter
5353-- `lisp-tools/bridge/` — fake Lisp bridge
5454-- `bridge/` — fake Rust bridge
179179+Former Lab