<?php

// file.update:after
return function ($newFile, $oldFile) {
  $project = $newFile->parent()->template() == 'project' ? $newFile->parent() : $newFile->parent()->parents()->findBy('template', 'project');
  if ($project) {    
    $steps = $project->rebuildStepsCache();
  }
};