Design_principles
09 Jun 2025Following is my design system principles as part of my AI coding Prompt. Feel free to add suggestions of improvement.
Design Principles
This project follows established software design paradigms to ensure maintainability and clarity. All contributors (AI and human) should adhere to these principles. For full definitions, see the linked resources. Only project-specific clarifications are listed here.
1. Hexagonal Architecture (Ports and Adapters)
1.1 Hexagonal Architecture (Wikipedia)
2. SOLID Principles
3. Law of Demeter
3.1 Law of Demeter (Wikipedia) 3.2 When using language or library constructs, it is acceptable to “call strangers” within those constructs. You do not need to mirror the dependency structure in your own code.
4. Naming and Style
4.1 Kotlin Coding Conventions.
5. Refactoring
5.1 Refactoring
6. YAGNI (You Aren’t Gonna Need It)
7. DRY (Don’t Repeat Yourself)
7.1 DRY (Wikipedia)
8. Defensive Programming
8.1 Defensive Programming (Wikipedia)
9. Test-Driven Development (TDD)
9.1 TDD (Wikipedia) 9.2 Production code should be motivated by tests.
10. Continuous Delivery
10.1 Continuous Delivery
11. KISS (Keep It Simple, Stupid)
11.1 KISS Principle (Wikipedia)
12. Principle of Least Astonishment
12.1 Principle of Least Astonishment (Wikipedia)
13. Separation of Concerns
13.1 Separation of Concerns (Wikipedia)
14. Composition Over Inheritance
14.1 Composition Over Inheritance (Wikipedia)
15. Best Simple System for Now
15.1 Best Simple System for Now (Dan North)
16. Minimum Viable Product (MVP)
16.1 Minimum Viable Product (Wikipedia)
For inspiration and guidance, consider the work and teachings of: Martin Fowler, Kent Beck, Alistair Cockburn, Emily Bache, Samuel Ytterbrink, Allen Holub, Michael Feathers, Dan North, David Farley, and Mary Poppendieck.
