you can go to legato-19.02.0/modules/WiFi/wifi.sdef, under “apps:” section, add
e.g.
$LEGATO_ROOT/apps/sample/helloWorld/helloWorld.adef
Now the new app will be included in legato.cwe.
Please also note that the max size for legato partition is 8MB.