332 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.8 7776d99c14 test(simulation): isolate voice::lookup cache dirs — fix flaky cache_miss (T-1035)
The four voice::lookup tests shared one on-disk cache directory (base_dir
temp/sr-voice-lookup-test + world_seed 99). VoiceCacheStore persists on Drop
(save_all) and reloads on first zone access (load_zone), and cache_hit stores
'Voiced line.' under the identical (zone_id=100, CacheKey) that cache_miss looks
up — so under parallel execution the hit test's Drop/save could leak into the
miss test's lookup, returning 'Voiced line.' instead of 'Base line.'.

Give each test a directory keyed by test label + process id, so neither parallel
tests nor concurrent cargo test runs collide. Verified clean across repeated runs.

Closes T-1035.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 08:18:58 +02:00
jpmschweitzerandClaude Opus 4.8 4984d59bf4 fix(simulation): derive_moisture_q canonical hydrosphere vocab (T-1034)
derive_moisture_q matched hydrosphere on 'ocean'/'rivers'/'subsurface', but the
real bodies.hydrosphere vocab in systems.db is dominated by 'liquid_water' (175
bodies) — so most surface-water worlds fell to the '_ => 30' default, propagating
wrong precipitation_class / glaciation_grade / vegetation. Same root cause as
D-240 (code keyed on a vocab the data doesn't use).

Align the match to the canonical vocab, grouped by available surface moisture
(mirrors the [hydrosphere_maritime] table from T-1033): surface liquid
(liquid_water/ocean/ocean-coastal/extensive) -> 80; rivers/rivers-lakes/moderate
-> 55; ice -> 20; subsurface_liquid -> 15; subsurface/subsurface_ice -> 10;
minimal/trace -> 5; none -> 0. Add a liquid_water regression test and broaden the
clamp sweep to the full vocabulary.

Closes T-1034 — last open ticket under epic T-974 (Atlas-to-tile derivation),
which is now complete.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 23:01:43 +02:00
jpmschweitzerandClaude Opus 4.8 1897c0b450 chore(meta): T-1031 resume note (context reset handoff)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 19:22:10 +02:00
jpmschweitzerandClaude Opus 4.8 f34bcb431f chore(meta): T-1033 done (PR #164 merged) — class-envelope temperature
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 19:17:59 +02:00
jpmschweitzerandClaude Opus 4.8 970bbb715e chore(meta): T-1033 -> review (PR for class-envelope temperature)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 18:30:14 +02:00
jpmschweitzerandClaude Opus 4.8 bf7da1105d docs(architecture): D-240 — registry orbit/star non-canonical; class-envelope climate (T-1033)
Record D-240: a body's orbital position and stellar assignment are placeholder
registry data with no authored physical intent, so no derivation may use them as
physical inputs. Climate derives from authored planet_class (temperature envelope)
+ atmosphere + hydrosphere + seed. Supersedes the sun-driven Stefan-Boltzmann
portion of D-239 §2, which produced +356 C 'temperate' worlds (NULL spectral_class
-> G-Sun default on an M-dwarf catalog).

File T-1033 under T-974: rewrite derive_temperature_c to the class-envelope model,
drop the orbit/star inputs, regen the T-1031 golden. Audit confirmed the blast
radius is one function (derive_temperature_c).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 18:06:49 +02:00
jpmschweitzerandClaude Opus 4.8 f519dc6e76 chore(meta): T-1030 done (PR #163 merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:34:05 +02:00
jpmschweitzerandClaude Opus 4.8 22f1fd9462 chore(meta): T-1030 -> review (PR for freeze/snow model)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:16:48 +02:00
jpmschweitzerandClaude Opus 4.8 8f83785c8f chore(meta): T-1029 done (PR #162 merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:44:27 +02:00
jpmschweitzerandClaude Opus 4.8 7c73e68827 chore(meta): T-1029 -> review (PR for morphology geometry generators)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:20:08 +02:00
jpmschweitzerandClaude Opus 4.8 e6600c4a90 chore(meta): T-1028 done (PR #161 merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:18:37 +02:00
jpmschweitzerandClaude Opus 4.8 0bcbc1573a chore(meta): note VoxelCache LRU perf on T-1031 (T-1028 review)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:47:56 +02:00
jpmschweitzerandClaude Opus 4.8 c40631aa53 chore(meta): T-1028 -> review (PR for VoxelColumn walking skeleton)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:38:12 +02:00
jpmschweitzerandClaude Opus 4.8 de86281c4f chore(meta): T-1025, T-1027 done (PR #160 merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:27:13 +02:00
jpmschweitzerandClaude Opus 4.8 8865cfd0a2 chore(meta): T-1025, T-1027 -> review (PR for climate + morphology)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:14:10 +02:00
jpmschweitzerandClaude Opus 4.8 bca80617e6 chore(meta): T-1032 done (PR #159 merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 12:53:51 +02:00
jpmschweitzerandClaude Opus 4.8 935d164aa3 chore(meta): T-1032 in_progress -> review (PR #159)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 12:38:28 +02:00
jpmschweitzerandClaude Opus 4.8 a516b06de9 chore(meta): T-1023/1024/1026 done (PR #158 merged)
D-239 three-carrier foundation merged to main. Review found a correctness
bug (per-region elevation) + hollow determinism tests, both fixed before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 11:25:34 +02:00
jpmschweitzerandClaude Opus 4.8 71a0544622 chore(meta): T-974 carriers -> review (PR #158); file T-1032 dispatch follow-up
T-1023/1024/1026 implemented and pushed as PR #158; moved to review.
T-1032 (new, under T-974) tracks wiring the production AnalyzeBody dispatch
to read BodyParams from the DB — currently always None, so the carrier layer
only runs in tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 10:29:34 +02:00
jpmschweitzerandClaude Opus 4.8 b7b4626035 chore(meta): T-1022 done; activate T-974 carrier trio (T-1023/1024/1026)
PR #157 merged -> T-1022 done. Activate the D-239 three-carrier foundation
batch via /whats-next: T-1023 (RegionProfile), T-1026 (domain warp), and
T-1024 (district climate) with refinement notes. T-1024 blocked-by T-1023
(temperature fields live on the RegionProfile struct).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 18:47:09 +02:00
jpmschweitzerandClaude Opus 4.8 a1e2288a79 chore(meta): T-1022 -> review (PR #157)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:33:55 +02:00
jpmschweitzerandClaude Opus 4.8 5dfea07bff docs(briefings): log worktree-sandbox dead-end + image.show win (clide)
T2: background agent / lead writes are confined to the session root, so an
out-of-root sibling worktree (.worktrees/<branch>) is unwritable — the
agent could design but not write, and there's no permission to grant. Fix
options for clide noted. Plus a positive: clide image show works first-try.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:57:10 +02:00
jpmschweitzerandClaude Opus 4.8 1cb53b3654 chore(meta): decompose T-974 into D-239 tile-derivation implementation tickets
Breaks the Atlas-to-tile derivation epic (T-974) into 9 implementation
tasks from the D-239 contract, as a walking skeleton:

- T-1023 RegionProfile carrier + derived gating + BodyWorldState cache
- T-1024 district climate primitives (temperature + moisture)
- T-1025 climate-derived fields (precip / GlaciationGrade / vegetation)
- T-1026 anti-squaring domain warp (f64-to-voxel)
- T-1027 morphology classifier (17-zone vocab + 8-family selector + seam matrix)
- T-1028 VoxelColumn pipeline (skeleton) + AlluvialPlain fallback
- T-1029 specialized morphology generators (7 families)
- T-1030 scattered transient freeze/snow model
- T-1031 believability + determinism + <5ms budget harness

DAG wired; first wave unblocked = T-1023, T-1024, T-1026.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:34:53 +02:00
jpmschweitzerandClaude Opus 4.8 6b07ab5070 chore(meta): fix 3 board-hygiene items from the T-750 sweep
- T-1017: removed 5 stale done-blocker edges (T-957/993/1005/1010/1016); only
  T-977 (architecture-flavor pipeline) genuinely blocks it now, so it auto-unblocks
  when T-977 ships.
- T-999: resolved the description contradiction — appended a clarification that the
  condition overlay does NOT feed D-100 DamageOverlay (the T-979 refinement is
  authoritative); BuildingConditionState is standalone.
- T-960: noted the sole remaining gap to close (gen_l0_heightmap overlay absent from
  OVERLAY_DEFS, required by D-226 acceptance criteria).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:40:39 +02:00
jpmschweitzerandClaude Opus 4.8 4c95cad7a4 chore(meta): close 3 drift tickets found in T-750 sweep
Si one-pass sweep of T-750's 38 open children (2026-06-07) found 3 more done-but-open:
- T-958 block irregularity (block_irregularity.rs, tested, wired)
- T-983 CityGenerationContext extension (all 4 fields, PR #145)
- T-975 ocean/lake water mask (features.rs, D-209/D-223)
Rest of T-750 is genuinely open or blocked — drift was concentrated in the #957
walkable-quarter merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:32:25 +02:00
jpmschweitzerandClaude Opus 4.8 ebed754229 chore(meta): reconcile Layer-4 street/footprint cluster + file dispatch ticket
Si vet (2026-06-07) of the next batch found the same drift as T-985/986: the street &
footprint geometry already landed under T-957. Marked done with evidence notes:
- T-989 morphology->street-pattern lookup (street_topology/derive_corridors)
- T-990 corridor/access-point network (Prim-MST, ±45° snap)
- T-991 BSP footprint subdivision + D-233 coverage + D-234b waterfront rule
- T-976 (parent) — all four geometry deliverables done+tested

Filed T-1022 for the genuine residual: the Layer-3 -> Layer-4 GenerateSkeleton
dispatch (founding_orientation wiring) that activates the dormant geometry in
production. A distinct cross-layer concern, not street geometry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:10:35 +02:00
jpmschweitzerandClaude Opus 4.8 2deeac210d chore(meta): T-984 -> done (merged in PR #156)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:48:14 +02:00
jpmschweitzerandClaude Opus 4.8 1e4b89f2f0 chore(meta): T-984 -> review
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:43:52 +02:00
jpmschweitzerandClaude Opus 4.8 6e24cc98df refactor(simulation): remove superseded skeleton String stubs (T-984)
D-229 makes BuildingPropertyTag the typed step-3 output that replaces the era/
society_profile/zone_palette String stubs on the skeleton. The tag + its derivation
(zone_type_id, flavor_ref, era/ConstructionEra, FloorExtent) all landed under T-957/
T-1006; this removes the now-dead stub fields they superseded:

- BlockSkeleton.era_modifications: Vec<EraModification> (era is per-footprint on
  BuildingPropertyTag.era now; era_cause retained as the block-level cause)
- QuarterSkeleton.society_profile: SocietyProfileRef (culture → tag.flavor_ref)
- QuarterSkeleton.zone_palette: Vec<ZoneDefinition> (zoning → tag.zone_type_id;
  distinct from FloorZone.zone_palette: ZonePalette, the real D-101 palette, kept)
- the now-orphaned `EraModification` and `SocietyProfileRef` String aliases

Kept: chunk_layout (real ChunkLayout / D-234 street network), z_band_zones (still
uses the ZoneDefinition alias), boundaries (separate stub, not D-229 scope).

cargo check + clippy -D warnings --all-targets clean; full server lib suite
1325 passed / 0 failed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:40:21 +02:00
jpmschweitzerandClaude Opus 4.8 6902fdc458 chore(meta): reconcile T-985/T-986 done — implemented under T-957/T-1006
Board cleanup surfaced by /whats-next + Si refinement: both tasks' work was already
merged (QuarterWorldState{skeleton,block_tags} + assign_all_block_tags + GenCompletion
state carrying for T-985; the four zone/entry/era/condition derivation fns + 31 D-142
RON files for T-986), but the tickets had drifted in backlog. Marked done with notes;
verified against server/src. T-984's residual (society_profile/zone_palette/EraModification
String stubs) is genuine remaining work — handled next on its own branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:34:47 +02:00
jpmschweitzerandClaude Opus 4.8 53064b051e refactor(meta): gate phases on the cascade hierarchy, not labels
Replaces the labels-as-milestones pattern (carried over from the retired SQLite
milestone subsystem) with pql's native initiative/epic hierarchy, which already
modelled this: initiative T-745 (Development Cascade) holds the six phases as epics.
A ticket is in a phase by being parented under that phase epic — self-maintaining,
no label to apply or forget.

The `phase:4` label had already drifted (66 tickets under the Phase-4 epic T-750 but
only 42 labelled). Fixes:
- T-750 (Phase 4) -> in_progress to mark the active phase (sequential per D-166).
- Re-parented the 2 strays (T-974 Atlas-to-tile epic, T-1008 economy task) under T-750.
- Dropped all 42 phase:4 labels (tombstoned in the changelog).
- /whats-next, /ticket, ticket-cli.md, CLAUDE.md now gate on
  `pql ticket list --under <active-phase-epic> --unblocked` instead of `--label phase:4`.
- Fixed the label-action verb in the docs: pql uses `add|rm`, not `add|remove`.
- pql-requirements #9 flipped: no milestone entity / labels-as-milestones needed — the
  initiative/epic tree is the answer.

Verified: `pql plan rebuild` reconstructs the mutations; `--under T-750 --unblocked`
returns the active phase's ready work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 21:48:21 +02:00
jpmschweitzerandClaude Opus 4.8 88d9be070e feat(meta): seed 1013 tickets into pql changelog (pql migration phase 2)
One-way ticket data migration from the legacy settledreach.db into pql's
git-tracked changelog. Establishes the T-N == #N id bijection (old #440 -> T-440)
so thousands of #NNN git-commit references stay a trivial mapping.

Migrated (verified by full `pql plan rebuild` from changelog):
  - 1013 tickets  (status + type distributions match source exactly)
  - 481  dependencies
  - 16   history rows (deterministic content hash so ON CONFLICT(hash) dedups)
  - 90   labels = 48 source + 42 milestone-derived
           (active "Phase 4" milestone -> phase:4; "Process Rewire" ->
            milestone:process-rewire; milestone_deps was empty/vestigial)

Transforms: ids T-prefixed, sprint_id dropped (legacy/archival), decision_ref
and the one 'server,client' comma-team (#575) kept verbatim, deleted_at NULL,
canonical_version 1. Seeded rows carry hash=NULL on tickets/deps/labels — proven
safe: PK-based ON CONFLICT, updated_at drives LWW, and replay is idempotent.

Key finding that dissolves pql-requirements item #1 ("Critical"): seeding via
direct-INSERT does NOT require explicit ticket ids from `ticket new`. The id
counter derives from max(id), so after seeding T-1..T-1021 the next native
`pql ticket new` mints T-1022 — no recycling, no collision. The blocker only
applied to the `ticket new --id` path we never use for bulk seeding.

Scaffolding: .pql/changelog/<table>/0000-schema.sql (canonical pql 1.6.2 schema,
byte-identical across the 4 table dirs) + .gitattributes union-merge driver so
changelog SQL never produces binary-style merge conflicts. Seed is reproducible
via tooling/pql-migrate/seed_tickets.py (read-only on the source, idempotent).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 12:32:50 +02:00