> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Project structure

> The layout of the fleet-prime-agent repository: launcher package, web workspaces, scripts, and contributor docs.

```
fleet-prime-agent/
├── PRIME_AGENT_RUNTIME.json   # pinned engine: package, version, tarball, sha256
├── fleet-prime.sh             # entry script: `install` or launch
├── install.sh                 # source installer (deps, build, launcher shim)
├── packages/
│   └── fleet-prime/           # launcher package; bins: fleet-agent, fleet-prime
├── web/                       # isolated pnpm workspace (pnpm 11)
│   ├── app/                   # TanStack Start host: routes, /api mounts, client
│   ├── design/                # design system, tool cards, OpenUI components
│   ├── protocol/              # shared contracts: chat-protocol, fleet-contract
│   ├── server/                # adapter: PrimeBridge, event mapper, HTTP handlers
│   └── docs/                  # web architecture docs, adapter contract
├── scripts/                   # build, release, runtime-pin and installer checks
├── docs/
│   ├── adr/                   # architecture decision records
│   └── guides/                # contributor guides (web, runtime, releasing…)
└── AGENTS.md                  # development rules; read before contributing
```

## Areas

| Area                   | Package                     | Role                                                                                                                                                                         |
| ---------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `packages/fleet-prime` | `@qredence/fleet-prime`     | Thin launcher. Resolves the pinned `prime-agent` runtime, serves the production web bundle, forwards `fleet-agent agent` to the engine CLI. Not an upstream source checkout. |
| `web/app`              | `@prime-agent/web`          | Browser host built on TanStack Start. Owns routing and mounts the `/api` handlers. Talks HTTP only.                                                                          |
| `web/design`           | `@prime-agent/web-design`   | Component library: chat shell, tool cards, OpenUI rendering, registries with contract checks.                                                                                |
| `web/protocol`         | `@prime-agent/web-protocol` | Typed contracts shared by browser and server: `ChatStreamEvent` frames, Fleet error envelopes, session presentations, provider catalog.                                      |
| `web/server`           | `@prime-agent/web-server`   | The only web package that imports `prime-agent`. Daemon connection, `PrimeBridge`, event mapping, project registry, workspace endpoints.                                     |

## Workspace boundaries

The repo root is an npm workspace; `web/` is an isolated pnpm workspace. Install with `npm install` at the root and `pnpm install --dir web` — never the other way around. See [Developing from source](/fleet-prime-agent/guides/development).

## Contributor docs in the repo

* `web/app/ARCHITECTURE.md` — web application architecture and the HTTP API.
* `web/docs/architecture/fleet-adapter-contract-v1.md` — the adapter contract between Fleet and the pinned runtime.
* `docs/guides/` — area guides indexed from `AGENTS.md`.
* `docs/adr/` — architecture decision records.
