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:
@@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! Property protected: calling `print` on a function type fires the
|
||||
//! `no-instance` diagnostic with a Show-aware message that
|
||||
//! cross-references design/contracts/typeclasses.md, so the
|
||||
//! cross-references design/contracts/0013-typeclasses.md, so the
|
||||
//! LLM author immediately learns which types ship with built-in Show
|
||||
//! and how to declare their own instance for a user type.
|
||||
|
||||
@@ -40,11 +40,11 @@ fn print_on_fn_type_fires_show_aware_no_instance() {
|
||||
no_inst.message
|
||||
);
|
||||
|
||||
// Must cross-reference design/contracts/typeclasses.md — that's
|
||||
// Must cross-reference design/contracts/0013-typeclasses.md — that's
|
||||
// the canonical contract naming which types ship with Show.
|
||||
assert!(
|
||||
no_inst.message.contains("design/contracts/typeclasses.md"),
|
||||
"expected design/contracts/typeclasses.md cross-reference, got message: {:?}",
|
||||
no_inst.message.contains("design/contracts/0013-typeclasses.md"),
|
||||
"expected design/contracts/0013-typeclasses.md cross-reference, got message: {:?}",
|
||||
no_inst.message
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user