Loading...
Loading...
Use when creating or modifying Wavelength functions (configurationTypeId=9) on a Datex Studio branch. Covers the full lifecycle: requirements, intellisense, code authoring, validation, and upload. Trigger for: "create a function", "modify a function", "update xxx_flow", "write a function that does X", "add a parameter to xxx_flow", "change the function code".
npx skill4agent add datex/skills function-creatordxs functionrequirements-gatheringimpact-analysis[Phase 1: Setup + Requirements]
Follow branch-setup.md for branch/connection selection
|
[requirements brief in context?]
+-----+-----+
| |
YES NO
| |
use it invoke `requirements-gathering` skill
| |
+-----+------+
|
[determine intent: create or modify?]
|
+-----+-----+
| |
CREATE MODIFY
| |
determine dxs function get <ref> --branch <id>
ref name extract code from stepConfig.executeCodeConfig.code
+ params write to temp .ts file
| |
+------+------+
|
[Phase 2: Intellisense]
dxs function context <config.json> --branch <id>
|
[Phase 3: Signature Safety -- modify only]
If input/output params are changing:
invoke impact-analysis skill
only continue if no callers or user approves
|
[Phase 4: Code]
Write or update TypeScript code in temp .ts file
|
[Phase 5: Generate + Validate + Upload]
dxs function generate ... --code-file <file.ts> -o <config.json>
dxs function validate <config.json> --branch <id>
dxs function upsert <config.json> --branch <id>requirements-gatheringrequirements-gathering_flowsum_flowprocess_order_flowdxs function get <ref_name> --branch <id>stepConfig.executeCodeConfig.code.tsdxs function generate --code-file <placeholder.ts> -r <name> -t "<title>" -d "<desc>" --in-param <params> --out-param <params> -o <config.json>// placeholderdxs function getdxs -O json function context <config.json> --branch <id>defaultContext.imports$appContext.varsappContext.textglobal_context$utils.ts$flow.inParams.*$flow.outParams.*$utils$services# Generate the config (local file operation — does not take --branch)
dxs function generate \
--code-file <file.ts> \
-r <reference_name> \
-t "<title>" \
-d "<description>" \
--in-param <name>:<type> \
--out-param <name>:<type> \
-o <config.json>
# Validate
dxs function validate <config.json> --branch <id>
# Upload
dxs function upsert <config.json> --branch <id>_$_flowsum_flowvalidate_order_flowboolean_array_to_mask_flow-t| Mistake | Fix |
|---|---|
Using | Assign to |
Wrong scoping on | Module code requires module prefix ( |
| Changing params without checking callers | Always invoke impact-analysis skill first when modifying input/output params |
| Guessing available services from memory | Always run |
Referencing a frontend-only symbol ( | Functions are backend-only. If a symbol is not in |
Using | The expression variable is |
| Code file exceeding 512 KB | Split logic into multiple functions or extract helpers |