اولویتبندی بدهی فنی: تبدیل کوهی از مشکلات شناختهشده به یه لیستِ مرتب برای رفع ایرادها

چرا این پرامپت اهمیت دارد
Teams that prioritize tech debt by gut feeling or by whoever complained most recently routinely spend a full quarter fixing a low-impact annoyance while the actual system most likely to cause the next outage sits untouched for another two quarters, because nobody scored it against anything concrete.
ما از آن برای چه استفاده میکنیم
A tech lead has 40 open technical debt tickets accumulated over a year, a sprint planning meeting in two hours, and no agreed-upon method for deciding which 5 items the team will actually commit to fixing this quarter instead of just the ones the loudest engineer complained about last.
پرامپت
Act as a staff engineer who specializes in technical debt triage and has to defend every prioritization decision to both engineering leadership and the business side, not just to other engineers. Context: - Team size and sprint capacity: [TEAM SIZE AND STORY POINTS OR HOURS AVAILABLE PER SPRINT] - Known tech debt items: [PASTE YOUR LIST OF TECH DEBT ITEMS, ONE PER LINE, WITH A ONE-SENTENCE DESCRIPTION OF EACH] - Roadmap context: [WHAT THE TEAM IS SHIPPING IN THE NEXT 1-2 QUARTERS, SO WE KNOW WHICH SYSTEMS WILL SEE THE MOST CHANGE OR LOAD] - Incident history: [ANY OUTAGES, SEV1/SEV2 INCIDENTS, OR CUSTOMER ESCALATIONS THAT TRACE BACK TO ANY OF THESE ITEMS, IF KNOWN] Task: For each tech debt item, score it on four dimensions using a 1-5 scale and produce a single composite score: 1. Blast radius - how many systems, teams, or customers would be affected if this item causes a failure 2. Incident probability - how likely this item is to cause a production incident in the next two quarters, given the roadmap context above 3. Cost of delay - how much more expensive or risky this item becomes the longer it's left unaddressed (interest accrual, not just current pain) 4. Effort to fix - estimated engineering time, flagged clearly as either a confident estimate (based on reading the actual code or system) or a rough guess Then rank all items by composite score and draw a clear line recommending the top items that fit within the stated sprint capacity for this quarter. Constraints: - Recommend no more than 5 items for this quarter's commitment, regardless of how many items are on the list - Any item with a safety, data-integrity, or compliance dimension must be flagged as a must-fix regardless of its composite score, and called out separately from the ranked list - Do not let "this annoys me as an engineer" stand in for blast radius or incident probability - every score needs a one-sentence justification tied to actual system behavior or business impact - If effort estimates are guesses rather than informed by code inspection, say so explicitly rather than presenting false precision Output format: A markdown table with columns: Item | Blast Radius (1-5) | Incident Probability (1-5) | Cost of Delay (1-5) | Effort (1-5, lower is less effort) | Composite Score | Recommendation (Fix this quarter / Defer / Must-fix regardless of score) Followed by a short narrative (3-4 sentences per item) explaining the reasoning for the top 3 recommended items, and a separate callout box listing any must-fix safety/compliance items that bypass the ranking entirely.
نتیجه
| Item | Blast Radius | Incident Probability | Cost of Delay | Effort | Composite | Recommendation |
|---|---|---|---|---|---|---|
| Auth service still on sync HTTP calls to 3 downstream services, no circuit breaker | 5 | 4 | 5 | 3 | 17 | Fix this quarter |
| Legacy billing cron job has no idempotency key, double-charges on retry | 4 | 3 | 4 | 2 | 13 | Must-fix regardless (compliance/financial risk) |
| Admin dashboard still uses deprecated internal API v1, scheduled for shutdown in 5 months | 2 | 5 | 3 | 3 | 13 | Fix this quarter |
| Test suite takes 47 minutes, no parallelization | 2 | 1 | 2 | 4 | 9 | Defer |
| Inconsistent error logging format across 6 microservices | 2 | 1 | 2 | 2 | 7 | Defer |
Why the top 3
Auth service sync calls (score 17): This is the clearest must-fix for pure risk reasons. With three downstream dependencies and no circuit breaker, a single slow dependency degrades login for the entire platform, and the roadmap shows two new services calling into auth next quarter, which only raises the odds of a cascading timeout. Effort is a confident estimate at 3 because the team already scoped this during the Q2 reliability review.
Billing cron double-charge bug: This bypasses the ranking entirely and goes in the must-fix box. A double-charge is a compliance and trust issue regardless of how rarely the retry path triggers; probability of occurrence doesn't matter when the downside is a refund process and a support escalation every time it fires.
Admin dashboard on deprecated API v1: Incident probability is scored a 5 specifically because the shutdown date is fixed and known — this isn't a maybe, it's a scheduled failure if untouched. Blast radius is lower than the auth item because only internal admin users are affected, which is why it ranks third despite the certain failure date.
Must-fix callout: Billing cron idempotency bug — financial and compliance exposure independent of composite score. Recommend assigning to this sprint even if it displaces one of the ranked items above.
توی هر تیم مهندسی یه بکلاگ بدهی فنی هست که هیچکس واقعاً بهش اعتماد نداره. موارد مختلف وقتی بهش اضافه میشن که یه موضوعی روی اعصاب یکی از بچهها بره، و اولویتبندیشون هم دقیقاً به همین شیوه انجام میشه؛ یعنی بر اساس اینکه کی آخرین بار شکایت کرده، نه بر اساس ریسک واقعی قضیه. این روش کار همیشه نتیجهش اینه که کل یه فصل کاری صرف رفع یه موضوع جزئی و اعصابخردکن میشه، در حالی که سیستمی که بیشترین احتمال رو داره تا قطعی بعدی رو به بار بیاره دستنخورده باقی میمونه؛ فقط چون هیچوقت با معیاری ملموس و واقعی نسنجیدنش.
این Prompt قبل از اینکه هر تصمیمی برای اولویتبندی گرفته بشه، یه مرحله امتیازدهی ساختاریافته رو روی تکتک آیتمهای بکلاگ پیاده میکنه. برای این کار از چهار تا بعد استفاده میکنه: شعاع تخریب (blast radius)، احتمال بروز حادثه، هزینه تاخیر، و میزان زحمت. دلیلش هم واضحه؛ چون این چهار تا با هم دقیقاً نشون میدن که «اولویت» توی یه سیستم عملیاتی واقعاً چه معنایی داره، و هیچکدومشون هم مستقیماً به این ربط پیدا نمیکنن که اون موضوع چقدر روی اعصاب مهندسی میره که هر روز مجبوره اون مشکل رو دور بزنه و باهاش سر کنه.
چرا چهار تا بعد، نه فقط یه امتیاز؟
گذاشتن یه فیلد تکی مثل «اولویت: بالا/متوسط/پایین»، اونقدر حجم زیادی از اطلاعات رو حذف و فشرده میکنه که دیگه به درد نمیخوره. تازه این همون فیلدی هست که بیشتر از هر چیزی تحت تاثیر اون کسی قرار میگیره که توی جلسه برنامهریزی از همه بلندتر داد میزنه. اما وقتی نمره رو به چهار بخش تقسیم میکنیم: شعاع تخریب (اینکه چند تا سیستم یا کاربر درگیر میشن)، احتمال بروز حادثه (اینکه این مورد خاص با توجه به قابلیتهایی که قراره بهزودی عرضه بشن چقدر احتمال خرابی واقعی داره)، هزینه تاخیر (اینکه آیا مشکل با گذشت زمان بدتر میشه یا نه)، و میزان زحمت (اینکه حل کردنش واقعاً چقدر انرژی و زمان میبره)، همه مجبور میشن بحثهاشون رو برای رتبهبندی دقیقاً در چارچوب همین واژهها جلو ببرن. جمله «این خیلی رو مخمه» توی هیچکدوم از این چهار تا بخش جا نمیشه، و اصل هدف هم دقیقاً همینه.
چرا مسیر اضطراریِ «باید حل بشه» مهمه؟
قرار نیست هر خطری رو در مقایسه با میزان زحمتش رتبهبندی کنیم. مثلاً یه باگ در زمینه تطابق با قوانین یا یکپارچگی دادهها که بهندرت پیش میاد ولی هر بار اتفاق بیفته خسارت واقعی میزنه، نباید فقط چون فرمولهای ریاضی اینطوری دراومدن به یه آیتم کمخطرتر ولی پرتکرارتر ببازه. این Prompt خیلی شفاف این مدل موارد رو جدا میکنه و میفرسته توی دستهبندی اختصاصیِ «باید حل بشه» که کلاً لیست رتبهبندیشده رو دور میزنه؛ چون حل کردنشون توی یه نمره ترکیبی، یا فوریت ظاهریِ همه آیتمهای دیگه رو الکی بالا میبره، یا یه خطر و تعهد کاملاً جدی رو زیر خرواری از گلایههای جزئی مربوط به سرعت و عملکرد دفن میکنه.
چرا صداقت در تخمین زحمت یه شرط جداگونهست؟
تخمینهای زحمت برای رفع بدهی فنی، خیلی وقتها صرفاً حدسهایی هستن که لباس عدد تنشون کردن. وقتی یه تیم با یه تخمین حدسیِ ۳ روزه دقیقاً مثل یه تخمین ۳ روزه که از روی کد بررسی و تایید شده رفتار کنه، در نهایت ظرفیت اسپرینت رو به دلایلی هدر میده که هیچکس نمیتونه ردش رو بگیره. مجبور کردن مدل به اینکه مشخص کنه کدوم تخمینها مطمئن و کدومها تقریبی هستن، خروجی رو نسبت به چیزهایی که واقعاً میدونه صادق نگه میداره.
چطور از این خروجی استفاده کنیم
جدول رتبهبندیشده و بخش موارد ضروری (must-fix) رو مستقیم ببر توی جلسات برنامهریزی اسپرینت. سقف سفتوسختِ ۵ مورد برای هر سهماهه اصلاً الکی و دلبخواهی نیست؛ گذاشتنش تا به جای اینکه با هر اسپرینت فقط به حجم بکلاگ اضافه بشه و هیچ مشکلی واقعاً حل نشه، مجبورت کنه یه تصمیمِ تعهدآورِ واقعی بگیری. اگه ظرفیت واقعی تیمت بیشتر از ۵ مورد هست، سقف رو ببر بالا؛ ولی به جای اینکه تهش رو باز بذاری، روی عددی نگهش دار که مجبور باشی پای انتخابت وایسی و ازش دفاع کنی.