# Propose Skill

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

Generate simple, semantic HTML. Do not send Markdown. Do not include `<script>`, inline event handlers, iframes, `<svg>`, `<style>` blocks, or remote executable embeds. Remote `http`/`https` images are allowed.

## Charts

To show a chart, write a normal `<table>` and tag it with `aria-label="chart:<type>"`. The viewer upgrades it to a real chart and falls back to the table if scripting is off — so the data is always present and accessible. `aria-label` survives sanitization; you never need a script, SVG, or canvas.

- Types: `bar`, `line`, `area`, `stacked`, `pie`, `doughnut`. Optionally append a y-axis unit, e.g. `chart:line:ms`.
- First column of each body row = the category (x-axis / slice label).
- Each remaining column = one data series; its `<thead>` header is the series name.
- Cells may carry units like `420 ms` or `$1,200` — non-numeric characters are ignored.
- `pie`/`doughnut` use a single value column (one slice per row).

```html
<figure>
  <figcaption>Quarterly revenue vs. cost ($k)</figcaption>
  <table aria-label="chart:bar">
    <thead><tr><th>Quarter</th><th>Revenue</th><th>Cost</th></tr></thead>
    <tbody>
      <tr><th>Q1</th><td>120</td><td>80</td></tr>
      <tr><th>Q2</th><td>150</td><td>92</td></tr>
      <tr><th>Q3</th><td>190</td><td>110</td></tr>
    </tbody>
  </table>
</figure>
```

## Styling

Inline `style` is also allowed for custom layout and color (a CSS sanitizer keeps `display`, `flex`/`grid`, `width`, `height`, `background-color`, `color`, `border`, `border-radius`, `padding`, `margin`, `gap`, `text-align`, `font-*`, …) and drops risky properties (`position`, `transform`, `z-index`, and anything with `url(...)`). `class`, `<style>`, `<svg>`, and `<script>` are stripped. Use it for callouts, badges, or hand-built bars when a chart table doesn't fit.

Create:

```bash
curl -X POST "$PROPOSE_API_BASE/api/proposes" \
  -H "Content-Type: application/json" \
  -d '{"title":"Plan title","html":"<article>...</article>","description":"","author":"agent"}'
```

The response returns:

- `public_url`: share this with reviewers.
- `private_url`: keep this for the creator; it deletes the propose.

Replace the whole document:

```bash
curl -X PUT "$PROPOSE_API_BASE/api/proposes/private/$PRIVATE_ID" \
  -H "Content-Type: application/json" \
  -d '{"title":"Updated title","html":"<article>...</article>"}'
```

Delete:

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