A bit of inspiration most weekdays for exploring your mindset .

🔂 Future Compilers

Khem Raj September 23, 2025 #meta

Spec-driven development means the source of truth for software developement not the source code itself written in some programming language. Source code is an output artifact of specs. Here I think is a rough flow of a future code compiler.

Future compilers using Specs as code with C intermediate code

LLM Code Generation Flow                         Traditional Compilation Pipeline
---------------------------------                ---------------------------------
Natural Language Spec                             C Source (*.c)
        |                                              |
        v                                              v
  LLM generates draft C -------------------------.  Preprocessing
        |                                        :         |
        v                                        :         v
  Human review & refine (approve)                :   Lexical Analysis (tokens)
        |                                        :         |
        '-------------------- dotted handoff ----:--> Parsing (AST)
                                                 :         |
                                                 :   Semantic Analysis & IR Gen
                                                 :         |
                                                 :     Optimization (IR/SSA)
                                                 :         |
                                                 :     Code Generation
                                                 :         |
                                                 :       Assembly
                                                 :         |
                                                 :        Linking
                                                 :         |
                                                 '----> Executable Machine Code

Note: The dotted arrow indicates that the LLM does not replace the compiler; it produces C source that enters the normal toolchain at the C Source Code stage.