Context framework for AI coding agents (Cursor, Claude Code, Windsurf) to build backend services with DDD and Hexagonal Architecture
# Tenets The tenets of writing quality backend code -- starting with Hexagonal Architecture and Domain-Driven Design. **Tenets** provides opinionated, battle-tested rules that your AI coding agents follow when building backend services. Install them with a single command and your agent immediately knows how to structure domains, ports, adapters, and everything in between. ## Why This Exists AI coding agents like Claude Code, Cursor, and GitHub Copilot can generate incredible amounts of code quickly. But **code quality still matters**. We're not at the point where we can be completely hands-off -- we constantly review, iterate, and guide these tools toward better implementations. For effective code review and collaboration with AI agents, we need **predictable design patterns**. This is even more crucial with AI-generated code since these tools can produce entire features at once, making architectural consistency vital for maintainability. Tenets solves this by giving your coding agents the context and rules they need upfront, so every generated line of code follows the same architectural principles your team agreed on. ### Architecture starts at the spec, not the code Most teams adopt spec-driven development (SDD) to plan features before building them -- writing specs, data models, and implementation plans that agents then execute. But without architectural guardrails baked into those planning artifacts, you end up with well-specified features that violate domain boundaries, leak infrastructure concerns into business logic, or skip the port/adapter structure entirely. Tenets bridges this gap by extending SDD frameworks with DDD and Hexagonal Architecture practices at the planning stage. When you spec a feature, you're prompted to define the ubiquitous language, declare the bounded context, identify candidate aggregates and entities, and check against your architecture constitution -- before a single line of code is written. By the time implementation begins
Agent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.