refactor: make zero swarm the sole cognition architecture - #65
Merged
Merged
Conversation
christopherjnelson
marked this pull request as ready for review
September 21, 2026 12:28
This was referenced Sep 22, 2026
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>
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.
Summary
Architecture
The sole runtime flow is now:
Historical exports retain retired cognition and decision-contract attribution through read-only archive fields. They cannot re-enable the removed runtime.
Validation
pnpm validatepnpm test:e2e(2/2)git diff --checkScope
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.