Skip to content

Commit 90564fd

Browse files
committed
trim agent formatting guidance
1 parent 1a85379 commit 90564fd

10 files changed

Lines changed: 6 additions & 88 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Always read AGENTS.md before answering.
2-
After any code change, run or suggest running `./go format` to prevent CI failures from formatter checks.
1+
Always read AGENTS.md before answering

AGENTS.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,16 @@ See language-specific AGENTS.md for applicable logging usage
6666
This project does not follow semantic versioning (semver); before removing public functionality, mark it as deprecated with a message pointing to the alternative.
6767
See language-specific AGENTS.md for applicable deprecation usage
6868

69-
## Formatting
70-
After making code changes, always run (or instruct the user to run):
71-
```
72-
./go format
73-
```
74-
This invokes the Rake `:format` task, which:
75-
- Runs `buildifier` on all Bazel (`BUILD`, `*.bzl`, `WORKSPACE`) files — always, for every change
76-
- Runs `update_copyright` to add/refresh Apache license headers — always, for every change
77-
- Runs formatters for all bindings by default (pass `-<lang>` flags to skip specific ones, e.g. `-java`)
78-
79-
`./go format` auto-fixes files in place. After running it, check `git diff` to see if any files were
80-
modified — if so, those changes must be committed. CI runs `./go format` then fails if `git diff` is
81-
non-empty, so un-formatted code will fail CI.
82-
For stricter lint checks beyond formatting, use `./go lint`.
83-
8469
## General Guidelines
8570
- Comments should explain *why*, not *what* - prefer well-named methods over comments
8671
- PRs should focus on one thing; we squash PRs to default `trunk` branch
8772
- Prefer copying files to deleting and recreating to maintain git history
8873
- Avoid running `bazel clean --expunge`
89-
- Run or suggest running `./go format` before pushing to prevent CI failures
74+
- Formatting is a pre-push concern, not a post-edit one. If `./scripts/format.sh --pre-push` is already in the user's pre-push hook, leave it alone — the hook handles it. If not, run or suggest `./scripts/format.sh` before pushing to avoid CI formatter failures, and recommend adding the hook (once):
75+
```bash
76+
#!/usr/bin/env bash
77+
./scripts/format.sh --pre-push
78+
```
9079

9180
## High risk changes (request verification before modifying unless explicitly instructed)
9281
- Everything referenced above as high risk

CLAUDE.local.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
@.local/AGENTS.md
2-
3-
After any code change, run or suggest running `./go format` to prevent CI failures from formatter checks.

CLAUDE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
@AGENTS.md
2-
3-
After any code change, run or suggest running `./go format` to prevent CI failures from formatter checks.

dotnet/AGENTS.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,3 @@ Use XML documentation comments for public APIs:
4242
/// <returns>Description.</returns>
4343
/// <exception cref="ExceptionType">When condition.</exception>
4444
```
45-
46-
## Formatting
47-
C# files are formatted with **`dotnet format`** (style + whitespace).
48-
Run `./go format` after changes; it will auto-fix most violations.
49-
50-
Key rules enforced (from `dotnet/.editorconfig`):
51-
- **Namespaces**: file-scoped (`namespace Foo.Bar;` not block-wrapped)
52-
- **Using directives**: placed **outside** the namespace block; `System` namespaces sorted first
53-
- **Braces**: Allman style — opening brace on its own line for all blocks
54-
- **Spacing**: no space after cast, space after commas, space around binary operators
55-
- Remove unnecessary `using` directives (IDE0005 treated as warning)

java/AGENTS.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,3 @@ Use Javadoc for public APIs:
4343
* @throws ExceptionType when condition
4444
*/
4545
```
46-
47-
## Formatting
48-
Java files are formatted with **google-java-format** (Google Java Style Guide).
49-
Run `./go format` after changes; it will auto-fix all style issues.
50-
51-
Key rules enforced:
52-
- 2-space indentation (no tabs)
53-
- Column limit: 100 characters
54-
- Braces on the same line (K&R style), including single-statement bodies
55-
- Imports: organized and sorted consistently

javascript/selenium-webdriver/AGENTS.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,3 @@ Use JSDoc for public APIs:
4747
* @throws {ErrorType} when condition
4848
*/
4949
```
50-
51-
## Formatting
52-
53-
JavaScript files are formatted with **Prettier**.
54-
Run `./go format` after changes; it will auto-fix all style issues.
55-
56-
Active Prettier config (`.prettierrc`):
57-
58-
- `printWidth`: **120** characters
59-
- `singleQuote`: **true** (use `'` not `"`)
60-
- `semi`: **false** (no semicolons)
61-
- `trailingComma`: **"all"** (trailing commas everywhere ES5+ allows)
62-
- `endOfLine`: **"lf"** (Unix line endings only)

py/AGENTS.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,3 @@ def method(param: str) -> bool:
9090
ValueError: When condition.
9191
"""
9292
```
93-
94-
## Formatting
95-
96-
Python files are formatted with **ruff format** and checked with **ruff check**.
97-
Run `./go format` after changes; it will auto-fix formatting. Then check `git diff` to see what changed.
98-
Run `./go lint` to also run linting (stricter).
99-
100-
Key rules enforced (from `py/pyproject.toml`):
101-
- Line length: **120 characters**
102-
- Target version: Python 3.10+
103-
- Ruff lint rules active: `D, E, F, I, PT, UP, RUF, TID252`
104-
- `I` = import ordering (imports must be sorted; `isort`-compatible)
105-
- `UP` = use modern Python idioms (e.g. `X | None` instead of `Optional[X]`)
106-
- `E/F` = pycodestyle / pyflakes errors (unused imports, undefined names, etc.)

rb/AGENTS.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,3 @@ Use YARD for public APIs:
4949
# @return [Type] description
5050
# @raise [ErrorClass] when condition
5151
```
52-
53-
## Formatting
54-
Ruby files are formatted with **RuboCop** (target Ruby 3.2).
55-
Run `./go format` after changes; it will auto-fix most violations (`-a` flag).
56-
57-
Key rules enforced (from `rb/.rubocop.yml`):
58-
- No spaces inside hash literal braces: `{key: val}` not `{ key: val }`
59-
- Line length limit applies (comments excluded); keep lines reasonably short
60-
- RuboCop plugins active: `rubocop-performance`, `rubocop-rake`, `rubocop-rspec`
61-
- Any violation at `Fatal` severity (`--fail-level F`) blocks CI

rust/AGENTS.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,3 @@ Use doc comments for public APIs:
4141
/// # Errors
4242
/// Returns `ErrorType` when condition.
4343
```
44-
45-
## Formatting
46-
Rust files are formatted with **rustfmt** (standard Rust formatting, no custom config).
47-
Run `./go format` after changes; it will auto-fix all style issues.
48-
49-
Key rules enforced:
50-
- Standard Rust style (rustfmt defaults): 4-space indentation, 100-char line length
51-
- `use` statements grouped and sorted per standard conventions

0 commit comments

Comments
 (0)