mirror of
https://github.com/devmobasa/wayscriber.git
synced 2026-11-01 07:36:42 +01:00
3.0 KiB
3.0 KiB
AGENTS.md
Scope
- This file applies to the whole wayscriber workspace.
- wayscriber is a Rust desktop annotation app for Wayland compositors.
- The workspace root crate is
wayscriber;configurator/is a separate Iced desktop configurator crate. - Both crates use Rust 1.95 and edition 2024.
- The workspace default member is only the root crate; use
-p wayscriber-configuratoror--workspacewhen configurator coverage is needed.
Architecture
- The main app starts in
src/main.rs, parses CLI state, then routes throughsrc/app/into daemon mode or active Wayland overlay mode. - Shared library modules are exported from
src/lib.rsfor tests and the configurator; binary-only modules stay private tosrc/main.rs. - Core domains are backend/Wayland runtime, input state, drawing data/rendering, overlay UI, capture, config, session persistence, daemon lifecycle, canvas export, and configurator UI.
- Start with
README.md,CONTRIBUTING.md,docs/codebase-overview.md,docs/CONFIG.md, andconfigurator/README.mdwhen changing behavior.
Invariants
- Preserve foreground and fullscreen safety: do not launch, foreground, focus, or interact with another app/window, especially fullscreen apps, without explicit user permission.
- Treat
cargo run,wayscriber --active,wayscriber --daemon,wayscriber-configurator, and manual UI checks as potentially foreground/focus-affecting unless proven otherwise. - Preserve feature-gate intent for
tablet-input,dbus,portal,tray, andconfig-schema. - Do not edit generated/build output such as
target/. - Preserve existing Rust module style. This repo intentionally mixes
foo.rs,foo/, andfoo/mod.rs. - For Rust split modules, an
AGENTS.mdinfoo/does not apply to siblingfoo.rs; put shared rules in the parent guide.
Coupled Changes
- Config changes often require
config.example.toml,docs/CONFIG.md, configurator models/views, schema behavior, and tests. - Tool/action/keybinding changes often require config defaults, action metadata, help/command UI, toolbar UI, configurator labels/search, docs, and tests.
- Daemon, service, shortcut, path, and packaging changes often need updates across
src/daemon/,src/paths/,src/systemd_user_service.rs,src/shortcut_hint.rs,configurator/src/app/daemon_setup/, andpackaging/.
Validation
- Full local CI is
./tools/lint-and-test.sh. - That script runs version/package checks,
cargo fmt --all -- --check, clippy with all targets/features, all-feature tests, and no-default-feature tests. - For docs-only
AGENTS.mdedits, make new files visible to Git before whitespace checks, for examplerg --files --hidden -g AGENTS.md -0 | xargs -0 git add -N --followed bygit diff --check. - On PowerShell, use
rg --files --hidden -g AGENTS.md | ForEach-Object { git add -N -- $_ }followed bygit diff --check. - If you do not want to alter the index, run an explicit trailing-whitespace check across the untracked
AGENTS.mdfiles instead of relying on plaingit diff --check.