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:
@@ -4,7 +4,7 @@
|
||||
//! [`ailang_core::ast::Module`] values. The JSON-AST in `ailang-core`
|
||||
//! remains the canonical, hashable, content-addressed source of truth;
|
||||
//! form (A) is the AI-authoring projection optimised for token-efficient
|
||||
//! production by LLMs (see `design/contracts/authoring-surface.md`).
|
||||
//! production by LLMs (see `design/contracts/0001-authoring-surface.md`).
|
||||
//!
|
||||
//! ## Modules
|
||||
//!
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
//! ```
|
||||
//!
|
||||
//! Notes on the form (the binding constraints are in
|
||||
//! design/contracts/authoring-surface.md):
|
||||
//! design/contracts/0001-authoring-surface.md):
|
||||
//!
|
||||
//! - The `lam` form carries `param-types`, a `ret` type, and an
|
||||
//! optional `effects` clause. The AST stores them per-lambda and
|
||||
|
||||
@@ -125,7 +125,7 @@ fn write_type_def(out: &mut String, td: &TypeDef, level: usize) {
|
||||
}
|
||||
// `(drop-iterative)` annotation. Printed last (after
|
||||
// every ctor) so the canonical form lands consistent with the
|
||||
// design/contracts/data-model.md example. Omitted when `drop_iterative == false`.
|
||||
// design/contracts/0002-data-model.md example. Omitted when `drop_iterative == false`.
|
||||
if td.drop_iterative {
|
||||
out.push('\n');
|
||||
indent(out, level + 1);
|
||||
|
||||
Reference in New Issue
Block a user