code wiki / _hdl_build / nx_maint_council.nx

nx_maint_council.nx

buildroot/runtime/_hdl_build/nx_maint_council.nx

3492 B76 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic maint
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_maint_council.nx nx_maint_report.nx

imports: nx_syscalls.nx

imported by: nx_maint_report.nx

structs

none

consts

12const SEV_NONE: i64 = 0
13const SEV_LOW: i64 = 1
14const SEV_MED: i64 = 2
15const SEV_HIGH: i64 = 3
18const ML_DUPLICATION: i64 = 0 // DRY: a pattern repeated in 3+ places -> belongs in shared/
19const ML_COUPLING: i64 = 1 // blast radius: one change forces edits across many modules
20const ML_MAGIC: i64 = 2 // magic numbers / hardcoded values not in config
21const ML_ABSTRACTION: i64 = 3 // missing base class / shared lib (copy-paste boilerplate)
22const ML_DRIFT: i64 = 4 // dead / stale / divergent copies
23const ML_NLENS: i64 = 5
26const MC_OK: i64 = 0 // healthy -- monitor
27const MC_SCHEDULE: i64 = 1 // debt accruing -- schedule a refactor before it compounds
28const MC_REFACTOR: i64 = 2 // debt critical -- refactor now (the Y2K-avoidance trigger)

functions

31func mc_council_severity(op: *i64, n: i64) -> i64
called by 1: main
51func mc_council_action(op: *i64, n: i64) -> i64
called by 1: main
64func 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
69func mc_blast_radius_permil(touched: i64, total: i64) -> i64 { if total <= 0 { return 0 } return touched * 1000 / total }
called by 1: main
70func mc_easy_update(blast_permil: i64, threshold_permil: i64) -> i64 { if blast_permil <= threshold_permil { return 1 } return 0 }
called by 1: main
72func mc_action_label(a: i64) -> *u8
called by 1: main