Screeps AI Architect · Build dossier
A pass over the project’s own repository: what is implemented, what is partial, what stayed on paper.
Two halves: a bot of 21 CommonJS modules bundled into a single main.js that the game server executes, and a portal built with React 19 and Vite 6 on an Express server. Nothing runs from the browser as a static site.
2 implemented · 3 partial · 1 not implemented · 1 illustrative
What the code says
CANON.md declares screeps-ai-architect v3 canonical; archive, rar and base folders are marked as older snapshots
Source
CANON.mdBot code: 21 modules under screeps_runtime/modules totalling 16,039 lines; the largest is static_creeps.js at 4,324 lines
Source
screeps_runtime/modulesThere is one tick entry, module.exports.loop in main_entry.js; 20 modules are listed in ORCHESTRA_MODULES and 22 kernel.registerProcess calls set priorities (spawn 98, defense 100, wipe 105, labs 40, trade 30, visuals 20)
Source
screeps_runtime/modules/main_entry.jsCPU constants: a default limit of 20, a bucket clamp of 500 to 9500, a target bucket of 9000 on shard3, and cpuMode thresholds at 700, 3500 and 9000
Source
screeps_runtime/modules/bucket_governor.jsCode delivery is a POST to /api/user/code on branch 1st with screeps.com as the default host; the latest deploy manifest records 21 files with a sha256 each and version 2.12.177
Source
server.tsThe live colony state per telemetry: one room E22N53 at RCL1, 7 creeps, energy 34 of 300, a starvation flag, 192 stalled ticks and zero progress
Source
audit-results/telemetry/colony-watch.jsonlThe spawn manages 13 roles with targets and weights: staticHarvester, puller, hauler, upgrader, builder, defender, scout, looter, guard, remoteHarvester, remoteHauler, reserver and claimer
Source
screeps_runtime/modules/spawn_manager.jsChecks consist of four tsx scripts (bootstrap, modules_syntax, export_formats and invariants) plus one Playwright test; the repository holds no CI configuration
Source
test_modules_syntax.ts
Module state
implemented
Economy, role spawning, construction and defense
Real spawnCreep and createConstructionSite calls, tower fire and activateSafeMode, and a base planner that picks a centre and places source containers, roads and extensions.
Source
screeps_runtime/modules/dt_planner.jsimplemented
The priority kernel, CPU governor and segment memory
kernel.js sorts processes with bypass headroom, bucket_governor.js computes an adaptive bucket target and per-category shares, and packer.js works on RawMemory within a 95,000-byte segment limit.
Source
screeps_runtime/modules/kernel.jspartial
Remote operations: the code exists, the colony never got there
remote_ops and loot are registered and the remote roles are computed, but at RCL1 the remote-ready condition never becomes true, so the path stays unexercised.
Source
screeps_runtime/modules/remote_logistics.jspartial
Labs: reactions exist, production does not
runReaction and processPower are genuine, but chooseFactoryProduct and runFactory return null, refill requests are empty, and no boostCreep call exists in any of the 21 modules.
Source
screeps_runtime/modules/lab_reactor.jsnot implemented
The market, the inter-shard bus and CI/CD
findHighlyProfitableDeals always returns null and no market API is called; the bus process runs only under a flag that is never set anywhere; no workflow files were found.
Source
screeps_runtime/modules/market_arbitrage.jsillustrative
The min-cut wall planner and Gantt reservations
generateMinCutBorders builds a rectangular shell with a radius from 3 to 9: no flow graph, no Ford-Fulkerson and no Dinic; GanttEngine caps tasks at 24 and wipes them, with no actual resource locking.
Source
screeps_runtime/modules/min_cut.jspartial
The portal dashboard
Ten screens work, but each calls the bundled Express server and needs a token; it cannot ship as a static site, and the architecture doc is generated from a registry of module names.
Source
src/App.tsx
How this was checked
The bot runs on the official MMO, not a private server
The telemetry record carries the host screeps.com, shard3, a CPU limit of 20 and an owned room; delivery targets branch 1st of the same host.
Source
docs/merged-from-optimizer/long-horizon-telemetry/screeps.com-shard3.latest.jsonThe colony is bootstrapping, not a developed base
colony-watch.jsonl records RCL1, seven creeps, a starvation flag, 192 stalled ticks, zero progress and a warning about unconnected core modules.
Source
audit-results/telemetry/colony-watch.jsonlThe tests do not confirm in-game behaviour
test_bootstrap_contract.ts, at 2,170 lines, contains no assert call at all; test_modules_syntax.ts evaluates modules in a vm with mocked globals, never touching the real game server.
Source
test_bootstrap_contract.tsStall thresholds are pinned in config, not prose
scripts/invariants.json sets controllerTicksToDowngradeMin to 10000, constructionStallTicks to 300, energyFullnessMin to 0.9 and cpuBucketForGrowth to 5000.
Source
scripts/invariants.json
Limits of these claims
- The portal cannot be published statically: the interface depends entirely on server routes and a user token.
- The account token lives in browser localStorage, so shipping the interface publicly would make it a target for XSS theft.
- A large part of the algorithmic modules is decorative: min_cut, market_arbitrage, shard_bus and GanttEngine do almost no useful work.
- main_entry.js still holds a stale hardcoded remote-room list while the live base sits in a different room.
- The escort role is recognised but missing from the spawn target table, so it cannot be created normally.
- Only v3 is canonical: the folder root and the base and archive snapshots are not git repositories, so no history or diffs exist for them.
- A local survival simulator is described in the documentation, yet the repository holds neither its configuration nor a run artifact.
Why there is no live build
Why there is no live build
Publishing is not possible: the whole interface calls /api/screeps routes on the bundled Express server and needs an account token, which the current code keeps in browser localStorage. Static hosting would yield a dead screen and an open target for token theft.