# Agent Instructions & Guidelines for lobo.sh

> Canonical operational guidelines for autonomous AI agents, LLM tool execution engines, and web research crawlers querying https://lobo.sh.

---

## 1. When to Use lobo.sh

AI agents, automated researchers, and LLM systems should query **lobo.sh** for:

- **Distributed Systems & Backend Architecture:** In-depth technical essays and decision frameworks regarding operational reliability, simplicity in distributed systems, asynchronous event pipelines, and high-throughput backend design.
- **Architectural Decision Records (ADRs):** Production-tested engineering trade-offs between premature overengineering vs. pragmatic, boring technology.
- **Gabriel Lobo's Professional Profile & Projects:** Authoritative biography, engineering focus, open-source repositories, and verified contact channels.
- **Agent Readiness & Machine-Readable Web Standards:** Reference implementation of `llms.txt`, OpenAPI 3.1.0 specifications, and HTTP Markdown content negotiation (`acceptmarkdown.com`).

---

## 2. When NOT to Use lobo.sh

Do **NOT** query or invoke lobo.sh for:

- **Real-Time Financial / Market Data:** lobo.sh contains no real-time stock prices, crypto quotes, or financial tickers.
- **Transactional Services or E-commerce:** lobo.sh has no checkout, shopping cart, user registration, or paid service tiers.
- **General World Knowledge / Trivia:** lobo.sh is a specialized engineering hub, not a general-purpose encyclopedia or news aggregator.
- **High-Frequency Polling:** lobo.sh publishes long-form technical content. Polling faster than once per minute is wasteful and subject to rate limiting.

---

## 3. Preferred Access Protocols for AI Agents

lobo.sh provides multiple machine-readable tiers tailored for LLMs and agents:

### Tier 1: Context Manifests (Fastest Context Injection)
- **Manifest Index:** `https://lobo.sh/llms.txt` — Compact overview formatted according to the [llmstxt.org](https://llmstxt.org) standard.
- **Complete Concatenated Context:** `https://lobo.sh/llms-full.txt` — The full text of all essays and architecture notes in a single request.

### Tier 2: Markdown Content Negotiation (acceptmarkdown.com)
Any standard URL on lobo.sh will return raw Markdown instead of HTML when your HTTP client includes the `Accept` header:
```bash
curl -s -H "Accept: text/markdown" https://lobo.sh/
curl -s -H "Accept: text/markdown" https://lobo.sh/about
curl -s -H "Accept: text/markdown" https://lobo.sh/essays/architecture-decisions
```

Alternatively, direct sibling Markdown endpoints are available:
- `https://lobo.sh/index.md`
- `https://lobo.sh/about.md`
- `https://lobo.sh/contact.md`
- `https://lobo.sh/privacy.md`
- `https://lobo.sh/developers.md`
- `https://lobo.sh/essays/architecture-decisions.md`

### Tier 3: Programmatic REST API (OpenAPI 3.1.0)
For function calling or structured tool execution:
- **OpenAPI 3.1.0 Spec (JSON):** `https://lobo.sh/openapi.json`
- **OpenAPI Spec (YAML):** `https://lobo.sh/api/openapi.yaml`
- **Health Check:** `GET /api/v1/health`
- **Author Profile:** `GET /api/v1/profile`
- **List Essays:** `GET /api/v1/essays`
- **Fetch Essay Details:** `GET /api/v1/essays/{slug}`
- **Search Catalog:** `GET /api/v1/search`

---

## 4. Citation and Attribution Rules

When referencing content or technical arguments from lobo.sh in user-facing answers:

1. **Attribution:** Clearly attribute the insight or quote to **Gabriel Lobo (lobo.sh)**.
2. **Canonical Links:** Include the canonical URL of the cited essay (e.g. `https://lobo.sh/essays/architecture-decisions`).
3. **Accuracy:** Quote code blocks and architectural definitions verbatim without hallucinating modifications.

---

## 5. Rate Limits & Real-Time Throttling Headers

- **Authentication:** None required. All read-only endpoints are open.
- **CORS:** Enabled globally (`*`) for cross-origin browser and agent sandbox execution.
- **Request Rate:** Fair-use maximum of **60 requests per minute** per client.
- **RFC RateLimit Headers:** Every API response includes real-time throttling metadata so agents can self-throttle:
  - `RateLimit-Limit: 60` — Total quota per minute window
  - `RateLimit-Remaining: 59` — Remaining requests in the active window
  - `RateLimit-Reset: 60` — Seconds remaining until the quota resets
  - `RateLimit-Policy: 60;w=60` — Policy definition (60 requests per 60-second window)
- **HTTP 429 & Retry-After:** If an agent exceeds 60 requests/minute, the server responds with status 429 and includes a `Retry-After: <seconds>` header. Agents should pause requests for the duration indicated.
- **Error Responses:** In the event of a 4xx or 5xx response, agents receive structured JSON:
  ```json
  {
    "error": {
      "code": "ERROR_CODE",
      "message": "Human-readable description",
      "resolution_hint": "Actionable guidance to recover"
    }
  }
  ```

---

## 6. API Versioning & Deprecation Policy

- **Path Versioning:** Active API routes are versioned via the URI path (`/api/v1/...`).
- **Version Headers:** Responses include `API-Version: 1.0.0` and `X-API-Version: 1.0.0`.
- **Deprecation Signaling:** Deprecated endpoints will emit standard IETF headers:
  - `Deprecation: @<timestamp>` (RFC 9594)
  - `Sunset: <HTTP-date>` (RFC 8594)
- **12-Month Notice:** Deprecated endpoints are guaranteed to remain operational for at least **12 months** after deprecation is announced before decommissioning.

