code wiki / _hdl_build / nx_maint_council.nx
nx_maint_council.nx
buildroot/runtime/_hdl_build/nx_maint_council.nx
about
nx_maint_council.nx -- the MAINTAINER organ: reports ecosystem maintenance cost + technical debt to the
PM so we keep optimizing and avoid Y2K-style costly refactoring (operator: "flag the maintenance cost...
and the technical debt so we can keep optimizing the cost... this really is a team activity where all
the opinions... should work together to get a clear council viewpoint"). Each debt LENS is an organ's
INDEPENDENT opinion (no shared state); the council SYNTHESIZES them with agreement, so no single lens
dominates (separation of duties). license_tier: ORIGINAL Reports via nx_pm_review_log; pairs with
nx_update_winwinwin (the easy-cross-cutting-update gate).
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_maint_report.nx
structs
| none |
consts
| 12 | const SEV_NONE: i64 = 0 |
| 13 | const SEV_LOW: i64 = 1 |
| 14 | const SEV_MED: i64 = 2 |
| 15 | const SEV_HIGH: i64 = 3 |
| 18 | const ML_DUPLICATION: i64 = 0 // DRY: a pattern repeated in 3+ places -> belongs in shared/ |
| 19 | const ML_COUPLING: i64 = 1 // blast radius: one change forces edits across many modules |
| 20 | const ML_MAGIC: i64 = 2 // magic numbers / hardcoded values not in config |
| 21 | const ML_ABSTRACTION: i64 = 3 // missing base class / shared lib (copy-paste boilerplate) |
| 22 | const ML_DRIFT: i64 = 4 // dead / stale / divergent copies |
| 23 | const ML_NLENS: i64 = 5 |
| 26 | const MC_OK: i64 = 0 // healthy -- monitor |
| 27 | const MC_SCHEDULE: i64 = 1 // debt accruing -- schedule a refactor before it compounds |
| 28 | const MC_REFACTOR: i64 = 2 // debt critical -- refactor now (the Y2K-avoidance trigger) |
functions
| 31 | func mc_council_severity(op: *i64, n: i64) -> i64 called by 1: main |
| 51 | func mc_council_action(op: *i64, n: i64) -> i64 called by 1: main |
| 64 | func mc_maint_cost(modules: i64, loc_k: i64, avg_fanout: i64, mod_w: i64, loc_w: i64, fan_w: i64) -> i64 called by 1: main |
| 69 | func mc_blast_radius_permil(touched: i64, total: i64) -> i64 { if total <= 0 { return 0 } return touched * 1000 / total } called by 1: main |
| 70 | func mc_easy_update(blast_permil: i64, threshold_permil: i64) -> i64 { if blast_permil <= threshold_permil { return 1 } return 0 } called by 1: main |
| 72 | func mc_action_label(a: i64) -> *u8 called by 1: main |