Spw Workbench is a source-first language, runtime, and tooling stack for .spw workspaces.
It combines:
- a parser and type model
- a runtime and substrate/event system
- a language server and editor surfaces
- workspace contracts, specs, and research notes
The repo currently ships:
- a parser kernel in
packages/spw-seed/ - a runtime and substrate/event model in
packages/spw-runtime/ - a language server in
packages/spw-lsp/ - a CLI in
packages/spw-cli/ - a VS Code extension in
extensions/vscode-spw/ - canon/spec/research surfaces under
.spw/anddocs/
Spw itself is a brace-first language where operators carry semantic roles and containers carry structural facts.
This repository is the working bench where:
- language semantics are specified
- parser and runtime behavior are implemented
- editor affordances are tested against real corpus files
- install, publishing, and research workflows are made explicit
For a first read from GitHub, this README is the top-level orientation surface: what the repo contains, what is currently true, and where the main contracts live.
- Source-first: checkouts are the primary development surface.
- Site-first install: external sites currently mount the workbench at
.spw/_workbench. - Thin client editor: the VS Code extension delegates language behavior to
spw-lsp. - Narrow public claim: the install story is intentionally smaller than the long-term packaging story.
For the current install boundary, start with docs/runtime/md/quick-start.md.
If you want the shortest useful route through the repo:
- Read docs/runtime/md/github-reading-map.md.
- Read docs/runtime/md/quick-start.md for the current install truth.
- Read
.spw/workspace.spwfor the workspace contract. - Read
packages/spw-seed/src/parser.tsif you care about syntax/parsing. - Read
packages/spw-lsp/src/stdio-server.tsandpackages/spw-lsp/src/server-index.tsif you care about editor behavior. - Read
packages/spw-runtime/src/if you care about runtime/substrate behavior.
npm install
npm run spw -- help
npm run test:lsp
npm run buildUseful local commands:
| Command | Purpose |
|---|---|
npm run spw -- help |
CLI entrypoint |
npm run spw:dev |
dev watcher |
npm run lsp |
stdio language server |
npm run test:lsp |
LSP test suite |
npm run test:runtime |
runtime test suite |
npm run build |
TypeScript typecheck |
npm --prefix extensions/vscode-spw run compile |
build VS Code extension |
The current public install model is site-first:
your-site/
├── .spw/
│ ├── _workbench/ # mounted spw-workbench
│ ├── index.spw
│ ├── mount.spw
│ └── workspace.spw
└── .agents/
The boundary is deliberate:
- the site owns
.spw/index.spw,.spw/workspace.spw, and.spw/mount.spw - the workbench owns
.spw/_workbench
That keeps site canon and workbench infrastructure distinct.
Bootstrap details are in docs/runtime/md/quick-start.md and docs/runtime/md/site-install-release-story.md.
| Area | Why read it |
|---|---|
packages/spw-seed/ |
lexer/parser/types |
packages/spw-runtime/ |
interpreter and substrate-driven events |
packages/spw-lsp/ |
hover, diagnostics, completion, symbols, display logic |
packages/spw-cli/ |
CLI verbs and workspace tooling |
extensions/vscode-spw/ |
thin client over the LSP |
.spw/ |
canon specs, conventions, install surfaces, probes |
docs/ |
public-facing runtime/design docs |
.agents/ |
agent workflows, plans, and local automation |
This is enough to orient quickly without reading the whole corpus first.
| Sigil | Role |
|---|---|
? |
probe / question |
~ |
potential / deferral / reference |
@ |
perspective / root |
& |
merge / confluence |
* |
value / collapse |
^ |
frame / integration |
! |
action / injection |
= |
config / constraint |
% |
measure |
# |
annotation / metadata |
. |
ground / access |
| Brace | Meaning |
|---|---|
< > |
channel |
( ) |
grouping |
[ ] |
selection |
{ } |
scope |
#topic
#:lens
#!intent
#>anchor
For the actual semantic model, read:
Relatively stable:
- package boundaries
- source-first repo posture
- mounted site install model
- LSP thin-client direction
.spw/workspace.spwas workspace contract surface
Still actively evolving:
- mounted-site editor startup polish
- public packaging/distribution convenience
- some display vocabulary and atlas surfaces in the VS Code extension
- publishing flows derived directly from Spw sources
The project keeps the main layers close together:
- language tooling that stays inspectable end to end
- editor affordances grounded in actual corpus structure
- a parser/runtime/LSP stack that keeps its research surfaces close to the code
- explicit install and authorship boundaries for multi-repo systems
The goal is direct extension, not a flattened generated scaffold.
The VS Code extension lives in extensions/vscode-spw/.
It currently provides:
- syntax highlighting and snippets
- LSP-powered hover, diagnostics, completion, links, and formatting
- Concepts and Workspace Atlas views
The extension README is here:
Useful documentation surfaces:
- docs/runtime/md/github-reading-map.md
- docs/runtime/md/quick-start.md
- docs/runtime/md/migration-v02-v03.md
- docs/runtime/md/site-install-release-story.md
Before changing behavior, read the local workflow rules in:
If you want to extend the system rigorously, the best first move is to follow an actual request path end to end:
- pick a
.spwsource - inspect parser/runtime/LSP handling
- run the targeted tests
- tighten the docs and contracts alongside the code