An architecture decision prompt should compare plausible alternatives under identical workload and correctness assumptions. Record what each option gains, what it costs, its failure behavior, and the evidence needed before acceptance. Avoid a feature checklist in which one option is given the best implementation and the other a straw version. Name which consequences are reversible and which require data migration or client contract changes. A decision record may be proposed, accepted, or superseded; a new choice should preserve the reason the earlier one was made. The model can draft the comparison, but measured tests and an accountable reviewer settle the decision.
Architecture decisions: compare real alternatives and consequences
Operational case
For Receipt Ingest, direct writes keep a simple request path and can return a durable result immediately, but a writer slowdown may push latency or failure to clients. A bounded queue can absorb short bursts and decouple acceptance from processing, but it changes the meaning of 'accepted' and requires backlog monitoring, replay rules, and a dead-letter path. Both need request-ID deduplication to avoid duplicate receipts. The prompt asks whether a client needs a final receipt in the same response; if so, queueing cannot be treated as equivalent without a new status contract. The engineering lead proposes one option only after a load test and client review.
Option A: direct write; simple response; writer failure reaches client.
Option B: bounded queue; async completion; backlog and replay duties.
Shared invariant: request ID yields at most one durable receipt.
Open contract: does HTTP acceptance mean complete or enqueued?
Decision status: proposed until client and load evidence are reviewed.Performance and operating cost
Comparing O alternatives against C constraints takes O(OC) explicit checks. The matrix is small; quality depends on using the same evidence for both options. Queueing adds storage proportional to arrival rate multiplied by backlog duration, plus worker and operational cost. Direct writes avoid that queue but may need spare writer capacity for burst traffic. A model should state these costs as conditional rather than pretend to price a system without retention, traffic mix, or infrastructure rates.
Common Mistakes
- Do not compare a complete queue design with an unrealistically weak direct-write design.
- Do not equate enqueue acknowledgement with a durable completed receipt.
- Do not erase a superseded decision and its reason.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Report summaries: preserve contrary results and missing data
- Instruction conflicts: resolve authority before wording
- Schema migration prompts: check old and new clients together
- Architecture prompts: start with constraints and an owner
- Capacity prompts: check units, headroom, and a failed worker
- Architecture prompts: test the failure path and its signals
- Architecture release: require evidence, rollback, and ownership
- Project: review a receipt-ingest architecture decision
- Architecture-decision prompt checks
