C++20 desktop sync client for Infomaniak kDrive. Single-product monolith built with CMake + Conan 2. Ships a background server daemon (src/server/) plus multiple frontends: the legacy Qt Widgets GUI (src/gui/), the macOS Swift redesign (src/gui4/macOS/), and the Windows WinUI3 redesign (src/gui4/windows/). All sync logic lives in src/libsyncengine/. Targets macOS, Windows, and Linux.
All C++ code is in the KDC namespace.
At the start of every session:
- Read this file — universal conventions, security rules, and the component index below.
- Read the sub-AGENTS.md for each component you'll touch — e.g. editing
src/libsyncengine/→ readsrc/libsyncengine/AGENTS.mdbefore writing any code.
Nearest file wins: the sub-AGENTS.md closest to the file you're editing takes precedence over this root file.
# Initialize submodules used by the build
git submodule update --init --recursive
# Install Conan 2 dependencies using the project wrapper script (run from repo root)
# Accepted build types: Debug | Release | RelWithDebInfo
infomaniak-build-tools/conan/build_dependencies.sh Debug
# Configure + build (example: macOS)
cmake -B build-macos -DCMAKE_BUILD_TYPE=Debug -DBUILD_UNIT_TESTS=ON
cmake --build build-macos --parallel
# Run a test binary
./build-macos/bin/kDrive_test_syncengine
# Format code (auto-applied by pre-commit hook)
clang-format -i <file>- Language: C++20.
#pragma oncefor header guards. All C++ code inKDCnamespace. - Style: Google-based clang-format, 4-space indent, 130-char line limit. Enforced by
.githooks/pre-commit. - Includes: Relative to
src/root — e.g.,#include "libcommon/utility/types.h". - Platform files: Use suffixes
_mac.mm/_win.cpp/_linux.cppfor platform-specific code. - Logging:
LOG_INFO,LOG_DEBUG,LOG_WARN,LOG_ERRORfrom log4cplus. Neverstd::cout. - Commits: Conventional commits format (
feat(scope):,fix(scope):,refactor(scope):), validated by.githooks/commit-msg. - Branch naming: No enforced convention currently.
- Language: All PR titles, PR descriptions, and commit messages must be written in English.
- PR Title Format: PR titles must follow the same Conventional Commits format as commit messages.
- PR Target Branch: Use
developas the default target branch unless the user explicitly asks for a different base branch. - PR Status: Create the PR as Draft by default.
- Branch creation (AI/automation): If the user requests a PR but has not created a branch, create one with an appropriate name before opening the PR.
- History rewriting (AI/automation): Never amend, rebase, or force-push commits unless the user explicitly asks for it.
- Commit & push: Only commit and push when the user explicitly asks for it.
- Commit Format: Follow the project's semantic-commit validation rules defined in
.github/workflows/semantic-commit.yml.
- Never commit API tokens, passwords, or credentials. Use env vars (
KDRIVE_TEST_CI_API_TOKEN, etc.). - Keychain access is managed by
libcommonserver/keychainmanager/. - Sentry DSN and signing secrets are injected by CI only.
Important: When making significant changes to a directory that contains an AGENTS.md file (new patterns, new architecture, new commands), update that AGENTS.md to reflect the changes. Keep documentation in sync with code.
New Norms: If the user corrects you (e.g., "Don't use X, use Y"), add that rule to the "Local norms" section immediately so you don't make the same mistake again.
- In versioned documentation such as
AGENTS.md, use repo-relative paths, not hardcoded absolute filesystem paths. - For Linux builds/validation, use
infomaniak-build-tools/linux/build-release-via-podman.shrather than directcmake --build. - For dependency builds, use
infomaniak-build-tools/conan/build_dependencies.sh <Debug|Release|RelWithDebInfo>rather than directconan installso the project-specific environment is set correctly. - Never rewrite commit history (amend, rebase, force-push) unless explicitly asked by the user.
- Only commit and push when explicitly asked by the user.
- Common types/utilities:
src/libcommon/→ see AGENTS.md - Common GUI support (Qt network/logging/Matomo helpers):
src/libcommongui/→ no localAGENTS.md; use this root file - Server utilities + platform I/O:
src/libcommonserver/→ see AGENTS.md - Parameters database:
src/libparms/→ see AGENTS.md - Sync engine (core):
src/libsyncengine/→ see AGENTS.md - GUI (Qt Widgets, legacy):
src/gui/→ see AGENTS.md - GUI (macOS Swift redesign for v4):
src/gui4/macOS/→ see AGENTS.md- Built/tested separately from
src/gui4/macOS/kDrive.xcodeproj; do not assume coverage from the generic CMake macOS build.
- Built/tested separately from
- GUI (Windows WinUI3 redesign for v4):
src/gui4/windows/→ see AGENTS.md- Wired into the Windows CMake build through
src/gui4/CMakeLists.txt(if(WIN32)customdotnetbuild target).
- Wired into the Windows CMake build through
- Background server process:
src/server/→ see AGENTS.md
- Test infrastructure overview:
test/→ see AGENTS.md - Sync engine tests:
test/libsyncengine/→ see AGENTS.md
- Shell extensions (macOS/Windows):
extensions/→ see AGENTS.md - Conan dependencies & recipes:
infomaniak-build-tools/conan/→ see AGENTS.md
- Third-party licenses and attributions:
THIRD_PARTY_NOTICES.md - Project license:
LICENSE(GPL v3)
# Find a class definition
rg -n "class ClassName" src/
# Find all usages of a type
rg -n "TypeName" src/ -g "*.h" -g "*.cpp"
# Find IPC job for a feature
rg -n "class .*Job" src/server/comm/guijobs/ src/gui/ -g "*.h"
# Find platform-specific implementation
rg -ln "platform" src/ -g "*_mac.mm" -g "*_win.cpp"
# Find test for a class
rg -rn "TestClassName" test/- Code compiles on all 3 platforms (CI validates).
clang-formatreports no diff on touched files.- New logic has a corresponding test in
test/. - No hardcoded credentials or platform-specific paths in shared code.
- New dependencies licenses are documented in
THIRD_PARTY_NOTICES.md. - Relevant CI passes:
kdrive-desktop-ci.ymland any touched platform-specific workflow (for examplemacos-redesign.ymlwhen editingsrc/gui4/macOS/).