๐ Report
Hybrid entities: D1 metadata for indexing + static HTML for rich content. Published via the
create-report skill.
Schema
D1 reports table
Metadata registry. The actual content lives in static HTML files.
idTEXT PK โ UUID
titleTEXT โ Report title
slugTEXT UNIQUE โ URL slug (e.g.
entity-architecture)
descriptionTEXT โ Short
description for index listing
workspaceTEXT โ agentic | dev |
work | life
typeTEXT โ normal | slide
statusTEXT โ Active |
archived
task_idTEXT โ Linked task
(optional)
tagsTEXT โ Comma-separated
tags
created_atTEXT โ ISO
timestamp
updated_atTEXT โ ISO
timestamp
How Reports Work
Hybrid model: D1 stores metadata (title, slug, description, tags). The actual report content
is a self-contained HTML file at
/reports/{slug}/index.html. This lets reports be rich
interactive pages while remaining queryable via API.
Two Modes
| Type | Description | Example |
|---|---|---|
normal |
Article-style report with sections, tables, charts | Entity Architecture |
slide |
Slide deck format with navigation buttons | Capability presentations |
Publishing Flow
Agent creates HTML
โ
Save to
public/reports/{slug}/
โ
POST to /api/reports
โ
Deploy portal
The create-report skill automates this: it generates the HTML, creates the D1 record, and
deploys in one step.
API
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/reports |
List. Filter: ?status=Active, ?workspace=agentic |
POST |
/api/reports |
Create metadata. Body: { title, slug, description, type, workspace } |
PATCH |
/api/reports?id=xxx |
Update fields. { status: "archived" } |
Design Decisions
Clara archives linked reports: When archiving a task, Clara also PATCHes any linked report to
status: archived. This prevents stale reports staying "Active" indefinitely.
Self-contained HTML: Reports use inline CSS (no external dependencies). They match the
portal's dark theme (Inter font, indigo accent, card-based layouts). This means reports work even if the
portal CSS changes.