Imported from JawandS/daily-brief (
AGENTS.md). Install upstream withnpx skills add JawandS/daily-brief. Copyright stays with the author.
Repository Guidelines
Project Structure & Module Organization
app/contains the FastAPI application.app/briefs/implements brief generators (research.py,postmortem.py,news.py) built onapp/briefs/base.py.app/sources/handles data ingestion (ArXiv, RSS, and news search).app/llm/contains model integrations; Gemini handles scoring/summarization and Claude handles refinement/narrative.app/dashboard/provides HTMX-backed routes and Jinja templates for the web UI.app/email/manages email rendering and sending.scripts/run_brief.pyis the manual/cron entry point.context/stores prompt context files used during brief generation.
Build, Test, and Development Commands
uv sync: install dependencies into the project virtual environment.uv run uvicorn app.main:app --reload: run the dashboard locally.uv run python -m scripts.run_brief: run all briefs and send email.uv run python -m scripts.run_brief --preview: run generation without sending email (preferred for validation).
Coding Style & Naming Conventions
- Use Python 3.11+ conventions with 4-space indentation and type hints where useful.
- Keep modules focused by domain (
briefs,sources,llm,email,dashboard). - Use
snake_casefor functions/variables/files andPascalCasefor classes/data models. - Keep route handlers async in FastAPI modules.
- Follow existing concise docstring/comment style; only add comments where behavior is non-obvious.
Testing Guidelines
- There is currently no dedicated automated test suite in this repository.
- Validate behavior with
uv run python -m scripts.run_brief --previewand dashboard checks (/and/health). - When adding tests, prefer
pytestundertests/with files namedtest_<module>.pyand focused unit coverage forbriefsandsources.
Commit & Pull Request Guidelines
- Current history favors short, imperative commit subjects (for example:
fix start command,redesign news service). - Keep commit messages specific to one change and avoid mixing refactors with behavior changes.
- PRs should include: purpose, key files changed, validation steps/commands run, and screenshots for dashboard template/UI updates.
Security & Configuration Tips
- Required environment variables:
GEMINI_API_KEY,ANTHROPIC_API_KEY,RESEND_API_KEY. - Never commit secrets or
.envfiles. - Use preview mode for development to avoid unintended email sends.