The official canon for lore.land.
This project integrates Spw kernel ideas from:
- Repository:
https://github.com/spwashi/spw-workbench - Local submodule in this workspace:
./.spw/_workbench - Current submodule pin:
5552cec
book/scripts/modules/spw-selector-parser.mjsPort of thespw-workbenchselector-expression parser for browser runtime use.book/scripts/modules/spw-register-bank.mjsRegister and handle bank for structured Spw selection payloads.book/scripts/modules/spw-interactions.mjsInteractive Spw runtime (clickable braces/operators/chunks, geometry controls, Rubik's Cube semantic faces, register controls, plus LSP-inspired inspection controls: line/file code lens and inlay-style hints).lore:spw-selectionevent Shared runtime signal used by page-level UX to react to Spw handle/payload selections.book/scripts/modules/spw-ethos.mjsShared ethos bridge for chapter + home surfaces. Encodes operator-phase roles, claim layers (grammar,semantics,pragmatics), and claim-chain UI (claim -> spec -> impl -> probe) inspired byspw-workbench/.spw/harness/claim-protocol.spw.book/scripts/modules/load-lifecycle.mjs+book/scripts/modules/story-lexicon.mjsLifecycle bridge now emitsvalence -> pipeline -> precipitatemappings (for exampleboon -> select -> desugar) from.spw/surfaces/index.spwand.spw/runtime/precipitates.spw.book/scripts/custom/spw-component-binding.mjsCustom elements can fetch/apply.spwsources with declarative attributes:data-spw-fetch,data-spw-select,data-spw-apply,data-spw-target, and optionaldata-spw-inlinefallback.book/scripts/modules/spw-routing.mjsCentralized Spw route resolver shared by bindings and interactive inspectors. Normalizesspw/*, chapter aliases, and workbench aliases (workbench/*,_workbench/*), while generating GitHub Pages-safe URLs via base-path detection.book/scripts/custom/spw-style-library.mjs+book/scripts/custom/spw-behavior-library.mjsReusable style/behavior libraries for semantic component tuning (load-reactive, selection-reactive, interactive key handling).book/scripts/custom/spw-advanced-runtime.mjsAdvanced custom-component runtime with explicitpriming -> resolutioncycles, event emission (lore:spw-runtime-cycle), and re-priming on runtime attribute changes.
12 sigils — each with one semantic role. Declared in OPERATOR_ROLES (exported from spw-interactions.mjs); every rendered token carries data-spw-role.
Spirit sequence: ?~<#.>@(#.)&[#.]*{#.}^
| Sigil | Role | Phase | Polarity | Meaning |
|---|---|---|---|---|
! |
action | 0 | fire effect, inject | |
? |
probe | 1 | inspect, select, evaluate | |
~ |
potential | 2 | defer, name, superpose | |
@ |
perspective | 3 | root scope / observer point — @path resolves from anchor |
|
& |
confluence | 4 | merge, combine frames | |
* |
value | 5 | collapse to concrete | |
^ |
integration | 6 | bind upward, emit | |
# |
annotation | meta | extrinsic | self-reference, resonance — projection / outward |
. |
ground | meta | intrinsic | access, intrinsic state — reduction / inward |
= |
config | bind | constrain, bias state | |
% |
measure | obs | quantify, observe depth | |
$ |
substrate | meta | introspection, meta-access |
Accessor polarity: # → extrinsic/projection (outward-facing), . → intrinsic/reduction (inward-facing).
. is tokenized only when immediately before [ (e.g. .[property]), preserving normal prose dots.
@ carries data-spw-direction: prefix (path target right) or postfix (observer anchored left).
Braces are primordial semantic constructs, not punctuation. Left brace = accumulate charge; right brace = discharge.
| Brace | Name | Role | Spirit | Left charge | Right charge |
|---|---|---|---|---|---|
[ ] |
frame | selection | [#.] |
+selection | −release |
{ } |
body | scope | {#.} |
+tension | −discharge |
( ) |
scope | grouping | (#.) |
+containment | −emission |
< > |
capsule | channel | <#.> |
+channel | −delivery |
Container roles are exported from spw-interactions.mjs as CONTAINER_ROLES; every brace token carries data-spw-container-role and data-spw-charge.
Dependency flows inward: pragmatics → semantics → grammar (never reversed).
| Layer | Owns | Surfaces |
|---|---|---|
| Grammar | operators, containers, seeds, tokens | src/seed/, core/*.md |
| Semantics | planes, axes, polarity, spirit seq | registries/, applications/ |
| Pragmatics | shelves, editing, biome, process | conventions/, patterns/ |
Claim layers in the ethos panel map to this kernel: grammar → ., semantics → ^, pragmatics → !.
book/scripts/modules/ebook-navigation.mjsChapter-level ebook architecture with section mapping, TOC handles, concept routes, persisted resume state, keyboard navigation, and reader/engineer register modes.book/scripts/script.mjsComposes chapter runtime: content mount -> chapter routes -> ebook navigation -> Spw runtime enhancement -> progression/effects.book/styles/fixtures/root.cssStyles hierarchy and navigation surfaces for both software-heavy and book-heavy reading modes.
| Key | Action |
|---|---|
Alt+Left |
Previous chapter |
Alt+Right |
Next chapter |
Alt+H |
Home (/) |
Alt+T |
Timeline |
| Key / Gesture | Action |
|---|---|
PageDown / ] |
Next section |
PageUp / [ |
Previous section |
Alt+ArrowDown |
Next section (alternate) |
Alt+ArrowUp |
Previous section (alternate) |
Hold { |
Breadth mode — reveals all sections and highlights concept rail / perspective switch |
Hold } |
Depth mode — focuses active section, mutes others, foregrounds TOC |
| Gesture | Action |
|---|---|
| Click on operator token | Cycle to next operator in sequence |
| Click on brace token | Highlight matched brace pair |
| Click on chunk | Commit chunk as register handle |
| Click-and-drag (≥2 words) | Create a (scope) span — chip appears, commits to register, fades after ~3 s |
- Claim protocol ethos from
spw-workbenchis surfaced in-runtime as selectable claim layers and testable claim cards. - Chapter surfaces include an ethos panel in
asideand home includes an ethos atlas near the grammar observatory. - Runtime events (
lore:spw-selection,lore:ebook-section-change) update ethos probe status so claims stay tied to observable interaction.
- Repository-local canon root:
.spw/ - Chapter references:
.spw/chapters/01.spw....spw/chapters/13.spw - Indexes and claims:
.spw/index.spw.spw/workspace.spw.spw/chapters/index.spw.spw/claims/chapter-claims.spw
- Runtime, surfaces, and observability:
.spw/runtime/precipitates.spw.spw/state/observable.spw.spw/surfaces/index.spw.spw/surfaces/publish.spw.spw/surfaces/plugin-protocol.spw.spw/surfaces/domains.spw
- Regeneration command:
node .spw/tools/export-chapters.mjs
Chapter .spw files are generated from book/chapter/*/index.html#chapter-data and intended as long-form, expressive references for story extension and semantic diffing.
Spw runtime assets are released through the shared cache profile:
- release token:
2026_02_28.I - query key:
v - context key:
ctx - implementation:
book/scripts/modules/cache-context.mjs
Use this when introducing new Spw routing/interactions/effects so chapters and home surfaces load coherent runtime behavior after deploy.
- Date-based seed folders under
seeds/use canonical ISO ordering:yyyy-mm-dd. - Example:
seeds/2026-03-01/
- Pipeline entrypoint:
book/scripts/tools/assets/optimize-assets.mjs - NPM scripts:
npm run assets:optimizenpm run assets:optimize:dry
- Default source roots:
book/imagesbook/mediabook/pwa/iconsseeds
- Output root:
dist/assets/microbundles/(ignored by git) - Generated microbundle artifacts:
bundles/*.jsonper-asset bundle recordsimages/**responsive WebP variants (+ preview)svg/**minified SVG outputsindex.jsonbundle index + size reportpalette-fallbacks.cssfallback background colors per asset key