Seraphina Glyph Planner — canonical Glyph source (mirror)
This folder is the source-of-truth mirror of the pure-Glyph artifacts that
ship inside the SynerGroAICorp.seraphina-glyph-planner VS Code extension
(distribution repo: SynerGro-AI/seraphina-grok-planner, private). The
extension is a thin host; the detection is pure Glyph.
What lives here
glyph/scan.gl — the source scanner (@version 1.3.0). Generated by
build_glyphb.py from a token table, then compiled by the real Revo
compiler (glyph.generator.compile_gl_to_glyphb) to an opaque
scan.glyphb. It walks the source bytes (a leading language byte + UTF-8
source), runs a string/comment state machine, and emits a flat
(rule_id, line) stream terminated by sentinel 255.
glyph/verdict.gl — the severity-classification + verdict core. Reads one
rule-id byte per finding, classifies bands, folds counts, and decides.
glyph/build_glyphb.py — the generator/compiler driver. Run with
PYTHONPATH pointing at this Revo checkout so it imports the real
glyph.generator. Emits the base64 blobs and the cross-engine parity fixture.
src/glyphvm.ts — a byte-faithful TypeScript port of the frozen ISA v1
subset (CRC-16/CCITT-FALSE, GLB1 header, proc/call, Python-floored
MOD, the boundary INPUT buffer). It is the fourth conformant engine and
runs the same .glyphb byte-identically with the Python host VM, the C VM,
and the metal VM.
src/scan.ts / src/verdict.ts — the JS "door": encode bytes, run the blob,
map rule-ids to messages. No detection logic.
All nine rules detect in the bytecode (M80 → M85)
0 insecure-random · 1 hardcoded-secret · 2 empty-catch · 3 bare-except · 4 eval-exec · 5 shell-injection[shell=True] · 6 swallowed-pass · 7 shell-injection[child_process] · 8 loose-equality · 9 todo-marker
JavaScript holds zero detection logic — it only encodes the source bytes,
runs the blob, and maps the emitted rule-ids to display messages. Cross-engine
parity (JS VM == Python reference) is 44/44 (36 scan + 8 verdict).
License
Source-available, Free-Use / No-Modification — see LICENSE. Free to use and
study; not to modify, fork, reverse-engineer, or resell.
VS Code Extension (local development)
This folder now contains a lightweight VS Code extension scaffold that
embeds the pure-Glyph scanner/verdict runtime and provides basic editor
integration (language id, snippets, and commands).
Build and run locally:
cd apps/seraphina-glyph-planner
npm install
npm run compile
code --extensionDevelopmentPath=. .
The extension exposes commands:
Glyph: Scan Current Document — run the pure-Glyph scanner on the active editor
Glyph: Scan Glyph Workspace — scan all *.gl files in workspace
Glyph: Show Preview — open a read-only preview pane for the current file
Glyph: Detect PowerShell — heuristic detection for PowerShell content
Glyph: Run Program / Glyph: Debug Program — compile-and-run .gl or run .glyphb directly in the JS Glyph VM
Glyph: Autofix Code — apply optimizer-driven or conservative fallback fixes in preview mode
Glyph: Show Vault Catalog — open a catalog panel backed by real vault metadata
Glyph: Open Code Block Builder — assemble snippet blocks and insert them into the active editor
Glyph: Toggle Enforce AGI Core — turn AGI core nesting enforcement on/off for .gl run/debug
Glyph: Ask Seraphina (Local) — run python -m seraphina_agi ask inside VS Code and show structured JSON output (no Copilot chat path)
Glyph: Reset Seraphina (Local Session) — reset local extension-side Seraphina session state and clear Seraphina output channels
ULTRA human backup workflow
The builder now supports a condensed human backup layer for rapid authoring:
ULTRA 1 - Monitor
ULTRA 2 - Brain
ULTRA 3 - Memory
ULTRA 4 - World
ULTRA 5 - Actions
ULTRA 6 - Flow
ULTRA 7 - Goal
Optional minimum set:
MIN 1 - Interface
MIN 2 - Logic
MIN 3 - System
In Glyph: Show Vault Catalog, use Seed ALL Core Blocks Into Vault to seed
ULTRA blocks, snippets, and opcode blocks in one action.
Vault addressing note (Revo M143): the vault metadata this panel reads
is now addressed, not scanned, for any lesson with a stable topic key
(LEARN <name> opcode lessons / SKILL:<slug> composed skills) —
sha256(key) hashes straight into a real (x, y, z) sub-cube coordinate,
and the lesson's type rides for free in the vault's own ordering_id
field, readable straight from the cheap per-slot index header with no
payload decode. This is Revo-side (seraphina_agi/memory.py +
glyph/vault.py); the panel inherits faster catalog reads with no format
change needed here.
In Glyph: Open Code Block Builder, use Assemble ULTRA Program for one-click
assembly in order:
Goal -> Monitor -> Brain -> Memory -> Actions -> World -> Flow
Editor snippets are available under the Glyph language (prefixes: g-op,
g-proc, g-i-e, g-tile) to quick-insert opcode and proc templates.
Use the included .vscode/launch.json to run the extension in the Extension
Development Host for debugging.
PowerShell command flow
Compile Glyph Extension builds the extension TypeScript into dist/.
Run Glyph Program compiles a .gl file with the repo-local Python compiler and runs the generated .glyphb through the JS Glyph VM.
Run Extension Host launches VS Code with this folder as the extension development path.