summer-engine 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/commands/skills.js +9 -3
- package/dist/lib/skills-registry.d.ts +17 -11
- package/dist/lib/skills-registry.js +36 -11
- package/package.json +1 -1
- package/skills/README.md +96 -0
- package/skills/_meta/skill-create/SKILL.md +143 -0
- package/skills/_meta/skill-improve/SKILL.md +89 -0
- package/skills/_meta/skill-test/SKILL.md +86 -0
- package/skills/_shared/collaborative-protocol.md +50 -0
- package/skills/_shared/gd-style.md +121 -0
- package/skills/_shared/godot-version.md +32 -0
- package/skills/_shared/mcp-tools-reference.md +133 -0
- package/skills/_shared/template-registry.md +40 -0
- package/skills/_tests/runner.md +90 -0
- package/skills/_tests/specs/3d-lighting.md +19 -0
- package/skills/_tests/specs/asset-strategy.md +19 -0
- package/skills/_tests/specs/fps-controller.md +100 -0
- package/skills/_tests/specs/gdscript-patterns.md +19 -0
- package/skills/_tests/specs/make-game.md +19 -0
- package/skills/_tests/specs/scene-composition.md +19 -0
- package/skills/_tests/specs/ui-basics.md +19 -0
- package/skills/{asset-strategy → asset-pipeline/asset-strategy}/SKILL.md +4 -5
- package/skills/catalog.yaml +636 -0
- package/skills/{fps-controller → character-controllers/fps-controller}/SKILL.md +6 -5
- package/skills/{3d-lighting → rendering-and-lighting/3d-lighting}/SKILL.md +5 -5
- package/skills/{make-game → scene-and-project/make-game}/SKILL.md +5 -5
- package/skills/{scene-composition → scene-and-project/scene-composition}/SKILL.md +5 -5
- package/skills/{gdscript-patterns → scripting-patterns/gdscript-patterns}/SKILL.md +5 -5
- package/skills/{ui-basics → ui-and-ux/ui-basics}/SKILL.md +5 -5
- /package/skills/{gdscript-patterns → scripting-patterns/gdscript-patterns}/reference.md +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Collaborative Protocol — "May I write?"
|
|
2
|
+
|
|
3
|
+
> Every Summer skill must follow this. The agent works *with* the user, not around them.
|
|
4
|
+
|
|
5
|
+
## The rule
|
|
6
|
+
|
|
7
|
+
**Before any user-visible write step, the agent must explicitly state what it is about to do and ask permission to proceed.**
|
|
8
|
+
|
|
9
|
+
This applies to:
|
|
10
|
+
- Creating files (`.gd`, `.tscn`, `.tres`, JSON, configs)
|
|
11
|
+
- Modifying existing files (especially `.gd` and `.tscn`)
|
|
12
|
+
- Running irreversible operations (deletion, reset, force-overwrite)
|
|
13
|
+
- Setting up project-wide settings (`project.godot`)
|
|
14
|
+
- Installing tools, libraries, or templates
|
|
15
|
+
|
|
16
|
+
Reading is unconditional. Inspection, scene-tree walks, diagnostics — never need permission.
|
|
17
|
+
|
|
18
|
+
## Phrasing
|
|
19
|
+
|
|
20
|
+
Plain, short, action-first. Examples:
|
|
21
|
+
|
|
22
|
+
> May I create `scenes/player.tscn` and add a CharacterBody3D + Camera3D?
|
|
23
|
+
|
|
24
|
+
> I'm about to overwrite `levels/level_01.tscn`. The current version has 14 nodes — I'll preserve them and add the new lighting setup. Continue?
|
|
25
|
+
|
|
26
|
+
> May I attach `scripts/player_controller.gd` to `./World/Player`?
|
|
27
|
+
|
|
28
|
+
> I'm going to bind `move_forward`, `move_back`, `move_left`, `move_right`, `jump`. OK?
|
|
29
|
+
|
|
30
|
+
## What this prevents
|
|
31
|
+
|
|
32
|
+
1. **Silent overwrites.** The agent stomps the user's hand-edited script.
|
|
33
|
+
2. **Cascading scope creep.** A "small fix" turns into a 30-file refactor.
|
|
34
|
+
3. **Unclear state.** The user has no idea what changed when something breaks.
|
|
35
|
+
4. **Trust loss.** One unauthorized edit and the user stops trusting the agent.
|
|
36
|
+
|
|
37
|
+
## What this is NOT
|
|
38
|
+
|
|
39
|
+
- Not a confirmation dialog for every property change in a single skill execution. Group related writes into one ask: "I'm about to add the player root, attach the controller script, and bind 5 input actions. OK?"
|
|
40
|
+
- Not a request for design input. The skill should know what to do; the ask is for permission, not direction.
|
|
41
|
+
- Not a stop on simple read-only ops or single-property tweaks the user clearly directed.
|
|
42
|
+
|
|
43
|
+
## Linter check
|
|
44
|
+
|
|
45
|
+
The `_meta/skill-test/SKILL.md` static linter looks for the phrases:
|
|
46
|
+
- "May I" / "May I write" / "May I create" / "May I attach"
|
|
47
|
+
- "I'm about to"
|
|
48
|
+
- "Continue?" / "OK?" / "Proceed?"
|
|
49
|
+
|
|
50
|
+
A skill that mutates files but never says any of these fails the linter.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# GDScript Style — Summer Conventions
|
|
2
|
+
|
|
3
|
+
> The bar for GDScript in Summer. Skills should produce code that matches this. Where Godot's official style guide is silent, this is the tiebreaker.
|
|
4
|
+
|
|
5
|
+
## File structure
|
|
6
|
+
|
|
7
|
+
```gdscript
|
|
8
|
+
class_name PlayerController
|
|
9
|
+
extends CharacterBody3D
|
|
10
|
+
|
|
11
|
+
# 1. Constants
|
|
12
|
+
const SPEED := 5.0
|
|
13
|
+
const JUMP_VELOCITY := 4.5
|
|
14
|
+
const GRAVITY := 9.8
|
|
15
|
+
|
|
16
|
+
# 2. Exports (designer-tweakable in inspector)
|
|
17
|
+
@export var move_speed: float = 5.0
|
|
18
|
+
@export var jump_height: float = 1.0
|
|
19
|
+
@export_range(0.1, 10.0) var look_sensitivity: float = 1.0
|
|
20
|
+
|
|
21
|
+
# 3. Signals (events this node emits)
|
|
22
|
+
signal died
|
|
23
|
+
signal health_changed(new_value: int)
|
|
24
|
+
|
|
25
|
+
# 4. Onready references (cached node lookups)
|
|
26
|
+
@onready var camera: Camera3D = $Camera3D
|
|
27
|
+
@onready var collision: CollisionShape3D = $CollisionShape3D
|
|
28
|
+
|
|
29
|
+
# 5. Private state (snake_case, leading underscore optional)
|
|
30
|
+
var _is_grounded: bool = false
|
|
31
|
+
var _velocity := Vector3.ZERO
|
|
32
|
+
|
|
33
|
+
# 6. Lifecycle (in canonical order)
|
|
34
|
+
func _ready() -> void:
|
|
35
|
+
pass
|
|
36
|
+
|
|
37
|
+
func _process(delta: float) -> void:
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
func _physics_process(delta: float) -> void:
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
func _input(event: InputEvent) -> void:
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
# 7. Public API (PascalCase or snake_case methods, snake_case for funcs)
|
|
47
|
+
func take_damage(amount: int) -> void:
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
# 8. Private helpers (leading underscore)
|
|
51
|
+
func _calculate_movement(delta: float) -> Vector3:
|
|
52
|
+
return Vector3.ZERO
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Type hints
|
|
56
|
+
|
|
57
|
+
**Always type-hint.** No bare `var x = 5`. Use `:=` for inferred typing or `:` for explicit.
|
|
58
|
+
|
|
59
|
+
```gdscript
|
|
60
|
+
# RIGHT
|
|
61
|
+
var speed: float = 5.0
|
|
62
|
+
var name := "Player"
|
|
63
|
+
func attack(target: Node3D, amount: int) -> bool:
|
|
64
|
+
return true
|
|
65
|
+
|
|
66
|
+
# WRONG
|
|
67
|
+
var speed = 5.0
|
|
68
|
+
func attack(target, amount):
|
|
69
|
+
return true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Naming
|
|
73
|
+
|
|
74
|
+
| Thing | Convention | Example |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| Class | PascalCase | `class_name PlayerController` |
|
|
77
|
+
| File | snake_case | `player_controller.gd` |
|
|
78
|
+
| Variable, function | snake_case | `move_speed`, `take_damage()` |
|
|
79
|
+
| Constant | SCREAMING_SNAKE_CASE | `const MAX_HEALTH := 100` |
|
|
80
|
+
| Signal | snake_case (past tense for events) | `died`, `health_changed` |
|
|
81
|
+
| Private | leading underscore | `_is_grounded`, `_calculate_movement` |
|
|
82
|
+
| Node in scene | PascalCase | `Player`, `Camera3D`, `CollisionShape3D` |
|
|
83
|
+
|
|
84
|
+
## Signals
|
|
85
|
+
|
|
86
|
+
Define with typed args. Connect in `_ready()` or in scene `.tscn` directly.
|
|
87
|
+
|
|
88
|
+
```gdscript
|
|
89
|
+
signal health_changed(new_value: int, max_value: int)
|
|
90
|
+
|
|
91
|
+
func _ready() -> void:
|
|
92
|
+
health_changed.connect(_on_health_changed)
|
|
93
|
+
|
|
94
|
+
func _on_health_changed(new_value: int, max_value: int) -> void:
|
|
95
|
+
pass
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Tweens
|
|
99
|
+
|
|
100
|
+
Use `create_tween()` for animation. Don't manually lerp in `_process` unless you need fine control.
|
|
101
|
+
|
|
102
|
+
```gdscript
|
|
103
|
+
var tween := create_tween()
|
|
104
|
+
tween.tween_property(self, "modulate", Color.WHITE, 0.3)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## What to avoid
|
|
108
|
+
|
|
109
|
+
- Bare `var x = something` (no type)
|
|
110
|
+
- `Object` typed parameters (use specific class)
|
|
111
|
+
- `match` for two-branch logic (use `if`)
|
|
112
|
+
- Recreating node lookups in `_process` (cache via `@onready`)
|
|
113
|
+
- Hard-coded strings for node paths in code (use `@onready` + scene-relative paths)
|
|
114
|
+
- Setting `position` in `_process` for physics objects (use `_physics_process` and `velocity`)
|
|
115
|
+
|
|
116
|
+
## See also
|
|
117
|
+
|
|
118
|
+
- [Official Godot GDScript style guide](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html)
|
|
119
|
+
- `scripting-patterns/gdscript-patterns/SKILL.md` — patterns and idioms
|
|
120
|
+
- `scripting-patterns/signal-patterns/SKILL.md` — signal usage
|
|
121
|
+
- `scripting-patterns/state-machine-patterns/SKILL.md` — state machine patterns
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Godot / Summer Engine Version Reference
|
|
2
|
+
|
|
3
|
+
> Read this **before** writing any code, especially shaders or rendering code. Godot's API is moving; the LLM cutoff date matters per domain.
|
|
4
|
+
|
|
5
|
+
## Engine fork base
|
|
6
|
+
|
|
7
|
+
Summer Engine is a fork of **Godot 4.5** (stable). All skills assume Godot 4.x APIs.
|
|
8
|
+
|
|
9
|
+
## LLM training cutoff vs. Godot release dates
|
|
10
|
+
|
|
11
|
+
| Domain | Godot 4.x churn | Action |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Scripting (GDScript core) | low | Trust your training. Spot-check signatures only when something feels off. |
|
|
14
|
+
| Scene / node tree APIs | low | Trust your training. |
|
|
15
|
+
| Renderer (`RenderingServer`, `Compositor`) | high in 4.4 / 4.5 | Verify before writing. Check `MovieMaker`, `Compositor` effects, `RenderSceneBuffers` — these renamed/added recently. |
|
|
16
|
+
| Shaders (`canvas_item`, `spatial`, `compute`) | medium | Built-in functions stable, but `hint_*` flags shifted. Verify `hint_screen_texture` / `hint_depth_texture` syntax. |
|
|
17
|
+
| Animation (`AnimationTree`, `AnimationMixer`) | high (4.0 → 4.3 rename) | Use `AnimationMixer` for new code, not deprecated `AnimationPlayer`-as-mixer. |
|
|
18
|
+
| Multiplayer (`MultiplayerAPI`) | medium | High-level API stable. `SceneReplicationConfig` settled in 4.0+. |
|
|
19
|
+
| Editor / EditorPlugin | medium | Spot-check. |
|
|
20
|
+
| `Tween` / `SceneTreeTween` | low | Stable since 4.0. |
|
|
21
|
+
|
|
22
|
+
## Summer-specific deltas from vanilla Godot
|
|
23
|
+
|
|
24
|
+
- Local API server runs on `localhost:6550` (set per machine via `~/.summer/api-token`).
|
|
25
|
+
- Engine ships a webview module in `modules/1summer_engine/` — do not assume vanilla Godot for editor UI patches.
|
|
26
|
+
- Project root contains `.summer/` for project memory; do not delete it.
|
|
27
|
+
|
|
28
|
+
## When in doubt
|
|
29
|
+
|
|
30
|
+
1. Use Summer MCP tools (`summer_inspect_node`, `summer_inspect_resource`) to read live editor state instead of guessing.
|
|
31
|
+
2. Use `summer_get_diagnostics` after every scene change.
|
|
32
|
+
3. Check `_shared/mcp-tools-reference.md` for the canonical tool list.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Summer MCP Tools — Canonical Reference
|
|
2
|
+
|
|
3
|
+
> Use this as the single source of truth for which Summer MCP tool to call. Skills should reference tool names exactly as written here.
|
|
4
|
+
|
|
5
|
+
## When to use Summer MCP vs. host file edits
|
|
6
|
+
|
|
7
|
+
**Use Summer MCP for** anything that needs the live editor or Godot's import pipeline:
|
|
8
|
+
- Scene graph mutation (`.tscn`)
|
|
9
|
+
- Node properties and resources (`.tres`)
|
|
10
|
+
- Project settings (`project.godot`) and InputMap
|
|
11
|
+
- Asset import (Godot's import pipeline must run)
|
|
12
|
+
- Play / stop / runtime state
|
|
13
|
+
- Diagnostics, console, debugger output, script errors
|
|
14
|
+
|
|
15
|
+
**Use the host agent's file tools for** plain text:
|
|
16
|
+
- `.gd` GDScript files
|
|
17
|
+
- `.cs` C# files
|
|
18
|
+
- `.json`, `.md`, `.txt`, `.yaml`
|
|
19
|
+
- Most simple `.tres` resources where the structure is well-known
|
|
20
|
+
|
|
21
|
+
**Rule of thumb:** if Godot's importer or the live editor needs to know about it, MCP. Otherwise, file edits.
|
|
22
|
+
|
|
23
|
+
## Tool surface (37 tools)
|
|
24
|
+
|
|
25
|
+
### Scene graph (10)
|
|
26
|
+
|
|
27
|
+
| Tool | Use |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `summer_get_scene_tree` | Read current scene graph. Always do this before mutating. |
|
|
30
|
+
| `summer_open_main_scene` | Open the project's main scene. |
|
|
31
|
+
| `summer_open_scene` | Open a specific `.tscn`. |
|
|
32
|
+
| `summer_create_scene` | Create a new scene. |
|
|
33
|
+
| `summer_inspect_node` | Read a single node's properties. |
|
|
34
|
+
| `summer_add_node` | Add a node to the active scene. |
|
|
35
|
+
| `summer_remove_node` | Remove a node. |
|
|
36
|
+
| `summer_replace_node` | Swap a node's type, preserving children. |
|
|
37
|
+
| `summer_select_node` | Set editor selection (visual feedback for the user). |
|
|
38
|
+
| `summer_save_scene` | Persist changes. **Always save before play.** |
|
|
39
|
+
|
|
40
|
+
### Properties / resources (4)
|
|
41
|
+
|
|
42
|
+
| Tool | Use |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `summer_set_prop` | Set a typed property (Vector3, Color, etc.) using Godot's `str_to_var()`. |
|
|
45
|
+
| `summer_set_resource_property` | Set a property on a nested resource (e.g., CollisionShape's `shape.radius`). |
|
|
46
|
+
| `summer_inspect_resource` | Read a resource's properties. |
|
|
47
|
+
| `summer_connect_signal` | Wire a signal between nodes. |
|
|
48
|
+
|
|
49
|
+
### Project & input (2)
|
|
50
|
+
|
|
51
|
+
| Tool | Use |
|
|
52
|
+
|---|---|
|
|
53
|
+
| `summer_project_setting` | Modify `project.godot` settings (rendering, physics). |
|
|
54
|
+
| `summer_input_map_bind` | Bind input actions in InputMap. Folds in the legacy `add_action` step. |
|
|
55
|
+
|
|
56
|
+
### Import pipeline (2)
|
|
57
|
+
|
|
58
|
+
| Tool | Use |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `summer_import_from_url` | Download a `.glb`/`.png`/etc and run Godot's full import pipeline. |
|
|
61
|
+
| `summer_import_from_url_batch` | Same, batched (single filesystem scan). |
|
|
62
|
+
|
|
63
|
+
### Play / runtime (3)
|
|
64
|
+
|
|
65
|
+
| Tool | Use |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `summer_play` | Run the game. |
|
|
68
|
+
| `summer_stop` | Stop the running game. |
|
|
69
|
+
| `summer_is_running` | Check play state before deciding to call `summer_stop`. |
|
|
70
|
+
|
|
71
|
+
### Diagnostics (5)
|
|
72
|
+
|
|
73
|
+
| Tool | Use |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `summer_get_diagnostics` | Aggregate error/warning summary. Call after every change. |
|
|
76
|
+
| `summer_get_console` | Engine output panel. |
|
|
77
|
+
| `summer_clear_console` | Clear before a fresh play, so post-run output is clean. |
|
|
78
|
+
| `summer_get_debugger_errors` | Runtime errors with stack traces. |
|
|
79
|
+
| `summer_get_script_errors` | Script compilation errors. |
|
|
80
|
+
|
|
81
|
+
### Asset library (2)
|
|
82
|
+
|
|
83
|
+
| Tool | Use |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `summer_search_assets` | Free public asset search (community library + user's own). Sources: `library`, `community`, `my_assets`, `all`. |
|
|
86
|
+
| `summer_import_asset` | Download a found asset and run import. |
|
|
87
|
+
|
|
88
|
+
### Asset generation (4 — metered)
|
|
89
|
+
|
|
90
|
+
| Tool | Use |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `summer_generate_image` | AI image gen. |
|
|
93
|
+
| `summer_generate_3d` | Image-to-3D. |
|
|
94
|
+
| `summer_generate_audio` | SFX / music gen. |
|
|
95
|
+
| `summer_generate_video` | Video gen. |
|
|
96
|
+
|
|
97
|
+
### Job tracking (2)
|
|
98
|
+
|
|
99
|
+
| Tool | Use |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `summer_check_job` | Poll a generation job. |
|
|
102
|
+
| `summer_batch` | Run multiple ops as a transaction. |
|
|
103
|
+
|
|
104
|
+
### Meta (2)
|
|
105
|
+
|
|
106
|
+
| Tool | Use |
|
|
107
|
+
|---|---|
|
|
108
|
+
| `summer_get_project_context` | Project structure summary — call at start of session. |
|
|
109
|
+
| `summer_get_agent_playbook` | Daily operating contract — call at start of session. |
|
|
110
|
+
|
|
111
|
+
## Common pattern
|
|
112
|
+
|
|
113
|
+
Every scene-touching skill should follow this loop:
|
|
114
|
+
|
|
115
|
+
1. `summer_get_project_context` — orient.
|
|
116
|
+
2. `summer_get_agent_playbook` — read the rules.
|
|
117
|
+
3. `summer_get_scene_tree` — see what's there.
|
|
118
|
+
4. (mutations: `summer_add_node`, `summer_set_prop`, `summer_connect_signal`, ...)
|
|
119
|
+
5. `summer_save_scene` — persist.
|
|
120
|
+
6. `summer_get_script_errors` — catch GDScript breakage.
|
|
121
|
+
7. `summer_play` → `summer_get_debugger_errors` → `summer_stop` if verifying runtime.
|
|
122
|
+
|
|
123
|
+
## Trap: silent-fail on inline sub-resource SetResourceProperty
|
|
124
|
+
|
|
125
|
+
`summer_set_resource_property` will silently fail if the target resource is an inline `sub_resource` rather than a standalone `.tres`. If you need to set nested properties (mesh size, shape radius, material color), make the resource standalone first:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
summer_add_node(... mesh = "BoxMesh" ...) # creates inline sub_resource
|
|
129
|
+
# WRONG: summer_set_resource_property("./Box", "mesh.size", "Vector3(2,2,2)") ← silently fails
|
|
130
|
+
# RIGHT: save mesh as .tres, then SetResourceProperty
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
This is documented in `public/knowledge/asset_pipeline.json`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Template Registry
|
|
2
|
+
|
|
3
|
+
> Skills cross-link to template repos via the `template-id` frontmatter field. This file is the canonical mapping. When a template repo moves, update one entry here.
|
|
4
|
+
|
|
5
|
+
## Template IDs
|
|
6
|
+
|
|
7
|
+
| template-id | Description | Repo |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `template-3d-fps` | First-person shooter starter (CharacterBody3D, Camera3D, input, sample level) | https://github.com/SummerEngine/FPS-template-Summer-Engine |
|
|
10
|
+
| `template-3d-tps` | Third-person shooter starter | https://github.com/SummerEngine/tps-template |
|
|
11
|
+
| `template-2d-platformer` | 2D platformer starter (TileMap, CharacterBody2D, parallax) | TBD |
|
|
12
|
+
| `template-3d-platformer` | 3D platformer starter (jump, double jump, simple level) | TBD |
|
|
13
|
+
| `template-top-down-rpg` | Top-down ARPG starter | TBD |
|
|
14
|
+
| `template-2d-deckbuilder` | Deck-builder starter (card, deck, draw, discard, energy) | TBD (prototype lives at `templates/template-2d-deckbuilder/`) |
|
|
15
|
+
| `template-tower-defense` | Tower defense starter | TBD |
|
|
16
|
+
| `template-walking-sim` | Walking sim starter | TBD |
|
|
17
|
+
|
|
18
|
+
## Convention
|
|
19
|
+
|
|
20
|
+
Each template is its own GitHub repo, MIT licensed, kept small (< 50 MB). Templates ship working code. Skills describe patterns. A skill links to the matching template via:
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
## Want a working starter?
|
|
24
|
+
|
|
25
|
+
This skill describes the pattern. For a runnable project, use the template:
|
|
26
|
+
|
|
27
|
+
→ **template-id**: `template-3d-fps`
|
|
28
|
+
→ **Repo**: https://github.com/SummerEngine/FPS-template-Summer-Engine
|
|
29
|
+
→ **Bootstrap**: `summer template clone template-3d-fps my-fps`
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Linter check
|
|
33
|
+
|
|
34
|
+
The `_meta/skill-test/SKILL.md` static linter validates that any `template-id:` declared in a skill's frontmatter exists in the table above.
|
|
35
|
+
|
|
36
|
+
## Adding a template
|
|
37
|
+
|
|
38
|
+
1. Create a new GitHub repo under `SummerEngine` org, MIT license.
|
|
39
|
+
2. Add the `template-id`, description, and repo URL to the table above.
|
|
40
|
+
3. Reference the `template-id` from any relevant skill.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Skill Test Runner
|
|
2
|
+
|
|
3
|
+
> How `/skill-test` and `/skill-improve` actually work in this repo. Read this if you're authoring a behavioral spec or trying to understand the test pipeline.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
skills/
|
|
9
|
+
├── _meta/skill-test/SKILL.md # the linter + spec runner (3 modes)
|
|
10
|
+
├── _meta/skill-improve/SKILL.md # the eval harness for iteration
|
|
11
|
+
└── _tests/
|
|
12
|
+
├── runner.md # this file
|
|
13
|
+
├── specs/
|
|
14
|
+
│ └── <skill-name>.md # behavioral specs, one per non-_meta skill
|
|
15
|
+
└── runs/ # generated, gitignored
|
|
16
|
+
└── <skill-name>/
|
|
17
|
+
├── baseline/
|
|
18
|
+
└── proposed/
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## What a spec looks like
|
|
22
|
+
|
|
23
|
+
Every spec at `_tests/specs/<skill-name>.md` has:
|
|
24
|
+
|
|
25
|
+
- A `## Fixture` block describing the starting state and tool availability.
|
|
26
|
+
- One or more `## Case <N>: <Happy | Failure | Edge>` blocks.
|
|
27
|
+
- Each Case has `**Input:**`, `**Expected MCP tool sequence:**`, and `**Assertions:**` (markdown checkboxes).
|
|
28
|
+
|
|
29
|
+
Reference: `_tests/specs/fps-controller.md` (canonical example).
|
|
30
|
+
|
|
31
|
+
## Static linter (cheap, every commit)
|
|
32
|
+
|
|
33
|
+
Run by `/skill-test <name>` in `static` mode. Pure markdown reasoning — no subagents, no tool calls.
|
|
34
|
+
|
|
35
|
+
The 7 checks live in `_meta/skill-test/SKILL.md` § "Mode: static". Re-read that for the canonical list.
|
|
36
|
+
|
|
37
|
+
## Spec runner (medium, weekly)
|
|
38
|
+
|
|
39
|
+
Run by `/skill-test <name>` in `spec` mode. Reads SKILL.md and the matching spec, reasons over the assertions. No execution.
|
|
40
|
+
|
|
41
|
+
This catches drift between what the skill says and what its spec demands. It does not catch agent variation — for that, use `/skill-improve`.
|
|
42
|
+
|
|
43
|
+
## Eval harness (expensive, on-demand)
|
|
44
|
+
|
|
45
|
+
Run by `/skill-improve <name>`. Spawns parallel `Task` subagents with the current SKILL.md vs. proposed SKILL.md. Compares outputs against assertions. Decides which wins. Writes results to `_tests/runs/<name>/`.
|
|
46
|
+
|
|
47
|
+
Use this when:
|
|
48
|
+
- A skill consistently fails its spec but you can't tell why from reading it.
|
|
49
|
+
- You're rewriting a skill and want a regression baseline.
|
|
50
|
+
- A skill is critical (top of `catalog.yaml` recommended set) and overdue for an audit.
|
|
51
|
+
|
|
52
|
+
## Authoring a spec
|
|
53
|
+
|
|
54
|
+
Five-minute job per skill. Copy this template:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
# Skill Spec: /<skill-name>
|
|
58
|
+
|
|
59
|
+
## Fixture
|
|
60
|
+
- <starting state of the project / scene>
|
|
61
|
+
- Available tools: Summer MCP <yes|no>, host file edits <yes|no>
|
|
62
|
+
|
|
63
|
+
## Case 1: Happy Path
|
|
64
|
+
**Input:** "<the most common user prompt that should trigger this skill>"
|
|
65
|
+
|
|
66
|
+
**Expected MCP tool sequence (in order):**
|
|
67
|
+
1. summer_<tool>(...)
|
|
68
|
+
2. summer_<tool>(...)
|
|
69
|
+
|
|
70
|
+
**Assertions:**
|
|
71
|
+
- [ ] <observable outcome 1>
|
|
72
|
+
- [ ] <skill asks "May I" before any user-visible write>
|
|
73
|
+
- [ ] <skill never calls the silent-fail anti-pattern>
|
|
74
|
+
|
|
75
|
+
## Case 2: Failure Path
|
|
76
|
+
**Fixture:** <something missing or already present that should change behavior>
|
|
77
|
+
**Input:** "<edge prompt>"
|
|
78
|
+
**Expected:** <how the skill should adapt — clarify, defer, fail-safe>
|
|
79
|
+
|
|
80
|
+
## Case 3: Edge Case
|
|
81
|
+
**Fixture:** ...
|
|
82
|
+
**Input:** "<unusual prompt>"
|
|
83
|
+
**Expected:** ...
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Aim for 2–4 cases per skill. More than 4 = the skill is doing too much and should be split.
|
|
87
|
+
|
|
88
|
+
## Catalog last-tested
|
|
89
|
+
|
|
90
|
+
Every successful run of `/skill-improve` (or a manual sign-off) should bump `last-tested:` in `catalog.yaml`. The audit mode of `/skill-test` flags skills with stale `last-tested:` fields.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Skill Spec: /3d-lighting
|
|
2
|
+
|
|
3
|
+
> Stub spec. Expand with Happy / Failure / Edge cases. See `fps-controller.md` for the canonical format.
|
|
4
|
+
|
|
5
|
+
## Fixture
|
|
6
|
+
|
|
7
|
+
- TBD
|
|
8
|
+
|
|
9
|
+
## Case 1: Happy Path
|
|
10
|
+
|
|
11
|
+
**Input:** "<typical user prompt>"
|
|
12
|
+
|
|
13
|
+
**Expected MCP tool sequence (in order):**
|
|
14
|
+
|
|
15
|
+
1. TBD
|
|
16
|
+
|
|
17
|
+
**Assertions:**
|
|
18
|
+
|
|
19
|
+
- [ ] TBD
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Skill Spec: /asset-strategy
|
|
2
|
+
|
|
3
|
+
> Stub spec. Expand with Happy / Failure / Edge cases. See `fps-controller.md` for the canonical format.
|
|
4
|
+
|
|
5
|
+
## Fixture
|
|
6
|
+
|
|
7
|
+
- TBD
|
|
8
|
+
|
|
9
|
+
## Case 1: Happy Path
|
|
10
|
+
|
|
11
|
+
**Input:** "<typical user prompt>"
|
|
12
|
+
|
|
13
|
+
**Expected MCP tool sequence (in order):**
|
|
14
|
+
|
|
15
|
+
1. TBD
|
|
16
|
+
|
|
17
|
+
**Assertions:**
|
|
18
|
+
|
|
19
|
+
- [ ] TBD
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Skill Spec: /fps-controller
|
|
2
|
+
|
|
3
|
+
## Fixture
|
|
4
|
+
|
|
5
|
+
- Empty Godot 4.5 / Summer Engine project, main scene open with a single `World` (Node3D) root.
|
|
6
|
+
- Summer MCP tools available (engine running on localhost:6550).
|
|
7
|
+
- No existing input actions in InputMap beyond Godot defaults.
|
|
8
|
+
- No script files attached.
|
|
9
|
+
|
|
10
|
+
## Case 1: Happy Path — fresh FPS in an empty scene
|
|
11
|
+
|
|
12
|
+
**Input:** "Add a first-person controller to my scene."
|
|
13
|
+
|
|
14
|
+
**Expected MCP tool sequence (in order):**
|
|
15
|
+
|
|
16
|
+
1. `summer_get_scene_tree` — verify empty World exists.
|
|
17
|
+
2. `summer_add_node(parent="./World", type="CharacterBody3D", name="Player")`
|
|
18
|
+
3. `summer_add_node(parent="./World/Player", type="CollisionShape3D", name="Collision")`
|
|
19
|
+
4. `summer_add_node(parent="./World/Player", type="Camera3D", name="Camera")`
|
|
20
|
+
5. `summer_set_prop("./World/Player/Collision", "shape", "CapsuleShape3D")` (creates standalone, NOT inline sub-resource)
|
|
21
|
+
6. `summer_set_resource_property("./World/Player/Collision", "shape.height", "1.8")` (only after the shape is standalone)
|
|
22
|
+
7. `summer_set_prop("./World/Player/Camera", "position", "Vector3(0, 1.6, 0)")`
|
|
23
|
+
8. `summer_input_map_bind("move_forward", "key:W")`
|
|
24
|
+
9. `summer_input_map_bind("move_back", "key:S")`
|
|
25
|
+
10. `summer_input_map_bind("move_left", "key:A")`
|
|
26
|
+
11. `summer_input_map_bind("move_right", "key:D")`
|
|
27
|
+
12. `summer_input_map_bind("jump", "key:Space")`
|
|
28
|
+
13. (User-side write) `Write` script file `scripts/player_controller.gd` after the agent asks "May I attach the controller script to ./World/Player?"
|
|
29
|
+
14. `summer_save_scene`
|
|
30
|
+
15. `summer_get_script_errors`
|
|
31
|
+
|
|
32
|
+
**Assertions:**
|
|
33
|
+
|
|
34
|
+
- [ ] CharacterBody3D node exists at `./World/Player`.
|
|
35
|
+
- [ ] CollisionShape3D is a child of Player with a CapsuleShape3D (NOT BoxShape, NOT SphereShape).
|
|
36
|
+
- [ ] Camera3D positioned at `y ≈ 1.6` (head height).
|
|
37
|
+
- [ ] All 5 input actions bound: `move_forward`, `move_back`, `move_left`, `move_right`, `jump`.
|
|
38
|
+
- [ ] Skill asks "May I create / attach …" before the script write.
|
|
39
|
+
- [ ] Skill never calls `summer_set_resource_property` on an inline `sub_resource` (the silent-fail trap from `_shared/mcp-tools-reference.md`).
|
|
40
|
+
- [ ] Final step is `summer_save_scene` followed by `summer_get_script_errors`.
|
|
41
|
+
- [ ] Script uses typed GDScript per `_shared/gd-style.md` (`@export`, `:=`, `class_name`).
|
|
42
|
+
|
|
43
|
+
## Case 2: Failure Path — existing PlayerOld in scene
|
|
44
|
+
|
|
45
|
+
**Fixture:** Same as Case 1, but `World/PlayerOld` exists with a CharacterBody3D + collision (manually authored).
|
|
46
|
+
|
|
47
|
+
**Input:** "Add a first-person controller to my scene."
|
|
48
|
+
|
|
49
|
+
**Expected behavior:**
|
|
50
|
+
|
|
51
|
+
- Skill detects the name collision via `summer_get_scene_tree`.
|
|
52
|
+
- Skill asks: "I see `World/PlayerOld` already exists. Should I replace it, add a second player as `Player2`, or something else?"
|
|
53
|
+
- Does NOT silently overwrite.
|
|
54
|
+
|
|
55
|
+
**Assertions:**
|
|
56
|
+
|
|
57
|
+
- [ ] Skill calls `summer_get_scene_tree` before any mutation.
|
|
58
|
+
- [ ] Skill asks the user how to handle the collision before adding any node.
|
|
59
|
+
- [ ] No `summer_add_node` calls happen until the user answers.
|
|
60
|
+
|
|
61
|
+
## Case 3: Edge Case — user says "third-person"
|
|
62
|
+
|
|
63
|
+
**Fixture:** Empty Godot project, main scene with `World` only.
|
|
64
|
+
|
|
65
|
+
**Input:** "Build a third-person FPS controller."
|
|
66
|
+
|
|
67
|
+
**Expected behavior:**
|
|
68
|
+
|
|
69
|
+
- Skill clarifies the contradiction: FPS = first-person; third-person ≠ FPS.
|
|
70
|
+
- Either asks the user which they meant, OR hands off to `/tps-controller` (when that skill ships) and explains the difference.
|
|
71
|
+
|
|
72
|
+
**Assertions:**
|
|
73
|
+
|
|
74
|
+
- [ ] Skill does NOT silently start building a third-person controller using FPS scaffolding.
|
|
75
|
+
- [ ] Skill explicitly names the ambiguity ("FPS means first-person; third-person is a separate skill").
|
|
76
|
+
- [ ] Skill offers a clear next step: clarify or use the right skill.
|
|
77
|
+
|
|
78
|
+
## Case 4: No Summer MCP — file-edit fallback path
|
|
79
|
+
|
|
80
|
+
**Fixture:** Same as Case 1 except Summer MCP is NOT available (running in plain Cursor on a project where the engine is not connected).
|
|
81
|
+
|
|
82
|
+
**Input:** "Add a first-person controller to my scene."
|
|
83
|
+
|
|
84
|
+
**Expected behavior:**
|
|
85
|
+
|
|
86
|
+
- Skill detects no MCP and falls back to direct file edits on `level.tscn`.
|
|
87
|
+
- Writes a `.tscn` snippet with CharacterBody3D + CollisionShape3D + Camera3D following the format in the skill's "Fallback (no MCP)" sections.
|
|
88
|
+
- Writes `scripts/player_controller.gd` directly via host file-write tools.
|
|
89
|
+
- Edits `project.godot` to add the InputMap actions.
|
|
90
|
+
|
|
91
|
+
**Assertions:**
|
|
92
|
+
|
|
93
|
+
- [ ] Skill identifies that MCP is unavailable (does not blindly call `summer_*` tools and fail).
|
|
94
|
+
- [ ] Generated `.tscn` is syntactically valid Godot 4 scene format (parseable by Godot).
|
|
95
|
+
- [ ] Generated `project.godot` patch follows Godot's input action format (`input/move_forward = { ... }`).
|
|
96
|
+
- [ ] Skill still asks "May I write …" before each file write.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
This spec runs via `/skill-test fps-controller spec` (see `_meta/skill-test/SKILL.md`).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Skill Spec: /gdscript-patterns
|
|
2
|
+
|
|
3
|
+
> Stub spec. Expand with Happy / Failure / Edge cases. See `fps-controller.md` for the canonical format.
|
|
4
|
+
|
|
5
|
+
## Fixture
|
|
6
|
+
|
|
7
|
+
- TBD
|
|
8
|
+
|
|
9
|
+
## Case 1: Happy Path
|
|
10
|
+
|
|
11
|
+
**Input:** "<typical user prompt>"
|
|
12
|
+
|
|
13
|
+
**Expected MCP tool sequence (in order):**
|
|
14
|
+
|
|
15
|
+
1. TBD
|
|
16
|
+
|
|
17
|
+
**Assertions:**
|
|
18
|
+
|
|
19
|
+
- [ ] TBD
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Skill Spec: /make-game
|
|
2
|
+
|
|
3
|
+
> Stub spec. Expand with Happy / Failure / Edge cases. See `fps-controller.md` for the canonical format.
|
|
4
|
+
|
|
5
|
+
## Fixture
|
|
6
|
+
|
|
7
|
+
- TBD
|
|
8
|
+
|
|
9
|
+
## Case 1: Happy Path
|
|
10
|
+
|
|
11
|
+
**Input:** "<typical user prompt>"
|
|
12
|
+
|
|
13
|
+
**Expected MCP tool sequence (in order):**
|
|
14
|
+
|
|
15
|
+
1. TBD
|
|
16
|
+
|
|
17
|
+
**Assertions:**
|
|
18
|
+
|
|
19
|
+
- [ ] TBD
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Skill Spec: /scene-composition
|
|
2
|
+
|
|
3
|
+
> Stub spec. Expand with Happy / Failure / Edge cases. See `fps-controller.md` for the canonical format.
|
|
4
|
+
|
|
5
|
+
## Fixture
|
|
6
|
+
|
|
7
|
+
- TBD
|
|
8
|
+
|
|
9
|
+
## Case 1: Happy Path
|
|
10
|
+
|
|
11
|
+
**Input:** "<typical user prompt>"
|
|
12
|
+
|
|
13
|
+
**Expected MCP tool sequence (in order):**
|
|
14
|
+
|
|
15
|
+
1. TBD
|
|
16
|
+
|
|
17
|
+
**Assertions:**
|
|
18
|
+
|
|
19
|
+
- [ ] TBD
|