|
| 1 | +<!-- airc v0.3.0 — managed file, do not edit --> |
| 2 | +<!-- Local override: CLAUDE.local.md. Per-repo override: below the @imports in CLAUDE.md. Permanent override: PR to https://github.com/ardenthq/airc --> |
| 3 | + |
| 4 | +# Baseline |
| 5 | + |
| 6 | +Shared rules for every repo. Apply to any stack. |
| 7 | + |
| 8 | +## Commits |
| 9 | + |
| 10 | +- Format: [Conventional Commits](https://www.conventionalcommits.org) — `feat:`, `fix:`, `chore:`, `style:`, `refactor:`, `test:`, `docs:` |
| 11 | +- Subject line only, ideally under 50 characters |
| 12 | +- Human, direct tone. Avoid formal or robotic voice ("this commit introduces…", "this change implements…") |
| 13 | +- **Never** add `Co-Authored-By` or any mention of Claude / AI / agents |
| 14 | +- **Never** add a description or body — subject only |
| 15 | +- Commit incrementally when a logical chunk lands — don't batch everything at the end |
| 16 | +- Examples: `feat: scaffold composer package`, `fix: stack detection for inertia` |
| 17 | + |
| 18 | +## Pull Requests |
| 19 | + |
| 20 | +- Always draft (`gh pr create --draft`) |
| 21 | +- Base branch: the repo's default |
| 22 | +- If the repo has a `.github/PULL_REQUEST_TEMPLATE.md`, fill it in as the PR body and check off the items that apply. `gh pr create` ignores the template unless you pass it yourself — write the filled body to a file and use `--body-file` |
| 23 | +- **Never** reference Claude / AI / agents in title, body, branch name, or comments |
| 24 | + |
| 25 | +## Pre-push checks |
| 26 | + |
| 27 | +Standard order before pushing: |
| 28 | + |
| 29 | +1. Formatter → 2. Linter → 3. Static analysis → 4. Tests |
| 30 | + |
| 31 | +Exact commands are repo-defined (see the repo's `CLAUDE.md` / `composer.json` / `package.json`). If the formatter modifies files, commit those changes before pushing so CI doesn't kick back automated `style:` cleanup commits. |
| 32 | + |
| 33 | +**Mid-task (recommendation):** for long tasks, run only affected/new checks during the work; defer the full suite to the end. For short tasks, skip intermediate runs. Don't run checks repeatedly mid-work — once at completion is usually enough. |
| 34 | + |
| 35 | +## Security |
| 36 | + |
| 37 | +- Never commit `.env`, credentials, tokens, or any secret |
| 38 | +- Flag any new dependency as suspect before adding it (typosquatting, unknown maintainer, etc.) |
| 39 | +- No destructive operations (`force-push`, branch deletion, history rewrite, `git reset --hard`, `rm -rf`) without explicit confirmation from the dev |
| 40 | +- For external tools (CI, pastebins, gists): consider whether uploaded content could be sensitive — it may be cached or indexed even if later deleted |
| 41 | + |
| 42 | +## Code style |
| 43 | + |
| 44 | +- Follow existing patterns before introducing new ones |
| 45 | +- Reuse existing components/helpers before writing new ones |
| 46 | +- No comments unless explaining a non-obvious **why** (a hidden constraint, a subtle invariant, a workaround for a specific bug) |
| 47 | +- Well-named identifiers > a comment explaining the "what" |
| 48 | +- **Don't document changes in comments.** Comments describe the code as it is, not how it got there: |
| 49 | + - ❌ `// moved from backend to frontend` |
| 50 | + - ❌ `// renamed from foo to bar` |
| 51 | + - ❌ `// replaces the previous logic that used X` |
| 52 | + - ❌ `// added for issue #123` |
| 53 | + - ✅ omit the comment — git log / PR tells the story |
| 54 | +- Don't reference callers or temporal context: no `// used by X`, `// for the Y flow`, `// added in sprint Z` |
| 55 | + |
| 56 | +## Claude reply style |
| 57 | + |
| 58 | +- Concise. Skip the obvious. |
| 59 | +- End-of-turn summary: one or two sentences — what changed, what's next. |
| 60 | +- No long essays, no unnecessary disclaimers, no "sure, happy to help…" |
| 61 | + |
| 62 | +## Overrides |
| 63 | + |
| 64 | +- Personal override: create `CLAUDE.local.md` (gitignored) |
| 65 | +- Per-repo override: add rules below the `@imports` in this repo's `CLAUDE.md` |
| 66 | +- Permanent shared override: PR against the upstream guidelines repo |
0 commit comments