Skip to content

Scaffold Roblox game project with local-first quality gates#1

Open
dinoderek wants to merge 3 commits into
mainfrom
claude/roblox-game-scaffold-x6bfd9
Open

Scaffold Roblox game project with local-first quality gates#1
dinoderek wants to merge 3 commits into
mainfrom
claude/roblox-game-scaffold-x6bfd9

Conversation

@dinoderek

Copy link
Copy Markdown
Owner

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)

  • Rojo 7.7.0, StyLua 2.5.2, selene 0.31.0, luau-lsp 1.68.1, Lune 0.10.5
  • selene's Roblox std committed as roblox.yml (hermetic lint runs)
  • No package manager yet by design — Wally is stale; policy adopts pesde when the first runtime dependency lands

Quality gates — lune run check (same gates in CI)

  1. stylua --check src tests lune
  2. selene src tests lune
  3. lune run analyze — strict luau-lsp analysis: Roblox pass (downloaded globalTypes.d.luau + Rojo sourcemap) and a Lune pass for tests/scripts
  4. lune run test — 21 unit tests under Lune with vendored tiniest (BSD-3)
  5. rojo build smoke test

Example slice (the architecture to copy)

  • src/shared/Currency/Wallet.luau — pure logic, no Roblox APIs
  • src/server/Services/CurrencyService.luau — dependency-injected orchestration, tested against tests/helpers/FakeDataStore.luau
  • src/server/Adapters/DataStoreAdapter.luau + composition root — the only Roblox-touching files, kept logic-free
  • default.project.json mounts src/shared into both ReplicatedStorage and ServerScriptService so relative string requires resolve identically in the engine and Lune

Agent 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.md imports it via @AGENTS.md
  • docs/cloud-integration-tests.md stubs the future Open Cloud Luau Execution harness

Test plan

  • All gates green locally (format, lint, tests, build)
  • CI green including the luau-lsp type gate (run #2) — run Scaffold Roblox game project with local-first quality gates #1 caught a real strict-mode nil-comparison error, fixed in the second commit
  • Verified the gates actually gate: a deliberately broken test and the type error both fail the pipeline

🤖 Generated with Claude Code

https://claude.ai/code/session_01HfzdcKErige9QKVtsMtQoY


Generated by Claude Code

claude added 3 commits July 12, 2026 20:50
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants