- Start with
docs/README.mdfor an index of project documentation intended for agents and contributors. - Architecture and layer boundaries are defined in
docs/layer-responsibilities.md. - Coding preferences and local implementation constraints are documented in
docs/coding-preferences.md. - Testing strategy and test-layer expectations are defined in
docs/testing-conventions.md. - When a task references a planned feature, refactor, or change design, check the relevant specification in
docs/changes/for historical context only. Documents indocs/changes/are immutable after the related change lands and must not be edited to reflect later behavior; update living documentation elsewhere instead.
- Command handlers are Telegram-facing entry points. They should validate command-specific conditions, prepare input for services, and handle user-facing replies.
- Reusable business rules and side effects do not belong in command handlers. Put them in the service layer or another appropriate non-Telegram abstraction.
- Follow
docs/layer-responsibilities.mdwhen deciding whether code belongs in commands, services, the Telegram boundary, formatters, wizards, or utilities.
- If a VS Code devcontainer for this repo is running, execute commands in that container.
- Do not hardcode container IDs. They change after restarts.
- Use
scripts/devcontainer-exec.shto run commands. It automatically:- Detects the devcontainer by Docker label
devcontainer.local_folder=<repo_root> - Runs inside container
/workspacewhen found - Falls back to host execution when no matching container is running
- Detects the devcontainer by Docker label
- For detection-only flows, use:
./scripts/devcontainer-exec.sh --find-container-id- Prints container ID when found and exits non-zero when not found.
- Standard test entrypoint:
./run-tests.sh --mode basic
- Always run only basic tests by default (no Mongo mode), because Mongo-based runs may hang.
- Do not run
--mode mongounless the user explicitly asks for it. - Follow the project testing strategy in
docs/testing-conventions.mdwhen adding, updating, or reviewing tests.
- Follow
docs/coding-preferences.mdfor local coding style and change-scope preferences. - Prefer simple solutions, reuse existing patterns, and avoid duplication.
- Keep changes narrowly focused on the task and think through adjacent code paths that may be affected.
- If already running inside a container (
/.dockerenvexists), commands run directly without nesteddocker exec. - Optional override:
- Set
DEVCONTAINER_ID=<id>to force a specific container.
- Set