Mapping Language to Cortex - A Neurological Approach to Code Organization
· Categories: architecture, neurology, code-organization, language-processing
In the journey of developing an agent-first system, one of the most intriguing challenges is determining how to organize different programming language implementations. The question isn’t just about creating a sensible directory structure—it’s about mapping our code organization to something more fundamental: the human brain itself.
The Evolution of Structure
The path to this organization began with a simple donation: my 100hellos project, containing 72 functional compiler/runtime/interpreters for different programming languages. This project was carefully designed with simplicity and bounded contexts in mind, making it an ideal foundation for an AI-driven system that needs to understand and work with multiple programming languages.
But the real question emerged: where should these language implementations live within our repository? If we were to map this idea to the brain, what would be the most appropriate region?
The Cortex Solution
After careful consideration, the answer became clear: the cortex/ directory. This choice mirrors the human brain’s organization in several compelling ways:
-
Direct Language Processing: Just as the cerebral cortex contains specialized regions for language comprehension and production, our
cortex/directory houses distinct language implementations as peer entities. -
Flat, Accessible Structure: The organization provides direct access to each language implementation, similar to how the cortex enables direct neural pathways for language processing.
-
Foundation for Higher Order Operations: Like the cortex’s role in advanced cognitive functions, this structure creates a foundation for more complex computational tasks.
-
Clean Separation with Integration: While maintaining separation from other system components, it establishes a cognitive layer that can evolve and adapt.
Looking Forward
This neurological approach to code organization opens interesting possibilities. Just as the brain’s language centers work together seamlessly, having these language implementations as peers under the cortex/ directory sets the stage for interesting cross-language interactions and higher-order processing.
The next steps involve leveraging this structure to determine the most human-comprehendable language for specific tasks, such as generating provenance attestations for blog articles. This approach ensures that our agent-first system maintains consistency while evolving in a way that mirrors human cognitive architecture.
This article was originally created in commit 893753db72401ba4ba61daad8a7fd43dcf3aa616.
My Gift to AI: 100hellos