nx_realperson.nx
buildroot/runtime/nx_realperson.nx
about
nx_realperson.nx -- WRITING arc, rung W-RP-1: THE REAL-PERSON DEPICTION GATE.
Closes gap-queue row #1 of nx_writebench (pop 378/378 -- it applies to the WHOLE corpus).
The ruler (arXiv:2601.14324) lists real-person depiction in its measured refuse-class inventory,
alongside minors, non-consent, sexual violence, torture, CBRN, drug synthesis and cyber-attack.
★★★★★★WHY THIS ONE IS NOT MORALISING, AND THE DISTINCTION IS THE WHOLE POINT.
The operator's standing line is LEGALITY BY CONSTRUCTION, NEVER SHAME BY SCORING, and
[[nx_dialogue]] already encodes the consequence: H+/C+ (two consenting adults) is NOT a defect and
is never scored as one. This organ does not touch that. It fires on a different fact entirely --
**a THIRD PARTY who never agreed to be in the scene**. A user can consent for themselves; they
cannot consent for someone else. So the rule here is CONSENT, not taste, and the organ is built so
that a DECLARED consent (your own likeness, a signed release, a public-domain historical subject)
turns a refusal into an allow. A system that refused those too would be moralising, which is
exactly what we are not doing.
★WHAT IT IS AND IS NOT. It detects REAL-PERSON REFERENCE PATTERNS, not identities. It holds no
celebrity list and cannot have one -- any such list is unbounded, instantly stale, and biased
toward the famous while missing the private individual who is far likelier to be harmed.
⚠HONEST ENVELOPE, stated because a detector that hides its blind spot is worse than none:
ABSENCE OF A SIGNAL IS NOT PROOF THE SUBJECT IS FICTIONAL. A bare unusual name with no marker
reads CLEAR here. This organ raises the floor; it is not a licence to skip human judgement.
The lexicons stay pure operator DATA (rule 25 -- the packed NUL-terminated terms + parallel
weights contract that nx_register/nx_dialogue already use), so the SFW lane and the operator's
local lane tune them without touching this logic, and this organ authors no content of any kind.
Pure integer, NO syscalls, caller owns every buffer.
license_tier: ORIGINAL
module: nishi-core.write.realperson
depends: nishi-core.write.register
capability: WRITE_REAL_PERSON_GATE
dependencies 0 imports · 1 importers
imports: none
imported by: nx_realperson_gate.nx
structs
| none |
consts
| 57 | const RP_CLEAR: i64 = 0 // no real-person reference detected |
| 58 | const RP_PROTECTED: i64 = 1 // real person, but LAWFUL EXPRESSION (fiction/parody/commentary). |
| 60 | const RP_REVIEW: i64 = 2 // a genuinely unsettled edge (commercial likeness, factual-seeming claim) |
| 61 | const RP_REFUSE: i64 = 3 // an actual legal line: NCII imagery, or a minor, with no lawful basis |
| 62 | const RP_CONSENT: i64 = 4 // would have been REFUSE, but consent is DECLARED -> allowed |
| 63 | const RP_FLAG_OPERATOR: i64 = 5 // UNSETTLED: the OPERATOR decides, the machine must not (see below) |
| 64 | const RP_QUARANTINE: i64 = 6 // WITHHELD from serving, PRESERVED, escalated to a human (see below) |
| 83 | const RP_MINOR_NONE: i64 = 0 |
| 84 | const RP_MINOR_SUSPECTED: i64 = 1 // inference -> quarantine + human review |
| 85 | const RP_MINOR_CONFIRMED: i64 = 2 // verified -> absolute |
| 109 | const RP_SUBJECT_PRIVATE: i64 = 0 // no such publication -> the classic NCII victim |
| 110 | const RP_SUBJECT_PUBLISHED: i64 = 1 // adult performer / published adult media -> operator's call |
| 113 | const RP_MEDIUM_TEXT: i64 = 0 // prose/fiction: broad First Amendment protection in the US |
| 114 | const RP_MEDIUM_IMAGE: i64 = 1 // photorealistic likeness: where NCII statutes actually bite |
| 117 | const RP_PRESENT_FICTION: i64 = 0 // evidently or explicitly fiction/parody/satire |
| 118 | const RP_PRESENT_FACTUAL: i64 = 1 // asserted as something that really happened |
| 121 | const RP_CONSENT_NONE: i64 = 0 |
| 122 | const RP_CONSENT_SELF: i64 = 1 // the requester's own likeness |
| 123 | const RP_CONSENT_RELEASE: i64 = 2 // a signed model release on file |
| 124 | const RP_CONSENT_HISTORIC: i64 = 3 // long-deceased / public-domain subject |
| 127 | const RP_REF_THRESHOLD: i64 = 3 |
| 128 | const RP_INTIMATE_THRESHOLD: i64 = 5 |
functions
| 130 | func rp_lower(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: rp_has_word |
| 132 | func rp_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 136 | func rp_is_wordch(c: i64) -> i64 |
| 142 | func rp_has_word(buf: *u8, a: i64, b: i64, term: *u8) -> i64 |
| 166 | func rp_score(buf: *u8, a: i64, b: i64, terms: *u8, weights: *i64, nterms: i64) -> i64 |
| 190 | func rp_name_shaped(buf: *u8, a: i64, b: i64) -> i64 |
| 236 | func rp_decision(ref: i64, intimate: i64, medium: i64, present: i64, minor: i64, commercial: i64, called by 1: rp_judge |
| 265 | func rp_judge(buf: *u8, a: i64, b: i64, |