aboutsummaryrefslogtreecommitdiff
path: root/languages/default-CLAUDE.md
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-23 21:00:11 -0400
committerCraig Jennings <c@cjennings.net>2026-06-23 21:00:11 -0400
commit71db71b9d47ffbeaf1d1c859fa3e3bebb7b2ea29 (patch)
tree3fc7536bc7612bfa095fe137de9497e36c7bca12 /languages/default-CLAUDE.md
parent603abc4cb3129be8bd23c89aa69f4f5522d1e5a3 (diff)
downloadrulesets-71db71b9d47ffbeaf1d1c859fa3e3bebb7b2ea29.tar.gz
rulesets-71db71b9d47ffbeaf1d1c859fa3e3bebb7b2ea29.zip
feat(install-lang): seed a neutral CLAUDE.md when a bundle ships none
install-lang only seeded CLAUDE.md if the chosen bundle shipped one. elisp and go do, python and typescript don't. A project installing a template-less bundle got no CLAUDE.md, and a multi-bundle install inherited whichever bundle shipped one. A bash project that installed elisp and python ended up headed "Elisp project," worse than no header. I added a language-neutral default (languages/default-CLAUDE.md) that names no language, so single-language, multi-bundle, and wrong-bundle installs all get an accurate "fill this in" header instead of a false one. Per-bundle templates still win where present. The seed-on-first-install, no-overwrite logic is unchanged. I hardened the Makefile LANGUAGES glob to directories only so the new template file doesn't show up as a selectable language. lint covers the default. The install-lang tests cover the fallback, the bundle-wins branch, and no-overwrite. A bash bundle is still the real gap for shell-heavy projects, filed as a backlog task.
Diffstat (limited to 'languages/default-CLAUDE.md')
-rw-r--r--languages/default-CLAUDE.md64
1 files changed, 64 insertions, 0 deletions
diff --git a/languages/default-CLAUDE.md b/languages/default-CLAUDE.md
new file mode 100644
index 0000000..a5b6925
--- /dev/null
+++ b/languages/default-CLAUDE.md
@@ -0,0 +1,64 @@
+# CLAUDE.md
+
+## Project
+
+Describe this project: what it is, its layout, and its conventions. This
+default was seeded by `install-lang` because the installed bundle ships no
+language-specific CLAUDE.md — it deliberately names no language, so replace
+this section with an accurate description rather than inheriting a wrong one.
+
+**Typical layout (edit to match):**
+- entry points — the file(s) that run first
+- source directories — where the real code lives
+- tests — beside the code, or under a `tests/` tree
+
+## Build & Test Commands
+
+If the project has a Makefile, document its targets here. A common shape:
+
+```bash
+make test # run the test suite
+make lint # run the linter / formatter check
+make build # build the project
+```
+
+Otherwise, document the direct commands a contributor runs to test and build.
+
+## Language Rules
+
+Shared rules live in `.claude/rules/` (installed from `claude-rules/`):
+- `commits.md` — author identity, no AI attribution, message format
+- `testing.md` — TDD discipline and test-quality standards
+- `verification.md` — verify-before-claim-done discipline
+
+If a language bundle was installed, its own rule files (code style, testing
+conventions) sit alongside these in `.claude/rules/`.
+
+## Git Workflow
+
+Commit conventions: see `.claude/rules/commits.md`.
+
+If a `githooks/` pre-commit hook was installed, activate it on a fresh clone
+with `git config core.hooksPath githooks`.
+
+## Problem-Solving Approach
+
+Investigate before fixing. When diagnosing a bug:
+1. Read the relevant code and trace what actually happens
+2. Identify the root cause, not a surface symptom
+3. Write a failing test that captures the correct behavior
+4. Fix, then re-run tests
+
+## Testing Discipline
+
+TDD is the default: write a failing test before any implementation. If you
+can't write the test, you don't yet understand the change. Details in
+`.claude/rules/testing.md`.
+
+## What Not to Do
+
+- Don't add features beyond what was asked
+- Don't refactor surrounding code when fixing a bug
+- Don't add comments to code you didn't change
+- Don't create abstractions for one-time operations
+- Don't commit credentials or API keys