Scaffold Roblox game project with local-first quality gates#1
Open
dinoderek wants to merge 3 commits into
Open
Scaffold Roblox game project with local-first quality gates#1dinoderek wants to merge 3 commits into
dinoderek wants to merge 3 commits into
Conversation
Native Luau + Rojo project set up for AI-agent development (AGENTS.md canonical, CLAUDE.md imports it) with every gate runnable headlessly: - rokit.toml pins Rojo 7.7.0, StyLua 2.5.2, selene 0.31.0 (pinned roblox.yml std), luau-lsp 1.68.1, Lune 0.10.5 - lune run check drives format, lint, luau-lsp type analysis, unit tests, and a rojo build smoke test; same gates run in GitHub Actions - Unit tests run under Lune with vendored dphfox/tiniest (BSD-3); runner discovers tests/**/*.spec.luau - Example slice demonstrates the architecture: pure Wallet logic in src/shared, DI-based CurrencyService in src/server/Services (tested against an in-memory fake store), thin DataStoreAdapter + composition root as the only Roblox-touching files - default.project.json mounts src/shared into both ReplicatedStorage and ServerScriptService so relative string requires resolve identically in the engine and Lune - docs/cloud-integration-tests.md stubs the future Open Cloud Luau Execution harness Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HfzdcKErige9QKVtsMtQoY
CI's luau-lsp gate caught what the local gates couldn't (no luau-lsp binary in the dev container): strict Luau rejects ==/~= nil comparisons on metatable-based types like Wallet. Switch CurrencyService to truthiness checks and document the gotcha in AGENTS.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HfzdcKErige9QKVtsMtQoY
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HfzdcKErige9QKVtsMtQoY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scaffolds the repository for Roblox game development in native Luau, optimized for AI-agent workflows (Claude Code + Codex) and for verifying as much as possible before anything touches a Roblox server.
Toolchain (pinned via Rokit in
rokit.toml)roblox.yml(hermetic lint runs)Quality gates —
lune run check(same gates in CI)stylua --check src tests luneselene src tests lunelune run analyze— strict luau-lsp analysis: Roblox pass (downloadedglobalTypes.d.luau+ Rojo sourcemap) and a Lune pass for tests/scriptslune run test— 21 unit tests under Lune with vendored tiniest (BSD-3)rojo buildsmoke testExample slice (the architecture to copy)
src/shared/Currency/Wallet.luau— pure logic, no Roblox APIssrc/server/Services/CurrencyService.luau— dependency-injected orchestration, tested againsttests/helpers/FakeDataStore.luausrc/server/Adapters/DataStoreAdapter.luau+ composition root — the only Roblox-touching files, kept logic-freedefault.project.jsonmountssrc/sharedinto both ReplicatedStorage and ServerScriptService so relative string requires resolve identically in the engine and LuneAgent docs
AGENTS.md(canonical): project map, layer rules, quality-gate policy, require rules, testing policy, and guardrails including "never trust memorized library versions/APIs — verify against live sources"CLAUDE.mdimports it via@AGENTS.mddocs/cloud-integration-tests.mdstubs the future Open Cloud Luau Execution harnessTest plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01HfzdcKErige9QKVtsMtQoY
Generated by Claude Code