This file contains rules and guidelines for AI agents working on this codebase.
- No
anytype usage - All types must be properly defined - Use explicit TypeScript types for all variables, parameters, and return values
- Prefer
unknownoveranywhen the type is truly unknown, then narrow it down - Use Zod schemas for runtime validation (already set up in
src/core/types.ts)
- No hardcoded API keys, tokens, or secrets in code - Ever
- All sensitive data must come from:
- Environment variables (
.envfiles) - User config files (
~/.bashio/config.json)
- Environment variables (
- Never use fallback values for secrets - If a secret is missing, throw an error
- Config files containing secrets are stored in user's home directory, not in the repo
- Ensure
.gitignoreexcludes all sensitive files before any changes
- All documentation
.mdfiles must be indocs/folder - Exception:
README.mdandAGENTS.mdstay in root directory - Keep the source code structure organized:
src/cli/- CLI commands and setupsrc/core/- Core business logic and typessrc/providers/- AI provider implementationssrc/utils/- Utility functions
- Run
pnpm lint:check- Ensure no linting errors - Run
pnpm typecheck- Ensure no TypeScript errors - Run
pnpm build- Ensure the project builds successfully - Check that no sensitive data is exposed in any files
- Never commit
.envfiles or any file containing secrets - Never commit
~/.bashio/config files - Review changes before suggesting commits