This repository contains the first loadable mod foundation for the Autonomous Colony Governor project.
Autonomous Colony Governor (ACG) aims to automate high-level colony governance while remaining deterministic and safe:
- deterministic action generation/ranking for identical inputs
- incremental, dirty-flag-driven state extraction
- bounded planning/execution budgets
- optional AI integration behind strict guardrails
This repo started as scaffold, and now includes a working early-game autonomous bootstrap slice.
Source/ is organized to match the implementation spec:
Mod/- RimWorld mod entry + settingsEngine/-GameComponent,WorldComponent,MapComponent, patch gateway, capability registryState/- snapshots, blackboard, dirty-channel modelExtraction/- snapshot builder adaptersPlanning/- planner interfaces, scheduler, budget/depth models, planner stubsExecution/- actions, deterministic candidate buffering, validation, execution, cooldown mapUI/- governor window/state placeholdersAI/- disabled/no-op AI policy bridge + packet/validator stubsMetrics/- metrics and panel model placeholdersUtils/- deterministic comparer utility
GovernorMapComponent.MapComponentTick() executes this deterministic shell:
- mark/drain dirty flags
- build colony snapshot
- run scheduled planners
- deterministic candidate sort
- validate actions
- execute approved batch (safe stub behavior)
Deterministic action sort tuple:
Priority(desc)Urgency(desc)Confidence(desc)PlannerId(asc)CreatedTick(asc)ActionId(asc)
A ready-to-open Visual Studio solution is included at:
RimACG.sln
The project is preconfigured to:
- target
.NET Framework 4.7.2 - compile all
Source/**/*.csfiles - output
RimACG.dlldirectly toAssemblies/ - reference RimWorld managed assemblies via
RimWorldManagedDir
If RimWorld is not beside this repo, set RimWorldManagedDir in Visual Studio MSBuild properties or build with:
msbuild RimACG.sln /p:RimWorldManagedDir="C:\path\to\RimWorldWin64_Data\Managed"
RimWorld assemblies are proprietary and intentionally not committed here.
Create a C# class library project:
- Target framework:
.NET Framework 4.7.2 - Output assembly:
RimACG.dll - Include all
Source/**/*.cs
Add references to:
Assembly-CSharp.dllUnityEngine.CoreModule.dllUnityEngine.dll(toolchain-dependent)
Common install paths:
- Steam (Windows):
C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\
- Steam (Linux):
~/.steam/steam/steamapps/common/RimWorld/RimWorldLinux_Data/Managed/
- Build in Release mode.
- Copy output DLL to:
Assemblies/RimACG.dll
- Place this mod folder in your RimWorld
Mods/directory. - Enable Autonomous Colony Governor in mod list.
- Start or load a colony map and confirm no startup errors.
AI integration is intentionally disabled/no-op in this milestone:
AiPolicyBridge.IsEnabledreturnsfalse- settings expose
Enable AI policy bridge, but bridge remains stubbed for safety
PatchGatewayis a safe placeholder only (no heavy Harmony behavior yet).- Structural bootstrap planner now emits real construction/zone/mining actions.
- See
IMPLEMENTATION_STATUS.mdfor implemented/deferred scope. - See
NEXT_STEPS_PROMPT.mdfor a ready-to-use continuation prompt.