@miao-vision/cli 0.1.6 → 0.1.8

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.
@@ -0,0 +1,110 @@
1
+ title: Finance Review
2
+ theme: editorial
3
+ slides:
4
+ - layout: cover
5
+ eyebrow: "Finance Review"
6
+ title: "Profit Expansion Is Outpacing Cost Growth"
7
+ claim: "Revenue growth is converting into stronger profit and cash flow."
8
+
9
+ - layout: metrics-chart
10
+ eyebrow: "01 · FINANCIAL SNAPSHOT"
11
+ title: "Revenue, Profit, And Cash Flow Are Moving Together"
12
+ metrics:
13
+ - label: Revenue
14
+ format: "$,.0f"
15
+ data:
16
+ transform:
17
+ - type: aggregate
18
+ measures:
19
+ - field: revenue
20
+ op: sum
21
+ as: total_revenue
22
+ - label: Profit
23
+ format: "$,.0f"
24
+ data:
25
+ transform:
26
+ - type: aggregate
27
+ measures:
28
+ - field: profit
29
+ op: sum
30
+ as: total_profit
31
+ - label: Cash Flow
32
+ format: "$,.0f"
33
+ data:
34
+ transform:
35
+ - type: aggregate
36
+ measures:
37
+ - field: cash_flow
38
+ op: sum
39
+ as: total_cash_flow
40
+ charts:
41
+ - type: line
42
+ title: Monthly Profit
43
+ data:
44
+ transform:
45
+ - type: derive-month
46
+ field: month
47
+ as: fiscal_month
48
+ - type: aggregate
49
+ groupBy: [fiscal_month]
50
+ measures:
51
+ - field: profit
52
+ op: sum
53
+ as: monthly_profit
54
+ - type: sort
55
+ field: fiscal_month
56
+ order: asc
57
+ encoding:
58
+ x: { field: fiscal_month }
59
+ y: { field: monthly_profit }
60
+
61
+ - layout: text-chart
62
+ eyebrow: "02 · BUSINESS UNITS"
63
+ title: "North Is The Primary Profit Driver"
64
+ annotation: "North contributes the larger absolute profit pool."
65
+ bullets:
66
+ - "North delivers stronger revenue scale."
67
+ - "South still improves cash flow across the quarter."
68
+ - "Cost discipline remains the operating lever."
69
+ charts:
70
+ - type: bar
71
+ title: Profit by Business Unit
72
+ data:
73
+ transform:
74
+ - type: aggregate
75
+ groupBy: [business_unit]
76
+ measures:
77
+ - field: profit
78
+ op: sum
79
+ as: total_profit
80
+ - type: sort
81
+ field: total_profit
82
+ order: desc
83
+ encoding:
84
+ x: { field: business_unit }
85
+ y: { field: total_profit }
86
+
87
+ - layout: chart-full
88
+ eyebrow: "03 · COST BASE"
89
+ title: "Cost Is Growing More Slowly Than Revenue"
90
+ charts:
91
+ - type: bar
92
+ title: Cost by Business Unit
93
+ data:
94
+ transform:
95
+ - type: aggregate
96
+ groupBy: [business_unit]
97
+ measures:
98
+ - field: cost
99
+ op: sum
100
+ as: total_cost
101
+ - type: sort
102
+ field: total_cost
103
+ order: desc
104
+ encoding:
105
+ x: { field: business_unit }
106
+ y: { field: total_cost }
107
+
108
+ - layout: ending
109
+ title: "Protect the operating leverage"
110
+ claim: "Keep cost growth below revenue growth while funding the highest-return units."
@@ -0,0 +1,7 @@
1
+ month,business_unit,revenue,cost,profit,cash_flow
2
+ 2025-01-01,North,180000,122000,58000,41000
3
+ 2025-01-01,South,142000,101000,41000,36000
4
+ 2025-02-01,North,194000,128000,66000,47000
5
+ 2025-02-01,South,151000,104000,47000,39000
6
+ 2025-03-01,North,211000,134000,77000,55000
7
+ 2025-03-01,South,162000,108000,54000,43000
@@ -0,0 +1,106 @@
1
+ title: Ops Update
2
+ theme: editorial
3
+ slides:
4
+ - layout: cover
5
+ eyebrow: "Operations Update"
6
+ title: "Reliability Improved While Throughput Increased"
7
+ claim: "Incident volume and resolution time are trending down across core sites."
8
+
9
+ - layout: metrics-chart
10
+ eyebrow: "01 · OPERATING SNAPSHOT"
11
+ title: "Higher Throughput Came With Better Reliability"
12
+ metrics:
13
+ - label: Incidents
14
+ format: ",.0f"
15
+ data:
16
+ transform:
17
+ - type: aggregate
18
+ measures:
19
+ - field: incidents
20
+ op: sum
21
+ as: total_incidents
22
+ - label: Avg Uptime
23
+ format: "%"
24
+ data:
25
+ transform:
26
+ - type: aggregate
27
+ measures:
28
+ - field: uptime_pct
29
+ op: avg
30
+ as: avg_uptime
31
+ - label: Avg Resolution
32
+ format: ",.0f"
33
+ data:
34
+ transform:
35
+ - type: aggregate
36
+ measures:
37
+ - field: resolution_hours
38
+ op: avg
39
+ as: avg_resolution
40
+ charts:
41
+ - type: line
42
+ title: Monthly Throughput
43
+ data:
44
+ transform:
45
+ - type: derive-month
46
+ field: event_date
47
+ as: month
48
+ - type: aggregate
49
+ groupBy: [month]
50
+ measures:
51
+ - field: throughput
52
+ op: sum
53
+ as: total_throughput
54
+ - type: sort
55
+ field: month
56
+ order: asc
57
+ encoding:
58
+ x: { field: month }
59
+ y: { field: total_throughput }
60
+
61
+ - layout: text-chart
62
+ eyebrow: "02 · SITES"
63
+ title: "West DC Still Carries More Incident Load"
64
+ annotation: "West DC has more incidents and tickets than East DC."
65
+ bullets:
66
+ - "East DC shows the best reliability profile."
67
+ - "West DC remains the key improvement target."
68
+ - "Resolution time is improving but still uneven by site."
69
+ charts:
70
+ - type: bar
71
+ title: Incidents by Site
72
+ data:
73
+ transform:
74
+ - type: aggregate
75
+ groupBy: [site]
76
+ measures:
77
+ - field: incidents
78
+ op: sum
79
+ as: total_incidents
80
+ - type: sort
81
+ field: total_incidents
82
+ order: desc
83
+ encoding:
84
+ x: { field: site }
85
+ y: { field: total_incidents }
86
+
87
+ - layout: table-full
88
+ eyebrow: "03 · DETAIL"
89
+ title: "Site Operating Detail"
90
+ charts:
91
+ - type: table
92
+ title: Latest Operating Records
93
+ data:
94
+ transform:
95
+ - type: sort
96
+ field: event_date
97
+ order: desc
98
+ - type: limit
99
+ value: 12
100
+ encoding:
101
+ x: { field: site }
102
+ y: { field: uptime_pct }
103
+
104
+ - layout: ending
105
+ title: "Target West DC reliability"
106
+ claim: "The next reliability gain should come from reducing West DC incident load."
@@ -0,0 +1,7 @@
1
+ event_date,site,incidents,uptime_pct,tickets,resolution_hours,throughput
2
+ 2025-01-01,East DC,4,99.91,52,3.8,12400
3
+ 2025-01-01,West DC,7,99.84,68,4.6,11800
4
+ 2025-02-01,East DC,3,99.94,49,3.4,13100
5
+ 2025-02-01,West DC,5,99.88,61,4.1,12200
6
+ 2025-03-01,East DC,2,99.96,44,3.1,13900
7
+ 2025-03-01,West DC,4,99.9,55,3.7,12800
@@ -0,0 +1,110 @@
1
+ title: Product Metrics Review
2
+ theme: editorial
3
+ slides:
4
+ - layout: cover
5
+ eyebrow: "Product Review"
6
+ title: "Product Adoption Is Moving Toward AI Workflows"
7
+ claim: "AI Report and SQL Workspace usage are becoming the strongest adoption signals."
8
+
9
+ - layout: metrics-chart
10
+ eyebrow: "01 · EXECUTIVE SNAPSHOT"
11
+ title: "Adoption Is Growing While Churn Trends Down"
12
+ metrics:
13
+ - label: Active Users
14
+ format: ",.0f"
15
+ data:
16
+ transform:
17
+ - type: aggregate
18
+ measures:
19
+ - field: active_users
20
+ op: sum
21
+ as: total_users
22
+ - label: Signups
23
+ format: ",.0f"
24
+ data:
25
+ transform:
26
+ - type: aggregate
27
+ measures:
28
+ - field: signups
29
+ op: sum
30
+ as: total_signups
31
+ - label: Avg Churn
32
+ format: "%"
33
+ data:
34
+ transform:
35
+ - type: aggregate
36
+ measures:
37
+ - field: churn_rate
38
+ op: avg
39
+ as: avg_churn
40
+ charts:
41
+ - type: line
42
+ title: Monthly Active Users
43
+ data:
44
+ transform:
45
+ - type: derive-month
46
+ field: event_date
47
+ as: month
48
+ - type: aggregate
49
+ groupBy: [month]
50
+ measures:
51
+ - field: active_users
52
+ op: sum
53
+ as: users
54
+ - type: sort
55
+ field: month
56
+ order: asc
57
+ encoding:
58
+ x: { field: month }
59
+ y: { field: users }
60
+
61
+ - layout: text-chart
62
+ eyebrow: "02 · SEGMENTS"
63
+ title: "Enterprise Accounts Lead Usage Depth"
64
+ annotation: "Enterprise usage carries higher revenue and lower churn."
65
+ bullets:
66
+ - "Enterprise has the strongest active user base."
67
+ - "SMB continues to supply signup volume."
68
+ - "AI workflow onboarding should target both segments."
69
+ charts:
70
+ - type: bar
71
+ title: Revenue by Segment
72
+ data:
73
+ transform:
74
+ - type: aggregate
75
+ groupBy: [segment]
76
+ measures:
77
+ - field: revenue
78
+ op: sum
79
+ as: total_revenue
80
+ - type: sort
81
+ field: total_revenue
82
+ order: desc
83
+ encoding:
84
+ x: { field: segment }
85
+ y: { field: total_revenue }
86
+
87
+ - layout: chart-full
88
+ eyebrow: "03 · FEATURES"
89
+ title: "Feature Revenue Is Concentrated In Core Workflows"
90
+ charts:
91
+ - type: bar
92
+ title: Revenue by Feature
93
+ data:
94
+ transform:
95
+ - type: aggregate
96
+ groupBy: [feature]
97
+ measures:
98
+ - field: revenue
99
+ op: sum
100
+ as: total_revenue
101
+ - type: sort
102
+ field: total_revenue
103
+ order: desc
104
+ encoding:
105
+ x: { field: feature }
106
+ y: { field: total_revenue }
107
+
108
+ - layout: ending
109
+ title: "Focus onboarding on AI workflows"
110
+ claim: "Prioritize activation paths that turn signups into repeat analytical work."
@@ -0,0 +1,7 @@
1
+ event_date,segment,feature,active_users,signups,churn_rate,revenue
2
+ 2025-01-01,Enterprise,Dashboard,1200,90,0.035,42000
3
+ 2025-01-01,SMB,Dashboard,860,130,0.052,21000
4
+ 2025-02-01,Enterprise,AI Report,1380,110,0.031,48600
5
+ 2025-02-01,SMB,AI Report,940,150,0.049,23800
6
+ 2025-03-01,Enterprise,SQL Workspace,1510,125,0.029,53200
7
+ 2025-03-01,SMB,SQL Workspace,990,170,0.046,25100
package/dist/types.ts CHANGED
@@ -160,14 +160,35 @@ export interface AgentDataTransform {
160
160
  value?: unknown
161
161
  }
162
162
 
163
+ export type AgentGlobalFilterType = 'select' | 'range'
164
+ export type AgentInteractionSelectMode = 'filter' | 'detail'
165
+ export type AgentDrilldownPreset = 'category-detail'
166
+
167
+ export interface AgentGlobalFilter {
168
+ field: string
169
+ type: AgentGlobalFilterType
170
+ }
171
+
172
+ export interface AgentChartInteraction {
173
+ tooltip?: boolean
174
+ select?: AgentInteractionSelectMode
175
+ }
176
+
177
+ export interface AgentReportInteractions {
178
+ globalFilters?: AgentGlobalFilter[]
179
+ }
180
+
163
181
  export interface AgentChartSpec {
182
+ id?: string
164
183
  type: VizType
165
184
  title?: string
185
+ interaction?: AgentChartInteraction
186
+ drilldownPreset?: AgentDrilldownPreset
166
187
  data?: {
167
188
  source?: string
168
189
  transform?: AgentDataTransform[]
169
190
  }
170
- encoding: {
191
+ encoding?: {
171
192
  x?: AgentFieldEncoding
172
193
  y?: AgentFieldEncoding
173
194
  color?: AgentFieldEncoding
@@ -183,6 +204,7 @@ export interface AgentReportSpec {
183
204
  title?: string
184
205
  description?: string
185
206
  theme?: 'default' | 'editorial' | 'dark' | 'minimal'
207
+ interactions?: AgentReportInteractions
186
208
  insights?: string[]
187
209
  charts: AgentChartSpec[]
188
210
  }
@@ -0,0 +1,110 @@
1
+ title: Finance Review
2
+ theme: editorial
3
+ slides:
4
+ - layout: cover
5
+ eyebrow: "Finance Review"
6
+ title: "Profit Expansion Is Outpacing Cost Growth"
7
+ claim: "Revenue growth is converting into stronger profit and cash flow."
8
+
9
+ - layout: metrics-chart
10
+ eyebrow: "01 · FINANCIAL SNAPSHOT"
11
+ title: "Revenue, Profit, And Cash Flow Are Moving Together"
12
+ metrics:
13
+ - label: Revenue
14
+ format: "$,.0f"
15
+ data:
16
+ transform:
17
+ - type: aggregate
18
+ measures:
19
+ - field: revenue
20
+ op: sum
21
+ as: total_revenue
22
+ - label: Profit
23
+ format: "$,.0f"
24
+ data:
25
+ transform:
26
+ - type: aggregate
27
+ measures:
28
+ - field: profit
29
+ op: sum
30
+ as: total_profit
31
+ - label: Cash Flow
32
+ format: "$,.0f"
33
+ data:
34
+ transform:
35
+ - type: aggregate
36
+ measures:
37
+ - field: cash_flow
38
+ op: sum
39
+ as: total_cash_flow
40
+ charts:
41
+ - type: line
42
+ title: Monthly Profit
43
+ data:
44
+ transform:
45
+ - type: derive-month
46
+ field: month
47
+ as: fiscal_month
48
+ - type: aggregate
49
+ groupBy: [fiscal_month]
50
+ measures:
51
+ - field: profit
52
+ op: sum
53
+ as: monthly_profit
54
+ - type: sort
55
+ field: fiscal_month
56
+ order: asc
57
+ encoding:
58
+ x: { field: fiscal_month }
59
+ y: { field: monthly_profit }
60
+
61
+ - layout: text-chart
62
+ eyebrow: "02 · BUSINESS UNITS"
63
+ title: "North Is The Primary Profit Driver"
64
+ annotation: "North contributes the larger absolute profit pool."
65
+ bullets:
66
+ - "North delivers stronger revenue scale."
67
+ - "South still improves cash flow across the quarter."
68
+ - "Cost discipline remains the operating lever."
69
+ charts:
70
+ - type: bar
71
+ title: Profit by Business Unit
72
+ data:
73
+ transform:
74
+ - type: aggregate
75
+ groupBy: [business_unit]
76
+ measures:
77
+ - field: profit
78
+ op: sum
79
+ as: total_profit
80
+ - type: sort
81
+ field: total_profit
82
+ order: desc
83
+ encoding:
84
+ x: { field: business_unit }
85
+ y: { field: total_profit }
86
+
87
+ - layout: chart-full
88
+ eyebrow: "03 · COST BASE"
89
+ title: "Cost Is Growing More Slowly Than Revenue"
90
+ charts:
91
+ - type: bar
92
+ title: Cost by Business Unit
93
+ data:
94
+ transform:
95
+ - type: aggregate
96
+ groupBy: [business_unit]
97
+ measures:
98
+ - field: cost
99
+ op: sum
100
+ as: total_cost
101
+ - type: sort
102
+ field: total_cost
103
+ order: desc
104
+ encoding:
105
+ x: { field: business_unit }
106
+ y: { field: total_cost }
107
+
108
+ - layout: ending
109
+ title: "Protect the operating leverage"
110
+ claim: "Keep cost growth below revenue growth while funding the highest-return units."
@@ -0,0 +1,7 @@
1
+ month,business_unit,revenue,cost,profit,cash_flow
2
+ 2025-01-01,North,180000,122000,58000,41000
3
+ 2025-01-01,South,142000,101000,41000,36000
4
+ 2025-02-01,North,194000,128000,66000,47000
5
+ 2025-02-01,South,151000,104000,47000,39000
6
+ 2025-03-01,North,211000,134000,77000,55000
7
+ 2025-03-01,South,162000,108000,54000,43000
@@ -0,0 +1,106 @@
1
+ title: Ops Update
2
+ theme: editorial
3
+ slides:
4
+ - layout: cover
5
+ eyebrow: "Operations Update"
6
+ title: "Reliability Improved While Throughput Increased"
7
+ claim: "Incident volume and resolution time are trending down across core sites."
8
+
9
+ - layout: metrics-chart
10
+ eyebrow: "01 · OPERATING SNAPSHOT"
11
+ title: "Higher Throughput Came With Better Reliability"
12
+ metrics:
13
+ - label: Incidents
14
+ format: ",.0f"
15
+ data:
16
+ transform:
17
+ - type: aggregate
18
+ measures:
19
+ - field: incidents
20
+ op: sum
21
+ as: total_incidents
22
+ - label: Avg Uptime
23
+ format: "%"
24
+ data:
25
+ transform:
26
+ - type: aggregate
27
+ measures:
28
+ - field: uptime_pct
29
+ op: avg
30
+ as: avg_uptime
31
+ - label: Avg Resolution
32
+ format: ",.0f"
33
+ data:
34
+ transform:
35
+ - type: aggregate
36
+ measures:
37
+ - field: resolution_hours
38
+ op: avg
39
+ as: avg_resolution
40
+ charts:
41
+ - type: line
42
+ title: Monthly Throughput
43
+ data:
44
+ transform:
45
+ - type: derive-month
46
+ field: event_date
47
+ as: month
48
+ - type: aggregate
49
+ groupBy: [month]
50
+ measures:
51
+ - field: throughput
52
+ op: sum
53
+ as: total_throughput
54
+ - type: sort
55
+ field: month
56
+ order: asc
57
+ encoding:
58
+ x: { field: month }
59
+ y: { field: total_throughput }
60
+
61
+ - layout: text-chart
62
+ eyebrow: "02 · SITES"
63
+ title: "West DC Still Carries More Incident Load"
64
+ annotation: "West DC has more incidents and tickets than East DC."
65
+ bullets:
66
+ - "East DC shows the best reliability profile."
67
+ - "West DC remains the key improvement target."
68
+ - "Resolution time is improving but still uneven by site."
69
+ charts:
70
+ - type: bar
71
+ title: Incidents by Site
72
+ data:
73
+ transform:
74
+ - type: aggregate
75
+ groupBy: [site]
76
+ measures:
77
+ - field: incidents
78
+ op: sum
79
+ as: total_incidents
80
+ - type: sort
81
+ field: total_incidents
82
+ order: desc
83
+ encoding:
84
+ x: { field: site }
85
+ y: { field: total_incidents }
86
+
87
+ - layout: table-full
88
+ eyebrow: "03 · DETAIL"
89
+ title: "Site Operating Detail"
90
+ charts:
91
+ - type: table
92
+ title: Latest Operating Records
93
+ data:
94
+ transform:
95
+ - type: sort
96
+ field: event_date
97
+ order: desc
98
+ - type: limit
99
+ value: 12
100
+ encoding:
101
+ x: { field: site }
102
+ y: { field: uptime_pct }
103
+
104
+ - layout: ending
105
+ title: "Target West DC reliability"
106
+ claim: "The next reliability gain should come from reducing West DC incident load."
@@ -0,0 +1,7 @@
1
+ event_date,site,incidents,uptime_pct,tickets,resolution_hours,throughput
2
+ 2025-01-01,East DC,4,99.91,52,3.8,12400
3
+ 2025-01-01,West DC,7,99.84,68,4.6,11800
4
+ 2025-02-01,East DC,3,99.94,49,3.4,13100
5
+ 2025-02-01,West DC,5,99.88,61,4.1,12200
6
+ 2025-03-01,East DC,2,99.96,44,3.1,13900
7
+ 2025-03-01,West DC,4,99.9,55,3.7,12800