Tooling the Stack

Chapter 01: Tooling the Stack

Inside the MorphArray Stack VS Code Extension
Ben Um · April 2026

Having a solid mental model is one thing. Making the workflow frictionless and reproducible is another. That's where the MorphArray Stack VS Code extension comes in.

The extension was built specifically to support the Mental Stack methodology: treat HTML articles as the immutable source of truth, define order with simple .mastack files, and instantly produce both a clean static website and a high-quality Markdown dump ready for LLM prefill.

What the Extension Actually Does

1. Initialize Book Workspace

One command sets up an entire project structure from scratch:

2. Rebuild Dynamic Story

This is the "publish" command. It reads your chosen .mastack file, wraps each chapter in the base template, injects automatic navigation (Prev/Next links and a chapter list on the index page), and outputs a complete static site into the dist/ folder.

The originals in articles/ remain untouched. You can edit any chapter freely, hit rebuild, and instantly see the updated site with proper linking.

3. Create Mental Stack (Full Context) — The Star Feature

This is the command that makes the whole methodology powerful for LLM work.

It does the following in one click:

The resulting dump preserves headings, structure, and flow far better than raw folder dumps or loose text files, giving the model rich, ordered context without token waste.

A Typical Workflow

Here's how the loop feels in practice:

  1. Write or edit a chapter in the articles/ folder as normal HTML.
  2. Run Rebuild Dynamic Story to preview the updated static site locally.
  3. Run Create Mental Stack (Full Context) to generate a fresh dump.
  4. Paste the dump into an LLM as prefill and continue the conversation — generate the next chapter, run KRO experiments, explore dad-joke turbulence, or prototype modular topologies.
  5. Take the best new output, clean it up into a new HTML chapter, and repeat.

The entire cycle stays tight. No manual copying of files. No broken links. No lost relational context when feeding the series to an LLM.

Why This Tooling Matters

Before building the extension, I was doing this manually — copying chapters, converting formats, maintaining order by hand. It was error-prone and broke the flow of discovery. The extension removes that friction so the real work — thinking, analogizing, reducing kernels, and iterating — can stay front and center.

It also embodies the same philosophy as the Mental Stack itself: sparse definition (.mastack files) enabling rich output (both human site and LLM context). Just as SwiftUI views are disposable snapshots handed off for reconciliation, your HTML chapters are the immutable descriptions, and the extension is the system that reconciles them into the right form for each purpose.

This chapter is still early tooling. Future chapters will show real examples from the Analogy Series, demonstrate macro KRO applied to full Mental Stack dumps, explore limits of the current approach, and discuss possible extensions to the workflow.