---
name: invoice-creator
title: "Invoice & Quote Creator"
description: "Generate invoices, quotes, and financial documents from project data and the knowledge graph"
category: work
status: active
triggers:
  - "create invoice"
  - "generate invoice"
  - "write invoice"
  - "create quote"
  - "price quote"
---

## Instructions

Create a professional invoice or quote:

1. **Gather details**:
   - Client info — look it up via `query_knowledge` / `query_memory_graph` (wiki articles and knowledge graph entities of type `person` or `organization`)
   - Project/service details from `projects/{slug}/PROJECT.md` or user input
   - Line items with quantities, unit prices, descriptions
   - Tax rate (if applicable)
   - Payment terms
   - Currency

2. **Structure**:
   - **Header**: Your company info (from USER.md/PROFILE.md), invoice number, date
   - **Bill To**: Client name, address, contact
   - **Line Items**: Description | Qty | Unit Price | Total (table format)
   - **Subtotal / Tax / Total**
   - **Payment Terms**: due date, payment methods, bank details
   - **Notes**: any special terms or thank-you message

3. **Number format**: INV-YYYY-NNN — pick the next number by scanning the target project's `output/invoices/` directory for existing invoices

4. **Save** — Write to `projects/{slug}/output/invoices/INV-YYYY-NNN.md` (financial deliverables live inside the relevant project)

## Rules

- Always include invoice number and date
- Line items must have quantities and unit prices (not just totals)
- Payment terms must be explicit (Net 30, Due on receipt, etc.)
- For quotes: add validity period ("Valid for 30 days")
- Round to 2 decimal places for all amounts
