Skip to content

refactor: make zero swarm the sole cognition architecture - #65

Merged
christopherjnelson merged 1 commit into
mainfrom
refactor/zero-swarm-sole-runtime
Sep 21, 2026
Merged

christopherjnelson merged 1 commit into
mainfrom
refactor/zero-swarm-sole-runtime

Conversation

@christopherjnelson

Copy link
Copy Markdown
Member

Summary

  • make Zero swarm the only executable cognition architecture
  • remove the legacy per-agent provider, dispatcher, flat decision contracts, retry/skip paths, and legacy smoke tooling
  • replace the cognition selector with fixed swarm architecture provenance
  • keep deterministic worker selection as the explicit ablation seam
  • update World Lab, comparison tooling, exports, archive compatibility, and E2E coverage for swarm-native execution

Architecture

The sole runtime flow is now:

  1. advance simulated-player pressure
  2. determine whether Agent Zero must replan
  3. plan or reuse structured worker directives
  4. run Jev or deterministic worker candidate selection
  5. resolve physical actions through the deterministic engine
  6. commit the tick and safe provider telemetry atomically

Historical exports retain retired cognition and decision-contract attribution through read-only archive fields. They cannot re-enable the removed runtime.

Validation

  • pnpm validate
  • pnpm test:e2e (2/2)
  • git diff --check

Scope

This is PR 1 of the migration sequence. Social domain types and controls are removed in the following focused PRs; they no longer participate in executable cognition here.

Net change: approximately 17,650 lines removed.

@christopherjnelson
christopherjnelson marked this pull request as ready for review September 21, 2026 12:28
@christopherjnelson
christopherjnelson merged commit 210ae35 into main Sep 21, 2026
2 checks passed
christopherjnelson added a commit that referenced this pull request Sep 22, 2026
PRs 1-4 of the zero-swarm migration removed the legacy multi-agent
architecture from the code, but the documentation was never updated and had
drifted into describing a product that no longer exists: 212 references to
personalities, agent-to-agent communication, alliances and diplomacy, worker
goals, prose memories, the Behavior Trace, and the `text-flat-json-v8`
per-agent contract. The README opened by describing agents that "communicate
and conduct formal alliance diplomacy".

Rewrite the documentation set around the delivered architecture: one Agent Zero
planning call per tick under `swarm-planner-v1`, structured directives, and
TypeSafe Jev reflex workers over the deterministic H3 engine. Delete the
`Formal alliance state` section from the architecture doc, rewrite the tick
flow against the real `executeNextTick` sequence, and correct the API route
list, schema claims, and package descriptions.

Per ADR 0033, the retirement case is stated as structural rather than measured
throughout: the legacy path made one generative call per agent per tick, so
cost and latency scaled with roster size. No run in this repository has
compared the two architectures on real providers, and no doc claims otherwise.

Treat GAMEPLAY_FOUNDATION as the forward-looking design document it declares
itself to be, distinguishing current behavior, accepted future direction, and
removed features rather than deleting the design rationale. Alliances are
marked removed with their rationale preserved as history; whether they return
for a future Player Mode is left open for a dedicated ADR.

Also correct documentation that was stale before this migration: `docs/EXPERIMENT_ARCHIVE.md`
loses its in-file flag, the non-existent `patient-zero` CLI command, and
storage-schema prose predating migrations 4-6; the `pnpm smoke:openrouter`
command documented in the README and testing guide was removed in #65 and no
longer exists anywhere, so both now describe the real opt-in real-provider
paths. Several `#` headings that should have been `##` are fixed.

Update the AGENTS.md product boundaries, which still instructed agents that a
communication and a diplomacy intent may accompany a world action and that
formal alliances were a supported feature. Left unchanged, they would direct
future work to rebuild what this migration removed.

Record as known open work, owned by a follow-on PR: `calculateExperimentMetrics`
receives an empty resolved-action array so live metrics read zero, and the three
movement-direction metrics are never assigned.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant