Commit Graph
2315 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.8 cd8bfec64b feat(simulation): VoxelColumn walking skeleton (T-1028)
D-239 §1/§7/§10 — the lower derivation chain end-to-end with the AlluvialPlain
fallback only (specialized families are T-1029).

- chunk_context.rs: ChunkContext (64m) — basin_direction + meander phase/wavelength
  + active-channel params. NO per-tile flow_direction[64x64] (D8 ~152m coarser than
  a chunk, D-239 §10); features >64m seed from Region-or-higher. SeedDomain::ChunkContext=8.
- voxel.rs: VoxelColumn (1m) composing the D-228 tile axes (TerrainMaterial /
  FloorMaterial=None / Vegetation / Water / elevation_m). Derive-on-demand + VoxelCache
  (LRU BTreeMap, never persisted per D-227). Domain warp (T-1026) wired through:
  f64 warp -> as-i32 truncation to the voxel address; all material/morphology gates
  integer (D-010 — the meander wavelength f64 is truncated before the Water decision).
- AlluvialPlain generator: Soil/Wetland terrain, climate vegetation, integer-meander
  channel (Shallow/Deep) from ChunkContext. The other 7 families are dispatch stubs
  (canonical terrain material, fall back to AlluvialPlain geometry) — no panic.

29 new tests incl end-to-end determinism (same seed/pos -> identical column),
cache hit/miss/eviction/re-derivation, warp-applied. cargo test 1563 pass,
clippy -D warnings clean, fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:53:47 +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
jpmschweitzer 211c16c334 Merge remote-tracking branch 'origin/climate-morphology-layers' 2026-06-08 13:25:39 +02:00
jpmschweitzerandClaude Opus 4.8 868da28192 fix(simulation): address PR #160 review (climate + morphology)
Hoshe REQUEST_CHANGES + Tyre APPROVE:

- Riparian vegetation logic was doubly-wrong: it granted the micro-oasis only
  in the impossible cold case (temp < -50, no liquid water) and DENIED it in the
  intended hyper-arid case. Split: extreme cold -> Barren always; hyper-arid ->
  RiparianScrub iff near perennial water. (Hoshe #2)
- morphology_zone_has_exactly_17_variants was misleading (asserted >=16). Rename
  to morphology_zone_region_scale_emits_16_of_17, tighten to ==16, and document
  that BraidedPlain is the lone region-unreachable zone (needs lithology, deferred
  to ChunkContext) and that Lake IS reachable. Tyre's 'Lake also deferred' was a
  false positive (ocean 60-79 -> Lake). (Hoshe #1, Tyre #1)
- derive_morphology_zone docstring now lists the real multi-path emission sites
  for TidalFlat/Wetland, ValleyFloor/RiverBank as their own gates, and BraidedPlain's
  deferral — the §6 parent-family names are descriptive, not exhaustive. (Hoshe #3, Tyre #2/#3/#4)
- D-239 record: added a T-1025/T-1027 implementation note (enum freeze location,
  16/17 region reachability + BraidedPlain deferral, §7 gate-ordering interpretation).

No vocabulary change. cargo test passes, clippy -D warnings clean, fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:24: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 961855f276 feat(simulation): climate-derived fields + frozen 17-zone morphology (T-1025, T-1027)
T-1025 (D-239 §2) — climate-derived fields, all from the temperature(+moisture)
primitive:
- precipitation_class + glaciation_grade re-keyed to (temperature_c, moisture_q)
  inputs (were keyed off raw body params); river_threshold signature follows.
- New VegetationClass (Absent/Barren/Scrub/Forest/RiparianScrub/RiparianThicket)
  + derive_vegetation: treeline bands x elevation, structural Forest->Scrub->Barren
  no-skip, riparian 1-3 tile band; airless (temp None) -> Absent.
- 21 tests.

T-1027 (D-239 §5/§6/§7) — morphology classifier:
- FROZEN 17-zone MorphologyZone enum exactly per D-239 §6 (OpenOcean..Wetland,
  repr(u8) pinned). Removed legacy Sea/CoastalLowland/Island/Canyon/Unknown;
  all consumers (skeleton_gen street_topology) remapped to nearest D-239 zone.
- 8-family gated decision tree (LavaField..AlluvialPlain fallback) over integer
  inputs; hard gates: Fjord>=GlaciationGrade2, LavaField=Volcanic tectonic,
  lithology slope/form laws (§8). 4 sub-classification zones (TidalFlat,
  Estuarine, Alpine, Wetland) derived from family + elevation/water.
- Build-time compatibility-matrix invariant tests (§7): MeanderReach<->Volcanic
  and Volcanic<->Fjord forbidden adjacencies structurally prevented by gate order.
- 13 tests incl 17-variant completeness + discriminant pinning.

D-010 integer discipline throughout. cargo test 1534 pass, clippy -D warnings
clean, fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:12:34 +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
jpmschweitzer 17f8e87e5a Merge remote-tracking branch 'origin/region-profile-dispatch' 2026-06-08 12:51:52 +02:00
jpmschweitzerandClaude Opus 4.8 0a8933fbcc test+docs(simulation): address PR #159 review (T-1032)
- Hoshe: body_without_system_row test inserted a NULL system_id, impossible
  under production schema (system_id NOT NULL REFERENCES star_systems). Rewrite
  as body_with_orphan_system_id_* — non-NULL system_id with no matching
  star_systems row (the real case the LEFT JOIN guards) + NOT NULL in the test
  schema + corrected comment.
- Tyre: cascade.rs PERF/TODO comment said the region path 'defers to T-1032';
  T-1032 IS this PR, so production dispatch is now live. Update to track T-1028
  only and note the cost is live in production.

No production logic change. cargo test body_params_reader 7 pass, clippy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 12:50:35 +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 1887c886ef feat(simulation): dispatch RegionProfile layer in production (T-1032)
The D-239 carrier layer (T-1023/1024/1026) only ran in tests because every
production AnalyzeBody enqueue passed body_params: None. Wire the real path:

- New BodyParamsReader (server/src/atlas/body_params_reader.rs): read-only
  systems.db reader, joins bodies -> star_systems (LEFT JOIN) for the climate/
  tectonic inputs. SQL verified against systems-schema.sql. All fields Option,
  NULLs handled; tectonic_activity absent from schema -> None (derives from
  planet_class). 5 unit tests.
- layer_proxy.rs: on cache miss, read the body's params and pass
  Some(Box::new(..)). On read error, warn + fall back to None (cascade stops at
  Settlement, no panic) — graceful degradation.
- plugin.rs / main.rs: register BodyParamsReaderResource (CityContextReader
  pattern) and thread it through serve_atlas_requests.

BodyWorldState.regions now populates for real bodies in the D-206 background
pass. End-to-end tests cover wired (regions populated) + unwired (empty) paths.

cargo test 1504 pass, clippy -D warnings clean, fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 12:28:01 +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
jpmschweitzer b883b31c67 Merge remote-tracking branch 'origin/tile-derivation-carriers' 2026-06-08 11:23:05 +02:00
jpmschweitzerandClaude Opus 4.8 7084a41013 docs(simulation): fix stale elevation comment in derive_all_regions
Re-review (Hoshe + Tyre, both APPROVE) caught one stale comment: after the
per-region elevation fix, derive_region_profile owns elevation_km (from elev_q),
not the caller. Update the comment so maintainers don't read it as caller-supplied.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 11:21:35 +02:00
jpmschweitzerandClaude Opus 4.8 95f26ae3e9 fix(simulation): address PR #158 review (carrier foundation)
Hoshe + Tyre review (CHANGES REQUESTED):

- domain_warp golden tests were hollow (discarded values, only asserted
  dx!=dy). Consolidate into one real golden_vector test with pinned f64
  literals as the regression anchor. (Hoshe #1, Tyre #2)
- Per-region temperature used body-level elevation_km for every region, so
  alpine and sea-level regions on a body got identical lapse — defeats the
  D-239 §2 per-district temperature. Derive elevation_km per region from the
  region's own elev_q (× MAX_REGION_ELEVATION_KM). (Tyre #1)
- Region seed was derived under SeedDomain::DomainWarp (collision risk with
  the tile warp) and discarded unused. Remove it + the orphaned region_pos_id
  and SeedDomain import; keep a reserved _seed param for T-1027/T-1028. (Hoshe #2)
- Fix inverted tilt_factor comment. (Hoshe #3)
- ClimateConstants doc referenced a load() that doesn't exist; correct it —
  embedded default() is authoritative today, climate_constants.toml is the
  canonical mirror, runtime load lands with T-1032. (Hoshe + Tyre)
- cascade.rs: drainage re-run was mislabeled 'cheap'/'no drainage needed';
  document the real cost + PERF/TODO(T-1028/T-1032) against the D-239 §10
  budget. (Tyre #3)

cargo test 1497 pass, clippy -D warnings clean, fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 11:10:32 +02:00
jpmschweitzerandClaude Opus 4.8 b4eef33e7e chore(skills): whats-next recommends clearing open PRs before new work
Add step 1a: check open PRs first and recommend /pr-review (review -> merge)
before selecting a batch. Open PRs are in-flight WIP; starting new work on top
piles up the board, and the cascade-correct next batch is often dependency-gated
on an in-review PR (won't show as --unblocked, or must stack on an unmerged
branch). Renumber the existing 1a-1d substeps to 1b-1e.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 10:53:51 +02:00
jpmschweitzerandClaude Opus 4.8 c318cea6db chore(config): gate cargo test in pre-push on Rust changes
Add `cargo test --quiet` to the pre-push Rust block (sharing clippy's
target/ guard) so the suite runs automatically on every push touching
server/. Nothing ran the tests before — pre-push did only fmt/clippy/deny
and there is no CI — so a Rust regression could reach main unverified.

Document the resulting agent-spawn rule in team-patterns.md: don't have
implementation agents pre-run fmt/clippy/test pre-emptively, since the push
gate now enforces all three. The gate is authoritative; the lead patches any
fallout at push.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 10:39:55 +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 def70eaf37 feat(simulation): D-239 three-carrier foundation (T-1023/1024/1026)
First foundation slice of the Atlas-to-tile derivation model (epic T-974),
building the carrier layer ahead of its T-1027+ consumers.

T-1026 — Anti-squaring domain warp (D-239 §4): stateless pure
fn(seed,body_id,pos)->(f64,f64), ±8m, f64 to the final voxel then as-i32
truncation for IEEE-754 cross-target determinism. New domain_warp.rs,
SeedDomain::DomainWarp; golden-vector + cross-thread tests. Position math
only — D-010 integer discipline preserved downstream. Marked dead_code
until the T-1028 VoxelColumn pipeline consumes it.

T-1023 — RegionProfile carrier (D-239 §1,§10): new RegionProfile +
TectonicClass/GlaciationGrade/PrecipitationClass enums + BodyParams; derived
per-region river_threshold replacing the global 200 for tile consumers.
regions: BTreeMap on BodyWorldState, populated via the cascade's new
RegionProfile layer (runs when body_params is Some, else falls back to
Settlement). D-010 integer discipline, BTree ordering.

T-1024 — District climate primitives (D-239 §2): nullable temperature_c +
moisture on RegionProfile, mean-annual scalar (no clock dep; dynamic branch
deferred to Q-105). Hybrid inputs — new bodies.axial_tilt_deg column imported
from planet-gen body-defs (populate_axial_tilt_deg, 2611 bodies), luminosity
and orbital distance derived at runtime; greenhouse + diurnal-swing tables in
source-canonical climate_constants.toml. D-239 implementation note added.

cargo test: 1498 passed, 0 failed. clippy clean (pre-existing
large_enum_variant only). make check-systems-db: stamp fresh.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 09:28:31 +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 ff42dc2241 chore(meta): remove stale PROJECT_STATE.md
The file was last updated 2026-04-05 (Sprint 32) and had gone
comprehensively stale: it claimed Phase 1 active / Sprint 32 current,
listed D-001..D-170 (now D-239), and showed the pre-D-166 phase
ordering (player control before world gen, with a 2-floor test map) —
directly contradicting the canonical cascade in CLAUDE.md. All of its
content is canonical elsewhere (cascade in CLAUDE.md, phase + decision
status in pql/governance), and no briefing references it anymore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 18:47:09 +02:00
jpmschweitzerandClaude Opus 4.8 c395ca1e1a chore(meta): realign repo config after directory move
The repo moved to /var/mnt/data/projects/settled-reach (flat layout,
no more /main worktree subdir). Drop the stale autoMemoryDirectory
override (pointed at the old /home path; revert to the native
per-slug memory store) and gitignore .worktrees/, which now holds
per-machine git worktrees under the repo root.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 18:47:09 +02:00
jpmschweitzer 17f6e910ac Merge pull request 'feat(simulation): wire L3->L4 GenerateSkeleton dispatch (T-1022)' (#157) from layer4-skeleton-dispatch into main 2026-06-07 18:42:12 +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 a69f4cf3ec feat(simulation): wire L3->L4 GenerateSkeleton dispatch (T-1022)
The Layer-4 quarter-skeleton geometry (D-234: morphology-correct streets +
the D-234b waterfront rule) was fully implemented but dormant — no
production call site dispatched GenerateSkeleton from a settlement
placement, so founding_orientation stayed pinned to the
context_from_read_set Cardinal stub.

Expand the BodyAnalyzed arm of drain_generation_completions to, before
caching the body, submit one GenerateSkeleton per CityPlacement: build the
D-199 context from the read-set, override founding_orientation with the
attractor-matched value carried on the placement (D-213), and derive a
canonical namespace-isolated quarter_id from (world_seed, body, city)
(D-194/D-230) instead of the city_id*10 placeholder. Dispatch logic is
extracted into the pure build_skeleton_work_item helper for DB-free testing.

Reader + world seed are optional system params (mirrors serve_atlas_requests);
absent either, dispatch is skipped and the body is still cached. Empty
placements and per-placement read_set errors are handled (warn + skip).
Station/multi-source dispatch (Q-109) is out of scope — BodyAnalyzed only
fires on the planetary AnalyzeBody path.

Tests: orientation-override + canonical-quarter_id unit test and a
determinism/city-scoping test on the helper. Full lib suite green (1327).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:30:51 +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 04efe52b38 docs(diagrams): add D-239 tile derivation contract diagram
Architecture diagram for D-239: inputs -> three-carrier refinement chain
(RegionProfile -> ChunkContext -> VoxelColumn), the district-temperature
climate primitive + derived freeze/snow, the 8 gated morphology families
over the frozen 17-zone vocabulary, and the anti-squaring domain warp.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:23:27 +02:00
jpmschweitzerandClaude Opus 4.8 0b21aee3ac docs(briefings): add clide team-mode friction log
Hand-off material for the clide team. Headline: team mode works at the
Claude layer but is invisible in clide's UI — teammates ran in-process
(no pane), the Team Chat view stayed inert, no `clide team` verb. Captured
live during the Q-101 workshop; suggested fixes included.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:15:04 +02:00
jpmschweitzerandClaude Opus 4.8 fa8b6ebf08 docs(governance): file D-239 tile derivation contract, resolve Q-101
Resolves Q-101 — how a coarse Layer-1 cell + seed becomes coherent ~1m
voxel geometry across the scale jumps. The tile-derivation-contract
workshop output:

- three-carrier refinement chain RegionProfile -> ChunkContext -> VoxelColumn,
  pure deterministic, no authoring at the derivation layers
- district-temperature climate primitive (2x2 km, C, nullable) + separate
  moisture; everything climatic derives from temperature(+moisture)
- scattered, transient freeze/snow model (freshwater +5..-10, sea ice own
  band, snow moisture-gated; forms cold phase / melts warm phase)
- stateless f64-to-voxel domain warp (anti-squaring)
- 8 morphology families over a frozen 17-zone vocabulary, gated decision tree
- seams prevented at source (gate ordering + build-time matrix); valid
  geomorphic seams kept sharp + warped

Includes workshop brief, round-1 positions, and workshop-outcomes.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:14:55 +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 51c64b07a1 chore(meta): update changelog
Log the pql migration (PR #154/#155): planning system moved off settledreach.db
onto pql (governance DQR tree + git-tracked changelog, T-NNN ids, phases gated on the
cascade hierarchy), the clide IDE skill, and the Phase-6 removal of the legacy SQLite
ticket/decision tooling. Corrected the unreleased D-221 entry's stale "many-to-many
milestones" claim.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:22:26 +02:00
jpmschweitzerandClaude Opus 4.8 595a6de5c6 docs(architecture): archive completed pql migration plan
The migration shipped (Phases 0-5 in PR #154; phases-as-hierarchy + Phase-6 SQLite
retirement in PR #155), so the plan is done. Moved pql-migration.md from the repo root
to docs/architecture/, flipped status approved -> completed, and added a header pointing
to the current-usage docs (CLAUDE.md, ticket-cli.md, governance/README.md) and the
tooling/pql-migrate/ transforms. Kept as a why/how record of the move off the binary
SQLite DB. pql-requirements.md stays at root — still-open feedback for the pql team.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:17:48 +02:00
jpmschweitzerandClaude Opus 4.8 ccc194d5f9 fix(meta): address PR #155 review — DEVOPS layout + common.py cleanup
Hoshe (QA): docs/DEVOPS.md Repository Layout still listed `decisions/` — corrected to
`governance/` (the DQR tree) and added a `.pql/` entry for the planning store.

Tyre (architecture, non-blocking): tooling/db/common.py docstring named deleted scripts
as consumers and `resolve_db_path`/`load_config`/`get_connection` were dead settledreach.db
code. Trimmed common.py to just `ensure_venv` (the only symbol any kept connector imports)
and rewrote the docstring to name the real consumers.

ruff clean; common.py parses; ensure_venv intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:06:39 +02:00
jpmschweitzerandClaude Opus 4.8 5a399c7924 chore(meta): retire legacy SQLite ticket/decision tooling (pql migration phase 6)
The pql cutover is stable, so remove the superseded SQLite planning tooling. Surgical
— only the ticket/decision/raw-SQL scripts (all settledreach.db-bound and replaced by
pql) are deleted; the asset/audio/wiki connectors and shared common.py stay.

Removed:
- tooling/db/{ticket,decision,decisions-sync,decisions_sync.py,sqlite-query,sqlite-exec,
  sqlite-init,sqlite-seed,sqlite_connector.py}
- tooling/{db-backup,db-install} + docs/backups/settledreach.db.backup (the binary-DB
  backup ritual; tickets now live in the git-tracked .pql/changelog/)
- tooling/check-decision-ids (dead stub, superseded by `pql decisions validate`)
- Makefile db-backup/db-install targets; SR_DB_PATH + tooling/db/{ticket,sqlite-*,
  decision*} entries from .claude/settings.json (audio entries kept)

Updated docs to pql: DEVOPS.md (SQLite Access + Decisions System → pql), project
structure, ticket-cli closing note, asset-pipeline raw-SQL warning.

Kept (verified still imported by the asset connectors via common.ensure_venv): common.py,
config.json, audio/image/trellis/wiki connectors. The live settledreach.db file
(gitignored, repo-parent) is left on disk as a cold rollback only.

ruff clean; pql decisions validate ok (357 decisions / 1013 tickets).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 22:13:29 +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 064382c0cc chore(skills): add clide IDE skill
The session now runs inside the clide IDE, which exposes its UI surface as a
`clide <subsystem> <verb>` CLI (observe + drive parity). Skill copied from the
clide project; documents `clide capabilities` as the authoritative discovery
command and the observe/drive verbs (editor/files/git/search/pane/ui/pql).

clide has the pql planning store wired in (Tickets + Decisions sidebar panels),
so the just-merged migration powers the IDE's planning UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 21:25:00 +02:00
jpmschweitzerandClaude Opus 4.8 f8d9b777b0 fix(config): address PR #154 review — gitattributes glob + script roots
Tyre (architecture review):
- .gitattributes: `.pql/changelog/*.sql` matched nothing (files are one level
  deeper at .pql/changelog/<table>/<YYYY-MM>.sql), so the union-merge driver never
  applied — `git check-attr merge` returned `unspecified`. Fixed to
  `.pql/changelog/**/*.sql`; now resolves to `merge: union` for monthly + schema
  files. Restores the changelog's conflict-free merge guarantee.
- Migration scripts: the re-runnable ones (seed_tickets.py, add_workshop_provenance.py)
  now derive the repo root from `git rev-parse --show-toplevel` instead of a hardcoded
  /main path, so re-running from a worktree/clone targets the right checkout. The three
  one-shot transforms (restructure_decisions, repath_references, retag_ticket_refs)
  get a comment noting they're already-applied and unsafe to re-run (git mv on moved
  sources) — keeping the path honest rather than implying re-runnability.

Hoshe approved (all QA checks passed). ruff clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 21:05:31 +02:00
jpmschweitzerandClaude Opus 4.8 c03a75e4c0 chore(config): allow Bash(pql) in the permission allowlist (phase 4)
Completes the Phase 4 consumer cutover: adds Bash(pql) / Bash(pql *) to
.claude/settings.json so the pql workflow runs without prompts. Added manually by
the lead — the auto-mode classifier blocks an agent from self-widening wildcard Bash
permissions even via /update-config (a deliberate security boundary).

SR_DB_PATH and the Bash(tooling/db/*) allowlist stay until Phase 6 (rollback path).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 13:07:22 +02:00
jpmschweitzerandClaude Opus 4.8 943f2e7749 docs(workshops): add decision_refs provenance frontmatter (pql migration phase 5)
Workshop -> decision provenance was prose-only. Adds a `decision_refs:` YAML
frontmatter list (the confirmed D-records each workshop-outcomes.md touches,
filtered against the governance decision set) to all 17 workshop outcomes; the two
that lacked frontmatter (commodity-catalog, system-economic-specialization) get a
minimal block. pql indexes the list and `SELECT fm.decision_refs` round-trips it, so
"which workshops touch D-NNN" is answerable via SELECT + filter or `pql search`.

decision_refs is a relevance signal (decisions a workshop discusses/produces), not a
strict authorship claim — historical bare refs aren't disambiguated. Generated wiki
read-only sections are left untouched.

Noted in pql-requirements #5: 1.6.2 has no working DSL operator for frontmatter
list-membership (`~`/`contains` error, `in` matches nothing), so membership queries
need a client-side filter for now.

Reproducible via tooling/pql-migrate/add_workshop_provenance.py (idempotent).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 13:06:33 +02:00
jpmschweitzerandClaude Opus 4.8 64be267249 docs(skills): cut workflow skills over to pql (phase 4)
Repoints the kanban workflow skills from tooling/db/* to the pql CLI:

- /whats-next: milestone queries -> `pql ticket list --label phase:4 --unblocked`
  (--unblocked does the dependency walk, collapsing the old milestone + per-ticket
  deps + milestone_deps steps); WIP via `pql ticket list --status in_progress` (pql
  doesn't enforce the limit — warn manually); refinement append via `pql ticket append`;
  activation via `pql ticket status`.
- /ticket: full reference rewritten to `pql ticket`/`pql plan`; milestone subcommands
  -> phase labels; points at .claude/rules/ticket-cli.md.
- /pr-process: step 8 extracts T-NNN (maps bare #NNN -> T-NNN) and calls
  `pql ticket status T-<id> review`.
- /bug-report: bug creation via `pql ticket new bug`.
- clerk: decisions-sync mechanism line -> `pql decisions sync` (factual fix only; the
  agent's review logic stays for the #965 re-enable).
- workshop-start IMPROVEMENTS: the old `decision claim` non-idempotency footgun no
  longer applies — `pql decisions claim` is side-effect-free.

pr-review/git-commit needed only the Phase-1 path repoint (no command refs); the
settledreach.db.backup exclusion in pr-review stays until Phase 6.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 12:57:58 +02:00
jpmschweitzerandClaude Opus 4.8 8f4194982e docs(meta): rewrite ticket/decision command surface to pql (phase 4)
Rewrites the canonical command reference (.claude/rules/ticket-cli.md) and CLAUDE.md
to the pql CLI: `pql ticket`/`pql plan`/`pql decisions` replace `tooling/db/ticket`,
`sqlite-query`/`sqlite-exec`, and `tooling/db/decision`. Documents T-NNN ids, the
markdown-sourced governance decision tree, the rebuildable changelog-backed pql.db,
and labels-as-milestones (phase:4) in place of the removed milestone entity.

Maps the old surface accurately: ticket new (positional type+title), show
--with-context/--with-blockers, block --by / unblock --from, label add/remove,
decisions claim/list/show/validate/sync, plan whatsnext/review/status.

Behavioral/command cutover only — the legacy tooling/db/* and SR_DB_PATH stay as the
rollback path until Phase 6.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 12:52:27 +02:00
jpmschweitzerandClaude Opus 4.8 af9412b988 chore(config): wire pql hooks + Makefile decision targets (pql migration phase 4)
Folds pql's planning logic into the version-controlled .config/hooks/* (pql's own
.pql/hooks installer is dead under core.hooksPath=.config/hooks):

  - pre-commit: + `pql decisions validate` (decision-ID/format gate, supersedes the
    never-built check-decision-ids TODO) and `pql plan export --stage` (flush ticket
    mutations to the git-tracked changelog and stage them into the commit). Both
    guarded by `command -v pql`; export is a clean no-op when nothing changed.
  - post-merge: `pql plan import` + `pql decisions sync` (replay incoming changelog,
    re-sync markdown decisions).
  - post-checkout (branch only): `pql plan rebuild` + `decisions sync`.
  - post-rewrite (rebase/amend): `pql plan rebuild`.
  - install-hooks chmods the three new hooks.

Makefile decision targets repointed to pql: decisions-sync -> `pql decisions sync`,
decisions-active -> `pql decisions list --type confirmed`, new decisions-validate ->
`pql decisions validate`. Dropped the SQLite-query conveniences (coverage/orphan/
orphan-tickets); per-decision coverage is `pql decisions show <id> --with-tickets`.

db-backup/db-install and SR_DB_PATH are intentionally kept until Phase 6 so the
legacy SQLite store stays intact as the migration rollback path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 12:49:42 +02:00
jpmschweitzerandClaude Opus 4.8 aefbb4bd88 docs(meta): switch ticket-reference convention #N -> T-N (pql migration phase 3)
Adopts the T-NNN convention (T-N == old #N == pql ticket id) across the active
operational layer: governance/ decision records, .claude/{rules,agents,skills},
CLAUDE.md, DECISIONS.md. 283 references rewritten.

Guarded against false positives (17 correctly skipped, each logged):
  - PR references kept (PR #136/#138/... — PRs are a separate #-namespace)
  - non-ticket numbers kept (#4122; the "#1 process failure" idiom; "task #3")
  - only #N where N is an actual ticket id is rewritten; the 1-4 digit word-bounded
    match also excludes 6-digit hex colours in the visual decision records

Git history is NOT rewritten (a commit's #N already equals T-N numerically), and
historical archives (docs/sprints, docs/discussions, docs/workshops) keep their
point-in-time #N. The /pr-process ticket-ID extraction logic moves to T-NNN in the
Phase 4 consumer cutover.

Verified: pql decisions validate ok; sync 357 records / 1057 refs / broken 0 (the
prose edits don't affect decision parsing or the tickets.decision_ref linkage).
Transform committed at tooling/pql-migrate/retag_ticket_refs.py.

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