{Connector Name} Connector
{One-sentence description of what this connector integrates with.}
BEFORE WORKING ON THIS CODE
- Read this entire AGENTS.md first
- Read the SKILL.md in this directory for the API reference
- Check GOTCHAS.md at the project root for known issues with this connector
- Review the connector spec if one exists in
.opencode/plans/specs/
Architecture
This connector follows the 4-tier pattern (see CONSTITUTION.md):
| Tier | File | Purpose |
|---|
| Brain | {connector}_brain.py | Orchestration logic, decides what to do |
| Plumbing | {connector}_plumbing.py | HTTP calls, retries, rate limiting |
| Translator | {connector}_translator.py | Data transformation between API and domain models |
| Settings | {connector}_settings.py | Configuration, credentials, feature flags |
Data Flow
External API → Plumbing (raw response) → Translator (domain model) → Brain (business logic)
Key Files
| File | Purpose |
|---|
{connector}_brain.py | {What the brain orchestrates} |
{connector}_plumbing.py | {What API calls it makes} |
{connector}_translator.py | {What data it transforms} |
{connector}_settings.py | {What configuration it needs} |
models.py | {Domain models for this connector} |
API Integration
| Aspect | Detail |
|---|
| Base URL | {API Base URL} |
| Auth method | {API key / OAuth / Token} |
| Rate limits | {Requests per second/minute} |
| Sandbox | {Yes/No — sandbox URL if yes} |
Dependencies
- Internal: {What other packages this connector imports from}
- External: {Third-party libraries — httpx, etc.}
Constraints
- {Constraint 1 — e.g. "API rate limit is 30 requests/minute, plumbing handles throttling"}
- {Constraint 2 — e.g. "All API responses must be validated before passing to translator"}
- {Constraint 3 — e.g. "Settings must never contain hardcoded credentials"}
Testing
- Unit tests mock the Plumbing layer (no real API calls)
- Integration tests use the sandbox/test environment
- Test files:
tests/unit/test_{connector}_*.py
Common Tasks
Adding a new API endpoint
- Add the HTTP call in Plumbing
- Add response/request models in Translator
- Add orchestration logic in Brain
- Add any new settings to Settings
- Update SKILL.md with the new capability
Debugging API issues
- Check Settings for correct credentials
- Check Plumbing for raw request/response logging
- Check Translator for data mapping issues
- Check GOTCHAS.md for known API quirks