Architecture decision record (ADR) generator prompt
Describe a technical decision and get a structured ADR document covering context, alternatives, and consequences.
متى تستخدم هذا البرومبت
- When choosing between two frameworks, databases, or patterns for a project.
- When documenting why a past decision was made, for future maintainers.
- When a decision needs sign-off and a written record.
نص البرومبت
Write an Architecture Decision Record for the decision: {{focus}}. Include context, the decision, alternatives considered, and consequences. Project context: {{language}}/{{framework}}.
{{CLIPBOARD}}{{focus}}{{language}}{{framework}}{{CLIPBOARD}}الكتلة {{CLIPBOARD}} تُستبدل تلقائياً بما نسخته قبل الضغط على «نسخ».
كيف تستخدمه
- انسخ البرومبت بالزر أو املأ المتغيرات أولاً.
- الصقه في ChatGPT أو Claude أو Gemini.
- عدّل النتيجة أو أعد الطلب بتغيير المتغيرات.
مثال على النتيجة
# ADR 007: Use PostgreSQL over MongoDB for order data ## Context Order data is relational with strict consistency needs across payments and inventory. ## Decision Use PostgreSQL with foreign key constraints. ## Alternatives considered MongoDB, rejected due to weaker cross-collection consistency guarantees. ## Consequences Requires schema migrations for changes; gains ACID transactions across orders and inventory.
نصائح للاستخدام
- Describe the real alternatives you considered, not just the chosen option, for a fair record.
- Include constraints like team skills, budget, or timeline that shaped the decision.
- Store the finished ADR in a docs/adr folder with a sequential number for traceability.
النماذج الموصى بها
Claude
أسئلة شائعة
- Do I need to already know the outcome before writing this?
- Yes, ADRs record decisions already made or being finalized; for exploring options first, ask for a comparison instead.
- How long should an ADR be?
- Keep it to one page; the prompt defaults to that length unless you ask for more detail.