Files
AILang/examples/fieldtest/floats_4_float_to_str_reach.ail
T
Brummel 832375f2ac convention: counter-prefix file naming across docs/specs/, docs/plans/, design/contracts/, design/models/
All 176 files in the four accumulating directories now use a
zero-padded 4-digit counter prefix that reflects creation order
(`NNNN-slug.md`). The counter is assigned per directory in strict
git-log creation order; ties broken alphabetically by original name.
The old `YYYY-MM-DD-` prefix on docs/specs/ and docs/plans/ files is
dropped — the date is recoverable from git log and the counter
carries the ordering.

A file's counter is stable for the life of the file: never reassigned,
never reused, never compacted. Deleted files retire their counter;
subsequent files do not fill the gap. This is the property that lets
cross-references stay literal — refs use the full filename including
the counter (`design/contracts/0007-honesty-rule.md`) so they grep
cleanly and resolve directly without a glob step.

313 cross-references updated across .md/.rs/.toml/.c/.json files
(test pins, include_str! paths, design-INDEX entries, baseline notes,
runtime C comments, inter-contract markdown links incl. bare basename
and `../models/foo.md` forms).

CLAUDE.md gets a new "File-naming convention" section spelling out
the rule and rationale. skills/brainstorm/SKILL.md and
skills/planner/SKILL.md updated so new spec/plan creation produces
counter-prefixed names from the start.

The full test suite (cargo test --workspace) passes.
2026-05-28 13:31:31 +02:00

27 lines
1.1 KiB
Plaintext

; Fieldtest — Floats milestone, axis 4: reach for float_to_str.
;
; Natural task: build a label like "result = <float>" by concatenating
; a Str prefix with the float's text. The LLM-author who looks at
; `ail builtins` sees `float_to_str : (Float) -> Str`, reaches for it,
; and gets a codegen-deferred error per design/contracts/0005-float-semantics.md:
;
; `float_to_str` (Float → Str) is type-installed but codegen-
; deferred to a follow-up milestone: ... Calling it typechecks but
; produces a structured `CodegenError::Internal`.
;
; This fixture pins the reach-and-bounce. Expected: `ail check`
; succeeds; `ail build` fails with a clear, structured codegen error
; that names `float_to_str` and points at the missing runtime path.
;
; (No string-concat builtin exists either; we just print the result of
; float_to_str directly via io/print_str. The first failure point is
; codegen, before any concat would be needed.)
(module floats_4_float_to_str_reach
(fn main
(type (fn-type (params) (ret (con Unit)) (effects IO)))
(params)
(body
(do io/print_str (app float_to_str 3.14)))))