Constraint
Must call the puda-memory skill immediately after creating or updating a protocol file. That skill keeps project.md as the source of truth; it will append the new protocol link and history entry.
Protocol Structure
A single protocol can contain commands for multiple machines. Each command specifies its own machine_id. Step numbers are sequential execution groups across all commands. If commands are meant to be executed in parallel, use the same step_number; however, machine_id cannot be repeated within the same parallel command group.
Top-level fields:
project_id: UUID from project.md in the project rootprotocol_id: New UUID per protocol (e.g.python -c "import uuid; print(uuid.uuid4())")user_id,username: Frompuda config listdescription: Short description of what the protocol doestimestamp: ISO 8601 UTC (e.g.datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"))commands: Array of command objects (see below)
Each command:
step_number: Sequential integer from 1; commands with the same value execute in parallelname: Valid command name for the specified machinemachine_id: Target machine idparams: Required and optional parameters for the command
Command Generation
CRITICAL: Before generating commands, always invoke the puda-labs skill to read the relevant machine reference and commands
CRITICAL: If you are unsure of which lab or machine to use for a certain task, ask the user before proceeding
CRITICAL: Make use of previous protocol files whenever possible unless user explicitly wants a new file to be generated. Skip the first 4 instructions if not needed
Instructions
- Ensure user is logged in: Run
puda loginand confirm the user is authenticated before proceeding. - Ensure project exists: If there is no project yet, ask the user for the project name and description before continuing, then use
puda initto create the project folder. - User info: Run
puda config listforuser_idandusername. - Protocol ID and timestamp: Generate UUID and ISO datetime (e.g. via Python
uuid.uuid4()anddatetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")). - Machine references: Use
puda-labsskill to understand the machines and available commands. - Generate: Create a new JSON file under the project's
protocols/directory. Filename =protocol_id.json. - Validate: Run
puda protocol validate -f <file_name>to validate the protocol. - Update project memory: Must invoke the puda-memory skill right after creating/updating the file so
project.mdis updated.
Output Format (JSON)
{
"project_id": "<project_id>",
"protocol_id": "<protocol_id>",
"user_id": "<from puda config list>",
"username": "<from puda config list>",
"description": "description for this protocol",
"timestamp": "<ISO 8601>",
"commands": []
}Each command: step_number, name, machine_id, params
Troubleshooting
- RUN_ID_MISMATCH when sending a protocol file: run
puda machine reset <machine_id>to reset the machine, then send the protocol again.
Best Practices
- Multi-machine: each command must have the correct
machine_id; use the samestep_numberonly for parallel commands, and do not repeat amachine_idin the same step. - Always validate after creating; fix any errors before sending.
- After writing the file, always call puda-memory to update
project.md.