Skip to content

Commit da302f6

Browse files
committed
docs: reference billing-controls from the balances skill instead of merging
billing-controls.md stays the owner of the control definitions and concepts.mdx returns to base; the balances skill inlines the owner after its balance-specific commentary. The strictest-wins scope claim still gives way to the owner's entity-override rule (flagged for review).
1 parent e416aa9 commit da302f6

10 files changed

Lines changed: 183 additions & 54 deletions

File tree

packages/agent-docs/content/skills/balances/balances.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ description: How a balance behaves at zero — what makes an included allowance
66
# Balances
77

88
<part file="../concepts/references/balances.md" inline="true" />
9+
10+
<part file="../concepts/references/billing-controls.md" inline="true" />

packages/agent-docs/content/skills/concepts/concepts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ Load the matching definition when reasoning about that object.
7676

7777
<part file="references/customer-entity.md" when="distinguishing a customer from an entity (seats, sub-accounts) and their runtime billing state" />
7878

79-
<part file="references/balances.md" when="reasoning about balances, caps, overage, or billing controls — runtime caps, alerts, and top-ups" />
79+
<part file="references/billing-controls.md" when="reasoning about billing controls — runtime caps, alerts, overage, and top-ups" />

packages/agent-docs/content/skills/concepts/references/balances.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,13 @@
77
- If neither is set, `included` IS the cap: usage stops at 0 and `check` returns `allowed: false`. Nothing extra is needed to enforce it.
88
- So never add a `spend_limit` to "cap" a feature that has no overage price and no `overage_allowed` — it is already capped, and the limit does nothing.
99

10-
### Billing controls
11-
12-
Billing controls are runtime policy on a customer or entity: they never define what a plan grants, only how usage is allowed, capped, alerted, or topped up. They are often exposed as customer-facing settings, except `overage_allowed`, which is usually product/admin controlled.
13-
14-
- Only `overage_allowed` changes whether usage may pass 0. The rest just bound usage that is already permitted.
15-
- `spend_limits`: caps overage only, in feature units (not dollars). With no overage there is nothing to bound, so it does nothing.
16-
- `usage_limits`: a separate gate on TOTAL usage per time window, counted independently of the balance. This one bites whether or not overage exists, and can sit below the included amount. Useful when a plan grants multiple balances (5/day and 5/month) but the customer also needs a separate 100/month cap, or when shared credits need a per-action cap (10 `action_1` calls/day).
17-
- `usage_alerts`: notify when usage crosses a threshold; alerts never block usage. Never describe alerts as blocking, or spend limits as dollar limits unless the feature's units are dollars.
18-
- `auto_topups`: automatically buy prepaid units when the balance drops below a threshold. Verify the feature has a one-off prepaid purchase path first.
19-
- Entity-level controls override customer-level controls for that entity. Auto top-ups are customer-level only.
20-
- Inspect current customer/entity state before changing billing controls.
21-
22-
Docs: [billing controls](https://docs.useautumn.com/documentation/customers/billing-controls), [auto top-ups](https://docs.useautumn.com/documentation/modelling-pricing/auto-top-ups), [spend limits and usage alerts](https://docs.useautumn.com/documentation/modelling-pricing/spend-limits).
23-
2410
### Tracking past zero
2511

2612
- On `track`, `overage_behavior` decides what happens to a deduction that does not fit.
2713
- `cap` (default): deducts only what fits and stops at 0.
2814
- `overflow`: deducts the whole value and lets the balance go negative. `usage_limits` do not clamp it; `spend_limits` still apply.
15+
16+
### How controls interact with balances
17+
18+
- Only `overage_allowed` changes whether usage may pass 0. The rest just bound usage that is already permitted — with no overage, a `spend_limit` has nothing to bound and does nothing.
19+
- `usage_limits` are counted independently of the balance: they bite whether or not overage exists, and can sit below the included amount.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
### Billing Controls
2+
3+
- Billing controls are runtime policy on a customer or entity.
4+
- They do not define what a plan grants; they change how usage is allowed, capped, alerted, or topped up.
5+
- They are often exposed as customer-facing settings, except `overage_allowed` which is usually product/admin controlled.
6+
7+
</intro>
8+
9+
<control-types>
10+
11+
- `overage_allowed`: whether usage can continue after granted balance is exhausted.
12+
- `spend_limits`: cap overage in feature units, not dollars.
13+
- `usage_limits`: hard usage caps over a time window.
14+
- Useful when a plan grants multiple balances, e.g. 5/day and 5/month, but the customer also needs a separate 100/month cap.
15+
- Useful for credit systems when credits are shared, but one mapped action needs its own cap, e.g. 10 `action_1` calls/day.
16+
- `usage_alerts`: notify when usage crosses a threshold; alerts do not block usage.
17+
- `auto_topups`: automatically buy prepaid quantity when balance drops below a threshold.
18+
19+
</control-types>
20+
21+
<scope>
22+
23+
- Customer-level controls apply to the customer.
24+
- Entity-level controls can override customer-level controls for that entity.
25+
- Auto top-ups are customer-level only.
26+
27+
</scope>
28+
29+
<agent-rules>
30+
31+
- Inspect current customer/entity state before changing billing controls.
32+
- For auto top-ups, verify the feature has a one-off prepaid purchase path.
33+
- Do not describe alerts as blocking usage or spend limits as dollar limits unless the feature units are dollars.
34+
35+
</agent-rules>
36+
37+
<useful-docs>
38+
39+
- Billing controls: https://docs.useautumn.com/documentation/customers/billing-controls
40+
- Auto top-ups: https://docs.useautumn.com/documentation/modelling-pricing/auto-top-ups
41+
- Spend limits and usage alerts: https://docs.useautumn.com/documentation/modelling-pricing/spend-limits
42+
43+
</useful-docs>

packages/agent-docs/generated/mcp/concepts.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -588,31 +588,46 @@ Updating or ending a trial
588588

589589
</useful-docs>
590590

591-
## Balances, caps and overage
591+
### Billing Controls
592592

593-
- A balance counts down to 0. Going below 0 is overage.
594-
- Two things let usage go past 0, and nothing else does:
595-
- a usage-based `price` on the plan item — they go over and get billed for it.
596-
- the `overage_allowed` billing control.
597-
- If neither is set, `included` IS the cap: usage stops at 0 and `check` returns `allowed: false`. Nothing extra is needed to enforce it.
598-
- So never add a `spend_limit` to "cap" a feature that has no overage price and no `overage_allowed` — it is already capped, and the limit does nothing.
593+
- Billing controls are runtime policy on a customer or entity.
594+
- They do not define what a plan grants; they change how usage is allowed, capped, alerted, or topped up.
595+
- They are often exposed as customer-facing settings, except `overage_allowed` which is usually product/admin controlled.
599596

600-
### Billing controls
597+
</intro>
598+
599+
<control-types>
600+
601+
- `overage_allowed`: whether usage can continue after granted balance is exhausted.
602+
- `spend_limits`: cap overage in feature units, not dollars.
603+
- `usage_limits`: hard usage caps over a time window.
604+
- Useful when a plan grants multiple balances, e.g. 5/day and 5/month, but the customer also needs a separate 100/month cap.
605+
- Useful for credit systems when credits are shared, but one mapped action needs its own cap, e.g. 10 `action_1` calls/day.
606+
- `usage_alerts`: notify when usage crosses a threshold; alerts do not block usage.
607+
- `auto_topups`: automatically buy prepaid quantity when balance drops below a threshold.
608+
609+
</control-types>
610+
611+
<scope>
601612

602-
Billing controls are runtime policy on a customer or entity: they never define what a plan grants, only how usage is allowed, capped, alerted, or topped up. They are often exposed as customer-facing settings, except `overage_allowed`, which is usually product/admin controlled.
613+
- Customer-level controls apply to the customer.
614+
- Entity-level controls can override customer-level controls for that entity.
615+
- Auto top-ups are customer-level only.
616+
617+
</scope>
618+
619+
<agent-rules>
603620

604-
- Only `overage_allowed` changes whether usage may pass 0. The rest just bound usage that is already permitted.
605-
- `spend_limits`: caps overage only, in feature units (not dollars). With no overage there is nothing to bound, so it does nothing.
606-
- `usage_limits`: a separate gate on TOTAL usage per time window, counted independently of the balance. This one bites whether or not overage exists, and can sit below the included amount. Useful when a plan grants multiple balances (5/day and 5/month) but the customer also needs a separate 100/month cap, or when shared credits need a per-action cap (10 `action_1` calls/day).
607-
- `usage_alerts`: notify when usage crosses a threshold; alerts never block usage. Never describe alerts as blocking, or spend limits as dollar limits unless the feature's units are dollars.
608-
- `auto_topups`: automatically buy prepaid units when the balance drops below a threshold. Verify the feature has a one-off prepaid purchase path first.
609-
- Entity-level controls override customer-level controls for that entity. Auto top-ups are customer-level only.
610621
- Inspect current customer/entity state before changing billing controls.
622+
- For auto top-ups, verify the feature has a one-off prepaid purchase path.
623+
- Do not describe alerts as blocking usage or spend limits as dollar limits unless the feature units are dollars.
611624

612-
Docs: [billing controls](https://docs.useautumn.com/documentation/customers/billing-controls), [auto top-ups](https://docs.useautumn.com/documentation/modelling-pricing/auto-top-ups), [spend limits and usage alerts](https://docs.useautumn.com/documentation/modelling-pricing/spend-limits).
625+
</agent-rules>
613626

614-
### Tracking past zero
627+
<useful-docs>
615628

616-
- On `track`, `overage_behavior` decides what happens to a deduction that does not fit.
617-
- `cap` (default): deducts only what fits and stops at 0.
618-
- `overflow`: deducts the whole value and lets the balance go negative. `usage_limits` do not clamp it; `spend_limits` still apply.
629+
- Billing controls: https://docs.useautumn.com/documentation/customers/billing-controls
630+
- Auto top-ups: https://docs.useautumn.com/documentation/modelling-pricing/auto-top-ups
631+
- Spend limits and usage alerts: https://docs.useautumn.com/documentation/modelling-pricing/spend-limits
632+
633+
</useful-docs>

packages/agent-docs/generated/skills/autumn-concepts/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ For reasoning about free trials and when billing begins, read `references/trials
7676

7777
For distinguishing a customer from an entity (seats, sub-accounts) and their runtime billing state, read `references/customer-entity.md`.
7878

79-
For reasoning about balances, caps, overage, or billing controls — runtime caps, alerts, and top-ups, read `references/balances.md`.
79+
For reasoning about billing controls — runtime caps, alerts, overage, and top-ups, read `references/billing-controls.md`.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
### Billing Controls
2+
3+
- Billing controls are runtime policy on a customer or entity.
4+
- They do not define what a plan grants; they change how usage is allowed, capped, alerted, or topped up.
5+
- They are often exposed as customer-facing settings, except `overage_allowed` which is usually product/admin controlled.
6+
7+
</intro>
8+
9+
<control-types>
10+
11+
- `overage_allowed`: whether usage can continue after granted balance is exhausted.
12+
- `spend_limits`: cap overage in feature units, not dollars.
13+
- `usage_limits`: hard usage caps over a time window.
14+
- Useful when a plan grants multiple balances, e.g. 5/day and 5/month, but the customer also needs a separate 100/month cap.
15+
- Useful for credit systems when credits are shared, but one mapped action needs its own cap, e.g. 10 `action_1` calls/day.
16+
- `usage_alerts`: notify when usage crosses a threshold; alerts do not block usage.
17+
- `auto_topups`: automatically buy prepaid quantity when balance drops below a threshold.
18+
19+
</control-types>
20+
21+
<scope>
22+
23+
- Customer-level controls apply to the customer.
24+
- Entity-level controls can override customer-level controls for that entity.
25+
- Auto top-ups are customer-level only.
26+
27+
</scope>
28+
29+
<agent-rules>
30+
31+
- Inspect current customer/entity state before changing billing controls.
32+
- For auto top-ups, verify the feature has a one-off prepaid purchase path.
33+
- Do not describe alerts as blocking usage or spend limits as dollar limits unless the feature units are dollars.
34+
35+
</agent-rules>
36+
37+
<useful-docs>
38+
39+
- Billing controls: https://docs.useautumn.com/documentation/customers/billing-controls
40+
- Auto top-ups: https://docs.useautumn.com/documentation/modelling-pricing/auto-top-ups
41+
- Spend limits and usage alerts: https://docs.useautumn.com/documentation/modelling-pricing/spend-limits
42+
43+
</useful-docs>

packages/agent-docs/generated/skills/balances/SKILL.md

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,57 @@ description: How a balance behaves at zero — what makes an included allowance
1414
- If neither is set, `included` IS the cap: usage stops at 0 and `check` returns `allowed: false`. Nothing extra is needed to enforce it.
1515
- So never add a `spend_limit` to "cap" a feature that has no overage price and no `overage_allowed` — it is already capped, and the limit does nothing.
1616

17-
### Billing controls
17+
### Tracking past zero
18+
19+
- On `track`, `overage_behavior` decides what happens to a deduction that does not fit.
20+
- `cap` (default): deducts only what fits and stops at 0.
21+
- `overflow`: deducts the whole value and lets the balance go negative. `usage_limits` do not clamp it; `spend_limits` still apply.
22+
23+
### How controls interact with balances
24+
25+
- Only `overage_allowed` changes whether usage may pass 0. The rest just bound usage that is already permitted — with no overage, a `spend_limit` has nothing to bound and does nothing.
26+
- `usage_limits` are counted independently of the balance: they bite whether or not overage exists, and can sit below the included amount.
27+
28+
### Billing Controls
29+
30+
- Billing controls are runtime policy on a customer or entity.
31+
- They do not define what a plan grants; they change how usage is allowed, capped, alerted, or topped up.
32+
- They are often exposed as customer-facing settings, except `overage_allowed` which is usually product/admin controlled.
33+
34+
</intro>
35+
36+
<control-types>
1837

19-
Billing controls are runtime policy on a customer or entity: they never define what a plan grants, only how usage is allowed, capped, alerted, or topped up. They are often exposed as customer-facing settings, except `overage_allowed`, which is usually product/admin controlled.
38+
- `overage_allowed`: whether usage can continue after granted balance is exhausted.
39+
- `spend_limits`: cap overage in feature units, not dollars.
40+
- `usage_limits`: hard usage caps over a time window.
41+
- Useful when a plan grants multiple balances, e.g. 5/day and 5/month, but the customer also needs a separate 100/month cap.
42+
- Useful for credit systems when credits are shared, but one mapped action needs its own cap, e.g. 10 `action_1` calls/day.
43+
- `usage_alerts`: notify when usage crosses a threshold; alerts do not block usage.
44+
- `auto_topups`: automatically buy prepaid quantity when balance drops below a threshold.
45+
46+
</control-types>
47+
48+
<scope>
49+
50+
- Customer-level controls apply to the customer.
51+
- Entity-level controls can override customer-level controls for that entity.
52+
- Auto top-ups are customer-level only.
53+
54+
</scope>
55+
56+
<agent-rules>
2057

21-
- Only `overage_allowed` changes whether usage may pass 0. The rest just bound usage that is already permitted.
22-
- `spend_limits`: caps overage only, in feature units (not dollars). With no overage there is nothing to bound, so it does nothing.
23-
- `usage_limits`: a separate gate on TOTAL usage per time window, counted independently of the balance. This one bites whether or not overage exists, and can sit below the included amount. Useful when a plan grants multiple balances (5/day and 5/month) but the customer also needs a separate 100/month cap, or when shared credits need a per-action cap (10 `action_1` calls/day).
24-
- `usage_alerts`: notify when usage crosses a threshold; alerts never block usage. Never describe alerts as blocking, or spend limits as dollar limits unless the feature's units are dollars.
25-
- `auto_topups`: automatically buy prepaid units when the balance drops below a threshold. Verify the feature has a one-off prepaid purchase path first.
26-
- Entity-level controls override customer-level controls for that entity. Auto top-ups are customer-level only.
2758
- Inspect current customer/entity state before changing billing controls.
59+
- For auto top-ups, verify the feature has a one-off prepaid purchase path.
60+
- Do not describe alerts as blocking usage or spend limits as dollar limits unless the feature units are dollars.
2861

29-
Docs: [billing controls](https://docs.useautumn.com/documentation/customers/billing-controls), [auto top-ups](https://docs.useautumn.com/documentation/modelling-pricing/auto-top-ups), [spend limits and usage alerts](https://docs.useautumn.com/documentation/modelling-pricing/spend-limits).
62+
</agent-rules>
3063

31-
### Tracking past zero
64+
<useful-docs>
3265

33-
- On `track`, `overage_behavior` decides what happens to a deduction that does not fit.
34-
- `cap` (default): deducts only what fits and stops at 0.
35-
- `overflow`: deducts the whole value and lets the balance go negative. `usage_limits` do not clamp it; `spend_limits` still apply.
66+
- Billing controls: https://docs.useautumn.com/documentation/customers/billing-controls
67+
- Auto top-ups: https://docs.useautumn.com/documentation/modelling-pricing/auto-top-ups
68+
- Spend limits and usage alerts: https://docs.useautumn.com/documentation/modelling-pricing/spend-limits
69+
70+
</useful-docs>

packages/agent-docs/src/generated/mcp-resources.generated.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)