code wiki / _hdl_build / nx_pm_decision_matrix.nx
nx_pm_decision_matrix.nx source
↩ module page · 51 lines · 2662 B
1// nx_pm_decision_matrix.nx -- the PM's DECISION MATRIX: turn the team's per-dimension feedback into a
2// RANKED investment recommendation (a portfolio to APPROVE), not a binary this-or-that (operator: "a
3// decision making matrix for the pm taking the teams feedback into account based on the best research on
4// prioritization... so that it addresses the hardware, software, and users needs... i just want us getting
5// to the approval of investment and moving away from a this or a that").
6//
7// Method: WSJF (Weighted Shortest Job First) = Cost of Delay / Job Size -- the most economically grounded
8// prioritization (Reinertsen / SAFe). Cost of Delay is a multi-criteria (MCDA/AHP) weighted sum of the
9// THREE stakeholder values (hardware, software, user) + time-criticality. Confidence-adjusts RICE-style.
10// Weights are DATA (provisional; to be tuned by the /deep-research automated-prioritization findings).
11// license_tier: ORIGINAL
12
13import "nx_syscalls.nx"
14
15// Cost of Delay = w_hw*hw + w_sw*sw + w_user*user + w_time*time_criticality (each value 0..10).
16func dm_cost_of_delay(hw: i64, sw: i64, user: i64, time_crit: i64, w_hw: i64, w_sw: i64, w_user: i64, w_time: i64) -> i64 {
17 return hw * w_hw + sw * w_sw + user * w_user + time_crit * w_time
18}
19
20// WSJF = Cost of Delay / Job Size (effort). Higher = invest sooner. Scaled x100 for integer resolution.
21func dm_wsjf(cost_of_delay: i64, effort: i64) -> i64 {
22 if effort <= 0 { return 0 }
23 return cost_of_delay * 100 / effort
24}
25
26// confidence-adjust (RICE's C factor): scale a score by confidence in permil (1000 = certain).
27func dm_confidence_adjust(score: i64, confidence_permil: i64) -> i64 {
28 return score * confidence_permil / 1000
29}
30
31// is an item READY to invest in, or blocked by an unmet dependency? (dependencies change ordering)
32func dm_ready(deps_met: i64) -> i64 { if deps_met == 1 { return 1 } return 0 }
33
34// select the next-best READY, not-yet-picked item by score -> builds an ORDERED portfolio (not a choice).
35func dm_next_pick(scores: *i64, picked: *i64, ready: *i64, n: i64) -> i64 {
36 var best: i64 = 0 - 1; var bs: i64 = 0 - 1; var i: i64 = 0
37 while i < n {
38 if picked[i] == 0 { if ready[i] == 1 { if scores[i] > bs { bs = scores[i]; best = i } } }
39 i = i + 1
40 }
41 return best
42}
43
44// win-win-win check folded in: an item that REGRESSES any stakeholder is disqualified regardless of WSJF
45// (the anti-Windows-update law applies to investment too). returns 1 if all three values are >= 0.
46func dm_no_regression(hw: i64, sw: i64, user: i64) -> i64 {
47 if hw < 0 { return 0 }
48 if sw < 0 { return 0 }
49 if user < 0 { return 0 }
50 return 1
51}