# meshStack Agent Context

Start here if you are an AI agent that works with meshStack for a user. This folder is the shared
knowledge about meshStack for agents. The meshStack CLI, the meshStack Terraform provider and
meshStack Hub link here. This folder links to their skills for the exact commands and HCL.

## What meshStack Is

meshStack is a platform that platform teams use to build an internal developer platform. A platform
team offers its services as **building block definitions**. Application teams find them in the
marketplace of meshPanel, the web UI of meshStack, and order them in self-service. Each order creates
a **building block** in their workspace or in one of their tenants. meshStack then runs the
automation of the definition, for example an OpenTofu module, to create the resources.

## Before You Start

1. Read [Access](access.md). It says which login to use.
2. Read [Guardrails](guardrails.md). Follow these rules on every task.
3. Read [Workspaces, Projects and Tenants](workspaces-projects-tenants.md). It says where everything
   lives and who owns it.
4. Find out the API URL of the user's meshStack and the identifier of the workspace to work in. Ask
   the user unless you know them already. The API URL is the `endpoint` of the CLI and the Terraform
   provider. Users often know only the URL of their meshPanel. Then fetch that page and read the
   `href` of its `<link rel="service-desc">`: it is `<meshStack API URL>/api/openapi`. When the page
   has no such link, ask for the API URL.
5. Read the index page of the area that the task belongs to.

## Areas

Each area of meshStack has its own folder. Its index page lists the roles the user needs, the rules
that add to the guardrails, and a map of its concept and task pages.

| Area | Read it when |
| --- | --- |
| [Building Blocks](building-blocks/index.md) | the user wants to create, release or change building block definitions, or add, change, fix or delete building blocks |

## Tools and Their Skills

| Tool | Use it to | Skill |
| --- | --- | --- |
| [meshStack CLI](interfaces/cli.md) | log in, read and debug, trigger runs, one-off orders | [meshstack-cli](https://raw.githubusercontent.com/meshcloud/meshstack-cli/main/skills/meshstack-cli/SKILL.md) |
| [meshStack Terraform provider](interfaces/terraform.md) | create and change definitions and building blocks as code | [terraform-provider-meshstack](https://raw.githubusercontent.com/meshcloud/terraform-provider-meshstack/main/skills/terraform-provider-meshstack/SKILL.md) |
| meshStack Hub | start a definition from a ready-made module | [meshstack-hub](https://raw.githubusercontent.com/meshcloud/meshstack-hub/main/skills/meshstack-hub/SKILL.md) |

Load a skill when a task page sends you there. The skills hold every command and every HCL example,
so this folder does not repeat them. The page of each tool says what to use it for; the
[meshObject API](interfaces/api.md) has a page too.

## The API of the User's meshStack

Every meshStack describes its own API in an OpenAPI document at
**`<meshStack API URL>/api/openapi`**, without login. It lists exactly the endpoints, API versions,
fields and allowed values of that meshStack, so trust it over this folder and the documentation,
which describe the latest release. It is several MB: query it, do not read it whole. See
[meshObject API](interfaces/api.md#the-openapi-document-of-the-users-meshstack).

## For Humans

The full documentation for people is at [docs.meshcloud.io](https://docs.meshcloud.io/).
[How to Work With AI Agents](https://docs.meshcloud.io/getting-started/ai-agents/) explains how to
point an agent at this folder.
