A Literate Programming Environment for Human and Machine Agents
Organizations: Queensland University of Technology, Brisbane, Queensland, Australia
Abstract
This paper introduces an environment for constructing literate programs in concert with language-aware machine agents. This environment includes a grammar for executable program essays, a parser that treats names as first-class objects, an internal name-graph which relates prose, names and executable artifacts, and a binding mechanism for existing languages and testing toolsets. This supports co-location of code with its most relevant natural language and structured data context, making better use of Large Language Model (LLM) context windows. It also provides LLM coding agents with a toolset more analogous to the symbol-aware search and usage information available in human programmer-facing Integrated Development Environments (IDEs). We describe a working implementation with bindings to three established programming languages, and several example programs.
Figures & tables
| any character other than newline | ||||
| Priority | Terminals |
|---|---|
| 20 | SEPARATOR , TESTS_HEAD , BINDING_HEAD , REFERENCES_HEAD , APPENDIX_HEAD |
| 10 | MOD_HEAD , SUBHEAD , SIGIL , TEST_SIGIL |
| 8 | INDENTED_LINE , BLANK , BULLET |
| 5 | REF |
| 1 | LINE_START_TEXT , PROSE_TEXT (fallback) |
| Command | Description |
|---|---|
| run | Assemble and execute a .lob file |
| test | Run all claims in a .lob file, or the whole project |
| build | Assemble a .lob file (or the whole project) to source artifacts |
| weave | Render a .lob file (or the whole project) as Markdown |
| graph | Export the package name-graph (JSON or Turtle RDF) |
| query | Query the package name-graph |
AI Coding Agents
AI coding agents use language models and software tools to plan, edit, test, and maintain code with varying levels of autonomy.
See all 329 papers