|
| 1 | +# Marvin - AI Engineering Toolkit |
| 2 | + |
| 3 | +Marvin is a lightweight AI engineering toolkit for building natural language interfaces that are reliable, scalable, and easy to trust. |
| 4 | + |
| 5 | +## Architecture & Design Philosophy |
| 6 | + |
| 7 | +- **Aggressively minimal and elegant**: Keep implementations simple and focused |
| 8 | +- **Functional first**: Prefer functional approaches, use classes where justified |
| 9 | +- **Type-safe**: Full type annotations, modern Python syntax (3.10+) |
| 10 | +- **Private internals**: Keep implementation details "private" (e.g. `def _impl`) |
| 11 | + |
| 12 | +## Key Components |
| 13 | + |
| 14 | +- **Engine**: Core AI interaction layer |
| 15 | +- **Tasks**: Structured AI task definitions and execution |
| 16 | +- **Tools**: Extensible function calling capabilities |
| 17 | +- **Agents**: AI agents with tool access and memory |
| 18 | +- **Memory**: Persistent conversation and context storage |
| 19 | +- **Handlers**: Event processing and routing |
| 20 | +- **CLI**: Command-line interface for common operations |
| 21 | + |
| 22 | +## Development Guidelines |
| 23 | + |
| 24 | +### Type Hints |
| 25 | +- Use `X | Y` instead of `Union[X, Y]` |
| 26 | +- Use builtins like `list`, `dict` instead of `typing.List`, `typing.Dict` |
| 27 | +- Use `T | None` instead of `Optional` |
| 28 | + |
| 29 | +### Dependencies & Running |
| 30 | +- Use `uv` for dependency management and script execution |
| 31 | +- Install deps: `uv sync` or `uv sync --extra foo` |
| 32 | +- Run scripts: `uv run some/script.py` or `uv run --with pandas script.py` |
| 33 | +- Testing: `uv run pytest` or `uv run pytest -n3` for parallel |
| 34 | + |
| 35 | +### Finding Things |
| 36 | +- Use `rg` for searching, not grep |
| 37 | +- Use `ls` and `tree` for navigation |
| 38 | +- Check git context with `gh` and `git` commands |
| 39 | +- Think like a hacker with good intentions - search in site-packages when needed |
| 40 | + |
| 41 | +### Linter Philosophy |
| 42 | +- Empirically understand by running code |
| 43 | +- Linter tells basic truths but may be orthogonal to goals |
| 44 | +- Don't obsess over upstream linter errors, use as clues when relevant |
0 commit comments