con-dog/slices-demo

Can you collapse features into small enough slices to understand at a glance? Maybe

0

stars

15

commits

Aug 19, 2026

updated

con-dog.github.io/slices-demo/
adhd
adhd-friendly
architecture
compression
context-management
vertical-slice-architecture

README

Summary

[!WARNING]

Experiment 👨‍🔬

This write-up is an active work in progress. This is the public write-up for a private repository, so some of the content is intentionally vague or incomplete. If you have questions, please reach out to me directly.

It is the age of the LLM, and the thing I struggle with most, also happens to be something LLMs struggle with too -> context management.

Conways Game of Life (Slice)Slice Visualizer (Also a Slice)
conways game of life exampleslices and pool

My biggest gripe in software is how "best practice" is to split everything up into different files, different classes, across different folders and projects. I understand why we do this.

But for someone who struggles with context switching, it is difficult to hold in memory a single feature across a massive file system abstraction.

This experiment asks this question:

"What if each feature in a project was an enitrely self-contained slice, such that a human or agent can glance at the slice in isolation, without additional context, and understand its function?"

The architecture that falls out of this, and the conventional wisdoms it attacks:

  • Hard enforced boundaries:
    • A slice can never reference another slice, only a contract.
    • A slice is a single file implementing a single feature.
    • EVERYTHING is a slice.
      • Need a clock / timer? slice
      • Need a debugger? slice
      • Need rendering? slice
      • Need state? Yes, a slice
  • Duplicate code:
    • Copy pasting code between slices is explicitly desired (more on this in tooling) and managed via tooling, where copied code is cloned and kept in sync via tooling.
    • A feature has to be entirely self-describing, including all inline code to make it work.
  • Communication:
    • All communication happens to a global shared pool which buffers events
    • Slices dictate which events they emit, and which events they consume
    • Facts are events that have happened. Facts emitted in frame N are visible in frame N+1.
  • Primitives:
    • The Pool, Slices, Facts
    • The Pool is effectively the kernel responsible for broadcasting and receiving events to / from slices.
    • The Slices are self contained features that emit or consume Facts
    • Facts are events that have happened, which contain a causality tag and a payload. So you can ask "why did X happen" and walk the fact tree.

Slice IDE - An Experiment in DogFooding

An IDE / editor, built fully on the slices idea, dogfooding the idea - as it were - whilst also being a self-editing editor.

Result - cool, but mostly a pain in the arse to work with. The editor can brick itself. Maybe there is something there, but probably not. BYO API-Key so an LLM can add / remove slices at will (Add game panels, sound panels, remove panels etc)

Contributors

con-dog

15 commits

con-dog/slices-demo

Can you collapse features into small enough slices to understand at a glance? Maybe

0

stars

15

commits

Aug 19, 2026

updated

con-dog.github.io/slices-demo/
adhd
adhd-friendly
architecture
compression
context-management
vertical-slice-architecture

README

Summary

[!WARNING]

Experiment 👨‍🔬

This write-up is an active work in progress. This is the public write-up for a private repository, so some of the content is intentionally vague or incomplete. If you have questions, please reach out to me directly.

It is the age of the LLM, and the thing I struggle with most, also happens to be something LLMs struggle with too -> context management.

Conways Game of Life (Slice)Slice Visualizer (Also a Slice)
conways game of life exampleslices and pool

My biggest gripe in software is how "best practice" is to split everything up into different files, different classes, across different folders and projects. I understand why we do this.

But for someone who struggles with context switching, it is difficult to hold in memory a single feature across a massive file system abstraction.

This experiment asks this question:

"What if each feature in a project was an enitrely self-contained slice, such that a human or agent can glance at the slice in isolation, without additional context, and understand its function?"

The architecture that falls out of this, and the conventional wisdoms it attacks:

  • Hard enforced boundaries:
    • A slice can never reference another slice, only a contract.
    • A slice is a single file implementing a single feature.
    • EVERYTHING is a slice.
      • Need a clock / timer? slice
      • Need a debugger? slice
      • Need rendering? slice
      • Need state? Yes, a slice
  • Duplicate code:
    • Copy pasting code between slices is explicitly desired (more on this in tooling) and managed via tooling, where copied code is cloned and kept in sync via tooling.
    • A feature has to be entirely self-describing, including all inline code to make it work.
  • Communication:
    • All communication happens to a global shared pool which buffers events
    • Slices dictate which events they emit, and which events they consume
    • Facts are events that have happened. Facts emitted in frame N are visible in frame N+1.
  • Primitives:
    • The Pool, Slices, Facts
    • The Pool is effectively the kernel responsible for broadcasting and receiving events to / from slices.
    • The Slices are self contained features that emit or consume Facts
    • Facts are events that have happened, which contain a causality tag and a payload. So you can ask "why did X happen" and walk the fact tree.

Slice IDE - An Experiment in DogFooding

An IDE / editor, built fully on the slices idea, dogfooding the idea - as it were - whilst also being a self-editing editor.

Result - cool, but mostly a pain in the arse to work with. The editor can brick itself. Maybe there is something there, but probably not. BYO API-Key so an LLM can add / remove slices at will (Add game panels, sound panels, remove panels etc)

Contributors

con-dog

15 commits