anchor.diff:  sample hooks. You can find the location of your agent hooks directory in your
   platform’s installation documentation.
   
  -To get started with agent hooks copy the relevant example script and remove the
  +To get started with global hooks copy the relevant example script and remove the
   `.sample` file extension.
   
  +See the lists of [lifecycle hooks](#available-lifecycle-hooks) and
  +[job hooks](#available-job-hooks) for the hook types that can be included in the
  +global hooks directory.
  +
   ### Repository hooks
   
   Repository hooks allow you to execute repository-specific scripts. Repository
  -hooks live alongside your repository’s source code under the directory
  -`.buildkite/hooks`.
  +hooks live alongside your repository’s source code under the `.buildkite/hooks`
  +directory.
   
   To get started, create a shell script in `.buildkite/hooks` named
  -`post-checkout`. It will be sourced and run every build, after the Agent checks
  -your repository out. You can also use one of the other available *Repository*
  -hooks, according to when you want your custom script to run.
  +`post-checkout`. It will be sourced and run after your repository has been
  +checked out as part of every job for any pipeline that uses this repository.
  +
  +You can include any of the [available job hooks](#available-job-hooks) whose
  +`Order` includes *Repository*.
   
   ### Plugin hooks
   
  -Plugin hooks allow plugins you’ve defined in your Pipeline to override default
  -behavior.
  -
  -See the [plugin documentation](/docs/plugins) for how to implement plugin hooks.
  +Plugin hooks allow plugins you’ve defined in your Pipeline Steps to override
  +default behavior.
  +
  +See the [plugin documentation](/docs/plugins) for how to implement plugin hooks
  +and [available job hooks](#available-job-hooks) for the list of hook types that
  +a plugin can include.
   
   ## Available Lifecycle hooks
   
  
positive.code: 
  ## Creating Lifecycle hooks
  
  Agent hooks are executed and can be written in any programming language.
  
  ## Creating Step hooks
  
  Step hooks are shell scripts you can use to run commands and export environment
  variables. Hooks have access to all the standard [Buildkite environment variables](/docs/pipelines/environment-variables).
  
  Step hooks are copied to `$TMPDIR` directory and *sourced* by the default shell
  on the Agent that is running the build, which has a few implications:
  
  * `$BASH_SOURCE` contains the location the hook is sourced from
  * `$0` contains the location of the copy of the script that is running from `$TMPDIR`
  * the shebang line of the hook script has no effect
  
  To write step hooks in another programming language, you need to call them from
  within the shell script, and explicitly pass any Buildkite environment variables
  you need to the script when you call it.
  
  The following is an example of a custom `environment` hook which exports a
  GitHub API key for the pipeline’s release build step:
  
negative.code: export GITHUB_RELEASE_ACCESS_KEY='xxx'
  ```
  
  ## Job hooks on Windows
  
  Agents running on 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
  