code wiki / _hdl_build / nx_market_hb.nx
nx_market_hb.nx source
↩ module page · 56 lines · 2998 B
1// nx_market.nx -- the NISHI MARKET RESEARCHER: sees what the team can CAPITALIZE on (operator). It
2// maps the team's capabilities to OPPORTUNITIES and scores each by VALUE x FEASIBILITY -- but only
3// recommends ones the team can actually DELIVER (its capability is at the grade the opportunity
4// REQUIRES, per the Examiner). High-value opportunities we can't deliver yet are HONESTLY flagged
5// BUILD-FIRST (they feed the Futurist + the backlog), not sold as ready. So the team chases value it
6// can actually ship, and knows exactly what to build to unlock the rest. composes Examiner (grades)
7// + Futurist (timing). RACI: Market Researcher scores; Builder builds the unlock; Scientist publishes
8// the proof a buyer/critic needs. license_tier: ORIGINAL Refs: grade-gated opportunity scoring.
9
10import "nx_sclass_grader.nx" // SG_* tiers as the required/held capability grade
11
12const MKT_CAPITALIZE: i64 = 1 // valuable AND deliverable now -> go
13const MKT_BUILD_FIRST: i64 = 2 // valuable but capability not at the required grade -> build the unlock
14const MKT_SKIP: i64 = 3 // not valuable enough
15
16// can the team DELIVER this opportunity? its held capability grade >= the grade the opportunity needs.
17func mkt_can_deliver(capability_grade: i64, required_grade: i64) -> i64 {
18 if capability_grade >= required_grade { return 1 }
19 return 0
20}
21
22// disposition for one opportunity.
23func mkt_disposition(value: i64, value_floor: i64, capability_grade: i64, required_grade: i64) -> i64 {
24 if value < value_floor { return MKT_SKIP }
25 if mkt_can_deliver(capability_grade, required_grade) == 1 { return MKT_CAPITALIZE }
26 return MKT_BUILD_FIRST
27}
28
29// prioritization score (value x feasibility) -- only meaningful for deliverable opportunities.
30func mkt_score(value: i64, feasibility: i64) -> i64 { return value * feasibility }
31
32// the top DELIVERABLE opportunity (max value x feasibility among those we can ship now); -1 if none.
33func mkt_top_deliverable(n: i64, value: *i64, feasibility: *i64, grade: *i64, required: *i64, value_floor: i64) -> i64 {
34 var best: i64 = 0 - 1; var bestscore: i64 = 0 - 1; var i: i64 = 0
35 while i < n {
36 if mkt_disposition(value[i], value_floor, grade[i], required[i]) == MKT_CAPITALIZE {
37 let s: i64 = mkt_score(value[i], feasibility[i])
38 if s > bestscore { bestscore = s; best = i }
39 }
40 i = i + 1
41 }
42 return best
43}
44
45// the highest-VALUE opportunity that is currently BLOCKED (build-first) -- names the unlock worth
46// building toward (the bridge from Market Researcher to Builder/Futurist).
47func mkt_top_unlock(n: i64, value: *i64, grade: *i64, required: *i64, value_floor: i64) -> i64 {
48 var best: i64 = 0 - 1; var bestv: i64 = 0 - 1; var i: i64 = 0
49 while i < n {
50 if mkt_disposition(value[i], value_floor, grade[i], required[i]) == MKT_BUILD_FIRST {
51 if value[i] > bestv { bestv = value[i]; best = i }
52 }
53 i = i + 1
54 }
55 return best
56}