You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .opencode/skills/data-viz/SKILL.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,8 @@ A single insight might just be one chart with a headline and annotation. Scale c
100
100
-**Responsive**: `min-h-[VALUE]` on all charts. Grid stacks on mobile
101
101
-**Animation**: Entry transitions only, `duration-300` to `duration-500`. Never continuous
102
102
-**Accessibility**: `aria-label` on charts, WCAG AA contrast, don't rely on color alone
103
+
-**Dynamic color safety**: When colors come from external sources (brand palettes, category maps, API data, user config), never apply them directly as text color without a contrast check. Dark colors are invisible on dark card backgrounds. Safe pattern: use the external color only for non-text elements (left border, dot, underline); always use the standard text color (white / `var(--text)`) for the label itself. If color-coded text is required, apply a minimum lightness floor: `color: hsl(from brandColor h s max(l, 60%))`
104
+
-**Icon semantics**: Verify every icon matches its label's actual meaning, not just its visual shape. Common traps: using a rising-trend icon (📈) for metrics where lower is better (latency, error rate, cost); using achievement icons (🏆) for plain counts. When in doubt, use a neutral descriptive icon over a thematic one that could mislead
103
105
104
106
### Step 5: Interactivity & Annotations
105
107
@@ -133,3 +135,16 @@ A single insight might just be one chart with a headline and annotation. Scale c
133
135
- Pie charts > 5 slices — use horizontal bar
134
136
- Unlabeled dual y-axes — use two separate charts
135
137
- Truncated bar axes — always start at zero
138
+
- Filtering or mapping over a field not confirmed to exist in the data export — an undefined field in `.filter()` or `.map()` produces empty arrays or NaN silently, not an error; always validate the exported schema matches what the chart code consumes
139
+
140
+
## Pre-Delivery Checklist
141
+
142
+
Before marking a dashboard complete:
143
+
144
+
-[ ] Every tab / view activated — all charts render (no blank canvases, no unexpected 0–1 axes)
145
+
-[ ] Every field referenced in chart/filter code confirmed present in the data export
146
+
-[ ] All text readable on its background — check explicitly when colors come from external data
147
+
-[ ] All icons match their label's meaning
148
+
-[ ] Tooltips appear on hover for every chart
149
+
-[ ] No chart silently receives an empty dataset — add a visible empty state or console warning
150
+
-[ ] Mobile: grid stacks correctly, no body-level horizontal overflow
Copy file name to clipboardExpand all lines: .opencode/skills/data-viz/references/component-guide.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -392,3 +392,70 @@ const CalloutLabel = ({ viewBox, label, color = "#1e293b" }: { viewBox?: { x: nu
392
392
```
393
393
394
394
**Rules:** Never overlap data. Use `position: "insideTopRight"/"insideTopLeft"` on labels. Pair annotations with tooltips — annotation names the event, tooltip shows the value.
Charts initialized inside a hidden container (`display:none`) render blank. Chart.js, Recharts, and Nivo all read container dimensions at mount time — a hidden container measures as `0×0`.
401
+
402
+
**Rule: never initialize a chart until its container is visible.**
-**Nivo `Responsive*`**: uses `ResizeObserver` — fires once at `0×0`, never re-fires on show
426
+
-**React conditional rendering**: prefer `visibility:hidden` + `position:absolute` over toggling `display:none` if you want charts to stay mounted and pre-rendered
When generating a standalone HTML dashboard from a script (Python, shell, etc.), never embed JSON data inside a template string that also contains JavaScript. Curly-brace collisions in f-strings / template literals cause silent JS parse failures that are hard to debug.
433
+
434
+
**Wrong** — data and JS logic share one f-string, every `{` in JS must be escaped as `{{`:
435
+
436
+
```python
437
+
html =f"""
438
+
<script>
439
+
const data = {json.dumps(data)}; // fine
440
+
const fn = () => {{ return x; }} // must escape — easy to miss
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,8 +131,8 @@ Manifest parsing, test generation, model scaffolding, incremental model detectio
131
131
### Data Visualization
132
132
Interactive charts and dashboards from SQL results. The data-viz skill generates publication-ready visualizations with automatic chart type selection based on your data.
133
133
134
-
### Local-First Recap
135
-
Built-in observability for AI interactions — recap tool calls, token usage, and session activity locally. No external services required. View recaps with `altimate recap`. Features include loop detection, post-session summary, and shareable HTML exports.
134
+
### Local-First Tracing
135
+
Built-in observability for AI interactions — trace tool calls, token usage, and session activity locally. No external services required. View session recordings with `altimate trace`. Features include loop detection, post-session summary, and shareable HTML exports.
136
136
137
137
### AI Teammate Training
138
138
Teach your AI teammate project-specific patterns, naming conventions, and best practices. The training system learns from examples and applies rules automatically across sessions.
Copy file name to clipboardExpand all lines: docs/docs/configure/trace.md
+53-56Lines changed: 53 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,28 @@
1
-
# Recap
1
+
# Trace
2
2
3
-
Altimate Code captures detailed recaps of every session, including LLM generations, tool calls, token usage, cost, and timing, and saves them locally as JSON files. Recaps are invaluable for debugging agent behavior, optimizing cost, and understanding how the agent solves problems.
3
+
Altimate Code captures detailed traces (session recordings) of every session, including LLM generations, tool calls, token usage, cost, and timing, and saves them locally as JSON files. Traces are invaluable for debugging agent behavior, optimizing cost, and understanding how the agent solves problems.
4
4
5
-
Recap is **enabled by default** and requires no configuration. Recaps are stored locally and never leave your machine unless you configure a remote exporter.
5
+
Tracing is **enabled by default** and requires no configuration. Traces are stored locally and never leave your machine unless you configure a remote exporter.
The tracer feature has been renamed to **recap**. The `trace` command still works as a backward-compatible alias (`--no-trace` is the backward-compatible flag name). New features include loop detection, post-session summary, and shareable HTML exports.
|**Cost Attribution**| LLM cost + warehouse compute cost + storage delta = total cost, per user/team/project |
53
50
54
-
These attributes are purely optional. Recaps are valid without them. They're populated automatically by tools that have access to warehouse metadata.
51
+
These attributes are purely optional. Traces are valid without them. They're populated automatically by tools that have access to warehouse metadata.
55
52
56
53
## Configuration
57
54
@@ -70,12 +67,12 @@ Add to your config file (`~/.config/altimate-code/altimate-code.json` or project
70
67
71
68
| Option | Type | Default | Description |
72
69
|--------|------|---------|-------------|
73
-
|`enabled`|`boolean`|`true`| Enable or disable recap|
74
-
|`dir`|`string`|`~/.local/share/altimate-code/traces/`| Custom directory for recap files |
75
-
|`maxFiles`|`number`|`100`| Max recap files to keep (oldest pruned automatically). Set to `0` for unlimited |
70
+
|`enabled`|`boolean`|`true`| Enable or disable tracing|
71
+
|`dir`|`string`|`~/.local/share/altimate-code/traces/`| Custom directory for trace files |
72
+
|`maxFiles`|`number`|`100`| Max trace files to keep (oldest pruned automatically). Set to `0` for unlimited |
76
73
|`exporters`|`array`|`[]`| Remote HTTP exporters (see below) |
77
74
78
-
### Disabling Recap
75
+
### Disabling Tracing
79
76
80
77
```json
81
78
{
@@ -91,15 +88,15 @@ Or per-run with the `--no-trace` flag:
91
88
altimate-code run --no-trace "quick question"
92
89
```
93
90
94
-
## Viewing Recaps
91
+
## Viewing Traces
95
92
96
-
### List Recaps
93
+
### List Traces
97
94
98
95
```bash
99
-
altimate-code recap list
96
+
altimate-code trace list
100
97
```
101
98
102
-
Shows a table of recent recaps with session ID, timestamp, duration, tokens, cost, tool calls, and status.
99
+
Shows a table of recent traces with session ID, timestamp, duration, tokens, cost, tool calls, and status.
103
100
104
101
```
105
102
SESSION WHEN DURATION TOKENS COST TOOLS STATUS PROMPT
@@ -112,17 +109,17 @@ Options:
112
109
113
110
| Flag | Description |
114
111
|------|-------------|
115
-
|`-n`, `--limit`| Number of recaps to show (default: 20) |
112
+
|`-n`, `--limit`| Number of traces to show (default: 20) |
116
113
117
-
### View a Recap
114
+
### View a Trace
118
115
119
116
```bash
120
-
altimate-code recap view <session-id>
117
+
altimate-code trace view <session-id>
121
118
```
122
119
123
-
Opens a local web server with an interactive recap viewer in your browser.
120
+
Opens a local web server with an interactive trace viewer in your browser.
124
121
125
-

122
+

126
123
127
124
The viewer has 5 tabs:
128
125
@@ -148,35 +145,35 @@ Options:
148
145
|`--port`| Port for the viewer server (default: random) |
149
146
|`--live`| Auto-refresh every 2s for in-progress sessions |
150
147
151
-
Partial session ID matching is supported. For example, `altimate-code recap view abc` matches `abc123def456`.
148
+
Partial session ID matching is supported. For example, `altimate-code trace view abc` matches `abc123def456`.
152
149
153
150
### Live Viewing (In-Progress Sessions)
154
151
155
-
Recaps are written incrementally. After every tool call and generation, a snapshot is flushed to disk. This means you can view a recap while the session is still running:
152
+
Traces are written incrementally. After every tool call and generation, a snapshot is flushed to disk. This means you can view a trace while the session is still running:
156
153
157
154
```bash
158
155
# In terminal 1: run a long task
159
156
altimate-code run "refactor the entire pipeline"
160
157
161
-
# In terminal 2: watch the recap live
162
-
altimate-code recap view <session-id> --live
158
+
# In terminal 2: watch the trace live
159
+
altimate-code trace view <session-id> --live
163
160
```
164
161
165
162
The `--live` flag adds a green "LIVE" indicator and polls for updates every 2 seconds. The page auto-refreshes when new spans appear.
166
163
167
164
### From the TUI
168
165
169
-
Type `/recap` in the TUI to open a recap history dialog listing all recent sessions. Select any recap to open it in your browser with the interactive viewer. The current session appears at the top, and recaps are grouped by date with duration and timestamp info.
166
+
Type `/trace` in the TUI to open a trace history dialog listing all recent sessions. Select any trace to open it in your browser with the interactive viewer. The current session appears at the top, and traces are grouped by date with duration and timestamp info.
170
167
171
168
The viewer launches in live mode automatically for in-progress sessions, so you can watch spans appear as the agent works.
172
169
173
-
### Sharing Recaps
170
+
### Sharing Traces
174
171
175
-
The recap viewer includes a **Share** button that exports a self-contained HTML file. This file includes all session data and can be opened in any browser without a server — perfect for sharing with teammates, attaching to tickets, or archiving sessions.
172
+
The trace viewer includes a **Share Trace** button that exports a self-contained HTML file. This file includes all session data and can be opened in any browser without a server — perfect for sharing with teammates, attaching to tickets, or archiving sessions.
176
173
177
174
## Remote Exporters
178
175
179
-
Recaps can be sent to remote backends via HTTP POST. Each exporter receives the full recap JSON on session completion.
176
+
Traces can be sent to remote backends via HTTP POST. Each exporter receives the full trace JSON on session completion.
180
177
181
178
```json
182
179
{
@@ -197,7 +194,7 @@ Recaps can be sent to remote backends via HTTP POST. Each exporter receives the
197
194
| Field | Type | Description |
198
195
|-------|------|-------------|
199
196
|`name`|`string`| Identifier for this exporter (used in logs) |
200
-
|`endpoint`|`string`| HTTP endpoint to POST recap JSON to |
197
+
|`endpoint`|`string`| HTTP endpoint to POST trace JSON to |
@@ -208,9 +205,9 @@ Recaps can be sent to remote backends via HTTP POST. Each exporter receives the
208
205
- Exporters have a 10-second timeout
209
206
- All export operations are best-effort and never crash the CLI
210
207
211
-
## Recap File Format
208
+
## Trace File Format
212
209
213
-
Recaps are stored as JSON files in the traces directory. The schema is versioned for forward compatibility.
210
+
Traces are stored as JSON files in the traces directory. The schema is versioned for forward compatibility.
214
211
215
212
```json
216
213
{
@@ -322,15 +319,15 @@ All domain-specific attributes use the `de.*` prefix and are stored in the `attr
322
319
323
320
## Crash Recovery
324
321
325
-
Recaps are designed to survive process crashes:
322
+
Traces are designed to survive process crashes:
326
323
327
-
1.**Immediate snapshot.** A recap file is written as soon as the session starts, before any LLM interaction. Even if the process crashes immediately, a minimal recap file exists.
324
+
1.**Immediate snapshot.** A trace file is written as soon as the session starts, before any LLM interaction. Even if the process crashes immediately, a minimal trace file exists.
328
325
329
-
2.**Incremental snapshots.** After every tool call and generation completion, the recap file is updated atomically (write to temp file, then rename). The file on disk always contains a valid, complete JSON document.
326
+
2.**Incremental snapshots.** After every tool call and generation completion, the trace file is updated atomically (write to temp file, then rename). The file on disk always contains a valid, complete JSON document.
330
327
331
-
3.**Crash handlers.** The `run` command registers `SIGINT`/`SIGTERM`/`beforeExit` handlers that flush the recap synchronously with a `"crashed"` status.
328
+
3.**Crash handlers.** The `run` command registers `SIGINT`/`SIGTERM`/`beforeExit` handlers that flush the trace synchronously with a `"crashed"` status.
332
329
333
-
4.**Status indicators.**Recap status tells you exactly what happened:
330
+
4.**Status indicators.**Trace status tells you exactly what happened:
334
331
335
332
| Status | Meaning |
336
333
|--------|---------|
@@ -339,31 +336,31 @@ Recaps are designed to survive process crashes:
339
336
|`running`| Session is still in progress (visible in live mode) |
340
337
|`crashed`| Process was interrupted before the session completed |
341
338
342
-
Crashed recaps contain all data up to the last successful snapshot. You can view them normally with `altimate-code recap view`.
339
+
Crashed traces contain all data up to the last successful snapshot. You can view them normally with `altimate-code trace view`.
343
340
344
-
## Historical Recaps
341
+
## Historical Traces
345
342
346
-
All recaps are stored in the traces directory and persist across sessions. Use `recap list` to browse history:
343
+
All traces are stored in the traces directory and persist across sessions. Use `trace list` to browse history:
347
344
348
345
```bash
349
-
# Show the last 50 recaps
350
-
altimate-code recap list -n 50
346
+
# Show the last 50 traces
347
+
altimate-code trace list -n 50
351
348
352
-
# View any historical recap
353
-
altimate-code recap view <session-id>
349
+
# View any historical trace
350
+
altimate-code trace view <session-id>
354
351
```
355
352
356
-
Recaps are automatically pruned when `maxFiles` is exceeded (default: 100). The oldest recaps are removed first. Set `maxFiles: 0` for unlimited retention.
353
+
Traces are automatically pruned when `maxFiles` is exceeded (default: 100). The oldest traces are removed first. Set `maxFiles: 0` for unlimited retention.
357
354
358
355
## Privacy
359
356
360
-
Recaps are stored **locally only** by default. They contain:
357
+
Traces are stored **locally only** by default. They contain:
If you configure remote exporters, recap data is sent to those endpoints. No recap data is included in the anonymous telemetry described in [Telemetry](../reference/telemetry.md).
363
+
If you configure remote exporters, trace data is sent to those endpoints. No trace data is included in the anonymous telemetry described in [Telemetry](../reference/telemetry.md).
367
364
368
365
!!! warning "Sensitive Data"
369
-
Recaps may contain SQL queries, file paths, and command outputs from your session. If you share recap files or configure remote exporters, be aware that this data will be included.
366
+
Traces may contain SQL queries, file paths, and command outputs from your session. If you share trace files or configure remote exporters, be aware that this data will be included.
0 commit comments