Thank you for your interest in contributing to Aether! This guide will help you get started.
# Clone the repository
git clone https://github.com/dsaridak/home_agent.git
cd home_agent
# Copy environment template
cp .env.example .env
# Edit .env with your configuration
# Install dependencies and start infrastructure
make dev
# Run the application
make run
# Run with UI
make run-uimake test # All tests
make test-unit # Unit tests only
make test-int # Integration tests (requires services)
make test-e2e # End-to-end tests
make test-cov # Tests with coverage reportTest isolation: Unit tests must never open real DB connections, network calls, or filesystem I/O. If a test uses create_app(), override all DB dependencies with mocks. An autouse DB guard in tests/unit/conftest.py catches accidental real connections.
make lint # Run ruff linter
make format # Format code
make typecheck # Run mypy type checking
make check # All quality checks (lint + format-check + typecheck)
make ci-local # Full CI locally (lint + typecheck + unit tests) — must pass before pushingAether follows Test-Driven Development (TDD):
- Red: Write a failing test first.
- Green: Write the minimum code to make it pass.
- Refactor: Clean up while keeping tests green.
- Commit: Commit the test and implementation together.
All new features and functional changes follow this process:
- Create a branch:
git checkout -b feat/my-feature develop - Develop with TDD: Write tests first, commit incrementally (see above).
- Run CI locally:
make ci-local— runs lint, typecheck, and unit tests. Must pass. - Squash commits:
git rebase -i develop— squash all commits into one with a conventional commit message. - Push and open PR:
git push -u origin HEAD && gh pr create - Rebase-merge: After review and remote CI passes, rebase-merge the PR.
Why squash before push? Each feature lands as a single clean commit on
develop/main, keepinggit logreadable andgit bisecteffective. Incremental commits on your branch are working checkpoints — they help you during development but don't need to persist in the main history.
We use Conventional Commits:
<type>[optional scope]: <description>
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Examples:
feat(api): add entity search endpoint
fix(scheduler): prevent duplicate job execution
docs: update deployment guide
test(dal): add repository edge case tests
feat/short-descriptionfor featuresfix/short-descriptionfor bug fixesdocs/short-descriptionfor documentationrefactor/short-descriptionfor refactoring
src/
agents/ # AI agents (Architect, DS Team, Librarian, Developer, Dashboard Designer)
api/ # FastAPI routes (21 modules), middleware, schemas, auth
cli/ # Typer CLI application and subcommands
dal/ # Data access layer (repositories)
diagnostics/ # HA diagnostic modules (log parser, entity health, error patterns)
graph/ # LangGraph workflows, state types, and domain-specific nodes
ha/ # Home Assistant integration (client, automations, history, parsers)
schema/ # YAML schema validation (HA automation, script, scene, dashboard)
sandbox/ # gVisor script execution sandbox
scheduler/ # APScheduler cron job service
storage/ # SQLAlchemy ORM models (19 entity models)
tools/ # Agent tool definitions (HA, diagnostic, review, dashboard, approval)
tracing/ # MLflow observability and custom scorers
tests/
unit/ # Fast, isolated unit tests (mocked dependencies)
integration/ # Tests requiring services (DB via testcontainers)
e2e/ # End-to-end tests
ui/ # React frontend (Vite + TypeScript + TanStack Query + Tailwind)
infrastructure/ # Container and deployment configs (Podman, gVisor, Postgres)
- Never commit secrets, API keys, or credentials.
- Never use
eval()orexec()outside the sandbox. - Always validate input via Pydantic schemas.
- Always use parameterized queries (no raw SQL with user input).
- See SECURITY.md for the full security policy.
- Create a feature branch from
developand develop with TDD. - Run
make ci-local— all checks must pass before proceeding. - Squash all branch commits into a single conventional commit (
git rebase -i develop). - Push the branch and open a pull request with a clear description.
- Ensure remote CI passes and request review.
- PRs are rebase-merged to maintain linear history.
Be respectful and constructive. We are committed to providing a welcoming and inclusive experience for everyone.
By contributing, you agree that your contributions will be licensed under the MIT License.