Skip to content

Contributing

Terminal window
git clone https://github.com/danielbodnar/auto-sre-agents.git
cd auto-sre-agents
bun install
bunx wrangler@latest types

Use conventional branch names:

  • feat/description — new features
  • fix/description — bug fixes
  • chore/description — tooling, config, refactoring
  • docs/description — documentation changes

Follow Conventional Commits:

feat: add circuit breaker to FixAgent
fix: handle empty stack traces in fingerprinting
docs: update API reference for retry endpoint
chore: upgrade wrangler to 4.70
test: add integration tests for CodeTriage

Run the full test suite before submitting changes:

Terminal window
bun test

Tests are organized by layer:

DirectoryWhat
tests/types/Schema validation
tests/lib/Library unit tests
tests/agents/Agent unit tests
tests/integration/Cross-agent integration tests
Terminal window
bunx oxlint --fix .
  • TypeScript 5.9+ strict mode — no any, no implicit returns
  • Zod for all validation — every external input is validated
  • ESM onlyimport/export, never require()
  • Functional style — prefer functions and composition over classes
  • Arrow functions — always use arrow function syntax
  • ULID for IDs — lexicographically sortable, globally unique
  • Never execute untrusted code in the Worker process — always use Sandbox
  • Never embed secrets in source — use wrangler secret put
  • Agent-local SQLite for hot state, D1 for system of record
  • Zod validation at queue boundaries — both producer and consumer
  • All LLM text is sanitizedsanitizeForLlm() strips secrets before sending
  1. Create src/agents/my-agent.ts extending SentinelAgent
  2. Add HTTP endpoints via onRequest()
  3. Add the Durable Object binding to wrangler.jsonc
  4. Add to new_sqlite_classes in the migration tag
  5. Export the class from src/index.ts
  6. Add queue consumer handler in src/queues/consumers.ts if needed
  7. Add tests in tests/agents/
  8. Document in docs/src/content/docs/agents/