corezoid-process-updater

Modifies existing Corezoid processes and fixes broken connectors — covers exporting, editing process JSON, managing environment variables, and diagnosing failed tasks. Activate whenever a user asks to update a process, fix a connector, add a node, change how a process works, debug a failed task, or provides ResultNodeObjID and ResultTaskData showing where execution stopped. Also activate when the user says "add a call to process X", "the task failed with error Y", or "modify the logic". This skill knows the correct export→edit→variable→test workflow and error taxonomy.

Corezoid Process Updater

CRITICAL: Use MCP tools for all API operations

For reading process state and modifying nodes, always use MCP tools — never write Python scripts:

OperationUse this MCP tool
Read process structuremcp__corezoid__get_process_scheme
Get process metadatamcp__corezoid__get_process_details
Modify a single nodemcp__corezoid__modify_node
Modify multiple nodesmcp__corezoid__batch_modify_nodes
Commit changesmcp__corezoid__commit
Create a test taskmcp__corezoid__create_task
Check task resultmcp__corezoid__show_task
Trace task executionmcp__corezoid__list_task_history
Any raw API opmcp__corezoid__make_request

convctl.sh is still used for fetch/deploy operations (it's the CLI deployment tool, not a Python replacement).


Required parameters

ParameterPurpose
API_URLCorezoid instance URL
API_TOKENAuth token
WORKSPACE_IDWorkspace identifier
PROJECT_IDProject identifier (needed for variable creation)
ROOT_FOLDER_IDRoot folder for export
PROC_IDProcess ID being modified

Path A — Updating existing logic

1. Export the project context

API_URL=<API_URL> API_TOKEN=<API_TOKEN> WORKSPACE_ID=<WORKSPACE_ID> \
  ./convctl.sh fetch-folder <ROOT_FOLDER_ID> .processes/

Analyze the exported processes to understand the current structure and any process IDs referenced.

2. Export the specific process to edit

API_URL=<API_URL> API_TOKEN=<API_TOKEN> WORKSPACE_ID=<WORKSPACE_ID> \
  ./convctl.sh fetch-process <PROC_ID> .processes/target_process.json

Work on .processes/target_process.json — this is the file to edit.

3. Make the changes

Apply the requested modifications directly to .processes/target_process.json.

If adding a Call Process node, use this structure:

{
  "id": "<new-node-id>",
  "obj_type": 0,
  "condition": {
    "logics": [
      {
        "type": "api_rpc",
        "conv_id": <target_process_id>,
        "err_node_id": "<reply-error-node-id>",
        "extra": {
          "param1": "{{value1}}",
          "param2": "{{value2}}"
        },
        "extra_type": {
          "param1": "string",
          "param2": "number"
        },
        "group": "all"
      },
      {"type": "go", "to_node_id": "<next-node-id>"}
    ],
    "semaphors": []
  },
  "title": "Call <ProcessName>",
  "description": "Calls the X process with parameters",
  "x": 500, "y": 460,
  "extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
  "options": null
}

CRITICAL: type: "api_rpc" — never use "call_process". extra and extra_type must have identical keys with matching types.

4. Manage variables (for new constants)

All URLs, tokens, API endpoints, and configuration values must be stored as variables — never hardcoded.

Check first: look in .processes/variables.json — if the variable already exists, use it.

Create if missing:

API_URL=<API_URL> API_TOKEN=<API_TOKEN> WORKSPACE_ID=<WORKSPACE_ID> \
  PROJECT_ID=<PROJECT_ID> \
  ./convctl.sh create-variable <ROOT_FOLDER_ID> <NAME> <DESCRIPTION> <VALUE>

Variable naming rules: lowercase letters, numbers, hyphens only — min 3 chars. Good: api-endpoint, auth-token-prod, db-host. Bad: apiEndpoint, token, T.

Reference in process JSON: {{env_var[@variable-name]}}

5. Test

API_URL=<API_URL> API_TOKEN=<API_TOKEN> WORKSPACE_ID=<WORKSPACE_ID> \
  ./convctl.sh run-process <PROC_ID> .processes/target_process.json '{"key":"value"}'

Must pass ("Task completed") before the work is done.


Path B — Fixing a broken connector (error diagnosis)

1. Collect error information from the user

Ask for:

  • ResultNodeObjID — the node ID where execution stopped
  • ResultTaskData — the full task data object at the time of failure

2. Export the current process

API_URL=<API_URL> API_TOKEN=<API_TOKEN> WORKSPACE_ID=<WORKSPACE_ID> \
  ./convctl.sh fetch-process <PROC_ID> .processes/target_process.json

Find the node with "id": "<ResultNodeObjID>" in the JSON.

3. Diagnose the error

Read ResultTaskData and look for these system parameters:

For API Call failures (api logic):

ParameterMeaning
__conveyor_api_return_type_error__"hardware" = network/infra issue (retryable), "software" = logical error
__conveyor_api_return_code__HTTP status code returned
__conveyor_api_return_type_tag__Error tag: api_connection_error, api_bad_answer, api_timeout, api_validation_error
__conveyor_api_return_description__Error description string

For Code Node failures (api_code logic):

ParameterMeaning
__conveyor_code_return_type_error__"hardware" or "software"
__conveyor_code_return_description__JS error message (syntax error, runtime exception)
__conveyor_code_return_type_tag__api_code_syntax_error or api_code_runtime_error

Common error patterns and fixes:

Error tagLikely causeFix
api_connection_errorURL unreachable or DNS failureCheck URL variable, verify endpoint availability
api_bad_answer + no_schemeURL missing https:// prefixFix URL value in env_var or code node
api_bad_answer (4xx/5xx)API returned an errorCheck request body, headers, auth token
api_timeoutExternal API too slowIncrease semaphore timeout or check API
api_code_syntax_errorJS syntax error in Code nodeFix the src field — check for unclosed brackets, typos
api_code_runtime_errorJS runtime exceptionAdd null checks, verify data fields exist before use
api_validation_errorRequest didn't match API schemaCheck raw_body structure against API spec

4. Fix the failing node

Apply the fix to .processes/target_process.json and re-test:

API_URL=<API_URL> API_TOKEN=<API_TOKEN> WORKSPACE_ID=<WORKSPACE_ID> \
  ./convctl.sh run-process <PROC_ID> .processes/target_process.json '<input_task_data>'

Repeat until "Task completed".