@auraindustry/aurajs 0.1.3 → 0.1.5

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 (108) hide show
  1. package/README.md +7 -0
  2. package/benchmarks/perf-thresholds.json +27 -0
  3. package/package.json +6 -1
  4. package/src/ai-guidance.mjs +302 -0
  5. package/src/authored-project.mjs +498 -2
  6. package/src/build-contract/capabilities.mjs +87 -1
  7. package/src/build-contract/constants.mjs +1 -0
  8. package/src/build-contract.mjs +2 -0
  9. package/src/bundler.mjs +143 -13
  10. package/src/cli.mjs +681 -13
  11. package/src/commands/packs.mjs +741 -0
  12. package/src/commands/project-authoring.mjs +128 -1
  13. package/src/conformance/cases/app-and-ui-runtime-cases.mjs +1 -2
  14. package/src/conformance/cases/core-runtime-cases.mjs +6 -2
  15. package/src/conformance/cases/scene3d-and-media-cases.mjs +238 -0
  16. package/src/conformance/cases/systems-and-gameplay-cases.mjs +265 -4
  17. package/src/conformance-mobile.mjs +166 -0
  18. package/src/conformance.mjs +89 -30
  19. package/src/evidence-bundle.mjs +242 -0
  20. package/src/headless-test/runtime-coordinator.mjs +186 -33
  21. package/src/headless-test.mjs +2 -0
  22. package/src/helpers/2d/index.mjs +183 -0
  23. package/src/helpers/index.mjs +26 -0
  24. package/src/helpers/starter-utils/adventure-objectives.js +102 -0
  25. package/src/helpers/starter-utils/adventure-world-2d.js +221 -0
  26. package/src/helpers/starter-utils/animation-2d.js +337 -0
  27. package/src/helpers/starter-utils/animation-packaging-2d.js +203 -0
  28. package/src/helpers/starter-utils/atlas-assets-2d.js +111 -0
  29. package/src/helpers/starter-utils/autoplay-debug-2d.js +215 -0
  30. package/src/helpers/starter-utils/avatar-3d.js +404 -0
  31. package/src/helpers/starter-utils/combat-feedback-2d.js +320 -0
  32. package/src/helpers/starter-utils/combat-runtime-2d.js +290 -0
  33. package/src/helpers/starter-utils/core.js +150 -0
  34. package/src/helpers/starter-utils/dialogue-2d.js +351 -0
  35. package/src/helpers/starter-utils/enemy-archetypes-2d.js +68 -0
  36. package/src/helpers/starter-utils/index.js +26 -0
  37. package/src/helpers/starter-utils/inventory-2d.js +268 -0
  38. package/src/helpers/starter-utils/journal-2d.js +267 -0
  39. package/src/helpers/starter-utils/platformer-3d.js +132 -0
  40. package/src/helpers/starter-utils/scene-audio-2d.js +236 -0
  41. package/src/helpers/starter-utils/streamed-world-2d.js +378 -0
  42. package/src/helpers/starter-utils/tilemap-nav-2d.js +499 -0
  43. package/src/helpers/starter-utils/tilemap-world-2d.js +205 -0
  44. package/src/helpers/starter-utils/triggers.js +662 -0
  45. package/src/helpers/starter-utils/tween-2d.js +615 -0
  46. package/src/helpers/starter-utils/wave-director.js +101 -0
  47. package/src/helpers/starter-utils/world-compositor-2d.js +253 -0
  48. package/src/helpers/starter-utils/world-persistence-2d.js +180 -0
  49. package/src/mobile/android/build.mjs +606 -0
  50. package/src/mobile/android/host-artifact.mjs +280 -0
  51. package/src/mobile/ios/build.mjs +1323 -0
  52. package/src/mobile/ios/host-artifact.mjs +819 -0
  53. package/src/mobile/shared/capabilities.mjs +174 -0
  54. package/src/packs/catalog.mjs +259 -0
  55. package/src/perf-benchmark-runner.mjs +17 -12
  56. package/src/perf-benchmark.mjs +408 -4
  57. package/src/publish-command.mjs +303 -6
  58. package/src/replay-runtime.mjs +257 -0
  59. package/src/scaffold/config.mjs +2 -0
  60. package/src/scaffold/fs.mjs +8 -1
  61. package/src/scaffold/project-docs.mjs +43 -1
  62. package/src/scaffold.mjs +4 -0
  63. package/src/session-runtime.mjs +4 -3
  64. package/src/web-conformance.mjs +0 -36
  65. package/templates/create/2d-adventure/config/gameplay/adventure.config.js +9 -6
  66. package/templates/create/2d-adventure/content/gameplay/dialogue.js +85 -0
  67. package/templates/create/2d-adventure/content/gameplay/world.js +32 -36
  68. package/templates/create/2d-adventure/content/gameplay/world.tilemap.json +273 -0
  69. package/templates/create/2d-adventure/docs/design/loop.md +4 -3
  70. package/templates/create/2d-adventure/prefabs/relic.prefab.js +10 -10
  71. package/templates/create/2d-adventure/prefabs/world.prefab.js +127 -74
  72. package/templates/create/2d-adventure/scenes/gameplay.scene.js +603 -112
  73. package/templates/create/2d-adventure/src/runtime/capabilities.js +16 -0
  74. package/templates/create/2d-adventure/ui/hud.screen.js +187 -4
  75. package/templates/create/2d-adventure/ui/journal.screen.js +183 -0
  76. package/templates/create/3d/scenes/gameplay.scene.js +30 -3
  77. package/templates/create/3d/src/runtime/capabilities.js +5 -0
  78. package/templates/create/3d/src/runtime/materials.js +10 -0
  79. package/templates/create/3d-adventure/scenes/gameplay.scene.js +30 -3
  80. package/templates/create/3d-adventure/src/runtime/capabilities.js +5 -0
  81. package/templates/create/3d-adventure/src/runtime/materials.js +11 -0
  82. package/templates/create/3d-collectathon/scenes/gameplay.scene.js +30 -3
  83. package/templates/create/3d-collectathon/src/runtime/capabilities.js +5 -0
  84. package/templates/create/3d-collectathon/src/runtime/materials.js +10 -0
  85. package/templates/create/shared/src/runtime/ui-forms.js +552 -0
  86. package/templates/create/shared/src/starter-utils/adventure-world-2d.js +221 -0
  87. package/templates/create/shared/src/starter-utils/animation-packaging-2d.js +203 -0
  88. package/templates/create/shared/src/starter-utils/atlas-assets-2d.js +111 -0
  89. package/templates/create/shared/src/starter-utils/autoplay-debug-2d.js +215 -0
  90. package/templates/create/shared/src/starter-utils/combat-runtime-2d.js +290 -0
  91. package/templates/create/shared/src/starter-utils/dialogue-2d.js +351 -0
  92. package/templates/create/shared/src/starter-utils/index.js +15 -1
  93. package/templates/create/shared/src/starter-utils/inventory-2d.js +268 -0
  94. package/templates/create/shared/src/starter-utils/journal-2d.js +267 -0
  95. package/templates/create/shared/src/starter-utils/scene-audio-2d.js +236 -0
  96. package/templates/create/shared/src/starter-utils/streamed-world-2d.js +378 -0
  97. package/templates/create/shared/src/starter-utils/tilemap-nav-2d.js +499 -0
  98. package/templates/create/shared/src/starter-utils/tilemap-world-2d.js +205 -0
  99. package/templates/create/shared/src/starter-utils/world-compositor-2d.js +253 -0
  100. package/templates/create/shared/src/starter-utils/world-persistence-2d.js +180 -0
  101. package/templates/create-bin/play.js +36 -7
  102. package/templates/skills/auramaxx/SKILL.md +46 -0
  103. package/templates/skills/auramaxx/project-requirements.md +68 -0
  104. package/templates/skills/auramaxx/starter-recipes.md +104 -0
  105. package/templates/skills/auramaxx/validation-checklist.md +49 -0
  106. package/templates/skills/aurajs/SKILL.md +0 -96
  107. package/templates/skills/aurajs/api-contract-3d.md +0 -7
  108. package/templates/skills/aurajs/api-contract.md +0 -7
@@ -0,0 +1,104 @@
1
+ # AuraMaxx Starter Recipes
2
+
3
+ Use the current template id from `aura.capabilities.json` or `aura.config.json`
4
+ to pick the right recipe.
5
+
6
+ ## 2d-adventure
7
+
8
+ - Edit first:
9
+ - `content/gameplay/world.js`
10
+ - `config/gameplay/adventure.config.js`
11
+ - `scenes/gameplay.scene.js`
12
+ - `prefabs/world.prefab.js`
13
+ - `prefabs/relic.prefab.js`
14
+ - `ui/hud.screen.js`
15
+ - Good first tasks:
16
+ - tighten movement and interaction feel
17
+ - rewrite room nouns, relic goals, dialogue, and route beats
18
+ - add one strong interaction before widening scope
19
+ - Avoid:
20
+ - burying route data inside the scene
21
+ - replacing starter-utils with duplicated local helpers
22
+
23
+ ## 2d-shooter and 2d-survivor
24
+
25
+ - Edit first:
26
+ - `config/gameplay/*.config.js`
27
+ - `scenes/gameplay.scene.js`
28
+ - `prefabs/player.prefab.js`
29
+ - enemy or projectile prefabs
30
+ - `ui/*.screen.js`
31
+ - Good first tasks:
32
+ - pacing, spawn pressure, weapon feel, hit feedback, restart loop
33
+ - Avoid:
34
+ - mixing balance constants into render code
35
+ - adding many enemy types before one wave feels good
36
+
37
+ ## deckbuilder-2d
38
+
39
+ - Edit first:
40
+ - starter-owned `content/registries/*`
41
+ - `config/gameplay/*`
42
+ - combat scene files
43
+ - HUD and card presentation screens
44
+ - Good first tasks:
45
+ - one coherent card set
46
+ - one enemy intent loop
47
+ - one relic or progression rule
48
+ - Avoid:
49
+ - putting card data directly in scene logic
50
+
51
+ ## 3d-adventure, 3d-platformer, 3d-collectathon
52
+
53
+ - Edit first:
54
+ - `content/gameplay/course.js`
55
+ - `config/gameplay/*.config.js`
56
+ - `scenes/gameplay.scene.js`
57
+ - `prefabs/world.prefab.js`
58
+ - `prefabs/player.prefab.js`
59
+ - `src/starter-utils/avatar-3d.js`
60
+ - `src/starter-utils/platformer-3d.js`
61
+ - Good first tasks:
62
+ - movement feel, camera follow, checkpoints, collectibles, route readability
63
+ - Avoid:
64
+ - hardcoding course layout in the scene
65
+ - treating imported models as the only source of gameplay truth
66
+
67
+ ## local-multiplayer
68
+
69
+ - Edit first:
70
+ - `config/gameplay/local-multiplayer.config.js`
71
+ - `content/gameplay/room-layout.js`
72
+ - `scenes/gameplay.scene.js`
73
+ - `ui/hud.screen.js`
74
+ - Good first tasks:
75
+ - one host/join room loop
76
+ - one shared objective
77
+ - one clear disconnect or retry path
78
+ - Avoid:
79
+ - breaking the local-first host flow while chasing internet features
80
+ - assuming headless state or action flows work unless you verify them
81
+
82
+ ## blank
83
+
84
+ - Edit first:
85
+ - `src/main.js`
86
+ - `scenes/gameplay.scene.js`
87
+ - `prefabs/player.prefab.js`
88
+ - `ui/hud.screen.js`
89
+ - `config/gameplay/game.config.json`
90
+ - Good first tasks:
91
+ - one visible mechanic
92
+ - one HUD element
93
+ - one authored config value
94
+ - Avoid:
95
+ - recreating the whole scaffold model from scratch
96
+
97
+ ## Cross-starter recipe
98
+
99
+ For any starter:
100
+
101
+ 1. make one mechanic feel good
102
+ 2. make the goal readable in HUD or world feedback
103
+ 3. move stable data into `config/` or `content/`
104
+ 4. only then add more systems
@@ -0,0 +1,49 @@
1
+ # AuraMaxx Validation Checklist
2
+
3
+ Pick the smallest set that matches the task.
4
+
5
+ ## Always
6
+
7
+ - Run `auramaxx explain` after structure changes.
8
+ - Run `auramaxx check` before and after edits.
9
+ - If you add new scaffold nouns, run `auramaxx make list --json` first and use
10
+ `auramaxx make ...` where possible.
11
+
12
+ ## Gameplay slice
13
+
14
+ - Run `npm run dev`.
15
+ - Confirm:
16
+ - the game boots
17
+ - the first objective is readable
18
+ - controls match the intended loop
19
+ - HUD or world feedback reflects the new mechanic
20
+ - there are no obvious stuck states or soft-locks
21
+
22
+ ## State and action tooling
23
+
24
+ - Run `npm run state -- export --compact` when the project claims state export.
25
+ - Run `npm run action -- schema --compact` when the project claims action
26
+ tooling.
27
+ - If these fail, record the exact reason instead of pretending the flow works.
28
+
29
+ ## Session and headless flows
30
+
31
+ - Use `auramaxx session start --headless --name ci-loop --compact` only after
32
+ verifying the starter and runtime actually support that lane.
33
+ - If the project is multiplayer or starter-heavy, verify headless flows
34
+ explicitly instead of assuming parity with visible `npm run dev`.
35
+
36
+ ## Publish and package surface
37
+
38
+ - Run `auramaxx publish --dry-run` for package-surface and build validation.
39
+ - Run `auramaxx external-assets generate --public-base-url <url>` only after the
40
+ build artifacts exist and the project actually needs self-hosted assets.
41
+
42
+ ## What to report
43
+
44
+ When you finish, report:
45
+
46
+ - which commands passed
47
+ - which commands failed
48
+ - whether failures are task regressions or pre-existing runtime gaps
49
+ - what the player-visible outcome is
@@ -1,96 +0,0 @@
1
- # AuraJS Skill
2
-
3
- Use this skill when building or modifying AuraJS games.
4
-
5
- ## Read First
6
- - `docs/external/game-dev-api/start-here.md`
7
- - `docs/external/game-dev-api/creating-a-new-game.md`
8
- - `docs/external/game-dev-api/working-with-an-aurajs-project.md`
9
- - `docs/external/game-dev-api/examples-and-first-game-recipes.md`
10
- - `docs/external/game-dev-api/common-failures-and-fixes.md`
11
-
12
- Then choose the smallest exact-reference page that matches the task:
13
-
14
- - `docs/reference/runtime-and-2d-exact-reference.md`
15
- - `docs/reference/lifecycle-window-input-and-2d-camera-exact-reference.md`
16
- - `docs/reference/draw2d-assets-audio-storage-and-math-exact-reference.md`
17
- - `docs/reference/gameplay-systems-exact-reference.md`
18
- - `docs/reference/animation-scenes-state-tilemaps-and-ecs-exact-reference.md`
19
- - `docs/reference/3d-rendering-and-content-exact-reference.md`
20
- - `docs/reference/draw3d-camera-lighting-and-postfx-exact-reference.md`
21
- - `docs/reference/scene3d-mesh-material-gltf-and-avatar-exact-reference.md`
22
- - `docs/reference/world-simulation-and-multiplayer-exact-reference.md`
23
- - `docs/reference/physics3d-terrain-navmesh-character3d-and-compute-exact-reference.md`
24
- - `docs/reference/net-multiplayer-and-runtime-sessions-exact-reference.md`
25
- - `docs/reference/tooling-web-and-distribution-exact-reference.md`
26
- - `docs/reference/project-cli-publish-assets-and-web-exact-reference.md`
27
-
28
- Only after that should you open:
29
-
30
- - `api-contract.md` (canonical core surface)
31
- - `api-contract-3d.md` (canonical 3D surface)
32
-
33
- Do not load these files end-to-end by default.
34
- Use targeted reads: jump to the exact namespace/method you are touching, then apply that contract strictly.
35
-
36
- ## Contract Workflow
37
- 1. Identify the APIs your change touches.
38
- 2. Start with the public start/project docs if the task is about scaffolding, layout, workflow, examples, troubleshooting, or publishing.
39
- 3. Search the smallest exact-reference page that matches the subsystem.
40
- 4. Read only the needed sections of the canonical contract and follow signature + validation + error semantics.
41
- 5. If examples or older convenience docs conflict with contract docs, contract docs win.
42
-
43
- ## Build Loop
44
- 1. Implement the smallest playable mechanic in `src/main.js`.
45
- 2. Run `npm run dev` for fast iteration.
46
- 3. Validate release behavior with `npm run play`.
47
- 4. Publish with `npm run publish` when the package is ready.
48
-
49
- ## Project Shape
50
- - `src/main.js`: thin project entry.
51
- - `src/runtime/project-registry.js`: source of truth for scenes, screens, prefabs, and config/content files.
52
- - `src/runtime/app-state.js`: shared mutable app/session state.
53
- - `src/runtime/scene-registry.js`: runtime adapter generated from the project registry.
54
- - `src/runtime/app.js`: lifecycle owner.
55
- - `src/runtime/scene-flow.js`, `screen-shell.js`, `project-inspector.js`: shared runtime helpers.
56
- - `scenes/*.scene.js`: authored scenes.
57
- - `ui/*.screen.js`: authored HUD, overlay, and modal screens.
58
- - `prefabs/*.prefab.js`: canonical prefab descriptors.
59
- - `config/**`: gameplay defaults and tunables.
60
- - `content/**`: authored game definitions and starter-owned registries.
61
- - `assets/**`: game assets.
62
-
63
- ## Template Sources
64
- - Starters come from `src/cli/templates/create/<template>/` inside the AuraJS CLI package.
65
- - Shared runtime helpers come from `src/cli/templates/create/shared/src/runtime/`.
66
- - Shared starter utilities come from `src/cli/templates/create/shared/src/starter-utils/`.
67
- - Generated files come from `aura make`, which uses the packaged make templates and self-wires `scene`, `ui-screen`, and `prefab` entries into the project registry.
68
-
69
- ## Make Surface
70
- - Core make kinds: `scene`, `ui-screen`, `prefab`, `data`, `system`, `component`, `material`, `shader`.
71
- - Some starters also add extra nouns through starter catalogs. The deckbuilder starter adds `card`, `enemy`, `relic`, and `encounter`.
72
- - Prefer `auramaxx make list --json` or `npx aura make list --json` inside the current project instead of assuming starter-specific nouns from generic help output.
73
-
74
- ## Engine Guardrails
75
- - Put initialization in `aura.setup`.
76
- - Put frame-step logic in `aura.update(dt)`.
77
- - Put rendering in `aura.draw`.
78
- - Keep rendering API calls in draw-only paths.
79
- - Use `aura.window.getSize()` for runtime layout.
80
- - Clamp player/world values to avoid drift.
81
-
82
- ## Vibe Coding Defaults
83
- - Start with one loop and one strong interaction.
84
- - Add juice after core feel works: camera, hit feedback, audio, score.
85
- - Keep systems loosely coupled so AI agents can modify one mechanic at a time.
86
-
87
- ## Suggested Project Structure
88
- - `src/main.js`: primary loop and gameplay systems.
89
- - `src/runtime/`: runtime shell and project manifest files.
90
- - `scenes/`: scene modules.
91
- - `ui/`: screen modules.
92
- - `prefabs/`: prefab descriptors.
93
- - `config/`: gameplay defaults and tunables.
94
- - `content/`: authored game definitions and registries.
95
- - `assets/`: sprites, audio, fonts.
96
- - `skills/`: agent workflows and contract references.
@@ -1,7 +0,0 @@
1
- # AuraJS API Contract (3D)
2
-
3
- Canonical source:
4
- - `../../docs/api-contract-3d.md`
5
-
6
- Published snapshots copy that canonical contract into this file path.
7
- For agent work, use targeted section reads on the exact APIs you touch.
@@ -1,7 +0,0 @@
1
- # AuraJS API Contract (Core)
2
-
3
- Canonical source:
4
- - `../../docs/api-contract.md`
5
-
6
- Published snapshots copy that canonical contract into this file path.
7
- For agent work, use targeted section reads on the exact APIs you touch.