Auto-sync 2026-08-16 06:00:01
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
## PRINCIPLE #6: TECHNICAL DEBT — ISRAF VS INVESTMENT
|
||||
|
||||
### THE SCENARIO
|
||||
|
||||
You’re the Product Lead at a growing fintech startup. Your CEO bursts into your weekly sync: “The team is screaming. The frontend is a mess. We need a six-month refactor. But our investors want the next feature in two weeks.” You open your notebook. The Mujtahid in you asks: “What is the hukm of this debt? What is the maqsad of the codebase?” Your engineers are burning out. Your users are experiencing bugs. The CEO smells opportunity cost. You smell israf. You need a ruling — not a roadmap.
|
||||
|
||||
---
|
||||
|
||||
### DISCOVERY (ISTIQSA')
|
||||
|
||||
**PRODUCT_LEAD:** Let’s map the problem space. Draw an Opportunity Solution Tree. At the root: “Our codebase slows down delivery.” The opportunities: (1) Engineers spend 40% of sprint time fixing old bugs. (2) New features take 3x longer to ship than projected. (3) Onboarding crashes on legacy browsers. The solutions on the table: full refactor, incremental cleanup, freeze all features. But which opportunity do we actually solve? Run a JTBD interview: “When you push code, what job are you hiring the codebase to do?” Answer: “Get to production fast without breaking things.” Current codebase is failing that job. The real opportunity is not “refactor everything” — it’s “reduce the friction that makes every feature cost double.”
|
||||
|
||||
**MUJTAHID:** Istiqsa’ begins with the maqasid. Hifz al-Mal — preservation of wealth. Technical debt is wealth stored in code. If that wealth decays (through bad architecture, duplication, untested paths), it becomes israf. Allah says: *“Indeed, the wasteful are brothers of the devils”* (Quran 17:27). Israf is spending without benefit or spending more than needed. But in Usul, not all debt is israf. Debt can be a means (wasila) to a greater maslaha. So first we define the problem space: What kind of technical debt are we facing? The Debt Quadrant: **Prudent Debt** (taken knowingly, with a plan to repay, for urgent feature that grows revenue) vs **Reckless Debt** (taken without plan, ignoring cost). **Deliberate Debt** (intentional, temporary shortcut with a ticket) vs **Inadvertent Debt** (accidental, from ignorance or lack of process). The israf is in reckless and inadvertent debt — they waste the mal of the company (engineering time, user trust). The maqsad of discovering the debt type is to know whether the current situation is a *darura* (necessity) or a *tahsin* (luxury refactor). The hukm of refactoring depends on the maqsad: are we preserving wealth or just polishing?
|
||||
|
||||
---
|
||||
|
||||
### EVIDENCE (ISTIDLAL)
|
||||
|
||||
**PRODUCT_LEAD:** Quantitative daleel first. Pull these metrics: Cycle time per feature. Bug reopen rate. Deployment frequency. Code churn (lines changed per feature). Measure the “interest rate” on the debt: How many hours per sprint are burned on unplanned work (bugs, rework)? If that number exceeds 20% of capacity, the debt is compounding. Qualitative daleel: Interview three engineers. Ask: “What’s one decision you made last month that you regret because you didn’t have time to do it right?” Then ask: “What would you fix first if you had one week?” Also interview one user: “Have you noticed anything getting slower or more broken over the last three months?” Triangulate. If engineers say “we need to rewrite everything” but users say “it works fine,” that’s a signal. If users are complaining, that’s a different daleel. Evidence hierarchy: user behavior (qati’ al-dalala — clear indicator) trumps engineer opinion (zanni — probabilistic). But engineer opinion is qati’ al-thubut (certain source) about the code’s internal state.
|
||||
|
||||
**MUJTAHID:** In Istidlal, we rank evidence by strength. The highest daleel is the *maqsad* itself: Does this debt harm Hifz al-Mal? If the debt causes customer churn (loss of wealth) or blocks a revenue-generating feature (loss of opportunity), then it is israf. Next daleel: *qiyas* — analogize technical debt to a loan with riba. The “interest” on technical debt is the extra time each new feature costs. If the interest rate (extra cost per feature) is higher than the benefit of shipping fast, the debt becomes haram. But if the interest is low (e.g., a 5% overhead) and the feature brings 50% revenue growth, the debt is a valid *istihsan* (juristic preference for necessity). Measure the “interest” using the Product Lead’s metrics: extra hours per feature / baseline hours. That ratio is your *riba al-fadl* (excess). If it exceeds 30%, the debt is reckless. Also apply *sad al-dhara’i* (blocking the means to harm): If the team continues accumulating debt without a repayment plan, that path leads to israf. Block it now. But if the debt is deliberate and tracked (e.g., a ticket in the backlog with a deadline), it is permissible as a calculated risk. Write down the evidence in a table: Type of debt (prudent/reckless/deliberate/inadvertent), interest rate, maqsad harm, and ruling (halal/makruh/haram based on degree of israf).
|
||||
|
||||
---
|
||||
|
||||
### SHURA
|
||||
|
||||
**PRODUCT_LEAD:** Call a cross-functional sync. Invite: CEO, CTO, lead engineer, one customer support rep, one user (volunteer). Agenda: “We have a codebase problem. Show the evidence above. Now ask each stakeholder: What is the outcome you care about most?” CEO: “Speed to market.” CTO: “Quality.” Engineer: “Less firefighting.” Support rep: “Fewer user complaints.” User: “Stability.” Now use the Shura methodology: list all priorities, find the intersection. The intersection is: “We need to ship features without breaking things.” That’s the maqsad. Record dissent: if the CTO insists on a full rewrite, note that as a minority opinion but do not discard it. Shura is not voting; it’s weighing evidence and seeking the strongest argument (tarjih). The Product Lead’s role: synthesize. Output: a prioritized list of debt items (not a scope of work) ranked by “harm to Hifz al-Mal.” The shura decides: “We will pay down only the debt that is directly causing user-facing bugs or blocking a high-value feature. Everything else remains tracked but untouched.”
|
||||
|
||||
**MUJTAHID:** Shura in Usul is obligatory for those in authority (Quran 42:38). But the weight of each opinion depends on the *adalah* (trustworthiness) and *khibra* (expertise) of the speaker. The engineer has khibra on code cost. The CEO has khibra on business wealth. The user has khibra on experience. Do not give equal weight. The Mujtahid (you) must weigh: The engineer’s claim of “200 hours of debt” is a zanni estimate — it could be exaggerated. The user’s report of “app crashes every time I pay” is qati’ (certain) in effect. So the shura ruling leans toward fixing crash-causing debt first. Record all opinions, but the hukm is derived from the strongest daleel, not from consensus. Document the shura in a simple table: Stakeholder | Input | Weight (1-5 based on expertise and certainty) | Impact on Ruling. Then write a brief *ta’liq* (annotation) explaining why one view was preferred. This is your shura record — a living artifact for future retrospection.
|
||||
|
||||
*(End of Part 1. Continue to Part 2: Principle, Protocol, Muhasaba.)*
|
||||
Reference in New Issue
Block a user