Add GSP project manifest and design layout
This commit is contained in:
@@ -12,6 +12,7 @@ README 面向准备使用 GSP 语言的人类和 AI。它说明 GSP 的用途、
|
||||
|---|---|
|
||||
| `README.md` | GSP 语言使用前说明。给人类和 AI 阅读。 |
|
||||
| `gsp.schema.json` | GSP 第一版核心字段规范。使用 JSON Schema 表达,便于 AI、工具、编译器和实现模块识别。 |
|
||||
| `gsp.manifest.schema.json` | GSP 工程 manifest 字段规范。 |
|
||||
|
||||
## GSP 是什么
|
||||
|
||||
@@ -57,6 +58,8 @@ id: feedback.positive
|
||||
|
||||
只有 `id` 的 GSP 是占位声明。它表示该设计对象存在,但尚未被细化。
|
||||
|
||||
默认情况下,`.gsp` 文件放在 GSP 工程根目录的 `design/` 目录下。
|
||||
|
||||
## 基础 GSP
|
||||
|
||||
`context` 用于写入核心设计内容。
|
||||
|
||||
62
language/gsp.manifest.schema.json
Normal file
62
language/gsp.manifest.schema.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://gsp.local/schema/gsp.manifest.schema.json",
|
||||
"title": "GSP Manifest",
|
||||
"description": "Game Specification Protocol project manifest schema.",
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"gspVersion": {
|
||||
"type": "string",
|
||||
"description": "GSP language version used by this project."
|
||||
},
|
||||
"toolkitVersion": {
|
||||
"type": "string",
|
||||
"description": "Expected GSP Toolkit version."
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "Project id or name."
|
||||
},
|
||||
"entry": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"description": "Entry GSP ids."
|
||||
},
|
||||
"scan": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"description": "Directories or files scanned by the Toolkit. Defaults to design."
|
||||
},
|
||||
"stageRules": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"minResolution": {
|
||||
"type": "string",
|
||||
"enum": ["L0", "L1", "L2", "L3", "L4", "L5"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"types": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "Default Toolkit output directory."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user