# Task

Tasks are pieces of work that you need to build or development your project.

The minimal task just contains a list of commands.

```yaml
tasks:
  example:
    cmds:
      - echo "minimal example"
```

## Source

Tasks that depend on input files should specify them as a `source`. Hammerkit will detect if the task sources have changed compared to previous runs and skip execution if they are unchanged.

```yaml
tasks:
  build:
    description: "run typescript build"
    src:
      - tsconfig.json
      - src
    cmds:
      - tsc
```

## Generate

Tasks that generate output files should specify them as a `generate`. Hammerkit can store generated files into archives, which can be used to save and restore build outputs.

```yaml
tasks:
  build:
    description: "run typescript build"
    src:
      - tsconfig.json
      - src
    generates:
      - dist
    cmds:
      - tsc
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://no0dles.gitbook.io/hammerkit/task.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
