2026-02-24 23:17:49 +00:00
|
|
|
# CLAUDE.md — AI Assistant Guide for Timmy Time
|
|
|
|
|
|
refactor: Phase 1/4/6 — doc cleanup, config fix, token optimization
Phase 1 — Documentation cleanup:
- Slim README 303→93 lines (remove duplicated architecture, config tables)
- Slim CLAUDE.md 267→80 lines (remove project layout, env vars, CI section)
- Slim AGENTS.md 342→72 lines (remove duplicated patterns, running locally)
- Delete MEMORY.md, WORKSET_PLAN.md, WORKSET_PLAN_PHASE2.md (session docs)
- Archive PLAN.md, IMPLEMENTATION_SUMMARY.md to docs/
- Move QUALITY_ANALYSIS.md, QUALITY_REVIEW_REPORT.md to docs/
- Move apply_security_fixes.py, activate_self_tdd.sh to scripts/
Phase 4 — Config & build cleanup:
- Fix wheel build: add 11 missing modules to pyproject.toml include list
- Add pytest markers (unit, integration, dashboard, swarm, slow)
- Add data/self_modify_reports/ and .handoff/ to .gitignore
Phase 6 — Token optimization:
- Add docstrings to 15 __init__.py files that were empty
- Create __init__.py for events/, memory/, upgrades/ modules
Root markdown: 87KB → ~18KB (79% reduction)
https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
2026-02-26 21:03:15 +00:00
|
|
|
**Tech stack:** Python 3.11+ · FastAPI · Jinja2 + HTMX · SQLite · Agno ·
|
|
|
|
|
Ollama · pydantic-settings · WebSockets · Docker
|
2026-02-24 23:17:49 +00:00
|
|
|
|
refactor: Phase 1/4/6 — doc cleanup, config fix, token optimization
Phase 1 — Documentation cleanup:
- Slim README 303→93 lines (remove duplicated architecture, config tables)
- Slim CLAUDE.md 267→80 lines (remove project layout, env vars, CI section)
- Slim AGENTS.md 342→72 lines (remove duplicated patterns, running locally)
- Delete MEMORY.md, WORKSET_PLAN.md, WORKSET_PLAN_PHASE2.md (session docs)
- Archive PLAN.md, IMPLEMENTATION_SUMMARY.md to docs/
- Move QUALITY_ANALYSIS.md, QUALITY_REVIEW_REPORT.md to docs/
- Move apply_security_fixes.py, activate_self_tdd.sh to scripts/
Phase 4 — Config & build cleanup:
- Fix wheel build: add 11 missing modules to pyproject.toml include list
- Add pytest markers (unit, integration, dashboard, swarm, slow)
- Add data/self_modify_reports/ and .handoff/ to .gitignore
Phase 6 — Token optimization:
- Add docstrings to 15 __init__.py files that were empty
- Create __init__.py for events/, memory/, upgrades/ modules
Root markdown: 87KB → ~18KB (79% reduction)
https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
2026-02-26 21:03:15 +00:00
|
|
|
For agent roster and conventions, see [`AGENTS.md`](AGENTS.md).
|
2026-02-24 23:17:49 +00:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Architecture Patterns
|
|
|
|
|
|
|
|
|
|
### Config access
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
|
from config import settings
|
|
|
|
|
url = settings.ollama_url # never use os.environ.get() directly in app code
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Singletons
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
|
from dashboard.store import message_log
|
2026-02-26 22:07:41 +00:00
|
|
|
from infrastructure.notifications.push import notifier
|
|
|
|
|
from infrastructure.ws_manager.handler import ws_manager
|
2026-02-24 23:17:49 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### HTMX response pattern
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
|
return templates.TemplateResponse(
|
|
|
|
|
"partials/chat_message.html",
|
|
|
|
|
{"request": request, "role": "user", "content": message}
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Graceful degradation
|
|
|
|
|
|
|
|
|
|
Optional services (Ollama, Redis, AirLLM) degrade gracefully — log the error,
|
refactor: Phase 1/4/6 — doc cleanup, config fix, token optimization
Phase 1 — Documentation cleanup:
- Slim README 303→93 lines (remove duplicated architecture, config tables)
- Slim CLAUDE.md 267→80 lines (remove project layout, env vars, CI section)
- Slim AGENTS.md 342→72 lines (remove duplicated patterns, running locally)
- Delete MEMORY.md, WORKSET_PLAN.md, WORKSET_PLAN_PHASE2.md (session docs)
- Archive PLAN.md, IMPLEMENTATION_SUMMARY.md to docs/
- Move QUALITY_ANALYSIS.md, QUALITY_REVIEW_REPORT.md to docs/
- Move apply_security_fixes.py, activate_self_tdd.sh to scripts/
Phase 4 — Config & build cleanup:
- Fix wheel build: add 11 missing modules to pyproject.toml include list
- Add pytest markers (unit, integration, dashboard, swarm, slow)
- Add data/self_modify_reports/ and .handoff/ to .gitignore
Phase 6 — Token optimization:
- Add docstrings to 15 __init__.py files that were empty
- Create __init__.py for events/, memory/, upgrades/ modules
Root markdown: 87KB → ~18KB (79% reduction)
https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
2026-02-26 21:03:15 +00:00
|
|
|
return a fallback, never crash.
|
2026-02-24 23:17:49 +00:00
|
|
|
|
|
|
|
|
### Route registration
|
|
|
|
|
|
refactor: Phase 1/4/6 — doc cleanup, config fix, token optimization
Phase 1 — Documentation cleanup:
- Slim README 303→93 lines (remove duplicated architecture, config tables)
- Slim CLAUDE.md 267→80 lines (remove project layout, env vars, CI section)
- Slim AGENTS.md 342→72 lines (remove duplicated patterns, running locally)
- Delete MEMORY.md, WORKSET_PLAN.md, WORKSET_PLAN_PHASE2.md (session docs)
- Archive PLAN.md, IMPLEMENTATION_SUMMARY.md to docs/
- Move QUALITY_ANALYSIS.md, QUALITY_REVIEW_REPORT.md to docs/
- Move apply_security_fixes.py, activate_self_tdd.sh to scripts/
Phase 4 — Config & build cleanup:
- Fix wheel build: add 11 missing modules to pyproject.toml include list
- Add pytest markers (unit, integration, dashboard, swarm, slow)
- Add data/self_modify_reports/ and .handoff/ to .gitignore
Phase 6 — Token optimization:
- Add docstrings to 15 __init__.py files that were empty
- Create __init__.py for events/, memory/, upgrades/ modules
Root markdown: 87KB → ~18KB (79% reduction)
https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
2026-02-26 21:03:15 +00:00
|
|
|
New routes: `src/dashboard/routes/<name>.py` → register in `src/dashboard/app.py`.
|
2026-02-24 23:17:49 +00:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
Consolidate test & dev workflows into tox as single source of truth (#160)
* Centralize all Python environments on tox
tox.ini is now the single source of truth for how every Python
environment runs — tests, linting, formatting, dev server, and CI.
No more bare `poetry run` outside of tox.
- Expand tox.ini from 4 to 15 environments (lint, format, typecheck,
unit, integration, functional, e2e, fast, ollama, ci, coverage,
coverage-html, pre-commit, dev, all)
- Rewire all Makefile test/lint/format/dev targets to delegate to tox
- Update .githooks/pre-commit to run `tox -e pre-commit`
- Update .pre-commit-config.yaml to use tox instead of poetry run
- Update CI workflow (lint + test jobs) to use `tox -e lint` and
`tox -e ci` instead of ad-hoc pytest/black/isort invocations
- Update CLAUDE.md to mandate tox usage and document all environments
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* refactor: modernize tox.ini for tox 4.x conventions
- Replace `skipsdist = true` (tox 3 alias) with `no_package = true`
- Use `poetry install --no-root --sync` for faster, cleaner dep installs
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): drop poetry install from lint/format tox envs
Lint and format only need black, isort, and bandit — not the full
project dependency tree. Override commands_pre to empty and use tox
deps instead. Fixes CI failure where poetry is not on PATH.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry run wrapper from all tox commands
Since commands_pre runs poetry install into the tox-managed venv,
all tools (pytest, mypy, black, etc.) are already on the venv PATH.
The poetry run wrapper is redundant and fails in CI where poetry
may not be installed globally.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry dependency, align local and CI processes
- Replace `poetry install` with `pip install -e ".[dev]"` in tox
commands_pre so all envs work without poetry installed
- Remove Poetry cache from GitHub Actions (only pip cache needed)
- Rename pre-commit env to pre-push: runs lint + full CI suite
(same checks as GitHub Actions, reports generated locally)
- Update CLAUDE.md to reflect new pre-push workflow
The local `tox -e pre-push` now runs the exact same lint + test +
coverage checks as CI, so failures are caught before pushing.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-10 15:54:09 -04:00
|
|
|
## Development Environments (tox)
|
|
|
|
|
|
|
|
|
|
**tox is the single source of truth for all Python environments.**
|
|
|
|
|
Never run `poetry run` directly — always go through tox. All environment
|
|
|
|
|
config (deps, markers, flags) lives in `tox.ini`. The Makefile and CI
|
|
|
|
|
both delegate to tox.
|
|
|
|
|
|
|
|
|
|
### Quick reference
|
2026-02-24 23:17:49 +00:00
|
|
|
|
|
|
|
|
```bash
|
Consolidate test & dev workflows into tox as single source of truth (#160)
* Centralize all Python environments on tox
tox.ini is now the single source of truth for how every Python
environment runs — tests, linting, formatting, dev server, and CI.
No more bare `poetry run` outside of tox.
- Expand tox.ini from 4 to 15 environments (lint, format, typecheck,
unit, integration, functional, e2e, fast, ollama, ci, coverage,
coverage-html, pre-commit, dev, all)
- Rewire all Makefile test/lint/format/dev targets to delegate to tox
- Update .githooks/pre-commit to run `tox -e pre-commit`
- Update .pre-commit-config.yaml to use tox instead of poetry run
- Update CI workflow (lint + test jobs) to use `tox -e lint` and
`tox -e ci` instead of ad-hoc pytest/black/isort invocations
- Update CLAUDE.md to mandate tox usage and document all environments
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* refactor: modernize tox.ini for tox 4.x conventions
- Replace `skipsdist = true` (tox 3 alias) with `no_package = true`
- Use `poetry install --no-root --sync` for faster, cleaner dep installs
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): drop poetry install from lint/format tox envs
Lint and format only need black, isort, and bandit — not the full
project dependency tree. Override commands_pre to empty and use tox
deps instead. Fixes CI failure where poetry is not on PATH.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry run wrapper from all tox commands
Since commands_pre runs poetry install into the tox-managed venv,
all tools (pytest, mypy, black, etc.) are already on the venv PATH.
The poetry run wrapper is redundant and fails in CI where poetry
may not be installed globally.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry dependency, align local and CI processes
- Replace `poetry install` with `pip install -e ".[dev]"` in tox
commands_pre so all envs work without poetry installed
- Remove Poetry cache from GitHub Actions (only pip cache needed)
- Rename pre-commit env to pre-push: runs lint + full CI suite
(same checks as GitHub Actions, reports generated locally)
- Update CLAUDE.md to reflect new pre-push workflow
The local `tox -e pre-push` now runs the exact same lint + test +
coverage checks as CI, so failures are caught before pushing.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-10 15:54:09 -04:00
|
|
|
tox -e unit # Fast unit tests (default pre-commit gate)
|
|
|
|
|
tox -e ci # Full CI suite with coverage + JUnit XML
|
|
|
|
|
tox -e lint # black --check + isort --check + bandit
|
|
|
|
|
tox -e format # Auto-format (black + isort)
|
|
|
|
|
tox -e dev # Start dashboard with auto-reload
|
2026-02-24 23:17:49 +00:00
|
|
|
```
|
|
|
|
|
|
Consolidate test & dev workflows into tox as single source of truth (#160)
* Centralize all Python environments on tox
tox.ini is now the single source of truth for how every Python
environment runs — tests, linting, formatting, dev server, and CI.
No more bare `poetry run` outside of tox.
- Expand tox.ini from 4 to 15 environments (lint, format, typecheck,
unit, integration, functional, e2e, fast, ollama, ci, coverage,
coverage-html, pre-commit, dev, all)
- Rewire all Makefile test/lint/format/dev targets to delegate to tox
- Update .githooks/pre-commit to run `tox -e pre-commit`
- Update .pre-commit-config.yaml to use tox instead of poetry run
- Update CI workflow (lint + test jobs) to use `tox -e lint` and
`tox -e ci` instead of ad-hoc pytest/black/isort invocations
- Update CLAUDE.md to mandate tox usage and document all environments
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* refactor: modernize tox.ini for tox 4.x conventions
- Replace `skipsdist = true` (tox 3 alias) with `no_package = true`
- Use `poetry install --no-root --sync` for faster, cleaner dep installs
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): drop poetry install from lint/format tox envs
Lint and format only need black, isort, and bandit — not the full
project dependency tree. Override commands_pre to empty and use tox
deps instead. Fixes CI failure where poetry is not on PATH.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry run wrapper from all tox commands
Since commands_pre runs poetry install into the tox-managed venv,
all tools (pytest, mypy, black, etc.) are already on the venv PATH.
The poetry run wrapper is redundant and fails in CI where poetry
may not be installed globally.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry dependency, align local and CI processes
- Replace `poetry install` with `pip install -e ".[dev]"` in tox
commands_pre so all envs work without poetry installed
- Remove Poetry cache from GitHub Actions (only pip cache needed)
- Rename pre-commit env to pre-push: runs lint + full CI suite
(same checks as GitHub Actions, reports generated locally)
- Update CLAUDE.md to reflect new pre-push workflow
The local `tox -e pre-push` now runs the exact same lint + test +
coverage checks as CI, so failures are caught before pushing.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-10 15:54:09 -04:00
|
|
|
### All tox environments
|
|
|
|
|
|
|
|
|
|
| Environment | Purpose |
|
|
|
|
|
|---|---|
|
|
|
|
|
| `lint` | Check formatting + imports + security |
|
|
|
|
|
| `format` | Auto-format code |
|
|
|
|
|
| `typecheck` | mypy static analysis |
|
|
|
|
|
| `unit` | Fast unit tests, parallel |
|
|
|
|
|
| `integration` | Integration tests, parallel |
|
|
|
|
|
| `functional` | Functional tests, sequential |
|
|
|
|
|
| `e2e` | End-to-end tests |
|
|
|
|
|
| `fast` | unit + integration combined |
|
|
|
|
|
| `ollama` | Live LLM tests (requires Ollama) |
|
|
|
|
|
| `ci` | Coverage + JUnit XML (mirrors GitHub Actions) |
|
|
|
|
|
| `coverage` | Coverage terminal + XML |
|
|
|
|
|
| `coverage-html` | Coverage HTML report |
|
|
|
|
|
| `pre-push` | Lint + full CI suite (mirrors GitHub Actions exactly) |
|
|
|
|
|
| `dev` | uvicorn with auto-reload |
|
|
|
|
|
| `all` | All tests, parallel |
|
|
|
|
|
|
|
|
|
|
### Testing notes
|
|
|
|
|
|
refactor: Phase 1/4/6 — doc cleanup, config fix, token optimization
Phase 1 — Documentation cleanup:
- Slim README 303→93 lines (remove duplicated architecture, config tables)
- Slim CLAUDE.md 267→80 lines (remove project layout, env vars, CI section)
- Slim AGENTS.md 342→72 lines (remove duplicated patterns, running locally)
- Delete MEMORY.md, WORKSET_PLAN.md, WORKSET_PLAN_PHASE2.md (session docs)
- Archive PLAN.md, IMPLEMENTATION_SUMMARY.md to docs/
- Move QUALITY_ANALYSIS.md, QUALITY_REVIEW_REPORT.md to docs/
- Move apply_security_fixes.py, activate_self_tdd.sh to scripts/
Phase 4 — Config & build cleanup:
- Fix wheel build: add 11 missing modules to pyproject.toml include list
- Add pytest markers (unit, integration, dashboard, swarm, slow)
- Add data/self_modify_reports/ and .handoff/ to .gitignore
Phase 6 — Token optimization:
- Add docstrings to 15 __init__.py files that were empty
- Create __init__.py for events/, memory/, upgrades/ modules
Root markdown: 87KB → ~18KB (79% reduction)
https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
2026-02-26 21:03:15 +00:00
|
|
|
- **Stubs in conftest:** `agno`, `airllm`, `pyttsx3`, `telegram`, `discord`
|
|
|
|
|
stubbed via `sys.modules.setdefault()` — tests run without those packages
|
|
|
|
|
- **Test mode:** `TIMMY_TEST_MODE=1` set automatically in conftest
|
|
|
|
|
- **FastAPI testing:** Use the `client` fixture
|
|
|
|
|
- **Async:** `asyncio_mode = "auto"` — async tests detected automatically
|
2026-03-08 12:50:44 -04:00
|
|
|
- **Coverage threshold:** 73% (`fail_under` in `pyproject.toml`)
|
2026-02-24 23:17:49 +00:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Key Conventions
|
|
|
|
|
|
Consolidate test & dev workflows into tox as single source of truth (#160)
* Centralize all Python environments on tox
tox.ini is now the single source of truth for how every Python
environment runs — tests, linting, formatting, dev server, and CI.
No more bare `poetry run` outside of tox.
- Expand tox.ini from 4 to 15 environments (lint, format, typecheck,
unit, integration, functional, e2e, fast, ollama, ci, coverage,
coverage-html, pre-commit, dev, all)
- Rewire all Makefile test/lint/format/dev targets to delegate to tox
- Update .githooks/pre-commit to run `tox -e pre-commit`
- Update .pre-commit-config.yaml to use tox instead of poetry run
- Update CI workflow (lint + test jobs) to use `tox -e lint` and
`tox -e ci` instead of ad-hoc pytest/black/isort invocations
- Update CLAUDE.md to mandate tox usage and document all environments
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* refactor: modernize tox.ini for tox 4.x conventions
- Replace `skipsdist = true` (tox 3 alias) with `no_package = true`
- Use `poetry install --no-root --sync` for faster, cleaner dep installs
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): drop poetry install from lint/format tox envs
Lint and format only need black, isort, and bandit — not the full
project dependency tree. Override commands_pre to empty and use tox
deps instead. Fixes CI failure where poetry is not on PATH.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry run wrapper from all tox commands
Since commands_pre runs poetry install into the tox-managed venv,
all tools (pytest, mypy, black, etc.) are already on the venv PATH.
The poetry run wrapper is redundant and fails in CI where poetry
may not be installed globally.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry dependency, align local and CI processes
- Replace `poetry install` with `pip install -e ".[dev]"` in tox
commands_pre so all envs work without poetry installed
- Remove Poetry cache from GitHub Actions (only pip cache needed)
- Rename pre-commit env to pre-push: runs lint + full CI suite
(same checks as GitHub Actions, reports generated locally)
- Update CLAUDE.md to reflect new pre-push workflow
The local `tox -e pre-push` now runs the exact same lint + test +
coverage checks as CI, so failures are caught before pushing.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-10 15:54:09 -04:00
|
|
|
1. **Tests must stay green.** Run `tox -e unit` before committing. Run `tox -e pre-push` before pushing (mirrors CI exactly).
|
refactor: Phase 1/4/6 — doc cleanup, config fix, token optimization
Phase 1 — Documentation cleanup:
- Slim README 303→93 lines (remove duplicated architecture, config tables)
- Slim CLAUDE.md 267→80 lines (remove project layout, env vars, CI section)
- Slim AGENTS.md 342→72 lines (remove duplicated patterns, running locally)
- Delete MEMORY.md, WORKSET_PLAN.md, WORKSET_PLAN_PHASE2.md (session docs)
- Archive PLAN.md, IMPLEMENTATION_SUMMARY.md to docs/
- Move QUALITY_ANALYSIS.md, QUALITY_REVIEW_REPORT.md to docs/
- Move apply_security_fixes.py, activate_self_tdd.sh to scripts/
Phase 4 — Config & build cleanup:
- Fix wheel build: add 11 missing modules to pyproject.toml include list
- Add pytest markers (unit, integration, dashboard, swarm, slow)
- Add data/self_modify_reports/ and .handoff/ to .gitignore
Phase 6 — Token optimization:
- Add docstrings to 15 __init__.py files that were empty
- Create __init__.py for events/, memory/, upgrades/ modules
Root markdown: 87KB → ~18KB (79% reduction)
https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
2026-02-26 21:03:15 +00:00
|
|
|
2. **No cloud AI dependencies.** All inference on localhost.
|
|
|
|
|
3. **Keep the root directory clean.** No new top-level files without purpose.
|
|
|
|
|
4. **Follow existing patterns** — singletons, graceful degradation, pydantic config.
|
|
|
|
|
5. **Security defaults:** Never hard-code secrets.
|
2026-02-24 23:17:49 +00:00
|
|
|
6. **XSS prevention:** Never use `innerHTML` with untrusted content.
|
|
|
|
|
7. **Keep routes thin** — business logic lives in the module, not the route.
|
|
|
|
|
8. **Prefer editing existing files** over creating new ones.
|
|
|
|
|
9. **Use `from config import settings`** for all env-var access.
|
Consolidate test & dev workflows into tox as single source of truth (#160)
* Centralize all Python environments on tox
tox.ini is now the single source of truth for how every Python
environment runs — tests, linting, formatting, dev server, and CI.
No more bare `poetry run` outside of tox.
- Expand tox.ini from 4 to 15 environments (lint, format, typecheck,
unit, integration, functional, e2e, fast, ollama, ci, coverage,
coverage-html, pre-commit, dev, all)
- Rewire all Makefile test/lint/format/dev targets to delegate to tox
- Update .githooks/pre-commit to run `tox -e pre-commit`
- Update .pre-commit-config.yaml to use tox instead of poetry run
- Update CI workflow (lint + test jobs) to use `tox -e lint` and
`tox -e ci` instead of ad-hoc pytest/black/isort invocations
- Update CLAUDE.md to mandate tox usage and document all environments
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* refactor: modernize tox.ini for tox 4.x conventions
- Replace `skipsdist = true` (tox 3 alias) with `no_package = true`
- Use `poetry install --no-root --sync` for faster, cleaner dep installs
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): drop poetry install from lint/format tox envs
Lint and format only need black, isort, and bandit — not the full
project dependency tree. Override commands_pre to empty and use tox
deps instead. Fixes CI failure where poetry is not on PATH.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry run wrapper from all tox commands
Since commands_pre runs poetry install into the tox-managed venv,
all tools (pytest, mypy, black, etc.) are already on the venv PATH.
The poetry run wrapper is redundant and fails in CI where poetry
may not be installed globally.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
* fix(ci): remove poetry dependency, align local and CI processes
- Replace `poetry install` with `pip install -e ".[dev]"` in tox
commands_pre so all envs work without poetry installed
- Remove Poetry cache from GitHub Actions (only pip cache needed)
- Rename pre-commit env to pre-push: runs lint + full CI suite
(same checks as GitHub Actions, reports generated locally)
- Update CLAUDE.md to reflect new pre-push workflow
The local `tox -e pre-push` now runs the exact same lint + test +
coverage checks as CI, so failures are caught before pushing.
https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-10 15:54:09 -04:00
|
|
|
10. **Use tox for everything.** Never run `poetry run` directly — use `tox -e <env>`.
|
2026-02-24 23:17:49 +00:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Security-Sensitive Areas
|
|
|
|
|
|
2026-03-07 07:28:14 -05:00
|
|
|
- `src/timmy_serve/` — API server, payment configuration
|
2026-02-24 23:17:49 +00:00
|
|
|
- Any file handling secrets or authentication tokens
|
refactor: Phase 1/4/6 — doc cleanup, config fix, token optimization
Phase 1 — Documentation cleanup:
- Slim README 303→93 lines (remove duplicated architecture, config tables)
- Slim CLAUDE.md 267→80 lines (remove project layout, env vars, CI section)
- Slim AGENTS.md 342→72 lines (remove duplicated patterns, running locally)
- Delete MEMORY.md, WORKSET_PLAN.md, WORKSET_PLAN_PHASE2.md (session docs)
- Archive PLAN.md, IMPLEMENTATION_SUMMARY.md to docs/
- Move QUALITY_ANALYSIS.md, QUALITY_REVIEW_REPORT.md to docs/
- Move apply_security_fixes.py, activate_self_tdd.sh to scripts/
Phase 4 — Config & build cleanup:
- Fix wheel build: add 11 missing modules to pyproject.toml include list
- Add pytest markers (unit, integration, dashboard, swarm, slow)
- Add data/self_modify_reports/ and .handoff/ to .gitignore
Phase 6 — Token optimization:
- Add docstrings to 15 __init__.py files that were empty
- Create __init__.py for events/, memory/, upgrades/ modules
Root markdown: 87KB → ~18KB (79% reduction)
https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
2026-02-26 21:03:15 +00:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Entry Points
|
|
|
|
|
|
|
|
|
|
| Command | Module | Purpose |
|
|
|
|
|
|---------|--------|---------|
|
|
|
|
|
| `timmy` | `src/timmy/cli.py` | Chat, think, status |
|
2026-03-02 13:17:38 -05:00
|
|
|
| `timmy-serve` | `src/timmy_serve/cli.py` | API server (port 8402) |
|
2026-02-26 22:07:41 +00:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2026-03-02 13:17:38 -05:00
|
|
|
## Module Map (8 packages)
|
2026-02-26 22:07:41 +00:00
|
|
|
|
|
|
|
|
| Package | Purpose |
|
|
|
|
|
|---------|---------|
|
|
|
|
|
| `timmy/` | Core agent, personas, agent interface, semantic memory |
|
|
|
|
|
| `dashboard/` | FastAPI web UI, routes, templates |
|
|
|
|
|
| `infrastructure/` | WebSocket, notifications, events, LLM router |
|
|
|
|
|
| `integrations/` | Discord, Telegram, Siri Shortcuts, voice NLU |
|
|
|
|
|
| `spark/` | Event capture and advisory engine |
|
2026-03-02 13:17:38 -05:00
|
|
|
| `brain/` | Identity system, memory interface |
|
|
|
|
|
| `timmy_serve/` | API server |
|
2026-02-26 22:07:41 +00:00
|
|
|
| `config.py` | Pydantic settings (foundation for all modules) |
|