docs: SPEC drift fix for v0.11.2 + load-bearing SKILL.md#290
Merged
Conversation
4 tasks
- slc / take / drop accept negative indices counting from end (bounds clamp), matching at xs i. Closes the quant-trader fencepost and the slc xs -np 1 np ergonomics gap (#266). - Map keys are typed: text or integer. mset m 7 v and mget m 7 work directly, no str conversion. Int(1) and Text("1") are distinct. Float keys floor to i64; jdmp stringifies numeric keys for JSON (#267). - Add map / flt / fld to the builtin reference. All HOFs (map, flt, fld, srt, grp, uniqby, partition, flatmap) now work cross-engine on tree, VM, Cranelift JIT, and AOT (#274 #277 #278 #279 #280 #283). - New Inline lambdas subsection: Phase 1 literals are cross-engine, Phase 2 closure capture is tree-only with automatic fallthrough surfacing ILO-R012 on VM and Cranelift (#265 #284). - AOT-compiled binaries from ilo compile now strip the top-level ~/^ wrapper byte-for-byte the same as in-process runners (#281).
…ays load-bearing SKILL.md is what Claude Code agents actually load into context when they invoke the ilo skill. Until now it referenced ai.txt but never embedded it, so SPEC drift silently drained into the skill surface whenever a new builtin or section landed. The fix is to make build.rs inject the canonical ai.txt content into SKILL.md between marker comments, the same loop that already keeps ai.txt in step with SPEC.md. Also refresh the human-authored summary at the top of SKILL.md to mention !!, inline lambdas, numeric map keys, negative indices, the top-level Ok-on-stdout contract, and ilo compile, so agents that only skim the prose still see the v0.11.2 surface.
8fe8bc0 to
e61874c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
7 tasks
danieljohnmorris
added a commit
that referenced
this pull request
May 16, 2026
SPEC.md gets a new "Cross-language gotchas" subsection under Identifier syntax, with a six-row table mapping each known slip (AND/OR/NOT, compound prefix, fn lambda, main:> sig, multi-line body, discarded braced-cond) to its canonical ilo form and the error code that surfaces. build.rs regenerates ai.txt from SPEC.md, so the same table lands in the compact spec. skills/ilo/SKILL.md gets six new entries appended to Common Mistakes, mirroring the SPEC table at the load-bearing summary level so an agent dumping the skill prompt gets the friction map before writing code. Site docs deliberately untouched: the in-flight doc-audit PR #290 already covers reference/error-codes.md and friends, and a parallel edit here would create avoidable merge conflict.
danieljohnmorris
added a commit
that referenced
this pull request
May 16, 2026
SPEC.md gets a new "Cross-language gotchas" subsection under Identifier syntax, with a six-row table mapping each known slip (AND/OR/NOT, compound prefix, fn lambda, main:> sig, multi-line body, discarded braced-cond) to its canonical ilo form and the error code that surfaces. build.rs regenerates ai.txt from SPEC.md, so the same table lands in the compact spec. skills/ilo/SKILL.md gets six new entries appended to Common Mistakes, mirroring the SPEC table at the load-bearing summary level so an agent dumping the skill prompt gets the friction map before writing code. Site docs deliberately untouched: the in-flight doc-audit PR #290 already covers reference/error-codes.md and friends, and a parallel edit here would create avoidable merge conflict.
danieljohnmorris
added a commit
that referenced
this pull request
May 16, 2026
SPEC.md gets a new "Cross-language gotchas" subsection under Identifier syntax, with a six-row table mapping each known slip (AND/OR/NOT, compound prefix, fn lambda, main:> sig, multi-line body, discarded braced-cond) to its canonical ilo form and the error code that surfaces. build.rs regenerates ai.txt from SPEC.md, so the same table lands in the compact spec. skills/ilo/SKILL.md gets six new entries appended to Common Mistakes, mirroring the SPEC table at the load-bearing summary level so an agent dumping the skill prompt gets the friction map before writing code. Site docs deliberately untouched: the in-flight doc-audit PR #290 already covers reference/error-codes.md and friends, and a parallel edit here would create avoidable merge conflict.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PRs #262 / #271 audited docs through v0.11.1. Since then #272 to #288 landed and SPEC.md fell behind. This PR catches the spec up to v0.11.2 and fixes the skill-surface drift trap that let SKILL.md fall behind every release.
Manifesto framing: when SPEC.md says one thing and the engine does another, every agent that hits the gap pays the retry tax. The skill surface is the cheapest place to fix this once and for everyone.
What's in the diff
Commit 1 - docs: refresh SPEC for v0.11.2 features
slc/take/dropdocument negative indices counting from end with clamp-on-overflow semantics (negative indices on slc / take / drop (parity with at) #266).torn),Int(1)andText("1")distinct, float keys floor to i64,jdmpstringifies numeric keys for JSON output (perf: typed MapKey enum removes routing-tsp str(j) tax on numeric maps #267).map,flt,fldadded to the builtin reference table. New note: all HOFs work cross-engine on tree / VM / Cranelift JIT / AOT post vm + cranelift: FnRef NaN-tag plumbing (PR 1 of HOF dispatch chain) #274 vm + cranelift: native map HOF dispatch (PR 2 of 4) #277 vm + cranelift: native flt + fld + flatmap HOF dispatch (PR 3a of 4) #278 vm/cranelift: lift grp + uniqby + srt-2arg + partition via tree-bridge (HOF dispatch PR 3b) #279 vm + cranelift: closure-bind HOF ctx forms via tree-bridge #280 vm + cranelift: dispatch FnRef-variable calls dynamically (HOF dispatch PR 3d) #283.### Inline lambdassubsection: Phase 1 literal-only is cross-engine, Phase 2 closure capture is tree-only withILO-R012automatic fallthrough on VM and Cranelift (Phase 2 inline lambdas: closure capture #265 HOF dispatch PR 4: lift inline lambdas Phase 1 to cross-engine #284).ilo compilenow strip the~/^wrapper byte-for-byte the same as in-process runners (fix(aot): strip top-level ~/^ wrappers in compiled binaries #281). The previous follow-up disclaimer goes away.Commit 2 - build: mirror ai.txt into skills/ilo/SKILL.md
SKILL.md is the file Claude Code agents actually load when they invoke the ilo skill. Until now it referenced
ai.txtbut never embedded it. That meant every SPEC update silently bypassed the skill surface unless the agent alsocat'dai.txt, which most don't.build.rsnow injects ai.txt between<!-- BEGIN AI-SPEC -->markers so the skill stays in step with SPEC.md on everycargo build. The human-authored summary at the top of SKILL.md is also refreshed to mention!!, inline lambdas, numeric map keys, negative indices, the top-level Ok-on-stdout contract, andilo compile.Repro
Before this PR:
After:
Test plan
cargo build --release --features craneliftclean - ai.txt regenerates from SPEC.md, SKILL.md mirrors ai.txt between markerscargo test --release --features cranelift- full suite green (2992 lib tests + every integration crate)cargo fmt --checkcleanilo help aiSkipped on purpose
OP_CALL_DYN/ FnRef NaN-tag plumbing - internal opcodes, not user-facing.Follow-ups
/Users/dan/code/ilo-lang/site) has its own user-facing copy that drifts on the same cadence. Auditing it is a separate PR in a separate repo.