prd-to-godot-frontend
Skill0 starsChanged 7 months agoMITView on GitHub
Convert Product Requirements Documents (PRDs) into discrete, red-green testable GitHub issues for Godot 4.x frontend development. Each issue produces a self-contained, independently verifiable Godot scene adhering to strict contractual boundaries with the Game Renderer. Use when converting a PRD into frontend implementation issues, creating Godot UI widget tickets, or when user mentions Godot frontend scenes, HUD elements, UI widgets, or export setter contracts.
In this repository28 other files it gives its agents.
- bootstrapSkill
- build-alignmentSkill
- decompose-issueSkill
- deploySkill
- design-an-interfaceSkill
- draft-a-godot-frontend-sceneSkill
- edit-articleSkill
- explore-realitySkill
- git-guardrails-claude-codeSkill
- grill-meSkill
- implement-issueSkill
- improve-codebase-architectureSkill
- insightSkill
- integrate-godot-frontend-sceneSkill
- learn-itSkill
- migrate-to-shoehornSkill
- new-plasmoidSkill
- obsidian-vaultSkill
- prd-to-issuesSkill
- prd-to-planSkill
- request-refactor-planSkill
- scaffold-exercisesSkill
- setup-pre-commitSkill
- tddSkill
- triage-issueSkill
- ubiquitous-languageSkill
- write-a-prdSkill
- write-a-skillSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Every generated issue must follow this exact structure:
- Distinctive: line 81
Decision heuristic: If a sub-component can be instantiated alone, rendered sensibly, and tested without its parent, it deserves its own …
- Distinctive: line 85
When an agent picks up one of these issues:
- Distinctive: line 87
Read the PRD chunk associated with the issue.
- Distinctive: line 88
Write the RED GUT test first.
- Distinctive: line 90
Run the GUT tests and verify all pass.
- Very specific: line 92
Do NOT add tween/animation logic.
- Distinctive: line 97
Before marking a frontend issue complete:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PRD to Godot Frontend Issues
Convert PRDs into discrete, red-green testable GitHub issues for Godot 4.x frontend deliverable scenes (UI widgets, HUD elements, visual assets). Excludes coordinator/orchestrator scenes like GameSession that inherently handle cross-cutting concerns.
Quick start
- Receive a PRD (or PRD excerpt).
- Decompose into atomic/composite scene issues.
- For each issue, generate the structured template below.
- End with a Renderer Integration Prompt for user decision.
Issue Structure Template
Every generated issue must follow this exact structure:
## Objective
[One sentence: what scene file and script this issue creates]
## Acceptance Criteria (Red → Green)
- [ ] **RED**: Write `test_[scene_name].gd` using GUT that asserts [specific behavior]. Running it fails.
- [ ] **GREEN**: Implement `[scene_name].gd` and `[scene_name].tscn` such that the test passes.
- [ ] **REFACTOR**: Ensure all `@export` setters have explicit validation and `@tool` behavior works in editor.
## Deliverables
1. `res://frontend/[category]/[scene_name].tscn`
2. `res://frontend/[category]/[scene_name].gd`
3. `res://frontend/[category]/tests/unit/test_[scene_name].gd` (GUT unit test)
4. `res://frontend/[category]/tests/visual/test_[scene_name].tscn` (visual verification scene)
## Script Specification
- `@tool` — must be first line.
- `class_name [PascalCaseName]` — for type safety and testability.
- Every `@export` must have a setter with clamp/validation and a docstring comment specifying physical meaning, hard min/max (or dynamic formula), and what triggers recalculation.
- Signals must be emitted for all state changes the Renderer might animate.
## Forbidden Patterns
- `Tween`, `AnimationPlayer`, or interpolation logic.
- `await get_tree().create_timer()` for visual delays.
- Direct modification of `position`, `scale`, `modulate`, or `size` outside of setter-driven reactive updates.
- Hardcoded pixel values that should be dynamic.
## GUT Unit Test Requirements
- Overflow & clamp tests for every `@export` numeric variable.
- Signal emission tests (correct payload, idempotency).
- State consistency tests (rapid successive setter calls, null-safety).
- Tool script safety tests (`Engine.is_editor_hint()` behavior).
## Visual Test Scene Requirements
- Instantiate target scene at readable size, centered.
- Debug panel showing real-time `@export` values.
- Interactive controls (`HSlider`, `SpinBox`, `Button`) for every `@export`.
- Viewport resize preset buttons (e.g., 1920x1080, 1280x720, 800x480).
- PASS/FAIL indicator or manual checklist label.
## Renderer Integration Prompt
Once verified, the scene exposes this contract to the Game Renderer. Suggest a follow-up issue for the user to review and decide whether to spawn.Scope
This skill applies to deliverable frontend scenes — self-contained visual assets that the Game Renderer instantiates and animates:
- UI widgets (health bars, stat icons, progress fills)
- HUD elements (score counters, minimaps, ability buttons)
- Visual effects (particle containers, shader-driven overlays)
- Menu components (choice cards, sliders, toggles)
It does not apply to coordinator/orchestrator scenes (e.g., GameSession) that manage backend binding, scene tree assembly, or cross-cutting concerns. Those follow their own architectural rules.
Decomposition Rules
- Atomic scenes: A simple widget (progress fill, stat icon) → one issue.
- Composite scenes: A complex widget with tightly coupled internal parts (health bar + embedded label sharing layout logic) → one issue IF sub-parts are not reusable. If reusable (e.g., generic
BarFill), split into separate issues. - Interaction logic: Lives in the frontend scene; the consequence (e.g., "slide to X") is signaled, not executed via tween.
Decision heuristic: If a sub-component can be instantiated alone, rendered sensibly, and tested without its parent, it deserves its own issue.
Agent Execution Guidelines
When an agent picks up one of these issues:
- Read the PRD chunk associated with the issue.
- Write the RED GUT test first. The test must fail meaningfully.
- Implement the scene with
@tool,class_name, all@exportsetters with limits, and signal emissions. - Run the GUT tests and verify all pass.
- Build the visual test scene with sliders, debug labels, viewport presets, and PASS/FAIL indicators.
- Do NOT add tween/animation logic. Add a comment:
# Animation handled by Renderer via tweening [property_name]. - Submit the scene + GUT tests + visual test scene + integration prompt.
Verification Checklist
Before marking a frontend issue complete:
- All
@exportvars have setters with documented limits. @toolscript runs without errors in the editor.- GUT tests pass: overflow/clamp, signals, consistency, tool safety.
- Visual test scene displays correctly with all interactive controls functional.
- Dynamic limits correctly recalculate on viewport resize presets in the visual scene.
- No
Tween,AnimationPlayer, orcreate_timerexists in the script. - Signals are emitted for all state changes.
- Renderer Integration Prompt is generated and linked for user decision.
Quick Reference
| Concept | Rule |
@tool | Mandatory first line |
class_name | Mandatory, PascalCase, matches scene purpose |
@export setter | Must clamp/validate; must document limits in comment |
| Dynamic limits | Re-query viewport/parent on setter call and resize events |
| Animation | Forbidden in frontend. Use signals + exposed properties |
| GUT tests | Must cover overflow, signals, consistency, tool safety |
| Visual test scene | Must include sliders, debug panel, viewport presets, PASS/FAIL |
| Integration | Generate a suggested prompt; user decides follow-up issue |
References
- REFERENCE.md — Detailed templates, dynamic limit patterns, forbidden/good examples.
- EXAMPLES.md — Real project examples (good and bad) from the TowerDefenseSequel codebase.
- scripts/validate_frontend.py — Standalone CLI script to validate a
.gdfile. - GUT Contract Test Suite — Copy
tests/frontend/test_frontend_contract.gdinto the target project. Subclass it per scene to enforce rules at test time:class_name TestMyWidgetContract extends TestFrontendContract func before_each() -> void: script_path = "res://frontend/hud/my_widget.gd" super.before_each()
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

