Files
2026-07-11 14:56:10 +08:00

4.0 KiB

ADDED Requirements

Requirement: Platform Go Runtime Baseline

platform/ SHALL contain an independent Go module with a minimal command entry point, configuration package, HTTP health surface, and automated tests.

Scenario: Platform tests run

  • WHEN a contributor runs the documented platform test command
  • THEN the platform Go module test suite completes successfully without importing code from run/, platform_web/, or plugins/

Scenario: Platform server starts

  • WHEN a contributor runs the documented platform development command
  • THEN the process starts a local HTTP server with a health response suitable for smoke testing

Requirement: Run Go Runtime Baseline

run/ SHALL contain an independent Go module with a minimal command entry point, configuration package, platform client boundary, and automated tests.

Scenario: Run tests run

  • WHEN a contributor runs the documented run test command
  • THEN the run Go module test suite completes successfully without importing code from platform/, platform_web/, or plugins/

Scenario: Run executor starts

  • WHEN a contributor runs the documented run development command
  • THEN the process starts in a local smoke-test mode without exposing host paths, raw credentials, or direct sockets to plugins or frontend code

Requirement: Platform Web TypeScript Runtime Baseline

platform_web/ SHALL contain a Vite React TypeScript app with route definitions, required first-party page placeholders, API client boundaries, shared components, theme tokens, and automated build/typecheck/test scripts.

Scenario: Frontend checks run

  • WHEN a contributor runs the documented platform_web verification commands
  • THEN TypeScript typecheck, tests, and production build complete successfully

Scenario: Required navigation renders

  • WHEN the platform_web dev server is opened in a browser
  • THEN the shell renders navigation entries for 首页、服务器管理、插件市场、用户管理、AI 提供商管理 without visible overlap on desktop and mobile widths

Requirement: Plugin Workspace TypeScript Baseline

plugins/ SHALL contain npm TypeScript tooling for SDK exports, JSON schema validation, example plugin fixtures, and automated tests.

Scenario: Plugin checks run

  • WHEN a contributor runs the documented plugin verification commands
  • THEN SDK typecheck, schema validation, and tests complete successfully

Scenario: Example manifest validates

  • WHEN the plugin schema validation command is run
  • THEN plugins/examples/dev-game-plugin/manifest.json validates against plugins/manifests/game-plugin.manifest.schema.json

Requirement: Root Verification Orchestration

The repository SHALL provide root-level verification scripts that orchestrate structure checks and per-root build/test commands without containing application logic.

Scenario: Full baseline check runs

  • WHEN a contributor runs the documented full check command from the repository root
  • THEN it runs structure verification plus platform, run, platform_web, and plugin baseline checks

Scenario: Structure rules include new baseline files

  • WHEN scripts/check-structure.sh runs after this change
  • THEN it verifies the new required module, package, command, test, and documentation baseline files added by this change

Requirement: Development Documentation

The repository SHALL document required tool versions, local development commands, verification commands, and the scope limits of this runtime baseline.

Scenario: Contributor reads the README

  • WHEN a contributor reads the root and per-root README files
  • THEN they can identify how to install dependencies, start local processes, run tests, run builds, and perform the frontend browser walkthrough

Scenario: Future change reads baseline docs

  • WHEN a future OpenSpec implementation needs to add product behavior
  • THEN it can reuse the documented baseline commands instead of inventing a new verification surface