code wiki / _hdl_build / nx_orchestrate_before_status_t49.nx

nx_orchestrate_before_status_t49.nx

buildroot/runtime/_hdl_build/nx_orchestrate_before_status_t49.nx

8808 B174 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic orchestrate
docsdependenciesstructsconstsfunctions

about

nx_orchestrate.nx -- ORCHESTRATION rung 3: the CONDUCTOR / the "call the API, it calls the team, the team runs the workstream" engine (operator 2026-07-10: "standard mcp apis so that we call the apis that call the teams that run the workstreams ... true orchestration like an orchestra ... key for autonomous capabilities"). Given an ACTIVITY (workstream), nx_orchestrate: (1) RESOLVES its RACI from the SSOT knowledge/registry/nishi_raci.tsv (role<TAB>activity<TAB>letters) -- the ONE Accountable role, the Responsible role(s), Consulted, Informed. NEVER fabricates: an activity with no Accountable row -> DENY (returns -1), so the orchestra can't engage a role that doesn't own it. (2) BINDS the runnable workstream ORGAN from knowledge/orchestration/workstreams.conf (activity<TAB>organ). (3) RECORDS the engagement durably on the seg-store (orchestration- prefix) -- who was engaged, what ran. (4) DISPATCHES: forks _offc/nx_sov_build_run.elf <organ> and wait4s it = the team actually runs the workstream (only with the run flag; resolve/plan is side-effect-free). This is what makes RACI-driven team orchestration STANDARD instead of needing the operator's explicit callout. Exposed as the nishi_orchestrate MCP tool (fork-exec backend, the nishi_compare precedent). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_raci_sov.nx nx_seg_store.nx nx_orchestrate_before_status_t

imports: nx_syscalls.nxnx_raci_sov.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main or_w sys_write or_slen or_eq orch_engage sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ orch_accountable sys_mmap ↻ orch_roles sys_mmap ↻ raci_read_all ss_open ss_open2 raci_row_h sys_mmap ↻ rsv_key ss_hget ss_close ss_close_seg sys_munmap ss_manifest_free or_field or_eq ↻ or_has_letter or_w ↻

structs

none

consts

20const OR_WS: *u8 = "knowledge/orchestration/workstreams.conf"
21const OR_STORE:*u8 = "knowledge/store/orchestration-"

functions

23func or_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: or_w
24func or_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){d[o]=s[i];o=o+1;i=i+1} d[o]=0 as u8; return o }
called by 1: orch_record
25func or_w(s: *u8) -> i64 { sys_write(1, s, or_slen(s)); return 0 }
called by 2: orch_engagemain calls 2: sys_writeor_slen
26func or_eq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
27func or_read(path: *u8, buf: *u8, cap: i64) -> i64
34func or_field(buf: *u8, ls: i64, le: i64, col: i64, dst: *u8) -> i64
43func or_has_letter(letters: *u8, L: u8) -> i64 { var i: i64=0; while letters[i]!=(0 as u8){ if letters[i]==L { return 1 } i=i+1 } return 0 }
called by 1: orch_roles
46func orch_roles(activity: *u8, L: u8, out: *u8) -> i64
73func orch_accountable(activity: *u8, out: *u8) -> i64
called by 1: orch_engage calls 2: sys_mmaporch_roles
81func orch_organ(activity: *u8, out: *u8) -> i64
100func orch_record(activity: *u8, acct: *u8, organ: *u8, verdict: *u8) -> i64
114func orch_dispatch(organ: *u8) -> i64
134func orch_engage(activity: *u8, do_run: i64) -> i64
163func main(argc: i64, argv: *i64) -> i64