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>
This commit is contained in:
2026-03-24 17:40:37 +01:00
co-authored by Claude Opus 4.6
parent fc3b7485c6
commit ca676e8e66
4 changed files with 1042 additions and 0 deletions
+143
View File
@@ -0,0 +1,143 @@
---
name: atlas
description: >
Query and manage celestial bodies and stations in systems.db. Use when the user
says "atlas", "show system", "list bodies", "list stations", "populate bodies",
"show body", or invokes /atlas. Wraps the Rust atlas CLI binary.
user-invocable: true
allowed-tools: Bash, Read, Grep, Glob
---
# Atlas Skill
Query and manage celestial bodies (planets, moons, gas giants, asteroid belts,
oort clouds) and stations in `server/data/systems.db`.
**CLI binary:** `tooling/atlas` (wraps `cargo run --bin atlas`)
**Database:** `server/data/systems.db` (auto-detected from working directory)
**All output is JSON on stdout.**
## Commands
### Show full system hierarchy
```bash
tooling/atlas show-system "GJ 15A"
```
Returns: system info + all bodies + all stations in the system.
### Show a single body
```bash
tooling/atlas show-body "GJ15Ab"
```
Returns: body details + stations orbiting that body.
### Show a single station
```bash
tooling/atlas show-station "GJ15Ab-S1"
```
### List bodies with filters
```bash
tooling/atlas list-bodies
tooling/atlas list-bodies --system "GJ 15A"
tooling/atlas list-bodies --type planet
tooling/atlas list-bodies --type planet --inhabited
tooling/atlas list-bodies --unnamed
```
Types: `planet`, `moon`, `gas_giant`, `asteroid_belt`, `oort_cloud`
### List stations with filters
```bash
tooling/atlas list-stations
tooling/atlas list-stations --system "GJ 15A"
tooling/atlas list-stations --type horizon
```
Types: `horizon`, `commercial`, `military`, `research`, `industrial`, `agricultural`, `transit`
### Add a body
```bash
tooling/atlas add-body \
--id "GJ15Ab" \
--system "GJ 15A" \
--type planet \
--orbit 1 \
--name "Xin Chengdu" \
--mass-class terrestrial \
--atmosphere breathable \
--gravity 0.87 \
--biome temperate \
--inhabited \
--population 1800000
```
### Add a station
```bash
tooling/atlas add-station \
--id "GJ15Ab-S1" \
--system "GJ 15A" \
--orbits "GJ15Ab" \
--type commercial \
--name "Chengdu Orbital" \
--population 420000 \
--docking major
```
### Database statistics
```bash
tooling/atlas stats
```
Returns: system count, body count by type, inhabited count, station count by type.
### Bulk populate from system data (classifier pass)
```bash
tooling/atlas populate --dry-run # preview what would be created
tooling/atlas populate # create body/station records
```
Reads `habitable_planet_count`, `inhabited_planet_count`, `gas_giant`,
`asteroid_belt`, and `horizon_station` from existing system data.
Creates: planets (inhabited first), gas giants, asteroid belts, oort cloud per
system, horizon station per oort cloud. Skips systems that already have bodies.
## Body ID Naming Convention
```
GJ-{n} — star (single)
GJ-{n}A — primary star (binary)
GJ-{n}B — secondary star (binary)
GJ-{n}b/c/d... — planets, innermost first
GJ-{n}Ab/c/d... — planets orbiting primary only
GJ-{n}Bb/c/d... — planets orbiting secondary only
GJ-{n}d-1 — first moon of third planet
GJ-{n}d-S1 — first station orbiting third planet
GJ-{n}-oort — oort cloud region
GJ-{n}-belt — asteroid belt
GJ-{n}-oort-S1 — horizon station in oort cloud
```
## Entity Hierarchy
```
System (star_systems)
└─ Body (bodies) — planet, moon, gas_giant, asteroid_belt, oort_cloud
└─ Station (stations) — horizon, commercial, military, research, etc.
```
Bodies have a self-referential `parent_body_id` for moons → planet relationships.
Stations reference `orbits_body_id` for what they orbit.
## Scope — A True Atlas
This skill will grow to cover the full geographic hierarchy of the Reach:
- **Galactic:** 301 systems, gate topology, sector/corridor data
- **System:** orbital bodies, stations, oort cloud
- **Planetary surface:** continents, oceans, mountain ranges, rivers, biome regions
- **Settlement:** cities, towns, villages, outposts, rail lines, road hierarchy
- **District:** neighborhoods, zones, named areas/provinces
- **Local:** named locations, landmarks, facilities
As the development cascade progresses through Phase 1 (wiki content) → Phase 3
(planetary maps / Atlas of the Reach), the atlas CLI and its schema will extend
to cover each level. The goal is a single queryable geographic database from
galaxy scale to street level — the in-game implant's atlas app reads from this
same data.