-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
initial draft of agent files #16038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
initial draft of agent files #16038
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
83f40d8
initial draft of agent files
ywwg 82f6a08
fix
ywwg a05a6ce
Merge remote-tracking branch 'origin/main' into owilliams/agent-files
ywwg 64604f5
Let's just do an agents file
ywwg 2b89148
AGENTS.md: tweaks
ywwg 1e07261
symlink to claude.md per best practices
ywwg f5ccbed
add contributing.md
ywwg 2f4a388
small agents file now
ywwg 245edde
address note
ywwg 711ac61
restore much of contributing.md
ywwg 218e3af
Update CONTRIBUTING.md
ywwg 6b05e72
Update CONTRIBUTING.md
ywwg 4c57eca
Update CONTRIBUTING.md
ywwg 8e23693
Merge remote-tracking branch 'origin/main' into owilliams/agent-files
ywwg 06995d9
remove CLAUDE.md in favor of just AGENTS.md
ywwg f5be944
Merge remote-tracking branch 'origin/owilliams/agent-files' into owil…
ywwg f72fb3e
markdown files: address notes
ywwg 062eabe
Update CONTRIBUTING.md
ywwg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # AGENTS.md — Mixxx Project Instructions | ||
|
|
||
| Mixxx is a free, open-source DJ application. C++17/Qt 6, JavaScript for | ||
| controller mappings, CMake build system. GPL v2+. | ||
|
|
||
| ## Build | ||
|
|
||
| ```bash | ||
| cd cbuild | ||
| cmake -DCMAKE_BUILD_TYPE=Debug -DDEBUG_ASSERTIONS_FATAL=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. | ||
| cmake --build . --parallel $(nproc) | ||
| ctest # run tests (Google Test) | ||
| ``` | ||
|
|
||
| ## Code Style | ||
|
|
||
| - **Formatting**: `.clang-format` (Google base, 4-space indent, 8-space continuation). Run `pre-commit` or `python tools/clang_format.py`. Only format new/modified code — never mass-reformat. | ||
| - **Separate formatting commits** from logic commits. | ||
| - **Pre-commit hooks** enforce clang-format, ESLint, codespell, markdownlint, gersemi, etc. Install with `pre-commit install && pre-commit install -t pre-push`. | ||
|
|
||
| ### C++ Conventions | ||
|
|
||
| - 4 spaces, never tabs. 100-col hard limit, 80-col soft limit. | ||
| - Classes: `CamelCase`. Methods: `camelBack()`. Members: `m_prefix`. Pointers: `pPrefix`. Constants: `kPascalCase`. Enums: `enum class CamelCase`. | ||
| - CO/setting keys: `snake_case`. | ||
| - K&R braces. Always braces on control flow bodies. | ||
|
ywwg marked this conversation as resolved.
Outdated
|
||
| - `#pragma once`, not include guards. | ||
| - Include order: matching header → system → Qt → library deps → Mixxx local → forward decls. Alphabetical within groups. | ||
| - No naked `new`/`delete` — use `std::make_unique`, `std::make_shared`, or `make_parented`. | ||
| - `VERIFY_OR_DEBUG_ASSERT(cond) { recovery; }` for defensive checks. | ||
| - `override` on all virtual overrides; omit redundant `virtual`. | ||
| - `QStringLiteral("...")` for string literals. | ||
| - tr("...") for strings that will need translation. | ||
| - No `goto`. No `Q_UNUSED` (use unnamed params instead). No C-style enums. | ||
| - `///` doc comments in headers. `// TODO(username)` or `// TODO(issue URL)` for TODOs. | ||
| - Wrap new code in `namespace mixxx {}`. Anonymous namespace for file-local helpers in .cpp. | ||
| - Non-const ref out-params: use pointers, not references (legacy convention). | ||
| - Lambdas: use carefully — they get extra review scrutiny for lifetime/control-flow issues. | ||
|
|
||
| ### JavaScript (Controller Mappings) | ||
|
|
||
| - Scripts in `res/controllers/`. ESLint enforced (`eslint.config.cjs`). | ||
| - Use Components JS library and JSDoc comments. | ||
|
|
||
| ### QML | ||
|
|
||
| - `res/qml/` and `src/qml/`. `qmlformat`/`qmllint` available via pre-commit. | ||
|
|
||
| ## Git & PR Workflow | ||
|
|
||
| - One branch per feature/bugfix. Every commit must build. | ||
| - Small commits. Imperative commit messages, 72-char wrap, describe what + why. | ||
| - Bug fixes → stable branch (e.g. `2.5`). Features → `main`. | ||
| - Don't rebase without reviewer agreement. Use `--fixup` commits, only squash before merge if requested. | ||
| - Post before/after screenshots for GUI changes. | ||
| - Keep PRs focused — no unrelated formatting, config, or refactoring changes mixed in. | ||
|
|
||
| ## Common Review Issues | ||
|
|
||
| 1. Pre-commit must pass before pushing. | ||
| 2. Use `std::chrono::duration` for time values. | ||
| 3. Use `Q_ENUM` + `QVariant::fromValue` instead of manual `static_cast<int>`. | ||
| 4. No `.DS_Store` or IDE files. | ||
| 5. Squash when asked; rebase onto the correct target branch. | ||
| 6. Document the "why" in commits and comments. | ||
| 7. SVG assets: full-size, borderless, matching existing conventions. | ||
|
|
||
| ## Key Architecture | ||
|
|
||
| - **ControlObject/ControlProxy**: `[Group], key_name` inter-component communication. | ||
| - **Engine thread**: Real-time audio — no allocations, no locks, no Qt signals. | ||
|
ywwg marked this conversation as resolved.
Outdated
|
||
| - **parented_ptr/make_parented**: Qt object-tree ownership. Object must get a parent before `parented_ptr` destructs. | ||
|
|
||
| ## Project Layout | ||
|
|
||
| ```text | ||
| src/ C++ source (engine/, controllers/, library/, mixer/, effects/, qml/, preferences/, util/, test/) | ||
| res/ Resources (controllers/ JS/XML, skins/, qml/) | ||
| cmake/ CMake modules | ||
| tools/ Python helper scripts | ||
| ``` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.