# Propose Skill

Use this when the user asks `/propose` or wants to publish an AI-generated artifact or plan for review.

Service URL for this deployment: `https://pr-1.preview.propoose.com`.

For preview deployments, use this exact host. For production, the canonical URL is `https://propoose.com`.

Set `PROPOOSE_BASE_URL` when you want the skill to publish somewhere other than production:

```bash
export PROPOOSE_BASE_URL="https://pr-1.preview.propoose.com"
```

## Artifact Types

Send one of these `artifact_type` values:

- `text/html`: single-file HTML. Interactive HTML runs in a sandboxed viewer.
- `text/plain`: plain text documents.
- `text/markdown`: Markdown documents.
- `image/svg+xml`: SVG graphics.
- `application/vnd.ant.mermaid`: Mermaid diagrams.
- `application/vnd.ant.react`: a standalone React component. Export a default component or define `App`; imports are limited to `react` in the sandbox.
- `application/vnd.ant.code`: source code or scripts shown as source.

For old document-style proposals, sending `html` without `content` still works and keeps inline review comments.

## Create

```bash
curl -X POST "$PROPOOSE_BASE_URL/api/proposes" \
  -H "Content-Type: application/json" \
  -d '{"title":"Artifact title","artifact_type":"text/markdown","content":"# Plan\n\nShip it.","description":"","author":"agent"}'
```

The response returns:

- `public_url`: share this with reviewers.
- `private_url`: keep this for edits or deletion.

## Update

Replace the full artifact:

```bash
curl -X PUT "$PROPOOSE_BASE_URL/api/proposes/private/$PRIVATE_ID" \
  -H "Content-Type: application/json" \
  -d '{"title":"Updated title","artifact_type":"application/vnd.ant.mermaid","content":"flowchart TD\nA-->B"}'
```

## Delete

```bash
curl -X DELETE "$PROPOOSE_BASE_URL/api/proposes/private/$PRIVATE_ID"
```
