Files
settled-reach/.claude/rules/project-structure.md
T
jpmschweitzerandClaude Opus 5.5 ddce4441a9 refactor(tooling): T-1290 — the assets domain, where OFF is the normal case
tooling/db/ (a misnamed directory: connectors, not database work),
trellis-batch.sh and synth_ui_sounds.py become `reach assets`:
audio {health,generate,batch,post {convert,normalize,trim,pipeline}},
image {health,generate}, trellis {health,generate,batch}, and synth-ui.
The four audio bash wrappers are retired, and tooling/db/ is gone.

Parity, from baselines taken before anything moved:

- the four UI-sound WAVs and the harmonic-synth WAVs (exponential and linear
  decay) are byte-identical
- the ffmpeg pipeline's decoded PCM is identical. Its .ogg bytes are not,
  even between two runs of the OLD code: Ogg picks a random stream serial,
  so the encoded file was never the right thing to compare
- the network success paths can't be run in a gate (Stable Audio and Trellis
  are kept off, Gemini costs money), so tooling/test_assets.py stands up a
  fake Gradio and pins every payload: the audio submit, Trellis's six-call
  session sequence with its 9-input image_to_3d, and the Gemini body. It
  failed when one Trellis value was mutated (7.5 → 7.0)

Failure classification, in endpoints.py, is the point of the port. The
services are OFF by design (VRAM on tower-of-joy, D-17), and the topology doc
warns against "fixing" one by restarting it. So a refused connection says OFF
and asks for the service to be turned on rather than restarted; a 4xx/5xx says
the request was rejected; 401/403 says credentials; 429 says quota; and an
unreachable Gemini blames the network, not VRAM.

Behaviour changes, each a failure that used to read as success or crash:

- audio batch and trellis batch exited 0 with failures in their summaries;
  they now print the summary and exit 1
- trellis generate on a missing image crashed with a TypeError
  (print(..., indent=2)); it now names the file, and checks it before the
  service so a typo is not reported as an outage
- the ffmpeg pipeline left its intermediates behind when a step failed

Structure: the connectors called each other as subprocesses (batch spawned
the connector, which spawned audio_post) and parsed each other's stdout. They
are now function calls, and ffmpeg is the only exec, through core/process.
ensure_venv() is removed: it os.execv'd into .venv, which D-263's exec rule
forbids, and reach declares the dependencies itself. config.json moved into
the domain deliberately, and the local-services rule follows it.

Output contract: results are still JSON on stdout with the same keys, so skill
readers keep working. Failures are an exit status with a Fix line, never
{"ok": false}. The audio-gen, glb-gen and image-gen skills, Araminta's agent
file and the allow-list are updated to match. glb-gen's "trellis-batch.sh is
hardcoded to one category" caveat is gone: batch takes --input-dir or --names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 19:49:20 +02:00

88 lines
5.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Project Structure (detailed)
For how `wiki/`, the generators, `systems.db` and the runtime relate — which
way the arrows point for any given file — the canonical map is the diagram
`docs/diagrams/data-flow/wiki-generator-flow.d2` (**D-262**), not the tree
below. The tree says where things live; the diagram says who writes them.
```
wiki/ # THE SEED (11,864 files, the largest tree here). Authored
# world content the generator varies from — NOT a
# reference work, and mostly NOT hand-written.
# See Skill(wiki) before editing anything below.
index.md # the map: 301 systems, 220 named
GOVERNANCE.md # ownership models, status lifecycle, directory rules
_templates/ # 17 templates, one per entity kind — copy to author
authoring/ # 10 guides (monologue, culture, dual-lens, line-id…)
economics/ # INPUT. TOML vocabularies + schema.md. Seeds systems.db
# AND, from Phase 4 on, world content generation
star-systems/ # OUTPUT, 93% of the wiki. Generated by
# tooling/domains/wiki/wiki_sync.py FROM systems.db + star-map.json
GJ-{id}/ # system dir (hyphenated id)
index.md # no frontmatter; <!-- READ-ONLY --> blocks are
# regenerated — authored prose lives in the named
# sections between them
gttr*.md # Drifter's Guide prose (corridor/system/location)
bodies/{id}/ # body dir (UN-hyphenated id, e.g. GJ820Bc)
index.md # frontmatter IS the body definition: seed,
# land_fraction, axial_tilt_deg — generator INPUT,
# machine-owned, never hand-edited
*.png, *.npz # globe/relief/heightmap renders + terrain grids
markers.json # names-only city pool (D-223)
corporations/ factions/ contraband/ concepts/ triangles/ species/
institutions/ cultural-groups/ lore/ technology/ glossary.md
# INPUT, flat, wiki-is-truth. YAML frontmatter carries
# status (proposed|draft|canonical), cross_refs,
# decision_refs, and `description` — which exists so
# AGENTS can filter before loading whole files
client/ # Godot 4 client
ui/
implant/ # Implant UI component library (D-169): ImplantPanel, ImplantHeader,
# ImplantSeparator, ImplantDataRow, ImplantTextBlock, default_implant.tres
scripts/
autoloads/
hud_groups.gd # HUD z-index layer manager (D-170): GAMEPLAY/INSERT/FULLSCREEN/MODAL modes
rendering/
gameplay_renderer.gd # Base class for occludable renderers; connects to HudGroups signal
server/ # Rust/bevy_ecs simulation server
tooling/ # Build tools, scripts, asset pipelines
tests/ # Integration and end-to-end tests
.config/ # Configuration files (linters, formatters, CI)
.cache/ # Local caches for testing/linting (gitignored)
docs/
discussions/ # Discussion rounds (archived here when complete)
briefings/ # Per-agent context briefings (maintained by Qatux)
architecture/ # Technical architecture documents
design/ # Game design documents
diagrams/ # d2 source + PNG renders
sprints/ # Historical archive (Sprint 1–38) — no new sprint directories
workshops/ # Workshop briefs and outputs
db/
schema.sql # Database schema
tooling/ # ONE package behind the `reach` CLI (D-263) — `reach --help`
main.py # routing only; the domain registry
core/ # config, console (the single output path), errors,
# process (the single guarded exec), jobs, command
domains/<name>/ # router.py (transport) + service/helper modules (logic)
atlas/ planet/ # the spatial ladder; `atlas planet` is its rung 3
ledger/ # economics import — the sole systems.db generator
wiki/ # wiki fill rates + GTTR hook
assets/ # Stable Audio / Gemini / Trellis connectors
config.json # endpoint URLs (never keys — tracked file)
… # check, validate, godot, visual, generate, blender, pr, jobs, dev
scripts/blender/ # Blender payloads — run by Blender's Python, never imported
archive/ # Provenance only, never run: pql-migrate/, wiki-bootstrap/
test_*.py # gate tests, run by `make test-tooling`
.claude/
agents/ # Agent personality files
skills/ # Skill definitions
rules/ # Auto-loaded instruction modules
governance/ # Decision records (pql DQR tree, source of truth)
README.md # Domain guide + pql-maintained record index
decisions/ # D-NNN confirmed — <domain>.md (architecture, perception, content, scope, economics, process)
questions/ # Q-NNN open — <domain>.md
rejected/ # R-NNN rejected — <domain>.md
DECISIONS.md # Redirect to governance/ tree
TEAM.md # Team roster and roles
```