- Follow STYLEGUIDE.md for code style, naming, JSDoc, validation, logging, and formatting expectations.
- JSDoc requirements are enforced by the linter. Treat missing or incomplete JSDoc on required APIs as a real lint issue, not optional documentation.
- Import and export ordering are enforced by the linter or by the formatter. Preserve the existing grouped and sorted order unless a change requires updating it.
- Follow the existing formatting and do not fight the formatter.
- Keep changes minimal and scoped to the request. Avoid unrelated refactors or broad cleanup.
- Do not modify production code only to make a test pass. If a failing test points to a likely source issue, explain the issue and change behavior only when required by the task.
- Preserve cross-platform behavior. Changes must work on Windows, macOS, and Linux, especially for paths, shell commands, environment variables, and networking behavior.
- Maintain compatibility with the supported Node.js versions in this repository: 20.19, 22.13, 24 and 26.
- This repository is a TypeScript ESM repo. Follow existing project patterns for imports, exports, build configuration, and test setup.
- Prefer the existing npm scripts in package.json and the VS Code tasks in tasks.json when validating changes.
- Keep tests deterministic and simple. Prefer small data sets and straightforward setup.
- Some tests are intentionally multi-step flows. State may persist across successive steps within a single test flow, but each test unit must remain isolated from other tests.
- For validation, run the relevant full test file or the matching suite/task for the touched area rather than assuming arbitrary isolated single-test execution is reliable.
- When behavior changes, update the relevant tests and documentation in the README.md files.
For task-specific guidance, read relevant files in .agents:
.agents/testing.mdfor testing and validation expectations;.agents/matterbridge.mdfor instruction about using matterbridge in a plugin.