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