code wiki / _hdl_build / nx_opportunity_loop.nx

nx_opportunity_loop.nx

buildroot/runtime/_hdl_build/nx_opportunity_loop.nx

2525 B49 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_opportunity_loop.nx -- the team's SELF-RUNNING opportunity-evaluation loop, made explicit so its state is a fact (operator: "where are we on the self running loop evaluating opportunities"). The cycle, with the organ that owns each stage: SCAN (Market Researcher: capability -> opportunity) -> EVALUATE (value x feasibility; Critic/Examiner/ Referee judge) -> PRIORITIZE (layered-backlog frontier x growth-target = the next move) -> EXECUTE (Builder authors / Engineer builds) -> JUDGE (Referee, objective) -> BANK (self-model; Teacher M0->M4) -> loop. Every stage is TEAM-owned EXCEPT EXECUTE when a brand-NEW module must be authored (the novel-module LLM-gap) -- so the loop runs AUTONOMOUSLY on existing search spaces and is Claude-gated only when inventing a new primitive. license_tier: ORIGINAL Composes nx_market + nx_layered_backlog + nx_self_sufficiency + nx_referee + nx_team_scorecard.

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_opportunity_loop.nx nx_opportunity_loop_test.nx

imports: nx_syscalls.nx

imported by: nx_opportunity_loop_test.nx

structs

none

consts

14const OL_SCAN: i64 = 1
15const OL_EVAL: i64 = 2
16const OL_PRIO: i64 = 3
17const OL_EXEC: i64 = 4
18const OL_JUDGE:i64 = 5
19const OL_BANK: i64 = 6
20const OL_NSTAGE: i64 = 6
22const OL_TEAM: i64 = 1
23const OL_CLAUDE: i64 = 2

functions

26func ol_stage_owner(stage: i64, novel_module_needed: i64) -> i64
32func ol_autonomous_stages(novel_module_needed: i64) -> i64
called by 1: main calls 1: ol_stage_owner
39func ol_runs_autonomously(novel_module_needed: i64) -> i64 { if novel_module_needed == 0 { return 1 } return 0 }
called by 1: main
42func ol_score(value: i64, feasibility: i64) -> i64 { if feasibility <= 0 { return 0 } return value * feasibility }
called by 2: ol_pick_topmain
45func ol_pick_top(values: *i64, feas: *i64, n: i64) -> i64
called by 1: main calls 1: ol_score