Download Game! Currently 80 players and visitors. Last logged in:GlaurungDescadGileonPazi

Blitzer's Blog >> 72293

Back to blogs index
Posted: 12 Sep 2026 05:07 [ permalink ]
That is a brilliant optimization. Forcing a 7B or 8B parameter offline model
to track and correlate arbitrary UUIDs like {reg-root-0001} wastes context
tokens and invites hallucinations.
Using the explicit ALL_CAPS_TITLE as the universal ID maps perfectly to how
LLMs "think" (semantic meaning). If a node is named STATE_DICTIONARY, the LLM
instantly infers its purpose without needing a separate dictionary lookup.
Here is the design of our JavaScript Compilation Pipeline, expressed in your
new, simplified AST-MD syntax:
> description: A Node.js pipeline that parses simplified AST-MD, constructs a
dependency graph, and generates context-hydrated prompts for an offline LLM to
write the code.
> type: system
> status: planning

## MARKDOWN_PARSER
> description: Reads the raw AST-MD text file. Uses Regex to extract nodes,
treating the ALL_CAPS markdown headers (e.g., ## NODE_NAME) as the absolute
node IDs. Parses properties like description, type, and depends_on.
> type: logic
> tags: [regex, ast, parsing]

## GRAPH_BUILDER
> description: Ingests the parsed nodes and constructs a Directed Acyclic
Graph (DAG). Runs a strict validation pass: if Node A depends on Node B, but
Node B does not exist, the compiler throws a fatal error and halts.
> type: data_structure
> tags: [dag, validation, mapping]
> depends_on: [MARKDOWN_PARSER]

## CONTEXT_HYDRATOR
> description: The core prompt engine. When given a target node, it
recursively walks the DAG to retrieve the specifications (and any
already-generated code) of all its dependencies, bundling them into a single,
comprehensive string.
> type: logic
> tags: [prompt-generation, context-injection]
> depends_on: [GRAPH_BUILDER]

## TOPOLOGICAL_SORTER
> description: Analyzes the DAG and returns a flat execution list ordered
bottom-up. Leaf nodes (no dependencies) must be generated first, so their
completed code can be injected into the higher-level nodes that depend on
them.
> type: algorithm
> tags: [sorting, execution-order]
> depends_on: [GRAPH_BUILDER]

## LLM_ORCHESTRATOR
> description: Iterates through the sorted node list. For each node, it
requests the hydrated prompt, sends it to the local LLM via a REST API (like
Ollama or LM Studio), and saves the generated code to the file system.
> type: execution
> tags: [api-client, file-io, automation]
> depends_on: [CONTEXT_HYDRATOR, TOPOLOGICAL_SORTER]

Why TOPOLOGICAL_SORTER is the secret weapon
Notice the addition of the TOPOLOGICAL_SORTER.
If you ask the AI to write the ROUTE_RESOLVER before it writes the
STATE_DICTIONARY, it has to guess what the dictionary looks like. By sorting
the graph topologically (bottom-up), the compiler forces the LLM to write the
lowest-level database models first. When it eventually moves up to write the
API routes, the CONTEXT_HYDRATOR can inject the actual finished code of the
database models into the prompt, guaranteeing perfect integration.