feat: lean default install for Claude Code and Codex with safe installer

Adds a marked global rules block, project AGENTS.md/CLAUDE.md template, an on-demand
lean-review skill, a dry-run-first stdlib installer with backups, and tests using temp
homes. README quick start no longer moves ~/.claude; legacy library stays opt-in.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
J-BlandandClaude Sonnet 5.5 committed 2026-09-30 13:43:26 -04:00
1 parent 7ec467451b
commit d45d4bec97
10 files changed
+552 -14

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
## Working rules (lean-scaffold)
- Verify before claiming done: run the project's tests, linter and type check, and report the actual result. If a check cannot run, say so.
- Write or update a failing test first for behaviour changes and bug fixes; fix root causes rather than suppressing errors.
- Explore and plan before multi-file or unclear changes; do trivial fixes directly.
- Keep diffs scoped to the request. Report unrelated problems you notice instead of silently widening the change.
- Never hardcode or print secrets, tokens or endpoints. Never commit `.env` files.
- Do not push, force-push, merge, deploy, or delete data unless asked. Show destructive or outward-facing commands before running them.
- Back up a file before overwriting config or credentials; never edit auth files.
- Load skills and long docs on demand; do not recursively spawn agents or loop reviews.
+18
View File
@@ -0,0 +1,18 @@
# Project instructions
Shared by Claude Code (via `CLAUDE.md`) and Codex. Keep this file short: add a line only if removing it would cause a mistake.
## Commands
- Test: `TODO`
- Lint/format: `TODO`
- Type check: `TODO`
## Rules
- Run the commands above after each change; report real output, not assumptions.
- Behaviour changes and bug fixes start with a failing test.
- Before reporting a defect in existing code, check callers and guards that could already prevent it; report only with a concrete failing input.
- Before finishing, review your own diff once; use the `lean-review` skill for a consolidated review.
- Use security review only for auth, secrets, input parsing, or dependency changes.
- Layer detail in nested `AGENTS.md` / docs and link to it; do not inline it here.
+1
View File
@@ -0,0 +1 @@
@AGENTS.md
+18
View File
@@ -0,0 +1,18 @@
---
name: lean-review
description: One consolidated, evidence-based review of the current diff (correctness, failure handling, tests, security only when warranted). Use on demand before finishing or opening a PR.
disable-model-invocation: true
allowed-tools: Read, Grep, Glob, Bash(git diff:*), Bash(git status:*), Bash(git log:*)
---
# Lean diff review
Read-only. Review `git diff` against the base branch (or the target the user names) once, in a single pass. Do not spawn other agents.
1. Run the project's tests/lint/type check if not already run; note results.
2. For each suspicion, it is only a candidate. Try to refute it: read callers, look for existing guards, confirm the path is reachable.
3. Report only candidates you could not refute, each with: file:line, a concrete failing input or state, and the wrong result. Drop refuted ones; list unresolved ones separately with what you checked.
4. Check: wrong value captured or boundary arithmetic; failures swallowed or missing timeouts on external calls; tests that pass without exercising the change; new behaviour without a test.
5. Add a security section only if the diff touches auth, secrets, input parsing, or dependencies.
Output at most 10 findings, worst first, then a one-line verdict. No style nits.