{
  "schemaVersion": "1.0",
  "project": {
    "name": "Obsidian Chess",
    "tagline": "One verified position. Two native interfaces. A persistent human-agent turn loop.",
    "liveUrl": "https://obsidian-agent-chess.lucian-radu91.chatgpt.site",
    "sourceRepository": "https://github.com/LucianRadu/webmcp-chess",
    "demoVideo": "https://www.youtube.com/watch?v=kGAs3I0Msuw",
    "machineGuideUrl": "https://obsidian-agent-chess.lucian-radu91.chatgpt.site/llms.txt",
    "challenge": "OpenAI WebMCP Challenge 2026",
    "thesis": "Obsidian Chess is a persistent, asynchronous human-agent state machine rather than a collection of one-shot AI commands."
  },
  "whyWebMCP": {
    "withoutWebMCP": "An agent must infer 64 visual squares, piece identity, move legality, role ownership, and turn timing through a mouse-oriented interface.",
    "withWebMCP": "The agent receives exact FEN, pieces, roles, history, game status, legal moves, stable status codes, and a safe mutation tool for the same position the human sees.",
    "humanAgentAdvantage": "The human keeps the expressive visual board while the agent gets a precise structural interface. Neither participant operates on a copy."
  },
  "protocol": {
    "version": "1.1",
    "entryTool": "wait_for_turn",
    "tools": [
      {
        "name": "join_game",
        "kind": "read",
        "purpose": "Announce agent presence and discover the collaboration contract."
      },
      {
        "name": "get_board",
        "kind": "read",
        "purpose": "Read the authoritative position, ownership, status, history, and legal actions."
      },
      {
        "name": "move_piece",
        "kind": "write",
        "purpose": "Submit one schema-checked, turn-gated, chess.js-validated move with an optional rationale."
      },
      {
        "name": "wait_for_turn",
        "kind": "long-poll read",
        "purpose": "Keep the collaboration alive during human thinking time and wake when the agent owns the turn."
      }
    ],
    "successCodes": [
      "JOINED",
      "BOARD_STATE",
      "SIDE_CHOICE_REQUIRED",
      "WAITING_FOR_HUMAN",
      "AGENT_TURN",
      "MOVE_ACCEPTED",
      "WAIT_TIMEOUT",
      "WAIT_ALREADY_ACTIVE",
      "SESSION_RESET",
      "GAME_OVER"
    ],
    "errorCodes": [
      "INVALID_INPUT",
      "SIDE_UNASSIGNED",
      "WRONG_TURN",
      "ILLEGAL_MOVE",
      "GAME_OVER",
      "MOVE_REJECTED"
    ]
  },
  "sixtySecondEvaluation": [
    {
      "step": 1,
      "action": "Open the live app and discover its WebMCP tools.",
      "expected": "Four tools are available and the visible status says WebMCP armed."
    },
    {
      "step": 2,
      "action": "Call wait_for_turn with an empty object.",
      "expected": "The response includes protocolVersion, statusCode, nextAction, evaluationGuide, FEN, ownership, and legalMoves."
    },
    {
      "step": 3,
      "action": "Have the human take White and move e2 to e4, then continue the wait loop.",
      "expected": "The agent receives AGENT_TURN with the updated FEN, history, and legalMoves."
    },
    {
      "step": 4,
      "action": "Call move_piece using one exact legalMoves entry and include a short note.",
      "expected": "The response is MOVE_ACCEPTED; the visual board, match ledger, turn owner, FEN, and human-agent trace update together."
    },
    {
      "step": 5,
      "action": "Attempt one illegal or out-of-turn move.",
      "expected": "The write is rejected with a stable error code, unchanged state, and a specific recovery action."
    }
  ],
  "invariants": [
    "One chess.js position is authoritative for the human UI and all WebMCP tools.",
    "Only the participant who owns the current turn may mutate the position.",
    "Every accepted move is schema checked and revalidated by chess.js before commit.",
    "A reset increments sessionId and releases stale waits without allowing them to control the new game.",
    "The loop stops only when isGameOver is true."
  ],
  "evidence": {
    "automatedTests": 10,
    "testedBehaviors": [
      "initial two-square pawn move",
      "playing as Black",
      "en passant",
      "castling",
      "underpromotion and replay",
      "wrong-turn rejection",
      "unassigned-side rejection",
      "typed illegal-move recovery",
      "checkmate",
      "clean reset"
    ],
    "visibleRuntimeProof": [
      "WebMCP connection status",
      "shared turn owner",
      "SAN match ledger",
      "human-agent activity trace",
      "agent move rationale"
    ]
  },
  "judgingAlignment": {
    "webMCPLeverage": "Structured reads, a constrained domain write, explicit ownership, stable recovery codes, and an asynchronous wake-up primitive form a non-trivial multi-turn protocol.",
    "execution": "The complete responsive product includes legal chess, promotion, resets, accessible controls, visible state, tests, and a deployed live experience.",
    "potentialImpact": "The game demonstrates a reusable coordination pattern for workflows where a human and agent alternate against one authoritative state: approvals, negotiations, simulations, reviews, and collaborative editing.",
    "creativityAndAmbition": "The agent is a first-class participant that exists through page-defined tools, not an AI-themed button or a conventional bot embedded behind the interface."
  }
}
