Commit Graph
264 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.6 2af4e8570c docs(sprints): update Track E progress — hops 4-7 done, 55 remaining
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:36:49 +02:00
jpmschweitzerandClaude Opus 4.6 3826d6f1d5 style(atlas): cargo fmt on list-systems
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:36:34 +02:00
jpmschweitzerandClaude Opus 4.6 607fd57dcd docs(sprints): mark Track D (West Reach) done in copy briefing
Also includes star_type DB fixes and proposal file updates from
the west_reach authoring session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:35:36 +02:00
jpmschweitzerandClaude Opus 4.6 27343ea003 feat(atlas): add list-systems command and --sector filter to unfinished/next
New `list-systems` subcommand with --sector, --hop, --finished, --unfinished
filters. Also adds --sector flag to existing `unfinished` and `next` commands
for corridor-scoped queries during atlas authoring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 12:26:36 +02:00
jpmschweitzerandClaude Opus 4.6 8a3c5af842 data(atlas): update systems.db + add atlas tooling scripts
systems.db: 43 North Reach body catalogs (hops 4-12)
tooling: atlas-verify, atlas-names, atlas-systems-done, atlas-helpers.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:18:09 +01:00
jpmschweitzerandClaude Opus 4.6 f8b44fb518 fix(atlas): clippy + rustfmt — fix map_or and formatting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:53:57 +01:00
jpmschweitzerandClaude Opus 4.6 cd3a9d1c87 data(db): sync systems.db — 43 systems, 412 bodies, 95 stations
End-of-session database snapshot. Hops 0-3 complete + Schuilhoek (hop 4).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:44:12 +01:00
jpmschweitzerandClaude Opus 4.6 c90a916230 data(atlas): Schuilhoek — four Dutch farming worlds behind Cairn
GJ 68/Schuilhoek: Zomer (800K, warm, grains), Lente (600K, cool,
leafy staples), Herfst (400K, soft fruit), Winter (200K, low-g
pasture). 300-year-old farming commune, no external contact, 2M
total across four cultivated worlds. No orbital infrastructure.

Fixed sync-wiki topology clobbering bug. Restored topology sections
for Cairn (GJ 845) and Aurelius (GJ 783A).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:43:53 +01:00
jpmschweitzerandClaude Opus 4.6 bb62900db8 data(db): sync systems.db — 19 systems, 161 bodies, 33 stations, 20 corps
End-of-session database snapshot. Hop 0-2 complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 23:24:05 +01:00
jpmschweitzerandClaude Opus 4.6 e05444f708 data(atlas): complete hop-2 body catalogs + corporations table
Hop-2 systems authored: Tessera/Corvel (legal archive, 1.3B),
Proxima/Ancora (first colony, Zheng He lore, 400M),
Meridian/Provenance (boomtown, 150M), Barnard's Star/Verada
(commuter town, 2B, wiki prose adjusted for surface-majority pop),
Prometheus/Galen+Chiron+Site Anterior (longevity monopoly, 55K),
Cygni B/Ferrath+Kihl Works (shipyards, 1.8B, 7 combines named),
Cairn (the anomaly — 7 apertures, 2 garden planets, zero population).

New: corporations table in systems.db schema. 20 records populated
from wiki/corporations/ + DSMC + 7 Cygni B combines (Vethara,
Kossler-Drun, Amberan Works, Talavec & Sons, Orren-Skel, Marhoud
Fabrication, Drevast Extraction).

Atlas CLI: fixed planet count defaults (6-8 minimum per star type,
was 2-4). Miri added Zheng He lore to Proxima wiki.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 23:23:12 +01:00
jpmschweitzerandClaude Opus 4.6 7394a7669c data(atlas): author hop-2 systems batch 1 (5 systems)
GJ 1221 (dead white dwarf, 200-person independent research team),
Keid/Cadwal (conservation world, Vance capital, Veil Institute station),
Renaissance/Ruhr (Gate Corp HQ, 5B manufacturing),
Parallax/Estrade (media capital, 1.8B),
Sindri/Witwatersrand (DSMC mining HQ, Kimberley, Jhb Orbital, Pilbara
Belt, Dampier — DSMC footprint across entire system),
Groombridge/Lendel (financial center, 900M).

Fixed Sindri proper_name in DB (was Vargr, flagged for IP).
Atlas CLI: commit-system now auto-updates star_systems counts,
next command for hop-ordered authoring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:39:09 +01:00
jpmschweitzerandClaude Opus 4.6 c9d3bd4eed data(atlas): author hop-0 and hop-1 body catalogs (6 systems)
Systems authored: Sol (GJ 0), Gateway (GJ 71), Ran (GJ 144),
Sirius (GJ 244A), ACB (GJ 559B), Struve (GJ 725B).

Total: 59 bodies + 10 stations across 6 systems.

Named bodies: Mercury, Venus, Earth, Luna, Mars, Phobos, Deimos,
Jupiter, Io, Europa, Ganymede, Callisto, Saturn, Titan, Enceladus,
Uranus, Neptune (Sol); Threshold, Arden, Verantis (Gateway);
Kallast, Vethis (Ran); Edict (Sirius); Sede (ACB); Rush (Struve).
Named stations: Kallast Freight Terminal, Conclave, Aperture,
Leverage, Quorum, The Stack.

Atlas CLI: added commit-system auto-update of star_systems counts,
next command for hop-ordered authoring, sync-wiki with full field
rendering. Edict naming lore added to Sirius wiki by Miri.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 19:04:10 +01:00
jpmschweitzerandClaude Opus 4.6 05c3227b53 feat(atlas): add gravity, orbital period, rotation + sync-wiki command
Schema: added orbital_period_days and rotation_period_hours to bodies
table. Proposal format now includes surface_gravity, orbital_period_days,
rotation_period_hours with sensible defaults per body type.

New sync-wiki command generates a Celestial Bodies section in wiki
pages from DB data. All 16 fields rendered including Year (d) and
Day (h). Re-authored Gateway (GJ 71) with full physics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:26:42 +01:00
jpmschweitzerandClaude Opus 4.6 b77c94a6d8 feat(atlas): add sync-wiki command, sync Gateway body catalog to wiki
New atlas subcommand: sync-wiki generates a Celestial Bodies section
in wiki pages from DB body/station data. All fields rendered: orbit,
ID, name, type, inhabited, population, mass, gravity, atmosphere,
biome, hydrosphere, economy, settlement pattern, industrial corridor.
Stations table includes docking class, governance, gate flag, districts.

Moons render indented under their parent body (↳ notation).
Section is idempotent — re-running overwrites the existing section.

DB is source of truth, wiki is generated output. No import direction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:19:29 +01:00
jpmschweitzerandClaude Opus 4.6 080732d2ac feat(atlas): author GJ 71 (Gateway/Tau Ceti) body catalog
First system fully authored via atlas author/commit workflow.
7 bodies + 1 station: Threshold (primary garden, 600M), Arden
(secondary garden, 500M), Verantis (domed moon, 20M), inner rocky,
outer ice, debris disk, oort cloud, Horizon Station (80M).

Atlas CLI updated with proper_name, population, hydrosphere,
economic_role, settlement_pattern, industrial_corridor fields in
proposal format. Commit-system writes all fields to DB.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:16:09 +01:00
jpmschweitzerandClaude Opus 4.6 fb401e80d2 feat(db): replace atlas bulk populate with per-system author/commit workflow
New commands: author (generates proposal JSON per system from wiki + DB
data), commit-system (writes approved proposal to DB), wipe-system
(clears a system's bodies/stations), unfinished (lists systems without
bodies). Removed the batch populate command.

The author command reads the wiki page, extracts habitable/inhabited
counts, generates a body ID matrix based on star type, and writes a
reviewable JSON proposal. Human reviews, edits, then commits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:53:30 +01:00
jpmschweitzerandClaude Opus 4.6 ca676e8e66 feat(db): add atlas Rust CLI for celestial bodies + stations
Rust binary (server/src/bin/atlas.rs) with commands: show-system,
show-body, show-station, list-bodies, list-stations, add-body,
add-station, stats, populate. Reads from server/data/systems.db.

Wrapper at tooling/atlas, skill at .claude/skills/atlas/SKILL.md.
Scope note: atlas will grow to cover the full geographic hierarchy
(planetary surfaces, settlements, districts) as the cascade progresses.

Also: removed stale star_systems table from settledreach.db (belongs
in systems.db only) and ran initial populate pass (329 bodies + 301
horizon stations across 301 systems).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:40:37 +01:00
jpmschweitzerandClaude Opus 4.6 fc3b7485c6 feat(schema): add bodies and stations tables to systems.db
New tables for the celestial body hierarchy below system level:
- bodies: planets, moons, gas giants, asteroid belts, oort clouds
  with physical properties, settlement data, and cultural overrides
- stations: orbital/surface facilities with type, population,
  docking class, and gate infrastructure flag

Naming convention: GJ-{n}b (planet), GJ-{n}b-1 (moon),
GJ-{n}b-S1 (station), GJ-{n}-oort (oort cloud).
Self-referential parent_body_id for moon→planet relationships.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:28:40 +01:00
jpmschweitzerandClaude Opus 4.6 6bac8b0eff chore(server): update Cargo.lock
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:14:31 +01:00
jpmschweitzerandClaude Opus 4.6 23d946a68c chore(meta): release v0.1.28
Sprint 28: Character Visuals — character creation screen with live 3D
preview, face-based body segmentation, solidified hair and clothing,
skin/eye/eyebrow tinting, manifest-driven content, pre-push lint hooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 20:23:32 +01:00
jpmschweitzerandClaude Opus 4.6 5fc9c03683 chore(server): auto-format Rust code (cargo fmt)
Pre-existing formatting issues in generator_spike.rs and
validate_ron.rs caught by the new pre-push lint hook.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:26:06 +01:00
jpmschweitzerandClaude Opus 4.6 2a3c6b4d12 chore(meta): release v0.1.27
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:36:55 +01:00
jpmschweitzer 06d9abbc63 Merge remote-tracking branch 'origin/copy'
# Conflicts:
#	content/npc-conversations/overheard.yaml
#	server/content/global/zone-types/administrative_civil.ron
#	server/content/global/zone-types/administrative_judicial.ron
#	server/content/global/zone-types/archaeological_site.ron
#	server/content/global/zone-types/commercial_market.ron
#	server/content/global/zone-types/commercial_transit.ron
#	server/content/global/zone-types/detention_facility.ron
#	server/content/global/zone-types/diplomatic_elite.ron
#	server/content/global/zone-types/entertainment_hospitality.ron
#	server/content/global/zone-types/entertainment_venue.ron
#	server/content/global/zone-types/extraction_platform.ron
#	server/content/global/zone-types/extraction_space.ron
#	server/content/global/zone-types/extraction_surface.ron
#	server/content/global/zone-types/industrial_manufacturing.ron
#	server/content/global/zone-types/industrial_processing.ron
#	server/content/global/zone-types/medical_facility.ron
#	server/content/global/zone-types/military_garrison.ron
#	server/content/global/zone-types/port_fishing.ron
#	server/content/global/zone-types/port_maritime.ron
#	server/content/global/zone-types/port_space.ron
#	server/content/global/zone-types/port_surface.ron
#	server/content/global/zone-types/research_station.ron
#	server/content/global/zone-types/residential_dispersed.ron
#	server/content/global/zone-types/residential_station.ron
#	server/content/global/zone-types/residential_surface.ron
#	server/content/global/zone-types/rural_aquaculture.ron
#	server/content/global/zone-types/rural_orbital.ron
#	server/content/global/zone-types/rural_pastoral.ron
#	server/content/global/zone-types/security_checkpoint.ron
#	server/content/global/zone-types/wilderness_frontier.ron
#	server/content/npc-conversations/overheard.ron
#	server/content/npc-conversations/overheard.yaml
#	server/content/npc-conversations/overheard.yaml.deprecated
#	tooling/validate-ron
2026-03-17 12:31:38 +01:00
jpmschweitzerandClaude Opus 4.6 034c1c6e37 fix(simulation): apply PR #94 review suggestions
- validate_ron: add eligible_roles referential integrity check against
  defined RoleSpec.id values in zone-type templates
- v01-yaml-content-audit.md: fix grep path from data/templates to
  server/data/templates in the superseded-files verification command
- pre-commit hook: comment out nonexistent check-decision-ids script
  to stop per-commit warnings until the script is implemented

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:25:07 +01:00
jpmschweitzerandClaude Opus 4.6 18afede4f2 feat(simulation): add cargo audit to CI/review pipeline (#637)
Add `make audit` target running `cargo audit` with an advisory ignore for
RUSTSEC-2025-0141 (bincode, tracked by #636). Wire audit into `make pre-pr`
and `make pre-pr-server`. Add conditional cargo audit to the pre-commit hook
(triggers only when Cargo.toml/Cargo.lock are staged).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:40:15 +01:00
jpmschweitzerandClaude Opus 4.6 aa79dd97e7 fix(simulation): Clippy cleanup and CI enforcement (#635)
Fix all Clippy warnings across the server codebase (2411 insertions, 1341
deletions). Raise type-complexity-threshold to 750 and too-many-arguments
to 12 in .clippy.toml for idiomatic Bevy ECS system signatures. The server
now passes `cargo clippy -- --deny warnings` cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:33:15 +01:00
jpmschweitzerandClaude Opus 4.6 7f7706442a feat(simulation): add ZoneTypeTemplate and LocationSpec structs for D-142 (#663)
Implement the zone-type template architecture: ZoneTypeTemplate (behavior
pools per zone category), LocationSpec (instance metadata with role weights),
SocialSiteTypeSpec, RoleWeight, and LocationSocialSite. Add deserialization
tests for rural_agricultural.ron and industrial_freight.ron. Existing ZoneSpec
kept for backward compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:32:42 +01:00
jpmschweitzerandClaude Opus 4.6 b2ef56440f refactor(simulation): move content/ under server/ (#669)
Content files (RON templates, YAML campaigns, gauntlet data) are consumed
exclusively by the server. Colocate them at server/content/ and update all
path references in Rust source, tooling scripts, and schema files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:31:20 +01:00
jpmschweitzerandClaude Opus 4.6 00de36a4b7 fix(data): replace deprecated GJ 702A with 1221-DXP9 in star registry
GJ 702A was a deprecated binary system entry. Replace with GJ 1221,
a real catalog star — DXP9 peculiar magnetic white dwarf at 20.03 ly.
Dead-end topology connecting to EZ Aqr (GJ 866A).

Updates: star-map.json, systems.db, gj-catalog-real.json, catalog.md,
EZ Aqr topology reference. New wiki entry and Drifter's Guide entry.
System count restored to 301.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 09:53:31 +01:00
jpmschweitzerandClaude Opus 4.6 59b9a08f0f refactor(data): migrate 9 core binary pairs to single stars
Gate builders don't place two horizon stations in one star system.
Binary pairs (A/B components of same physical star) split to
independent stars. Each "move" system keeps its connections and
content, only the host star changes.

Migrations:
- GJ 559A (Rigil Kentaurus) -> GJ 768 (Altair) — rewritten for new star
- GJ 725A (Renaissance) -> GJ 251
- GJ 820A -> GJ 3877 (Tessera — compact/records world)
- GJ 570B -> GJ 1156
- GJ 783B -> GJ 299
- GJ 663B (Guniibuu B) -> GJ 1286 (Kensho — university world)
- GJ 338A -> GJ 4053
- GJ 280B -> GJ 3991
- GJ 15B -> GJ 4274

New system names and roles assigned:
- Tessera: founding compact + institutional records
- Kensho: university world, largest Institute presence
- Vargr: mining (DSMC, MVG/GC minority stakes)
- Parallax: media world (was Procyon)
- Lu Ban: failed corp / mixed industrial (was Groombridge 34)
- Altair: southern gateway (was Rigil Kentaurus)
- Keid: garden world / ecological reservation
- Ross 128: ocean world (fishing, research, tourism)

Also adds docs/design/gj-catalog-full.json (3801 GJ entries from
HYG v4.2) for future star assignment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 10:13:58 +01:00
jpmschweitzerandClaude Opus 4.6 7f307c1225 feat(db): normalize star systems into multi-table schema with GJ primary keys
Replaces flat star_systems table with 7 normalized tables: star_systems,
system_gates (with hop_distance_from_gateway), system_history,
historical_events (1:N), system_economy, system_factions, system_culture.

Primary key is now the GJ astronomical ID (e.g., "GJ 244A") — S-number
identifiers removed entirely. The astronomical_id column is dropped as
redundant. Database moved to server/data/systems.db (ships with game).

10 core systems fully populated with structured data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 03:41:29 +01:00
jpmschweitzerandClaude Opus 4.6 e8263e209e refactor(data): rename Krenn to Van Maanen's Star
System S-057 assigned to real star GJ 35 (Van Maanen's Star, DG white
dwarf at 13.9 ly). Renamed across all content, server code, docs,
decisions, wiki lore, and config files. 224 files updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 00:23:26 +01:00
jpmschweitzerandClaude Opus 4.6 abb509eb00 chore(meta): release v0.1.26
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:38:13 +01:00
jpmschweitzerandClaude Opus 4.6 51414b0b63 fix(simulation): address PR #89 review — version comment, settings contract, docs, dead process recovery
Must-fix: protocol version comment now references PROTOCOL_VERSION
(no hardcoded number), settings delete is idempotent no-op.

Suggestions addressed: BehaviorModifier dedup claim dropped, hash
collision safety documented, FK pragma in test store, columns_to_value
consolidated, modifier_hint mismatch logging, OffDuty test coverage,
batching tradeoff documented, unknown value_type warning, occluded
text risk documented, dead child respawn in voice worker, INJECT
block ambiguity documented.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 09:34:33 +01:00
jpmschweitzerandClaude Sonnet 4.6 b37583ddfc fix(simulation): address PR review items for #655 content removal
- line_pool.rs: add trace! when active_situations is empty (Layer 2
  will silently filter all lines — important for content debugging)
- knowledge_grant.rs: document serde(untagged) ambiguity hazard; add
  KnowledgeGrant::validate() for load-time field validation
- monologue.rs: annotate trigger_monologue as schedule ordering anchor;
  fix stale "periodic trigger cooldown tracking" doc reference in
  trigger_event_monologue (COOLDOWN_TICKS removed in #655)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 09:32:48 +01:00
jpmschweitzerandClaude Opus 4.6 50800cbf81 feat(simulation): composable behavior engine — action+modifier+context primitives (#633)
Replaces flat culture×zone×role behavior strings with three-layer
composition: BehaviorAction (role-generic), BehaviorModifier (culture
coloring), BehaviorContext (situation gating). Assembly at NpcBlueprint
instantiation. Backward compatible — falls back to legacy behaviors
when primitives are empty. D-139 filed, Q-057 resolved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 09:12:07 +01:00
jpmschweitzerandClaude Opus 4.6 accbe579c9 feat(simulation): SQLite settings storage with IPC protocol v20 (#627)
Per-player settings via rusqlite (bundled, zero runtime dep). Server
owns the settings DB; client sends ChangeSettings commands over IPC.
Extensible key-value with typed columns (String/Int/Float/Bool).
Protocol bumped to v20 with settings_response in ObserverSnapshot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 09:11:53 +01:00
jpmschweitzerandClaude Opus 4.6 1a4fd578cc feat(simulation): voice pipeline integration — Factual bypass, observer wiring, tell iteration (#650 #652 #651)
ContentType::Factual bypasses LLM for fact-bearing lines (numbers,
denials). Observer enrichment systems rewrite dialogue/conversation
text with voiced versions before snapshot assembly. Friendly and
RoutineDeviation tells get concrete surface-pattern examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 09:11:44 +01:00
jpmschweitzerandClaude Sonnet 4.6 ce0df2f320 refactor(simulation): remove v0.1 content loading system (#655)
Delete the hand-authored YAML content pipeline (server/src/content/) superseded
by the v0.2 generator-first approach (D-122, D-128). Runtime ECS types that were
co-located with content loading have been extracted to dedicated simulation modules:

- simulation/triangle.rs: TriangleState, TriangleCrisisEventQueue, tick/resolve systems
- simulation/line_pool.rs: LinePoolIndex, AccessTier, TrustTier, Mood, LinePoolIndexResource
- simulation/knowledge_grant.rs: KnowledgeGrant, Prerequisites

Monologue systems (trigger_monologue, trigger_recognition_monologue,
trigger_event_monologue) now use hardcoded fallback lines only; the
ContentStoreResource branch and select_pool_line function are removed.

Deleted: content/{loader,types,line_pool,hot_reload,spawn,instantiation,entanglement,mod}.rs
Deleted: tests/{content_loading,content_runtime,content_scaling,template_instantiation,template_schema}.rs
Deleted: bin/line_preview.rs (v0.1 tool)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 09:07:57 +01:00
jpmschweitzerandClaude Opus 4.6 441164fe23 chore(meta): release v0.1.25
Sprint 25: Emerge — generator extrapolation from minimal input,
voice pipeline spikes (D-138), behavior dedup, Want/State layer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:53:10 +01:00
jpmschweitzer ecbe905071 Merge remote-tracking branch 'origin/server'
# Conflicts:
#	CHANGELOG.md
2026-03-07 19:52:08 +01:00
jpmschweitzerandClaude Opus 4.6 9f34d030d7 feat(voice): complete Spike 2 voice pipeline with quality-tested prompt engine
Spike 2 delivers the full voice pipeline: queue → worker pool → sr-voice
child process (stdio JSONL) → cache → disk. Three rounds of quality testing
with Paula, Mellanie, and Gestalt produced iterative prompt improvements.

Prompt engine (prompt_builder.rs):
- Example-based epistemic marker integration (not keyword lists)
- Length-aware Angry tell variant (preserves facts on long content)
- Double-prompt technique: REMEMBER block repeats constraints near OUTPUT:
- Imperative injection framing (composition engine controls frequency)
- Anti-invention constraint ("do not add information not in the input")
- Universal RULES cleaned: worldbuilding moved to culture personas

Worker pool (worker.rs):
- Output post-processor strips after first newline (prevents prompt leakage)
- Watchdog poll loop (1s ticks) replaces blocking sleep for cancel
- Child health check before writing (try_wait)

Test infrastructure:
- voice_pipeline.rs: end-to-end test, auto-detects real sr-voice or mock
- voice_quality_batch.rs: 39 edge-case prompts for quality review
- mock-stdio.sh: Python JSONL mock for CI (no model needed)
- Makefile targets: test-voice-mock, test-voice-real

Quality results (Gemma 2B Q4_K_M, CPU ~13 t/s):
- Epistemic markers: naturally integrated (round 1 comma-lists fixed)
- Tell differentiation: 3/5 working (Nervous, Guarded, Angry)
- Information preservation: ~90% (up from ~70%)
- Prompt leakage: eliminated
- Open: Friendly/RoutineDeviation tells inert (#651), Factual bypass (#650)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:20:06 +01:00
jpmschweitzerandClaude Opus 4.6 e93a9e8b70 fix(voice): address PR review findings — 3 critical, 5 warning, 4 suggestion
Critical fixes:
- Pause mechanism: workers now hold requests during pause instead of
  dropping them. Queue and worker pool share the same AtomicBool flag
  via VoiceQueue::paused_flag(). Submit() rejects while paused.
- Seed type: sr-voice accepts u64 seeds over IPC (explicit u32 truncation
  for llama.cpp sampler, documented).

Warning fixes:
- HashMap → BTreeMap in cache.rs and worker.rs (D-010 determinism mandate).
  Added Ord derives to CacheKey, ContentType, TellCategory.
- VoicePipe::generate() watchdog kills child after 120s timeout to prevent
  indefinite blocking on read_line.
- VoiceCacheStore Drop impl calls save_all() on shutdown.
- trait-modifiers.ron: fixed 3 wrong trait names (Impulsive→Compassionate,
  Methodical→Incurious, Stubborn→Ruthless) to match PersonalityTrait enum.

Suggestion fixes:
- Worker spawn: log error + reduce pool instead of panic on thread failure.
- on_battery(): added macOS detection via pmset.
- Epistemic markers: lowercased constants, removed redundant to_lowercase().
- cache.rs: documented non-atomic write tradeoff.
- queue.rs: reprioritize() bypasses pause check (it runs during pause).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:11:46 +01:00
jpmschweitzerandClaude Opus 4.6 0b0fa8c04e refactor(voice): replace HTTP with stdin/stdout IPC for sr-voice workers
Gemma 2 T&C compliance: exposed HTTP ports allow mods or external code
to reach the model, complicating license enforcement. Switch to piped
stdin/stdout (JSONL protocol) so the model is only reachable through
the game server's internal queue.

- worker.rs: VoicePipe owns Child + piped stdin/stdout, VoiceProcessConfig
  replaces port-based config, workers spawn their own sr-voice child
- hardware.rs: remove VoiceInstanceManager (port/process lifecycle),
  replace with evaluate_scaling() free function + HardwareProbe::voice_config()
- sr-voice: add --stdio flag to serve command, new stdio.rs JSONL mode
- Remove ureq dependency from server crate (no longer needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:57:32 +01:00
jpmschweitzerandClaude Opus 4.6 be6f2a3db9 feat(voice): add hardware detection + dynamic sr-voice instance management (Phase 4)
GPU-aware scaling: NVIDIA (nvidia-smi), AMD (sysfs VRAM), Apple Silicon
(unified memory). GPU mode detected at install, persisted to settings.
Scaling ceiling: (free_resource - existing_llm_usage) / 2 / per_instance_cost.
VoiceInstanceManager spawns/stops sr-voice processes on unique ports.
Battery detection scales to 1 worker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:32:20 +01:00
jpmschweitzerandClaude Opus 4.6 fafa1c49b8 feat(voice): stub voice cache lookup for behavior text (Phase 3)
Add lookup.rs with voiced_behavior() — ready to wire into a behavior-serving
system once one exists (Q-058). Tell behaviors always passthrough (never
re-voiced). Cache miss returns base text (graceful degradation).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:13:15 +01:00
jpmschweitzerandClaude Opus 4.6 82a911f3aa feat(voice): add cache, queue, and worker modules (D-138, Spike 2 Phase 2)
MessagePack voice cache with per-zone persistence and version invalidation.
Priority work queue with crossbeam bounded channel, backpressure, pause/resume,
and zone-change reprioritization. Inference worker pool with empty output guard
and graceful degradation to base text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:09:24 +01:00
jpmschweitzerandClaude Opus 4.6 33030fcc58 feat(engine): voice pipeline Phase 1 — composition engine and data model
Add the voice pipeline composition engine (D-138 Spike 2, Phase 1):

- voice/prompt_builder.rs: full prompt assembly from culture profile,
  tell state, and base text. Handles occasional injection gating,
  epistemic marker extraction, content-length-gated tell injection.
  16 unit tests.

- blueprint.rs: CultureProfile gains voice_persona, voice_examples,
  occasional_injections fields. NpcBlueprint gains tell_behaviors.
  OccasionalInjection struct with kind discriminator (oath/faith/
  hesitancy/etc), frequency, and tell-suppression gating.

- culture-krenn.ron: v2 voice injector from Spike 1 — persona block,
  3 examples, oath injection at 0.25 frequency.

- D-138 amended: Phi-3 dropped entirely, exact Gemma 2B provenance
  documented. Model file renamed to gemma2.gguf.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:35:39 +01:00
jpmschweitzerandClaude Opus 4.6 1b58d8f949 feat(engine): add sr-voice LLM inference service for NPC voice pipeline
Standalone Rust crate wrapping llama-cpp-2 for GGUF model inference.
Persistent HTTP server architecture — model loaded once, requests
processed sequentially, zero CPU contention by construction.

Subcommands: serve (load model, listen), generate (single prompt),
batch (JSONL), benchmark (5-run average). Makefile targets for
build/serve/run/stop workflow.

Spike 1 validated: Gemma 2B Q4_K_M at ~16 t/s CPU, 4 cultures
tested (Krenn, Ireland, Shek'na, Aranthi), composition-engine
oath injection mechanism proven. GO for Spike 2.

Refs: D-138, #639

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:44:37 +01:00
jpmschweitzerandClaude Opus 4.6 c3a8dcc481 feat(simulation): name dedup, behavior dedup, relationship pipeline, Want/State layer (#628 #629 #631 #632)
Four generator spike improvements in one pass:

- #628: Fix name pool first-pick bias. build_name_pool now derives a
  zone+culture-specific ChaCha20 RNG via FNV-1a mixing of (seed,
  zone_type, culture_id), isolating name ordering from main RNG
  consumption. Different zone types with the same seed now produce
  different first names.

- #629: Behavior dedup within a zone run. build_behavior_pools
  pre-shuffles each role's behavior list; gen_behaviors draws without
  replacement. Falls back to random repeat with warning when pool
  exhausts.

- #631: Relationship-to-behavior pipeline. Third generation pass
  (~50% chance) replaces primary behavior with relationship-revealing
  action — rivals talk past each other, friends drift together,
  subordinates defer.

- #632: Want/State layer. NpcWant enum (Neutral/Bored/Alert/Suspicious/
  AvoidingSomeone/LookingForInfo) biased by traits and role. Fourth
  generation pass produces observable tells that leak internal state
  through behavior. AvoidingSomeone resolves against negative-valence
  relationships for named targets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:26:48 +01:00