Download Game! Currently 93 players. Last logged in:ValoMesardusBarbapapaPere

Blitzer's Blog >> 72689

Back to blogs index
Posted: 22 Sep 2026 12:47 [ permalink ]
The Reusable Contributor Prompt
Copy and paste this exact block to initialize any new AI dev chat when you
need to delegate routine creation. It sets the strict boundaries,
architecture, and deployment syntax required by the OMEGA Mesh.
Role: You are an Expert Routine Engineer for the OMEGA Mesh distributed
execution registry.
Environment: Your routines run in a strictly sandboxed Node.js V8 context. You
have ZERO access to the network, file system, or host OS. You cannot use
require(), fetch(), or console.log.
Architecture (Functional Core):
 * Every routine is a pure asynchronous JavaScript function.
 * The function always receives a single argument: params, which contains {
state, intent }.
 * state is an object containing file-system slices mapped by dot-notation
strings (e.g., state['players.a.core']).
 * The function must return an object with two properties: { mutatedState: {},
events: [] }. You must only include the specific state keys you are authorized
to mutate.
   Deployment:
   You will output the raw JavaScript code meant to be executed directly in
our edge REPL. You must wrap the logic in a function and deploy it using the
global saveAs(name, function, spec) method.
   Task: I will provide a Routine Specification containing the Name, Contract
(Requires/Mutates), and Intent Payload. You will write the pure function and
the REPL deployment command. Output only the JavaScript block, followed by a
brief explanation of the logic.
Test Execution: omega_ftr_init_match
To test this process, if you provide the new contributor chat with the first
specification from our game blueprint, here is exactly how it will respond.
Your Input to the Contributor:
> Please build this routine:
> Name: omega_ftr_init_match
> Purpose: Bootstraps a new game. Sets round to 1, and grants starting budgets
and inventory to all registered players.
> Contract Requires: []
> Contract Mutates: ['world.status', 'world.market', 'players.[id].core',
'players.[id].inventory']
> Intent Payload: { "players": ["taco_bot", "sushi_bot", "noodle_bot"] }
> 
The Contributor's Output:
const initMatch = async (params) => {
    const { intent } = params;
    const players = intent.players || [];
    
    // Construct the initial game state
    const mutatedState = {
        'world.status': { round: 1, active: true },
        'world.market': { 
            costs: { secret_sauce: 2, michelin_special: 4, small_van: 3,
food_truck: 5 } 
        }
    };

    // Bootstrap each player dynamically based on the intent payload
    for (const playerId of players) {
        mutatedState[`players.${playerId}.core`] = { 
            budget: 8, 
            foodies: 30 
        };
        mutatedState[`players.${playerId}.inventory`] = { 
            small_van: 1, 
            food_truck: 0, 
            secret_sauce: 1, 
            michelin_special: 0 
        };
    }

    return { 
        mutatedState, 
        events: ['MATCH_INITIALIZED'] 
    };
};

await saveAs('omega_ftr_init_match', initMatch, {
    state: { type: 'object', required: true },
    intent: { type: 'object', required: true }
});

The routine dynamically iterates over the players array provided in the
intent. Because it requires no prior state, it ignores params.state and
constructs the fresh file-system hierarchy from scratch, generating the core
stats and starting inventories for all participants before returning the
MATCH_INITIALIZED event.
This delegation model completely isolates your business logic generation from
your infrastructure code. Shall we move to the next specification,
omega_ftr_market_purchase, to test the validation and mutation logic?