(Adaptive Loop) Initial Plan

This commit is contained in:
AlexKucera committed 2026-08-12 17:15:18 +02:00
1 parent 2316e4ac39
commit 6c2eef0019
7 files changed
+1096

No files matched your search

@@ -0,0 +1,40 @@
---
name: deterministic-game-core
description: Build and verify deterministic turn-based game simulations with pure transitions, exact previews, replayable state, and vertical behavior tests.
---
# Deterministic Game Core
## When to Use
Use when implementing or changing Adaptive Loop's simulation, scenario rules, previews, saves, replays, or win/lose logic.
## Procedure
1. Keep the domain model serializable and independent of rendering.
2. Route every committed action through one pure transition: `nextState(state, action)`.
3. Generate previews by calling the same transition on cloned state. Never maintain separate forecast rules.
4. Resolve each turn in a fixed documented order: chamber rotation → channel reconnection/flow → consumption and growth → biological interactions → migration → adaptation → environmental advance → objective/collapse evaluation.
5. Test vertical behavior through public seams. Use worked states and literal expected outcomes, not assertions that reimplement the production algorithm.
6. Cover at least: clockwise/counterclockwise loop rotation, overlapping-loop movement, flow direction, capped populations/resources, adaptation threshold, local trait activation, trait cost, species spillover, pressure-driven environment mutation, win, collapse, exact save/restore, preview/commit equality, and deterministic replay.
7. When a defect appears, search sibling actions and scenarios for the same failure class; fix the shared transition once.
8. Compare canonical domain state only: stable-key serialization or normalized deep equality must exclude timestamps, animation, focus, hover, and other transient UI state.
9. Scenario verification must replay one known winning and one known losing route per scenario and all reachable campaign inheritance combinations.
## Pitfalls
- No randomness unless seeded and serialized; prefer no randomness.
- No floating-point simulation where small capped integers suffice.
- No mutation of input state.
- No UI-owned game rules.
- No private-method or implementation-coupled tests.
- No snapshots whose expected value is generated by the same logic under test.
## Verification
- Identical canonical state plus action produces structurally identical canonical output and deterministic event attribution.
- Preview canonical output equals committed canonical output for every legal action in representative states.
- Saving and restoring preserves canonical state and the exact next transition.
- Replaying an action log from a scenario baseline plus inheritance snapshot reproduces final state and outcome.
- Each scenario has verified winning/losing routes; all reachable campaign inheritance combinations remain solvable.
@@ -0,0 +1,45 @@
---
name: game-ui-proof
description: Design and validate a distinctive, accessible browser-game interface whose mechanics read clearly in an uncut judging video.
---
# Game UI Proof
## When to Use
Use when designing, implementing, polishing, or validating Adaptive Loop's browser interface and gameplay recording path.
## Procedure
1. Treat the surface as an operational instrument: the board, legal actions, immediate consequences, objective, current pressure, and outcome must scan instantly.
2. Establish a specific visual world: dark laboratory glass, luminous culture chambers, crisp microfluidic channels, restrained biological motion, and four consistently encoded pressures. Avoid generic dashboard/card styling.
3. Render the interactive board as SVG with real buttons or keyboard-operable controls around it. Keep hit targets separate from decorative geometry.
4. Preview both chamber relocation and channel flow before commitment. Show exact population/resource deltas with symbols and text, not color alone.
5. Animate only to explain causality. Respect `prefers-reduced-motion` and provide immediate-state rendering when reduced motion is active.
6. Support keyboard navigation, visible focus, accessible names, semantic status/outcome announcements, sufficient contrast, and 200% zoom without loss of function.
7. Teach through scenario objectives and contextual labels, not a long modal tutorial.
8. Run one bounded visual QA pass at desktop and narrow viewport, fix defects in one batch, then confirm once and stop polishing.
## Pitfalls
- No downloaded or ripped commercial assets.
- No tiny unreadable labels, color-only species/pressure encoding, hidden hover-only rules, or canvas-only controls.
- No ornamental animation that obscures turn resolution.
- No claiming a mechanic in text unless it is visibly exercisable.
- No polishing before the full game floor works.
## Verification
Interact with the production build through public browser controls and capture evidence that one continuous take can show:
1. Start a campaign scenario.
2. Preview and commit a loop rotation.
3. Show movement and channel flow interacting.
4. Trigger an adaptation and expose its benefit, cost, and spillover.
5. Trigger a pressure-driven environmental change.
6. Lose by collapse and retry.
7. Win a scenario and preserve a lineage.
8. Save & Quit, close/reopen the page, and Continue exact state.
9. Show visible access to multiple scenarios.
Automated tests must prove all five scenarios and campaign victory. The recording does not need to play every scenario. Generate its short deterministic route from solver/browser-verified actions; never inject game state or localStorage.
@@ -0,0 +1,40 @@
---
name: pi-game-factory
description: Orchestrate a hands-off, one-prompt game build in Pi using vertical gates, one writer, independent review, and durable evidence.
---
# Pi Game Factory
## When to Use
Use for the Agentic Labs one-prompt challenge run. The parent owns scope, decisions, gates, and final acceptance. Subagents provide bounded implementation, review, and validation.
## Procedure
1. Create a todo list and keep exactly one task in progress.
2. Preflight legality: record the initial tree, reject unexpected code/history/generated artifacts, record effective provider/model, and create `CONTEXT-MANIFEST.md` covering all steering context, installed extension/package versions, and relevant configuration.
3. Record the current `PI_SESSION_FILE` path immediately. Verify it exists and begins with the initial Goal kickoff representing the sole human command. Never copy it live. At the end, report the canonical path plus a post-exit copy/parse/marker/hash command that distinguishes disclosed Goal continuations from human follow-ups.
4. Build vertically: runnable shell → complete scenario 1 → simulation truth tests → interacting adaptation systems → exact persistence → scenarios 2–5 → bounded polish → final audit.
5. Keep one writer for the active checkout. Parallelize only read-only review and validation.
6. Use Pi subagents through `workflowScript`. Give each task a concrete outcome, authority boundary, acceptance criteria, validation, and stop rule.
7. After each implementation milestone, run targeted checks. Launch fresh-context reviewers with distinct angles: correctness/determinism, user flow/accessibility, and simplicity/scope.
8. Synthesize findings. Send accepted fixes to one writer. Repeat broad review only while concrete defects remain, maximum three rounds. If a floor blocker remains, drop optional polish and allow one final focused repair/verification cycle.
9. Exercise the production browser game through public controls, not only tests. Verify start, rotation preview, committed resolution, adaptation benefit/cost/spillover, environmental response, win, collapse, retry, save, page close/reopen, exact Continue, scenario selection, and campaign completion. Never inject game state or localStorage to fake gameplay.
10. Finish only when every floor requirement and repository deliverable passes after the last code edit. Report commands, evidence, paths, final manifest/hash, and residual risks.
## Pitfalls
- Never ask the human a follow-up. Resolve routine implementation choices autonomously from the brief.
- Never let multiple writers edit the same checkout.
- Never trade a complete game floor for optional polish.
- Never trust a worker summary without inspecting the resulting files and running checks.
- Never claim browser validation from HTTP success or screenshots alone; interact with the game.
- Never add code after the final run ends.
## Verification
- Build, typecheck, tests, lint, solver/replay checks, and black-box browser tests pass if configured.
- The browser user flow demonstrates the required challenge mechanics without crashes or state injection.
- `CONTEXT-MANIFEST.md` closes the disclosure boundary for prompt, local skills/context, installed extensions, hooks, subagent definitions, and effective configuration.
- `PI_SESSION_FILE` is known; final instructions copy it only after exit, parse every line, prove no parent session, reconstruct the initial prompt from `goal-state.text`, verify every later user entry is a marked Goal-owned continuation rather than a human follow-up, and hash the result.
- README, ASSETS, RECORDING, SPEC, context manifest, and every steering file are present before freeze.
+24
View File
@@ -0,0 +1,24 @@
/goal Build, verify, and freeze the complete Adaptive Loop game in this directory.
This is a hands-off Agentic Labs one-prompt run; no further human message will arrive. Own routine product, engineering, tuning, and verification decisions. Never ask for clarification. Work through recoverable failures; stop only for verified completion or a true external impossibility.
Before implementation, read `SPEC.md` and these disclosed steering files completely:
- `.agents/skills/pi-game-factory/SKILL.md`
- `.agents/skills/deterministic-game-core/SKILL.md`
- `.agents/skills/game-ui-proof/SKILL.md`
`SPEC.md` is authoritative. Preserve all four staged files at their original paths. Solver-driven scenario tuning may change only its allowed data knobs; document every change and preserve all invariants.
Act as parent decision-maker and sole writer. Confirm the initial tree has only the four permitted files and no Git history. Record `PI_SESSION_FILE`, provider/model/reasoning. Expected harness: context, skills, prompts, themes, and ambient extensions disabled; only `@narumitw/pi-goal@0.51.0`, `@juicesharp/rpiv-todo@2.4.0`, `pi-subagents@0.47.1`, and `@injaneity/pi-computer-use@0.5.0` loaded. Verify it. Create `CONTEXT-MANIFEST.md` with private prompt source, staged context, launch flags, effective steering/config text or public-source hashes, versions, hooks/agents, and paths. Confirm live JSONL has the initial Goal kickoff and no prior human message; never copy it live.
Create todos from SPEC Gates 0–8 and keep exactly one in progress. Execute gates in order. A failed gate blocks later work except its smallest root-cause repair. Protect the playable floor before systems depth and one bounded visual pass.
Use the smallest boring stack satisfying the spec. Keep all rules in one pure serializable `nextState(state, action)` core shared identically by preview and commit. Build literal behavior tests, deterministic solver/replay fixtures, exact persistence, five playable campaign scenarios, standalone replay, terminal/retry flows, and the complete SVG interface—not a plan, prototype, mock, or demo. Use procedural SVG/CSS only.
Run targeted checks after each gate. Prove solver routes and inheritance before polish. Browser-proof production through public controls only: preview/commit; movement+flow; adaptation benefit/cost/spillover; environmental response; collapse/retry/win; Save & Quit; close/reopen/Continue; keyboard; 390px; 200% zoom; reduced motion. Never inject domain state or localStorage.
Before subagents, list project-scope agents; use executable builtin reviewers. Keep all writes here. Use `workflowScript`, fresh context, `mission:false`, and no inherited context/skills only for bounded read-only reviews of simulation, browser UX/accessibility, and simplicity. Inspect evidence and apply fixes yourself. Cap broad review at three rounds plus one focused floor-blocker repair.
Freeze only after the final code edit is followed by one passing aggregate check covering build, typecheck/lint if configured, unit/behavior, solver/replay, and black-box browser tests. Ensure every SPEC deliverable exists, generate `RECORDING.md` from verified actions, and record the final manifest/hash. Make no game-code edits after freeze.
Finally report gate evidence, commands/outcomes, final files/hash, risks, and `PI_SESSION_FILE`. Give a post-exit checklist: record/link one uncut take from `RECORDING.md`; DM this prompt; copy/parse finalized JSONL; prove no `parentSession`; one initial `pi-goal-prompt` user entry whose `goal-state.text` byte-equals this file without leading `/goal `; and any later user entries are Goal-owned continuations with matching objective/id and `pi-goal-continuation` markers, not human follow-ups. Hash prompt and log copy. Do none in-session. Call `goal_complete` with the active id only after auditing every SPEC requirement against fresh evidence.
+648
View File
@@ -0,0 +1,648 @@
# Adaptive Loop — Implementation Specification
## 1. Reader and required outcome
This specification is for the autonomous Pi parent and its implementation/review subagents.
After reading it, they must be able to build, verify, and freeze a complete browser game without requesting product decisions from the human or inventing incompatible rules.
The game is successful only when it is playable from campaign start through campaign victory, contains five distinct scenarios, has clear win and lose states, demonstrates interacting deterministic systems, restores exact persisted state, and passes automated plus black-box browser checks.
## 2. Product vision
**Adaptive Loop** is a calm deterministic strategy puzzle set in a fictional microfluidic culture dish.
The player rotates overlapping six-chamber loops. A rotation does two things at once:
1. It moves chamber payloads.
2. It changes which microfluidic loop owns shared chambers and therefore where nutrients and toxins flow.
The resulting tick resolves growth, feeding, migration, selective pressure, adaptation, and environmental fixtures in a fixed order. Species counter repeated strategies through visible adaptations. Every adaptation has a benefit, a cost, and ecological spillover. The player wins by provoking useful counter-adaptations, then exploiting their weaknesses.
The intended feeling is precise, quiet, and legible: a scientific instrument that has become a tactical game.
## 3. Hard scope
### Required
- Browser game, desktop-first, responsive down to 390 CSS pixels.
- TypeScript, HTML, CSS, SVG board.
- Five handcrafted scenarios in one campaign.
- Standalone replay for every unlocked scenario.
- Deterministic simulation with no runtime randomness.
- Pure state transition shared by preview and commit.
- Exact save/load and deterministic action replay.
- Win, ecosystem-collapse loss, turn-limit loss, retry, and campaign victory.
- Mouse, touch, and keyboard operation.
- Accessible labels, visible focus, non-color encodings, live status announcements, and reduced-motion support.
- Procedural SVG/CSS visuals only.
- Unit/behavior tests, scenario solver/replay tests, and black-box browser tests.
### Forbidden
- Backend, accounts, analytics, ads, netcode, or online dependency after install.
- Game engine.
- Downloaded art, music, fonts, or commercial assets.
- Random event deck or procedural board generation.
- Individual autonomous microbe agents.
- Continuous/floating-point population simulation.
- UI-owned game rules or separate preview logic.
- Bespoke simulation branch per named species when a data rule suffices.
- Purely beneficial permanent upgrades.
- Placeholder screens, claimed-but-unplayable mechanics, or demo-only content.
## 4. Board topology and legal actions
The board has twelve chamber slots and three overlapping six-slot loops:
```text
Loop A: [0, 1, 2, 3, 4, 5]
Loop B: [2, 3, 6, 7, 8, 9]
Loop C: [4, 5, 10, 11, 8, 9]
Loop arrays are listed in clockwise visual order. Clockwise rotation moves payload at array index `i` to `(i + 1) mod 6`. Counterclockwise rotation moves it to `(i + 5) mod 6`. For flow, “next” uses the same `+1` step for clockwise and `+5` step for counterclockwise.
```
Shared chamber pairs:
- A/B share 2 and 3.
- A/C share 4 and 5.
- B/C share 8 and 9.
Render these as three visibly interlocking hexagonal rings, not as a numbered debugging diagram.
There are exactly six gameplay actions:
- Rotate A clockwise.
- Rotate A counterclockwise.
- Rotate B clockwise.
- Rotate B counterclockwise.
- Rotate C clockwise.
- Rotate C counterclockwise.
No pass action exists.
A legal rotation:
1. Cyclically permutes the six movable chamber payloads along that loop by one position.
2. Does not move fixed fixtures or objective markers.
3. Sets that loop's flow direction to the chosen direction.
4. Assigns ownership of that loop's shared slots to the rotated loop.
Each shared slot stores one owning loop. Initial ownership is alphabetical among loops containing it. A slot's outlet is the next slot on its owning loop in that loop's current direction. A non-shared slot is owned by its only loop.
This ownership rule must materially change scenario solutions. The counterfactual proof uses normal payload permutation and loop-direction updates but freezes `sharedOwner` at the scenario baseline for every turn. At least one scenario must be solver-proven unwinnable under that counterfactual within its normal turn limit.
Actions in terminal states are rejected without changing domain state.
## 5. Domain model
Use serializable plain data. Keep UI animation, hover, focus, wall-clock time, and ephemeral notifications outside domain state.
A compatible model includes:
```ts
type LoopId = "A" | "B" | "C";
type Direction = "cw" | "ccw";
type LineageId = "producer" | "grazer";
type PressureId = "heat" | "hunger" | "toxin" | "immunity";
type Mode = "campaign" | "standalone";
type Outcome = "playing" | "won" | "collapsed" | "expired";
type Chamber = {
nutrient: number; // 0..6
heat: number; // 0..6
toxin: number; // 0..6
producer: number; // 0..6
grazer: number; // 0..6
phage: number; // 0..6
};
type Lineage = {
pressure: Record<PressureId, number>; // 0..3
unlocked: Record<PressureId, boolean>;
};
type GameState = {
schemaVersion: 1;
mode: Mode;
scenarioId: string;
turn: number;
loops: Record<LoopId, { direction: Direction }>;
sharedOwner: Record<string, LoopId>;
chambers: Chamber[];
lineage: Record<LineageId, Lineage>;
inheritedAtStart: Record<LineageId, PressureId[]>;
consecutiveObjectiveTurns: number;
environmentActive: Record<PressureId, boolean>;
// turn starts at 0; each accepted action resolves turn + 1
outcome: Outcome;
actionLog: RotationAction[];
};
```
All capped quantities use integer clamp `0..6`. Pressure tracks use `0..3`. Overflow is discarded and must be shown in previews/event attribution.
The transition must not mutate its input.
Canonical equality means deep equality after stable-key JSON serialization of domain state. Never include transient UI/time data in this comparison.
## 6. Organisms and fixtures
### Movable chamber values
| ID | Name direction | Food | Base rule |
|---|---|---|---|
| producer | Agent may choose a memorable fictional species name | nutrient | If population and nutrient are present, consume 1 nutrient and gain 1 population. |
| grazer | Agent may choose a memorable fictional species name | producer | Remove 1 edible producer and gain 1 grazer. |
| phage | Phage | grazer | Remove 1 edible grazer and gain 1 phage; if unable to feed, lose 1 phage. |
Producer and grazer are persistent campaign lineages. Phage is not.
### Fixed fixtures
Fixtures stay attached to board slots when chambers rotate.
- **Nutrient inlet:** add 2 nutrient.
- **Heat source:** add 2 heat.
- **Toxin inlet:** add 2 toxin.
- **Drain:** remove 2 toxin.
- **Immune node:** selects and damages producer/grazer exactly once through the Section 8 immunity algorithm.
- **Objective marker:** no simulation effect; marks a target slot.
Fixtures may coexist only when explicitly defined by scenario data.
## 7. Fixed turn pipeline
`nextState(state, rotationAction)` executes exactly this order:
1. **Rotate and reconnect**
- Move chamber payloads.
- Update selected loop direction.
- Update shared-slot ownership.
2. **Channel flow**
- Snapshot all nutrient/toxin values at phase start.
- Every chamber with nutrient sends 1 nutrient through its outlet; every chamber with toxin sends 1 toxin.
- For each value, commit `clamp(start - sent + sum(received), 0, 6)` simultaneously.
- Discarded overflow is attributed.
3. **Producer growth**
- Snapshot this phase after flow.
- Process chambers in ascending slot order.
- Each occupied producer colony with nutrient consumes 1 nutrient.
- It normally gains 1 producer.
- A locally active trait cost may suppress reproduction or impose its defined payment.
4. **Biological interactions**
- Run a grazer subphase, then a phage subphase.
- Each subphase reads a snapshot taken after the prior subphase and commits simultaneously.
- Each occupied grazer colony may consume one edible local producer and gain one grazer.
- Each occupied phage colony may consume one edible local grazer and gain one phage; otherwise it loses one phage.
- Current base feeding is local, so no two chambers contend for the same prey.
5. **Migration**
- Run producer, grazer, then phage migration subphases.
- Each species subphase reads a fresh snapshot after the prior species committed.
- A source population of at least 2 sends one unit through its outlet only when destination food is strictly greater than source food.
- Producer food is nutrient; grazer food is producer; phage food is grazer.
- Within each species subphase, commit aggregate transfers simultaneously as `clamp(start - sent + sum(received), 0, 6)` and attribute overflow.
6. **Evolution and environmental response activation**
- For each pressure whose track already equals 3, unlock the matching lineage trait.
- If any lineage has that pressure at 3, activate the matching global environmental response for the remainder of this scenario.
- Lineage order for any contention is producer, then grazer.
7. **Fixtures, exposure, and pressure consequences**
- Apply nutrient inlets: +2 normally, +1 while Hunger Response is active.
- Apply heat sources: +2 normally, +3 while Heat Response is active; then reduce every chamber's heat by 1.
- Apply toxin inlets: +2 normally, +3 while Toxin Response is active.
- Apply drains: toxin -2.
- Resolve the single immunity algorithm defined in Section 8; immune damage is 2 normally or 3 while Immunity Response is active.
- Snapshot heat, hunger, toxin, and immunity qualification plus occupied populations after fixtures and immune target selection.
- Increment global lineage pressure tracks from that snapshot before applying population consequences.
- Resolve heat, hunger, toxin, then immunity consequences in that order.
- At the start of each pressure subphase, skip a lineage/chamber whose current population is already zero, even if it qualified in the exposure snapshot.
- Toxin carrier payments process producer then grazer in each chamber; each pays from current nutrient, so later lineages lose population when earlier payment exhausted it.
- Apply adapted heat/toxin spillover only after both lineages' carrier consequences for that pressure.
8. **Outcome and turn finalization**
- Initial state has `turn = 0`.
- For an accepted action, define `resolvedTurn = prior.turn + 1`.
- Before win evaluation, set `consecutiveObjectiveTurns` to prior +1 when the scenario's sustained predicate is true, otherwise reset it to 0.
- Ecosystem collapse takes precedence: if total producer + grazer equals 0, lose as `collapsed`.
- Otherwise evaluate scenario win using `resolvedTurn` and updated consecutive count.
- Otherwise, if `resolvedTurn >= turnLimit`, lose as `expired`.
- Store `turn = resolvedTurn`, append the action, and produce deterministic phase-ordered event attribution.
The implementation may represent events separately from canonical state, but event generation must be deterministic from prior state plus action.
## 8. Selective pressure and adaptations
Each lineage has four global tracks. A track gains exactly +1 on a turn if that lineage occupied at least one qualifying chamber in the exposure snapshot. Multiple qualifying chambers do not accelerate a track. Tracks cap at 3. During the following turn's evolution phase, the lineage trait unlocks and the matching global environmental response activates.
| Pressure | Local qualifying condition | Unadapted effect | Adapted benefit | Carrier cost | Spillover | Global response |
|---|---|---|---|---|---|---|
| Heat | heat ≥ 2 | lose 2 population | Heat Shield prevents heat loss | While hot, growth/feeding cannot add population | After both lineages resolve heat, reduce local heat by 1 per adapted surviving lineage, maximum 2 | Heat sources add 3 instead of 2 |
| Hunger | mapped food equals 0 | lose 1 population | Dormancy prevents hunger loss | Dormant population cannot migrate | Dormant population is inedible, denying food to its predator | Nutrient inlets add 1 instead of 2 |
| Toxin | toxin ≥ 2 | lose 1 population | Efflux prevents toxin loss | Pay 1 nutrient; if none, lose 1 population | After carrier payments, reduce local toxin by 1 per adapted surviving lineage, maximum 2 | Toxin inlets add 3 instead of 2 |
| Immunity | selected by immune node | lose immune damage once | Cloak excludes the lineage from immune selection | At an immune node, predator feeding removes one extra cloaked prey | Immune node retargets the other eligible lineage | Immune damage becomes 3 instead of 2 |
### Immunity algorithm
1. During biological interactions, an unlocked Cloak is locally active whenever its carrier occupies an immune-node chamber. A predator feeding on that cloaked prey removes 2 prey instead of 1; this is the carrier cost.
2. During fixtures, inspect current populations at each immune node in ascending slot order.
3. Eligible targets are occupied producer/grazer lineages without unlocked Cloak. Choose largest population; tie chooses producer.
4. If no eligible lineage exists, the node does nothing. Otherwise record the selected lineage as immunity-qualified, attribute any retargeting caused by Cloak as spillover, and schedule exactly one immune damage event.
5. Pressure tracks use the recorded selection snapshot. During the later immunity consequence subphase, apply the scheduled damage only if that target still has population; never apply a second immune loss.
Rules:
- Global unlock does not mean always active. Heat, Hunger, and Toxin traits activate only under their qualifying condition. Cloak activates locally at immune nodes.
- Each effect applies once per lineage per chamber per phase.
- Population loss floors at zero.
- Environment response flags reset at scenario start even when traits are inherited; pressure can reactivate them.
- UI must attribute unlock, local activation, prevented loss, paid cost, spillover, and global response with text plus visual encoding.
- “Avoid an adaptation” means win a relevant pressure scenario while the matching trait remains locked (its track never enters an evolution phase at 3).
- At least one solver route must deliberately provoke and exploit a trait; another must satisfy the defined avoidance condition.
## 9. Scenario contracts
Scenario definitions are immutable declarative data. Sparse chamber notation below is:
```text
slot: nutrient / producer / grazer / phage / heat / toxin
```
Omitted slots and omitted values are zero. All loops initially clockwise. Shared-slot ownership uses alphabetical default.
Universal collapse is total producer + grazer = 0. Universal terminal precedence is collapse, then win, then turn-limit expiration.
The autonomous implementation must build a bounded deterministic solver or state-space search that proves at least one winning sequence and one losing sequence for each baseline scenario. Store those sequences as test fixtures and use them to generate `RECORDING.md`. It must also verify every campaign inheritance combination reachable from prior scenarios. If a scenario is impossible or trivial, the agent may adjust only starting populations/resources, fixture locations, or numeric objective thresholds by at most 1 per tuning pass. It must document every adjustment and rerun all solver tests. Board topology, turn order, caps, trait semantics, and objective type may not change.
### Scenario 1 — Heat: Cultivation Quota
- Turn limit: 8.
- Fixtures: nutrient inlets at 1 and 7; heat sources at 3 and 9.
- Start:
- `0: 3/2/0/0/0/0`
- `6: 3/2/0/0/0/0`
- `10: 2/1/0/0/0/0`
- `4: 1/0/0/0/0/0`
- Win: producer at slot 11 ≥ 5 and total producer ≥ 12.
- Teaches: rotation, ownership, flow, growth, preview, first visible pressure.
### Scenario 2 — Hunger: Endurance
- Turn limit: 10.
- Fixtures: nutrient inlet at 0.
- Start:
- `1: 2/3/0/0/0/0`
- `5: 1/2/1/0/0/0`
- `7: 2/3/1/0/0/0`
- `10: 0/2/2/0/0/0`
- Win when `resolvedTurn === 10` and:
- total producer ≥ 8;
- total grazer ≥ 4;
- producer occupies at least 3 chambers;
- grazer occupies at least 2 chambers.
- Teaches: competition, migration, dormancy, deliberate denial of predator food.
### Scenario 3 — Toxin: Cleansing
- Turn limit: 9.
- Fixtures: nutrient inlet at 1; toxin inlets at 3 and 9; drains at 5 and 11.
- Start:
- `0: 3/3/0/0/0/0`
- `3: 0/0/0/0/0/2`
- `6: 2/3/0/0/0/0`
- `9: 0/0/0/0/0/2`
- `10: 2/2/1/0/0/0`
- Win when `resolvedTurn` is 6 through 9, total toxin ≤ 2, and total producer + grazer ≥ 8.
- Teaches: routing contaminants, resistance payment, shared detoxification spillover.
### Scenario 4 — Immunity: Escort
- Turn limit: 8.
- Fixtures: nutrient inlets at 0 and 8; immune nodes at 2, 4, and 6; sanctuary objective marker at 11.
- Start:
- `1: 2/3/0/0/0/0`
- `5: 2/3/2/0/0/0`
- `7: 0/0/0/1/0/0`
- `9: 1/0/2/1/0/0`
- Win: grazer at 11 ≥ 3, phage at 11 ≥ 1, and total producer ≥ 6.
- Teaches: immune targeting, cloak, retargeting spillover, predator vulnerability.
### Scenario 5 — Convergence: Stable Equilibrium
- Turn limit: 12.
- Fixtures:
- nutrient inlets at 0 and 6;
- heat sources at 2 and 8;
- toxin inlet at 3;
- drain at 9;
- immune nodes at 4 and 10;
- assay objective markers at 1, 7, and 11.
- Start:
- `0: 3/3/0/0/0/0`
- `3: 0/0/0/0/0/2`
- `5: 2/2/1/0/0/0`
- `6: 3/2/0/0/0/0`
- `8: 0/0/0/0/2/0`
- `9: 0/0/0/0/0/1`
- `10: 2/2/2/1/0/0`
- Sustained predicate:
- every assay marker contains producer + grazer ≥ 2;
- total producer is 8 through 14;
- total grazer is 3 through 7;
- total phage ≤ 3;
- total toxin ≤ 6.
- Win when the updated `consecutiveObjectiveTurns >= 2` before `resolvedTurn` exceeds 12.
- Teaches: all systems plus inherited gift-and-burden consequences.
## 10. Campaign and standalone progression
### Campaign
- Scenario 1 starts with no inherited traits.
- Winning unlocks the next scenario.
- After each win, the player may preserve zero or one trait that unlocked during that scenario and was not already inherited.
- Declining is allowed. Already inherited traits are not offered again.
- Preserved traits carry both benefit and cost into later scenarios; previously inherited traits remain.
- Pressure counters and global environment-response flags reset between scenarios.
- Scenario retry restores the exact inheritance snapshot from first entry to that scenario.
- Campaign victory occurs after winning Scenario 5.
- Reachability verification enumerates every cumulative inheritance set produced by choosing zero or one newly unlocked eligible trait after each prior scenario.
### Standalone
- Unlocked scenarios may be replayed individually.
- Standalone always clones immutable baseline scenario data.
- No traits or pressure counters carry in or out.
- Standalone completion does not change campaign progression.
### Menu semantics
- **Continue:** restore exact active run if one exists; otherwise enter next campaign scenario.
- **New Campaign:** clear campaign progress only after confirmation.
- **Retry:** restore current scenario baseline plus its campaign-entry inheritance snapshot.
- **Replay Standalone:** select any unlocked scenario with baseline lineages.
- **Save & Quit:** persist and return to title/menu without altering state.
## 11. Persistence and replay
Use localStorage with a versioned save envelope containing:
- schema version;
- mode;
- scenario ID;
- canonical game state;
- campaign unlocked scenarios;
- inherited lineage traits;
- scenario-entry inheritance snapshot;
- action log;
- outcome;
- saved-at metadata outside canonical comparison.
Requirements:
- Save after every committed turn and on Save & Quit.
- Restore exact canonical state and exact next transition.
- Validate schema and values at load boundary.
- Malformed or unsupported saves fail safely with a visible recovery choice; never crash or silently corrupt progress.
- Replay is primarily a testing/debugging seam. It need not be a full player-facing replay viewer.
- Replaying action log from immutable baseline plus inheritance snapshot must reproduce canonical current state.
## 12. Preview and event attribution
Hover, focus, or touch-selecting a rotation shows an exact one-turn preview produced by calling the same pure transition on cloned state.
Preview must show:
- chamber destinations;
- updated channel direction and shared ownership;
- nutrient/toxin flow arrows;
- exact population/resource deltas;
- overflow discarded;
- pressure increments;
- trait unlocks and local activations;
- adaptation benefit, carrier cost, and spillover;
- predicted objective progress or terminal result.
Commit must produce canonical state equal to previewed canonical state.
The event panel should explain the tick in phase order. It must be concise enough to scan during a video and detailed enough to explain a collapse.
## 13. User interface and visual direction
### Visual world
- Dark laboratory glass and restrained near-black background.
- Luminous culture chambers with crisp borders.
- Microfluidic channels read as instrument paths, not fantasy pipes.
- Species use shape + short label + color.
- Four pressures use distinct iconography/pattern plus color.
- Motion is subtle and causal: rotation, flow pulse, growth/decline, trait activation.
- No generic dashboard card grid, excessive gradients, stock icons, or decorative particle noise.
### Layout
Desktop:
- Center: SVG culture board.
- Left or upper rail: scenario objective, turn, campaign state.
- Right or lower rail: pressure tracks, lineage traits, exact preview/event log.
- Persistent controls: menu, Save & Quit, retry where relevant, help/legend.
Narrow viewport:
- Board remains primary.
- Information rails stack below.
- No horizontal page scrolling.
- All controls remain reachable and labels readable at 200% zoom.
### Input
- Pointer/touch: select loop and direction, preview, then commit.
- Keyboard: focusable controls for each loop direction; Enter/Space commits; Escape cancels preview.
- Visible focus on every actionable control.
- No hover-only information.
### Accessibility
- Semantic headings and landmarks.
- Real buttons for actions.
- Accessible names include loop, direction, and predicted high-level result.
- Live region announces committed turn result and terminal outcomes.
- Text/symbols supplement every color encoding.
- Contrast meets WCAG AA for normal text and controls.
- `prefers-reduced-motion` removes nonessential animation and renders final states immediately.
## 14. Architecture
Prefer the smallest boring stack that supports reliable testing. A suitable default is Vite + TypeScript + Vitest + Playwright, but the autonomous agent may choose an equally small established stack already supported by the environment.
Required module boundaries:
1. **Domain:** types, canonical serialization, validation, pure transitions, event derivation.
2. **Content:** immutable species/trait tables and declarative scenarios.
3. **Persistence:** versioned save validation and localStorage adapter.
4. **Presentation:** SVG rendering, controls, preview, status/event UI.
5. **Verification:** behavior fixtures, solver/replay checks, browser user flows.
Do not create factories, plugin systems, dependency injection containers, generic ECS frameworks, or abstractions with one implementation.
## 15. Autonomous implementation gates
The run must complete gates in order. A failing gate blocks later work except the smallest repair needed to pass it.
### Gate 0 — legality and evidence preflight
- Record initial tree and confirm only permitted human-authored context exists.
- Record `PI_SESSION_FILE` absolute path.
- Record effective model/provider.
- Generate `CONTEXT-MANIFEST.md` listing the one prompt, all local context files, extension/package versions, relevant extension configuration, and their original/effective paths.
- Authoritative private prompt path: `/Users/alex/Projects/scripting/agentic-labs-challenge/adaptive-loop/PROMPT.md`.
- Each real attempt starts in a fresh standalone directory outside every existing Git worktree, containing only `SPEC.md` and the three `.agents/skills/*/SKILL.md` instruction files; the initial human message is supplied from the private prompt and is not copied into the public game repository by default. The agent may initialize Git during the run.
- The final public repository discloses all staged context files plus a `CONTEXT-MANIFEST.md` that records the exact isolated launch flags, loaded extension/package versions, effective steering/configuration text or immutable public source hashes, and original/effective paths; the prompt is DM'd with submission unless the operator deliberately chooses publication.
- Copying and validating the final session JSONL is an operator post-exit submission step, explicitly excluded from the in-session game-code freeze.
- Because Pi Goal continuation messages are persisted as `role:user`, post-exit validation must classify provenance rather than require one raw user-role entry: one initial `pi-goal-prompt` kickoff reconstructs `PROMPT.md`, and every later user-role entry must be a matching disclosed `pi-goal-continuation` for the same objective and goal ID. Any unmarked or mismatched user entry fails compliance.
- Do not copy the live session log during the run.
### Gate 1 — runnable shell
- Production app starts.
- Title, new campaign, continue state, and scenario shell render.
- No browser console errors.
### Gate 2 — complete Scenario 1
- Board rotations move chambers and reconnect channels.
- Preview equals commit.
- Heat scenario has playable win, collapse, expiration, and retry.
- Save/reload preserves exact state.
### Gate 3 — simulation truth
Literal worked tests cover:
- both directions for all loops;
- shared-slot ownership;
- flow contention and overflow;
- population/resource caps;
- every pipeline phase;
- all four adaptations including benefit/cost/spillover;
- input immutability;
- canonical determinism;
- terminal precedence;
- preview/commit equality;
- replay reproduction.
### Gate 4 — scenario solvability
- Solver or bounded search proves and stores one winning and one losing route for each baseline scenario.
- Every reachable campaign inheritance set can complete subsequent scenarios.
- At least one route requires shared-slot ownership changes.
- At least one route exploits an adaptation.
- At least one route avoids an adaptation.
### Gate 5 — campaign and persistence
- Five scenarios unlock in order.
- Lineage choice carries gift and cost.
- Retry uses scenario-entry inheritance snapshot.
- Standalone uses clean baseline.
- Malformed save recovery works.
- Campaign victory works.
### Gate 6 — black-box browser proof
Against the production build, public controls only:
- start a campaign;
- preview and commit a rotation;
- observe movement plus channel flow interaction;
- trigger and visibly attribute an adaptation benefit, cost, and spillover;
- trigger a global pressure response and observe its strengthened fixture effect;
- lose, retry, then win;
- Save & Quit;
- close/reopen page and Continue exact state;
- operate core actions by keyboard;
- check narrow viewport, 200% zoom, and reduced motion;
- never inject domain state or localStorage to fake gameplay.
### Gate 7 — bounded polish and independent review
- One visual QA pass at desktop and narrow viewport.
- Fresh-context reviewers inspect correctness/determinism, user flow/accessibility, and simplicity/scope.
- One writer applies accepted fixes.
- Maximum three broad review rounds. If a floor blocker remains, drop optional polish and perform one final focused repair/verification cycle; never declare success with a failing floor gate.
### Gate 8 — repository freeze
- Aggregate verification passes after final code edit.
- README contains exact install, run, build, test, and play instructions.
- `ASSETS.md` discloses that visuals are procedural and lists any allowed generated asset if one was created during the run.
- `RECORDING.md` contains a short deterministic uncut-video route.
- All steering context remains at original project-local paths.
- Record final commit/tree hash or, if no commit is appropriate, a deterministic file manifest and hashes.
- Print the authoritative `PI_SESSION_FILE` path and post-exit copy/validation command.
- Make no more game-code edits after freeze.
## 16. Recording route requirements
`RECORDING.md` must be generated from verified solver/browser routes, not invented prose.
One continuous take should be short but show:
1. Title/campaign start.
2. Exact preview of a rotation.
3. Rotation causing both chamber movement and channel flow.
4. Pressure causing a species adaptation.
5. The adaptation's benefit, cost, and spillover.
6. Global pressure response strengthening an environmental fixture.
7. Ecosystem collapse and retry.
8. A scenario win and preserved lineage choice.
9. Save & Quit.
10. Page/tab close and reopen.
11. Continue restoring exact state.
12. Visible access to multiple scenarios.
Automated tests must validate all five scenarios and campaign victory; the recording need not play all five unless the verified route remains concise.
## 17. Repository deliverables
Required at freeze:
- Complete game source.
- Production build configuration.
- Automated tests and black-box browser tests.
- README.md.
- ASSETS.md.
- RECORDING.md.
- CONTEXT-MANIFEST.md.
- This SPEC.md.
- Original one prompt at its submitted path only if disclosure strategy calls for it; otherwise preserve privately and DM it per competition rules.
- `.agents/skills/pi-game-factory/SKILL.md`.
- `.agents/skills/deterministic-game-core/SKILL.md`.
- `.agents/skills/game-ui-proof/SKILL.md`.
- Exact authoritative session JSONL is an operator-owned post-exit submission artifact, not an in-session freeze deliverable.
## 18. Completion definition
Do not stop at a plan, architecture, prototype, attractive board, or one scenario.
Adaptive Loop is complete only when:
- five scenarios are playable;
- campaign and standalone modes work;
- win and both loss types work;
- two or more systems visibly interact;
- adaptation benefit/cost/spillover is playable and visible;
- deterministic preview, replay, and persistence are proven;
- scenario solver routes and browser tests pass;
- the production UI is readable, accessible, and stable;
- the repository deliverables exist;
- the recording route is verified;
- the final aggregate gate passes after the last code edit;
- the authoritative prompt/context boundary, session path, and operator-owned post-exit log procedure are reported.
@@ -0,0 +1,49 @@
# Adaptive Loop — Brainstorming Outcome
## Goal
Create a strong-contender browser game for the Agentic Labs one-prompt challenge: calm and elegant to play, rich in interacting systems, reliable for an autonomous Pi build, and legible in one continuous judging video.
## Selected concept
**Adaptive Loop** is a deterministic microscopic strategy puzzle. The player rotates overlapping hexagonal loops in a microfluidic culture dish. Each rotation simultaneously moves culture chambers and reconnects channels, then a fixed simulation tick resolves flow, growth, biological interactions, migration, evolution, environmental pressure, and objectives.
The ecosystem counter-adapts to repeated strategies. Players see adaptation thresholds, deliberately provoke them, then exploit each adaptation's cost and ecological spillover.
## Product decisions
- Browser game, desktop-first, SVG board.
- Five handcrafted scenarios; no procedural boards.
- Science-inspired fiction with simplified microbial biology.
- Capped integer populations/resources rather than continuous simulation.
- Exact one-turn preview generated by the same pure transition as committed play.
- Four unified pressures: heat, hunger, toxin, immunity.
- Species evolve globally; traits activate under local conditions.
- Every trait has a benefit, a cost, and cross-species spillover.
- Campaign lineages persist as both gifts and burdens; standalone scenario replay restores baseline species.
- Deterministic player-caused variation; no random season deck.
- Local save/load and deterministic action replay.
## Five-scenario arc
1. **Heat** — basic rotation, growth, and flow.
2. **Hunger** — competition and dormancy.
3. **Toxin** — resistance and metabolic costs.
4. **Immunity** — phage, immune cells, and spillover.
5. **Convergence** — all pressures plus inherited lineage consequences.
Each scenario uses a different objective style while ecosystem collapse remains the universal lose state.
## Architecture decision
All rules live in a serializable, rendering-independent state machine. A pure `nextState(state, action)` transition owns both preview and commitment. Scenario definitions are declarative. SVG only renders state and submits actions. This seam supports determinism, testing, replay, and exact persistence.
## Autonomous execution decision
Use Pi 0.84.1 with `openai-codex/gpt-5.6-sol`, high thinking, installed extensions, and only the three disclosed local skills under `.agents/skills`. Disable ambient context files, global skills, and prompt templates. The single prompt explicitly reads these local skills before work begins.
Build vertically: runnable shell → complete scenario 1 → truth tests → interacting adaptation systems → persistence → scenarios 2–5 → bounded polish → final audit. Keep one writer; parallelize only independent review and validation.
## Deliberate exclusions
No backend, accounts, netcode, game engine, downloaded assets, individual-agent microbes, continuous physics, random event deck, bespoke code path per organism, or pure power-up progression. Add none unless the complete competition floor is already verified and substantial capacity remains.
@@ -0,0 +1,250 @@
---
stepsCompleted: [1, 2, 3, 4]
inputDocuments:
- Agentic Labs Challenge.md
session_topic: 'A strong-contender browser game for the Agentic Labs one-prompt challenge'
session_goals: 'Find an original, calm, elegant game with emergent interacting systems, sufficient systems depth, reliable autonomous implementation, and a compelling judging video.'
selected_approach: 'Progressive Technique Flow'
techniques_used: ['Forced Relationships', 'Morphological Analysis', 'SCAMPER Method', 'Constraint Mapping']
ideas_generated: 23
context_file: 'Agentic Labs Challenge.md'
session_active: false
workflow_completed: true
working_title: 'Adaptive Loop'
---
# Brainstorming Session Results
**Facilitator:** Session Facilitator
**Date:** 2026-08-12
## Session Overview
**Topic:** A strong-contender browser game for the Agentic Labs one-prompt challenge.
**Goals:** Find an original, calm, elegant game with emergent interacting systems, sufficient systems depth, reliable autonomous implementation, and a compelling judging video.
### Context Guidance
The entry must be generated from one human prompt in an empty directory and be playable start-to-finish with win/lose states and multiple runs, levels, maps, or scenarios. Judging favors interacting systems, procedural generation, deterministic simulation, AI, progression, and persistence. Visual polish helps the video but earns no direct points.
### Session Setup
Prioritize compact strategic rules and surprising interactions over twitch action or asset-heavy production. Browser delivery minimizes build and judging friction. Plain Threes or Sudoku clones are baseline inspirations, not sufficient final concepts unless transformed by deeper systems.
**Approach:** Progressive Technique Flow — diverge broadly, deliberately mutate promising ideas, then narrow against challenge fit.
## Technique Selection
**Approach:** Progressive Technique Flow
- **Phase 1 — Exploration:** Forced Relationships
- **Phase 2 — Pattern Recognition:** Morphological Analysis
- **Phase 3 — Development:** SCAMPER Method
- **Phase 4 — Action Planning:** Constraint Mapping
This sequence first forces puzzle mechanics into unfamiliar systemic domains, then maps combinations, mutates the strongest concepts, and finally constrains the winner for one-prompt execution.
## Technique Execution
### Forced Relationships — calm number puzzle × living ecosystem
**[Evolution #1]: The Ecosystem Learns**
_Concept_: Sliding and merging organisms changes selective pressure. Species counter repeated player strategies through visible trait adaptations, while season rules counter dominant ecosystem-wide patterns.
_Novelty_: The puzzle rewrites its own rules deterministically in response to how it is played; the ecosystem acts as a quiet adversary rather than relying on opaque randomness.
**Current direction:** Species traits provide local counterplay; season mutations reshape global rules. Adaptation thresholds should be forecast so players can anticipate and manipulate them.
**[Evolution #2]: Evolutionary Gambits**
_Concept_: Players bait species into adapting, pivot strategy, then exploit each adaptation's explicit cost. Benefits, costs, ecological spillover, and visible pressure thresholds form one coherent mechanic.
_Novelty_: Counter-adaptation is not merely escalating difficulty; it becomes a manipulable strategic resource combining trade-offs, cross-species spillover, and deliberate feints.
**[Board #3]: Rotating Habitats**
_Concept_: The player rotates habitat structures to alter organism adjacency, food-web access, predation, and exposure to seasonal effects.
_Novelty_: Rotation makes relationships—not numerical merging—the central puzzle verb, distinguishing the game from Threes while keeping inputs calm and legible.
**[Topology #4]: Interlocking Hex Loops**
_Concept_: A small honeycomb contains overlapping six-cell loops. Rotating one loop changes shared cells and causes a single deterministic ecosystem tick, with previews exposing consequences before commitment.
_Novelty_: It combines organic hex geometry with mechanical overlap, yielding cascades from one calm input without freeform movement.
**[Content #5]: Five Curated Ecologies**
_Concept_: Five handcrafted scenarios provide balanced spatial puzzles and introduce systems progressively. Procedural variation can live in constrained, seeded season schedules rather than board generation.
_Novelty_: Hand-authored topology protects strategic balance while deterministic seasonal variation still demonstrates replayability and simulation depth.
**[Progression #6]: Persistent Lineage Campaign**
_Concept_: Completing a scenario carries selected evolutionary consequences into later ecosystems, while every unlocked scenario remains independently replayable from its baseline state. Campaign progress and active runs are saved locally.
_Novelty_: Persistence turns earlier ecological manipulation into later strategic context without making experimentation irreversible or requiring procedural maps.
**[Objectives #7]: Ecological Trials**
_Concept_: Each scenario has a distinct objective—survival, engineered succession, induced adaptation, recovery, or synthesis—while ecosystem collapse remains the universal lose state.
_Novelty_: A shared simulation supports multiple styles of mastery, proving systems depth without needing five separate game modes.
**[Setting #8]: Microscopic Colony**
_Concept_: The interlocking hex loops form a stylized culture dish. Microbes, immune cells, nutrients, toxins, and phages respond to environmental cycles such as heat, acidity, starvation, or treatment pulses.
_Novelty_: The microscopic scale naturally unifies ecological counter-adaptation, immunity, mutation, and seasonal rule changes while enabling vivid procedural motion without external art assets.
**[Tone #9]: Science-Inspired Fiction**
_Concept_: Fictional organisms use simplified, recognizable biological mechanisms: resistance, biofilm, dormancy, motility, phage infection, and immune response.
_Novelty_: Real intuitions teach the simulation while fictional species preserve balancing and visual freedom.
**[Interaction #10]: Coupled Carousel and Channels**
_Concept_: One loop rotation simultaneously relocates culture chambers and reconnects microfluidic channels. This changes both spatial relationships and the subsequent flow of nutrients, toxins, signals, and phages.
_Novelty_: A single calm action operates two entangled simulation layers, delivering visible systems depth without adding another control mode.
### Forced Relationships — phase result
The leading concept combines a calm rotation puzzle, adaptive microbial ecology, immune-system trade-offs, deterministic environmental cycles, and coupled microfluidic movement/flow. The player baits counter-adaptations, then exploits their costs and spillover.
### Morphological Analysis
Systematically test board, population, flow, timing, adaptation, information, objective, and progression combinations. Favor configurations that create interacting depth from one input while remaining readable and autonomously buildable.
**[Simulation #11]: Capped Mixed Populations**
_Concept_: Each chamber supports up to three species represented by 0–6 population pips, plus similarly capped nutrient and toxin values. Overflow resolves through competition, migration, or death.
_Novelty_: Small integers provide interacting population dynamics while keeping every state inspectable at a glance.
**[Adaptation #12]: Global Trait, Local Expression**
_Concept_: Selective pressure unlocks a trait for an entire species, but each colony expresses it only when its local trigger is present.
_Novelty_: Evolution is globally forecastable yet spatially exploitable; the player can rotate adapted colonies into conditions where their costly trait switches on or off.
**[Timing #13]: Deterministic Phase Pipeline**
_Concept_: Every rotation resolves in a fixed order: chamber movement, channel flow, consumption/growth, biological interactions, migration, adaptation, then environmental advance.
_Novelty_: Deep cascades remain causal, explainable, replayable, and easy to verify in automated tests.
**[Information #14]: Exact One-Turn Forecast**
_Concept_: Before commitment, the board previews ghost movement, channel arrows, resource changes, and population deltas for the immediate tick. Longer-term consequences still require planning.
_Novelty_: The complexity becomes a deterministic strategy puzzle rather than trial-and-error simulation, preserving the calm tone.
**[Environment #15]: Visible Pressure Tracks**
_Concept_: Player behavior fills explicit heat, toxin, hunger, and immune-pressure tracks. Crossing a known threshold mutates the next environmental cycle according to the dominant pressure.
_Novelty_: The global counter-adaptation is endogenous, deterministic, and baitable: players can deliberately shape the coming stress, then exploit the adaptations it induces.
### Morphological Analysis — phase result
Selected configuration: capped mixed populations; globally evolved traits with local activation; fixed deterministic resolution; exact immediate forecasting; and visible, manipulable environmental-pressure tracks.
### SCAMPER Development
Mutate the assembled concept to remove redundant systems, strengthen the central loop, and test whether each feature contributes to strategic interaction or merely adds surface complexity.
**[Simplification #16]: Fixed Species, Shared Grammar**
_Concept_: A small cast of recognizable fictional species has stable identities, diets, and behaviors. Evolution selects from a universal library of triggered trait modules rather than adding bespoke species logic.
_Novelty_: Stable identities preserve learnability and attachment; recombined shared traits provide emergence with less implementation and balancing risk.
**[Simplification #17]: Unified Selective Pressure**
_Concept_: Heat, toxin, hunger, and immune pressure simultaneously govern species adaptation thresholds and mutate the next environmental cycle.
_Novelty_: One visible causal model replaces separate evolution and event systems, letting a single player action produce local and global counter-adaptation.
**[Campaign #18]: Pressure Teaching Arc**
_Concept_: Five scenarios progressively introduce heat, hunger, toxin, immunity, then all pressures together with inherited lineage consequences.
_Novelty_: The campaign doubles as an organic tutorial; each scenario exercises the same simulation rather than introducing disconnected mechanics.
**[Simplification #19]: Player-Caused Variation**
_Concept_: Remove random season order. Scenario conditions, fixed resolution, and visible pressure thresholds fully determine environmental mutations; a seed exists only if deterministic tie-breaking needs it.
_Novelty_: Replayability arises from the ecology reacting to different strategies, not from shuffled content, making every consequence learnable and reproducible.
**[Progression #20]: Gift-and-Burden Inheritance**
_Concept_: After each campaign scenario, preserve one evolved lineage whose trait carries both its situational benefit and metabolic vulnerability into later scenarios. Standalone replay restores baseline species.
_Novelty_: Progression increases strategic texture rather than flattening difficulty through permanent power upgrades.
### SCAMPER — phase result
Use fixed species assembled from a shared biological grammar; unify evolution and environmental response through the same four pressure tracks; teach the system across five scenarios; eliminate random events; and make inherited adaptations both gifts and burdens.
### Constraint Mapping
Convert the concept into a one-prompt-safe scope with explicit architectural boundaries, build gates, automated verification, and evidence requirements for the judging video.
**[Architecture #21]: Pure Core, SVG Shell**
_Concept_: A pure `nextState(state, action)` simulation owns all rules; preview invokes that same function speculatively. Declarative scenarios, local persistence, and an SVG renderer sit around the core.
_Novelty_: One state transition seam simultaneously protects determinism, preview fidelity, save/load, replay, automated tests, and UI independence.
**[Execution #22]: Vertical Autonomous Gates**
_Concept_: The one-prompt run completes a fully playable first scenario, validates preview truth and interacting systems, proves persistence, then expands to scenarios two through five before polishing.
_Novelty_: The autonomous run always protects a complete game floor; ambition is added only after executable evidence passes.
**[Harness #23]: Pi Extension Factory**
_Concept_: Use Pi 0.84.1 with `openai-codex/gpt-5.6-sol`, the currently installed package extensions, selected disclosed project-local skills, one parent decision-maker, one writer, fresh-context review fanout, browser user-flow validation, todo tracking, and optional goal persistence.
_Novelty_: The prompt specifies outcome gates and authority boundaries rather than micromanaging implementation, allowing the installed orchestration tools to form an auditable software factory.
## Idea Organization and Prioritization
### Theme 1: Interacting Game Systems
- Interlocking hex loops couple chamber movement with channel routing.
- Capped mixed populations make every interaction inspectable.
- Fixed turn phases keep complex cascades deterministic.
- Exact one-turn forecasts use the same transition as committed play.
**Pattern:** One calm rotation changes spatial, resource, biological, evolutionary, and environmental state without adding separate control modes.
### Theme 2: Manipulable Evolution
- Visible heat, hunger, toxin, and immune pressure drive both species traits and environmental cycles.
- Globally evolved traits activate only under local conditions.
- Every benefit carries a cost and creates spillover.
- Players bait counter-adaptation, pivot, then exploit it.
**Pattern:** The adversarial system is deterministic and strategically weaponizable rather than randomly punitive.
### Theme 3: Campaign and Content
- Five handcrafted scenarios introduce pressure systems progressively.
- Hybrid objectives reuse the same simulation for survival, succession, provocation, recovery, and synthesis.
- One evolved lineage persists as both gift and burden.
- Standalone replay restores the baseline ecology.
**Pattern:** Curated content protects balance while persistent consequences provide depth and replayability.
### Theme 4: Autonomous Delivery
- Pure simulation core with SVG presentation.
- Vertical gates protect a complete playable floor before expansion.
- One writer, independent fresh-context reviews, and actual browser validation.
- Three disclosed project-local skills guide orchestration, deterministic simulation, and UI evidence.
- Execution model: `openai-codex/gpt-5.6-sol`.
### Prioritization Results
1. **Top priority — Adaptive Loop:** strongest combination of originality, systems depth, calm play, video readability, and one-prompt feasibility.
2. **Quick win — Scenario 1 vertical slice:** proves rotation, flow, interaction, pressure, adaptation, win/lose, retry, and deterministic preview before expanding.
3. **Breakthrough — Evolutionary gambits:** player-induced counter-adaptation becomes a resource through explicit benefits, costs, spillover, and feints.
## Action Plan
1. Write a complete implementation specification with the state model, board topology, species grammar, trait library, resolution pipeline, five scenario definitions, persistence contract, UI states, and acceptance tests.
2. Write the single human prompt. It must require the three local skills to be read first, capture `PI_SESSION_FILE`, create vertical gates, orchestrate one writer plus fresh-context reviewers, validate the browser user flow, and refuse premature completion.
3. Create an isolated launch command using `openai-codex/gpt-5.6-sol`, current extensions, `--no-context-files`, `--no-skills`, and `--no-prompt-templates`.
4. Audit prompt, local skills, launch command, and expected artifacts against every competition rule and disqualification ground.
5. Run unchanged attempts in fresh empty directories, preserve every complete JSONL, and submit the strongest untouched build with a public repository and one continuous gameplay recording.
## Session Summary and Insights
**Selected concept:** Adaptive Loop, a deterministic microscopic strategy puzzle where players rotate overlapping microfluidic culture loops, provoke evolutionary counter-adaptation, and exploit its trade-offs across five handcrafted scenarios.
**Key achievement:** A Threes/Sudoku-inspired desire for calm, legible strategy evolved into an original system-rich game whose central mechanic, simulation architecture, campaign progression, testing seam, and judging-video evidence reinforce each other.
**Deliberate exclusions:** Procedural boards, random seasons, continuous numerical simulation, individual-agent AI, bespoke rules per organism, external assets, backend services, and pure power-up progression. Add none unless repeated execution proves the complete floor reliable and leaves ample capacity.
**Workflow status:** Brainstorming complete. Next stage is specification and one-prompt authoring.