一键导入
determinism-rules
FARSPACE determinism requirements — seeded RNG, BTreeMap ordering, no wall-clock seeding. Required for reproducible simulation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
FARSPACE determinism requirements — seeded RNG, BTreeMap ordering, no wall-clock seeding. Required for reproducible simulation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
FARSPACE crate dependency rules — which crates may import which, and what constitutes a boundary violation
FARSPACE original IP policy for content creation — what is allowed, what is forbidden, and how to invent original names and flavour text
FARSPACE TUI quality standards — keyboard-first navigation, resize-safe ratatui layouts, theme usage, modal patterns, and visual language rules
基于 SOC 职业分类
| name | determinism-rules |
| description | FARSPACE determinism requirements — seeded RNG, BTreeMap ordering, no wall-clock seeding. Required for reproducible simulation. |
FARSPACE simulation must be fully reproducible: same seed + same command sequence = identical output across all runs and platforms.
1. Seeded RNG only
Rng stored in GameStatethread_rng(), OsRng, rand::random(), SystemTime, Instantlet value = state.rng.gen::<u32>();2. No wall-clock seeding
SystemTime::now() and Instant::now() must never seed or influence simulation outputgame_core3. Ordered iteration
HashMap iteration order is not defined and varies between runsBTreeMap or collect and sort before iteratingmap.keys().collect::<Vec<_>>().into_iter().sorted()...BTreeMap<K, V> for any collection iterated during apply_turn or run_ai_turn4. No external state in simulation
game_core has no I/O except the seeded RNGFixed-seed tests are the canonical check:
#[test]
fn deterministic_output() {
let seed = 42u64;
let mut state1 = GameState::new(seed);
let mut state2 = GameState::new(seed);
// apply identical commands to both
let events1 = apply_turn(&mut state1, cmd.clone());
let events2 = apply_turn(&mut state2, cmd.clone());
assert_eq!(events1, events2);
assert_eq!(state1, state2);
}
use std::time::{SystemTime, Instant} in crates/game_core/HashMap in a struct stored in GameState that is iterated in apply_turnthread_rng() anywhere in crates/game_core/rand::random::<T>() (implicitly uses thread-local RNG)