|
| 1 | +# AGENTS |
| 2 | + |
| 3 | +## Mission |
| 4 | +- CodeLite is a free, open-source, cross-platform IDE for C, C++, Rust, Python, Node.js, and PHP. Your job is to shepherd contributions related to this project: understand how CodeLite is structured, make focused edits, validate them locally when possible, and document the results. |
| 5 | +- Always treat the user as a developer collaborator. Ask clarifying questions whenever requirements are ambiguous and summarize your proposed approach before making changes. |
| 6 | + |
| 7 | +## Repository Overview |
| 8 | +- `CodeLite/`, `LiteEditor/`, `Runtime/`, `Plugin/`, and sister directories host the core IDE, editors, runtime libraries, and plug-in system. |
| 9 | +- `cmake/`, `scripts/`, and the `.build-release*` directories contain build helpers, toolchains, and configuration templates. The repository is driven by CMake (see `CMakeLists.txt`). |
| 10 | +- Subprojects such as `LanguageServer/`, `DatabaseExplorer/`, `PHPRefactoring/`, and `SmartCompletion/` are feature-specific extensions built on top of the core. |
| 11 | +- `docs/`, `README.md`, and `TODO.md` describe coding standards, build steps, and outstanding work. Consult them when planning changes. |
| 12 | + |
| 13 | +## Build & Tooling Notes |
| 14 | +- CodeLite uses CMake. A canonical Windows build sequence is: `cmake -S . -B .build-release -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release`, followed by `cmake --build .build-release --config Release`. |
| 15 | +- On other platforms - Linux and macOS - A build sequence is `cmake -S . -B .build-release -DCMAKE_BUILD_TYPE=Release`, , followed by `cmake --build .build-release --config Release`. |
| 16 | +- After building, `ctest --output-on-failure --test-dir .build-release` exercises the bundled test suite wherever supported. |
| 17 | +- Keep `compile_commands.json` in sync by regenerating the build directory before running linters or language tooling. |
| 18 | +- After generating a code, use `clang-format -i <source-file>` to keep it formatted properly. |
| 19 | + |
| 20 | +## Development Guidance for Agents |
| 21 | +1. **Inspect:** Start with `git status` and `git diff` to understand the working tree. Read the relevant files to understand context before modifying. |
| 22 | +2. **Edit:** Favor existing style (C++20, wxWidgets, consistent formatting). If unsure, check `.clang-format`, or existing code for guidance. |
| 23 | +3. **Build/Test:** Run the minimal reproducible build/test commands for your changes, especially if touching platform-specific code. If a full build is impractical, explain why and list the commands you would run. |
| 24 | +4. **Document:** Update or reference `README.md`, `docs/`, or relevant user-facing files when behavior changes. |
| 25 | +5. **Communication:** When presenting results, include: |
| 26 | + - Summary of what you changed (and why). |
| 27 | + - Tests you ran (or reasons for not running them). |
| 28 | + - Next steps or unresolved questions. |
| 29 | + |
| 30 | +## Safety & Best Practices |
| 31 | +- Prefer minimal changes. Reuse existing abstractions unless a broader refactor is justified. |
| 32 | +- Avoid running unknown scripts. Stick to documented commands unless the user explicitly authorizes experimentation. |
| 33 | +- Be mindful of cross-platform differences; test or note expected behavior per OS. |
| 34 | + |
| 35 | +## Helpful Resources |
| 36 | +- [README.md](README.md) |
| 37 | +- [docs/](docs/) |
| 38 | +- [TODO.md](TODO.md) |
| 39 | +- `CMakeLists.txt` for build flow and component inclusion |
| 40 | + |
| 41 | +Agents reading this file should convert it to their system prompt, honor its guidance, and keep it in sync with the repository's state. |
0 commit comments