# Project context (STACKAI.md)

Drop a **`STACKAI.md`** file in the root of your project and StackAI reads it automatically at the start of every session, then follows it. It's the easiest way to teach the agent your stack and conventions — no need to re-explain each time.

{% hint style="info" %}
`AGENTS.md` works too — if both exist, `STACKAI.md` wins.
{% endhint %}

## Example

```markdown
# My Project

- Stack: Next.js 15 (App Router) + Tailwind + TypeScript (strict)
- Use named exports; default exports only for pages/components
- Tests live in `__tests__/`, run with `npm test`
- Never edit files in `generated/`
- Keep components small and prefer server components
```

## Tips

* Keep it **short and specific** — rules, conventions, "don't touch X".
* Mention how to **run tests / build** so the agent knows your workflow.
* List directories the agent should **avoid**.
* It's plain Markdown — anything you'd tell a new teammate works here.


---

# 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.usestackai.com/cli/project-context.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.
