Doordash Budget

View DoorDash spend vs caps, edit the dd-guard spending policy interactively, and reconcile the intent ledger against real order history

CommanddoordashMIT1 source files

Before you use this component

This is a third-party source bundle, not an installation into your account. UI Discovery has checked the available redistribution license evidence; runtime behavior has not been tested. Review all files, use a disposable project first, and do not enable scripts or hooks until you understand their permissions.

Some integrations require separately installed software, API keys or paid services. Credentials and subscriptions are not included. These are Claude Code resources; other clients may require adaptation.

Extract the ZIP into a temporary folder, inspect its entry file and supporting resources, then follow the original instructions. Do not overwrite an existing project configuration blindly. Keep the bundled license and attribution notices.

Source publisher
Claude Code Templates
Creator supplied by source
Not listed in source
Pinned source version
a344359459263d73d8948651c789244093c02e4e
License evidence
LICENSE

Source preview

cli-tool/components/commands/doordash/doordash-budget.md

---
allowed-tools: Bash(dd-cli:*), Bash(bash:*), Bash(cat:*), Bash(jq:*), Bash(mkdir:*), Read, Write, Edit
argument-hint: [status | set | reconcile]
description: View DoorDash spend vs caps, edit the dd-guard spending policy interactively, and reconcile the intent ledger against real order history
---

# DoorDash Budget Manager

Manage the dd-guard spending policy: **$ARGUMENTS**

State: `~/.claude/dd-guard/limits.json` (policy) and
`~/.claude/dd-guard/ledger.jsonl` (spend ledger). This command is the ONLY
sanctioned way to modify `limits.json` — the doordash-spend-guard hook blocks
direct command-line writes to it by design.

## Current State

- Policy: !`cat ~/.claude/dd-guard/limits.json 2>/dev/null || echo "(no policy yet — dd-guard seeds defaults on first run)"`
- Headroom: !`bash .claude/skills/doordash-spend-guard/scripts/dd-guard.sh status 2>/dev/null || echo "(dd-guard.sh not installed — install the doordash-spend-guard skill)"`

## Task

Parse `$ARGUMENTS` and run the matching subcommand:

### `status` (default when no arguments)

Present the dd-guard status output as a friendly table: each cap, spend to
date, headroom left. Note how many ledger entries are unreconciled intents
and remind that subtotals exclude fees/tips.

### `set`

Interactive policy editing:

1. Show the current policy values one by one.
2. Ask the user which value to change and to what
   (`per_order_max`, `daily_max`, `weekly_max`, `monthly_max`,
   `cooldown_minutes`, `allowed_hours.start/end`). Setting a cap to `null`
   removes it.
3. **Confirm the exact new policy with the user before writing** — read back
   the full JSON you intend to save.
4. Write `~/.claude/dd-guard/limits.json` with the Write tool (the hook
   permits interactive edits through this command's flow, not shell
   redirection).

### `reconcile`

Match unpaid intents against reality:

1. Run `dd-cli order history` and list recent orders.
2. For each ledger line with `"status": "intent"`, check whether a matching
   order (by date/restaurant/amount proximity) appears in history:
   - Match found → update the line to `"status": "paid"`.
   - Clearly abandoned (old intent, no matching order) → ask the user, then
     mark `"status": "abandoned"` so it stops counting against caps.
3. Rewrite `ledger.jsonl` preserving all other lines untouched
   (read-modify-write; keep it valid JSONL).
4. Report: N paid, M abandoned, K still pending.

## Rules

- Never change policy values without explicit user confirmation of the final
  JSON.
- Never delete ledger history — reconciliation only flips `status`.
- If the user asks to raise caps mid-session right after a blocked checkout,
  confirm they understand the block reason first (that friction is the
  point of the tool).

Preview capped at 60,000 characters. Download the bundle for every original file and notice.

Read the redistribution license
MIT License

Copyright (c) 2025 Daniel (San) Ávila

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Bundle SHA-256: 5fb846e903081992c699e1ab724f9cf90b549b65570b74fd60ba13f7697be4ae. Files are served as downloads and are never executed by this page.