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.
This commit is contained in:
2026-05-28 13:31:31 +02:00
parent 7b8596cef0
commit 832375f2ac
227 changed files with 785 additions and 751 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
# auto-absorb this nested package. This is cargo's documented
# mechanism for a deliberately workspace-excluded crate and keeps
# `ail-embed` out of the AILang dependency graph entirely
# (Invariant 1, docs/specs/2026-05-19-embedding-abi-m5.md).
# (Invariant 1, docs/specs/0044-embedding-abi-m5.md).
[workspace]
[package]
+3 -3
View File
@@ -1,7 +1,7 @@
//! Lean embedding of an AILang M3-frozen staticlib kernel into a
//! Rust host. The Rust analogue of the audited C host
//! `crates/ail/tests/embed/tick_roundtrip.c`: same frozen value
//! layout (design/contracts/frozen-value-layout.md), same
//! layout (design/contracts/0006-frozen-value-layout.md), same
//! `own`-mode contract. ZERO `data_server`/finance knowledge.
use std::ffi::c_void;
@@ -32,7 +32,7 @@ impl Ctx {
Self(unsafe { ailang_ctx_new() })
}
/// `State` box, frozen layout (design/contracts/frozen-value-layout.md):
/// `State` box, frozen layout (design/contracts/0006-frozen-value-layout.md):
/// payload `8 + 2*8` = 24 bytes — tag:i64@0, acc:f64@8, n:i64@16.
/// `ailang_rc_alloc` sets the `p-8` rc header to 1 and zeroes the
/// payload, so the tag write of 0 is the single-ctor tag.
@@ -88,7 +88,7 @@ impl Kernel {
}
/// Folds `prices` via the kernel and returns `(Σ px, count)`.
/// `own` discipline (design/contracts/frozen-value-layout.md): each `Tick` is freshly
/// `own` discipline (design/contracts/0006-frozen-value-layout.md): each `Tick` is freshly
/// `ailang_rc_alloc`'d and consumed by the kernel; `st` is
/// consumed and replaced by the return each step; only the final
/// return is host-`dec`'d.