Adding values to template.yml definitions

I’m trying to incorporate the task name into the photoshop_asset_work definition inside of templates.yml, but I’m not sure where I would define what my new value {task_name} would be equal to. Currently it contains ‘@asset_root/work/photoshop/{name}.v{version}.psd’, and though {version} and {name} are defined at the top of the yml as int and string, I’m not sure where its defined what these variables pull those values from. I’ve added {task_name} as a string next to them with the other keys, but I don’t know where to define what values these keys will have.

These variables are typically populated via your context. Be careful though, the normal context only returns a “step” and not necessarily the “task”.
Assuming you are in a task context, you would need to add a key to template.yml for “task_name” that’s an entity_key with the entity name supplied as the field to use. see. Filesystem Configuration Reference - SG Developer