code wiki / _hdl_build / nx_capability_map.nx

nx_capability_map.nx source

↩ module page · 43 lines · 2273 B

1// nx_capability_map.nx -- SEE what a competitor (product / language / tool) HAS vs what WE do, across 2// the TOP capability dimensions that matter -- grounded, not an infinite feature-by-feature search 3// (operator: it's too black-box, I want to know the breadth vs the market). Owned by the MARKET 4// RESEARCHER (competitive intelligence), composing the Genealogist's registry of OUR capabilities + 5// the Examiner's honest grades. For each dimension it returns where we stand: AHEAD / PARITY / BEHIND 6// / GAP (neither has it). The summary makes the honest picture visible: where the competitor's core 7// strength beats us, and where our unique capabilities lead. license_tier: ORIGINAL Refs: competitive 8// landscape mapping; the Examiner's honest grades. 9 10import "nx_syscalls.nx" 11 12const MAP_AHEAD: i64 = 1 // we have it and lead (they lack it, or our grade is higher) 13const MAP_PARITY: i64 = 2 // both have it, equal grade 14const MAP_BEHIND: i64 = 3 // they have it and lead (we lack it, or our grade is lower) 15const MAP_GAP: i64 = 4 // neither has it (an open frontier) 16 17// our standing on ONE dimension vs a competitor. grade scale S=4 A=3 B=2 (0 = does not have it). 18func map_standing(our_have: i64, our_grade: i64, they_have: i64, they_grade: i64) -> i64 { 19 if our_have == 0 { if they_have == 0 { return MAP_GAP } return MAP_BEHIND } 20 if they_have == 0 { return MAP_AHEAD } 21 if our_grade > they_grade { return MAP_AHEAD } 22 if our_grade < they_grade { return MAP_BEHIND } 23 return MAP_PARITY 24} 25 26// count dimensions with a given standing (the map summary). 27func map_count(n: i64, standings: *i64, target: i64) -> i64 { 28 var c: i64 = 0; var i: i64 = 0 29 while i < n { if standings[i] == target { c = c + 1 } i = i + 1 } 30 return c 31} 32 33// a single honest headline: are we NET ahead, behind, or mixed vs this competitor? 34const MAP_NET_AHEAD: i64 = 1 35const MAP_NET_BEHIND: i64 = 2 36const MAP_NET_MIXED: i64 = 3 37func map_net(n: i64, standings: *i64) -> i64 { 38 let ahead: i64 = map_count(n, standings, MAP_AHEAD) 39 let behind: i64 = map_count(n, standings, MAP_BEHIND) 40 if ahead > behind { if behind == 0 { return MAP_NET_AHEAD } } 41 if behind > ahead { if ahead == 0 { return MAP_NET_BEHIND } } 42 return MAP_NET_MIXED 43}