anchor.diff:  
   {:toc}
   
  -## Types of hooks
  -
  -There are two types of hook:
  +## Categories of hooks
  +
  +There are two categories of hook:
   
   * Lifecycle hooks
  -* Step hooks
  +* Job hooks
   
   Lifecycle hooks are **executed** as part of the agent lifecycle. For example,
   the `pre-bootstrap` hook is executed before starting the per-job bootstrap
   process, and the `agent-shutdown` hook is executed before the agent process
   terminates.
   
  -Step hooks are **sourced** as part of each Buildkite Job. Step hooks are run in
  -a per-job shell environment, and any exported environment variables are carried
  -to subsequent phases and hooks for a given job. For example, the `environment`
  -hook can modify or export new environment variables for the subsequent job
  -phases and hooks.
  +Job hooks are **sourced** as part a job’s phases. Job hooks are run in a per-job
  +shell environment, and any exported environment variables are carried to the
  +job’s subsequent phases and hooks. For example, the `environment` hook can
  +modify or export new environment variables for the job’s subsequent phases and
  +hooks.
   
   ## Agent Hook Locations
   
   There are three locations that agent hooks are found:
   
   * Global hooks - these exist on the agent file system in a directory created by
  -your agent installer and can define both Lifecycle and Step hooks. These step
  -hooks are run for every job the agent receives, from any pipeline.
  +your agent installer. The global hooks directory can define both Lifecycle and
  +Job hooks. Global job hooks are run for every job the agent receives, from any
  +pipeline.
   * Repository hooks - these exist in your pipeline repository’s
  -`.buildkite/hooks` directory and can define step hooks.
  +`.buildkite/hooks` directory and can define job hooks.
   * Plugin hooks - these are provided by any [plugins](/docs/plugins) you’ve
  -defined in your `pipeline.yml` and can define step hooks.
  +defined in your `pipeline.yml` and can define job hooks.
   
   ### Global hooks
   
  
positive.code: export GITHUB_RELEASE_ACCESS_KEY='xxx'
  ```
  
  ## Step hooks on Windows
  
  Agents running Windows require hook files to have either:
  
  * A `.bat` extension, and be written in [Windows Batch](https://en.wikipedia.org/wiki/Batch_file), or
  * Access to <a href="/docs/agent/v3/windows#git-for-windows">Git for Windows</a>, which includes bash
  
negative.code:   <tbody>
      <tr>
        <td style="white-space: nowrap"><code>pre-bootstrap</code></td>
        <td>
          <p>Executed before any job is started. Useful for <a href="/docs/agent/v3/securing#strict-checks-using-agent-hooks">adding strict checks</a> before jobs are permitted to run.</p>
          <p>The proposed job command and environment is written to a file and
          the path to this file provided in the <code>BUILDKITE_ENV_FILE</code>
          environment variable. Use the contents of this file to determine whether
          to permit the job to run on this agent.</p>
          <p>If the <code>pre-bootstrap</code> hook terminates with an exit code
          of <code>0</code>, the job is permitted to run. Any other exit code
          results in the job being rejected, and job failure being reported to the
          Buildkite API.</p>
          </td></tr>
      <tr>
        <td style="white-space: nowrap"><code>agent-shutdown</code></td>
        <td>Executed when the agent shuts down. Useful for performing cleanup
        tasks for the entire agent, outside of the job lifecycle.</td></tr>
    </tbody>
  </table>
  
  ## Available Job hooks
  
  The following is a complete list of available job hooks, and the order in which
  they are run as part of each job:
  
  <table>
  