2.7 KiB
2.7 KiB
AGENTS.md (Codex CLI guidance)
This repository is a screen reader. Prioritize accessibility, correctness, and stability over “clever” changes.
System interactions
- If a command requires
sudo, stop and ask the user to run it (no password entry is possible from here).
Build / run quick refs
- Local dev build + install:
./build-local.sh - Quick local sanity checks:
./test-local.sh - Clean local artifacts/install:
./clean-local.sh - Meson (manual):
meson setup _build --prefix=$HOME/.localmeson compile -C _buildmeson install -C _build
Coding guidelines
- When modifying existing code: follow the surrounding code’s conventions.
- When writing new code from scratch: prefer
- variables:
camelCase - functions/methods:
snake_case - classes:
PascalCase
- variables:
- Add debug logs where helpful for troubleshooting. When adding timestamps to logs, use:
"Message [timestamp]"(message first).
Accessibility requirements (high priority)
General
- Screen-reader-first UX: assume non-visual navigation.
- No keyboard traps; Tab/Shift+Tab must move through all controls.
- Use clear, complete labels (e.g., “Confirm Password”, not “Confirm”).
- No Speech-Dispatcher usage in GUI apps (no
spd-say); rely on the accessibility API.
Python GTK (Gtk 3)
- Associate labels with controls (mnemonics + buddy widget):
label.set_use_underline(True)label.set_mnemonic_widget(entry)
- For
Gtk.TextView, callset_accepts_tab(False)so Tab moves focus. - For custom widgets, set accessible name/role via ATK where applicable.
PySide6 / Qt
- Set
setAccessibleName()on all widgets. - Associate labels via
setBuddy(). - Use
setAccessibleDescription()when extra context is needed.
Shell script rules
- Bash variables must be
camelCase(except system env vars likeACCESSIBILITY_ENABLED). - If you edit a
#!/usr/bin/env bash,#!/bin/bash, or POSIXshscript, runshellcheckand fix issues. - Avoid colorized output unless explicitly requested (accessibility-first; keep scripts simple).
Plugins (Cthulhu)
- System plugins live in
src/cthulhu/plugins/. - Follow existing plugin patterns (keybinding registration, GTK dialog/window patterns, debug logging).
- Ensure plugin install integration is wired via Meson (
src/cthulhu/plugins/meson.build+ plugin subdirmeson.build).
Meson install reminder (important)
- If you add new Python modules under
src/cthulhu/, updatesrc/cthulhu/meson.buildso they get installed (otherwise imports can fail after install). - If you add a new plugin directory, update
src/cthulhu/plugins/meson.buildand add ameson.buildin the plugin directory.