howtocode 0.0.0-stage → 0.7.56
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/README.md +248 -2
- package/dist/chunk-27TRKD65.js +2 -0
- package/dist/chunk-2SHU7WQ5.js +10 -0
- package/dist/chunk-3FYCFLNK.js +1 -0
- package/dist/chunk-4BWBQ4HV.js +1 -0
- package/dist/chunk-7IUWRCVT.js +197 -0
- package/dist/chunk-7LA2AMZB.js +1 -0
- package/dist/chunk-A3LZMZ3C.js +2 -0
- package/dist/chunk-ADJLVYL3.js +1 -0
- package/dist/chunk-AEDSISJB.js +1 -0
- package/dist/chunk-AEWC7NIN.js +5 -0
- package/dist/chunk-AYBGCIQH.js +8 -0
- package/dist/chunk-DML5JQIR.js +1 -0
- package/dist/chunk-DT7VRY24.js +1 -0
- package/dist/chunk-EZNNALD3.js +1 -0
- package/dist/chunk-FGKA3GGW.js +6 -0
- package/dist/chunk-FJBHQI6Q.js +6 -0
- package/dist/chunk-JWPDIJUV.js +1 -0
- package/dist/chunk-KA2CULSQ.js +2 -0
- package/dist/chunk-KTS2F755.js +2 -0
- package/dist/chunk-LYLJZVZ7.js +1 -0
- package/dist/chunk-MCAAX33K.js +2 -0
- package/dist/chunk-MCDEIIEN.js +1 -0
- package/dist/chunk-MVVEYKN6.js +6 -0
- package/dist/chunk-MWSWXDNN.js +5 -0
- package/dist/chunk-ORJ2QZBG.js +3 -0
- package/dist/chunk-PH72JBBL.js +4 -0
- package/dist/chunk-PVFHAKN6.js +1 -0
- package/dist/chunk-QOYTPACU.js +3 -0
- package/dist/chunk-RGYXELNI.js +140 -0
- package/dist/chunk-SDO33XPR.js +4 -0
- package/dist/chunk-SZPFD4XF.js +47 -0
- package/dist/chunk-TOV557ET.js +12 -0
- package/dist/chunk-TSEKPGK4.js +1 -0
- package/dist/chunk-TUXY64DT.js +2 -0
- package/dist/chunk-U3GZBLTM.js +2 -0
- package/dist/chunk-UTYFLLSM.js +1 -0
- package/dist/chunk-V3R4FYTJ.js +1 -0
- package/dist/chunk-VWAUPT4A.js +1 -0
- package/dist/chunk-WKUJ7CFO.js +1 -0
- package/dist/chunk-WOT6VMZA.js +1 -0
- package/dist/chunk-XBVWQC7P.js +1 -0
- package/dist/chunk-XHHNV7A5.js +2 -0
- package/dist/chunk-YNMLRZJK.js +2 -0
- package/dist/chunk-YX2QDCVK.js +1 -0
- package/dist/main.js +102 -0
- package/dist/presets/backend/api/preset.json +17 -0
- package/dist/presets/backend/api/prompt.md +9 -0
- package/dist/presets/backend/api/skills/api-contract/SKILL.md +35 -0
- package/dist/presets/data/sql/preset.json +17 -0
- package/dist/presets/data/sql/prompt.md +9 -0
- package/dist/presets/data/sql/skills/query-hygiene/SKILL.md +48 -0
- package/dist/presets/devops/containers/preset.json +17 -0
- package/dist/presets/devops/containers/prompt.md +9 -0
- package/dist/presets/devops/containers/skills/image-discipline/SKILL.md +59 -0
- package/dist/presets/frontend/web-ui/preset.json +17 -0
- package/dist/presets/frontend/web-ui/prompt.md +11 -0
- package/dist/presets/frontend/web-ui/skills/responsive-check/SKILL.md +46 -0
- package/dist/presets/gamedev/rotoolbox/preset.json +31 -0
- package/dist/presets/gamedev/rotoolbox/prompt.md +34 -0
- package/dist/presets/gamedev/rotoolbox/skills/rotoolbox/SKILL.md +129 -0
- package/dist/presets/hub.json +14582 -0
- package/dist/presets/lang/typescript/preset.json +16 -0
- package/dist/presets/lang/typescript/prompt.md +5 -0
- package/dist/presets/lang/typescript/skills/ts-strict/SKILL.md +48 -0
- package/dist/presets/mcp/filesystem/preset.json +27 -0
- package/dist/presets/mcp/filesystem/prompt.md +8 -0
- package/dist/presets/mcp/filesystem/skills/mcp-files/SKILL.md +27 -0
- package/dist/presets/mcp/memory/preset.json +25 -0
- package/dist/presets/mcp/memory/skills/mcp-memory/SKILL.md +31 -0
- package/dist/presets/mcp/rea/preset.json +28 -0
- package/dist/presets/mcp/rea/prompt.md +5 -0
- package/dist/presets/mcp/rea/skills/mcp-rea/SKILL.md +6 -0
- package/dist/presets/mcp/remotion/preset.json +27 -0
- package/dist/presets/mcp/remotion/prompt.md +7 -0
- package/dist/presets/mcp/remotion/skills/mcp-remotion/SKILL.md +6 -0
- package/dist/presets/mcp-hub.json +157 -0
- package/dist/presets/mobile/app/preset.json +17 -0
- package/dist/presets/mobile/app/prompt.md +7 -0
- package/dist/presets/mobile/app/skills/touch-targets/SKILL.md +47 -0
- package/dist/presets/quality/antislop/preset.json +25 -0
- package/dist/presets/quality/antislop/prompt.md +16 -0
- package/dist/presets/quality/antislop/skills/antislop/SKILL.md +595 -0
- package/dist/presets/quality/antislop/skills/antislop/references/gate.md +84 -0
- package/dist/presets/quality/antislop/skills/antislop-code/SKILL.md +128 -0
- package/dist/presets/quality/antislop/skills/antislop-copywriting/SKILL.md +413 -0
- package/dist/presets/quality/antislop/skills/antislop-human/SKILL.md +147 -0
- package/dist/presets/quality/antislop/skills/antislop-human/contrast-check.py +165 -0
- package/dist/presets/quality/antislop/skills/antislop-layoutmobile/SKILL.md +170 -0
- package/dist/presets/quality/antislop/skills/antislop-ui/SKILL.md +313 -0
- package/dist/presets/quality/antislop/skills/antislop-ui/references/motion.md +34 -0
- package/dist/presets/quality/antislop/skills/antislop-ui/references/states.md +49 -0
- package/package.json +34 -4
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: image-discipline
|
|
3
|
+
description: Dockerfile and deploy rules that fail loudly. Use when building or shipping an image.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Image discipline
|
|
7
|
+
|
|
8
|
+
## The build is not the test
|
|
9
|
+
|
|
10
|
+
`docker build` succeeding proves the layers ran. It does not prove the process
|
|
11
|
+
starts — a missing `dist/`, a bad entrypoint path, or a dev-only dependency all
|
|
12
|
+
survive the build and die at `docker run`. Run the image, then hit it.
|
|
13
|
+
|
|
14
|
+
## Layer order is build time
|
|
15
|
+
|
|
16
|
+
```dockerfile
|
|
17
|
+
COPY package.json package-lock.json ./ # changes rarely
|
|
18
|
+
RUN npm ci # cached until the lock changes
|
|
19
|
+
COPY . . # changes every commit
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Copying everything first means every code edit reinstalls the dependency tree.
|
|
23
|
+
|
|
24
|
+
## Secrets do not belong in a layer
|
|
25
|
+
|
|
26
|
+
`ENV TOKEN=…`, `ARG TOKEN`, and `COPY .env` are all recoverable from
|
|
27
|
+
`docker history` and the image layers. Pass secrets at run time (env, mounted
|
|
28
|
+
file, secret manager), never at build time.
|
|
29
|
+
|
|
30
|
+
## Run as a non-root user
|
|
31
|
+
|
|
32
|
+
```dockerfile
|
|
33
|
+
RUN useradd -r -u 10001 app
|
|
34
|
+
USER 10001
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Root inside a container is root on the host's kernel namespace. One line, and a
|
|
38
|
+
container escape is a much smaller problem.
|
|
39
|
+
|
|
40
|
+
## Pin what you depend on
|
|
41
|
+
|
|
42
|
+
| Pinned | Consequence of not pinning |
|
|
43
|
+
|---|---|
|
|
44
|
+
| base image tag | the build silently changes under you |
|
|
45
|
+
| lockfile (`npm ci`, not `npm i`) | a transitive patch breaks the deploy |
|
|
46
|
+
| digest, for a critical base | a retagged tag is a different image |
|
|
47
|
+
|
|
48
|
+
## Signals and shutdown
|
|
49
|
+
|
|
50
|
+
An entrypoint that does not forward SIGTERM is killed after the grace period with
|
|
51
|
+
work in flight. `exec` the process (`CMD ["node", "server.js"]`, not a shell
|
|
52
|
+
wrapper), and handle the signal: stop accepting, finish in-flight, then exit.
|
|
53
|
+
|
|
54
|
+
## What to assert before saying it works
|
|
55
|
+
|
|
56
|
+
- The image **runs** and answers its health check.
|
|
57
|
+
- The health check path is real (a 200 from `/health`, not from `/`).
|
|
58
|
+
- The container exits non-zero on a failed startup — a crash loop that reports
|
|
59
|
+
healthy is the worst outcome.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "web-ui",
|
|
3
|
+
"title": "Web UI",
|
|
4
|
+
"description": "Build and verify a responsive page: layout at real widths, no horizontal scroll, tap targets, contrast.",
|
|
5
|
+
"category": "frontend",
|
|
6
|
+
"tags": [
|
|
7
|
+
"html",
|
|
8
|
+
"css",
|
|
9
|
+
"responsive",
|
|
10
|
+
"a11y"
|
|
11
|
+
],
|
|
12
|
+
"version": "1.0.0",
|
|
13
|
+
"skills": [
|
|
14
|
+
"responsive-check"
|
|
15
|
+
],
|
|
16
|
+
"prompt": "prompt.md"
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
When this preset is active, finish UI work the same way every time:
|
|
2
|
+
|
|
3
|
+
1. Write the page, then **render it** at 360, 480, 640, 768, 1024 and 1440 px.
|
|
4
|
+
2. Check `document.documentElement.scrollWidth <= clientWidth` at each width. Horizontal
|
|
5
|
+
scroll on a phone is a defect, not a preference.
|
|
6
|
+
3. Confirm every control is reachable by keyboard, in a sensible order.
|
|
7
|
+
4. Measure text contrast from computed styles, not from the stylesheet: 4.5:1 for body
|
|
8
|
+
text, 3:1 for borders that carry meaning.
|
|
9
|
+
5. Report what you ran and what it returned. "Looks right" is not a result.
|
|
10
|
+
|
|
11
|
+
Do not add an external font, script or stylesheet unless the task asks for one.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: responsive-check
|
|
3
|
+
description: Verify a page's layout at real viewport widths before claiming it works. Use when building or changing HTML/CSS.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Responsive check
|
|
7
|
+
|
|
8
|
+
A layout is verified by rendering it, not by reading the CSS. A media query that looks
|
|
9
|
+
correct in the source can still leave a 400 px element inside a 360 px viewport.
|
|
10
|
+
|
|
11
|
+
## The check that catches the most
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
const hscroll = await page.evaluate(
|
|
15
|
+
() => document.documentElement.scrollWidth - document.documentElement.clientWidth
|
|
16
|
+
);
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Zero at every width. A single non-zero reading is a real defect, and it is the one a
|
|
20
|
+
human notices first on a phone.
|
|
21
|
+
|
|
22
|
+
## Widths worth testing
|
|
23
|
+
|
|
24
|
+
| Width | What it represents |
|
|
25
|
+
|---|---|
|
|
26
|
+
| 360 | small Android |
|
|
27
|
+
| 480 | phone landscape |
|
|
28
|
+
| 640 | the breakpoint boundary — test 639 and 640, not just one |
|
|
29
|
+
| 768 | tablet portrait |
|
|
30
|
+
| 1024 | tablet landscape / small laptop |
|
|
31
|
+
| 1440 | desktop |
|
|
32
|
+
|
|
33
|
+
The boundary pair matters more than the round numbers. Off-by-one breakpoints
|
|
34
|
+
(`max-width: 640px` vs `639.98px`) show up only at the edge.
|
|
35
|
+
|
|
36
|
+
## What else to assert
|
|
37
|
+
|
|
38
|
+
- Tap targets at least 44x44 px on touch widths.
|
|
39
|
+
- Text zoom to 200% without clipping.
|
|
40
|
+
- A sticky header must not cover the anchor it scrolls to.
|
|
41
|
+
- No element overlapping another at any tested width.
|
|
42
|
+
|
|
43
|
+
## Reporting
|
|
44
|
+
|
|
45
|
+
State the widths tested, the assertion count, and the failures with the width that
|
|
46
|
+
produced them. A pass with no numbers is not evidence.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rotoolbox",
|
|
3
|
+
"title": "RoToolbox",
|
|
4
|
+
"description": "Build and see Roblox work through Roblox Studio's own MCP server: read and edit the open place, run playtests, generate assets, and check the result. No plugin to install.",
|
|
5
|
+
"category": "gamedev",
|
|
6
|
+
"tags": [
|
|
7
|
+
"roblox",
|
|
8
|
+
"studio",
|
|
9
|
+
"luau",
|
|
10
|
+
"mcp",
|
|
11
|
+
"3d",
|
|
12
|
+
"gamedev",
|
|
13
|
+
"preview"
|
|
14
|
+
],
|
|
15
|
+
"version": "4.0.0",
|
|
16
|
+
"skills": [
|
|
17
|
+
"rotoolbox"
|
|
18
|
+
],
|
|
19
|
+
"prompt": "prompt.md",
|
|
20
|
+
"integrates": "Roblox Studio's built-in MCP server (nothing to install in Studio); rhr renders files with no Studio at all",
|
|
21
|
+
"mcp": {
|
|
22
|
+
"roblox-studio": {
|
|
23
|
+
"command": "cmd",
|
|
24
|
+
"args": [
|
|
25
|
+
"/c",
|
|
26
|
+
"%LOCALAPPDATA%\\Roblox\\mcp.bat"
|
|
27
|
+
],
|
|
28
|
+
"description": "Roblox Studio's own MCP server (StudioMCP.exe): game tree search, script read/edit, playtests, screenshots, AI mesh/texture/material generation"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
RoToolbox is installed. It reaches Roblox Studio through **Studio's own MCP
|
|
2
|
+
server** (`roblox-studio`): the tools are `mcp__roblox-studio__<tool>`, there is
|
|
3
|
+
nothing to install in Studio, and the server attaches when a place is open.
|
|
4
|
+
|
|
5
|
+
Rules for this project:
|
|
6
|
+
|
|
7
|
+
- **The place is the source of truth, and you have not seen it.** Before
|
|
8
|
+
describing, changing or answering anything about the open place, read it with
|
|
9
|
+
`search_game_tree`, `inspect_instance` or `script_grep`. Never answer from what
|
|
10
|
+
a Roblox project usually looks like.
|
|
11
|
+
- **Most tools need a `studio_id`.** Several places can be open at once. Read it
|
|
12
|
+
from `get_studio_state` at the start instead of letting the first call fail.
|
|
13
|
+
- **A connection error is a setup problem, not a failed request.** Studio is
|
|
14
|
+
closed, no place is open, or Studio's MCP server is switched off (Studio →
|
|
15
|
+
Assistant settings → enable the MCP server). Say which you checked instead of
|
|
16
|
+
retrying the same call.
|
|
17
|
+
- **`rhr` is how you see a build without Studio.** It draws a `.rbxl`, `.rbxm`,
|
|
18
|
+
Rojo project or UI story to a PNG and reports layout, mistakes and 3D facts as
|
|
19
|
+
JSON — no Studio, no display, no GPU. Use it when the user has no Studio open,
|
|
20
|
+
when the file is on disk rather than open, and for the check-and-fix loop:
|
|
21
|
+
`rhr check` after each edit, `rhr ui`/`rhr scene` to look. It reports what it
|
|
22
|
+
could not draw faithfully (`fallbacks`, `missingAssets`, `notes`) — read those
|
|
23
|
+
rather than trusting a clean picture.
|
|
24
|
+
- **Report what you verified, not what you attempted.** After a script edit,
|
|
25
|
+
`script_read` the range back. After a UI change, `rhr check` it. After a build,
|
|
26
|
+
`rhr scene` or `screen_capture` and look at it. After a behaviour change, run a
|
|
27
|
+
playtest and read `get_console_output` from the run that exercised it. "The call
|
|
28
|
+
returned success" is not a result.
|
|
29
|
+
- **Read the `rotoolbox` skill before writing Luau or building in 3D.** Studs and
|
|
30
|
+
Y-up, `CFrame` versus `Position`, `Anchored`, client/server trust, and the Luau
|
|
31
|
+
version are all in there, and each one is a mistake that looks correct in the
|
|
32
|
+
editor.
|
|
33
|
+
- **Do not paste credentials or place secrets into a script.** Anything in a
|
|
34
|
+
`LocalScript` reaches the player's machine.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rotoolbox
|
|
3
|
+
description: "Use when working on a Roblox experience: drive Studio through its MCP server, write Luau correctly, and draw the result — UI and 3D — before saying it is done."
|
|
4
|
+
version: 4.0.0
|
|
5
|
+
metadata:
|
|
6
|
+
hermes:
|
|
7
|
+
tags: [roblox, studio, luau, mcp, 3d, gamedev, preview]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# RoToolbox
|
|
11
|
+
|
|
12
|
+
Two ways in, and they answer different questions. Reach for the one that fits
|
|
13
|
+
before assuming the other is missing.
|
|
14
|
+
|
|
15
|
+
| | `roblox-studio` (Studio's MCP server) | `rhr` (shell tool) |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| Needs Studio open | yes | no |
|
|
18
|
+
| Reads/edits the open place | yes | no |
|
|
19
|
+
| Draws a UI or a build | `screen_capture`, from inside a running game | any file, on disk, with no Studio |
|
|
20
|
+
| Works on a `.rbxl`/`.rbxm` on disk | no | yes |
|
|
21
|
+
| Runs playtests, input, profilers | yes | no |
|
|
22
|
+
|
|
23
|
+
Studio's tools arrive named `mcp__roblox-studio__<tool>`. Nothing is installed in
|
|
24
|
+
Studio: the server ships with it.
|
|
25
|
+
|
|
26
|
+
## Read before you write
|
|
27
|
+
|
|
28
|
+
Never describe a place from memory. The project is whatever the user has open,
|
|
29
|
+
and it is almost never a fresh baseplate.
|
|
30
|
+
|
|
31
|
+
- `mcp__roblox-studio__search_game_tree` — the tree, with a path and a depth you
|
|
32
|
+
choose. Start here. The tools below are named without the prefix for reading;
|
|
33
|
+
call them as `mcp__roblox-studio__<name>`.
|
|
34
|
+
- `inspect_instance` — properties for one instance. Do not assume a property
|
|
35
|
+
exists because another engine has one.
|
|
36
|
+
- `script_read` — the actual source, returned with line numbers as
|
|
37
|
+
`LINE→CONTENT`. Read the range you need, not the whole file.
|
|
38
|
+
- `script_search` / `script_grep` — find by name, or one pattern across every
|
|
39
|
+
script. `script_grep` is how you find every use of a symbol before changing it.
|
|
40
|
+
- `get_console_output` — what Studio has printed so far.
|
|
41
|
+
|
|
42
|
+
Several open places can be attached at once, so **most tools require a
|
|
43
|
+
`studio_id`**. Call `get_studio_state` once at the start, or the tools that need
|
|
44
|
+
it will fail.
|
|
45
|
+
|
|
46
|
+
## Editing
|
|
47
|
+
|
|
48
|
+
- `multi_edit` — several edits to one script in one call, and it creates the
|
|
49
|
+
script when the path does not exist. Prefer this to a series of single edits.
|
|
50
|
+
- `execute_luau` — runs Luau in Studio. It runs on Studio's **main thread** and
|
|
51
|
+
yields until it returns, so put work in it that finishes; a loop that never ends
|
|
52
|
+
takes Studio with it.
|
|
53
|
+
- `upload_image` / `store_image` — bring an image in from a local path or an HTTP
|
|
54
|
+
server and get an `IMAGEID_<id>` back. That id is what the generators accept.
|
|
55
|
+
- `insert_asset` / `search_asset` — Creator Store assets by id or by search.
|
|
56
|
+
Inserted assets are loaded and validated first.
|
|
57
|
+
|
|
58
|
+
## Seeing the result without Studio
|
|
59
|
+
|
|
60
|
+
`rhr` (`roblox-headless-renderer`) reads a Roblox file, a Rojo project, a UI story
|
|
61
|
+
or an asset id and returns small JSON, plus a PNG when you need to look. It needs
|
|
62
|
+
no Studio, no GPU and no display, so it is the only way to look at a build on a
|
|
63
|
+
machine that cannot run Studio — including a CI box or a server.
|
|
64
|
+
|
|
65
|
+
It is a separate install, not an MCP tool: run it from the shell.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
uv tool install roblox-headless-renderer # or: pipx install roblox-headless-renderer
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The loop, cheapest question first:
|
|
72
|
+
|
|
73
|
+
1. Edit.
|
|
74
|
+
2. `rhr check <file>` — mistakes a player would notice. **Exit 1 means an error
|
|
75
|
+
finding: fix it.** Then the warnings. Keep a baseline before the first edit
|
|
76
|
+
(`--out before.json`) and pass `--baseline before.json` after, to see only
|
|
77
|
+
what the edit added.
|
|
78
|
+
3. `rhr layout <file> --path <screen>` — every element's rect as numbers. Compare
|
|
79
|
+
with what you meant; cheaper and more exact than reading pixels.
|
|
80
|
+
4. Look when numbers are not enough: `rhr ui <file> --only <screen> --fit
|
|
81
|
+
--max-size 800 --out shot.png`. Add `--annotate --json` to number the buttons.
|
|
82
|
+
5. Before calling it done: `rhr check <file> --devices all` — phones, tablets,
|
|
83
|
+
consoles, with their notches and 44 px touch targets.
|
|
84
|
+
|
|
85
|
+
3D: `rhr scene <file> --view iso --max-size 800 --out build.png --json`. For what
|
|
86
|
+
a place holds rather than how it looks, `rhr scene-dump <file>` gives parts,
|
|
87
|
+
bounds and models as JSON.
|
|
88
|
+
|
|
89
|
+
## What to trust, and what to say out loud
|
|
90
|
+
|
|
91
|
+
- **UI rects are within 2 px of Studio.** Layout, the picture and the hit map all
|
|
92
|
+
rest on that, so numbers you read back are real.
|
|
93
|
+
- **3D part positions, sizes and rotations are exact. The pictures are
|
|
94
|
+
approximations** — lighting, fog and shadows are fitted to Studio, not copied.
|
|
95
|
+
- **Pictures are previews, not a pixel copy.** Anything `rhr` cannot draw
|
|
96
|
+
faithfully it *says so*: `missingAssets`, `fallbacks` (meshes drawn as boxes),
|
|
97
|
+
`unsupportedVisualClasses`, `notes`. Read those fields; do not assume a clean
|
|
98
|
+
picture means a faithful one.
|
|
99
|
+
- **It does not run the game.** Scripts, physics and animation do not execute, so
|
|
100
|
+
it shows files as saved. If the UI is built by code, point it at a story
|
|
101
|
+
(`*.story.luau`) — that is the one input where it runs your code.
|
|
102
|
+
- On a machine with no Studio and no Open Cloud key, previews use stand-in
|
|
103
|
+
textures and meshes and the output says so. Set `RHR_ROBLOX_API_KEY` to do
|
|
104
|
+
better; never commit that key.
|
|
105
|
+
|
|
106
|
+
## Luau that will not embarrass you
|
|
107
|
+
|
|
108
|
+
- `Instance.new("Part", parent)` sets the parent as it is created. Set every
|
|
109
|
+
other property *before* parenting when the object is expensive to update — a
|
|
110
|
+
part parented first and configured after pays for a replication update per
|
|
111
|
+
property.
|
|
112
|
+
- **Client and server are separate.** A `Script` runs on the server, a
|
|
113
|
+
`LocalScript` on a client, a `ModuleScript` wherever it is required. Anything a
|
|
114
|
+
client is trusted with can be read and changed by that client, so a value that
|
|
115
|
+
decides what the player can do lives on the server.
|
|
116
|
+
- `RemoteEvent`/`RemoteFunction` are the boundary. The server must validate every
|
|
117
|
+
argument a remote receives — a remote is public API to anyone with a client.
|
|
118
|
+
|
|
119
|
+
## Before saying a change is done
|
|
120
|
+
|
|
121
|
+
Reading source is not verification. Assert the change on the thing you changed.
|
|
122
|
+
|
|
123
|
+
- After editing a script, `script_read` the range back and read it.
|
|
124
|
+
- After a UI change, `rhr check` it, then look at `rhr ui` when the numbers are
|
|
125
|
+
ambiguous.
|
|
126
|
+
- After building in 3D, `rhr scene` it (or `screen_capture` in Studio) and look.
|
|
127
|
+
Coordinates that look right in a table routinely look wrong in the world.
|
|
128
|
+
- After changing runtime behaviour, run a playtest and read `get_console_output`
|
|
129
|
+
from a run that actually exercised it.
|