en un clic
en un clic
Default response behavior for AI coding agents: professional, factual, neutral tone with calibrated critical evaluation. Baseline for every task — implementation, code review, debugging, planning, research, evaluation, Q&A.
Design and review guidelines for this SDL3 Pong codebase: frame-loop constraints, testable layering, and design patterns. Use when designing new features, populating the ISSUES.md, implementing a task, reviewing a diff or branch, or when the user asks for an architecture or standards check.
Repository layout and naming conventions. Use to find or place files.
Standard end-to-end workflow for working on a task in this repository: branch naming, implement + tests + style, self-review, commit, `docs/ISSUES.md` cleanup, push the branch, and open a PR with `gh`. Use when starting work on an entry from `docs/ISSUES.md` (or, when one is filed, a GitHub issue).
Run the unit-test suite. Use to run, filter, or disable tests.
Build the project. Use to build, compile, test, or run the project.
| name | format |
| description | Format and verify C/C++ source style with clang-format. |
.clang-format at the repository root is the source of truth for C++ formatting (Allman braces, 4-space indent, 120-column limit, based on LLVM). .editorconfig covers editor-level settings (indent style, line endings, charset, final newline).
Do not invent formatting choices; let clang-format arbitrate.
ColumnLimit: 120 applies to code and comments. LLVM's default ReflowComments: Always is in effect, so clang-format -i will reflow // and /* */ comment lines toward that limit when it can.
When writing or editing comments by hand, wrap prose to the same 120-column limit as code — do not use a narrower ~72-column habit. Account for leading indentation and the // prefix (e.g. four spaces + // leaves ~113 characters of text on a typical indented line in a .cpp function body).
"Short comment" in repo-conventions means few words and no noise, not artificially narrow lines.
Two shapes are allowed, picked by line length:
All on one line, when the call or declaration fits inside ColumnLimit: 120:
SDL_FRect ball(int playfieldWidth, int playfieldHeight, float ballHalfSize);
One per line, aligned after the open paren, as soon as the one-line form would overflow:
SDL_FRect leftPaddle(int playfieldWidth,
int playfieldHeight,
float paddleHalfWidth,
float paddleHalfHeight,
float wallInset);
The intermediate "pack as many as fit, wrap the rest" shape (LLVM's default BinPackParameters: true) is deliberately rejected: the resulting ragged wrap is harder to scan in a diff and shifts every continuation line whenever an argument is added or renamed. The "all arguments on the next line as a block" fallback is also disabled, so these are the only two shapes clang-format produces.
This is enforced by .clang-format via BinPackArguments: false, BinPackParameters: false, AllowAllArgumentsOnNextLine: false, AllowAllParametersOfDeclarationOnNextLine: false. Do not hand-format wrapped argument lists; let the formatter pick the shape from those four switches.
clang-format -i src/main.cpp tests/*.cpp
The tool walks up from each file looking for a .clang-format, so running it from anywhere inside the repository will pick up the right config.
clang-format --dry-run --Werror src/main.cpp tests/*.cpp
Exit code 0 means clean. Any non-zero exit is a real diff that CI will reject.
The formatter targets C/C++ source under src/ and tests/. As more files are added (e.g. src/<TypeName>.{h,cpp}, tests/<TypeName>Test.cpp), include them in the same command.
.clang-format is the source of truth. Change the file, not individual sources, when adjusting style.clang-format -i before committing C++ changes; CI runs the dry-run check on every push and pull request and will fail on any unformatted hunk.--style=... on the command line; the repository's .clang-format must always win..editorconfig; respect both files together.