26 lines
1.1 KiB
Markdown
26 lines
1.1 KiB
Markdown
|
|
# AGENTS.md - Coding Agent Guidelines
|
||
|
|
|
||
|
|
## Build/Test Commands
|
||
|
|
- **Check ledger**: `./commands/check` (validates beancount syntax)
|
||
|
|
- **Serve web UI**: `./commands/serve` (starts fava on port 8080)
|
||
|
|
- **Python tests**: `pytest` (single test: `pytest path/to/test.py::test_name`)
|
||
|
|
- **Install dependencies**: `uv sync` or `pip install -r requirements.txt`
|
||
|
|
|
||
|
|
## Project Structure
|
||
|
|
- **Main ledger**: `ledger/main.beancount` (entry point)
|
||
|
|
- **Accounts**: `ledger/accounts.beancount`
|
||
|
|
- **Transactions**: `ledger/transactions/YYYY/MM.beancount`
|
||
|
|
- **Python plugins**: `ledger/plugins/`
|
||
|
|
- **Commands**: `commands/` (bash scripts)
|
||
|
|
|
||
|
|
## Code Style & Conventions
|
||
|
|
- **Python**: Follow PEP 8, use type hints, snake_case naming
|
||
|
|
- **Beancount**: Use consistent account naming (Assets:Bank:Checking)
|
||
|
|
- **Imports**: Standard library first, third-party second, local imports last
|
||
|
|
- **Error handling**: Use namedtuples for custom errors in plugins
|
||
|
|
- **Documentation**: Clear docstrings for plugin functions
|
||
|
|
|
||
|
|
## Key Dependencies
|
||
|
|
- beancount 2.3.6 (double-entry accounting)
|
||
|
|
- fava 1.26.2 (web interface)
|
||
|
|
- pytest 7.4.3 (testing)
|