docs: function createAgentState (appname, moduleName, state, parentUrl) {
    createTemplate(appname, path.join('generated', 'agents', 'agentController.js'), {
      moduleName: moduleName,
      state: state,
      parentUrl: parentUrl
    })
  
    var oldControllerPath = path.join(appname, 'generated', 'agents', 'agentController.js'),
      newControllerPath = path.join(appname, 'generated', 'agents', moduleName, 'controllers', state.name + '.js')
  
    fs.renameSync(oldControllerPath, newControllerPath)
    if (state.elements) {
      for (childState in state.elements) {
        createAgentChildState(appname, moduleName, state.elements[childState], state.name, parentUrl)
      }
    }
  
    createTemplate(appname, path.join('generated', 'agents', 'agent.html'), {
      moduleName: moduleName,
      state: state,
      parentUrl: parentUrl
    })
  
    var oldHtmlPath = path.join(appname, 'generated', 'agents', 'agent.html'),
      newHtmlPath = path.join(appname, 'generated', 'partials', 'agents', moduleName, state.name + '.html')
    fs.renameSync(oldHtmlPath, newHtmlPath)
  }