Pipeline

Gameplay systems

Builds server-authoritative Roblox gameplay code: the game skeleton with live configuration and data storage, gameplay systems with pure tested rules, type-safe remotes generated from schemas, and combat moves described as data. The result is a game that the other pipelines can run inside.

Tier 0 1 approval no clock

At a glance

Makes
A game folder (Loader, Configs, data storage), gameplay systems (Rules modules, Services, Controllers), rate-limited and Guard-checked remote wrappers, and a move set (frames, hitboxes, cancels).
Hardware
Tier 0 for all systems work: rules, remotes, fuzzing, mutation testing, and move validation run in Lune with no GPU. Studio (installed locally) is required for in-engine playtests.
Your approvals
One: the game brief (GAME.md answered with you at stage 1). Anything you rate 7 or above is locked in as a regression floor via kit accept.
Clock
None. This pipeline has no time budget; the clock covers the 3D, VFX, Animation, Worlds, Interfaces and Sound pipelines.
Runtime modules
Guard, RateLimit, Loader, Configs, Moves / MovesRules, Sfx / SfxRules, Vfx, Anim, Ui, Assets, Environment, Bus, Recorder. All live under ReplicatedStorage.kit; never edit them directly.

The flow in one line

brief (you approve GAME.md) → arena → systems + specs → remotes + audit → moves → playtests → accept (verdict ≥ 7)

The stages

  1. 1
    Brief you approveCreate the game folder and answer GAME.md with you.

    Every game lives in its own folder. kit game new <Name> scaffolds games/<Name>/ with src/, assets/, tests/, and its own board/. GAME.md captures the game's intent, mechanics, and constraints; kit game check verifies it. kit new system refuses to run before a game folder exists.

    lune run parallax game new MyGame
    lune run parallax game check
  2. 2
    WorldGenerate an arena with spawns and objectives.

    The gameplay arena comes from the world pipeline generators. Run kit world check <Name> and confirm zero errors (R6 reachability, spawns, camera clearance) before writing a single line of system code. A broken arena makes systems untestable.

    lune run parallax new world Arena
    lune run parallax world check Arena

    See the Worlds pipeline for the full details.

  3. 3
    SystemsScaffold a Config, Rules module, Service, Controller, and spec; fuzz and mutate.

    kit new system <PascalName> creates five files: a Config (plain tuning data; bind it with Configs.bind for live values), a Rules module (pure Luau: no Roblox APIs, fully testable in Lune), a Service (server-side, calls Rules), a Controller (client-side), and a spec file.

    Rules module rules: every decision lives in Rules, with a spec case for it (including hostile input: NaN, negative numbers, wrong types). src/shared must stay pure: no game:GetService, no Instance.new; siblings loaded via require("./X"). Use strict mode; stylua and selene must pass clean.

    Fuzzing: kit fuzz <Name>Rules sends NaN, inf, wrong types, and boundary values through every Rules function. A throw is a crash; zero allowed.

    Mutation testing: kit mutate <Name>Rules plants bugs one at a time and reports the fraction your specs catch (the kill rate), naming every survivor. The route's target is at least 80 %; the command reports the rate and does not enforce it.

    lune run parallax new system Combat
    lune run parallax fuzz CombatRules
    lune run parallax mutate CombatRules
  4. 4
    NetGenerate type-safe, rate-limited remote wrappers from a schema.

    Write assets/net/<System>.net.json to describe every remote: event name, arguments (types, ranges), and a rate limit. Run kit net to generate src/net/<System>Net.luau, a typed wrapper you never edit directly.

    The schema gate refuses an unbounded client number, an unlimited string, a Vector3 with no magnitude cap, or a request with no rate. kit verify fails if a generated file is edited or becomes stale.

    After generating remotes, run kit audit and then a red-team playtest: try to break the system by sending bad arguments directly.

    lune run parallax net
    lune run parallax audit
  5. 5
    MovesDescribe combat moves as data: frames, hitboxes, cancels, and cues.

    A move is a JSON file in assets/moves/<Move>.json. Its startup, active, and recovery frame counts come from the animation pipeline's measured phases (use "from_anim" to reference them directly). Hitboxes are given per frame (size, offset); damage, stun, knockback, hit-stop and blockstun belong to the move. Cancels name which moves can interrupt which. Sound and VFX cues are referenced by frame number.

    kit move validates the data (flags ghost hitboxes outside active frames, over-large boxes, combo links that are not cancels), checks that a swing or whoosh sound cue leads the first active frame by 50 to 300 ms, measures on-block advantage and time-to-kill, writes src/moves/<Set>.json and a move sheet at build/moves/<Set>.png. Look at the sheet: it is not optional.

    In game, Moves.serve("<Set>") runs the full server loop: cancels, combo scaling, per-frame hitboxes via GetPartBoundsInBox on the server's own positions, hit, block, chip, parry, i-frame dodge, damage, stun, knockback, hit-stop, and Sfx / Vfx playback from the data.

    lune run parallax move
  6. 6
    PlaytestsRun scripted in-engine checks through the Studio MCP; any console error fails.

    Scaffold a playtest with kit new playtest <snake>. This creates tests/playtest/<name>.luau with the check API (t.check, t.wait, t.waitFor, t.player, t.find) already imported. Write checks for every game state you care about.

    kit playtest bundle <name> compiles the script. Then use the Studio MCP to run it: start_stop_play(true), execute_luau with the bundle, save the returned JSON, start_stop_play(false), then kit playtest record <name> <file>. Any console error (from any script) fails the playtest. The performance probe (from qa.perf in kit.config.json) measures memory, workspace instance count, and frame time.

    lune run parallax new playtest smoke_combat
    lune run parallax playtest bundle smoke_combat
  7. 7
    Accept verdict ≥ 7Run the full quality gate; lock anything you rated 7 or above as a regression floor.

    kit verify --game <Name> runs the full sequence: format → selene → types → tests → VFX → UI → world → moves → contract → anim → models → audit → build. All must pass.

    Record your verdict with kit verdict system <name> <score> "...". For anything you score 7 or above, run kit accept system <name> to register it as a regression floor; the kit will refuse any future change that regresses below it.

    lune run parallax verify --game MyGame
    lune run parallax verdict system combat 8 "feels good, hitboxes precise"
    lune run parallax accept system combat

Gates

Security audit (kit audit)

Runs inside kit verify. Checks every OnServerEvent and OnServerInvoke handler in the game's server scripts.

GateWhat it checksThresholdEffect
Argument validationEvery client argument is validated with Guard, typeof, type, or a check function.All argumentsblocks
Rate limitA handler with no rate limit or cooldown.All handlerswarns
require(<asset id>)Free-model backdoor pattern: a numeric asset ID passed to require.Zero allowedblocks
loadstringDynamic code execution.Zero allowedblocks
Server InvokeClientServer invoking a client function: exploitable for denial of service.Zero allowedblocks
getfenv / setfenvEnvironment manipulation.Zero allowedwarns
FireAllClients in loopsNetwork flood.Zero allowedwarns
Accepted risk

If a pattern is intentional, add its "file:line" to qa.auditIgnore in kit.config.json, and keep the reason in your notes: the entry must be exactly "file:line" (or "file", or "file:rule"). The audit will skip that exact line.

Remote schema gate (kit net)

GateWhat it refusesEffect
Unbounded numberA client number argument with no min/max range.blocks
Unlimited stringA client string argument with no maximum length.blocks
Uncapped Vector3A client Vector3 with no magnitude cap.blocks
No rate limitA remote declared without a rate.blocks
Stale generated fileA src/net/*.luau file edited by hand or out of sync with its schema.blocks

Systems gates

GateWhat it checksThresholdEffect
FuzzNo Rules function throws on hostile input (NaN, inf, wrong types).Zero crashesblocks
Mutation baselineThe specs must pass on the unmutated copy before mutants are counted; the kill rate itself (target ≥ 80 %) is reported, not enforced.Green baselineblocks
Format / lintstylua and selene must pass clean.Zero errorsblocks
Move validation (kit move)No ghost hitboxes outside active frames, no over-large boxes, no combo links that skip cancels.Zero violationsblocks
Swing lead (kit move)On a move that deals damage, a swing or whoosh sound cue starts before the first active frame.50–300 ms leadblocks

Inputs and outputs

  • GAME.md: the game brief (answered by you at stage 1).
  • src/shared/<Name>Config.luau: live configuration values.
  • src/shared/<Name>Rules.luau: pure rules module (no Roblox APIs).
  • assets/net/<System>.net.json: remote schema (types, ranges, rate limits).
  • assets/moves/<Move>.json: move data (frames, hitboxes, cancels, cues).
  • assets/moves/sets/<Set>.json: a named set of moves (members, combo scaling, health).
  • tests/playtest/<name>.luau: in-engine playtest scripts.
  • src/net/<System>Net.luau: generated typed remote wrappers; never edit these by hand.
  • src/moves/<Set>.json: compiled move set (synced to ReplicatedStorage.KitMoves).
  • build/moves/<Set>.png: the move sheet. Look at this after every kit move run.
  • build/playtest/<name>.result.json: playtest result from Studio.
  • tests/regressions.json: bug registry (every confirmed bug as a spec case and a mutation case).

All kit modules live under ReplicatedStorage.kit and are never edited directly.

  • Guard: validate client arguments. Guard.number(v, min, max), Guard.integer, Guard.string(v, maxLen), Guard.oneOf, Guard.boolean, Guard.vector3 (rejects NaN and inf components), Guard.withinRange.
  • RateLimit: per-player token bucket. RateLimit.new(capacity, refillPerSecond); limit:take(player.UserId, os.clock()); limit:forget(player.UserId) on PlayerRemoving.
  • Moves: server-side combat loop. Moves.serve("<Set>") runs hitboxes, cancels, stun, knockback, hit-stop. Moves.client("<Set>").use / block / parry for the client.
  • Bus: presentation event bus. Server: Bus.publish("Hit", payload, {near=250}). Client: Bus.start() once, then Bus.on("Hit", fn). Clients cannot publish. Listeners are isolated; one error does not stop others.
  • Recorder: flight recorder. Keeps the last 64 remote calls in memory and prints them to the output when any error is logged. The wrappers kit net generates record every call.
  • Loader: service bootstrap (required services started in dependency order).
  • Configs: live tuning through Roblox's Experience Configs (ConfigService); Configs.bind("Combat", CombatConfig) returns the live values, with your Config module's values as the fallback.

Server request order

Every OnServerEvent and OnServerInvoke handler should follow this order. The security audit does not check the order itself: it fails the build on an unvalidated client argument and warns on a handler with no rate limit.

enabled check → limit:take(player.UserId, os.clock()) → Guard.* on every argument → Rules.check(...) → act → reply

A malformed packet returns silently. Never trust client positions, damage values, prices, or ownership claims.

-- A handler that follows the order
CombatRemote.OnServerEvent:Connect(function(player, rawMoveId)
    if not CombatConfig.enabled then return end
    if not limit:take(player.UserId, os.clock()) then return end
    local ok, moveId = Guard.oneOf(rawMoveId, CombatConfig.validMoves)
    if not ok then return end
    local ok2, err = CombatRules.check(player, moveId)
    if not ok2 then return end
    -- act
    CombatService.applyMove(player, moveId)
    -- reply (optional)
end)

Tools and hardware

ToolPurposeTier required
Lune 0.10.5Runs all kit CLI commands, specs, fuzzing, and mutation tests.Tier 0
Luau-LSP 1.70.1 + StyLua 2.5.2 + Selene 0.32.0Type checking, formatting, and linting (run by kit verify).Tier 0
Roblox Studio with MCP enabledIn-engine playtests and performance probes (required for stage 6).Tier 0 hardware + Studio
Rojo 7.7.1Syncs your source tree into Studio.Tier 0

Vetted libraries

Only libraries installed through kit add are allowed. Any other library must be vetted (two independent sources, license verified, install script read) and recorded in VETLOG.md.

LibraryPurpose
profilestorePlayer data storage.
troveLifecycle management (clean up connections on destroy).
cmdrIn-game admin commands.
zapHigh-performance networking.
lune run parallax add profilestore

Commands

# Start the lane (required before any pipeline command)
lune run parallax start code --prompt "a combat system with blocking and parrying"

# Game folder
lune run parallax game new MyGame       # scaffold game folder and GAME.md
lune run parallax game check            # verify the brief

# Systems
lune run parallax new system Combat     # scaffold Config + Rules + Service + Controller + spec
lune run parallax fuzz CombatRules      # hostile-input fuzzing (zero crashes required)
lune run parallax mutate CombatRules    # mutation testing (target: kill rate ≥ 80 %)

# Remotes
lune run parallax net                   # generate wrappers from assets/net/*.net.json
lune run parallax audit                 # security audit (also inside verify)

# Moves
lune run parallax move                  # validate move data, write sheet to build/moves/

# Playtests
lune run parallax new playtest smoke_combat
lune run parallax playtest bundle smoke_combat   # compile for Studio MCP

# Quality gate and verdict
lune run parallax verify --game MyGame
lune run parallax verdict system combat 8 "hitboxes precise, no console errors"
lune run parallax accept system combat

# Utilities
lune run parallax docs "Humanoid.WalkSpeed"   # Studio API reference with declared type
lune run parallax add profilestore            # install vetted library

How it learns

The systems pipeline has two learning mechanisms: a regression record and the lesson vault.

Regression record

Every confirmed bug becomes a spec case and a mutation case in tests/regressions.json. Use kit bug to register it:

lune run parallax bug "damage applied twice on parry" \
  --spec tests/combat.spec.luau \
  --module src/shared/CombatRules.luau \
  --line "if parried then" \
  --from "applyDamage(attacker, victim)" \
  --to "applyDamage(attacker, victim); applyDamage(attacker, victim)"

kit mutate --regressions replants all regression bugs to prove your specs still catch them.

Lesson vault

Record traps and techniques with kit lesson code "...". Lessons are ranked by relevance to each new piece and shown at lane start. Use kit lessons code to read them all.

Verdict ratchet

When you rate something 7 or above, run kit accept system <name>. The kit then refuses any future change that regresses the system below that floor.

Known limits

Known limit

Green specs are not proof of a working game. The engine proves it, in playtests. A system that passes all Lune tests can still break inside Roblox Studio due to timing, network ownership, or engine-specific behaviour.

Known limit

Lune specs have no Vector3 global. Rules modules must take plain {X, Y, Z} tables instead. Guard.vector3 is a server-side check only (it uses typeof).

Known limit

wally install kills a running rojo serve process. Stop rojo before running wally, then restart it.

Known limit

Call SetNetworkOwner(nil) on a part before the server pushes it.

Known limit

selene's printed error count is on the line before the last two lines of its output. Reading the wrong line gives a false zero.

A typical session

This is the shape of a complete systems session, from start to accepted verdict.

  1. Start the lane: lune run parallax start code --prompt "a health and respawn system". Read the boot sheet, the ranked lessons, and the last handoff.
  2. Claim a task from the board: kit task claim <id> --as "...".
  3. If no game folder exists yet: kit game new MyGame, answer GAME.md with you, run kit game check.
  4. Scaffold the system: kit new system Health. Write every decision as a pure function in HealthRules.luau with a spec case per branch, including hostile input.
  5. Write the remote schema in assets/net/Health.net.json. Run kit net. Run kit audit.
  6. Run kit fuzz HealthRules (zero crashes) and kit mutate HealthRules (target: kill rate ≥ 80 %).
  7. Write a playtest: kit new playtest health_smoke. Add checks for the core states. Bundle it and run it through Studio MCP. Record the result.
  8. Run kit verify --game MyGame. Fix any failures.
  9. Record your verdict: kit verdict system health 8 "respawn timing feels right". If 7 or above: kit accept system health.
  10. Hand off: kit handoff "built Health system, all gates green, verdict 8" --lane code --next "...".