refactor: remove legacy social agent systems - #66
Merged
christopherjnelson merged 1 commit intoSep 22, 2026
Merged
Conversation
Remove the social/cognition machinery that existed for the retired independent multi-agent architecture. Agent Zero plus Jev reflex workers over the deterministic H3 engine is now the only architecture, so the concepts these systems modelled no longer exist in the game. Removed domain machinery: - personalities, behavior/strategy profiles, and behavior assignment - agent-to-agent communication (public, direct, alliance, zero channels) - diplomacy, alliances, and alliance proposals - model-authored worker goals and prose worker memories - the legacy per-agent generative decision contract (agentDecisionSchema, providerDecisionEnvelopeSchema, AgentTurnRecord, export turn records) - observation history and the Behavior Trace panel - the legacy experiment import surface, including its `legacy` response field; pre-swarm exports now require an older revision to read World snapshots, scenarios, observations, metrics, exports, and the experiment archive drop the fields that carried those concepts. Capture and movement lose their alliance-specific branches: `allied-controller` is unreachable without alliances, so both action-reason enums and the move-option `controllerRelationship` enum shrink accordingly. Turn-shaped export counters go with the turn records they counted, and archive migration 6 drops the corresponding tables and columns. Renames NonCommunicationWorldEvent to PhysicalWorldEvent, which now describes what it is rather than what it is not. Physical worker identity is preserved: agents keep id, name, color, and position. Deterministic legality, simultaneous resolution, Zero planning, Jev candidate selection, pressure, captures, directive completion, attempt accounting, provider cost attribution, and export safety keep their test coverage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 2 of the zero-swarm migration. Follows #65 (
refactor: make zero swarm the sole cognition architecture).Removes the social/cognition machinery that existed for the retired independent multi-agent architecture. Agent Zero plus Jev reflex workers over the deterministic H3 engine is the only architecture now, so the concepts these systems modelled no longer exist in the game.
32 files changed, +943 / −13,185.
Removed
packages/shared/src/behavior.ts)agentDecisionSchema,providerDecisionEnvelopeSchema,AgentTurnRecord, export turn recordsObservationHistoryand the Behavior Trace panel/api/simulation/experiment/import,importModelConfiguration,experimentImport*Schemaincl. itslegacy: booleanfield)Consequential details
allied-controlleris unreachable without alliances, so it leaves both action-reason enums, and move-optioncontrollerRelationshipshrinks to['open','self','other'].matchingTurnCount,firstMatchingTurn,lastMatchingTurn,turnsWithUnknownCost) go with the turn records they counted. Export metrics now derive fromswarmTicks+providerAttempts.failures()was re-pointed from the deletedmodel_attemptstoprovider_attempts.NonCommunicationWorldEvent→PhysicalWorldEvent, which describes what it is rather than what it is not.Preserved
Physical worker identity (id, name, color, position), infection, capture, the deterministic engine, Agent Zero, Jev, provider accounting, swarm telemetry, safe exports, and the swarm-useful archive surface. Test coverage retained for deterministic legality, simultaneous resolution, Zero planning, Jev candidate selection, pressure, captures, directive completion, attempt accounting, provider cost attribution, and export safety.
Validation
pnpm validate→ pass (format, lint, typecheck, test, build).pnpm test:e2e→ 2/2 pass. 222 tests across 26 files.Known follow-ups (not in this PR)
world-lab.tsxstill hasconst swarmMode = truewith dead!swarmModebranches (44 refs) — PR 4's headline item.archivedAppliedScenarioSchemaretainshistoricalCognitionMode/historicalDecisionContractVersionincl. the stringlegacy-multi-agent— PR 3.simulation-service.tspasses[]tocalculateExperimentMetrics, so live World Lab metrics read zero. Pre-existing, butswarmTicksnow makes real data available.movementDirectionDistribution/longestRepeatedDirectionStreak/recentCellRevisitsare always zero; direction is no longer recoverable without afromCell→toCellhelper.🤖 Generated with Claude Code