code wiki / (root) / nx_plan_svc.nx

nx_plan_svc.nx

buildroot/runtime/nx_plan_svc.nx

5336 B133 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic plan
docsdependenciesstructsconstsfunctions

about

nx_plan_svc.nx -- PRODUCTION-PLAN SERVICE FACADE. The fourth organ on the nx_service base, and the one that answers the operator's actual question: "help us get a plan on what we need to do." One call takes a product concept and returns the readiness score, the single next gap in kill-order, the concrete action to close it, and whether what remains is a broken concept or just paperwork. This is the recombination layer -- it composes the ingredient, jurisdiction, formulation and economics libraries through nx_prodready into one plan. Four facades now share the nx_service base (go-to-market, lab-science, QC, plan). USAGE: nx_plan_svc <verb> [args...] describe assess <mask> <market> <format> <retail_cents> <margin_permil> <servings> <max_units> <identity> <gmp> <claims> <coa> mask = bitmask of ingredient ids (bit i => ingredient i present) market = SJ_* (0=US 1=EAEU/Belarus ...) format = 1 capsule, 2 powder the last four are 0/1 operator attestations Every number comes from the gated nx_prodready engine; this facade only shapes the plan into JSON. genealogy_id: supplement_gtm + service_infrastructure

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_service.nx nx_grounding.nx nx_supp_ingredient.nx nx_supp_jurisdiction.nx nx_prodready.nx nx_plan_svc.nx

imports: nx_syscalls.nxnx_service.nxnx_grounding.nxnx_supp_ingredient.nxnx_supp_jurisdiction.nxnx_prodready.nx

imported by: nobody (leaf or entry point)

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

main nx_json_new sys_mmap plan_dispatch nsvc_arg plan_describe nsvc_ok_open nj_putc nj_kv_int nj_key nj_putstr nj_putc ↻ nj_puti nj_putc ↻ sys_mmap ↻ nj_comma nj_putc ↻ nj_kv_str nj_key ↻ nj_putstr ↻ nj_kv_bool nj_key ↻ nj_puts nj_putc ↻ nj_key ↻ nj_kv_str ↻ nj_comma ↻ nj_kv_int ↻ nj_key ↻ nj_puts ↻ nsvc_ok_close_g nsvc_ground nj_comma ↻ nj_kv_str ↻ gnd_name nj_kv_bool ↻ gnd_is_verified gnd_meaning nsvc_ok_close nj_putc ↻

structs

none

consts

32const PLAN_MAGIC_8192: i64 = 8192
34const PLAN_SVC: *u8 = "plan" as *u8

functions

38func plan_describe(j: *NxJson) -> i64
56func plan_build(argc: i64, argv: *i64) -> *NxProduct
76func plan_assess(j: *NxJson, argc: i64, argv: *i64) -> i64
119func plan_dispatch(argc: i64, argv: *i64, j: *NxJson) -> i64
128func main(argc: i64, argv: *i64) -> i64