The sales example
A brand shaped like api.forsale, from three files. One Service works a deal from first touch to the account's payment, one Pool of setters, closers and nurturers works on an existing door, and nothing is charged on effort. The seller pays 5% of the closed value at won, or 15% when a closer takes the deal, the closer's 10% passed through whole.
sales's wordsdeal is a jobaccount is a subjectgig is a taskcloser is a memberseller is a clientseller is a buyer
The sales example is a brand shaped like api.forsale, built from three files: its words, one Pool and one Service. A seller, or the seller's agent, sends an account and an offer. AI sources, qualifies, books, meets and negotiates. A warm reply sends the booking to a setter, a deal of $50,000 and up sends the meeting and the rest of the deal to a closer, and an account that goes quiet sends it to a nurturer.
| Who | What you get |
|---|---|
| The seller | Nothing on effort. 5% of the closed value when your customer pays your own invoice, or 15% when a closer takes the deal, and the closer's 10% passes through whole. Held 60 days, then final |
| The closer | 10% of every deal you close, charged to the seller and never taken from your share. Your terms freeze at your claim, and a seller's no never counts against you: Closing on closers.deals |
The brand ports api.forsale whole: its behavior tests, its routes and its suites, run against the generated brand.
| Measure | Of | Result | Read it |
|---|---|---|---|
The sales kernel's behavior tests: core, gig-result, gig-lifecycle, sdk and demo, at 52fa49b | 76 tests | 59 ported as they are · 10 adapted · 7 decided | Its behavior tests |
| api.forsale's routes, the kernel's and the front door's | 22 routes | 12 served as its clients call them · 6 adapted · 4 decided | Route by route |
| The kernel's money path, its numbers unchanged | 10 rows | 10 passed · 0 failed | The suite |
| api.forsale's own probe suite | 10 probes | 10 passed · 8 unchanged, 2 rewritten for a door that sells | The suite |
npx services.dev verify --suite kernel-smoke.json # the sales kernel's money path, its numbers unchangedkernel-smoke@1 · 10 rows · the money path of e2e/tests/00-kernel-smoke.spec.ts and gig-lifecycle's two intermediate steps · against http://localhost:8787
✓ list-80k-escalates POST /deals {"value":80000} a closer gig posts: $80,000 is over humans_from
✓ floor-is-64k GET /gigs/:id the brief reads floor $64,000, 80% of list
✓ proposal-commits POST /gigs/:id/propose 200 · propose committed · the gig stays claimed
✓ negotiation-commits POST /gigs/:id/negotiate 200 · negotiate committed · the gig stays claimed
✓ floor-refuses-50k POST /gigs/:id/complete 50000 422 guard_refused · the gig stays claimed
✓ close-74k-commits POST /gigs/:id/complete 74000 200 · the deal is won, and waits on the payment
✓ closer-share-7400 GET /owner/deals/:id closer $7,400.00, charged to the seller once the payment lands
✓ five-percent-3700 GET /owner/deals/:id api.forsale $3,700.00, and $0.00 before the payment
✓ track-record GET /closers/me/track the closer's track record gains 1 won and $74,000 closed
✓ net-to-seller-62900 GET /deals/:id $74,000.00 paid to the seller, $11,100.00 charged: $62,900.00 net
10 passed · 0 failed| api.forsale sells | Where the brand keeps it |
|---|---|
| A deal worked from first touch to the account's payment | The Deal Service: seven steps, AI on each until its escalate names a role |
| A person where one pays off | a setter books on a warm reply, paid when the meeting is held; a closer meets and closes from humans_from, a buying committee or the seller's ask |
| A floor no one closes below | close.guard, reading the seller's own merits |
| Proof in the close | the closer sends the seller's own invoice, carrying the deal's id: how the payment finds the deal |
| Every deal shape it really sells | net 30, billed monthly, a consumer's card, an expansion and a referral: every deal shape |
| Setters, closers and nurturers who keep all their pay | The closers' Pool, on closers.deals |
Paid on the close adds the outcome to a Service in two lines.
cat services/deal.ts roles: {
setter: { pool: closers, pay: { usd: 250, on: 'meet.held' } },
closer: { pool: closers, span: ['meet', 'propose', 'negotiate', 'close'], revive: { first_call: '24h' },
pay: { share: '10%', of: 'closed_value', on: 'won', from: 'buyer' },
outcome: { amount: 'closed_value', proof: 'payment', match: { customer: 'account', metadata: 'deal' },
window: { bank: '60d', card: '120d' }, tail: '90d', due: '90d', collect: job => (job.output.billing === 'monthly' ? 'each' : 'first') },
price: { usd: 0, share: '5%', of: 'closed_value', on: 'won', ai: 40,
lines: { referral: { share: '1%', of: 'closed_value', to: 'referrer', on: 'won' } } },# Free · meetings AI books and you hold, $400 a meeting held
# who: AI books and meets; you and two staff hold each meeting of $50,000 and up, and work the deal
# sides: $400.00 at each held meeting and nothing on a booking; a no-show costs AI up to $40.00
# Launch · deals AI works to close, with closers listed on closers.deals, paid 5% of the closed value at won
# who: AI works every deal; a closer takes each one of $50,000 and up, $5,000 at won, charged to the seller
# sides: a won deal leaves $3,388.66 and a lost one costs $340.00, so it breaks even at 9.1% won; the closer's $5,000.00 is the seller's
# Team · full depth: the closer's share at won, tiers by deal size, firms with a bench
# who: closers paid a share at won, tiered, and firms enrolling a bench
# sides: pay that scales with the deal: the closer's $7,400.00 at $74,000 against $5,000.00 flat, tiers by deal size and firms with a bench; your odds stay 9.1%check reads the folder back, each file with its line count. Build it adds them one at a time.
npx services.dev checkbrand.ts · 2 lines · sales · api.forsale · words job → deal, subject → account, task → gig, member → closer, client and buyer → seller
pools/closers.ts · 14 lines · closers · 3 roles: setter, closer, nurturer · joins in 3 steps on closers.deals · feed, ranked by fit, then track · hold 48h to a first touch, then each touch renews it
services/deal.ts · 42 lines · nothing on effort; 5% of closed_value at won, proven by the account's payment, held 60 days by bank, 120 by card.
✓ ready to sell · 1 Service · AI closes a deal under $50,000 alone · nothing charged before won| Page | What it shows |
|---|---|
| Build it | Each file, with check after it |
| One deal, every side | Northwind Freight's deal, from the order on 2 November to the closer's payout on 12 March |
| The agent's order | A seller's agent orders, pays with a scoped token, sends what it learns and waits |
| Every branch | Every way a deal goes, each from the value that picks it |
| Every deal shape | A consumer's card, an expansion and a referral: what proves each, how long it's held and what the share is of |
| The customer portal | The seller's deal at the close, then won, paid and held |
| Closing on closers.deals | The closer's path, from joining to Friday's payout, and what protects the pay |
| The owner console | December, with four deals won and awaiting payment |
| The money | One deal from its mandate to its payout, how the payment finds it, and every deal on this site |
| What the brand gets | API, CLI, MCP, SDK, Site, Docs and App, in deal words |
| The Deal Service | Each step, the policy, the held meeting, the floor and how a closer reaches the account |
| The closers' Pool | Each line, tiers on the record, who may claim, firms, and a licensed closer |
| Porting api.forsale | Its suites, its 22 routes and its 76 behavior tests |
| Take your first real deal | Every outside system a real deal depends on, and the contract it meets |