anchor.diff:  
   ### Anatomy of a plugin
   
  -Plugins are essentially a collection of hooks with extra configuration. The agent parses the plugin configuration and passes it on to the plugin in a slightly normalized form, both as JSON or environment variables.
  +Plugins are essentially a collection of hooks with extra configuration. The agent passes the plugin configuration from the pipeline.yml to the plugin hooks as environment variables.
   
  -This means that you can write a plugin as a shell script, or as a binary.
  +A good example is the [docker plugin], which runs a command within a docker container. The pipeline invocation of this plugin looks like:
   
  -A plugin has a `plugin.yml` at it's root that describes what it does, the executables required on the agent machine, and a schema of the plugin’s configuration options:
  +```yml
  +steps:
  +  - command: yarn install && yarn run test
  +    plugins:
  +      docker#v1.0.0:
  +        image: node
  +        workdir: /app
  +```
  +
  +In its root directory the plugin has a `plugin.yml` that describes what it does, the executables required on the agent machine, and a [schema](#plugin-tools) of the plugin’s configuration options:
   
   ```yml
   name: Docker
  
positive.code:         run: app
  ```
  
  In the 2.x agent, this approach was only possible by either using the
  docker environment variables, or writing a custom script.
  
  ## Plugin sources
  
  If you refer to a plugin just by name (say `detect-clowns`), it defaults to
  
negative.code: echo "--- Running ${BUILDKITE_COMMAND} in ${BUILDKITE_PLUGIN_DOCKER_IMAGE}"
  
  docker run -it --rm \
    --volume "${PWD}:${BUILDKITE_PLUGIN_DOCKER_WORKDIR}" \
    --workdir "${BUILDKITE_PLUGIN_DOCKER_WORKDIR}" \
    "${BUILDKITE_PLUGIN_DOCKER_IMAGE}" bash -c "${BUILDKITE_COMMAND}"
  ```
  
  The environment variables are named `BUILDKITE_PLUGIN_{NAME}_{KEY}`, or if a list is provided then `BUILDKITE_PLUGIN_{NAME}_{KEY}_{IDX}`.
  
  For example `image: "node"` becomes the environment variable `BUILDKITE_PLUGIN_DOCKER_IMAGE="node"`, and `links: [ "db", "redis" ]` becomes the enviroment variables `BUILDKITE_PLUGIN_DOCKER_LINKS_0="db"` and `BUILDKITE_PLUGIN_DOCKER_LINKS_1="redis"`.
  
  ### Plugin tools
  
  The following are some helpful tools when developing plugins:
  
  