docs: assess language review and propose diagnostic extensions
This commit is contained in:
1 parent
a9a0d63f27
commit
d901d5227b
7 files changed
+829
-3
No files matched your search
@@ -58,6 +58,8 @@ RFC 0011 crossed the 10 % warning line (its own estimate said "below 10 %"): fou
|
||||
|
||||
The `.aji` condition does not get the AIR bundle as its documentation. It gets a directory mounted at `/docs` with a small front door, and the agent reads the rest only when it needs it. That tests a second hypothesis: a model can work from a small reference and selective reading.
|
||||
|
||||
**Historical layout and approximate counts (Phase 4, before std).** The following table is not the current bundle inventory or size. Later per-RFC measurements below record subsequent growth; use `tools/agent_bundle_tokens.py --source` on the generated bundle for current per-file and group counts.
|
||||
|
||||
| Path | Contents | cl100k tokens |
|
||||
|---|---|---:|
|
||||
| `QUICK.md` | the Quick Reference, then a table of which file to open for what | ~5.0k (Phase 4: +0.6k for §7 graphs) |
|
||||
@@ -72,7 +74,7 @@ The `.aji` condition does not get the AIR bundle as its documentation. It gets a
|
||||
| `diagnostics/errors.md` | spec 15 §10, stable codes, repair loop, error-code registry | ~1.9k |
|
||||
| `air/reference.md` | the whole AIR bundle, for reading `aji lower` output only | ~35.7k |
|
||||
|
||||
Without `air/` it comes to about 26.8k tokens. The manifest is [`source-bundle.txt`](source-bundle.txt): the `bundle.txt` syntax, plus `> path` to start an output file and `@manifest` to include another bundle. Text that exists only for this bundle (navigation, implementation status) is in [`source-notes.md`](source-notes.md).
|
||||
At that historical point, without `air/` it came to about 26.8k tokens. The current manifest is [`source-bundle.txt`](source-bundle.txt): the `bundle.txt` syntax, plus `> path` to start an output file and `@manifest` to include another bundle. Text that exists only for this bundle (navigation, implementation status) is in [`source-notes.md`](source-notes.md).
|
||||
|
||||
```sh
|
||||
zig build agent-reference # also writes zig-out/agent/source/ and source-report.json
|
||||
@@ -83,7 +85,7 @@ The groups `quick_reference`, `source_docs` and `air_docs` come from the `doc_gr
|
||||
|
||||
## Quick Reference (`.aji`)
|
||||
|
||||
[`quick-reference.md`](quick-reference.md) is the front door of the Source Reference Bundle (`QUICK.md`). It targets 4–6k tokens (about 4.4k with the navigation table, cl100k), covers most programs, and is kept consistent with spec 15.
|
||||
[`quick-reference.md`](quick-reference.md) is the front door of the Source Reference Bundle (`QUICK.md`). The [plan](../plan/README.md) targets 5–8k tokens; the earlier 4–6k target and approximately 4.4k measurement are historical. It covers most programs and is kept consistent with spec 15. Current measurements are recorded below; the target is not a hard CI cap.
|
||||
|
||||
**Its examples are checked.** Every ```aji block must be an excerpt of a program in `tests/conformance/source/quickref/`. Comments and whitespace are ignored, and `…` matches any text. Those programs are conformance tests, so each example is part of a program that verifies and runs. `zig build test` and `zig build agent-reference` fail on an example that is not. The concurrency programs (§7) are PENDING until layers 7–8 exist.
|
||||
|
||||
@@ -135,4 +137,6 @@ RFC 0035 caller-buffer paths (cl100k, relative to buffered files): Quick Referen
|
||||
|
||||
RFC 0036 (Proposed), explicit source borrow returns (cl100k, relative to paths): Quick Reference 8,518 → 8,642 (+1.46%), other source docs 63,296 → 64,160 (+1.37%), full source excluding AIR 71,814 → 72,802 (+1.38%). language/ownership.md is 1,834 tokens; AIR remains 179,282 bytes / 51 sections. Existing `from`, ref/mut bindings and named returns reuse verifier/runtime primitives; frontend ancestry selects transferred lexical ends. No new keyword, AIR feature, verifier state or diagnostic. Cumulative full-source growth is +114.24%, justified in the proposed RFC without an empirical MCC claim. This measurement records the implementation for review, not owner adoption.
|
||||
|
||||
2026-10-07 review documentation follow-up: the historical layout is now labeled, Q-016 states the implemented reserved status, and Quick Reference explicitly excludes floating point. The last sentence adds 46 cl100k tokens: Quick Reference 8,642 → 8,688 (+0.53%), other source docs stay 64,160, full source 72,802 → 72,848 (+0.06%). o200k groups are 8,723 / 64,359 / 73,082; Qwen2.5 8,954 / 65,733 / 74,687. AIR stays 46,300 cl100k tokens / 179,282 bytes; library/std.md stays 26,454 cl100k tokens. The clarification reduces status ambiguity without adding language semantics. RFCs 0037/0038 are Proposed and outside the bundles; their normative integration growth is not measured yet.
|
||||
|
||||
RFC 0036 review fixes clarify reserved task borrow returns and known array bounds in unused generic signatures. These rules add 54 cl100k tokens: other source docs 64,160 → 64,214, full source 72,848 → 72,902 (+0.07%); Quick Reference stays 8,688. o200k groups are 8,723 / 64,413 / 73,136; Qwen2.5 8,954 / 65,794 / 74,748. language/ownership.md is 1,873 cl100k tokens; AIR and library/std.md stay unchanged. The additions make source rejection predictable without adding a semantic feature.
|
||||
@@ -41,6 +41,8 @@ effects [io.read, io.write]
|
||||
| `task<T>`, `sender<T>`, `receiver<T>`, `mutex<T>` | concurrency (§8) |
|
||||
| `io_error`, `alloc_error`, `cap_error` | built-in error enums |
|
||||
|
||||
`f32`/`f64` are reserved in AIR (`E0006`, `reserved_type`) and unavailable in `.aji` 0.1 (`E7002`); floating-point semantics remain Q-016.
|
||||
|
||||
**Linear** values (resources, `own`, `region`, `task`, endpoints, `mutex`) are consumed exactly once. Everything else that is a plain value is copyable.
|
||||
|
||||
## 3. Statements and expressions
|
||||
|
||||
Reference in new issue
Block a user