code wiki / (root) / nx_scenario.nx

nx_scenario.nx

buildroot/runtime/nx_scenario.nx

6775 B186 linesdepth 0pulls 0 transitivereach 12 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_scenario.nx -- WRITING arc, rung W-SCN-1: the SCENARIO engine. Operator intent: "help provide scenarios" -- situations to write from, to role-play a language lesson in, or to practise a real social interaction. One engine, three uses, because a scenario has the same shape everywhere: kind: language | social | story (which lane consumes it) setting: where/when it happens roles: who is in it goal: what success looks like constraints: (optional) register / tense / "be respectful, read consent" level: (optional) difficulty (A2 / beginner / ...) topic: (optional) vocabulary / theme to keep going The scenario TEXT is operator/lane DATA (the seam: the engine structures, the generation seat expands). This organ PARSES + VALIDATES + EXTRACTS + emits the one-line BRIEF the seat consumes. Pure integer, NO syscalls, NO imports, caller owns buffers (the nx_note shape). Strict WHOLE-KEY matching: a key is only recognized at line start + immediately followed by ':', so the word "goal" appearing inside a value never satisfies the "goal" key. license_tier: ORIGINAL module: nishi-core.write.scenario depends: capability: WRITE_SCENARIO

dependencies 0 imports · 9 importers

nx_scenario.nx nx_campaign.nx nx_campaign_gate.nx nx_cite.nx nx_manga.nx nx_manga_gate.nx nx_mode.nx nx_scenario_gate.nx nx_writer_page.nx nx_writer_run.nx

imports: none

imported by: nx_campaign.nxnx_campaign_gate.nxnx_cite.nxnx_manga.nxnx_manga_gate.nxnx_mode.nxnx_scenario_gate.nxnx_writer_page.nxnx_writer_run.nx

structs

none

consts

none

functions

26func sc_next_line(buf: *u8, n: i64, i: i64) -> i64
41func sc_find_field(buf: *u8, n: i64, key: *u8) -> i64
96func sc_value_len(buf: *u8, n: i64, off: i64) -> i64
117func sc_has(buf: *u8, n: i64, key: *u8) -> i64
123func sc_copy_field(buf: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64
137func sc_validate(buf: *u8, n: i64) -> i64
147func sc_app_lit(out: *u8, p: i64, cap: i64, lit: *u8) -> i64
158func sc_app_field(buf: *u8, n: i64, key: *u8, out: *u8, p: i64, cap: i64) -> i64
177func sc_emit_brief(buf: *u8, n: i64, out: *u8, cap: i64) -> i64