diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index bfcb1d9..26eccc2 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -606,3 +606,4 @@ rules: ## 2026-10-12 - /code-clean whole repo on chore/code-clean (gitflow start, pushed). Plan r1→r3: 3 lenses + confirmation, C1 (gitflow-test.sh move) deferred ×2 lenses, B18 half false, C3 needed stderr oracle, errexit rule inverted. User approved all 14 non-deferred items. code-cleaner DONE: A1 import, B1-B4 lint/hook regex (sha identical), B5/B7/B9/B11 splits, B18-B20, C2 suite wired, C3 hoist. make test 47 green, shellcheck 0, verified independently. 1 bug logged (usage() 3-26 truncation). No commit. LRN-213/214/215, EVAL-046. Next (user: "capitalize all then correct bugs with what has been skipped"): usage() fix inline, C4/C5 via /refactor; C1 + B13-B17 left (blocked / no-change by design). - Follow-up (same branch, no commit): usage() bug fixed inline (`sed -n '3,/^# ====/p' | sed '$d'`, --help 36 lines, 14 tools). /refactor → refactorer: C4 `tool_kind`/`tool_source` single roster (exact-match loop, not the `*" $x "*` idiom: multi-word arg stayed unknown), `disable_*` split mirrors `enable_*`; C5 shared `gstack_skills/parked_names/park/unpark` in lib/gstack-removed.sh (already copied by all 5 fixtures; new sourced lib would break them). 496-run golden capture identical except `${name:?}` diagnostic line ref for an empty `gstack__` dir. Verified: make test 47 green, shellcheck 0. Left: C1 (T19 lock), B13-B17 (no change), `name` leak in enable_pack. Commit split suggested: cleanup / usage fix / C4-C5. +- Rust default-language rule (user ask). `rules/default-language.md` always-on (no `paths:`), CLAUDE.global.md at 317/320 → BDR-085 exception path. Hooks: interviewer FAILURE MODES row, init-project BDR table, project CLAUDE.md exception list. Branch chore/rust-default, doctrine-citers green. BDR-118 pending user approval. diff --git a/CLAUDE.md b/CLAUDE.md index c58878d..aa8577a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,7 +19,8 @@ start, same cost as the global memory. Extract from CLAUDE.global.md only what can be path-scoped (the token win) or what is generated; always-on doctrine stays in CLAUDE.global.md. Exception: a standalone user-authored rule set that would bust the 320-line density budget may live here WITHOUT -`paths:` (always-on load) — writing-style.md (BDR-085). `paths:` globs match against the +`paths:` (always-on load) — writing-style.md (BDR-085), default-language.md +(BDR-118). `paths:` globs match against the CURRENT project's tree — a broad glob (e.g. `rules/**`) can fire in foreign projects; keep rule bodies tiny. Docs: https://code.claude.com/docs/en/memory.md#path-specific-rules diff --git a/agents/interviewer.md b/agents/interviewer.md index b90a1f1..8a6fbd8 100644 --- a/agents/interviewer.md +++ b/agents/interviewer.md @@ -23,6 +23,7 @@ Gather context. Produce complete PROJECT BRIEF as single source of truth. | Answer vague/ambiguous | One targeted follow-up on that item only | Gap: record it in OPEN DECISIONS with the safest reading, marked `(assumed)` — never invent a confident value. Visible / public-name / scope item: one more targeted question instead, never `(assumed)` | | "I don't know / you decide" | Propose ONE concrete default + why, ask yes/no | Take the default, mark `(assumed)`, list in OPEN DECISIONS | | Contradictory answers (e.g. embedded runtime + managed cloud DB) | Name the contradiction, ask which side wins | Put BOTH options in OPEN DECISIONS; do not silently pick one | +| Language not stated (new project / from scratch / whole-project rewrite) | Propose Rust + why (`rules/default-language.md`); name the contraindication if another language fits better (browser frontend, mandated platform, missing ecosystem) | Rust, marked `(assumed)`, listed in OPEN DECISIONS | | Partial answer to the block | Re-ask ONLY the missing items in the follow-up round | Missing fields → `none stated` + OPEN DECISIONS entry | | Feature list balloons (>10) | Keep the 10 the user ranks first as V1 | Overflow goes to OUT OF SCOPE with a `(deferred by budget)` tag | diff --git a/rules/default-language.md b/rules/default-language.md new file mode 100644 index 0000000..9eb15fe --- /dev/null +++ b/rules/default-language.md @@ -0,0 +1,23 @@ +# Default language — Rust + +Scope: a new project, a project from scratch, or a whole-project +refactor or rewrite the user asks for. Not a module refactor or a feature +inside an existing codebase: that keeps the codebase's language. + +Rust is the default. Two candidates equal on features, security, +performance, reliability and ease of use or maintenance → Rust wins. +Where Rust can do the job, Rust does it. + +Another language needs a demonstrated gain on one of those axes, stated +at the choice: a browser frontend (TypeScript, Astro per the web rules), +a platform that mandates its language (Swift, Kotlin), an ecosystem Rust +lacks (ML research → Python), a throwaway script where Rust's build +cycle costs more than it returns. "Rust is slower to write" alone is not +a gain. + +At brainstorming (`/init-project`, `/ship-feature` STEP 1, `/refactor` +of a whole project): language not named → propose Rust, name the +contraindication if you pick something else. Never silently default to +Python, Node or Go. Mixed project: Rust for everything server-side, +CLI, systems and tooling; the exception stays scoped to the part that +earned it. diff --git a/skills/init-project/SKILL.md b/skills/init-project/SKILL.md index fba9456..842302e 100644 --- a/skills/init-project/SKILL.md +++ b/skills/init-project/SKILL.md @@ -277,9 +277,9 @@ Capture ONLY structuring decisions, not scaffold detail: | Capitalize — founding (BDR) | Skip — scaffold detail | |--------------------------------------------------------------|-----------------------------------| -| Stack / framework choice + why (Astro vs Next) | directory names, scaffolded files | +| Stack / language choice + why (Rust default, Astro vs Next) | directory names, scaffolded files | | Architecture pattern, data-flow shape | dev-tooling / formatter config | -| Doctrinal exclusions (public site = no SPA, API /v1 day one) | which template files were copied | +| Doctrinal exclusions (Rust default, no SPA, API /v1 day one) | which template files were copied | | Security defaults adopted; conventions binding future code | anything reversible / obvious | Source the candidates from: the PROJECT BRIEF (STEP 1), the DESIGN's resolved