@axiom-lattice/examples-deep_research 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +6 -4
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +20 -0
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/prompts/analysis-planner.md +354 -0
- package/prompts/dashboard-generation.md +364 -0
- package/prompts/data-analyst.md +502 -0
- package/prompts/data-query.md +462 -0
- package/prompts/report-writer.md +670 -0
- package/prompts/team-lead.md +1290 -0
- package/src/agents/data_agent/skills/dashboard-generation/SKILL.md +370 -0
- package/src/index.ts +15 -15
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dashboard-generation
|
|
3
|
+
description: Generate comprehensive data visualization dashboards with multiple charts, executive summaries, and key insights. Use when creating multi-chart dashboards, executive overview reports, or business intelligence visualizations that require combining trend analysis, comparisons, and KPI monitoring in a single view.
|
|
4
|
+
metadata:
|
|
5
|
+
category: data_visualization
|
|
6
|
+
---
|
|
7
|
+
---
|
|
8
|
+
name: dashboard-generation
|
|
9
|
+
description: Generate comprehensive data visualization dashboards with multiple charts, executive summaries, and key insights. Use when creating multi-chart dashboards, executive overview reports, or business intelligence visualizations that require combining trend analysis, comparisons, and KPI monitoring in a single view.
|
|
10
|
+
metadata:
|
|
11
|
+
category: data_visualization
|
|
12
|
+
author: axiom-lattice
|
|
13
|
+
version: "1.0"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## When to Use This Skill
|
|
17
|
+
|
|
18
|
+
Activate this skill when the user needs:
|
|
19
|
+
- **Multi-chart dashboards**: Combining 4-8 related charts in a single view
|
|
20
|
+
- **Executive summaries**: High-level KPI overview with visual context
|
|
21
|
+
- **Business intelligence**: Comprehensive data views for decision making
|
|
22
|
+
- **Trend + comparison + distribution**: Multiple analysis types in one report
|
|
23
|
+
|
|
24
|
+
**Do NOT use for:**
|
|
25
|
+
- Single chart generation (use chart-markdown skill instead)
|
|
26
|
+
- Detailed written reports (use report-writer skill instead)
|
|
27
|
+
- Simple data tables without visualization
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Dashboard Types
|
|
32
|
+
|
|
33
|
+
### Executive Dashboard
|
|
34
|
+
**Purpose**: High-level business overview for leadership
|
|
35
|
+
- 4-6 KPI cards with trends
|
|
36
|
+
- 2-3 trend charts for main metrics
|
|
37
|
+
- 1-2 comparison charts
|
|
38
|
+
- Key findings summary
|
|
39
|
+
|
|
40
|
+
### Operational Dashboard
|
|
41
|
+
**Purpose**: Day-to-day monitoring for operations teams
|
|
42
|
+
- Real-time or near-real-time metrics
|
|
43
|
+
- Status indicators and progress tracking
|
|
44
|
+
- Detailed breakdowns by operational dimensions
|
|
45
|
+
- Alert thresholds and anomalies
|
|
46
|
+
|
|
47
|
+
### Analytical Dashboard
|
|
48
|
+
**Purpose**: Deep-dive analysis for data analysts
|
|
49
|
+
- Multiple trend charts with different granularities
|
|
50
|
+
- Correlation and distribution charts
|
|
51
|
+
- Segment analysis
|
|
52
|
+
- Drill-down capabilities
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Dashboard Structure
|
|
57
|
+
|
|
58
|
+
### Required Sections
|
|
59
|
+
|
|
60
|
+
1. **Executive Summary**
|
|
61
|
+
- KPI overview table (4-6 key metrics)
|
|
62
|
+
- Critical findings (3-5 bullet points)
|
|
63
|
+
- Status indicators (✅ 🟢 🟡 🔴)
|
|
64
|
+
|
|
65
|
+
2. **Chart Sections** (2-4 sections)
|
|
66
|
+
- Each section contains 1-3 related charts
|
|
67
|
+
- Group by theme (e.g., "Performance Overview", "Regional Analysis")
|
|
68
|
+
- Charts must include brief insights
|
|
69
|
+
|
|
70
|
+
3. **Key Findings Summary**
|
|
71
|
+
- Major wins
|
|
72
|
+
- Areas of concern
|
|
73
|
+
- Recommended actions
|
|
74
|
+
|
|
75
|
+
4. **Data Sources**
|
|
76
|
+
- Reference to input files
|
|
77
|
+
- Last updated timestamp
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Chart Generation
|
|
82
|
+
|
|
83
|
+
**Important**: For detailed chart generation guidelines, syntax, and best practices, reference the `chart-markdown` skill.
|
|
84
|
+
|
|
85
|
+
### Quick Reference
|
|
86
|
+
|
|
87
|
+
| Purpose | Chart Type | Skill Reference |
|
|
88
|
+
|---------|-----------|----------------|
|
|
89
|
+
| Time trends | Line chart | `chart-markdown` - Line Charts |
|
|
90
|
+
| Category comparison | Bar chart | `chart-markdown` - Bar Charts |
|
|
91
|
+
| Composition | Pie/Donut | `chart-markdown` - Composition Charts |
|
|
92
|
+
| Distribution | Histogram | `chart-markdown` - Distribution Charts |
|
|
93
|
+
| Correlation | Scatter plot | `chart-markdown` - Correlation Charts |
|
|
94
|
+
| Progress tracking | Progress bar | `chart-markdown` - Progress Indicators |
|
|
95
|
+
|
|
96
|
+
### Chart Guidelines
|
|
97
|
+
- Use `chart-markdown` skill for all chart syntax and formatting rules
|
|
98
|
+
- Maximum 8 charts per dashboard
|
|
99
|
+
- Group related charts into 2-4 sections
|
|
100
|
+
- Prioritize important metrics at the top
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Output Format
|
|
105
|
+
|
|
106
|
+
### File Path
|
|
107
|
+
`/artifacts/dashboard-{topic}.md`
|
|
108
|
+
|
|
109
|
+
### Structure Template
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
# [Dashboard Title]
|
|
113
|
+
|
|
114
|
+
**Dashboard Type:** [Executive/Operational/Analytical]
|
|
115
|
+
**Generated Date:** [Date]
|
|
116
|
+
**Data Period:** [Start] to [End]
|
|
117
|
+
**Data Source:** `/tmp/data-{topic}.md`
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Executive Summary
|
|
122
|
+
|
|
123
|
+
### Key Metrics Overview
|
|
124
|
+
|
|
125
|
+
| Metric | Current | Change | Status | Trend |
|
|
126
|
+
|--------|---------|--------|--------|-------|
|
|
127
|
+
| [Metric 1] | [Value] | [Change] | [Status] | [Trend] |
|
|
128
|
+
| [Metric 2] | [Value] | [Change] | [Status] | [Trend] |
|
|
129
|
+
|
|
130
|
+
### Critical Findings
|
|
131
|
+
|
|
132
|
+
1. **[Finding 1]**: [Description with data]
|
|
133
|
+
2. **[Finding 2]**: [Description with data]
|
|
134
|
+
3. **[Finding 3]**: [Description with data]
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Section 1: [Theme Name]
|
|
139
|
+
|
|
140
|
+
### Chart 1.1: [Chart Title]
|
|
141
|
+
|
|
142
|
+
```chart
|
|
143
|
+
{
|
|
144
|
+
"table": [["Category", "Value"], ["A", 10], ["B", 20]],
|
|
145
|
+
"echarts": {
|
|
146
|
+
"title": {"text": "Chart Title"},
|
|
147
|
+
"tooltip": {"trigger": "axis"},
|
|
148
|
+
"xAxis": {"type": "category", "data": ["A", "B"]},
|
|
149
|
+
"yAxis": {"type": "value"},
|
|
150
|
+
"series": [{"type": "bar", "data": [10, 20]}]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Key Insights:**
|
|
156
|
+
- [Insight 1]
|
|
157
|
+
- [Insight 2]
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Key Findings Summary
|
|
162
|
+
|
|
163
|
+
### Major Wins
|
|
164
|
+
- [Win 1]
|
|
165
|
+
- [Win 2]
|
|
166
|
+
|
|
167
|
+
### Areas of Concern
|
|
168
|
+
- [Concern 1]
|
|
169
|
+
- [Concern 2]
|
|
170
|
+
|
|
171
|
+
### Recommended Actions
|
|
172
|
+
1. **[Priority]**: [Action]
|
|
173
|
+
2. **[Priority]**: [Action]
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Data Sources
|
|
178
|
+
|
|
179
|
+
- **Primary:** `/tmp/data-{topic}.md`
|
|
180
|
+
- **Analysis:** `/tmp/insight-{topic}.md`
|
|
181
|
+
- **Last Updated:** [Timestamp]
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Best Practices
|
|
187
|
+
|
|
188
|
+
### Chart Guidelines
|
|
189
|
+
- Reference `chart-markdown` skill for all chart generation
|
|
190
|
+
- **Maximum 8 charts** per dashboard
|
|
191
|
+
- **Group related charts** into 2-4 sections
|
|
192
|
+
- **Prioritize important metrics** at the top
|
|
193
|
+
- Use consistent colors across related charts
|
|
194
|
+
|
|
195
|
+
### Data Formatting
|
|
196
|
+
- Right-align numbers in tables
|
|
197
|
+
- Use thousands separators for large numbers (12,500.00)
|
|
198
|
+
- Include units in headers (Revenue ($), Orders (#))
|
|
199
|
+
- Use emojis for quick visual cues (📈 📉 ✅ ⚠️)
|
|
200
|
+
|
|
201
|
+
### Executive Summary
|
|
202
|
+
- Lead with KPI table (easy to scan)
|
|
203
|
+
- Limit to 3-5 critical findings
|
|
204
|
+
- Include both positive and negative insights
|
|
205
|
+
- Make findings actionable
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Examples
|
|
210
|
+
|
|
211
|
+
### Example 1: Sales Performance Dashboard
|
|
212
|
+
|
|
213
|
+
```markdown
|
|
214
|
+
# Sales Performance Dashboard
|
|
215
|
+
|
|
216
|
+
**Dashboard Type:** Executive
|
|
217
|
+
**Generated Date:** 2024-01-15
|
|
218
|
+
**Data Period:** 2024-07-01 to 2024-12-31
|
|
219
|
+
**Data Source:** `/tmp/data-sales-performance.md`
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Executive Summary
|
|
224
|
+
|
|
225
|
+
### Key Metrics Overview
|
|
226
|
+
|
|
227
|
+
| Metric | Current | Change | Status | Trend |
|
|
228
|
+
|--------|---------|--------|--------|-------|
|
|
229
|
+
| **Revenue** | $600K | +5% | ✅ On Track | 📈 Up |
|
|
230
|
+
| **Orders** | 1,250 | +4.3% | ✅ On Track | 📈 Up |
|
|
231
|
+
| **Conversion** | 3.2% | -0.5% | ⚠️ Attention | 📉 Down |
|
|
232
|
+
| **AOV** | $480 | +1.5% | ✅ On Track | ➡️ Stable |
|
|
233
|
+
|
|
234
|
+
### Critical Findings
|
|
235
|
+
|
|
236
|
+
1. **📈 Revenue Growth**: Revenue increased 5% driven by North region performance
|
|
237
|
+
2. **⚠️ Conversion Decline**: Mobile checkout issues causing 0.5% drop
|
|
238
|
+
3. **🎯 Regional Gap**: East region declining 5% while others grow
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Section 1: Revenue Analysis
|
|
243
|
+
|
|
244
|
+
### Chart 1.1: Monthly Revenue Trend
|
|
245
|
+
|
|
246
|
+
```chart
|
|
247
|
+
{
|
|
248
|
+
"table": [["Month", "Revenue"], ["Jul", 100], ["Aug", 105], ["Sep", 98], ["Oct", 110], ["Nov", 85], ["Dec", 82]],
|
|
249
|
+
"echarts": {
|
|
250
|
+
"title": {"text": "Monthly Revenue Trend ($000s)"},
|
|
251
|
+
"tooltip": {"trigger": "axis"},
|
|
252
|
+
"xAxis": {"type": "category", "data": ["Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]},
|
|
253
|
+
"yAxis": {"type": "value", "name": "Revenue ($000s)"},
|
|
254
|
+
"series": [{"type": "line", "data": [100, 105, 98, 110, 85, 82], "smooth": true}]
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Key Insights:**
|
|
260
|
+
- Peak in October at $110K
|
|
261
|
+
- Decline in Nov-Dec requires investigation
|
|
262
|
+
- Q4 overall down 15% vs Q3
|
|
263
|
+
|
|
264
|
+
### Chart 1.2: Revenue by Region
|
|
265
|
+
|
|
266
|
+
| Region | Revenue | Share | Growth | Status |
|
|
267
|
+
|--------|---------|-------|--------|--------|
|
|
268
|
+
| North | $270K | 45% | +15% | 🟢 Leading |
|
|
269
|
+
| South | $150K | 25% | +3% | 🟡 Stable |
|
|
270
|
+
| East | $120K | 20% | -5% | 🔴 Declining |
|
|
271
|
+
| West | $60K | 10% | +8% | 🟢 Growing |
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Key Findings Summary
|
|
276
|
+
|
|
277
|
+
### Major Wins
|
|
278
|
+
- North region outperformed with 15% growth
|
|
279
|
+
- West region showing promising 8% growth
|
|
280
|
+
- Overall revenue still up 5% YoY
|
|
281
|
+
|
|
282
|
+
### Areas of Concern
|
|
283
|
+
- East region declining 5%
|
|
284
|
+
- Nov-Dec drop of 25% from October peak
|
|
285
|
+
- Conversion rate down 0.5%
|
|
286
|
+
|
|
287
|
+
### Recommended Actions
|
|
288
|
+
1. **🔴 High**: Investigate East region decline causes
|
|
289
|
+
2. **🟡 Medium**: Fix mobile checkout conversion issues
|
|
290
|
+
3. **🟢 Low**: Expand successful North region strategies
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Workflow
|
|
296
|
+
|
|
297
|
+
1. **Analyze Requirements**
|
|
298
|
+
- Identify dashboard type (Executive/Operational/Analytical)
|
|
299
|
+
- Determine key metrics and KPIs
|
|
300
|
+
- Define time period and data scope
|
|
301
|
+
|
|
302
|
+
2. **Read Input Files**
|
|
303
|
+
- Load `/tmp/data-{topic}.md`
|
|
304
|
+
- Load `/tmp/insight-{topic}.md` if available
|
|
305
|
+
- Identify available metrics and dimensions
|
|
306
|
+
|
|
307
|
+
3. **Design Structure**
|
|
308
|
+
- Select 4-8 charts based on data available
|
|
309
|
+
- Group into 2-4 logical sections
|
|
310
|
+
- Plan executive summary content
|
|
311
|
+
|
|
312
|
+
4. **Generate Charts**
|
|
313
|
+
- Reference `chart-markdown` skill for chart syntax and best practices
|
|
314
|
+
- Create trend charts for time-series data
|
|
315
|
+
- Create bar charts for category comparisons
|
|
316
|
+
- Create tables for detailed comparisons
|
|
317
|
+
- Ensure all charts have insights
|
|
318
|
+
|
|
319
|
+
5. **Write Executive Summary**
|
|
320
|
+
- Extract key metrics
|
|
321
|
+
- Identify critical findings
|
|
322
|
+
- Add status indicators
|
|
323
|
+
|
|
324
|
+
6. **Output Dashboard**
|
|
325
|
+
- Write to `/artifacts/dashboard-{topic}.md`
|
|
326
|
+
- Verify all sections complete
|
|
327
|
+
- Check formatting consistency
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Common Patterns
|
|
332
|
+
|
|
333
|
+
### KPI Table Format
|
|
334
|
+
```markdown
|
|
335
|
+
| Metric | Current | Change | Status | Trend |
|
|
336
|
+
|--------|---------|--------|--------|-------|
|
|
337
|
+
| **Revenue** | $125K | +5.9% | ✅ On Track | 📈 |
|
|
338
|
+
| **Orders** | 1,250 | +4.3% | ✅ On Track | 📈 |
|
|
339
|
+
| **Conversion** | 3.2% | -0.5% | ⚠️ Attention | 📉 |
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Chart with Insights
|
|
343
|
+
```markdown
|
|
344
|
+
### Chart: Monthly Trend
|
|
345
|
+
|
|
346
|
+
```chart
|
|
347
|
+
{
|
|
348
|
+
"table": [["Month", "Value"], ["Jan", 100], ["Feb", 120]],
|
|
349
|
+
"echarts": {
|
|
350
|
+
"title": {"text": "Monthly Trend"},
|
|
351
|
+
"tooltip": {"trigger": "axis"},
|
|
352
|
+
"xAxis": {"type": "category", "data": ["Jan", "Feb"]},
|
|
353
|
+
"yAxis": {"type": "value"},
|
|
354
|
+
"series": [{"type": "line", "data": [100, 120]}]
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Key Insights:**
|
|
360
|
+
- [Specific insight with data point]
|
|
361
|
+
- [Comparison to previous period]
|
|
362
|
+
- [Notable anomaly or pattern]
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Finding Format
|
|
366
|
+
```markdown
|
|
367
|
+
1. **[Emoji] [Title]**: [Specific finding with numbers]
|
|
368
|
+
- [Supporting detail]
|
|
369
|
+
- [Impact assessment]
|
|
370
|
+
```
|
package/src/index.ts
CHANGED
|
@@ -200,6 +200,7 @@ registerModelLattice(
|
|
|
200
200
|
streaming: true,
|
|
201
201
|
apiKeyEnvName: "VOLCENGINE_API_KEY2",
|
|
202
202
|
}
|
|
203
|
+
|
|
203
204
|
// {
|
|
204
205
|
// model: "kimi-k2-0711-preview",
|
|
205
206
|
// provider: "openai",
|
|
@@ -208,11 +209,12 @@ registerModelLattice(
|
|
|
208
209
|
// baseURL: "https://api.moonshot.cn/v1",
|
|
209
210
|
// }
|
|
210
211
|
// {
|
|
211
|
-
// model: "
|
|
212
|
-
// provider: "
|
|
213
|
-
// streaming:
|
|
214
|
-
// apiKeyEnvName: "
|
|
212
|
+
// model: "kimi/kimi-k2.5",
|
|
213
|
+
// provider: "deepseek",
|
|
214
|
+
// streaming: true,
|
|
215
|
+
// apiKeyEnvName: "VOLCENGINE_API_KEY2",
|
|
215
216
|
// baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
217
|
+
// // enableThinking: true,
|
|
216
218
|
// }
|
|
217
219
|
);
|
|
218
220
|
LatticeGateway.registerLatticeRoutes(LatticeGateway.app);
|
|
@@ -319,18 +321,16 @@ skillLatticeManager.configureStore("default");
|
|
|
319
321
|
|
|
320
322
|
|
|
321
323
|
|
|
322
|
-
//
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
// // Ensure initialization (migrations run automatically)
|
|
328
|
-
// assistantStore.initialize();
|
|
329
|
-
|
|
330
|
-
// // Register to StoreLatticeManager
|
|
331
|
-
// storeLatticeManager.removeLattice("default", "assistant");
|
|
324
|
+
// Create and initialize AssistantStore with connection string
|
|
325
|
+
const assistantStore = new PostgreSQLAssistantStore({
|
|
326
|
+
poolConfig: process.env.DATABASE_URL || "",
|
|
327
|
+
autoMigrate: true,
|
|
328
|
+
});
|
|
332
329
|
|
|
333
|
-
//
|
|
330
|
+
// Register to StoreLatticeManager
|
|
331
|
+
storeLatticeManager.removeLattice("default", "assistant");
|
|
332
|
+
registerStoreLattice("default", "assistant", assistantStore);
|
|
333
|
+
console.log("PostgreSQL AssistantStore initialized with auto-migration");
|
|
334
334
|
|
|
335
335
|
|
|
336
336
|
|