tenets
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 31 GitHub stars
Code Warn
- fs module — File system access in cli/scripts/bundle-content.js
- fs module — File system access in cli/src/commands/init.js
- fs module — File system access in cli/src/services/claude-writer.js
- fs module — File system access in cli/src/services/config-tracker.js
- fs module — File system access in cli/src/services/content-fetcher.js
- network request — Outbound network request in cli/src/services/content-fetcher.js
- fs module — File system access in cli/src/services/file-writer.js
Permissions Pass
- Permissions — No dangerous permissions requested
This is a CLI tool and context framework that writes architectural rules (Domain-Driven Design and Hexagonal Architecture) directly into your AI coding assistant's configuration files. It helps guide tools like Cursor, GitHub Copilot, and Claude Code to generate consistent, high-quality backend code.
Security Assessment
The overall risk is Low. The tool's primary function is creating and updating local text files, which safely explains the multiple file system access warnings. There is a single outbound network request detected in the content fetcher module, which is strictly necessary for the `update` command to pull the latest rules from the internet. There are absolutely no hardcoded secrets, no dangerous permissions requested, and no hidden shell command execution. It operates exactly as expected for a scaffolding utility, and its behavior is completely transparent.
Quality Assessment
The project is actively maintained, with its most recent push occurring just today. It uses the permissive and standard MIT license, and maintains a healthy level of community trust with 31 GitHub stars. The repository is well-documented, providing clear instructions and explicit transparency regarding how the tool modifies your local workspace.
Verdict
Safe to use.
Context framework for AI coding agents (Cursor, Claude Code, Windsurf) to build Python 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.
🚀 Quick Start
Install with the CLI
npx tenets init --claude
That's it. The DDD + Hexagonal Architecture tenets are now in your project's CLAUDE.md, ready for Claude Code to follow.
Pick Your Tool
npx tenets init --cursor # writes to .cursorrules
npx tenets init --copilot # writes to .github/copilot-instructions.md
npx tenets init --agents # writes to AGENTS.md
npx tenets init --claude # writes to CLAUDE.md
| Flag | Tool | Target File |
|---|---|---|
--claude |
Claude Code | CLAUDE.md |
--cursor |
Cursor | .cursorrules |
--copilot |
GitHub Copilot | .github/copilot-instructions.md |
--agents |
AGENTS.md | AGENTS.md |
Interactive Mode
Not sure which tool? Just run it without flags and follow the prompts:
npx tenets init
The CLI will walk you through selecting your tool and confirming the install.
Keeping Tenets Up to Date
As Tenets evolves with new patterns and learnings, update your project to the latest version:
npx tenets update
This pulls the latest rules and updates the files that were previously installed in your project.
🏗️ What's Inside
These tenets are based on years of building backend services using:
- Domain-Driven Design (DDD) -- Rich domain models, ubiquitous language, clear bounded contexts
- Hexagonal Architecture (Ports & Adapters) -- Separation of concerns, testability, technology independence
- Practical Patterns -- Aggregate design, domain events, application services, repository contracts, and more
Tenets covers the full spectrum of backend service development:
- Getting started with a new service from scratch
- Evolving an existing service with new features and capabilities
- Building multiple services that interact with each other
🎯 Language Support
Tenets currently focuses on Python implementations, providing concrete examples and patterns optimized for Python's language features and ecosystem.
We'd love to collaborate with experts in other languages to expand coverage. If you're experienced with Java, C#, Go, TypeScript, or other languages, contributions that translate these architectural rules into language-specific implementations are welcome.
🤝 Contributing
This is a living set of tenets based on real-world experience, and there's always room for improvement.
How to Contribute
- Open an Issue -- Propose new tenets, improvements, or discuss existing ones
- Submit a PR -- Add new patterns, fix examples, or improve clarity
- Share Examples -- Real-world implementations that follow Tenets rules
- Language Adaptations -- Help translate tenets to other languages
What We're Looking For
- 🔍 Uncovered Scenarios -- Backend development situations not yet addressed by the current tenets
- 🎨 Missing Design Patterns -- Additional patterns that complement DDD and Hexagonal Architecture
- 🛠️ Implementation Strategies -- Better approaches for distributed systems, event sourcing, or CQRS
- 🧪 Advanced Testing Patterns -- Testing strategies for complex domain logic and integration scenarios
- 📊 Real-World Examples -- Case studies showing Tenets rules applied in production systems
🧠 Philosophy
"I think of AI coding agents as another developer on my team -- I expect them to follow the same best practices."
These tenets ensure that:
- Code is reviewable -- Predictable patterns make AI-generated code easier to understand
- Architecture is consistent -- Clear tenets prevent architectural drift across features and services
- Teams can collaborate -- Shared tenets improve team efficiency, whether the author is human or AI
- Systems remain maintainable -- Good architecture scales with your codebase
📚 Additional Resources
- Domain-Driven Design by Eric Evans
- Hexagonal Architecture by Alistair Cockburn
- Clean Architecture by Robert Martin
📄 License
MIT License -- see LICENSE file for details.
⭐ Support
If Tenets helps you build better backend services with AI agents, please:
- ⭐ Star this repository
- 🔗 Share with your team
- 💬 Open discussions for improvements
- 🤝 Contribute your own learnings
Tenets for better backend services -- one rule at a time.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found