The problem
The agent/ directory is a flat mix of everything - Python source code, Dockerfile, shell scripts, lock files, configs, tests, all sitting at the same level. When I was going through the project trying to understand how things fit together, it wasn't obvious what's source code and what's build infrastructure.
agent/ <- current state
├── Dockerfile
├── README.md
├── entrypoint.py <- source
├── server.py <- source
├── memory.py <- source
├── task_state.py <- source
├── observability.py <- source
├── system_prompt.py <- source
├── prepare-commit-msg.sh <- script
├── run.sh <- script
├── mise.toml <- config
├── pyproject.toml <- config
├── uv.lock <- lock file
├── prompts/ <- source
├── scripts/ <- scripts
└── tests/ <- tests
I think we have the following problems:
- Makes it harder than it should be to find what you're looking for, especially for someone new to the project
- AI coding assistants also benefit from clear separation - when everything is flat, models have to figure out what's source code vs infrastructure on every interaction
- As the entrypoint refactor (see follow-up issue) adds more modules, the flat structure will get even messier
Proposed solution
Move all Python source code into agent/src/. Build/infra files stay at the root:
agent/
├── Dockerfile
├── README.md
├── mise.toml
├── pyproject.toml
├── uv.lock
├── prepare-commit-msg.sh
├── run.sh
├── scripts/
├── tests/
│
└── src/
├── entrypoint.py
├── server.py
├── memory.py
├── task_state.py
├── observability.py
├── system_prompt.py
└── prompts/
├── __init__.py
├── base.py
├── new_task.py
├── pr_iteration.py
└── pr_review.py
Acknowledgements
The problem
The
agent/directory is a flat mix of everything - Python source code, Dockerfile, shell scripts, lock files, configs, tests, all sitting at the same level. When I was going through the project trying to understand how things fit together, it wasn't obvious what's source code and what's build infrastructure.I think we have the following problems:
Proposed solution
Move all Python source code into
agent/src/. Build/infra files stay at the root:Acknowledgements