spawnpack 0.1.20 → 0.1.21
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/package.json +1 -1
- package/templates/AGENTS.md +7 -1
- package/templates/CLAUDE.md +7 -1
package/package.json
CHANGED
package/templates/AGENTS.md
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
- Prefer current Microsoft Creator documentation and versioned references on `bedrock.dev`. For Script API, also use `https://jaylydev.github.io/scriptapi-docs/latest/`. Use `wiki.bedrock.dev` for established concepts and proven implementation patterns. Confirm stable versus preview status and the target Minecraft version.
|
|
6
6
|
- For other external libraries, frameworks, SDKs, APIs, and CLI tools, verify current official documentation before relying on unfamiliar or version-sensitive behavior.
|
|
7
7
|
|
|
8
|
+
## Technical judgment
|
|
9
|
+
|
|
10
|
+
- Do not assume the user or the agent is correct. Before implementing, verify assumptions against current documentation, repository evidence, established patterns, or a working project sample.
|
|
11
|
+
- If those sources do not resolve a choice that materially affects the result, ask the user for a reference, pattern, or sample project.
|
|
12
|
+
- If evidence shows the requested approach is incorrect, unsafe, incompatible, unnecessarily complex, or slower than a supported alternative, explain why and recommend the better implementation. Follow the user's final choice unless it violates safety or repository constraints.
|
|
13
|
+
|
|
8
14
|
## Verification
|
|
9
15
|
|
|
10
16
|
- After TypeScript changes, run `tsc --noEmit`.
|
|
@@ -27,7 +33,7 @@
|
|
|
27
33
|
|
|
28
34
|
## Performance preferences
|
|
29
35
|
|
|
30
|
-
- Prefer event
|
|
36
|
+
- Before adding `system.runInterval` polling, check the project's Script API version and current documentation for a matching event. Prefer the event when it provides the required data and timing, such as `PlayerInventoryItemChangeAfterEventSignal` instead of repeatedly scanning every player's inventory or hotbar for item changes. Poll only when no suitable event exists or the event cannot represent the required behavior; then minimize the polling frequency, players, slots, and work performed.
|
|
31
37
|
- In hot loops, iterate maps directly with `for (const value of map.values())`. Do not spread maps into temporary arrays or iterate entry pairs when values or keys are enough.
|
|
32
38
|
- Cache stable configuration in memory and persist only when values actually change.
|
|
33
39
|
- Guard invalid states with conditions before they reach the API — unloaded chunks or locations, invalid or despawned entities, etc so Minecraft Bedrock does not throw. Guards are required wherever a state check is possible. Prefer guards over `try-catch`; `try-catch` is allowed only for documented or observed unguardable failures, and must perform meaningful recovery — never rely on it as routine control flow or swallow errors.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
- Prefer current Microsoft Creator documentation and versioned references on `bedrock.dev`. For Script API, also use `https://jaylydev.github.io/scriptapi-docs/latest/`. Use `wiki.bedrock.dev` for established concepts and proven implementation patterns. Confirm stable versus preview status and the target Minecraft version.
|
|
6
6
|
- For other external libraries, frameworks, SDKs, APIs, and CLI tools, verify current official documentation before relying on unfamiliar or version-sensitive behavior.
|
|
7
7
|
|
|
8
|
+
## Technical judgment
|
|
9
|
+
|
|
10
|
+
- Do not assume the user or the agent is correct. Before implementing, verify assumptions against current documentation, repository evidence, established patterns, or a working project sample.
|
|
11
|
+
- If those sources do not resolve a choice that materially affects the result, ask the user for a reference, pattern, or sample project.
|
|
12
|
+
- If evidence shows the requested approach is incorrect, unsafe, incompatible, unnecessarily complex, or slower than a supported alternative, explain why and recommend the better implementation. Follow the user's final choice unless it violates safety or repository constraints.
|
|
13
|
+
|
|
8
14
|
## Verification
|
|
9
15
|
|
|
10
16
|
- After TypeScript changes, run `tsc --noEmit`.
|
|
@@ -27,7 +33,7 @@
|
|
|
27
33
|
|
|
28
34
|
## Performance preferences
|
|
29
35
|
|
|
30
|
-
- Prefer event
|
|
36
|
+
- Before adding `system.runInterval` polling, check the project's Script API version and current documentation for a matching event. Prefer the event when it provides the required data and timing, such as `PlayerInventoryItemChangeAfterEventSignal` instead of repeatedly scanning every player's inventory or hotbar for item changes. Poll only when no suitable event exists or the event cannot represent the required behavior; then minimize the polling frequency, players, slots, and work performed.
|
|
31
37
|
- In hot loops, iterate maps directly with `for (const value of map.values())`. Do not spread maps into temporary arrays or iterate entry pairs when values or keys are enough.
|
|
32
38
|
- Cache stable configuration in memory and persist only when values actually change.
|
|
33
39
|
- Guard invalid states with conditions before they reach the API — unloaded chunks or locations, invalid or despawned entities, etc so Minecraft Bedrock does not throw. Guards are required wherever a state check is possible. Prefer guards over `try-catch`; `try-catch` is allowed only for documented or observed unguardable failures, and must perform meaningful recovery — never rely on it as routine control flow or swallow errors.
|