code wiki / (root) / nx_directors_note.nx

nx_directors_note.nx

buildroot/runtime/nx_directors_note.nx

19718 B452 linesdepth 2pulls 2 transitivereach 13 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_directors_note.nx -- the canonical "director's note" envelope. Per cardinal feedback-arc-and-moment-are-king-cinematographer-pattern: arc + moment ARE the director. Everything downstream (scene composer, prompt builder, wardrobe, gen-img, quality gate) is CREW executing the director's vision. Falling back to a downstream service's defaults = ignoring the director = the 3000-batch sprawl. This primitive is the typed envelope that flows through the entire render pipeline. Every service consumes a *DirectorsNote (never a flat dict), reads what it needs, raises NX_DN_UNDERSPECIFIED if a required field is unset. No service is allowed to silently default. Per cardinal feedback-new-capabilities-go-to-nishilang-not-python: this lives in NishiLang, not in Python. Elder AI's Python services will subprocess-consume the compiled binary (or HTTP-call a NishiLang micro-service wrapping it) as the migration progresses. Per cardinal feedback-audit-before-build-togaf-into-complete-system: audited existing nx_ primitives 2026-05-15 — no current primitive owns this concept. `nx_mise_en_scene` is render-side scoring (not the authority). `nx_sketch_moments` is statistical moments (not narrative). `nx_beauty_score` ships the AwardClass enum we compose against here, not duplicate. Per cardinal feedback-linux-clear-tools-not-sprawl: this is ONE tool with ONE job — carry the director's intent end-to-end. No business logic; just the typed envelope + validators + builders. === Composition ================================================== nx_beauty_score.nx AwardClass constants (S/A/B/OFF_CANON) nx_canon_proportions proportion canon (substrate of anatomy) nx_string_ops buf+len string handling for names/keys nx_result typed OK/ERR envelope nx_tier nx_int / nx_size aliases genealogy_id: aristotle_unities + chomsky_grammar + brecht_alienation_effect + eisenstein_montage + propp_morphology + houdini_director_sop lineage_id: nx_directors_note_v1

dependencies 2 imports · 11 importers

nx_syscalls.nx nx_tier.nx nx_directors_note.nx nx_batch_audit_sidecar.nx nx_batch_audit_sidecar_test.nx nx_director_pipeline.nx nx_director_pipeline_test.nx nx_directors_note_test.nx nx_intent_survival.nx nx_intent_survival_test.nx nx_moment_resolve.nx nx_moment_resolve_test.nx nx_world_state.nx

diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_batch_audit_sidecar.nxnx_batch_audit_sidecar_test.nxnx_director_pipeline.nxnx_director_pipeline_test.nxnx_directors_note_test.nxnx_intent_survival.nxnx_intent_survival_test.nxnx_moment_resolve.nxnx_moment_resolve_test.nxnx_world_state.nxnx_world_state_test.nx

structs

241struct BodyMark
274struct DirectorsNote

consts

57const NX_DR_EXTERNAL_USER: nx_int = 0 // human user typed an explicit request
58const NX_DR_EXTERNAL_SYSTEM: nx_int = 1 // batch driver, scheduler, scene planner
59const NX_DR_COMPANION: nx_int = 2 // companion (Elara) authored from her own decisions
60const NX_DR_ARC_AUTHORED: nx_int = 3 // hand-curated arc-stage author
61const NX_DR_DYNAMIC_LLM: nx_int = 4 // LLM-generated arc
62const NX_DR_N_ROLES: nx_int = 5
77const NX_CD_MUNDANE: nx_int = 0 // study, cooking, reading, dressing
78const NX_CD_INTIMATE: nx_int = 1 // romance, affection, sensual
79const NX_CD_EROTIC: nx_int = 2 // explicit sexual content
80const NX_CD_FANTASY: nx_int = 3 // magic, mythical, otherworldly
81const NX_CD_RPG: nx_int = 4 // combat, exploration, dialogue
82const NX_CD_NARRATIVE: nx_int = 5 // story beats, character moments
83const NX_CD_N_DOMAINS: nx_int = 6
98const NX_AF_NEUTRAL: nx_int = 0
99const NX_AF_VULNERABLE: nx_int = 1
100const NX_AF_PLAYFUL: nx_int = 2
101const NX_AF_DOMINANT: nx_int = 3
102const NX_AF_INTIMATE: nx_int = 4
103const NX_AF_ANXIOUS: nx_int = 5
104const NX_AF_JOYFUL: nx_int = 6
105const NX_AF_MELANCHOLIC: nx_int = 7
106const NX_AF_FOCUSED: nx_int = 8 // studying, working, reading
107const NX_AF_REVERENT: nx_int = 9 // awe, worship, profound moment
108const NX_AF_PLAYFUL_BRATTY: nx_int = 10
109const NX_AF_N_AXES: nx_int = 11
122const NX_ST_STAGE_POOL: nx_int = 0 // picked from arc stage's pool
123const NX_ST_CONSTELLATION: nx_int = 1 // pre-validated cluster
124const NX_ST_EROTIC_SCENARIO: nx_int = 2 // choreography source
125const NX_ST_CHAT_OVERRIDE: nx_int = 3 // user typed an override
126const NX_ST_COMPANION_DECISION: nx_int = 4 // Elara picked this
127const NX_ST_DYNAMIC_EXPANSION: nx_int = 5 // LLM-expanded for novelty
128const NX_ST_POV_SCENARIO: nx_int = 6 // POV framing source
129const NX_ST_N_TAGS: nx_int = 7
145const NX_DN_AWARD_UNVERIFIED: nx_int = 0 // = NX_BEAUTY_UNKNOWN
146const NX_DN_AWARD_S_CLASS: nx_int = 1 // = NX_BEAUTY_S_CLASS
147const NX_DN_AWARD_A_CLASS: nx_int = 2 // = NX_BEAUTY_A_CLASS
148const NX_DN_AWARD_B_CLASS: nx_int = 3 // = NX_BEAUTY_B_CLASS
149const NX_DN_AWARD_OFF_CANON: nx_int = 4 // = NX_BEAUTY_OFF_CANON
150const NX_DN_AWARD_N_CLASSES: nx_int = 5
163const NX_PFT_GOOD: nx_int = 0 // ship, archive as exemplar
164const NX_PFT_DRIFT: nx_int = 1 // ship + log trend, NO regen
165const NX_PFT_BROKEN: nx_int = 2 // block + regen with corrective phrasing
166const NX_PFT_N_TIERS: nx_int = 3
179const NX_DN_UNDERSPEC_NONE: nx_int = 0
180const NX_DN_UNDERSPEC_OUTFIT: nx_int = 1
181const NX_DN_UNDERSPEC_LOCATION: nx_int = 2
182const NX_DN_UNDERSPEC_POSE: nx_int = 3
183const NX_DN_UNDERSPEC_AFFECT: nx_int = 4
184const NX_DN_UNDERSPEC_LIGHTING: nx_int = 5
185const NX_DN_UNDERSPEC_CAMERA: nx_int = 6
186const NX_DN_UNDERSPEC_ACTIVITY: nx_int = 7
187const NX_DN_UNDERSPEC_CHARACTER: nx_int = 8
188const NX_DN_UNDERSPEC_BODY_ARCHETYPE: nx_int = 9
189const NX_DN_UNDERSPEC_DOMAIN: nx_int = 10
190const NX_DN_UNDERSPEC_N_CODES: nx_int = 11
204const NX_PERSP_POV: nx_int = 0 // she's engaging with you
205const NX_PERSP_POV_BOYFRIEND: nx_int = 1 // boyfriend POV, intimate framing
206const NX_PERSP_VOYEUR: nx_int = 2 // you're watching unnoticed
207const NX_PERSP_CANDID: nx_int = 3 // candid/natural, aware but not posing
208const NX_PERSP_SELFIE: nx_int = 4 // she's taking a selfie
209const NX_PERSP_THIRD: nx_int = 5 // cinematic third-person
210const NX_PERSP_N_PERSPS: nx_int = 6
218const NX_SHOT_ECU: nx_int = 0 // extreme close-up (eyes, lips)
219const NX_SHOT_BCU: nx_int = 1 // big close-up (face fills frame)
220const NX_SHOT_CU: nx_int = 2 // close-up (head and shoulders)
221const NX_SHOT_MCU: nx_int = 3 // medium close-up (chest up)
222const NX_SHOT_MS: nx_int = 4 // medium shot (waist up)
223const NX_SHOT_MWS: nx_int = 5 // medium wide shot (knees up)
224const NX_SHOT_WS: nx_int = 6 // wide shot (full body)
225const NX_SHOT_FS: nx_int = 7 // full shot (full body with environment)
226const NX_SHOT_N_SHOTS: nx_int = 8
249const NX_BMK_HICKEY: nx_int = 0
250const NX_BMK_SWEAT: nx_int = 1
251const NX_BMK_TEARS: nx_int = 2
252const NX_BMK_WETNESS: nx_int = 3
253const NX_BMK_FLUSH: nx_int = 4
254const NX_BMK_SALIVA: nx_int = 5
255const NX_BMK_N_KINDS: nx_int = 6
324const NX_DN_FIELDS: nx_int = 31 // total fields in DirectorsNote
325const NX_DN_BYTES: nx_int = 248 // = 31 * 8; NishiLang consts must be literals

functions

64func nx_dr_role_is_valid(r: nx_int) -> nx_int
85func nx_cd_domain_is_valid(d: nx_int) -> nx_int
111func nx_af_axis_is_valid(a: nx_int) -> nx_int
131func nx_st_tag_is_valid(t: nx_int) -> nx_int
called by 1: main
152func nx_dn_award_is_valid(a: nx_int) -> nx_int
called by 1: main
168func nx_pft_tier_is_valid(t: nx_int) -> nx_int
called by 1: main
192func nx_dn_underspec_is_valid(c: nx_int) -> nx_int
called by 1: main
212func nx_persp_is_valid(p: nx_int) -> nx_int
228func nx_shot_is_valid(s: nx_int) -> nx_int
257func nx_bmk_kind_is_valid(k: nx_int) -> nx_int
called by 1: main
333func nx_dn_alloc() -> *DirectorsNote
376func nx_dn_validate_for_render(dn: *DirectorsNote) -> nx_int
397func nx_dn_award_class(dn: *DirectorsNote) -> nx_int { return dn.award_class }
398func nx_dn_preflight_tier(dn: *DirectorsNote) -> nx_int { return dn.preflight_tier }
399func nx_dn_director_role(dn: *DirectorsNote) -> nx_int { return dn.director_role }
400func nx_dn_content_domain(dn: *DirectorsNote) -> nx_int { return dn.content_domain }
called by 1: main
401func nx_dn_affect_axis(dn: *DirectorsNote) -> nx_int { return dn.affect_axis }
402func nx_dn_underspec_code(dn: *DirectorsNote) -> nx_int { return dn.underspec_code }
410func nx_dn_tier_from_award(award: nx_int) -> nx_int
called by 1: main
426func nx_dn_companion_authored(dn: *DirectorsNote,
called by 1: main
440func nx_dn_external_system_authored(dn: *DirectorsNote,
called by 1: main