Skip to content

docs: SPEC drift fix for v0.11.2 + load-bearing SKILL.md#290

Merged
danieljohnmorris merged 2 commits into
mainfrom
docs/spec-drift-post-262
May 16, 2026
Merged

docs: SPEC drift fix for v0.11.2 + load-bearing SKILL.md#290
danieljohnmorris merged 2 commits into
mainfrom
docs/spec-drift-post-262

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

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

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.txt but never embedded it. That meant every SPEC update silently bypassed the skill surface unless the agent also cat'd ai.txt, which most don't. build.rs now injects ai.txt between <!-- BEGIN AI-SPEC --> markers so the skill stays in step with SPEC.md on every cargo 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, and ilo compile.

Repro

Before this PR:

$ grep -c "negative indices" SPEC.md ai.txt skills/ilo/SKILL.md
SPEC.md:0
ai.txt:0
skills/ilo/SKILL.md:0

After:

$ grep -c "negative indices" SPEC.md ai.txt skills/ilo/SKILL.md
SPEC.md:2
ai.txt:2
skills/ilo/SKILL.md:2

Test plan

  • cargo build --release --features cranelift clean - ai.txt regenerates from SPEC.md, SKILL.md mirrors ai.txt between markers
  • cargo test --release --features cranelift - full suite green (2992 lib tests + every integration crate)
  • cargo fmt --check clean
  • Manual verification: SKILL.md now contains the canonical builtin table inline, so agents loading the skill see all 90+ builtins without needing to run ilo help ai
  • All four shipped behaviours (negative indices, typed map keys, HOF cross-engine, AOT wrapper symmetry) are reflected in both SPEC.md and the regenerated ai.txt + SKILL.md

Skipped on purpose

Follow-ups

  • ilo-site (the Astro repo at /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.

- 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.
@danieljohnmorris danieljohnmorris force-pushed the docs/spec-drift-post-262 branch from 8fe8bc0 to e61874c Compare May 15, 2026 23:39
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danieljohnmorris danieljohnmorris merged commit e1973e6 into main May 16, 2026
5 checks passed
@danieljohnmorris danieljohnmorris deleted the docs/spec-drift-post-262 branch May 16, 2026 09:51
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant