Add GSP links field and link inspection
This commit is contained in:
@@ -84,6 +84,7 @@ context: 积极反馈。用于让玩家在操作后获得明确、正向、值
|
||||
| `with` | 否 | 通用设计语境关系。 |
|
||||
| `refines` | 否 | 单一细化来源。 |
|
||||
| `type` | 否 | 辅助分类。 |
|
||||
| `links` | 否 | 关联路径、文件夹、URL 或外部地址。 |
|
||||
|
||||
## 核心边界
|
||||
|
||||
@@ -95,6 +96,7 @@ context: 积极反馈。用于让玩家在操作后获得明确、正向、值
|
||||
- `with` 是通用设计语境关系。
|
||||
- `refines` 是单一细化来源。
|
||||
- `type` 是辅助分类字段。
|
||||
- `links` 是外部对象关联字段。
|
||||
- GSP 不预设抽象和实体的硬边界。
|
||||
- 置信度、自我纠错、模块信誉和历史归因属于外部模块,不进入 GSP 核心协议。
|
||||
|
||||
@@ -124,6 +126,40 @@ title: 抽奖页面
|
||||
|
||||
工具在图形、索引和 AI 入口中优先使用 `title` 展示。没有 `title` 时使用 `id`。
|
||||
|
||||
## links
|
||||
|
||||
`links` 表示当前 GSP 关联到的路径、文件夹、URL 或外部地址。
|
||||
|
||||
```yaml
|
||||
links: assets/ui/button_primary.png
|
||||
```
|
||||
|
||||
```yaml
|
||||
links:
|
||||
- assets/ui/button_primary.png
|
||||
- https://example.com/style-guide
|
||||
```
|
||||
|
||||
```yaml
|
||||
links:
|
||||
- path: runtime/ui/RewardButton.prefab
|
||||
role: binding
|
||||
- path: docs/reward-style.md
|
||||
role: reference
|
||||
```
|
||||
|
||||
对象写法只使用 `path`、`role` 和 `context`。`role` 默认是 `reference`。
|
||||
|
||||
内置 `role`:
|
||||
|
||||
| role | 含义 |
|
||||
|---|---|
|
||||
| `reference` | 参考资料。 |
|
||||
| `source` | 原始来源或素材来源。 |
|
||||
| `binding` | 与实现对象绑定。 |
|
||||
| `output` | 输出物。 |
|
||||
| `evidence` | 验收、测试或结论依据。 |
|
||||
|
||||
## with
|
||||
|
||||
`with` 表示当前 GSP 需要与哪些 GSP 一起进入设计语境。
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
- Preserve `id`; do not rename it unless explicitly requested.
|
||||
- `id` is the unique identity of a GSP unit.
|
||||
- `title` is display text; use `id` when `title` is missing.
|
||||
- `links` associates a GSP with paths, folders, URLs, or external addresses.
|
||||
- Use only fields valid for the declared GSP version.
|
||||
- `with` means related design context.
|
||||
- `refines` means single-source refinement.
|
||||
@@ -16,6 +17,7 @@
|
||||
- Use `gsp trace <id>` to inspect relations.
|
||||
- Use `gsp flatten <id>` before implementation or task splitting.
|
||||
- Use `gsp pack <id>` when a compact AI context is needed.
|
||||
- Use `gsp links <id>` to inspect associated files, folders, URLs, or addresses.
|
||||
- Use `gsp impact <id>` before changing shared GSP units.
|
||||
- Use `gsp message validate <file>` for agent communication messages.
|
||||
- Use `gsp stage-check --stage <stage>` before stage handoff.
|
||||
|
||||
@@ -139,6 +139,21 @@ md Human-readable impact report.
|
||||
canvas Obsidian JSON Canvas for affected relations.
|
||||
```
|
||||
|
||||
## links
|
||||
|
||||
List normalized links from one GSP id and its context.
|
||||
|
||||
```bash
|
||||
gsp links <id> [--root .] [--depth -1] [--format json|md] [--out links.json]
|
||||
```
|
||||
|
||||
The tool resolves link kind and status:
|
||||
|
||||
```text
|
||||
kind: url | file | folder | missing | unknown
|
||||
status: ok | missing | invalid | unchecked
|
||||
```
|
||||
|
||||
## message
|
||||
|
||||
Validate GSP agent communication messages.
|
||||
|
||||
@@ -59,6 +59,44 @@
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Optional helper category for search, display, compiler hints and context pruning."
|
||||
},
|
||||
"links": {
|
||||
"description": "External paths, folders, URLs, or addresses associated with this GSP.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": ["reference", "source", "binding", "output", "evidence"]
|
||||
},
|
||||
"context": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user