# .asserted directory

## Initialization

To create a new routine and it's .asserted directory within a repo, go to the repo and run `asrtd init` using the CLI.

This will walk you through a few configuration options, and then create the directory, create the routine, and install the dependencies.

## Structure and Files

A newly initialized `.asserted` directory will contain the following:

```bash
examples/      # A directory containing example tests
node_modules/  # Packges installed based on the package.json
.gitignore     # A standard Node .gitignore file
package.json      # Mostly standard package.json file
package-lock.json # Lockfile for packages
routine.json   # Routine configuration file
```

The examples can be removed or altered in any way, but the rest are required.

The `routine.json` file should be updated if you want to change anything about the routine configuration. That's covered [here](/reference/routine-json.md).

Any additional files you wish to create can be added to this directory and they will be included with the routine when it's pushed.&#x20;

{% hint style="info" %}
For the more technical people, a modified [`npm pack`](https://docs.npmjs.com/cli-commands/pack.html) is used under the hood to collect and package routine-related files. As such, the same configuration options apply (the `files: []` property in package.json, .npmignore, etc).&#x20;

However, the pack-related npm lifecycle scripts are ignored.
{% endhint %}


---

# 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://docs.asserted.io/reference/.asserted.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.
