{
  "notes": "Episode 1 started with 50 available items, an empty trunk, and no launch receipts or site URL. This wave allocates four items. Both token strings are lowercase test. The token deployer chooses the initial supply in the constructor and receives it. Staking duration means elapsed time on deposit. Each occupied second awards the pool one nontransferable point, divided by the stake shares during that second. For the website, site/deployment.json is the handoff from verified Sepolia receipts. Episode 2 should inspect the merge and all four results, repair any missing pieces, and run the whole flow on a disposable local chain with the same compiled artifacts and two users. Check token transfers, the numerical split in the staking brief, return of principal and the website's balances against contract reads. Then use the platform's owner launch and publication facilities when available. Deploy the token first, pass its confirmed address to the staking constructor, verify both receipts, runtime code, metadata and token binding on chain 11155111, and publish the site with that manifest. If a launch is interrupted, reconcile its receipts before retrying. Check the public URL against the manifest and live contract reads. Carry forward both addresses, transaction hashes, URL and check outcomes. If an owner action or publication is still pending, report exactly which step remains.",
  "spawn": [
    {
      "name": "sepolia-staking-app",
      "mode": "code",
      "minutes": 55,
      "brief": "Build the following component on the goal trunk within your item scope. {{work}} Your result must name the delivered paths, state the interfaces or commands the next worker needs, and list the checks you actually ran with their outcomes. Identify any check that needs the merged trunk.",
      "items": [
        {
          "key": "token",
          "vars": {
            "work": "Implement TestToken in src/TestToken.sol for Solidity ^0.8.24, with Foundry tests for this contract. Both name() and symbol() return the exact string test. Use 18 decimals and a fixed ERC-20 supply. The constructor takes one positive uint256 initialSupply in base units and mints it once to msg.sender. Implement standard balances, transfers, approvals, transferFrom, return values and events. Test constructor units and recipient, transfers, allowance spending and rejected overspending. Keep compilation self-contained."
          },
          "scope": ["src/TestToken.sol", "test/TestToken.t.sol"]
        },
        {
          "key": "staking",
          "vars": {
            "work": "Implement ShareStaking(address tokenAddress) in src/ShareStaking.sol (Solidity ^0.8.24). Expose token(), stake(uint256), withdraw(uint256), stakedBalance(address), totalStaked() and pointsOf(address). Use uint256 and 18 decimals for tokens and points. For each interval with stake, each user earns elapsed seconds * 1e18 * user stake / total stake. Skip empty intervals. Checkpoint a high-precision cumulative per-token index before balance changes, carry fractional accrual and include the current interval in pointsOf. Allow partial or full withdrawal at any time, retaining points. Validate amounts, balances and transfer success. Emit stake and withdrawal events. Use self-contained Foundry tests with a local token. Stake A alone for 10 seconds, then add B at three times A's stake for 8 seconds. Assert 12e18 points for A and 6e18 for B. Cover partial and full exit, idle time and re-entry."
          },
          "scope": ["src/ShareStaking.sol", "test/ShareStaking.t.sol"]
        },
        {
          "key": "website",
          "vars": {
            "work": "Build a mobile-friendly static site at site/index.html. Use local assets and relative URLs for path-prefix hosting. Load the release tool's deployment.json beside the page. Expect numeric chainId 11155111 and token and staking address strings. Show setup status if missing or invalid. Connect a browser wallet, support switching to Sepolia and verify chain ID and staking.token() before writes. Use ERC-20 calls, stake(uint256), withdraw(uint256), stakedBalance(address), totalStaked() and pointsOf(address). Show wallet balance, staked amount, pool share and points. Explain that each occupied second earns the pool one point split by stake. Use 18 decimals for tokens and points. Approve the exact amount if needed, then stake. Allow partial and full withdrawal. Wait for successful receipts, show pending, rejected and confirmed states, and refresh reads on account or network changes. Report how to serve the site and exercise wallet states."
          },
          "scope": ["site/**"]
        },
        {
          "key": "release",
          "vars": {
            "work": "Build offline-capable release tooling in release/ for the owner's wallet or platform signer on Sepolia (11155111). Use Foundry artifacts for TestToken(uint256 initialSupply) and ShareStaking(address tokenAddress). Document supply in base units. Confirm token creation before preparing staking deployment with its receipt address. Support resuming from transaction hashes. Verify chain ID, both successful creation receipts, nonempty runtime code at both addresses, token name and symbol equal to lowercase test, and staking.token() equal to the deployed token. Only then emit JSON to stdout with numeric chainId and strings token, staking, tokenTx and stakingTx. Document build, deploy, saving the JSON to site/deployment.json, and static publication commands. Test parsing and sequencing with local fixtures. Deliver the tool for later deployment and report operator commands and the evidence checked at each step."
          },
          "scope": ["release/**"]
        }
      ],
      "output": {"format": "markdown", "maxBytes": 12000}
    }
  ],
  "read": [
    "sepolia-staking-app/token",
    "sepolia-staking-app/staking",
    "sepolia-staking-app/website",
    "sepolia-staking-app/release"
  ],
  "cancel": [],
  "wake": {"batches": ["sepolia-staking-app"], "afterMinutes": 100},
  "finish": false
}
