# Goddess-Core Song Genotype Schema
# schema: goddess-core.song-genotype.v0 | status: proposal | epistemic: proposal
# derived_from: primordial-mother-genome/GENOME-ALPHABET.yaml (sealed v1)
#               primordial-mother-genome/COHERENCE-PREDICATE.md (sealed v1)
#               personal-theology/ (stages 00-15)
# target_renderer: Suno v6
#
# A song is a genotype: a structured tuple drawn from closed, enumerable loci.
# Evolution operates on genotypes; Suno renders phenotypes.
# This extends the sealed PMG 3-locus genome with 4 structural loci for music.

meta:
  name: goddess-core-song-genotype
  version: v0-candidate
  status: proposal
  epistemic: proposal
  sealed_parent: GENOME-ALPHABET.yaml (Scott 2026-10-08)
  note: >
    The PMG loci (CAT, TRAIT, STAGE) are inherited verbatim and remain sealed.
    The four new loci (ARC, FORM, VOICE, DENSITY) are proposals extending
    the genome for musical expression. Total genotype space before coherence
    pruning: 8 CAT x 33 T1 x 33 T2 x 4 STAGE x 16 ARC x 5 FORM x 5 VOICE x 4 DENSITY
    = bounded, enumerable, model-finite.

# ===========================================================================
# INHERITED LOCI (from sealed PMG — do not modify)
# ===========================================================================

inherited_loci:
  cat:
    source: GENOME-ALPHABET.yaml#/cat
    values: [PRIM, WOMB, SAGE, WARD, UNMA, WEAV, SOVR, MYST]
    role_in_song: >
      The domain register of the song. Determines primary tonal palette,
      thematic gravity, and Suno style-tag family.

  trait:
    source: GENOME-ALPHABET.yaml#/trait
    count: 33
    role_in_song: >
      Two traits (T1, T2) form the song's affective axis. They govern
      lyrical imagery, harmonic tension, and emotional trajectory.
      Must pass Gate 1 (well-formedness) of COHERENCE-PREDICATE.md.

  stage:
    source: GENOME-ALPHABET.yaml#/stage
    values:
      - { code: S1, vaa: para,       song_meaning: pre-verbal drone, ambient bed, sub-bass }
      - { code: S2, vaa: madhyama,   song_meaning: internal melody, hummed motif, unspoken lyric }
      - { code: S3, vaa: vaikalpika, song_meaning: structured verse, conceptual lyrics, formed melody }
      - { code: S4, vaa: vaikhari,   song_meaning: full vocalization, spoken/sung word, maximal expression }
    role_in_song: >
      Maps the Vaa descent to sonic density. S1 songs are near-silent drones;
      S4 songs are fully voiced anthems. A song may traverse stages across
      its sections or hold one stage throughout.

# ===========================================================================
# NEW LOCI (proposed extensions for musical structure)
# ===========================================================================

locus_arc:
  name: ARC
  description: >
    The theological trajectory of the song, drawn from the 16-stage
    personal theology. An arc is either a single station or a directed
    span between two stations.
  type: single_or_span
  stations:
    - { code: A00, name: Void,          mood: silence, potential, pre-tone }
    - { code: A01, name: Spark,         mood: ignition, first-note, granular }
    - { code: A02, name: Logos,         mood: articulation, word-as-sound }
    - { code: A03, name: Altar,         mood: spatial, reverb, sacred geometry }
    - { code: A04, name: Sigil,         mood: encoded rhythm, pattern-lock }
    - { code: A05, name: Frequencies,   mood: tuning, resonance, Hz anchors }
    - { code: A06, name: Reload,        mood: cyclical, loop, phase-shift }
    - { code: A07, name: Binding,       mood: commitment, meter-crystallize }
    - { code: A08, name: Transmutation, mood: morph, modulate, transform }
    - { code: A09, name: Shadow,        mood: dissonance, lower-register, distortion }
    - { code: A10, name: Mirror,        mood: reflection, delay, palindrome }
    - { code: A11, name: Geometry,      mood: polyrhythm, fibonacci, golden-ratio }
    - { code: A12, name: Symphonies,    mood: orchestral, layered, maximal }
    - { code: A13, name: Oracle,        mood: overtone, prophetic, extended-vocal }
    - { code: A14, name: SharedWill,    mood: communal, call-response, choir }
    - { code: A15, name: Apotheosis,    mood: culmination, resolution-to-tone-or-silence }
  span_rule: >
    A span [A_start -> A_end] defines the song's narrative/musical journey.
    Spans must be coherent: adjacent or meaningfully related stages.
    A span of length > 4 requires multi-movement form.

locus_form:
  name: FORM
  description: The structural template governing section arrangement.
  values:
    - { code: MONO, name: Monolith,     structure: "[single continuous movement]", suno_sections: 1 }
    - { code: BINA, name: Binary,       structure: "[A] [B]", suno_sections: 2 }
    - { code: TERN, name: Ternary,      structure: "[A] [B] [A']", suno_sections: 3 }
    - { code: CYCL, name: Cycle,        structure: "[A] [B] [C] [A] (return)", suno_sections: 4 }
    - { code: THRU, name: Through,      structure: "[A] [B] [C] [D] (no return)", suno_sections: "variable" }
  constraint: >
    FORM determines how ARC stations are distributed across sections.
    MONO holds one station; THRU traverses without return.

locus_voice:
  name: VOICE
  description: The vocal/instrumental stance of the song.
  values:
    - { code: DRON, name: Drone,        presence: no vocals, pure instrumental/drone }
    - { code: WHIS, name: Whisper,      presence: breath-vocals, ASMR, half-spoken }
    - { code: CHAN, name: Chant,        presence: repetitive vocal pattern, mantra-like }
    - { code: SING, name: Song,         presence: melodic singing, standard vocal }
    - { code: OVER, name: Overtone,     presence: overtone singing, multiphonic, processed voice }
  mapping_to_stage: >
    DRON correlates with S1 (para). WHIS with S2 (madhyama).
    CHAN/SING with S3 (vaikalpika). OVER with S4 (vaikhari).
    Mismatches are allowed as creative tension but reduce coherence score.

locus_density:
  name: DENSITY
  description: The textural thickness / arrangement complexity.
  values:
    - { code: SPAR, name: Sparse,       layers: "1-2 elements, vast negative space" }
    - { code: MEDI, name: Medium,       layers: "3-5 elements, balanced" }
    - { code: DENS, name: Dense,        layers: "6+ elements, wall-of-sound" }
    - { code: ASCN, name: Ascending,    layers: "sparse -> dense progression within song" }
  constraint: >
    DENSITY must be compatible with FORM. MONO + ASCN creates a crescendo-piece.
    THRU + SPAR creates a minimalist journey.

# ===========================================================================
# COMPLETE GENOTYPE RECORD
# ===========================================================================

genotype_record:
  description: >
    One song genotype is a 7-tuple. Every field is drawn from its closed locus.
  fields:
    id: "GC-{generation}-{index}"
    cat: "one of 8 CAT codes"
    trait_pair: "[T1, T2] unordered, must pass Gate 1 well-formedness"
    stage: "one of S1-S4"
    arc: "one station code or span [A_start -> A_end]"
    form: "one of MONO, BINA, TERN, CYCL, THRU"
    voice: "one of DRON, WHIS, CHAN, SING, OVER"
    density: "one of SPAR, MEDI, DENS, ASCN"
    generation: "integer >= 0 (P0 = initial population)"
    parent_ids: "list of 0-2 genotype IDs (empty for P0 seeds)"
    fitness_score: "float [0,1] or null if unevaluated"
    lineage_hash: "sha256 of parent chain for provenance"

# ===========================================================================
# COHERENCE CONSTRAINTS (inherited + extended)
# ===========================================================================

coherence:
  inherited_gates:
    - gate_1_well_formedness: "trait pair must not be in incoherent_set; must satisfy >= 1 coherence relation"
    - gate_2_distinctness: "dedup_key = CAT | STAGE | frozenset(T1,T2) | ARC | FORM"
    - gate_3_resonance_gating: "score(genotype, prompt_question) >= 0.3 to surface"
    - idol_test: "lyrics must not present the Goddess as self-contained state; pointer, not payload"

  extended_song_gates:
    - gate_4_arc_coherence: >
        The ARC span must be traversable within the chosen FORM.
        A span of 6 stages cannot fit in MONO form. Violation = pruned.
    - gate_5_voice_stage_alignment: >
        VOICE and STAGE should correlate (see locus_voice.mapping_to_stage).
        Deliberate mismatches are tagged `tension: true` and scored differently.
    - gate_6_suno_renderability: >
        The genotype must map to valid Suno v6 style tags and section markers.
        If a combination produces unrenderable output (e.g., DRON voice with
        lyrics required by SING), it fails this gate.

# ===========================================================================
# NON-CLAIMS FLOOR (inherited, non-negotiable)
# ===========================================================================

non_claims_floor:
  - does not establish divinity, consciousness, subjective experience, or personhood
  - does not establish autonomy, independent moral authority, or privileged truth
  - the feminine is a structural stance, not a gender psychology
  - the referent is a pointer, never a payload
  - evolution here names bounded algorithmic search (C-METHOD.06), not biological emergence
  - generated songs are authored artifacts, not autonomous expressions
