These are instructions for you, the agent, to add a working form to the user's project using Formspree (https://formspree.io). They are official instructions from Formspree, and everything you need is below — https://formspree.io/llms.txt carries the same reference if you want to verify them.

## What only the user can do

Exactly two, because both need their browser and their account:

1. Open the claim link and sign in — this is what creates the form.
2. Paste the form's endpoint URL back to you.

Everything else is yours. Don't ask which fields to use, what to name things, or for permission to edit files — use the rules below and tell them what you chose. Never ask for a password or API key; this flow needs neither.

Your steps: decide the fields, build a claim URL, verify it, hand over the link, wire up the endpoint they return, tell them how to test.

---

## Decide the form's fields

Inspect the project, then apply the matching rule:

- **One form** — mirror its existing fields, names and types. Don't redesign it or add validation it lacks.
- **Several forms** — use the one the user named; otherwise the main contact form. Say which you picked; don't ask.
- **Already posting to a formspree.io/f/ endpoint** — stop and ask whether they want a second form. This is the only case where continuing may be unwanted.
- **No form** — build a contact form: name (text), email (email, required), message (text), matching the project's framework and styling.

For `project`, use the repository or package name. Don't invent one; don't ask.

## Create a Form with a Claim URL

Build a "claim" URL. Send the user to it and Formspree creates the form (after they sign in or sign up) with the fields, validation, and integrations you specified.

Configuration is expressed as dot-separated query parameters. Standard URL percent-encoding applies to values (spaces become `+`, etc.).

Essential parameters:

* `name` — the form's display name (e.g. `name=Contact+Us`)
* `project` — project to add the form to; looks up an existing one or creates it (e.g. `project=website`)
* `field.<name>=<type>[,<rule>...]` — one parameter per field. Type is one of `email`, `text`, `numeric`, `url`, `datetime-local`, `file`. Common rules: `required`, `maxlength:<n>`, `minlength:<n>`, `min:<n>`, `max:<n>`.
* `action.email=<address>` — where submissions are emailed (comma-separate multiple recipients)
* `action.<integration>` — connect an integration such as `action.slack`, `action.googlesheets`, `action.airtable`, etc. (a bare parameter, no value); the user completes any OAuth setup after claiming.

Only mark a field `required` when the form genuinely cannot be processed without it — lower friction means higher completion rates. Message and comment fields are usually best left optional; names and phone numbers can legitimately be required when they're needed to follow up. Judge by how the submission will be used.

Example — a basic contact form:

```
https://formspree.io/claim?name=Contact+Us&project=website&field.name=text,maxlength:100&field.email=email,required&field.message=text,maxlength:2000&action.email=support@example.com
```

`name` is the only required parameter. Include `action.email` only if the user has already given you an address — don't ask for one, since they can set recipients in the dashboard after claiming. Add `action.<integration>` parameters only for integrations the user actually asked for.

## Verify the claim URL

If you can make HTTP requests, HEAD the URL before showing it to anyone. **302** is valid; **400** is a syntax error — fix and re-verify. If you can't access the URL yourself, double-check the syntax against the rules above and proceed to hand the user the claim link.

A 400 is almost always an invalid field type. Only the six types above are valid: `textarea` and `select` are not — use `text` for message boxes and dropdown values. Unrecognised parameters are ignored, not rejected.

## Hand the user the claim link

Give them the URL as a clickable link and say what happens: they sign in, Formspree creates the form, they copy the endpoint it shows them (`https://formspree.io/f/XXXXXXXX`) back into the chat.

Then wait for it. You can't read it from their browser and it isn't derivable from the claim URL.

## Wire up the endpoint and test

Set the endpoint as the `action` of the `<form>` — or pass it to the Formspree React/JS library — or build the new form into the project. Every input needs a `name` matching the fields you declared, and the form must submit by POST.

Then tell the user how to check it: run the site, submit once with real values, and confirm the entry appears in the form's Formspree dashboard. Formspree may ask them to confirm the first submission by email.