Files
browser/openspec/changes/bootstrap-game-server-platform-architecture/tasks.md
T
2026-07-11 14:56:10 +08:00

3.3 KiB

1. Workspace Bootstrap

  • 1.1 Create the four first-class implementation roots: run/, platform/, platform_web/, and plugins/.
  • 1.2 Add root README.md explaining the game server management platform scope and subproject boundaries.
  • 1.3 Add root AGENTS.md with cross-project code organization, OpenSpec, verification, and no-scope-creep rules.
  • 1.4 Add local README.md and AGENTS.md files in each implementation root.
  • 1.5 Add scripts/check-structure.sh and wire it into documented verification commands.

2. Platform Foundation Contracts

  • 2.1 Define platform directories for API DTOs, database models, domain types, service contracts, repositories, validators, routes, config, and shared helpers.
  • 2.2 Draft platform contracts for users, game management plugins, server instances, AI providers, run endpoints, jobs, artifacts, log streams, and audit events.
  • 2.3 Define AI provider contract fields for provider kind, base URL, key reference, model list, relay mode, timeout, status, and redaction policy.
  • 2.4 Define game management plugin and server instance lifecycle contracts proving one installed plugin can create many server instances.

3. Run Channel Contracts

  • 3.1 Define run control contract for hello, heartbeat, capabilities, version, and capacity.
  • 3.2 Define run job contract for claim, ack, progress, result, cancel, reconcile, idempotency, and local journal behavior.
  • 3.3 Define log ingest contract for local spool, batch compression, sequence acknowledgement, retry, and storage adapter boundaries.
  • 3.4 Define artifact contract for chunk upload/download, checksum, resume, throttling, and priority separation from logs.
  • 3.5 Define optional game client bridge contract for in-game commands and structured snapshots.

4. Plugin System Contracts

  • 4.1 Define game management plugin manifest schema with server type, create form, lifecycle actions, run capabilities, pages, and AI/file/log permissions.
  • 4.2 Define local plugin development flow for dev registration, local UI hosting, action schema validation, and real platform-run flows.
  • 4.3 Define plugin bridge contract that blocks direct run credentials, host paths, AI keys, and storage internals.
  • 4.4 Add example plugin skeleton under plugins/examples/ once implementation begins.

5. Frontend Console Contracts

  • 5.1 Define platform_web directories for API clients, route definitions, page contracts, schemas, bridge types, components, stores, and utilities.
  • 5.2 Define first-party page skeletons for 首页、服务器管理、插件市场、用户管理、AI 提供商管理.
  • 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.
  • 5.4 Add frontend verification rules that prevent API types and route definitions from living inside page components.

6. Verification

  • 6.1 Run scripts/check-structure.sh and fix missing required files or directories.
  • 6.2 Run openspec validate bootstrap-game-server-platform-architecture --strict and fix proposal/spec/task issues.
  • 6.3 Confirm OpenSpec status shows tasks done or ready for apply with all required artifacts present.
  • 6.4 Update README verification instructions if any new required checker is added during implementation.