# Worked examples

Three concrete ways an agent works with VISC today. The contract behind example 1 is in [authoring.md](https://visc.cat/agents/authoring.md) — read it first.

## Example 1 — generate a locality dossier

A user asks their assistant: *"Prepara un tema sobre la festa major per al poble de Taradell."*

The agent's loop:

1. Fetch `https://visc.cat/llms.txt`, read `authoring.md`.
2. Research real sources (the town's official program, local press).
3. Compose ONE Catalan markdown string following the contract. For a festa major program:

```markdown
# Festa Major de Taradell 2026

Tot el programa de la festa major en una sola pàgina: actes,
horaris i enllaços oficials, per votar i comentar els actes.

## Divendres 14 d'agost

- **19.00 — Pregó d'inici** a la plaça de les Eres, a càrrec
  de la colla gegantera.
- **22.30 — Concert jove** al parc de Can Costa.
  https://exemple-ajuntament.cat/programa

## Dissabte 15 d'agost

- **11.00 — Cercavila de gegants** pel centre del poble.
- **18.00 — Ballada de sardanes** amb la cobla local.
- **23.00 — Ball de nit** al pavelló.

## Enllaços oficials

- Programa complet en PDF a la web municipal.
  https://exemple-ajuntament.cat/festa-major
- https://www.youtube.com/watch?v=exemple-aftermovie
```

4. The user pastes this into the *Descripció* field at their locality's *Comença un tema* form. The preview panel shows 3 sections and 7 entries; they pick the source type (here: Official) and submit.
5. Result: a topic page where each act is its own votable card. The one-line entries render Small, the entries with a URL get a link-preview card and render Medium, and the YouTube link renders as a playable embed.

What made this work: real URLs, Catalan, one provenance, self-contained entries (each act repeats enough context to stand alone once votes re-order them).

## Example 2 — answer questions about a town

A user asks: *"Què passa aquest cap de setmana a Ripoll?"* — no VISC account needed. The public, server-rendered pages an agent can read:

- `https://visc.cat/{localitySlug}` — the municipality page: agenda, news, weather, topics.
- `https://visc.cat/{comarcaSlug}` — comarca-level agenda and news.
- `https://visc.cat/catalunya` — country-level explore page.

What an agent cannot do: read community-internal content (member events, payments, threads), act on behalf of a user, or call any API — none exists yet. When the platform's read API and MCP server land (see the roadmap in [overview.md](https://visc.cat/agents/overview.md)), this section will be replaced by tool documentation.

## Example 3 — a prompt VISC users can copy

Users who want their own assistant to prepare VISC content can hand it this prompt:

```text
Read https://visc.cat/agents/authoring.md and follow its contract
exactly. Then write, in Catalan, a complete topic paste about
[SUBJECT] for the municipality of [TOWN]. Ground every fact in
real, reachable URLs (official sources and local press only) and
aim for 3-5 sections with 10-25 self-contained entries, mixing
entry sizes as the contract describes. Return only the markdown
string, ready to paste.
```

Replace `[SUBJECT]` and `[TOWN]`, review what comes back — especially that every URL is real — and paste it into the topic form.
