Add context packs impact analysis and message validation

This commit is contained in:
2026-05-07 10:17:24 +08:00
parent f2d0a83705
commit 0c5254eb1b
18 changed files with 780 additions and 13 deletions

View File

@@ -100,9 +100,55 @@ gsp flatten <id> [--root .] [--depth 3] [--include-type a,b] [--exclude-type a,b
Create a compact AI context pack.
```bash
gsp pack <id> [--root .] [--depth 3] [--budget 12000] [--out context-pack.json]
gsp pack <id> [--root .] [--for implement] [--stage implement] [--depth 3] [--budget 12000] [--format json|md|canvas] [--out context-pack.json]
```
The `--for` value describes the task intent:
```text
design
implement
review
test
acceptance
handoff
inspect
```
Formats:
```text
json Machine-readable context pack.
md Human-readable and AI-readable context pack.
canvas Obsidian JSON Canvas for included GSP relations.
```
## impact
Find direct and indirect GSPs affected by a GSP id.
```bash
gsp impact <id> [--root .] [--depth -1] [--format json|md|canvas] [--out impact.json]
```
Formats:
```text
json Machine-readable impact result.
md Human-readable impact report.
canvas Obsidian JSON Canvas for affected relations.
```
## message
Validate GSP agent communication messages.
```bash
gsp message validate <file> [--root .] [--out message-report.json]
```
Message files use YAML and reference GSP ids from the project.
## graph
Generate a relation graph.