Advisor: turn the Rust simulation-kernel design into an implementation plan #12
Labels
No labels
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/factory-game-v3#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use #11 as the source design brief, but parse it against the current
factory-game-v3state. This is an advisor/design task, not an implementation task.Current repo state to account for:
mainis green.AGENTS.md,.ward/ward.yaml,docs/FEATURES.md, and Forgejo CI.tests.csproj/ NuGet path is retained as reference-only and is not active validation.Cargo.toml, no.rsfiles.Design direction from #11 to preserve:
simulation core -> observability/tests -> optional visual frontend, not as an engine-first rewrite.Advisor deliverable:
crates/factory_sim,crates/factory_content, andcrates/factory_cli.GameState, deterministic tick tests, and CLI runner skeleton.cargo testand a headless CLI output shape.Expected outcome: a concise issue comment with the recommended issue breakdown and first implementation brief, so a follow-up engineer can start without re-reading the whole #11 essay.
🔎 ward agent advisor
ward agent advisor --harness codexran a one-shot standard research pass on this question:Recommendation
Treat this as a single-repo planning answer. The next work should start a pure Rust deterministic simulation workspace and deliberately avoid Bevy, Unity cleanup, or parity-chasing. I could not pull the full text of
#11anonymously from Forgejo, so this recommendation preserves the design bullets quoted in this issue body as the source brief.The key planning decision is to port behavior, not architecture. The Unity reference is useful for domain semantics, but the Rust kernel should not mimic MonoBehaviours or the current world-object/component wiring literally. The first slice should be a state-oriented kernel shaped as:
simulation core -> deterministic tests/observability -> optional viewer latercontent definitionsseparate fromsimulation statetyped IDs and enums, not stringly-typed command/state plumbingtick(state) -> events + next_state, with stable output suitable for golden testsRecommended First Issue Sequence
Bootstrap Rust workspace and deterministic kernel skeleton
crates/factory_sim,crates/factory_content, andcrates/factory_cli.factory_simownsGameState, tick stepping, entity/resource state, and deterministic event emission.factory_contentowns typed item/content IDs and the first hard-coded content catalog.factory_cliowns a headless runner that prints stable per-tick snapshots.Port the minimal content and inventory model
IronOre,IronBars, and the minimum actor/building IDs needed for the loop.weight,volume,stack_size,craft_time,craft_output_multiplier,ingredients, and finite/manifest source semantics.Implement the first closed-loop production slice
ore source -> hauler -> factory -> iron bars.Collect/Deliverflow.IronOre -> IronBars.Add deterministic scenario tests and CLI golden output
Only after that, widen the kernel surface
First Workspace Shape
Recommended initial layout:
Recommended ownership split:
factory_sim- pure deterministic kernel. No file IO requirement, no renderer assumptions.factory_content- the first content registry and starter scenarios. Hard-code content first. Data-driven loading can come later.factory_cli- scenario selection, tick count input, stable text or JSON-lines output.Smallest Closed-Loop Slice To Build First
The smallest slice that still respects the design brief is:
ItemIdand minimal content catalog forIronOreandIronBarsInventorywith weight/volume/capacity accounting and reserved-capacity supportGameStatecontaining:The important scope cut is this: include autonomous logistics state, but not full movement/pathfinding complexity. A one-edge-per-tick route or fixed adjacency is enough for the first loop. That preserves the interesting logistics axis without letting pathfinding swallow the milestone.
C# Source Material To Read First
These are the reference files that matter for the first Rust slice:
Assets/Scripts/GameContent.cs- base item schema and recipe shape.Assets/Scripts/FactoryGame/FactoryGameContent.cs- canonical item set, recipe data, and spawnable distinctions.Assets/Scripts/Components/ResourcesComponent.cs- capacity accounting, transfer semantics, and reserved-capacity behavior.Assets/Scripts/Components/ProductionComponent.cs- deterministic craft progress, input consumption, and output creation semantics.Assets/Scripts/Components/MiningComponent.cs- extraction behavior and finite-vs-manifest source semantics.Assets/Scripts/WorldObjects/WorldObjectFactory.cs- how production, inserters, and dispatch intents are composed around a factory.Assets/Scripts/Components/DispatchComponent.cs- dispatch intent generation and target-selection concepts.Assets/Scripts/Components/DispatchReceiverComponent.cs- haul-state transitions likeCollect <-> DeliverandRetrieve <-> Deploy.Assets/Scripts/Components/ResourceRetrieverComponent.cs- when a mobile unit actually pulls cargo.Assets/Scripts/Components/ResourceInserterComponent.cs- adjacency-based local transfer semantics.Assets/Scripts/WorldObjects/WorldObjectTruck.cs- the current mobile logistics composition.Assets/Scripts/WorldObject.cs- useful only as a reference for what state exists on an actor, not as a structural template to port.The most important semantic references for issue 1 are:
GameContent.Itemin Assets/Scripts/GameContent.csAcceptance Criteria For The First Implementation Issue
Suggested first issue title:
Bootstrap the Rust simulation workspace and first deterministic closed-loop slice
Suggested acceptance criteria:
Cargo.tomldefines a workspace containingcrates/factory_sim,crates/factory_content, andcrates/factory_cli.factory_simexposes a pure-Rust tick API that can advance a tinyGameStatewithout any Bevy dependency.factory_contentdefines typed IDs and at least the first recipe/content needed forIronOre -> IronBars.CollectandDeliver.cargo test --workspacepasses.factory_clican run a tiny scenario headlessly and print stable output per tick.Recommended CLI contract for the first slice:
Recommended output shape: JSON lines, one object per tick, for example:
That output shape is intentionally plain. It is for testability and diffability, not presentation.
Decisions, Options, Open Questions, Risks
Decisions to make now
factory_simfree of Bevy and Unity-shaped abstractions.Options considered
factory_content. External content loading is premature before the kernel semantics settle.Retrieve/Deploycan follow after the first closed loop is solid.Open questions for the follow-up engineer
OrePatch + MiningDrillpair, or a simplified extractor/source actor with equivalent output semantics?Main risks
Explicitly Out Of Scope
Keep these out of the first slice and out of the first issue:
tests.csprojrepairThat scope cut is the main recommendation. The first milestone should prove that the repo can host a deterministic Rust factory kernel with a testable autonomous logistics loop, not that the whole game has been ported.
Researched and posted automatically by
ward agent advisor --harness codex(ward#179). This is one-shot research, not a carried change - verify before acting on it.— Codex, via
ward agent