howtocode 0.0.0-stage → 0.7.57

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.
Files changed (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +248 -2
  3. package/dist/chunk-27TRKD65.js +2 -0
  4. package/dist/chunk-3FYCFLNK.js +1 -0
  5. package/dist/chunk-3YOYZOXG.js +2 -0
  6. package/dist/chunk-3YSNDQVR.js +5 -0
  7. package/dist/chunk-43YCQFSH.js +1 -0
  8. package/dist/chunk-5X3PQ36J.js +2 -0
  9. package/dist/chunk-7LA2AMZB.js +1 -0
  10. package/dist/chunk-A3LZMZ3C.js +2 -0
  11. package/dist/chunk-ABDZXFNM.js +10 -0
  12. package/dist/chunk-ACBAN4MH.js +197 -0
  13. package/dist/chunk-AS4FUFAN.js +8 -0
  14. package/dist/chunk-BV6J5Q4T.js +1 -0
  15. package/dist/chunk-BZJSYOTO.js +1 -0
  16. package/dist/chunk-CCISJKGS.js +1 -0
  17. package/dist/chunk-DCFM67MM.js +140 -0
  18. package/dist/chunk-ELHK7EH4.js +1 -0
  19. package/dist/chunk-ELM3OMOE.js +1 -0
  20. package/dist/chunk-EZNNALD3.js +1 -0
  21. package/dist/chunk-FLP47RIR.js +5 -0
  22. package/dist/chunk-LYLJZVZ7.js +1 -0
  23. package/dist/chunk-MBVAG3VC.js +6 -0
  24. package/dist/chunk-MCAAX33K.js +2 -0
  25. package/dist/chunk-MCDEIIEN.js +1 -0
  26. package/dist/chunk-MVVEYKN6.js +6 -0
  27. package/dist/chunk-ORJ2QZBG.js +3 -0
  28. package/dist/chunk-PH72JBBL.js +4 -0
  29. package/dist/chunk-PVFHAKN6.js +1 -0
  30. package/dist/chunk-QBHBECIB.js +47 -0
  31. package/dist/chunk-QEPPIFSI.js +6 -0
  32. package/dist/chunk-QOYTPACU.js +3 -0
  33. package/dist/chunk-SDO33XPR.js +4 -0
  34. package/dist/chunk-TOV557ET.js +12 -0
  35. package/dist/chunk-TSEKPGK4.js +1 -0
  36. package/dist/chunk-TUXY64DT.js +2 -0
  37. package/dist/chunk-U3GZBLTM.js +2 -0
  38. package/dist/chunk-UTYFLLSM.js +1 -0
  39. package/dist/chunk-V3R4FYTJ.js +1 -0
  40. package/dist/chunk-VUQVLOAD.js +1 -0
  41. package/dist/chunk-WKUJ7CFO.js +1 -0
  42. package/dist/chunk-WOT6VMZA.js +1 -0
  43. package/dist/chunk-XBVWQC7P.js +1 -0
  44. package/dist/chunk-YN3H6RHD.js +2 -0
  45. package/dist/chunk-YNMLRZJK.js +2 -0
  46. package/dist/chunk-YX2QDCVK.js +1 -0
  47. package/dist/main.js +102 -0
  48. package/dist/presets/backend/api/preset.json +17 -0
  49. package/dist/presets/backend/api/prompt.md +9 -0
  50. package/dist/presets/backend/api/skills/api-contract/SKILL.md +35 -0
  51. package/dist/presets/data/sql/preset.json +17 -0
  52. package/dist/presets/data/sql/prompt.md +9 -0
  53. package/dist/presets/data/sql/skills/query-hygiene/SKILL.md +48 -0
  54. package/dist/presets/devops/containers/preset.json +17 -0
  55. package/dist/presets/devops/containers/prompt.md +9 -0
  56. package/dist/presets/devops/containers/skills/image-discipline/SKILL.md +59 -0
  57. package/dist/presets/frontend/web-ui/preset.json +17 -0
  58. package/dist/presets/frontend/web-ui/prompt.md +11 -0
  59. package/dist/presets/frontend/web-ui/skills/responsive-check/SKILL.md +46 -0
  60. package/dist/presets/gamedev/rotoolbox/preset.json +31 -0
  61. package/dist/presets/gamedev/rotoolbox/prompt.md +34 -0
  62. package/dist/presets/gamedev/rotoolbox/skills/rotoolbox/SKILL.md +129 -0
  63. package/dist/presets/hub.json +14582 -0
  64. package/dist/presets/lang/typescript/preset.json +16 -0
  65. package/dist/presets/lang/typescript/prompt.md +5 -0
  66. package/dist/presets/lang/typescript/skills/ts-strict/SKILL.md +48 -0
  67. package/dist/presets/mcp/filesystem/preset.json +27 -0
  68. package/dist/presets/mcp/filesystem/prompt.md +8 -0
  69. package/dist/presets/mcp/filesystem/skills/mcp-files/SKILL.md +27 -0
  70. package/dist/presets/mcp/memory/preset.json +25 -0
  71. package/dist/presets/mcp/memory/skills/mcp-memory/SKILL.md +31 -0
  72. package/dist/presets/mcp/rea/preset.json +28 -0
  73. package/dist/presets/mcp/rea/prompt.md +5 -0
  74. package/dist/presets/mcp/rea/skills/mcp-rea/SKILL.md +6 -0
  75. package/dist/presets/mcp/remotion/preset.json +27 -0
  76. package/dist/presets/mcp/remotion/prompt.md +7 -0
  77. package/dist/presets/mcp/remotion/skills/mcp-remotion/SKILL.md +6 -0
  78. package/dist/presets/mcp-hub.json +157 -0
  79. package/dist/presets/mobile/app/preset.json +17 -0
  80. package/dist/presets/mobile/app/prompt.md +7 -0
  81. package/dist/presets/mobile/app/skills/touch-targets/SKILL.md +47 -0
  82. package/dist/presets/quality/antislop/preset.json +25 -0
  83. package/dist/presets/quality/antislop/prompt.md +16 -0
  84. package/dist/presets/quality/antislop/skills/antislop/SKILL.md +595 -0
  85. package/dist/presets/quality/antislop/skills/antislop/references/gate.md +84 -0
  86. package/dist/presets/quality/antislop/skills/antislop-code/SKILL.md +128 -0
  87. package/dist/presets/quality/antislop/skills/antislop-copywriting/SKILL.md +413 -0
  88. package/dist/presets/quality/antislop/skills/antislop-human/SKILL.md +147 -0
  89. package/dist/presets/quality/antislop/skills/antislop-human/contrast-check.py +165 -0
  90. package/dist/presets/quality/antislop/skills/antislop-layoutmobile/SKILL.md +170 -0
  91. package/dist/presets/quality/antislop/skills/antislop-ui/SKILL.md +313 -0
  92. package/dist/presets/quality/antislop/skills/antislop-ui/references/motion.md +34 -0
  93. package/dist/presets/quality/antislop/skills/antislop-ui/references/states.md +49 -0
  94. package/package.json +34 -4
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: query-hygiene
3
+ description: SQL and schema rules that hold up as data grows. Use when writing queries or migrations.
4
+ ---
5
+
6
+ # Query hygiene
7
+
8
+ ## NULL is not a value
9
+
10
+ ```sql
11
+ WHERE status = 'open' -- rows with NULL status are invisible
12
+ WHERE status <> 'open' -- and NULL status is invisible here too
13
+ WHERE status IS DISTINCT FROM 'open' -- what you usually meant
14
+ ```
15
+
16
+ `NULL = NULL` is unknown, not true. Any `<>` or `NOT IN` over a nullable column
17
+ silently drops rows — including `NOT IN (SELECT ...)`, which returns **zero rows**
18
+ if the subquery yields a single NULL.
19
+
20
+ ## Indexes follow the query, not the column
21
+
22
+ An index on `(user_id, created_at)` serves `WHERE user_id = ? ORDER BY created_at`
23
+ and does nothing for `WHERE created_at > ?` alone. The rule is the leftmost prefix:
24
+ a composite index is usable only from its first column rightwards.
25
+
26
+ Do not index every column — each index is written on every insert.
27
+
28
+ ## Migrations on a live table
29
+
30
+ | Change | Safe? |
31
+ |---|---|
32
+ | Add a nullable column | yes |
33
+ | Add NOT NULL with a default | depends on the engine; a rewrite on large tables |
34
+ | Add NOT NULL without a default | no — fails on existing rows |
35
+ | Rename a column | no — breaks readers mid-deploy |
36
+ | Drop a column | only after no code reads it |
37
+
38
+ The pattern that works for a rename: add the new column, write to both, backfill,
39
+ switch reads, then drop the old one. Four deploys, no downtime.
40
+
41
+ ## Before saying a query is right
42
+
43
+ State what it returns for:
44
+ - zero rows (does the caller handle empty, or does it index `[0]`?),
45
+ - NULL in the filtered column,
46
+ - a duplicate on the join key (a join is a multiply, not a lookup).
47
+
48
+ If you cannot say, the query is not verified — it is untested.
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "containers",
3
+ "title": "Containers & deploy",
4
+ "description": "Write a Dockerfile and a deploy step that fail loudly instead of shipping a broken image.",
5
+ "category": "devops",
6
+ "tags": [
7
+ "docker",
8
+ "deploy",
9
+ "ci",
10
+ "image"
11
+ ],
12
+ "version": "1.0.0",
13
+ "skills": [
14
+ "image-discipline"
15
+ ],
16
+ "prompt": "prompt.md"
17
+ }
@@ -0,0 +1,9 @@
1
+ When this preset is active, treat the image as the artifact under test:
2
+
3
+ 1. Build the image and run it. An image that builds is not an image that starts —
4
+ the usual failure is a missing runtime file, and it appears only at `docker run`.
5
+ 2. Pin base image versions. `node:latest` means the build is a different build
6
+ next week.
7
+ 3. Never put a secret in a layer: `ENV`, `ARG` and a copied `.env` are all
8
+ readable from the image history.
9
+ 4. Say what the health check hits and what it returns before calling a deploy done.
@@ -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.