3.4 KiB
GSP Commands 0.1
init
Create a minimal GSP project.
gsp init [path] [--name project-name] [--entry project.entry] [--force]
Generated structure:
project/
gsp.manifest
design/
project.entry.gsp
ai-init
Create AI-facing usage files for a GSP project.
gsp ai-init [--root .] [--agents] [--skill generic|codex] [--all] [--force]
Default output:
README.md
AI_USAGE.md
Optional output:
AGENTS.md
skills/gsp/SKILL.md
.codex/skills/gsp/SKILL.md
version
Print toolkit and protocol versions.
gsp version
gsp version --json
completion
Print or install shell completion scripts.
gsp completion powershell
gsp completion bash
gsp completion zsh
gsp completion fish
gsp completion install powershell
Completion covers subcommands, common flags, enum values, and GSP ids from gsp index --root ..
validate
Validate GSP files and references.
gsp validate [--root .] [--out report.json]
index
Build a stable GSP index.
gsp index [--root .] [--out index.json]
fields
List or validate the project custom field registry.
gsp fields list [--root .] [--out fields.json]
gsp fields validate [--root .] [--out fields-report.json]
gsp validate also validates custom fields by default.
trace
Inspect relation chains from one GSP id.
gsp trace <id> [--root .] [--depth 3] [--out trace.json]
flatten
Expand one GSP id into a flat context.
gsp flatten <id> [--root .] [--depth 3] [--include-type a,b] [--exclude-type a,b] [--out flattened.json]
pack
Create a compact AI context pack.
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:
design
implement
review
test
acceptance
handoff
inspect
Formats:
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.
gsp impact <id> [--root .] [--depth -1] [--format json|md|canvas] [--out impact.json]
Formats:
json Machine-readable impact result.
md Human-readable impact report.
canvas Obsidian JSON Canvas for affected relations.
links
List normalized links from one GSP id and its context.
gsp links <id> [--root .] [--depth -1] [--format json|md] [--out links.json]
The tool resolves link kind and status:
kind: url | file | folder | missing | unknown
status: ok | missing | invalid | unchecked
message
Validate GSP agent communication messages.
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.
gsp graph [id] [--root .] [--depth 3] [--format json|mermaid|md|canvas] [--out graph.json]
Formats:
json Machine-readable graph.
mermaid Mermaid graph body.
md Markdown file with Mermaid block.
canvas Obsidian JSON Canvas file.
Graph display uses title when present and falls back to id.
stage-check
Check minimum resolution for a stage.
gsp stage-check --stage implement [--root .] [--out stage-report.json]