Cross-agent/cross-tool guidance for working with the AgentSesh codebase.
- Zero dependencies. Do not add runtime dependencies. If you need a library, implement the functionality using stdlib.
- Test first. Run
pytest tests/ -vbefore committing any changes. - Lint check. Run
ruff check sesh/before committing. - Use
make test,make lint,make formatfor common tasks.
- CLI subcommands:
sesh/commands/— dispatch is insesh/cli.py - Pattern detectors:
sesh/analyzers/patterns.py— register viaregister_pattern() - Audit metrics:
sesh/audit/metrics.py— register viaregister_metric() - Parsers:
sesh/parsers/— implementBaseParserprotocol - Formatters:
sesh/formatters/— display-only, no analysis logic
- All tests in
tests/using pytest - Helper functions named
_tc(),_make_*()for building test fixtures - Test files mirror source structure:
test_<module>.py - Run specific tests:
pytest tests/test_analyze.py -v
- Every command supports
--jsonfor machine-readable output - DB commands use
_get_db(args)for database resolution - Non-DB commands (
analyze,audit) work with just a file/directory path - MCP tools in
mcp_server.pymirror CLI commands but return strings