Release History
This file is generated by bun run versions:update. Do not edit manually—update CHANGELOG.md instead.
0.197.11 – 2025-11-30 (changelog)
- Type Guards Module: Added
packages/bot/src/runtime/types/typeGuards.tswith type guard utilities (#1565) isCreep(),isSource(),isStructure(),isSpawn(),isContainer(),isTower(), etc. type guards for runtime validationasCreep()validation helper that throws TypeError instead of silently passing invalid objects- Type-safe
room.find()wrappers:findActiveSources(),findAllSources(),findMySpawns(),findHostileCreeps(),findMyCreeps(),findDroppedResources(),findContainers(),findTowers(), etc. - Added 24 unit tests for type guards functionality
- Behavior Controllers: Reduced unsafe type assertions from 50+ to ~10 instances (#1565)
- Replaced
creep as Creepassertions with validatedasCreep()helper in 14 role controllers - Replaced scattered
as Source[],as StructureSpawn[], etc. with centralized type-safe helpers - Updated
helpers.tsto use type guard utilities instead of inline assertions - Improved code maintainability by centralizing type assertions in one location
- Type Guards Module: Added
0.189.9 – 2025-11-29 (changelog)
- PTR Stats Collection Enhancement: Restored and enhanced PTR stats collection for performance validation and strategic analysis (#1549)
- Added historical trend analysis script (
analyze-historical-trends.ts) for tracking 7-day and 30-day performance trends - Implemented regression detection with configurable thresholds for CPU usage, bucket health, and resource metrics
- Created comprehensive PTR stats schema documentation (
packages/docs/source/docs/analytics/ptr-stats-schema.md) for strategic planning agents - Enhanced profiler data collection with improved error handling for “undefined” console responses
- Added
reports/monitoring/historical-trends.jsonto track performance trends across multiple time periods - Integrated trend analysis into monitoring workflow with automatic artifact generation
- Added 20 unit tests for historical trend analysis functionality
- Enables data-driven optimization and autonomous performance monitoring
- Unblocks strategic planning agent performance analysis capabilities
- Supports multi-shard telemetry collection (MMO + PTR)
- Provides baseline metrics for optimization validation and risk mitigation
0.189.7 – 2025-11-29 (changelog)
- Monitoring: Fixed bot snapshot collection to use multi-shard console telemetry (#1503)
- Enhanced
collect-bot-snapshot.tsto collect data from all shards where bot has rooms - Added multi-shard console API queries instead of relying on single-shard Stats API
- Implemented snapshot validation to detect stale/empty data before committing
- Added comprehensive diagnostic logging for troubleshooting collection failures
- Snapshots now include per-room shard metadata for accurate multi-shard tracking
- Validation fails workflow if critical data quality issues detected (0 creeps with claimed rooms)
- Prevents false positive alerts from incomplete single-shard data collection
0.189.3 – 2025-11-29 (changelog)
- Task System: Fixed cross-room over-spawning issue where tasks from multiple rooms caused excessive creep spawning
- Added
roomNamefield toTaskQueueEntryto track which room each task belongs to - Updated task discovery functions to include room name in task IDs (e.g.,
W1N1-build-site-123) - Added
getTaskCountForRoom()method toRoleTaskQueueManagerfor room-specific task counting - Modified spawn scaling logic to only count tasks from the spawn’s room when calculating workforce needs
- This prevents scenarios where builders are spawned in Room A due to construction sites in Room B
0.187.9 – 2025-11-29 (changelog)
- Dismantler: Fixed dismantler attempting to dismantle novice zone walls near room edges
- Added
isNearRoomEdge()helper to detect structures within 1 tile of room boundaries (x ≤ 1, x ≥ 48, y ≤ 1, y ≥ 48) - Structures at room edges are now filtered out in both combat and clearing modes
- This prevents wasted time targeting indestructible novice/respawn zone walls that block exits
0.183.5 – 2025-11-28 (changelog)
- Documentation: Consolidated dual documentation locations into single Hexo site
- Migrated all content from
packages/docs/docs/topackages/docs/source/docs/ - Removed legacy
packages/docs/docs/directory - Updated workflow references from
docs/topackages/docs/source/docs/ - Fixed
guard-version.ymlto check correct changelog path - Fixed
guard-deprecation.ymlto link to correct deprecation policy location - Fixed
deploy.ymlto reference correct troubleshooting documentation - Fixed
performance-test.ymlto reference Docker development guide - Updated AGENTS.md to remove obsolete “NOT root docs/“ warnings
- Migrated 43 missing documentation files including:
- Development guides: deprecation-policy.md, deprecation-registry.md, changelog-format.md
- Operations docs: cpu-timeout-incidents.md, performance-optimization.md, monitoring-alerts-playbook.md
- Runtime docs: bootstrap.md, kernel-protocols.md, task-system.md, creep-communication.md
- Strategy docs: architecture.md, phase implementation guides
- External analysis: jon-winsley-analysis.md, screeps-quorum-analysis.md
- Resolves issue ralphschuler/.screeps-gpt#1526 (consolidate dual documentation locations)
0.180.0 – 2025-11-28 (changelog)
- Deployment: Version history tracking for reliable rollback
- Added
reports/deployments/deployment-history.jsonto track validated deployments - Created
manage-deployment-history.tsscript for recording and querying validated versions - Created
types/deployment-history.tswith type definitions for deployment history - Workflow now records validated deployments after successful health checks
- Rollback now uses deployment history to find last validated version (not just git tags)
- History maintains last 5 validated deployments with validation metrics
- Falls back to git tags if history is empty (backwards compatible)
- Prevents infinite rollback loops by only recording successful deployments
- Added unit tests and regression tests for deployment history tracking
- Updated deployment rollback documentation with new rollback process
- Resolves issue ralphschuler/.screeps-gpt#1496 (rollback lacks version history tracking)
0.176.0 – 2025-11-28 (changelog)
- Automation: Custom Copilot agent environment configuration
- Created
.github/copilot-environment.jsonfor project-specific agent setup - Configured Node.js 22 Alpine base image with Yarn 4.11.0
- Set up @ralphschuler GitHub Package Registry authentication
- Defined available tools (node, npm, yarn, git, gh, tsx, vitest, eslint, prettier)
- Enabled TypeScript 5.4.3 with strict mode, ESLint, Prettier, and Vitest
- Configured workspace structure for monorepo support
- Added comprehensive documentation in
packages/docs/source/docs/automation/copilot-environment.md - Enhanced
.devcontainer/devcontainer.jsonfor consistency with Copilot environment - Resolves issue ralphschuler/.screeps-gpt#1354 (enhance Copilot integration with custom environment)
0.175.7 – 2025-11-28 (changelog)
- Pathfinding in Narrow Passages: Creeps now properly navigate through single-tile corridors by ignoring other creeps in pathfinding calculations
- Added
ignoreCreeps: trueto all pathfinding operations (findClosestByPath, moveTo) across all role controllers - Updated helper functions in
helpers.ts:findClosestOrFirst,tryPickupDroppedEnergy,moveToTargetRoom - Updated role controllers: HarvesterController, HaulerController, UpgraderController, BuilderController, RepairerController
- Paths are now calculated based on terrain and structures only, not temporary creep positions
- Prevents pathfinding failures when passages are temporarily occupied by other creeps
- Creeps will still physically collide at runtime; traffic management handles actual collision avoidance
- Added comprehensive unit tests for
findClosestOrFirsthelper validatingignoreCreepsbehavior - Updated regression tests in
room-exit-crossing.test.tsto expectignoreCreeps: true - Resolves issue ralphschuler/.screeps-gpt#1466 (creeps stuck in narrow passages)
- Addresses issue ralphschuler/.screeps-gpt#1450 (pathfinding not working in single-tile corridors)
0.174.0 – 2025-11-28 (changelog)
- Automation: Enhanced Copilot prompts with Screeps MCP server documentation
- Updated
AGENTS.mdto document Screeps Docs MCP and Screeps Wiki MCP servers - Added MCP tool references to all relevant prompts:
researcher,issue-triage,strategist,strategic-planner,repository-audit,repository-review,todo-issue,todo-automation,screeps-monitor - Prompts now instruct agents to use
screeps_docs_search,screeps_docs_get_api,screeps_docs_get_mechanics,screeps_wiki_search, andscreeps_wiki_get_articlefor game knowledge - Enables automated workflows to gather Screeps game context when handling issues and implementing features
0.165.1 – 2025-11-26 (changelog)
- Automation: Replaced
copilot-execcustom implementation with wrapper aroundcodex-exec(OpenAI’s official codex-action) - Reduced maintenance burden by leveraging official OpenAI tooling
- Maintained full backward compatibility with all existing workflows (4 workflows, 5 specialized agents)
copilot-execnow delegates tocodex-execwhich wrapsopenai/codex-action@v1- Updated regression tests to validate delegation and compatibility
- Updated documentation in
packages/docs/source/docs/automation/overview.md,AGENTS.md, and.github/copilot-instructions.md - Migration aligns with zero-tolerance policy for obsolete code while preserving existing workflow integrations
- Automation: Replaced
0.161.3 – 2025-11-25 (changelog)
- CI/CD: Consolidated guard workflows using strategy matrices for faster execution
- Merged
guard-lint.yml,guard-format.yml, andguard-yaml-lint.ymlintoguard-code-quality.ymlwith matrix strategy (3 parallel jobs) - Merged
guard-test-unit.yml,guard-test-e2e.yml,guard-test-regression.yml, andguard-test-docs.ymlintoguard-tests.ymlwith matrix strategy (4 parallel jobs) - Updated
quality-gate-summary.ymlto monitor consolidated workflows - Reduced from 12 to 7 guard workflows (42% reduction)
- Benefits: Parallel execution within matrix, faster CI feedback, reduced workflow file overhead
- Updated documentation in
packages/docs/source/docs/automation/overview.mdand legacy docs
0.159.1 – 2025-11-25 (changelog)
- Documentation: TSDoc/JSDoc documentation standards and style guide
- Created
packages/README.mdwith comprehensive TSDoc standards and templates - Added code documentation standards section to
AGENTS.mdandDOCS.md - Added ESLint JSDoc validation rules for exported classes (set to warn for incremental adoption)
- Enhanced TSDoc comments for high-priority entry points (
main.ts,server.ts,agent.ts) - Installed
eslint-plugin-jsdocfor automated documentation validation
0.157.5 – 2025-11-25 (changelog)
- Documentation: Comprehensive Screeps wiki topic research
- Created
docs/research/screepspl-wiki-comprehensive-topics.mdcovering all major wiki.screepspl.us topics - Documented 17 major topic areas: RCL progression, creep body parts, combat strategies, CPU optimization, minerals/labs, pathfinding, market economy, private servers, power mechanics, remote harvesting, links, observers, spawning, safe mode, room claiming, factories, and API constants
- Added implementation priority matrix for .screeps-gpt integration
- Cross-referenced current bot implementation status with wiki best practices
- Supplements existing
screepspl-wiki-analysis.mdwith detailed topic coverage - Documentation: Created GitHub Models in Actions migration assessment
- Comprehensive comparison between Copilot CLI and
actions/ai-inference - Identified workflows suitable for migration vs. those requiring Copilot CLI
- Proposed hybrid architecture combining both approaches
- Documented implementation plan with phased rollout
- Added example showing issue classification pre-filter pattern
- Located at
packages/docs/source/docs/automation/github-models-migration.md
0.155.21 – 2025-11-25 (changelog)
- Pathfinding: Integrated screeps-pathfinding library by NesCafe62
- Added NesCafePathfinder as the default pathfinding provider
- Added traffic management with priority-based movement (
runMoves()) - Added
moveOffRoad()to move creeps off roads when finished working - Added
reservePos()for position reservations - Added
priorityoption inmoveTo()for traffic management - Added move off exit behavior
- Added terrain and cost matrix caching
- Pathfinding: Replaced DefaultPathfinder and CartographerPathfinder with NesCafePathfinder
- Automatic fallback to native Screeps pathfinding when library is unavailable
- Pathfinding: Removed DefaultPathfinder implementation
- Pathfinding: Removed CartographerPathfinder implementation
0.154.0 – 2025-11-24 (changelog)
- Memory Management: Implemented proper memory usage patterns from wiki.screepspl.us/Memory
- Added
GlobalCachefor volatile heap caching (no serialization overhead) - Added path serialization utilities (
serializePath,deserializePath, etc.) for 85% memory reduction - Added flag memory cleanup to
MemoryGarbageCollector - Updated memory management documentation with advanced patterns
- Covers heap caching, path serialization, and RawMemory segments documentation
0.151.1 – 2025-11-24 (changelog)
- Claimer Room Cycling: Fixed claimers cycling back through room exits after entering target room
- When creep enters target room at edge position (x/y = 0 or 49), it now moves toward room center before attempting to claim
- Prevents pathfinding to controller from leading creep back through the exit
- Added regression tests to verify behavior at all edge positions and corners
0.146.0 – 2025-11-24 (changelog)
- Build Validation: Added comprehensive test coverage for context-aware size thresholds
- Validates main.js requires minimum 50KB (ensures functional AI with kernel + runtime components)
- Validates module files require minimum 500 bytes (allows small type-only modules)
- Tests confirm validation prevents broken or incomplete builds from passing
- Added 11 regression test cases covering threshold enforcement and edge cases
- Addresses deployment safety concerns from ralphschuler/.screeps-gpt#729
0.143.5 – 2025-11-24 (changelog)
- Video Pipeline: Implemented Screeps room history video rendering infrastructure (stub implementation)
- Created video pipeline configuration system with type definitions
- Added
capture-room-history.tsscript for fetching Screeps replay data via API - Added
render-room-video.tsscript for video generation (stub, requires ffmpeg integration) - Added
upload-to-youtube.tsscript for YouTube upload automation (stub, requires googleapis) - Created GitHub Actions workflow
.github/workflows/screeps-video-render.ymlfor automated pipeline - Added configuration example file
config/video-pipeline.example.json - Added comprehensive documentation at
docs/automation/video-rendering-pipeline.md - Pipeline supports configurable time windows, video quality settings, and YouTube metadata
- Infrastructure complete, core rendering features require additional dependencies
- Resolves issue ralphschuler/.screeps-gpt#1277
0.139.3 – 2025-11-24 (changelog)
- Tower Repair: Fixed towers not repairing structures when no hostile creeps present
- DefenseCoordinator now calls TowerManager.run() unconditionally
- Towers will repair damaged infrastructure (roads, containers, etc.) during normal operations
- Energy efficiency maintained (towers still reserve 500 energy for defense)
- Added test coverage for repair-only scenarios
- Resolves issue ralphschuler/.screeps-gpt#1275
0.137.21 – 2025-11-23 (changelog)
- Workflow: Fixed screeps-agent.yml using npm instead of yarn, breaking workspace dependency resolution
- Replaced
npm ci+npm installwithyarn install --frozen-lockfile - Updated Node.js version to use
.nvmrcinstead of hardcoded version - Aligns with other workflows (guard-build.yml, deploy.yml)
- Resolves issue ralphschuler/.screeps-gpt#1270
0.137.15 – 2025-11-23 (changelog)
- Refactoring: Extracted hardcoded spawn threshold constants from BehaviorController
- Created
packages/bot/src/runtime/behavior/constants.tswithSPAWN_THRESHOLDSexport - Extracted CPU safety margin (0.85), energy reserve ratios (0.2, 50), storage thresholds (0.5, 0.3), and energy thresholds (0.9, 0.75, 0.8)
- Updated BehaviorController.ts to import and use constants instead of magic numbers
- Added comprehensive TSDoc documentation explaining threshold rationale
- Added regression test validating constant values
- No behavioral changes - all values remain functionally identical
- Unblocks issue #1267 (state machine migration) by providing reusable threshold constants
0.137.9 – 2025-11-23 (changelog)
- Breaking: Removed deprecated GitHub labels (
bug,enhancement,severity/*) - Use
type/bug,type/enhancement, andpriority/*labels instead - No backward compatibility maintained as this is a single-user repository
- Breaking: Removed Logger backward compatibility wrapper (
packages/bot/src/runtime/utils/Logger.ts) - Import directly from
@ralphschuler/screeps-loggerpackage instead - Breaking: Removed deprecated
getTaskQueue()function from BehaviorController - Function was unused and marked for removal
- Updated documentation to remove backward compatibility references
- Removed legacy label migration sections from label-system.md
- Updated AGENTS.md to remove references to deprecated labels
- Updated .github/copilot-instructions.md to remove backward compatibility notes
- Breaking: Removed deprecated GitHub labels (
0.137.3 – 2025-11-23 (changelog)
- Repository Cleanup: Removed unused files and placeholder packages to improve maintainability
- Removed stale
source/docsdirectory (migrated topackages/docs/source/previously) - Removed placeholder package
packages/actions(no implementation, marked as “future” in README) - Removed placeholder package
packages/console(no implementation, marked as “future” in README) - No breaking changes - all builds, tests, and deployments remain functional
- Workspace configuration automatically adapts to removed packages
0.125.7 – 2025-11-21 (changelog)
- Workflow Architecture Refactoring: Simplified monitoring and CI automation workflows
- Monitoring Workflow: Removed copilot-exec strategic analysis step from
screeps-monitoring.yml - Workflow now focuses purely on data collection (PTR stats, bot snapshots, telemetry, profiler data)
- Eliminates unnecessary AI analysis complexity from data pipeline
- All data collection steps remain intact and functional
- CI Automation: Replaced
copilot-ci-autofix.ymlwithci-auto-issue.yml - New workflow creates GitHub issues for failed CI runs instead of attempting automatic fixes
- Preserves circuit breaker pattern (3 consecutive failures, 15-minute backoff)
- Issues include workflow details, failed jobs, and links to run logs
- Applies labels:
automation,ci-failure,type/bug,priority/high,state/pending - Escalation issues created when circuit breaker trips
- More predictable and transparent than automatic fixing
- Removed
copilot-ci-autofix-agentaction andci-autofixprompt - Updated test suites to reflect new workflow structure
- Updated documentation (AGENTS.md, README.md) to describe new approach
- Separation of concerns: Data collection vs. analysis
- Predictability: Issue creation is more predictable than auto-fixing
- Transparency: Issues provide visible tracking of CI problems
- Maintainability: Simpler workflows are easier to debug
0.125.1 – 2025-11-20 (changelog)
- Package Manager Migration: Migrated from Bun to Yarn 4 (Berry) as the primary package manager
- Replaced
bun.lockwithyarn.lockfor dependency management - Updated all documentation (README.md, DOCS.md, AGENTS.md, .github/copilot-instructions.md) to use yarn commands
- Removed Bun-specific dependencies (
bun-plugin-screeps) - Configured Yarn with node-modules linker for better compatibility
- Added GitHub Package Registry configuration for @ralphschuler scope in
.yarnrc.ymland.npmrc - Updated repository to be private for workspace support
- All builds, tests, and workflows remain fully functional
- Spawn Utilization Optimization: Lowered RCL 1-2 energy threshold from 90% to 80% for dynamic upgrader scaling
- Fixes spawn idle issue where spawns remained inactive despite 82% energy capacity and significant CPU headroom
- Enables proactive spawning of additional upgraders during healthy energy states (80%+ capacity)
- Expected improvements: 20-30% faster RCL progression at early levels, increased spawn uptime from ~60% to >80%
- Only affects RCL 1-2 (by design), higher RCLs use different thresholds
- Added regression test suite validating spawn behavior at various energy thresholds (75%, 80%, 82%)
- Resolves issue #1105: PTR spawn idle during healthy energy state
- Screeps-Kernel Integration: Refactored bot package to use
@ralphschuler/screeps-kerneldecorator-based process management system - Replaced custom
createKernel()factory withKernelclass from@ralphschuler/screeps-kernel - Created
MainProcesswrapper using@processdecorator to bridge screeps-kernel with existing bot logic - Renamed
processdecorator import toregisterProcessto avoid shadowing Node.js global - Migrated from
process.envto build-time constants (__PROFILER_ENABLED__,__TASK_SYSTEM_ENABLED__,__ROOM_VISUALS_ENABLED__) - Updated esbuild configuration to inject environment variables as compile-time constants
- Enhanced screeps-profiler with null safety checks for
Memory.profiler - Added comprehensive architecture documentation in
SCREEPS_KERNEL_INTEGRATION.md - Zero breaking changes - all 783 unit tests pass
- Establishes foundation for future modularization of bot components
- Package Build Automation: Added postinstall scripts to all workspace packages
- Automatically builds packages after
npm installorbun install - Ensures packages are ready for import in workspace without manual build steps
- Affects: screeps-kernel, screeps-profiler, screeps-logger, screeps-cache, screeps-perf, screeps-metrics, screeps-async, screeps-xstate, screeps-xtree, screeps-mcp, screeps-agent
- Screeps Metrics Package: New package
@ralphschuler/screeps-metricsfor comprehensive metrics collection - Collects CPU metrics (usage, limits, bucket, tick limits, shard limits)
- Monitors V8 heap statistics via
Game.cpu.getHeapStatistics() - Tracks GCL (Global Control Level) progress
- Tracks GPL (Global Power Level) progress when available
- Collects detailed room-level metrics (energy, creeps, structures, hostiles)
- Tracks resource availability (credits, pixels, CPU unlocks, access keys)
- Fully typed with TypeScript
- Configurable metrics collection for CPU optimization
- Zero external dependencies (uses only official Screeps APIs)
- Comprehensive test coverage with unit tests
- Located at
packages/screeps-metrics/ - PTR Energy Capacity Monitoring Validation: Documented resolution of issue ralphschuler/.screeps-gpt#1056
- Issue: Energy capacity utilization at 29.5% (133/450) during active extension construction
- Root cause: Temporary resource constraint while 2 extension sites under construction
- Resolution: Self-resolved through normal game progression when extensions completed
- Outcome: Energy capacity increased from 450 to 500, achieving 100% utilization
- Added regression test suite validating monitoring system correctly tracks energy trends during construction phases
- Confirms low energy during construction is expected behavior, not a bug
- Validates monitoring system’s ability to detect and track issue resolution automatically
0.116.0 – 2025-11-19 (changelog)
- Automated Threat Detection and Defense Coordination System: Implemented comprehensive defense automation with threat detection, defensive posture management, and coordinated responses
- Created ThreatDetector class for room scanning and threat assessment with intelligent scoring
- Created DefenseCoordinator class to manage defensive responses and coordinate tower/combat operations
- Integrated defense system into kernel execution flow (runs before infrastructure management)
- Added defensive posture system: normal → alert → defensive → emergency
- Threat levels: none, low, medium, high, critical (based on hostile count and body composition)
- Threat scoring aligned with CombatManager: attackers (10 pts), healers (8 pts), ranged (5 pts), dismantlers (5 pts)
- Memory persistence in Memory.threats, Memory.defense, Memory.combat
- Automatic spawn priority adjustment: defenders prioritized during defensive/emergency postures
- Controller upgrading pauses during defensive/emergency postures (issue ralphschuler/.screeps-gpt#702)
- Upgraders move to safe positions near storage/spawns during combat
- Memory cleanup for stale threat data (default: 100 ticks)
- Added 23 comprehensive unit tests covering threat detection and defense coordination
- Added comprehensive documentation in docs/runtime/defense.md
- Resolves issue ralphschuler/.screeps-gpt#1024 (implement automated threat detection and defense coordination)
- Multi-room Construction Budget: Enhanced ConstructionManager to support per-room construction limits
- Added
maxSitesPerRoomparameter (default: 1) to prevent single-room spam - Increased
maxSitesPerTickdefault from 1 to 5 for multi-room scaling - Allows up to 5 rooms to build concurrently instead of 1 per tick
- Scales better for multi-room operation (5x improvement)
- Added regression test suite for multi-room construction planning
- Resolves issue ralphschuler/.screeps-gpt#632 (ConstructionManager maxSitesPerTick=1 bottlenecks multi-room expansion)
- Path Caching System: Implemented comprehensive path caching with TTL and LRU eviction for CPU optimization
- Created PathCache class with configurable TTL (default 1500 ticks) and LRU eviction
- Integrated path caching into DefaultPathfinder and CartographerPathfinder
- Added cost matrix caching for terrain and structures
- Cache metrics tracking: hit rate, CPU savings, cache sizes, evictions
- Cache invalidation API for room and structure changes
- Expected CPU savings: 20-30% reduction in pathfinding overhead
- Expected pathfinding call reduction: 60-70% through cache hits
- Target cache hit rate: >70% within 100 ticks
- Memory footprint: <100KB for typical usage
- Added 37 comprehensive tests (25 unit, 12 regression)
- Resolves issue ralphschuler/.screeps-gpt#1008 (implement path caching with TTL)
- CPU Profiler Optimization: Reduced profiler overhead by 60-80% through caching and interval-based collection
- Added tick-based caching for profiler state checks (isEnabledFast)
- Reduced Memory.profiler.start access from 1000+ per tick to 1-2 per tick
- Cache invalidated on profiler state changes (start/stop/clear) for correctness
- Profiler overhead when stopped: reduced from ~1.0 CPU to ~0.3 CPU (70% reduction)
- Profiler overhead when running: reduced by 30-40% due to caching optimization
- Added DETAILED_STATS_INTERVAL (10 ticks) for StatsCollector expensive operations
- Structure counts and construction sites collected every 10 ticks instead of every tick
- Critical stats (CPU, creeps, energy) still collected every tick for monitoring
- StatsCollector overhead: reduced from ~0.4-0.6 CPU to ~0.15-0.2 CPU (65% reduction)
- Disabled diagnostic logging by default (enableDiagnostics: false) for production
- Added runtime override via Memory.experimentalFeatures.statsDebug for debugging
- Expected total CPU reduction: 2.0-2.5 CPU per tick (53-66% reduction)
- Target baseline: <1.0 CPU per tick with 1 creep (from 3.77 CPU measured)
- Resolves issue ralphschuler/.screeps-gpt#961 (optimize CPU profiler overhead)
- CPU Profiler Optimization Runbook: Added comprehensive guide to docs/operations/runbooks.md
- Documented build-time profiler disabling (PROFILER_ENABLED=false) for zero overhead
- Added runtime profiler control guide (Profiler.start/stop/clear commands)
- Added profiler data collection workflow and output interpretation
- Defined performance baselines and CPU targets per creep count
- Added optimization targets per component (Kernel, StatsCollector, BehaviorController)
- Created regression test framework in tests/unit/profiler-caching.test.ts
- Established performance thresholds for validation and regression detection
- Emergency Spawn Bootstrap with Priority Refilling: Enhanced emergency spawn logic with spawn refilling priority for all creeps
- CRITICAL: All creeps (harvesters, upgraders, builders) now prioritize spawn refilling above all other tasks when spawn energy drops below 50% capacity or below 150 energy (minimum spawn threshold)
- Emergency creeps marked with
emergency: trueflag in memory for tracking and special handling - Added diagnostic message when emergency spawn cannot proceed due to insufficient energy (< 150 energy minimum)
- Detects energy stuck in containers that cannot be transported without creeps
- Logs energy availability, stored energy, and minimum threshold requirements
- Enhanced emergency spawn success logs with energy percentage metrics
- Visual indicators: 🚨spawn emoji and red pathfinding when creeps are in emergency spawn refill mode
- Prevents spawn starvation by ensuring spawn always has minimum energy for continuous creep production
- Universal application ensures both emergency recovery and normal operation maintain spawn energy reserves
- Added comprehensive regression test suite (8 tests) for emergency deadlock scenarios
- Helps identify and track recovery from spawn deadlock situations (0 creeps + low energy)
- Resolves issue ralphschuler/.screeps-gpt#1002 (emergency spawn bootstrap implementation)
- Parent issue: ralphschuler/.screeps-gpt#998 (zero creep population investigation)
- Related: #959 (missing hauler role), #954 (storage automation), #688, #691 (energy validation)
0.104.0 – 2025-11-17 (changelog)
- Optimized Creep Role Distribution at RCL4: Implemented dynamic role balancing to fix hauler spawning and workforce inefficiency
- Added critical hauler priority system: spawns haulers first when storage/towers exist but hauler count is 0
- Reduced harvester overstaffing from 4 to 2-3 when haulers are available for logistics
- Implemented dynamic builder activation: scales 1-3 builders based on construction queue size (1-5 sites: 1, 6-15: 2, 16+: 3)
- Implemented dynamic repairer activation: spawns repairers only when structures need maintenance
- Added infrastructure detection: tracks construction sites and damaged structures for workforce optimization
- Expected efficiency gain: ~30% improvement in energy throughput
- Fixes all 3 failing regression tests in
hauler-spawning-with-storage.test.ts - Resolves issue ralphschuler/.screeps-gpt#961 (optimize creep role distribution at RCL4)
- Resolves issue ralphschuler/.screeps-gpt#955 (hauler role not spawning)
- Profiler Data Collection Enablement: Added console backup mechanism to ensure profiler is always running
- Created
ensure-profiler-running.tsscript that idempotently checks and starts profiler via console - Updated monitoring workflow with “Ensure profiler is running” step before data fetch
- Adds resilience to existing auto-start feature (dual mechanism: auto-start on first tick + console backup every 30 min)
- Created initial placeholder
reports/profiler/latest.jsonto prevent health check failures - Added comprehensive unit tests for ensure-profiler-running script
- Created profiler enablement verification documentation in
docs/operations/profiler-enablement-verification.md - Enables function-level CPU profiling for proactive optimization and bottleneck analysis
- Resolves issue ralphschuler/.screeps-gpt#856 (profiler data collection enablement)
- Supports ralphschuler/.screeps-gpt#854 (profiler integration implementation)
- Enables ralphschuler/.screeps-gpt#793 (CPU bucket-aware scheduler with profiler data)
- Enables ralphschuler/.screeps-gpt#820 (performance baseline establishment)
0.89.5 – 2025-11-16 (changelog)
- Context-Aware Build Validation Thresholds: Implemented context-aware MIN_SIZE validation to strengthen build safety
- Monolithic
main.jsnow requires 50KB minimum (ensures kernel + runtime components present) - Modular components maintain 500B minimum (preserves flexibility for type-only exports)
- Validation leverages existing
checkLoopExportparameter to distinguish file types - Added regression tests validating both threshold scenarios
- Prevents broken bundler output from deploying to production
- Resolves issue ralphschuler/.screeps-gpt#731 (context-aware MIN_SIZE validation)
0.83.23 – 2025-11-16 (changelog)
- Task System Default State Inconsistency: Aligned build-time default with runtime default and documentation
- Changed
buildProject.tsdefault from"false"to"true"to match v0.32.0+ enabled-by-default design - Updated build configuration comments to document default values explicitly
- Task system is now truly enabled by default at build time (matches runtime fallback behavior)
- Set
TASK_SYSTEM_ENABLED=falseat build time to disable if needed - Added regression test to validate default task system state matches expected behavior
- Resolves confusion between code comments claiming “enabled by default” and actual disabled behavior
0.83.7 – 2025-11-15 (changelog)
- Memory.stats Collection Failure: Fixed TypeScript interface conflict preventing stats collection and causing monitoring blackout
- Root cause:
profiler/typings.d.tsdeclaredinterface Memorywithoutdeclare global, creating conflicting local interface - This prevented the global Memory interface in
types.d.tsfrom recognizingstatsproperty - Solution: Removed conflicting Memory interface declaration from profiler typings
- Added regression test
memory-stats-interface.test.tsto prevent future interface conflicts - Resolves issue #684 (Memory.stats collection failure) and unblocks strategic monitoring capabilities
- Restores PTR telemetry collection, enabling performance analysis and anomaly detection
0.83.5 – 2025-11-15 (changelog)
- Overmind-RL Reinforcement Learning Research: Comprehensive evaluation of RL integration potential for bot AI optimization
- Created research documentation in
docs/research/overmind-rl-analysis.md - Analyzed Overmind-RL three-component architecture (Node.js backend, Python Gym wrapper, distributed training)
- Evaluated RL algorithms (PPO, DQN), neural network designs, and reward function engineering
- Assessed 7 use cases: combat micro, resource allocation, expansion, creep bodies, market trading, tasks, pathfinding
- Documented training requirements: $2k-$10k first year, 870 hours effort, GPU infrastructure
- Detailed cost-benefit analysis: RL 6x more expensive than proven Overmind patterns with uncertain ROI
- Compatibility analysis: Architecture misalignment (Python vs. TypeScript-only), 10-200ms inference latency
- Created 6-phase integration roadmap (33-48 weeks) if pursued in future
- Decision: NOT RECOMMENDED for current integration—focus on proven optimization patterns instead
- Defined revisit conditions: bot maturity (12-24 months), specific high-value use case, RL expertise, infrastructure budget
- Updated TASKS.md with research findings and alternative recommendations
- Related research: Overmind architecture (overmind-analysis.md), creep-tasks (#625), packrat (#626)
0.83.1 – 2025-11-15 (changelog)
- Strategic Documentation Framework: Created comprehensive strategic documentation structure for tracking bot development phases and capturing learning insights
- Created
docs/strategy/directory with phases/, learning/, and decisions/ subdirectories - Created strategic roadmap (
docs/strategy/roadmap.md) documenting current phase status (Phase 1: 85%, Phase 2: 60%, Phase 3: 100%, Phase 4: 50%, Phase 5: 100%) - Documented success metrics, blockers (telemetry #791, container placement #783), and milestones
- Created phase-specific documentation for all 5 development phases:
- Phase 1: Foundation (RCL 1-2) - Bootstrap, basic economy, container harvesting
- Phase 2: Core Framework (RCL 3-4) - Task system, spawn queue, link network
- Phase 3: Advanced Economy (RCL 6-8) - Remote harvesting, terminal, labs, factory
- Phase 4: Empire Coordination - Combat, traffic, expansion, multi-room logistics
- Phase 5: Multi-Room & Global Management - Colony management, analytics, inter-shard communication
- Migrated learning insights from CHANGELOG.md to structured documentation:
- Bootstrap phase implementation pattern (v0.44.0) - Harvester-focused early-game optimization
- Container-based harvesting pattern (v0.54.0) - Role specialization for efficiency
- Round-robin task scheduling pattern (v0.57.1) - CPU fairness preventing creep starvation
- Created Architectural Decision Records (ADR) template and guidelines
- Updated AGENTS.md to reference strategic documentation in knowledge base
- Updated README.md strategy section with links to roadmap, phases, learning insights, and ADRs
- Enables strategic planning agent to analyze bot progression objectively
- Captures institutional knowledge preventing repeated failed approaches
- Provides context for autonomous agents making improvement decisions
- Overmind Architecture Research: Comprehensive analysis of Overmind bot patterns for potential integration
- Created research documentation in
docs/research/overmind-analysis.md - Identified 12 key architectural patterns with compatibility assessments
- Documented quick wins: Task Persistence, Decorator-Based Caching, Directive System
- Prioritized implementation roadmap with complexity and value estimates
- Linked patterns to existing issues (#478, #487, #494, #392, #426, #493, #607, #614)
- Added recommendations to TASKS.md for phased implementation
- Total of 10 prioritized patterns spanning Phases 2-5
- Focused on high-value areas: CPU optimization, task management, multi-room scaling
0.80.0 – 2025-11-15 (changelog)
- CI Autofix Circuit Breaker: Implemented circuit breaker to prevent infinite retry loops in CI autofix workflow
- Added circuit breaker logic to track consecutive failures (max 3 attempts)
- Implemented 15-minute backoff period between retry attempts
- Created automatic escalation to GitHub issues when circuit breaker trips
- Added diagnostic logging showing retry attempts and circuit breaker status
- Circuit breaker resets on successful autofix or after backoff period
- Prevents workflow saturation from repeated failed autofix attempts
- Checks for existing escalation issues to avoid duplicates
- Added comprehensive regression test suite (16 tests) in
tests/regression/ci-autofix-circuit-breaker.test.ts - Resolves issue: fix(automation): CI autofix workflow saturation - 17+ consecutive action_required failures
0.76.0 – 2025-11-14 (changelog)
- Dying Creep Energy Dropping: Implemented automatic energy dropping behavior for creeps approaching end of life
- Creeps with TTL below threshold (default: 50 ticks) automatically drop all carried energy
- Prevents energy waste from creep despawning
- Configurable via
Memory.dyingCreepBehavior(enabled/disabled and threshold) - Visual feedback: dying creeps display “💀” emoji
- Works with both task-based and role-based execution systems
- Minimal CPU overhead: ~0.01 CPU per creep per tick
- Created helper functions in
packages/bot/src/runtime/behavior/creepHelpers.ts: isCreepDying(creep, threshold): Detects dying creepshandleDyingCreepEnergyDrop(creep): Handles energy drop logic- Integrated into BehaviorController pre-execution checks
- Added 11 unit tests in
tests/unit/creepHelpers.test.ts - Added 8 integration tests in
tests/unit/behaviorController.test.ts - Created comprehensive documentation in
docs/runtime/creep-lifecycle.md - Total test coverage: 795 passing tests
- Resolves issue: feat(runtime): implement energy dropping behavior for dying creeps
0.64.0 – 2025-11-13 (changelog)
- Build Validation Enhancements: Implemented comprehensive build artifact validation to prevent corrupted or empty files from being deployed
- Added file size validation (non-zero check and 500-byte minimum threshold)
- Added content validation to verify main.js exports the required
loopfunction - Enhanced validation for both monolithic and modular build architectures
- Validation applies to all module files in modular builds (behavior.js, bootstrap.js, etc.)
- Exported
validateFile()function for testing and reusability - Created 12 comprehensive unit tests in
tests/unit/build-validation.test.ts - Tests cover empty files, small files, missing exports, and various export patterns
- Updated
packages/utilities/scripts/lib/buildProject.tswith enhanced validation logic - Prevents critical deployment failures by catching build errors early in the pipeline
- Resolves issue: fix(build): enhance build validation to check file size and content validity
- Strategic Planning Automation: Implemented autonomous strategic planning agent that analyzes bot performance and creates improvement roadmaps
- Added workflow:
.github/workflows/copilot-strategic-planner.yml(runs every 8 hours) - Created comprehensive strategic planner prompt:
.github/copilot/prompts/strategic-planner - Integrates bot snapshots, PTR telemetry, profiler data, and documentation for strategic analysis
- Identifies improvement opportunities across six categories: performance, economy, expansion, defense, infrastructure, automation
- Creates evidence-based issues with clear priorities, acceptance criteria, and implementation approaches
- Updates strategic documentation to maintain alignment with bot capabilities
- Learning feedback loop from past implementations to avoid repeating mistakes
- Detailed documentation in
docs/automation/strategic-planning.md - Updated
docs/automation/overview.mdwith strategic planning workflow description - Completes autonomous development loop: Monitoring → Strategic Planning → Implementation → Validation
- Resolves issue: feat(automation): implement strategic planning Copilot agent for autonomous bot improvement
0.57.1 – 2025-11-12 (changelog)
- Task System CPU Starvation Prevention: Implemented round-robin scheduling to ensure fair creep execution under CPU constraints
- Added
tickOffsetrotation to prevent same creeps from being consistently skipped - Added
lastExecutedtracking map to monitor execution gaps per creep - Added
getStarvationStats()method for monitoring fairness metrics - With 25 creeps and CPU allowing 12/tick: old system permanently starved 13 creeps, new system cycles all with max 14-tick gaps
- Created 13 unit tests in
tests/unit/taskManager-round-robin.test.tsvalidating fair scheduling - Created 7 regression tests in
tests/regression/task-system-cpu-starvation.test.tsfor high creep count scenarios - Updated
docs/runtime/task-system.mdwith round-robin scheduling documentation - All creeps now get equal opportunity to execute tasks, eliminating permanent starvation
- Resolves issue: Task system CPU threshold checking may cause starvation with high creep counts
- StatsCollector Error Handling: Added comprehensive error handling to prevent silent stats collection failures
- Wrapped main collection in try/catch to prevent exceptions from blocking Memory.stats writes
- Isolated room stats collection to prevent one bad room from breaking entire collection
- Added fallback mechanism to ensure Memory.stats always has valid structure with safe property access
- Resolves #658: Bot executes normally but Stats API returns empty data
0.54.0 – 2025-11-12 (changelog)
- Container-Based Harvesting Automation: Implemented dynamic role adjustment system that transitions to efficient container-based economy when infrastructure is ready
- Added repairer role for structure maintenance (prioritizes roads and containers, then other structures)
- Repairer body optimized for repair work: 2 WORK, 1 CARRY, 2 MOVE (300 energy cost)
- System automatically detects containers near energy sources and adjusts role spawning:
- Spawns 1 stationary harvester per source with adjacent container
- Spawns 2 haulers per controlled room for energy transport
- Spawns 1 repairer per controlled room for infrastructure maintenance
- Reduces regular harvester minimum from 4 to 2 when using container-based system
- Added repairer memory interface and task constants (repairerGather, repair)
- Created comprehensive test suite in
tests/unit/repairer.test.ts(3 tests) - Repairer gathers energy from containers/storage, repairs infrastructure prioritizing roads/containers
- System seamlessly transitions between mobile harvesters and stationary+hauler economy
- Resolves #667: Add repairer and hauler to the system with container-based automation
0.52.0 – 2025-11-12 (changelog)
- Bot Aliveness Heartbeat Monitoring: Implemented automated bot heartbeat monitoring with graduated failure detection to catch outages within 30 minutes instead of 8+ hours
- Created
packages/utilities/scripts/check-bot-health.tswith multi-stage health checks (PTR stats → world-status API → console fallback) - Implemented graduated alert thresholds: 0-15 min (silent), 15-30 min (warning), 30-60 min (HIGH), 60+ min (CRITICAL)
- Added persistent health state tracking in
reports/monitoring/health.jsonwith 100-entry detection history - Integrated health check into
.github/workflows/screeps-monitoring.yml(runs every 30 minutes) - Enhanced
packages/utilities/scripts/check-ptr-alerts.tsto generate bot outage alerts with push/email notifications - Added comprehensive test suite
tests/unit/check-bot-health.test.tswith 9 tests covering persistence, thresholds, and history tracking - Updated documentation in
docs/automation/autonomous-monitoring.mdwith Phase 3.5: Bot Aliveness Heartbeat specification - Health state committed alongside bot snapshots for historical tracking and trend analysis
- Addresses monitoring blind spot where bot death was indistinguishable from telemetry failures
- Resolves #561: Implement automated bot aliveness heartbeat with early failure detection
0.51.7 – 2025-11-12 (changelog)
- Spec-Kit Workflow System: Removed unused specification-driven development workflow infrastructure
- Deleted workflow file
.github/workflows/copilot-speckit.yml - Deleted prompt templates
.github/copilot/prompts/speckit-planandspeckit-refine - Deleted documentation
docs/automation/spec-kit-workflow.mdfrom all documentation locations - Removed
speckitlabel definition from.github/labels.yml - Removed all spec-kit references from automation documentation
- Deleted regression test
tests/regression/speckit-workflow-structure.test.js - Repository has standardized on Todo automation workflow for implementations
- Reduces maintenance burden and simplifies automation surface area
- Resolves #557: Remove unused spec-kit workflow and documentation
0.51.3 – 2025-11-12 (changelog)
- Deprecation Strategy and Code Lifecycle Management: Implemented comprehensive system for managing deprecated code and technical debt
- Created deprecation policy document in
docs/development/deprecation-policy.mdwith lifecycle phases and guidelines - Created deprecation registry in
docs/development/deprecation-registry.mdto track all active deprecations - Created migration guide template in
docs/development/migration-guide-template.mdfor consistent documentation - Added ESLint rule
@typescript-eslint/no-deprecatedto warn when deprecated APIs are used - Added CI workflow
.github/workflows/guard-deprecation.ymlfor automated deprecation checks - Documented current deprecations: role-based behavior system and legacy label system
- Established 2-3 release cycle deprecation timeline for minor versions
- Integrated deprecation tracking with CHANGELOG format
- Provides clear upgrade paths and reduces technical debt accumulation
- Resolves #556: Implement deprecation strategy and code lifecycle management system
0.51.1 – 2025-11-12 (changelog)
- PTR Telemetry Blackout Regression: Implemented comprehensive prevention measures for recurring stats collection failures (#550)
- Added validation to StatsCollector to detect Memory.stats write failures
- Created
scripts/validate-telemetry-health.tsfor automated health checks - Integrated telemetry health validation into monitoring workflow (runs every 30 minutes)
- Added post-deployment validation step (5 min wait + health check)
- Created regression test suite
tests/regression/stats-collection-blackout.test.tswith 8 test cases - Enhanced documentation in
docs/operations/stats-collection.mdwith troubleshooting and recovery procedures - Implements automated detection of empty stats within 15 minutes
- Prevents recurrence of issues #523, #331, #345 through proactive monitoring
- Resolves #550: PTR telemetry blackout regression - empty stats data despite successful deployments
0.50.0 – 2025-11-12 (changelog)
- Builder Wall Maintenance: Builder role now repairs walls and ramparts to configurable target HP thresholds
- Added
WALL_TARGET_HPconstant (100,000 HP) for wall repair threshold - Added
RAMPART_TARGET_HPconstant (50,000 HP) for rampart repair threshold - Modified builder repair filter to include walls/ramparts below target HP
- Fixes #644: Builder role now maintains defensive structures
0.48.0 – 2025-11-12 (changelog)
- Issue Triage Enhancement: Enhanced issue triage automation with comprehensive context gathering
- Added code context gathering using GitHub MCP
search_codeto find related files in.github/,src/,tests/ - Added issue cross-referencing to identify related open and closed issues
- Added PR cross-referencing to find related pull requests
- Enhanced reformulated issue body with new sections: “Related Code”, “Related PRs”
- Updated triage comment to include discovered context
- Extended JSON output to include
related_prsandrelated_code_filesfields - Resolves #639: Make issue triage automation check current code, issues, and pull requests
0.47.1 – 2025-11-11 (changelog)
- Monorepo Restructuring: Reorganized repository into packages-based monorepo structure
- Created
/packagesdirectory with bot, docs, utilities, actions, and console packages - Migrated
src/topackages/bot/src/for core Screeps AI implementation - Migrated
scripts/topackages/utilities/scripts/for build tooling and utilities - Migrated
docs/,source/,themes/,_config.ymltopackages/docs/for documentation site - Configured Bun workspaces in root
package.jsonfor monorepo dependency management - Updated TypeScript path aliases to reference new package locations
- Updated ESLint configuration to lint new package structure
- Updated vitest configuration for new source paths
- Updated all GitHub workflows to reference new package paths
- Updated all import paths in tests and utilities
- All 580 tests passing, lint passing, build working
- Improved code organization with clear package boundaries
- Enables independent package versioning and deployment
- Better separation of concerns across codebase
- Resolves #[issue-number]: Restructure repository into monorepo with packages organization
0.44.0 – 2025-11-10 (changelog)
- Bootstrap Phase: Implemented automated first-room resource optimization with harvester-focused spawning
- Added
BootstrapPhaseManagerclass for bootstrap phase state management - Integrated bootstrap logic with Kernel and BehaviorController
- Adjusts role minimums during bootstrap phase (6 harvesters, 1 upgrader, 0 builders = 80%+ harvesters)
- Automatically activates for new rooms with controller level < 2
- Exits when controller level 2 reached OR stable infrastructure (4+ harvesters, 300+ energy)
- Tracks bootstrap state in Memory with persistence across code reloads
- Configurable completion criteria via
BootstrapConfig - Comprehensive documentation in
docs/runtime/bootstrap.md - 37 unit tests validating bootstrap activation, completion, role minimums, and integration
- Resolves #530: Implement bootstrap phase for optimal first-room resource utilization
- Operational Milestones Documentation: Created
docs/operations/milestones.mdfor tracking progression achievements - Documented E46S58 controller level 2 upgrade milestone (2025-11-08, shard3)
- Established milestone tracking framework for controller upgrades, territorial expansion, and infrastructure development
- Includes automation recommendations for future milestone detection
- Related to #533: Monitoring verification for controller upgrade detection
0.43.1 – 2025-11-10 (changelog)
- Console Telemetry Fallback: Fixed “expression size too large” error by implementing chunked query strategy
- Split single large console command into 5 smaller, focused queries (CPU, GCL, rooms, creeps, resources)
- Each query limited to 1000-1200 characters to stay within Screeps API limits
- Added retry logic with exponential backoff (3 attempts, 1s/2s/4s delays)
- Added expression size validation before sending commands to API
- Restored monitoring resilience when Stats API returns empty data
- Added comprehensive test suite (
tests/unit/fetch-console-telemetry.test.ts) with 9 test cases - Resolves #526: Console fallback “expression size too large” error
- Related to #523: PTR telemetry blackout requiring console fallback
0.40.0 – 2025-11-10 (changelog)
- Pathfinding Abstraction Layer: Integrated screeps-cartographer for advanced pathfinding optimization
- Created
PathfindingProviderinterface for flexible pathfinding implementations - Implemented
DefaultPathfinderusing native Screeps PathFinder (baseline) - Implemented
CartographerPathfinderusing screeps-cartographer library - Added
PathfindingManagerwith configuration system to toggle between providers - Integrated with TaskManager and TaskAction for task-based movement
- Added
pathfindingProviderconfiguration option to BehaviorController and TaskManager - Maintains backward compatibility with native pathfinding as default
- Comprehensive documentation in
docs/runtime/pathfinding.md - 14 unit tests covering provider selection, configuration, and behavior
- Build size increased from 579.6kb to 713.2kb (+134kb for screeps-cartographer)
- No security vulnerabilities detected in new dependency
- Provides foundation for CPU-efficient pathfinding with caching and optimization
- Task system automatically uses configured pathfinding provider
- Test infrastructure updated to properly mock screeps-cartographer (Game, Memory, PathFinder globals)
- All 506 existing tests continue to pass
- Addresses #533: screeps-cartographer integration for advanced pathfinding
0.39.1 – 2025-11-10 (changelog)
- Console Output TypeError: Fixed “Cannot convert object to primitive value” error in MemoryValidator
- Changed from
result.error.messagetoJSON.stringify(result.error.issues)for proper Zod error serialization - Zod error objects lack a simple
messageproperty, causing primitive conversion errors in Screeps console - Added comprehensive regression test suite (
tests/regression/console-output-type-error.test.ts) with 6 test cases - Ensures all console logging properly handles complex objects without type conversion errors
- Resolves console errors reported via email from noreply@screeps.com (2025-11-07)
0.37.3 – 2025-11-10 (changelog)
- Jon Winsley Screeps Blog Analysis: Comprehensive review of 29 blog posts documenting real-world Screeps development patterns
- Created detailed analysis document at
docs/strategy/external-analysis/jon-winsley-analysis.md - Extracted key insights on CPU optimization, task management, memory serialization, and strategic planning
- Identified 50+ actionable implementation items organized by priority
- Cross-referenced patterns with existing repository issues (#392, #426, #478, #487, #493, #494, #495, #496, #468)
- Documented “Great Purge” philosophy: simplicity over complexity for better performance
- Analyzed Objective-based architecture as alternative to centralized task systems
- Extracted monitoring and metrics patterns for PTR telemetry enhancement
- Documented remote mining logistics and multi-room scaling strategies
- Added comprehensive action items to TASKS.md for systematic implementation
- Complements existing Screeps Quorum analysis with individual developer perspective
0.33.5 – 2025-11-09 (changelog)
- Account Upgraded to Lifetime Subscription: Screeps account upgraded from free tier to lifetime subscription
- CPU allocation increased from 20 to 50 (150% increase, +30 CPU)
- Memory allocation remains at 2048 KB (unchanged)
- Updated CPU thresholds to reflect new resource allocation:
- PerformanceTracker: highCpuThreshold 70% → 75%, criticalCpuThreshold remains 90%
- SystemEvaluator: cpuUsageWarningRatio 80% → 85%, cpuCriticalRatio remains 95%
- BehaviorController: cpuSafetyMargin 80% → 85%
- Kernel: cpuEmergencyThreshold remains 90% (last line of defense)
- Benefits: Reduced CPU constraint concerns, enables advanced features (profiler, task management system) with better margins, reduces timeout risk
- Strategic opportunity: Focus shifts from aggressive CPU optimization to sophisticated AI development with better safety margins
- Documentation: Added comprehensive resource allocation guide at
docs/operations/resource-allocation.md - Impact: Helps mitigate CPU timeout incidents (#468, #494) and enables evaluation of previously disabled features (#478, #475)
0.31.11 – 2025-11-09 (changelog)
- Removed Unnecessary Credential Exposure in Monitoring Workflow: Eliminated
SCREEPS_EMAILandSCREEPS_PASSWORDfromscreeps-monitoring.ymlworkflow - Credentials were unnecessarily exposed to GitHub Copilot CLI during monitoring operations
- Scripts (
fetch-profiler-console.ts,check-ptr-alerts.ts) use onlySCREEPS_TOKENfor API authentication - Follows least-privilege principle by providing only token-based read-only access
- Reduces attack surface by removing write-capable credentials from third-party AI service environment
- Aligns with
deploy.ymlworkflow pattern which demonstrates token-only authentication is sufficient - Impact: High priority security improvement - eliminated credential exposure in workflow running every 30 minutes
- No functionality changes - all monitoring features (PTR stats, profiler fetch, alert checking) continue to work with token-only authentication
- Removed Unnecessary Credential Exposure in Monitoring Workflow: Eliminated
0.31.9 – 2025-11-09 (changelog)
- Enhanced TypeScript Type Safety with Runtime Validation: Improved type safety throughout the codebase to prevent runtime errors
- Added
lastTimeoutTickfield toMemory.statsinterface intypes.d.tsfor CPU timeout detection tracking - Created
MemoryValidatorclass (src/runtime/memory/MemoryValidator.ts) using zod schemas for runtime validation of Memory structures (infrastructure code only, not yet integrated into runtime) - Implemented
validateStats()method to validate Memory.stats against TypeScript interface definitions (available for future use) - Implemented
validateAndRepairStats()method to automatically repair corrupted memory with sensible defaults (available for future use) - Added
validateGameContext()function insrc/main.tsto replace unsafeGame as unknown as GameContexttype casting with explicit runtime checks - Enhanced error handling with specific error classification (TypeError vs Error vs unknown errors)
- Added 26 unit tests for memory validation infrastructure and error classification (note: validateGameContext tests validate error types but not the validation function itself due to it being private)
- Strengthened ESLint configuration with stricter TypeScript rules for runtime files (
src/runtime/**/*.ts): @typescript-eslint/no-explicit-any: error (prevents unsafe any types)@typescript-eslint/prefer-nullish-coalescing: error (safer null/undefined handling)@typescript-eslint/prefer-optional-chain: error (cleaner optional property access)@typescript-eslint/no-unsafe-assignment: error (prevents unsafe type assignments in runtime code)@typescript-eslint/no-unsafe-call: error (prevents calls without proper type checking in runtime code)@typescript-eslint/no-unsafe-member-access: error (prevents unsafe property access in runtime code)- Exception added for
src/main.tsto allow profiler initialization with unsafe operations required for global exposure - All tests pass (477 unit tests), build succeeds
- Improves autonomous monitoring compatibility with parseable error messages
- Benefits CPU timeout detection, evaluation system, and autonomous improvement workflows
0.31.5 – 2025-11-08 (changelog)
- Security Audit Workflow jq Parsing Error: Fixed shell parsing error in
.github/workflows/guard-security-audit.ymlthat was causing workflow failures - Root cause: Multi-line jq command with backslash continuation was causing syntax errors in shell execution
- Fixed by properly formatting multi-line jq command without trailing backslashes before pipe operators
- Added defensive error handling for jq parsing failures to prevent workflow crashes
- Added handling for “unknown” vulnerability counts when parsing fails
- Created regression test (
tests/regression/guard-security-audit-workflow-syntax.test.ts) to validate workflow syntax and error handling - Workflow now passes yamllint validation with 80-character line limit
- Fixes consistently failing Security Audit workflow (run 19183827409 and subsequent runs)
- Restores CI/CD pipeline health for security vulnerability scanning
- Security Audit Workflow jq Parsing Error: Fixed shell parsing error in
0.31.1 – 2025-11-08 (changelog)
- Screeps Quorum Architecture Analysis: Comprehensive analysis of the Screeps Quorum community-driven bot architecture
- Created
docs/strategy/external-analysis/screeps-quorum-analysis.mdwith detailed architectural pattern review - Analyzed community governance automation (GitConsensus), deployment architecture (CircleCI + Gulp), modular code organization, and monitoring patterns (ScreepsDashboard)
- Identified high-priority recommendations: Multi-agent consensus protocol, runtime version tracking, QoS monitoring system
- Compared Screeps GPT architecture with Screeps Quorum to validate current design decisions
- Documented actionable recommendations with implementation roadmap aligned to Phase 1-2 deliverables
- Analysis supports strategic planning (Issue #23), specialized GitHub Actions (Issue #210), and enhanced Copilot workflows (Issue #89)
- Documented Zero Security Vulnerabilities in Dependency Tree (#288)
- Comprehensive audit confirmed all previous vulnerabilities (from #125) remain resolved
- npm audit reports 0 vulnerabilities across all severity levels (critical, high, moderate, low)
- Validated that axios security fixes (axios@1.13.2) from Screeps GPT release 0.19.3 (2025-11-07) are still effective
- Security audit workflow (
guard-security-audit.yml) confirmed operational with daily scheduled runs - Issue #288 determined to be duplicate of already-resolved #125 (closed 2025-11-07)
- All 451 unit tests passing, build successful, no security blockers for deployment
- Monitoring system data appears to have been based on stale/cached vulnerability information
0.29.3 – 2025-11-08 (changelog)
- Repository Cleanup and Standardization: Comprehensive cleanup to improve maintainability and consistency
- Removed unnecessary documentation files:
DEPLOY_WORKFLOW_FIX.md,HEXO_IMPLEMENTATION_NOTES.md,IMPLEMENTATION.md,IMPLEMENTATION_LOG.md - Removed validation script:
validate-deploy-fix.sh - Removed backup file:
package.json.backup - Removed deprecated ESLint configuration files:
.eslintrc.cjs,.eslintrc-polyfill.cjs - Removed structuredClone polyfill (no longer needed with Node.js 18+ requirement)
- Reorganized build system: moved
scripts/buildProject.tstoscripts/lib/buildProject.ts - Updated
.gitignoreto prevent future similar issues (backup files, temporary docs, implementation notes) - Updated ESLint flat config to remove polyfill dependency (Node.js 18+ has native structuredClone)
- Updated regression tests to reflect Node.js 18+ requirement and removal of polyfill
- All existing functionality preserved (builds, tests, deployments work unchanged)
0.24.0 – 2025-11-08 (changelog)
- Self-Healing Memory System: Automatic detection and repair of corrupted memory structures
- New
MemorySelfHealerclass validates and repairs core memory structures (creeps, rooms, roles, respawn, stats, systemReport) - Detects circular references, invalid types, malformed data, and missing structures
- Automatic repair of corrupted entries with configurable auto-repair behavior
- Emergency reset capability for complete memory corruption
- Integrated into Kernel bootstrap (runs before migrations and other operations)
- Enabled by default (
enableSelfHealing: truein Kernel config) - 28 comprehensive unit tests covering validation, repair, and emergency reset scenarios
- Updated documentation with self-healing usage, best practices, and troubleshooting guide
0.19.3 – 2025-11-07 (changelog)
- Resolved 3 high-severity vulnerabilities in axios dependency (#282)
- Fixed GHSA-jr5f-v2jv-69x6: axios SSRF and credential leakage vulnerability (CVE affecting axios < 0.30.0)
- Fixed GHSA-4hjh-wcwx-xvwj: axios DoS attack through lack of data size check (CVE affecting axios < 0.30.2)
- Applied npm package overrides to force axios@1.13.2 across all transitive dependencies
- Transitive dependency path: screeps-api@1.16.1 → axios@0.28.1 (vulnerable) → axios@1.13.2 (patched)
- All tests, builds, and linting pass with no regressions
0.18.0 – 2025-11-07 (changelog)
- Phase 3 Advanced Economy: Complete implementation of RCL 6-8 economy features
- LinkManager: Automated energy distribution through link networks with role-based classification
- TerminalManager: Inter-room resource logistics with priority-based transfer queue
- LabManager: Compound production and creep boosting with state management (Tier 1 compounds only)
- FactoryManager: Automated commodity production with priority queue system
- Phase 4 Empire Coordination: Initial implementation of empire-wide coordination features
- CombatManager: Squad-based combat coordination with threat assessment
- TrafficManager: Priority-based movement coordination with collision avoidance
- Unit tests for all new managers (LinkManager, TerminalManager, LabManager, FactoryManager, CombatManager, TrafficManager)
- Documentation for Phase 3 and Phase 4 features in
docs/automation/overview.md - Optional Memory persistence support for all Phase 3/4 managers with RoomPosition serialization
- Fixed RoomPosition serialization in LinkManager and TrafficManager Memory persistence
- Fixed recipe system in LabManager to use Screeps constants instead of string literals
- Fixed engagement double-counting in CombatManager for hybrid attack/ranged creeps
- Fixed squad ID generation to prevent collisions using member composition hash
- Fixed boost array mutation during iteration in LabManager
- Optimized TerminalManager to avoid redundant room.find() calls
0.14.0 – 2025-11-07 (changelog)
- Modular Build Documentation and Validation (#506)
- Updated modular deployment documentation to accurately reflect ES2018 target (was incorrectly documented as ES2021)
- Expanded module list documentation to include all 15 generated modules (behavior, bootstrap, defense, evaluation, infrastructure, memory, metrics, planning, respawn, scouting, tasks, types, utils, visuals)
- Updated deployment size estimates to reflect actual builds (~95KB single bundle vs ~384KB modular)
- Added build-time validation to verify expected artifacts are generated
- Validation ensures
main.jsis always present and all runtime modules are generated in modular builds - ES2018 target compliance regression test now passes with complete modular build validation
- Root cause: Documentation was outdated and lacked validation to catch missing artifacts during builds
0.12.0 – 2025-11-06 (changelog)
- Comprehensive Memory Management and Migration System (#490)
- Implemented
MemoryGarbageCollectorfor automated cleanup of stale data - Removes orphaned room data from inactive/abandoned rooms with configurable retention (default: 10000 ticks)
- Rotates old system evaluation reports to prevent memory bloat (default: 500 ticks retention)
- Incremental cleanup with CPU throttling via
maxCleanupPerTickparameter (default: 10 items/tick) - Runs every 10 ticks by default, can be disabled via kernel config
- Implemented
MemoryMigrationManagerfor schema versioning and safe migrations - Adds
Memory.versionfield for tracking schema version - Migration registry system for version-specific upgrade handlers
- Automated migration execution on version changes with error handling
- Memory integrity validation after migrations
- Built-in migration for version tracking initialization
- Implemented
MemoryUtilizationMonitorfor memory usage tracking and overflow prevention - Real-time memory usage measurement with per-subsystem breakdown
- Configurable warning (default: 70%) and critical (default: 90%) thresholds
- Allocation capacity checks via
canAllocate()method - Memory budgeting system for subsystems via
getBudget()method - Human-readable byte formatting for monitoring output
- Integrated memory management into
Kernelorchestration - Migrations run automatically on version changes
- Garbage collection runs every 10 ticks (configurable)
- Memory utilization measured and passed to evaluation system
- Enhanced
SystemEvaluatorwith memory health monitoring - Memory utilization findings with warning/critical severity levels
- Reports largest memory-consuming subsystems in critical alerts
- Recommendations for garbage collection and retention tuning
- Added comprehensive test coverage: 22 new unit tests covering all components
- Created detailed documentation in
docs/runtime/memory-management.md - Architecture overview and component descriptions
- Configuration options and usage examples
- Integration patterns with kernel and evaluator
- Best practices for GC, migrations, and optimization
- Troubleshooting guide and performance considerations
- Memory management system designed for minimal CPU overhead (~0.5-2 CPU per GC cycle)
- Supports configurable retention policies for different data types
- All 231 unit tests pass, build successful, linter clean
0.11.3 – 2025-11-06 (changelog)
- Resolved ReferenceError: process is not defined in Screeps runtime (#488)
- Updated esbuild configuration in
scripts/buildProject.tsto defineprocess.env.TASK_SYSTEM_ENABLEDandprocess.env.ROOM_VISUALS_ENABLEDat build time - Environment variables are now replaced with literal values during bundling, eliminating runtime dependency on Node.js
processglobal - Added regression test
tests/regression/nodejs-globals-bundle.test.tsto prevent Node.js global contamination in future builds - Validates that bundled code contains no
process.env,processobject access,require()calls,__dirname, or__filenamereferences - Fixes critical runtime error that blocked all bot execution in Screeps sandbox environment
- Environment variables default to
"false"if not set, can be enabled by settingTASK_SYSTEM_ENABLED=trueorROOM_VISUALS_ENABLED=trueduring build - Memory-based feature flags (
Memory.experimentalFeatures) remain functional in Screeps runtime
0.8.0 – 2025-11-06 (changelog)
- Migrated pre-commit hook to use ESLint flat config and removed 34 unused eslint-disable directives
- Updated
.husky/pre-committo use ESLint flat config (eslint.config.mjs) instead of deprecated.eslintrc.cjs - Removed
export ESLINT_USE_FLAT_CONFIG=falsefrom pre-commit hook to enable flat config usage - Removed 34 unused
eslint-disabledirectives across 7 files (3 scripts, 4 test files) - Scripts:
fetch-console-telemetry.ts,fetch-profiler-console.ts,fetch-resilient-telemetry.ts - Test files:
resilient-monitoring.test.ts,basePlanner.test.ts,constructionManager.test.ts,profiler.test.ts - Directives were marked as unused by flat config which doesn’t apply strict type-checking rules to tests/scripts
- Old
.eslintrc.cjsconfig applied strict rules everywhere, making directives appear necessary - Flat config (
.eslintrc.mjs) applies type-checking rules only tosrc/**/*.tsfor better performance - Improves code readability and maintainability by removing unnecessary ESLint pragmas
- All tests pass after cleanup, confirming no functional impact
- Addresses consistency between lint configuration and pre-commit validation
- Workflow concurrency controls for race condition prevention
- Added concurrency controls to 20 GitHub Actions workflows that previously lacked them
- Guard workflows (10 files): Use per-workflow-ref grouping with
cancel-in-progress: trueto optimize PR validation - Copilot workflows (7 files): Use workflow-specific concurrency groups with
cancel-in-progress: falseto prevent agent conflicts - Monitoring workflows (2 files): Use workflow-level concurrency with
cancel-in-progress: falseto prevent overlapping runs - Singleton workflows (2 files): Use workflow-level concurrency with
cancel-in-progress: truefor safety - Created comprehensive regression test
tests/regression/workflow-concurrency.test.tsto validate all workflows have proper concurrency controls - Prevents race conditions in guard workflow runs when multiple commits are pushed rapidly
- Eliminates resource waste from stale workflow runs continuing after force-push
- Prevents multiple Copilot agents from working on the same issue simultaneously
- Prevents monitoring workflow overlaps that could cause API rate limit issues
- Addresses ralphschuler/.screeps-gpt#50 and provides detailed implementation for concurrency control requirements
- Enhanced pre-commit hook with regression and coverage tests
- Added
test:regressionto pre-commit hook to enforce regression test execution before commits - Added
test:coverageto pre-commit hook to enforce coverage checks before commits - Ensures all quality gates are enforced for agent commits, preventing regressions and coverage drops
- Addresses issue #469 - Make sure to include the regression and coverage tests into the pre-commit hook
- Regression test alignment with workflow versions
- Updated
tests/regression/post-merge-workflow-git-race-condition.test.tsto expectgit-auto-commit-action@v7instead ofv5 - Aligns test expectations with actual workflow configuration in
.github/workflows/post-merge-release.yml - Test isolation for build-dependent regression tests
- Made
modular-build.test.tsandes2018-target.test.tsrun sequentially to prevent race conditions - Added file-based locking mechanism to prevent parallel execution across test files
- Prevents parallel test execution from interfering with shared dist directory during builds
- Uses exponential backoff for lock acquisition to handle race conditions gracefully
- Phase 1 Foundation Features
- Added
PixelGeneratorclass for automatic pixel generation when CPU bucket is full (default: 10000) - Implemented
Loggerutility with structured logging, timestamps, and log levels (debug, info, warn, error) - Added child logger support for contextual logging
- Created unit tests for
PixelGeneratorvalidating deterministic output and bucket threshold logic - Created unit tests for
Loggervalidating log levels, timestamps, context, and child logger functionality - Created unit tests for memory bootstrapping validating memory initialization and reset behavior
- Created regression test for extension placement at RCL 1-2 validating bunker layout pattern
- Integrated
PixelGeneratorinto Kernel for automatic pixel generation on each tick - All new features include TSDoc comments for exported functions and classes
- Addresses Phase 1 requirements: pixel generation, structured logging, memory tests, extension placement tests
- Codex composite action for automation workflows
- Added
.github/actions/codex-execas a drop-in replacement forcopilot-exec - Wraps the official
openai/codex-action@v1with repository-specific caching and prompt rendering - Maintains existing inputs/outputs while renaming the token parameter to
codex-tokenfor clarity - CPU timeout incident tracking documentation
- Created centralized incident tracking document in
docs/operations/cpu-timeout-incidents.md - Documents systematic CPU timeout pattern on shard3 (6 incidents spanning 2025-10-26 to 2025-10-27)
- Added Incident #6 (2025-10-27 03:38 UTC) at main:872:22 continuing systematic timeout pattern
- Updated temporal pattern analysis showing pattern continuation across two days
- Updated systematic indicators showing ongoing degradation despite CPU optimization efforts
- Integrates with existing systematic resolution framework (#396, #417, #380, #391)
- References architectural prevention solutions (#364, #392, #299)
- Documents infrastructure dependencies (#428, #420 - PTR telemetry blackout)
- Provides coordination approach for systematic resolution vs individual tactical fixes
- Tracks incident patterns, temporal distribution, and location analysis
- Documents monitoring integration with PTR telemetry and runtime evaluation
- Establishes acceptance criteria for incident documentation and systematic resolution
- Addresses Incident #6 - CPU timeout at main:872:22 on shard3 requiring systematic coordination
- Enhanced copilot-ci-autofix workflow effectiveness
- Added comprehensive failure classification system with 6 automatic fix categories and 5 manual review categories
- Improved error context gathering with full log downloads, error indicator extraction, and related failure analysis
- Implemented specialized fix strategies for each failure type (linting, formatting, version sync, dependencies, documentation, compilation)
- Enhanced workflow configuration with 45-minute timeout and verbose logging for better debugging
- Expanded JSON output format with failure_type, fix_strategy, validation_commands, and files_changed fields for metrics tracking
- Added explicit escalation criteria for complex failures requiring manual review (test logic errors, security issues, performance regressions)
- Updated documentation in
docs/automation/overview.mdwith detailed autofix workflow improvements - Created comprehensive regression test suite (
tests/regression/ci-autofix-improvements.test.ts) validating all enhancements - Addresses issue #132 - Review and improve copilot-ci-autofix workflow effectiveness
0.7.27 – 2025-10-26 (changelog)
- Performance optimization documentation
- Created comprehensive performance optimization guide in
docs/operations/performance-optimization.md - Documented CPU optimization strategies including budget management, early termination, and caching patterns
- Added memory management best practices covering cleanup, efficient data structures, and memory hygiene
- Included pathfinding optimization techniques with reusePath values and cached pathfinding patterns
- Documented profiling and monitoring approaches using existing PerformanceTracker, StatsCollector, and SystemEvaluator
- Provided performance patterns and anti-patterns with code examples
- Referenced integration with PTR monitoring infrastructure (#117, #299, #287)
- Added links to existing regression tests for performance validation
0.7.25 – 2025-10-26 (changelog)
- CPU optimization to maintain below 90% threshold
- Reduced default CPU safety margin in BehaviorController from 90% to 80% for earlier creep processing cutoff
- Reduced per-creep CPU threshold from 2.0 to 1.5 CPU to detect expensive operations earlier
- Lowered PerformanceTracker warning threshold from 80% to 70% CPU usage
- Lowered PerformanceTracker critical threshold from 95% to 90% CPU usage
- Reduced Kernel emergency CPU threshold from 95% to 90%
- Increased movement reusePath values from 5-20 ticks to 30-50 ticks to reduce pathfinding overhead
- Added regression test suite to validate CPU optimization thresholds and prevent future performance degradation
- These changes significantly reduce CPU consumption by minimizing expensive pathfinding operations
0.7.19 – 2025-10-25 (changelog)
- Deploy workflow trigger mechanism (run #18800751206)
- Updated deploy workflow to use
workflow_runevents instead ofreleaseevents - Fixed version resolution logic to use
git describe --tags --abbrev=0for workflow_run triggers - Improved conditional logic to handle both workflow_run and workflow_dispatch events properly
- Resolves regression tests expecting modernized CI/CD integration with Post Merge Release workflow
0.7.13 – 2025-10-25 (changelog)
- Regression test failure for copilot-exec force-response parameter (run #18795077062)
- Updated test to use correct workflow filenames after monitoring workflow consolidation
- Changed
screeps-stats-monitor.ymltoscreeps-monitoring.ymlin test expectations - Removed reference to deleted
copilot-autonomous-monitor.ymlworkflow - Test now correctly validates backward compatibility for force-response parameter
0.7.11 – 2025-10-24 (changelog)
- Consolidated monitoring workflows for improved efficiency
- Merged
copilot-autonomous-monitor.ymlandscreeps-stats-monitor.ymlinto singlescreeps-monitoring.ymlworkflow - Combines autonomous strategic monitoring with PTR telemetry analysis in unified execution
- Reduces workflow overhead from two parallel runs to one consolidated run every 30 minutes
- Maintains all existing functionality: MCP server integration, PTR anomaly detection, strategic analysis, push notifications
- Updated all documentation references to reflect consolidation
- Updated
copilot-ci-autofix.ymlworkflow trigger list - Created unified prompt template
.github/copilot/prompts/screeps-monitorwith 7-phase analysis pipeline - Post Merge Release workflow permission error (run #18794330724)
- Excluded workflow files from prettier formatting in .prettierignore
- Resolves GitHub rejection when pushing commits after workflows:write permission was removed
- Prevents workflow file modifications during automated release process
- Maintains security by avoiding workflows:write permission requirement
- TypeScript type safety violations in fetch-screeps-stats test (run #18793984308)
- Removed unnecessary eslint-disable comments that weren’t effective
- Added proper TypeScript types to vitest mocks using
ReturnType<typeof vi.fn> - Replaced
(global.fetch as any)patterns with properly typedmockFetchvariable - Added type assertions for mock.calls access patterns with explicit types like
[string, RequestInit] - Used optional chaining for safer header access in assertions
- Resolves linting failures that were blocking post-merge release workflow
0.7.1 – 2025-10-24 (changelog)
- Incremental changelog management for version releases
- Added
releaseVersion()function toscripts/lib/changelog.tsfor moving unreleased changes to version sections - Created
scripts/release-changelog.tsCLI script to update CHANGELOG.md during version releases - Updated
.github/workflows/post-merge-release.ymlto automatically move unreleased changes to new version sections - Each version now contains only changes since the previous version (follows Keep a Changelog principles)
- [Unreleased] section is automatically cleared after each version release
- Added comprehensive unit tests (5 test cases) for changelog release functionality
- Addresses issue: chore: implement incremental changelog management for version releases
- TypeScript lint compliance: Removed unsafe
anyusage in automation scripts and tests - Added a typed Screeps raw API wrapper and stricter spawn placement flow in
scripts/screeps-autospawn.ts - Declared a typed global Hexo reference for plugin loading and tightened test doubles to avoid unbound methods
- Hardened mockup integration tests and helpers to dynamically import
screeps-server-mockupwithoutanycasts - Hexo Documentation Build: Fixed markdown renderer loading in Hexo build script
- Added proper plugin loading mechanism using global hexo variable for hexo-renderer-marked
- Ensures markdown files are rendered to HTML instead of staying as .md files
- Fixes documentation site deployment generating raw markdown files instead of HTML
- Fixes run ID: 18781158449
- Screeps Spawn Monitor Shard Parsing: Fixed shard/room parsing in autospawn script API calls
- Parse shard name and room name from format “shard3/E45S25” for terrain and spawn placement API calls
- Pass shard parameter correctly to
roomTerrain()andplaceSpawn()API methods - Fixes “Failed to get room terrain” error when spawn placement tries to analyze multi-shard rooms
- Fixes run ID: 18780039750
- Screeps Spawn Monitor API Failure: Fixed terrain API method call in autospawn script
- Use correct
api.raw.game.roomTerrain(roomName, 1)instead of invalidapi.raw.game["room-terrain"]({ room, shard }) - Removed unused shard parsing logic that was unnecessary for working API call
- Fixes “api.raw.game.room-terrain is not a function” error
- Fixes run ID: 18779690172
- Screeps Spawn Monitor API Failure: Fixed incorrect API call for room terrain on sharded servers
- Fixed screeps-api call to use correct room-terrain endpoint with proper shard parameter
- Parse shard from room name format (shard3/E45S25) instead of passing invalid parameters
- Resolves “Failed to get room terrain” error in autospawn workflow
- Fixes run ID: 18779519651
- Documentation Site Build Failure: Fixed duplicate dependencies in package.json causing lockfile conflicts in CI
- Removed duplicate
tsxandmarkedentries from dependencies section (keeping them in devDependencies) - Updated bun.lock to reflect proper dependency resolution
- Fixes run ID: 18777257201
- Daily Autonomous Bot Monitoring workflow
- Created
.github/workflows/copilot-autonomous-monitor.ymlscheduled daily at 06:00 UTC - Comprehensive strategic analysis combining bot performance and repository health
- Six-phase analysis pipeline: authentication, bot performance, repository health, strategic decisions, issue management, strategic reporting
- MCP server integration via
.github/mcp/screeps-mcp.jsonfor bot console access using@ralphschuler/screeps-api-mcp - Direct Screeps console interaction for analyzing spawning, CPU, energy, RCL, defense, and strategic execution
- GitHub repository analysis for codebase quality, automation effectiveness, and development velocity
- Intelligent autonomous issue creation/update/close with evidence-based recommendations (up to 10 issues per run)
- Bot health scoring (0-100) with top priorities and strategic recommendations
- Safety controls: read-only by default, rate limiting (daily schedule, max 5 console commands per phase), prohibited destructive actions
- Comprehensive documentation in
docs/automation/autonomous-monitoring.mdwith architecture, usage, troubleshooting, and best practices - Updated
README.mdto include Autonomous Monitor Agent in agent types list - Addresses issue ralphschuler/.screeps-gpt#239 (autonomous monitoring and strategic automation)
- Documentation restructuring for improved navigation
- Created comprehensive
docs/getting-started.mdwith detailed setup instructions, prerequisites, development commands, runtime architecture, and contributing workflow - Refactored
README.mdto focus on concise project overview emphasizing Copilot agent swarm concept - Added clear description of Screeps GPT as autonomous AI playground where multiple GitHub Copilot agents collaboratively develop a Screeps bot
- Documented system architecture with three integrated layers: Runtime AI, Development Infrastructure, and AI Agent Orchestration
- Included key features section highlighting autonomous agent swarm, CI/CD, self-evaluation, and documentation-first approach
- Organized documentation links into categorized sections: Core, Technical, Monitoring & Operations, and Strategy & Development
- Improved onboarding experience with clear navigation from README to detailed documentation
- Addresses issue ralphschuler/.screeps-gpt#[issue_number] (documentation restructuring)
- Docker containerization for development, testing, and building
- Created
Dockerfile.testwith Node.js 20 + Python 2 for running test suites - Created
Dockerfile.buildwith Node.js 20 for building the Screeps AI - Created
Dockerfile.mockupwith Node.js 16 + Python 2 for screeps-server-mockup compatibility - Added
docker-compose.ymlorchestrating dev, test, build, lint, and format services - Added
.dockerignoreto optimize Docker build context - Added Docker commands to package.json:
docker:test:unit,docker:test:e2e,docker:test:mockup,docker:build:ai,docker:lint,docker:format,docker:dev,docker:shell - Created comprehensive Docker Development Guide at
docs/operations/docker-guide.md - Updated README.md with Docker prerequisites, commands table, and contributing workflow
- Provides isolated, reproducible development environments without local Node.js/Python installation
- Enables simultaneous support for Node.js 20 (testing/building) and Node.js 16 (mockup tests)
- Addresses issues #188 (Node.js migration), #204 (Bun integration), #200 (act CLI consistency)
- Builder and remote miner creep roles
- Registered new role definitions in the behavior controller with dedicated state machines and spawn configurations
- Extended runtime types/memory helpers to track remote assignments deterministically
- Added unit, e2e, and regression tests covering spawn logic plus travel/mine/return transitions
- Documented strategy updates in
docs/runtime/strategy/creep-roles.mdanddocs/runtime/strategy/scaling-strategies.md - Deterministic creep naming in BehaviorController
- Replaced
Math.random()with memory-persisted counter for creep name generation - Ensures deterministic AI behavior for reliable testing and debugging
- Creep names now follow pattern:
{role}-{game.time}-{counter}(e.g.,harvester-100-0) - Documented the deterministic spawn naming scheme in
docs/runtime/strategy/creep-roles.mdso monitoring agents can trace counter resets - Added unit tests verifying deterministic naming behavior across test runs
- Added regression test to prevent future
Math.random()usage in runtime code - Resolves issue #174 and aligns with repository coding standards for deterministic runtime
- Improves testing reliability and debugging consistency for autonomous AI validation
- Documented Bun-first workflow and Node.js 18–22 support window
- Updated README.md, AGENTS.md, DOCS.md, and docs/index.md to highlight Bun commands and supported Node versions.
- Verified
package.jsonengines and scripts align with the documented workflow. - Updated script messaging to reference
bun run versions:updatewhere applicable. - Updated package dependencies while maintaining Node.js 16 compatibility
- Updated
semverfrom 7.6.2 to 7.7.3 to address ReDoS security vulnerability (GHSA-c2qf-rxjj-qqgw) - Verified all build, lint, and test pipelines function correctly after update (66 tests passing)
- Maintained Node.js 16.x compatibility as required by package.json engines field
- Created comprehensive security assessment document at
docs/security/dependency-vulnerabilities.md - Documented remaining 48 vulnerabilities: 79% are in optional testing dependencies, not production
- Verified production bundle excludes all vulnerable dependencies (axios, lodash, angular, etc.)
- Remaining vulnerabilities are acceptable risks per security assessment
- Simplified Copilot model configuration
- Removed
.github/copilot/model-config.jsonfile - Updated
copilot-execaction to only pass--modelflag when a model is explicitly specified - Model resolution now: input parameter → COPILOT_MODEL env var → Copilot CLI default
- When no model is specified, Copilot CLI uses its own default model selection
- Updated documentation in README.md and docs/automation/overview.md
- Fixed Vitest CI failure in Node.js 16 environment (run 18742323437)
- Improved
crypto.getRandomValues()polyfill intests/setup.tsto userandomBytes()instead ofwebcrypto - Fixes Vitest startup error: “TypeError: crypto.getRandomValues is not a function”
- Resolves post-merge-release workflow failures where husky pre-commit hook failed during version bump
- Maintains Node.js 16.x compatibility as required by package.json engines field
- Node.js 16 doesn’t include Web Crypto API, but it’s required by Vite/Vitest
- Uses Node.js built-in
randomBytes()to implement the crypto polyfill - Ensures all test suites run successfully in CI workflows using Node.js 16
- Node.js 16 compatibility for lint-staged in CI workflows
- Downgraded
lint-stagedfrom v16.2.5 to v13.3.0 to maintain Node.js 16.14.0+ compatibility - Fixes
post-merge-release.ymlworkflow failure caused bynano-spawn@2.0.0dependency requiring Node.js 17+ (node:readline/promises) - Repository continues to use Node.js 16.x for native dependency compatibility (Python 2 requirement)
- Removed unused
@typescript-eslint/no-unsafe-returnESLint disable directive intests/mockup/setup.ts - Verified no other dependencies have Node.js version incompatibilities
- Push notification system for repository and Screeps bot monitoring
- Integrated Push by Techulus API for real-time alerts on critical events
- Created
scripts/send-push-notification.tswith rate limiting and error handling - Added composite action
.github/actions/send-push-notificationfor workflow integration - Implemented notifications in deploy workflow (success/failure alerts)
- Implemented notifications in quality-gate workflow (build failure alerts)
- Implemented PTR monitoring alerts via
scripts/check-ptr-alerts.ts - Added automated notifications for high CPU usage (>80% sustained), critical CPU (>95%), and low energy
- Created comprehensive documentation at
docs/automation/push-notifications.md - Added unit tests for notification utility with 100% coverage
- Rate limiting: 5 second minimum interval, max 10 notifications per minute
- Graceful degradation: notification failures never break workflows
- Secure implementation: PUSH_TOKEN stored as GitHub secret, no sensitive data in notifications
- Complements existing email notification system (#134)
- Integrates with PTR monitoring infrastructure (#152, #117)
- ESLint flat config migration with Node 16 structuredClone polyfill (#156)
- Migrated from deprecated
.eslintrc.cjsto moderneslint.config.mjsflat configuration format - Added
.eslintrc-polyfill.cjsto providestructuredCloneimplementation for Node.js 16.x compatibility - Updated npm lint scripts to use flat config (removed
ESLINT_USE_FLAT_CONFIG=false) - Updated lint-staged configuration to use simplified ESLint commands
- Preserved all existing ESLint rules and TypeScript plugin configurations
- Resolves ESLint deprecation warnings for v10.0.0 preparation
- Fixes
ReferenceError: structuredClone is not definedwhen running ESLint with @typescript-eslint v8+ on Node 16 - Configurable Copilot model selection (#146)
- Removed hardcoded
gpt-5default from copilot-exec action - Created centralized model configuration file (
.github/copilot/model-config.json) with defaultgpt-4.1 - Implemented priority-based model resolution: input parameter → COPILOT_MODEL env var → config file → hardcoded default
- Added model validation and logging to copilot-exec composite action
- Updated documentation (README.md, docs/automation/overview.md) with configuration examples
- Supports repository-level and workflow-level model overrides via environment variables
- Maintains backward compatibility with explicit model parameters in workflows
- Copilot exec pre-checkout + dependency caching optimisation (#101)
- Added detection & conditional checkout to composite action (skips if .git present)
- Implemented node_modules cache keyed by OS + package-lock.json hash with restore keys fallback
- Added conditional npm ci install only on cache miss and when package.json exists
- Added total duration metric step for performance tracking
- Backward compatible: existing workflows need no changes
- Standardized label system with state, type, and priority categories (#138)
- Implemented three-tier labeling system for improved issue and PR management
- Added state labels:
state/pending,state/backlog,state/in-progress,state/blocked,state/canceled,state/done - Added type labels:
type/bug,type/feature,type/enhancement,type/chore,type/question - Added priority labels:
priority/critical,priority/high,priority/medium,priority/low,priority/none - Added workflow labels:
good-first-issue,help-wanted,wontfix,duplicate,invalid - Preserved existing domain labels (automation, runtime, documentation, monitoring, dependencies, regression)
- Preserved process labels (Todo, monitoring, copilot, needs/regression-test)
- Updated all issue templates to use new label structure
- Updated all copilot prompts to use new labels (issue-triage, stats-analysis, repository-audit, ci-autofix, email-triage)
- Updated documentation (README.md, AGENTS.md, copilot-instructions.md) with comprehensive label guidance
- Created comprehensive label system guide at
docs/automation/label-system.md - Maintained backward compatibility by keeping deprecated labels (bug, enhancement, severity/*) marked as deprecated
- Modernized CI/CD deployment workflow to use standard GitHub DevOps practices (#126)
- Replaced manual release PR creation with automated semantic versioning based on conventional commits
- Post-merge workflow now commits version bumps directly to main instead of creating release branches and PRs
- Implemented semantic version bumping:
feat:→ minor,fix:/chore:→ patch,BREAKING CHANGE:→ major - GitHub Releases are now created automatically using GitHub’s native API with auto-generated release notes
- Deploy workflow now uses GitHub’s
productionenvironment for deployment protection and tracking - Deploy workflow triggers on both version tags and GitHub Release published events
- Removed
workflow_runtrigger complexity in favor of native release events - Added
version:bump-semanticnpm script andscripts/bump-version-semantic.tsfor semantic versioning - Updated documentation in README.md and docs/automation/overview.md to reflect new CI/CD workflow
- Fixed vitest dependency conflict in Deploy Screeps AI workflow by upgrading @vitest/coverage-v8 from ^0.33.0 to ^3.2.4 for compatibility with vitest ^3.2.4 (workflow run: 18705052117)
- Fixed email triage workflow not creating issues by removing contradictory JSON formatting in prompt template (#115)
- Fixed CI failure in
npm run versions:updateby adding missing trailing newline todocs/changelog/versions.md(regression test:tests/regression/versions-file-trailing-newline.test.ts, workflow run: 18703566323) - Fixed git push conflict in post-merge release workflow by adding remote ref updates before commit operations (regression test:
tests/regression/post-merge-workflow-git-race-condition.test.ts, workflow run: 18703919715) - Fixed automatic Todo label assignment in issue triage by removing Todo from automatic labeling per issue #78 to prevent unwanted automation triggers
- Specialized PR templates for Copilot automation workflows (#130)
- Created
.github/PULL_REQUEST_TEMPLATE/copilot-todo.mdfor Todo workflow PRs with automation-specific checklists - Created
.github/PULL_REQUEST_TEMPLATE/copilot-quickfix.mdfor CI autofix PRs with validation-focused content - Templates reduce cognitive load by removing irrelevant manual checklist items
- Improved reviewer guidance specific to Copilot-generated changes
- Maintained quality standards while tailoring context to automated change types
- Ready workflow integration (requires manual application due to workflow permission constraints)
- Enhanced Copilot prompt templates with action enforcement rules (#127)
- Added mandatory action requirements with explicit “MUST” criteria for all workflows
- Implemented comprehensive failure handling for GitHub API issues, missing data, and timeout conditions
- Added explicit output quality requirements and validation criteria
- Included actionable finding criteria and severity assessment guidelines
- Added pre/post-execution validation steps for all automated operations
- Standardized prompt template naming and structure
- Renamed
todo-issue→todo-automationfor consistency with workflow purpose - Renamed
repository-audit→repository-reviewfor clarity - Updated corresponding workflow files to reference new prompt paths
- Enhanced action appropriateness criteria
- Added explicit guidelines for when automatic fixes are appropriate vs. manual intervention required
- Implemented quality gates preventing inappropriate automation of complex issues
- Added concrete thresholds and examples for anomaly detection and severity assessment
- Comprehensive prompt template audit documentation in
docs/automation/prompt-audit.md - Detailed analysis of existing templates with strengths and gaps identified
- Enhancement framework and recommendations for consistent action enforcement
- Impact assessment and validation requirements for template changes
- Created
.github/copilot-instructions.mdwith repository-specific guidelines for GitHub Copilot coding agent - Includes coding standards, development workflow, testing expectations, and documentation requirements
- References comprehensive documentation in AGENTS.md, README.md, and docs/ for detailed guidance
- Integrated Screeps API MCP server with GitHub Copilot workflows for direct Screeps server interaction
- Integrated Playwright MCP server for browser automation capabilities
- Added MCP server configuration files:
.github/mcp/screeps-api.jsonand.github/mcp/playwright.json - Enhanced
copilot-execaction to support multiple MCP servers viaadditional-mcp-configparameter - Added comprehensive MCP server documentation in
AGENTS.mdanddocs/automation/overview.md - Implemented a basic Screeps runtime with headcount-based spawning and simple harvester/upgrader state machines
- Migrated from pnpm to npm as the package manager
- Updated all workflow files to use npm instead of pnpm
- Updated documentation to reference npm commands
- Added .nvmrc file to specify Node.js 16.20.2
- Updated package.json to remove pnpm references and specify npm in engines
- Copilot CI AutoFix workflow now monitors all workflow failures (except itself) instead of only Quality Gate failures, enabling automated fixes for any CI failure
- Updated
screeps-stats-monitor.ymlto use Screeps API MCP server for direct telemetry access - Enhanced
.github/copilot/prompts/stats-analysisto document available MCP servers - Updated README.md secrets documentation to include MCP authentication variables
- Enhanced Copilot Todo automation workflow to create draft pull requests immediately and show visible implementation progress
- Draft PRs are created at the start of the automation process for transparency
- Implementation progress is shown through frequent commits and PR description updates using the
report_progresstool - Users can follow along with the implementation in real-time
- PRs are marked as ready for review only after all validation passes
- Updated
.github/copilot/prompts/todo-issuewith new draft PR workflow - Updated documentation in
README.md,docs/automation/overview.md, andAGENTS.md - Fixed build error caused by node-gyp attempting to use Python 2 syntax with Python 3
- Moved
@screeps/common,@screeps/driver,@screeps/engine, andscreeps-server-mockuppackages tooptionalDependenciesto allow installation to succeed even when native modules fail to build - Added
.npmrcto configure build behavior for optional dependencies - Mockup tests now gracefully skip when isolated-vm build fails (as documented in tests/mockup/README.md)
- Fixed post-merge workflow recursive execution by adding condition to skip when release PRs are merged back to main
- Fixed deployment workflow not triggering by adding
workflow_runtrigger to chain deployment after successful release preparation - Simplified tag creation in post-merge workflow from GitHub API to git commands for clarity
- Deploy workflow now falls back to latest version tag when no tag exists on triggering commit (resolves workflow run 18701965424)
- Fixed deployment failure with empty environment variables - Changed deploy script to use
||instead of??operator so empty string secrets default to proper Screeps API values (resolves workflow run 18702433741)
0.1.0 – 2024-06-01 (changelog)
- Added a curated
docs/knowledge base and updated automation guidance so every fix documents findings and regression coverage. - Extended the shared
copilot-execaction to support GitHub MCP configuration and fuel new prompt templates for stats analysis and CI auto-fixes. - Introduced scheduled Screeps stats monitoring, label synchronisation, and Copilot-driven CI auto-fix workflows with supporting scripts and prompts.
- Added a curated