xiaohongshu
xiaohongshu
Documenting significant architectural decisions with context, consequences, and rationale for future reference.
Full skill instructions
Architecture Decision Records (ADRs) are lightweight documents that capture important architectural decisions, their context, and consequences. They create a historical record of why systems are built the way they are.
Core Principle: "Document the 'why' behind architectural decisions, not just the 'what'."
An ADR documents:
# ADR-001: Use PostgreSQL for Primary Database
## Status
Accepted
## Context
We need a database for our e-commerce platform that handles:
- Complex transactions (orders, payments, inventory)
- ACID compliance requirements
- Relational data (users, products, orders)
- Expected scale: 100K users, 10K orders/day
## Decision
We will use PostgreSQL as our primary database.
## Alternatives Considered
### MongoDB
- **Pros**: Flexible schema, horizontal scaling
- **Cons**: Weaker transaction support, eventual consistency
- **Why rejected**: We need strong ACID guarantees for financial transactions
### MySQL
- **Pros**: Mature, widely used, good performance
- **Cons**: Less advanced features than PostgreSQL
- **Why rejected**: PostgreSQL's JSON support and advanced indexing better fit our needs
## Consequences
### Positive
- Strong ACID compliance for financial transactions
- Rich query capabilities (CTEs, window functions)
- JSON support for flexible product attributes
- Mature ecosystem and tooling
### Negative
- Vertical scaling limitations (can be mitigated with read replicas)
- More complex to operate than managed NoSQL solutions
- Learning curve for team members unfamiliar with SQL
## Implementation Notes
- Use Prisma ORM for type-safe database access
- Set up read replicas for scaling reads
- Use connection pooling (PgBouncer)
## Related Decisions
- ADR-002: Use Prisma ORM
- ADR-005: Database migration strategy
## Date
2024-01-15
## Authors
@alice, @bob
| Status | Meaning |
|---|---|
| Proposed | Under discussion |
| Accepted | Decision made and approved |
| Deprecated | No longer recommended |
| Superseded | Replaced by another ADR |
| Rejected | Considered but not chosen |
docs/adr/
├── README.md
├── 0001-use-postgresql.md
├── 0002-use-prisma-orm.md
├── 0003-adopt-microservices.md
├── 0004-use-react-frontend.md
└── template.md
# Install
npm install -g adr-log
# Create new ADR
adr new "Use PostgreSQL for primary database"
# List all ADRs
adr list
# Generate table of contents
adr generate toc
# Install
npm install -g log4brains
# Initialize
log4brains init
# Preview
log4brains preview
# Build static site
log4brains build
For smaller decisions:
# Use Tailwind CSS for styling
**Status**: Accepted
**Date**: 2024-01-15
## Decision
Use Tailwind CSS for all component styling.
## Rationale
- Utility-first approach speeds up development
- Consistent design system
- Smaller bundle size with PurgeCSS
- Team already familiar with it
## Consequences
- Need to learn Tailwind conventions
- HTML can become verbose
- Harder to share styles across projects
# ADR-003: Adopt Microservices Architecture
## Status
~~Accepted~~ **Superseded by ADR-010**
## Superseded By
[ADR-010: Return to Modular Monolith](0010-modular-monolith.md)
## Original Decision
[Keep original content for historical reference]
## Why Superseded
After 2 years of microservices:
- Operational complexity exceeded benefits
- Team size (5 engineers) too small to manage 12 services
- Network latency impacting user experience
- Distributed tracing and debugging challenges
See ADR-010 for new approach.
## ADR Review Checklist
- [ ] **Context Clear**: Is the problem well-defined?
- [ ] **Alternatives Listed**: Were other options considered?
- [ ] **Trade-offs Analyzed**: Pros and cons documented?
- [ ] **Consequences Identified**: Both positive and negative?
- [ ] **Stakeholders Consulted**: Relevant teams reviewed?
- [ ] **Implementation Plan**: Next steps clear?
- [ ] **Date and Authors**: Documented?
✅ Write ADRs for significant decisions ✅ Include alternatives considered ✅ Document trade-offs honestly ✅ Keep ADRs immutable (don't edit, supersede instead) ✅ Make ADRs easy to find (in repo, searchable)
❌ Write ADRs for trivial decisions ❌ Make ADRs too long (aim for 1-2 pages) ❌ Skip the "why" (context is crucial) ❌ Delete old ADRs (mark as superseded) ❌ Write ADRs after the fact (document during decision)
## PR Description
This PR implements the decision from [ADR-005: Use Redis for caching](../docs/adr/0005-redis-caching.md)
Changes:
- Add Redis client
- Implement cache layer
- Update documentation
// Per ADR-003, we use JWT for authentication
// See: docs/adr/0003-jwt-authentication.md
export function verifyToken(token: string) {
// ...
}
59-architecture-decision/tradeoff-analysis59-architecture-decision/tech-stack-selection59-architecture-decision/architecture-review00-meta-skills/decision-makingxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience