Skip to content

chore(docs): sync v0.11.6 batch into SPEC + SKILL.md#337

Merged
danieljohnmorris merged 6 commits into
mainfrom
chore/v0116-doc-sync
May 17, 2026
Merged

chore(docs): sync v0.11.6 batch into SPEC + SKILL.md#337
danieljohnmorris merged 6 commits into
mainfrom
chore/v0116-doc-sync

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

@danieljohnmorris danieljohnmorris commented May 17, 2026

Summary

Doc-sync PR closing the gaps surfaced by the v0.11.6 PR completeness audit. Six items landed in the parser / CLI / runtime but the SPEC and SKILL.md descriptions still reflected pre-v0.11.6 behaviour. No code changes; SPEC.md is the source of truth and build.rs regenerates ai.txt + the SKILL.md spec mirror from it.

What's in the diff

One focused commit per item, plus a final regen commit:

  1. docs: note ILO-P021 double-minus prefix-binop trap in SPEC + SKILL.md (fix: reject double-minus prefix-binop trap (ILO-P021) #331)
  2. docs: prefix-binop operands now expand known-arity calls (fix: prefix-binop operand expands known-arity calls #332)
    • Updates the Operands section: prefix-binop slots now accept known-arity calls, not just atoms. wh >len q 0{...} parses as intended. Reframes the bind-first rule as the fallback for shadow / arity cases.
  3. docs: document bare-bool prefix ternary shape `?h a b` (parser: bare-bool prefix ternary ?h a b #330)
    • Adds the third ternary shape next to the brace form ?h{a}{b} and the eq-prefix ?=h true a b, with the 6/8/12-char rationale and a note on how the match/ternary disambiguator routes each variant.
  4. docs: Cranelift JIT runtime errors now carry source spans (Thread source spans through Cranelift JIT runtime-error helpers #335)
    • Notes label parity with tree/VM in the Error output formats section, with the helper list and the pre-v0.11.6 empty-labels symptom.
  5. docs: CLI auto-picks main on engine flags + subcommand dispatch rules (cli: hyphenated subcommands + non-ident positionals route to main (#320 follow-up) #328, cli: auto-pick main on --run-tree / --run-vm / --run-cranelift #329)
    • Engine flags --run-tree / --run-vm / --run-cranelift now auto-pick main on multi-fn files. Hyphenated idents like list-orders route to a subcommand fn; non-ident shapes (paths, sigils, numbers) route to main as positional args. SKILL.md Running block refreshed with worked examples.
  6. build: regenerate ai.txt and SKILL.md spec mirror
    • Pure build.rs output catching the preceding SPEC edits.

Test plan

  • cargo test --release --features cranelift --test skill_md passes (9/9).
  • cargo build --release --features cranelift after each SPEC edit confirms ai.txt + SKILL.md mirror stay consistent (so the CI git diff --exit-code ai.txt check will be clean).
  • Spot-checked the regenerated ai.txt: ILO-P021, bare-bool prefix ternary, prefix-binop call expansion, Cranelift labels, auto-pick-main, and subcommand dispatch all present.
  • CI green.

Follow-ups

None planned. If a future feature adds a stable error-codes registry section to SPEC.md, the ILO-P021 note could move there from the Cross-language gotchas table.

Adds a row to the Cross-language gotchas table linking to ILO-P021
with the canonical fix (negate the sum: `- 0 +*a b *c d`), plus a
short prose note explaining why the trap is silent without the
diagnostic. Mirror in SKILL.md as gotcha #13. Spec source for the
v0.11.6 batch.
#332 widened parse_prefix_binop to dispatch to call parsing when the
ident at the operand cursor is a known-arity fn or builtin and the
next token can start another operand. Update the Operands section to
match: `wh >len q 0{body}` now parses as expected instead of
tripping ILO-P003, and the bind-first guidance is reframed as the
fallback for shadow/arity cases, not the always-rule. Parallels the
prefix-?? widening from #310.
#330 sugared `?h a b` (bool subject, no leading comparison op, no
braces) to ternary parsing. The brace form `?h{a}{b}` and the
comparison-led prefix form `?=h true a b` were already documented;
fill in the third shape next to them with the rationale (6 chars for
`?h 1 0` vs 8 for braces / 12 for the eq-prefix form) and a note on
how the match/ternary disambiguator routes each variant.
#335 threaded span_bits through 12 JIT runtime-error helpers so the
`labels` array in JSON diagnostics is populated for the same shapes
that tree and VM already covered. Note the parity in the Error
output formats section, with the helper list and the pre-v0.11.6
empty-labels symptom to help agents notice stale binaries.
Two CLI changes from the v0.11.6 batch:
 - #329: `--run-tree` / `--run-vm` / `--run-cranelift` now auto-pick
   `main` on multi-fn files, matching the default engine. The pre-
   v0.11.6 behaviour of picking the first declared fn surfaced as
   three different symptoms (misleading arity error, silent nil,
   bare 'compilation failed' string).
 - #328: looks_like_subcommand_name accepts hyphenated idents per the
   SPEC `[a-z][a-z0-9]*(-[a-z0-9]+)*` shape, so `list-orders` reads
   as a subcommand. Non-ident shapes (`/tmp/data.json`, numbers,
   trailing/doubled dashes) still route to main as positional args.

Spec out both rules in the CLI invocation section and refresh the
SKILL.md Running block with worked examples.
Picks up the v0.11.6 doc-sync edits in the preceding commits. Pure
build.rs output; no manual changes.
@danieljohnmorris danieljohnmorris merged commit e0f8209 into main May 17, 2026
4 checks passed
@danieljohnmorris danieljohnmorris deleted the chore/v0116-doc-sync branch May 17, 2026 09:44
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 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 added a commit that referenced this pull request May 17, 2026
fifteen fixes since 0.11.5, all from rerun5/rerun6 personas plus standing asks: ListView foundation (#334), window-text-perf reshape via ListView (#336), inner-flt predicate inlining (#340), double-minus trap ILO-P021 (#331), bare-ident bang silent-nil regression (#324), Cranelift JIT span plumbing (#335), bool-prefix ternary (#330), wh prefix-cond reparse (#332), --run-engine auto-pick main (#329), subcommand helper hyphens+non-ident (#328), runtime error spans (#335), persona-diagnostic batch 3 (#327), rgxall1+ct (#333), single-line body diagnostic (#322 carry), lambda type-var defensive test (#326), N-deep prefix arity error (#339), prefix-minus span column drift (#338), doc-sync (#337).
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