{
  "schema": "leumas.docs.page/1",
  "id": "adapter:domain/proposal-builder",
  "slug": "adapters/domain/proposal-builder",
  "kind": "capabilities",
  "bucket": "package",
  "title": "proposal-builder",
  "name": "Proposal Builder",
  "eyebrow": null,
  "chip": null,
  "summary": "Sales-proposal and statement-of-work assembly pack for agencies, consultants, and B2B sales: build a structured proposal object from scope, pricing, and terms; generate a scope-of-work (SOW) section...",
  "keywords": [
    "proposal-builder",
    "sales-proposal",
    "statement-of-work",
    "agencies",
    "consultants",
    "scope-of-work",
    "deliverables",
    "assumptions"
  ],
  "audience": "both",
  "funnel": {
    "product": null,
    "cta": null
  },
  "body": "# proposal-builder\n\nSales-proposal & statement-of-work (SOW) assembly adapter pack for agencies, consultants, and B2B\nsellers. Turns `{ scope, pricing, terms }` into a structured proposal object and a clean, print-ready\nHTML document.\n\nIntelligent microservice: every tool has a deterministic template core that runs fully **offline**.\n`executiveSummary` and `sowSection` additionally try an optional LLM for richer prose and **silently\nfall back** to the template when no model is reachable (`mode: 'heuristic' | 'llm'`).\n\n## Tools\n\n| Tool | In → Out |\n|---|---|\n| `build` | `{ scope, pricing, terms, client, vendor }` → complete proposal object (summary + SOW + pricing + terms) |\n| `sowSection` | `{ scope }` → scope-of-work narrative + deliverables + assumptions (+ optional LLM narrative) |\n| `pricingTable` | `{ pricing }` → line items with subtotal, discount, tax, total + currency-formatted strings |\n| `toHtml` | `{ proposal }` (output of `build`) → print-ready standalone HTML document string |\n| `executiveSummary` | `{ brief, scope }` → persuasive opening paragraph (+ optional LLM prose) |\n| `timeline` | `{ phases }` → phased schedule with week ranges, dates, and milestones |\n\n## Usage\n\n```js\nimport pack from './index.js';\n\nconst built = pack.adapters.build({\n  scope: { title: 'Website Redesign', deliverables: ['Design', 'Build', 'Launch'], objectives: ['Increase conversion'] },\n  pricing: { currency: 'USD', items: [{ name: 'Design', qty: 1, rate: 8000 }, { name: 'Build', qty: 1, rate: 12000 }], discount: 0.1, taxRate: 8 },\n  terms: { paymentSchedule: '50% upfront, 50% on delivery', validUntil: '2026-08-01' },\n  client: 'Acme Co', vendor: 'Studio X',\n});\n// built.proposal → { title, executiveSummary, sow, pricing:{ subtotal, discount, tax, total }, terms, ... }\n\nconst { html } = pack.adapters.toHtml({ proposal: built });   // standalone HTML string\n\npack.adapters.pricingTable({ pricing: { items: [{ name: 'Retainer', qty: 3, rate: 2000 }] } });\n// → { subtotal: 6000, total: 6000, formatted: { total: '$6,000.00', ... } }\n\npack.adapters.timeline({ phases: ['Discovery', 'Build', 'Launch'], options: { weeksPerPhase: 2, startDate: '2026-02-01' } });\n// → { totalWeeks: 6, phases: [...], milestones: [...] }\n```\n\n## Pricing conventions\n\n- `discount`: a value `< 1` is a fraction (`0.1` = 10%); `>= 1` is an absolute amount.\n- `taxRate`: accepts `8` or `0.08` (both = 8%). `qty` defaults to `1`, `unit` to `\"each\"`.\n\n## DRY boundaries\n\n- **Pre-sale** proposal / SOW assembly only. `invoice` owns **post-sale** billing (invoice numbers,\n  due dates, receipts) — the pricing block here is an estimate inside a proposal, not a payable invoice.\n- Money math is inlined; no cross-pack imports except `../_shared/llm.js`. Pure ESM, Node built-ins,\n  zero npm deps.\n",
  "source": {
    "path": "shared/engines/adapters/domain/proposal-builder/README.md",
    "blobSha": "",
    "commit": "",
    "committedAt": "",
    "provenance": "no-git",
    "bytes": 3039,
    "hash": "ba6c67617dd3b2ce69b24d0a4db1588efdff39c7"
  },
  "urls": {
    "html": "/p/adapters/domain/proposal-builder",
    "json": "/docs/adapters/domain/proposal-builder.json",
    "md": "/docs/adapters/domain/proposal-builder.md"
  },
  "links": {
    "composes": [],
    "usedBy": [],
    "product": [],
    "howTo": [],
    "skills": []
  }
}
