# Agent activity

> What the agent is doing right now, step by step, with a Stop that is always on screen and keeps whatever is already proposed.

Source: https://kwark.space/designSystem/components/agent-activity

## Usage

### What it is
A small panel, docked where the request was made, that says in one line what the agent is doing (*Reading Scene 13*), where that sits in the plan (*Step 1 of 2*), and a **Stop** button that never moves, never hides and never asks *Are you sure?*. Below, the plan’s steps tick off as they finish.

### Stop
Stop ends the run at once. Whatever was already proposed stays as proposals for review; nothing half-applied reaches the work, because agents only propose (see [AI result review](https://kwark.space/designSystem/components/ai-review.md)). The panel then says *Stopped after Scene 12. 3 proposals to review.*

### When to use
- Any agent run longer than about two seconds.

### When not to use
- A one-shot suggestion that returns quickly: the button’s own ring is enough ([Page loader](https://kwark.space/designSystem/components/cinematic-loader.md)).

### Writing
- Present continuous for now (*Reading Scene 13*), past for done (*Read Scene 12*).
- No personality: never *Thinking…*, *Working my magic*, *Almost there!*.

## Style

### Anatomy

1. **Panel**: `--k-surface`, 1px `--k-line`, 10px corners, 12px padding; docked, not floating over the work.
2. **Now line**: 16px ring, the current action 14px 500, the step count 12px `--k-text-2`, **Stop** at the end (small secondary, square glyph).
3. **Log**: 12px rows; done rows with a 14px tick in `--k-ok`, the current row in `--k-text`, the rest `--k-text-2`.

### Tokens

| Token | Light | Dark |
|---|---|---|
| `--k-surface` | #ffffff | #1a1a1a |
| `--k-line` | #e2e8f0 | rgba(255, 255, 255, .1) |
| `--k-text` | #0f172a | #e3e3e3 |
| `--k-text-2` | #5b6779 | #9ca3af |
| `--k-ok` | #2c6e49 | #6cc08a |
| `--k-radius-card` | 10px |  |
| `--k-fs-body` | 14px |  |
| `--k-fs-meta` | 12px |  |

## Code

### React

Use the HTML below with `kwark.css`. The example shows the markup and styling. Supply any application behavior described on this page.

### HTML and CSS

Works anywhere with `kwark.css`.

```html
<section class="kw-activity" aria-label="Assistant at work" aria-live="polite">
  <div class="kw-activity__now"><span class="kw-ring" aria-hidden="true"></span><span><b>Reading Scene 13</b><small>Step 1 of 2 · Tag props in Scenes 12–14</small></span><button class="kw-button kw-button--sm" type="button"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="6" y="6" width="12" height="12" rx="1.5"/></svg> Stop</button></div>
  <ol class="kw-activity__log">
    <li class="is-done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>Read Scene 12</li>
    <li class="is-now">Reading Scene 13</li>
    <li>Read Scene 14</li>
    <li>Propose prop tags</li>
  </ol>
</section>
```

## Accessibility

### Keyboard
| Key | Does |
|---|---|
| Tab | Reaches Stop first. |
| Escape (focus in the panel) | Stops the run. |

### ARIA
- `aria-live="polite"` announces step changes, not every token of progress. On completion announce *Done. 6 proposals to review.*
- The ring is `aria-hidden`; the words carry the state.

## For agents

### Rules

- **Must** keep Stop visible and enabled for the whole run, with no confirmation.
- **Must** keep proposals made before Stop, and apply nothing.
- **Never** use personality, humour or progress percentages invented from nothing.
- **Always** name the current step with its object (*Reading Scene 13*).

### AI readiness test

**Task:** Show the agent running a plan to rename "Meera" to "Mira" across the project.

**Give the agent:** This page, Agent plan, AI result review.

**Constraint:** The writer stops it halfway.

**A reliable answer:**
- Shows the current module and scene as it reads
- Keeps Stop visible throughout
- After Stop, lists the proposals so far for review and applies none
