code wiki / (root) / nx_fin_grant.nx

nx_fin_grant.nx source

↩ module page · 51 lines · 2376 B

1// nx_fin_grant.nx -- R8 (Nishi Grants): pull in NON-DILUTIVE cash. Eligibility screening for SBIR/STTR (US 2// small business, <=500 employees, >=51% US-owned, for-profit), program-fit scoring to rank opportunities, 3// draft-completeness accounting (the 5 required sections), and the phase award caps (DATA -- adjust per agency 4// per year). The drafting itself composes Nishi Writer (nx_writecraft readability) as a follow-on wiring step. 5// Pure, i64. license_tier: ORIGINAL 6import "nx_syscalls.nx" 7 8const GR_SBIR_MAX_EMP: i64 = 500 // SBIR/STTR small-business ceiling 9const GR_SBIR_MIN_USOWN: i64 = 51 // >=51% US-owned 10const GR_PHASE1_CAP_CENTS: i64 = 27500000 // ~$275,000 typical Phase I 11const GR_PHASE2_CAP_CENTS: i64 = 180000000 // ~$1,800,000 typical Phase II 12 13// SBIR/STTR baseline eligibility. All four conditions required. 14func gr_sbir_eligible(is_small_biz: i64, employees: i64, us_owned_pct: i64, is_for_profit: i64) -> i64 { 15 if is_small_biz != 1 { return 0 } 16 if is_for_profit != 1 { return 0 } 17 if employees > GR_SBIR_MAX_EMP { return 0 } 18 if us_owned_pct < GR_SBIR_MIN_USOWN { return 0 } 19 return 1 20} 21 22// program-fit score for ranking opportunities (higher = better): topic-match % + phase-ready bonus + weighted 23// novelty. Weights are DATA (passed in). 24func gr_fit_score(topic_match_pct: i64, phase_ready: i64, novelty: i64, w_phase: i64, w_novelty: i64) -> i64 { 25 var s: i64 = topic_match_pct 26 if phase_ready == 1 { s = s + w_phase } 27 s = s + novelty*w_novelty 28 return s 29} 30 31// draft completeness = count of the 5 required sections present (abstract, innovation, commercialization, 32// budget, team/bios). 33func gr_draft_complete(has_abstract: i64, has_innovation: i64, has_commercial: i64, has_budget: i64, has_team: i64) -> i64 { 34 var c: i64 = 0 35 if has_abstract == 1 { c = c + 1 } 36 if has_innovation == 1 { c = c + 1 } 37 if has_commercial == 1 { c = c + 1 } 38 if has_budget == 1 { c = c + 1 } 39 if has_team == 1 { c = c + 1 } 40 return c 41} 42 43// ready to submit iff all 5 sections present. 44func gr_draft_ready(completeness: i64) -> i64 { if completeness >= 5 { return 1 } return 0 } 45 46// award cap (cents) for a phase (1 or 2), else 0. 47func gr_award_cap(phase: i64) -> i64 { 48 if phase == 2 { return GR_PHASE2_CAP_CENTS } 49 if phase == 1 { return GR_PHASE1_CAP_CENTS } 50 return 0 51}