You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TOML + LLM comment conventions: tribal knowledge in `#comments`, stripped for data pipelines.
3
+
**Structured TOML annotations for AI-augmented applications.**
4
4
5
-
## Overview
5
+
`tomllm` extends standard TOML with a lightweight comment convention that lets configuration files carry machine-readable documentation alongside their values. Annotation comments survive in source for human and LLM readers; a single call strips them for clean downstream serialization.
6
6
7
-
`.tomllm` files are **valid TOML** with enriched `#` comment semantics:
7
+
---
8
8
9
-
- Comments associate with the next key-value pair or section header
- Tail-map block (last ≤10 lines): fast executive agent scanning without full context load
12
-
- Comments are FOR agents reading the **source file** as documentation — strip them for downstream pipelines
9
+
## The problem
13
10
14
-
## Cognitive Tiers
11
+
Configuration files written for LLM agents face a tension: agents need rich context (what does this key mean? what are valid values? what are the gotchas?) but downstream data pipelines need clean, minimal payloads. Embedding that context in comments today means either shipping noisy config to your pipeline or maintaining a separate documentation layer that drifts.
15
12
16
-
Each `.tomllm` file MAY declare its required cognitive tier in the tail-map:
13
+
## What tomllm does
17
14
18
-
| Tier | Models | Tasks |
19
-
|------|--------|-------|
20
-
|`sm0l`| qwen2.5-3B, haiku | classify, route, grep, format |
The tail-map is an optional block at the end of any `.tomllm` file (or any TOML file) that provides fast metadata extraction:
145
+
89
146
```toml
90
-
#b00t:map v1
91
-
# summary: one-line human+LLM description
147
+
#tomllm:map v1
148
+
# summary: one-line description for humans and agents
92
149
# tags: comma, separated, keywords
93
-
# tier: sm0l|ch0nky|frontier
94
-
# cmds: b00t hive activate inference-qwen3, b00t hive status
150
+
# tier: sm0l | standard | advanced
95
151
# complexity: 1-10
96
152
```
97
153
154
+
The `TomllmRegistry` can scan a directory of `.tomllm` files, extract only their tail-maps, and return a sorted/filtered index — useful for capability discovery, configuration routing, or context assembly.
155
+
156
+
---
157
+
158
+
## Motivation
159
+
160
+
This library was extracted from internal tooling at [PromptExecution](https://github.com/PromptExecution) where configuration files are read by both human engineers and LLM agents. The annotation convention emerged from a practical need: agents need context that pipelines don't, and maintaining two versions of every config file is unsustainable.
0 commit comments