## 1. Workspace Bootstrap - [x] 1.1 Create the four first-class implementation roots: `run/`, `platform/`, `platform_web/`, and `plugins/`. - [x] 1.2 Add root `README.md` explaining the game server management platform scope and subproject boundaries. - [x] 1.3 Add root `AGENTS.md` with cross-project code organization, OpenSpec, verification, and no-scope-creep rules. - [x] 1.4 Add local `README.md` and `AGENTS.md` files in each implementation root. - [x] 1.5 Add `scripts/check-structure.sh` and wire it into documented verification commands. ## 2. Platform Foundation Contracts - [x] 2.1 Define platform directories for API DTOs, database models, domain types, service contracts, repositories, validators, routes, config, and shared helpers. - [x] 2.2 Draft platform contracts for users, game management plugins, server instances, AI providers, run endpoints, jobs, artifacts, log streams, and audit events. - [x] 2.3 Define AI provider contract fields for provider kind, base URL, key reference, model list, relay mode, timeout, status, and redaction policy. - [x] 2.4 Define game management plugin and server instance lifecycle contracts proving one installed plugin can create many server instances. ## 3. Run Channel Contracts - [x] 3.1 Define run control contract for hello, heartbeat, capabilities, version, and capacity. - [x] 3.2 Define run job contract for claim, ack, progress, result, cancel, reconcile, idempotency, and local journal behavior. - [x] 3.3 Define log ingest contract for local spool, batch compression, sequence acknowledgement, retry, and storage adapter boundaries. - [x] 3.4 Define artifact contract for chunk upload/download, checksum, resume, throttling, and priority separation from logs. - [x] 3.5 Define optional game client bridge contract for in-game commands and structured snapshots. ## 4. Plugin System Contracts - [x] 4.1 Define game management plugin manifest schema with server type, create form, lifecycle actions, run capabilities, pages, and AI/file/log permissions. - [x] 4.2 Define local plugin development flow for dev registration, local UI hosting, action schema validation, and real platform-run flows. - [x] 4.3 Define plugin bridge contract that blocks direct run credentials, host paths, AI keys, and storage internals. - [x] 4.4 Add example plugin skeleton under `plugins/examples/` once implementation begins. ## 5. Frontend Console Contracts - [x] 5.1 Define platform_web directories for API clients, route definitions, page contracts, schemas, bridge types, components, stores, and utilities. - [x] 5.2 Define first-party page skeletons for 首页、服务器管理、插件市场、用户管理、AI 提供商管理. - [x] 5.3 Define plugin page bridge UI contract for theme tokens, server instance context, safe API calls, job dispatch, log queries, artifacts, and AI invocation. - [x] 5.4 Add frontend verification rules that prevent API types and route definitions from living inside page components. ## 6. Verification - [x] 6.1 Run `scripts/check-structure.sh` and fix missing required files or directories. - [x] 6.2 Run `openspec validate bootstrap-game-server-platform-architecture --strict` and fix proposal/spec/task issues. - [x] 6.3 Confirm OpenSpec status shows `tasks` done or ready for apply with all required artifacts present. - [x] 6.4 Update README verification instructions if any new required checker is added during implementation.