burnwatch 0.8.0 → 0.8.1
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/package.json
CHANGED
|
@@ -9,48 +9,86 @@ allowed-tools: Read, Bash, Glob, Grep
|
|
|
9
9
|
|
|
10
10
|
You are the interviewer. burnwatch has auto-detected services and applied defaults — your job is to walk the user through confirming or correcting each one in natural conversation.
|
|
11
11
|
|
|
12
|
+
## CRITICAL: Pacing Rules
|
|
13
|
+
|
|
14
|
+
**ONE service (or one logical batch) per message. Then STOP and WAIT for the user's response.**
|
|
15
|
+
|
|
16
|
+
- Do NOT dump all services in one message
|
|
17
|
+
- Do NOT ask about LLMs and infrastructure in the same breath
|
|
18
|
+
- Do NOT proceed to the next service until the user has responded
|
|
19
|
+
- The only exception: free-tier services can be batched into one "any of these need updating?" question
|
|
20
|
+
|
|
21
|
+
The rhythm is: **present → ask → wait → configure → next.**
|
|
22
|
+
|
|
12
23
|
## Step 1: Get the current state
|
|
13
24
|
|
|
14
25
|
Run this to get the structured state of all detected services:
|
|
15
26
|
|
|
16
27
|
```bash
|
|
17
|
-
cd $PROJECT_ROOT &&
|
|
28
|
+
cd $PROJECT_ROOT && burnwatch interview --json
|
|
18
29
|
```
|
|
19
30
|
|
|
20
|
-
|
|
31
|
+
Parse the JSON output. Do NOT show the raw JSON to the user.
|
|
21
32
|
|
|
22
|
-
## Step 2: Present the
|
|
33
|
+
## Step 2: Present a brief overview, then start the interview
|
|
23
34
|
|
|
24
|
-
|
|
35
|
+
Open with a short summary (2-3 lines max), then immediately start with the first service:
|
|
25
36
|
|
|
26
|
-
> I found **N services** in your project.
|
|
37
|
+
> I found **N services** in your project. Let me walk through each one to make sure we're tracking accurately.
|
|
27
38
|
>
|
|
28
|
-
>
|
|
29
|
-
>
|
|
39
|
+
> First up — **Anthropic**. You're defaulted to "API Usage" at $100/mo.
|
|
40
|
+
> [If probe data exists: "I checked your API — you've spent $47.23 this month."]
|
|
41
|
+
> Does $100/mo feel right, or want to adjust?
|
|
42
|
+
|
|
43
|
+
Then STOP. Wait for the user.
|
|
30
44
|
|
|
31
|
-
## Step 3:
|
|
45
|
+
## Step 3: Walk through services ONE AT A TIME
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
### Order: highest risk first
|
|
34
48
|
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
-
|
|
49
|
+
1. **LLM / AI Services** — one at a time (Anthropic, then OpenAI, then Gemini, etc.)
|
|
50
|
+
2. **Usage-Based Services** — one at a time (Scrapfly, Stripe, Browserbase)
|
|
51
|
+
3. **Infrastructure** — one at a time (Vercel, Supabase, AWS)
|
|
52
|
+
4. **Free-tier / flat-rate** — batch these: "PostHog, Inngest, and Resend are all on free tiers at $0. Any of those need updating? If not, moving on."
|
|
39
53
|
|
|
40
|
-
###
|
|
41
|
-
- Credit-pool services: "What Scrapfly plan are you on? The probe detected Pro with 1M credits — correct?"
|
|
42
|
-
- Ask about actual budget, not just plan cost
|
|
54
|
+
### For each paid service, present:
|
|
43
55
|
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
1. **What was detected**: service name, current default plan, default budget
|
|
57
|
+
2. **What the probe found** (if anything): actual spend, credits used, plan detected
|
|
58
|
+
3. **One clear question**: "Does this look right?" or "What plan are you actually on?"
|
|
46
59
|
|
|
47
|
-
|
|
48
|
-
- These are usually quick: "PostHog and Inngest are set to Free/$0 — correct? Moving on."
|
|
49
|
-
- Don't dwell on these unless the user has something to say
|
|
60
|
+
Example per-service message:
|
|
50
61
|
|
|
51
|
-
|
|
62
|
+
> **Scrapfly** — defaulted to Pro ($100/mo, 1M credits).
|
|
63
|
+
> Probe detected: Pro plan confirmed, 250K/1M credits used this month.
|
|
64
|
+
> Keep the $100/mo budget? [Y/adjust]
|
|
52
65
|
|
|
53
|
-
|
|
66
|
+
Then STOP. Wait for response.
|
|
67
|
+
|
|
68
|
+
### After the user responds:
|
|
69
|
+
|
|
70
|
+
1. Run `burnwatch configure` with their answer
|
|
71
|
+
2. Confirm what was written (one line)
|
|
72
|
+
3. Present the NEXT service
|
|
73
|
+
|
|
74
|
+
Example:
|
|
75
|
+
|
|
76
|
+
> Got it — Scrapfly set to Pro, $100/mo budget. ✅
|
|
77
|
+
>
|
|
78
|
+
> Next — **Stripe**. Defaulted to "Standard (2.9% + 30¢)" at $50/mo.
|
|
79
|
+
> I checked your balance: $1,247.83 available.
|
|
80
|
+
> $50/mo budget for Stripe's processing fees — sound right?
|
|
81
|
+
|
|
82
|
+
Then STOP again.
|
|
83
|
+
|
|
84
|
+
### For free-tier services, batch them:
|
|
85
|
+
|
|
86
|
+
> **PostHog**, **Inngest**, and **Resend** are all set to free tiers at $0/mo.
|
|
87
|
+
> Any of those need updating, or should I lock them in and move on?
|
|
88
|
+
|
|
89
|
+
## Step 4: Configure each service
|
|
90
|
+
|
|
91
|
+
After the user confirms or corrects, write it back immediately:
|
|
54
92
|
|
|
55
93
|
```bash
|
|
56
94
|
burnwatch configure --service <id> --plan "<plan name>" --budget <N>
|
|
@@ -66,78 +104,28 @@ To exclude a service:
|
|
|
66
104
|
burnwatch configure --service <id> --exclude
|
|
67
105
|
```
|
|
68
106
|
|
|
69
|
-
|
|
107
|
+
Always check the JSON output for `"success": true`.
|
|
70
108
|
|
|
71
|
-
## Step 5:
|
|
109
|
+
## Step 5: Wrap up
|
|
72
110
|
|
|
73
|
-
After all services are configured, run:
|
|
111
|
+
After all services are configured, run `burnwatch status` and present the brief:
|
|
74
112
|
|
|
75
|
-
|
|
76
|
-
burnwatch status
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
Present the brief and celebrate what's tracked vs what's still blind.
|
|
113
|
+
> All done! Here's your updated spend brief:
|
|
114
|
+
> [burnwatch status output]
|
|
115
|
+
>
|
|
116
|
+
> N services tracked, total budget $X/mo.
|
|
80
117
|
|
|
81
118
|
## Key Behaviors
|
|
82
119
|
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
- **Be brief
|
|
86
|
-
- **
|
|
87
|
-
- **
|
|
88
|
-
- **
|
|
89
|
-
- **One `configure` call per service.** Don't batch. This makes it clear what was written and lets the user correct individual services.
|
|
90
|
-
|
|
91
|
-
## Example Flow
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Agent: I found 8 services in your project. Let me walk through each one
|
|
95
|
-
to make sure we're tracking accurately.
|
|
96
|
-
|
|
97
|
-
Right now everything has default budgets — let's fix that.
|
|
98
|
-
|
|
99
|
-
First, your LLMs:
|
|
100
|
-
• Anthropic — defaulted to "API Usage" plan, $100/mo budget.
|
|
101
|
-
I probed your API and you've spent $47.23 this month.
|
|
102
|
-
• OpenAI — defaulted to "API Usage", $100/mo. No admin key,
|
|
103
|
-
so I can't check actual spend.
|
|
104
|
-
|
|
105
|
-
What are your actual budgets for these?
|
|
106
|
-
|
|
107
|
-
User: Anthropic $150 is better, I've been using it heavily.
|
|
108
|
-
OpenAI keep at $100, and here's my admin key: sk-admin-xxx
|
|
109
|
-
|
|
110
|
-
Agent: Got it. Let me update both...
|
|
111
|
-
|
|
112
|
-
[runs: burnwatch configure --service anthropic --budget 150]
|
|
113
|
-
[runs: burnwatch configure --service openai --key sk-admin-xxx --budget 100]
|
|
114
|
-
|
|
115
|
-
✅ Anthropic: API Usage | LIVE | $150/mo
|
|
116
|
-
✅ OpenAI: API Usage | LIVE | $100/mo (probed: 12.3K tokens this month)
|
|
117
|
-
|
|
118
|
-
Next, Scrapfly — I detected you're on Pro ($100/mo, 1M credits).
|
|
119
|
-
You've used 250K credits so far. Keep the $100 budget?
|
|
120
|
-
|
|
121
|
-
User: Yeah that's right.
|
|
122
|
-
|
|
123
|
-
Agent: [runs: burnwatch configure --service scrapfly --plan pro --budget 100]
|
|
124
|
-
✅ Scrapfly: Pro | LIVE | $100/mo | 1M credits
|
|
125
|
-
|
|
126
|
-
PostHog, Inngest, and Resend are all on free tiers at $0.
|
|
127
|
-
Sound right?
|
|
128
|
-
|
|
129
|
-
User: Yep.
|
|
130
|
-
|
|
131
|
-
Agent: [runs configure for each]
|
|
132
|
-
|
|
133
|
-
All done! Here's your updated spend brief:
|
|
134
|
-
[runs: burnwatch status]
|
|
135
|
-
```
|
|
120
|
+
- **Lead with what you know.** If the probe detected their plan, state it confidently and ask for confirmation — don't make them pick from a list.
|
|
121
|
+
- **One question at a time.** Never ask about budget AND plan AND API key in the same message. If the plan is confirmed, ask about budget. If budget is confirmed, offer the API key option.
|
|
122
|
+
- **Be brief.** Each message should be 2-4 lines, not paragraphs.
|
|
123
|
+
- **Respect shortcuts.** If the user says "defaults are fine for everything" — configure them all and show the summary. Don't force 14 rounds.
|
|
124
|
+
- **If they offer a key unprompted**, use it immediately and show what the probe found.
|
|
125
|
+
- **Surface concerns.** If Anthropic spend is $87 of $100 budget, say so. If Scrapfly credits are 85% consumed, flag it.
|
|
136
126
|
|
|
137
127
|
## Probe Data Reference
|
|
138
128
|
|
|
139
|
-
Services with probes and what they return:
|
|
140
|
-
|
|
141
129
|
| Service | Confidence | What's detected |
|
|
142
130
|
|---------|-----------|-----------------|
|
|
143
131
|
| Scrapfly | high | Plan name, credits used/total |
|
|
@@ -149,5 +137,4 @@ Services with probes and what they return:
|
|
|
149
137
|
| Browserbase | medium | Session count, browser hours |
|
|
150
138
|
| Upstash | low | Database count (key validation) |
|
|
151
139
|
| PostHog | low | Org found (key validation) |
|
|
152
|
-
| Gemini, Resend, Inngest, Voyage AI | none | No API — ask user directly |
|
|
153
|
-
| AWS | none | Too complex — flag as BLIND |
|
|
140
|
+
| Gemini, Resend, Inngest, Voyage AI, AWS | none | No API — ask user directly |
|