Starclock is a deterministic, engine-agnostic Rust combat and activity simulator. This directory is its execution reference for mechanics inspired by Honkai: Star Rail. It deliberately excludes rendering, animation, audio, input widgets, networking, account systems, real-time exploration movement, gacha, account inventory, and copyrighted game assets.
The target is a headless battle kernel plus a generic activity orchestrator that can later be driven by Bevy, another engine, the starclock CLI, tests, or a simulation service.
Current repository status: See Repository state. Git records past iterations; this documentation describes the current mechanics, content, architecture and authoring model only.
- The general mechanics baseline was reviewed on 2026-07-17; the Version 4.4 character release-state and action-flow addendum was reviewed on 2026-08-05.
- HoYoverse does not publish a complete combat specification. Exact formulas are therefore based primarily on current community-maintained references, cross-checked where possible against in-game tutorial transcriptions and independent calculations.
- A formula marked verified has consistent support in at least two established references or an established reference plus a worked in-game result.
- A rule marked observed is widely documented but may contain edge cases.
- A rule marked project policy is an explicit implementation choice where the original game's behavior is unpublished, unstable, or unnecessary for the first milestone.
Treat the date, not an assumed game version number, as the baseline. Character kits and newer mode-specific systems change frequently; the underlying engine must express exceptions without hard-coding them into shared formulas.
- Core battle model — scope, entities, targeting, lifecycle, and event semantics.
- Action order and turns — Speed, Action Gauge, interrupts, duration timing, and cycles.
- Damage and sustain formulas — ordinary damage, DEF, RES, CRIT, healing, and shields.
- Toughness and Weakness Break — Toughness reduction, elemental breaks, Break DoT, and Super Break.
- Effects and resources — buffs, debuffs, effect chance, Skill Points, Energy, and aggro.
- Rust architecture — pure-core boundaries, data model, command/event API, RNG, and test plan.
- Excel and Sora configuration pipeline — Excel authoring, Sora schema/code generation/export, runtime bundle loading, and CI policy.
- Rust engineering standards — file-size limits, responsibility-based modules, visibility/re-export policy, errors, testing, linting, and review gates.
- Cross-platform determinism and numeric policy — fixed-point arithmetic, rounding, RNG, stable ordering, state hashing, command atomicity, and platform verification.
- Lifecycle and resolution — command atomicity, action phases, defeat, presence, waves, faults, and event causality.
- Rule IR and native handlers — typed conditions, selectors, operations, triggers, state slots, scopes, and the exceptional-code boundary.
- Modifier and snapshot pipeline — stat-query stages, stacking groups, applicability, snapshots, and cycle detection.
- Enemy AI and encounters — enemy definitions, deterministic behavior graphs, boss phases, variants, waves, and encounter validation.
- Universe mode profiles — Standard SU, Swarm Disaster, Gold and Gears, Unknowable Domain, and Divergent Universe over the generic activity core.
- Content data and coverage — bilingual/provenance fields, character/equipment/enemy/mode schemas, completeness states, and the Version 4.4 manifest policy.
- Replay, CLI, and engine integration — canonical replay format, planned CLI contracts, baseline controllers, and Bevy/engine adapters.
- Documentation coverage matrix — current normative coverage, research gaps, data-import status, and terminal gates.
- Standard and challenge modes — ordinary battles plus Memory of Chaos, Pure Fiction, and Apocalyptic Shadow orchestration, clocks, scoring, and seasonal data.
- Activity core and mode extension — unified graphs, scopes, rosters, persistence, clocks, metrics, battle handoff, and future-mode extension.
- Core implementation design — concrete Rust ownership, identities, stores, action lowering, operations, events, transactions, modules, and implementation order.
- Character builds, Traces, and equipment — independent
starclock-build, build selection/compilation, ability levels, Traces, Eidolons, Light Cones, relics, affixes, generic combat output, and validation. - Reference data — constants and the attacker-level multiplier table.
- Sources and confidence — source provenance and known uncertainties.
- Public character mechanics — the public Version 4.4 combat-form catalog, behavioral contracts, engine-feature matrix, and 90-form action-flow audit.
- Combat content reference pack — prepared Version 4.4 character, Trace, Eidolon, Light Cone, enemy, ability, and ordinary-encounter facts used before Excel/Sora authoring.
- Dependency and tool policy — exact active package/tool versions, licenses, deterministic impact, compile-cost records and rejected alternatives.
- Sora 0.3.0 capability lock — checksum-bound installation, executed CLI/schema/codegen/export surface and pinned limitations.
- CI verification — direct Cargo formatting, lint and workspace-test commands for the current tree.
- Common configuration schema — stable identity, localization, version, provenance, evidence and canonical-decimal transport contracts.
- Character and build configuration schema — Sora contracts for abilities, hit plans, characters, Traces, Eidolons, build patches and Light Cones.
- Typed Rule IR configuration schema — transport contracts for rules, slots, triggers, expressions, selectors, operations, effects, modifiers and native-handler metadata.
- Enemy, encounter and Standard configuration schema — enemy variants, deterministic AI, waves and the minimum generic Activity/BattleBinding/result-projection seam for Standard battles.
- Production configuration pipeline — authoritative
.xlsxworkbooks, deterministic no-overwrite bootstrap, Sora exports/readers and the private data conversion boundary. - Catalog construction boundary — validated real-bundle loading, empty/representative private definitions and clean-regeneration evidence.
- Authoritative numeric implementation — checked six-decimal domain types, six explicit rounding modes, typed faults and no-float enforcement.
- Combat catalog implementation — fixed-width identity domains, immutable ordered definition tables and deterministic graph validation.
- Deterministic RNG implementation — canonical SHA-256 substreams, pinned ChaCha8 words, integer mappings and draw-consumption policy.
- Canonical replay/codec implementation — versioned header/record framing, typed digests, bounded decoding and streaming state hashing.
- Property-test harness — fixed-seed shrinking and persisted regression contracts for arithmetic, RNG, ordering, codec and malformed replay input.
- Battle aggregate boundary — generic battle inputs, canonical runtime stores, phases, commands, decisions, resolutions and immutable query views.
- Battle transaction boundary — reusable semantic-copy scratch, forward journal, rollback/commit-fault settlement, complete event causes and streaming canonical state hashes.
- Action and timeline boundary — exact Action Gauge selection, structural action lowering, synchronous phase/hit events and deterministic interrupt ordering.
- Target and action-resource boundary — canonical target commitments/invalidation, multi-hit locks and Basic/Skill/Ultimate Skill Point/Energy semantics.
- Damage, healing, defeat and wave boundary — typed HP operations, fixed-point formula goldens, defeat/terminal settlement and ordered
AfterActionwaves. - Synthetic Standard CLI and replay boundary — smoke-only Standard fixture, low-level command/hash replay payloads and deterministic CLI run/verify evidence.
- Phase 3 performance benchmark baseline — versioned apply/hash/replay/concurrency workloads, allocation and transaction instrumentation, CI smoke ceilings and strict stable-runner evidence.
- Phase 3 command and replay property contract — fixed-seed mixed command streams, rollback convergence, deterministic hashes and replay envelope/domain corruption.
- Typed Rule IR runtime boundary — validated expressions/programs, trigger indexes, once scopes, evaluation budgets and the immutable native-handler registry contract.
- Toughness, Break and Super Break runtime boundary — ordered non-spilling layers, weakness lifetimes, base Break effects, Super Break samples and the source-bound Firefly probe.
- Shared Elation runtime boundary — independent ability/damage tags, keyed team resources, holder/provider attribution, forced Skill payment and generic shared actors.
- Enemy AI and encounter runtime boundary — finite controller graphs, exact wave slots/boundaries, boss-phase replacement and canonical orchestration state.
- Native-handler and content-branch audit — zero-handler V1a review, exact static/Sora metadata agreement and mechanical rejection of scattered content-ID branches.
- Build catalog and compilation boundary — independent build catalog/spec ownership, exact cross-catalog compatibility, typed validation reports and generic combat-only output.
- Ability-level and Trace compilation — exact level tables, canonical Trace graphs, typed unlock/stat/rule patches and order-invariant build output.
- Eidolon compilation — exact E0-E6 selection, complete rank sets, ordered patches and deterministic replacement/conflict validation.
- Light Cone compilation — exact level/promotion stats, explicit applicability, S1-S5 passive selection and valid/invalid wearer fixtures.
- Build identity and locking — canonical definition/catalog/build/spec digests, generic source attribution, named presets and stale-lock rejection.
- Activity replay and controller diagnostics — versioned Activity command/result payloads, exact nested battle boundaries, controller score diagnostics and first-divergence verification.
- Headless CLI contract — production Sora bundle validation, frozen Goal 01 coverage, baseline synthetic battle runs, replay verification, JSON schemas and exit classes.
- Goal 01 release contract — frozen CLI/library surfaces, coverage identity, hardening reports and clean-checkout acceptance.
- Agent control and MCP integration — protocol-neutral deterministic sessions plus stdio and authorized Streamable HTTP adapters.
- Agent integration contract — runnable in-process, stdio and authorized HTTP embedding examples, frozen public surfaces and MCP suitability guidance.
- Agent security and architecture audit — dependency/API direction, unsafe/source/license review, secret/log safety and remote control limits.
- Agent cross-platform contract — native schema/trace execution and explicitly compile-only alternate targets.
- Agent clean-checkout acceptance — isolated staged-tree gate, strict runner identity and retained capability/conformance/performance digests.
- Mode extension and evolution contract — ordered child tasks, logical scopes, static handler bundles, component digests, experimental promotion, and immutable historical release evidence.
- Standard Universe end-to-end runtime integration — real nested combat, atomic run effects, logical domain ownership, composed registries and component-aware replay migration.
- Goal 05 integration probes — machine-readable Goal 04 integration-debt baseline and the focused three-minute execution budget.
- Standard Universe integration coverage — exact-once Goal 05 dispositions, real 33-run battle/replay matrix and explicit enemy/rule approximation boundaries.
- Combat identity and dynamic assembly — combat-owned input identity, opaque assembly provenance, current-Activity per-battle assembly, cache/rollback rules and replay-v3 migration.
- Goal 06 identity and assembly debt probes — machine-checked caller-supplied digest, entry-time materialization, production-surface migration and representative transition baseline.
- Goal 06 Phase 0 baseline — frozen replay v2/v3 compatibility, assembly/cache performance workloads, dependency identity and release scaffold.
- Goal 06 combat-input identity evidence — combat-owned canonical input codec, computed digest and separate opaque assembly provenance.
- Goal 06 Activity battle identity evidence — dual-digest pending handoff, battle seed, result and settlement identity with Activity state v3/v5.
- Goal 06 replay v3 evidence — component-addressed replay v3, six-field nested identity and ordered first-divergence verification.
- Goal 06 construction and event codec — unified battle construction and replay event-payload v2 migration.
- Goal 06 assembly key and cache — immutable catalog composition, canonical assembly keys and bounded non-authoritative caching.
- Goal 06 current Activity snapshot — typed contribution, lifecycle, progression and participant-carry projection.
- Goal 06 atomic dynamic battle start — snapshot assembly and atomic pending-battle sealing.
- Goal 06 assembly failure hardening — stale, invalid, budget, cache and retry state/RNG preservation.
- Goal 06 transition battle fixtures — representative inventory, lifecycle, progression, carry and provenance transitions.
- Goal 06 dynamic CLI and replay — dynamic-only baseline execution and CLI replay-v3 round trips.
- Goal 06 Agent and MCP migration — shared per-battle assembly without changing transport authority.
- Goal 06 replay reconstruction parity — fresh per-battle reconstruction and CLI/Agent/MCP trace parity.
- Goal 06 performance hardening — identity, cold/warm assembly, eviction and concurrent-service baselines.
- Goal 06 native matrix hardening — 33-run replay-v3 matrix, corruption corpus and native CI contract.
- Goal 06 release contract — frozen runtime revisions, evidence denominators and retained Goal 07 scope.
- Goal 07 foundation — Goal 06 prerequisite, inherited 2,201/786/78 denominator and Excel/openpyxl/Sora authoring contract.
- Goal 07 retained-mechanic audit — exact-once family, primitive, evidence-gap and terminal-disposition audit for content, rules, fixtures, enemies and encounters.
- Goal 07 content partitions — 104 bounded generated content batches and the exact-once 121-batch execution denominator.
- Goal 07 Phase 0 baseline — external decisions, named enemy numeric approximation, six performance workloads, zero-new-dependency baseline and release scaffold.
- Goal 07 trigger timing and cause runtime — executable phase/point matrix, bounded once scopes, complete cause attribution and fail-closed replacement proposals.
- Selector and target-set runtime boundary — executable predicates, snapshots, deterministic ordering, weighted draws and empty-pool control.
- Goal 07 modifier-stage and snapshot runtime — executable stat/formula stages, authored stacking comparators, lifecycle snapshots and production Excel/Sora evidence.
- Goal 07 effect, state and lifecycle runtime — authoritative slot resets, effect stacking, DoT ticks/detonations, duration clocks, teardown and formal Excel/Sora evidence.
- Goal 07 action, reaction, Break and boundary runtime — persistent extra turns, semantic reaction ordering, Break hooks, executable wave/phase programs and compatibility revisions.
- Goal 07 shared capability and content gates — executable shared-probe matrix, zero-handler admission contract and ordered exact-coverage receipts for all 104 content batches.
- Goal 07 Ability Tree partition S01 — first Ability Tree partition authoring and executable run/battle capabilities.
- Goal 07 Ability Tree partition S02 — battle modifiers, Resonance resources and Formation-boundary execution.
- Goal 07 Ability Tree partition S03 — generic Formation capacity, Reviver carry and consumable authorization.
- Goal 07 Preservation partition S01 — exact Quake composition, Macrosegregation shield lifecycle, splash, Bleed and shared core primitives.
- Goal 07 Preservation partition S02 — dynamic shield-to-ATK, turn-end and provider shields, directional shield modifiers and Blessing-count DEF.
- Goal 07 Preservation partition S03 — battle-start and action-loss shields, Break-triggered team shields, shield-gated mitigation and bounded cleansing.
- Goal 07 Preservation partition S04 — shield-conditioned critical stats, Resonance and all Preservation Formations.
- Goal 07 Remembrance partition S01 — Freeze, Dissociation, effect resistance and duration behavior.
- Goal 07 Remembrance partition S02 — adjacent damage, timed Weakness, resistance reduction and battle-start effects.
- Goal 07 Remembrance partition S03 — HP thresholds, action-scoped modifiers and shared critical draws.
- Goal 07 Remembrance partition S04 — Resonance, Eonian Freeze, Energy and Shield Formations.
- Goal 07 Nihility partition S01 — Suspicion lifecycle, DoT detonation/transfer and stack-backed debuffs.
- Goal 07 Nihility partition S02 — Break efficiency/propagation, random DoTs, selected detonation and Blessing-count DoT scaling.
- Goal 07 Nihility partition S03 — Break damage, Effect RES, DoT vulnerability/duration and dynamic DoT-stack vulnerability.
- Goal 07 Nihility partition S04 — team healing/Energy from DoTs, Resonance statuses, Confusion, Devoid and all Nihility Formations.
- Goal 07 release contract — frozen 121-batch ledger, terminal mechanics denominators, audit/native/performance evidence and immutable completion boundary.
- Goal 14 release contract — complete Gold and Gears runtime coverage, replay/surface parity, hardening, performance, native CI and immutable completion boundary.
- Gold and Gears public API migration — pre-1.0 facade contraction, retained caller surface and exact public re-export drift enforcement.
- Goal 20 coverage and release contract — frozen Swarm Disaster matrix, policy owners, performance workloads, native CI and release gates.
- Goal 20 release contract — complete Swarm Disaster runtime coverage, replay/surface parity, hardening, performance and immutable completion boundary.
The documentation target covers the complete core model even when implementation is staged. A playable headless vertical slice should exercise:
- two teams, waves, defeat, victory, and deterministic target selection;
- Basic ATK, Skill, Ultimate, passive triggers, follow-up actions, and enemy actions;
- HP, ATK, DEF, SPD, CRIT, DMG Boost, RES, Effect Hit Rate/RES, Break Effect, Energy, and Skill Points;
- the Action Gauge timeline and action advance/delay;
- single-target, Blast, AoE, and Bounce target patterns;
- multi-hit attacks, per-hit CRIT, damage, healing, shields, buffs, debuffs, and DoT;
- elemental weaknesses, Toughness, Weakness Break, and the seven base break effects;
- replayable seeded RNG and a serializable battle log;
- at least one summon or memosprite, transformation, special resource, Exo-Toughness interaction, multi-phase boss, and mode-supplied rule bundle;
- a Standard encounter and representative Memory of Chaos, Pure Fiction, and Apocalyptic Shadow challenge stages using the same combat core.
Multi-layer Toughness, Exo-Toughness, summons/memosprites, special resources, Super Break providers, boss phases, and universe-mode rules are no longer deferred from the architecture. They may be delivered after the first vertical slice, but their data and lifecycle contracts are normative now. A feature is not considered implemented merely because an ID or short profile exists; use the coverage states in Content data and coverage.
Use these documents as a mechanics study and implementation reference. Do not copy proprietary assets, story text, voice, extracted client code, or redistributed game data. Prefer original identifiers and test fixtures in the implementation.