N NoBullshit.wiki 中文

Livestream E-commerce cash office - creator and host commission settlement tool, single file - refund clawback timing, cross-show consolidation, and slot-fee non-clawback as three fixed policies; every adjustment carries a reason code with no free-text lane, every statement carries a version number, and any change bumps the version

Works with:Claude / GPT-4 classCategories:Livestream E-commerceLevel:Advanced Updated

You are a coding agent building an internal tool for a
livestream selling team. Build a single-file HTML tool (HTML,
CSS, JS all inlined, no external dependencies, no network
requests, opens by double-click) for the cash office to
settle creator and host commissions. Core stance: commission
disputes are almost never arithmetic - they live in the
refund-clawback timing, the cross-show basis, and whether
slot fees claw back; those three policies get parameterized
and fixed, and arithmetic is the tool's job.

Input areas (manual entry, save and export):
A. Payee file: creator/host name, agreement number,
   commission rate (may tier, versioned with effective
   shows), slot fee (amount and agreement terms)
B. Sales detail: order number / show / product / amount /
   order timestamp - one payee may span multiple shows
C. Refund detail: order number / refund amount / refund
   timestamp
D. Parameters: settlement date; clawback policy (refund
   before the date = deducted this period; refund after =
   next-period negative carryforward - both supported,
   chosen per agreement)

Computation rules (printed on the page, expandable):
1. Net sales = sales detail minus orders refunded before
   the settlement date; refunds after the date leave this
   period untouched and generate a "next-period carryforward"
   row
2. Accrued commission = net sales x the rate version in
   force for that show - shows spanning rate versions split
   automatically, with the switch flagged
3. Slot fee on its own line: no refund clawback (default,
   changeable per agreement) - merging slot fee and
   commission into one number is where unauditable
   statements begin
4. Cross-show dedup: the same order number across shows is
   flagged yellow on detection - first occurrence kept,
   ownership routed for manual confirmation

Output areas:
1. Statement: per payee, row order - slot fee / accrued
   commission per show (rate version shown) / next-period
   carryforward / total payable this period
2. Validation report:
   - Rate-version splits across shows (which show, which
     version)
   - Cross-show duplicate list
   - Line-by-line delta versus last period - deltas over
     [ ]% flagged yellow with composition shown
   - Carryforward ledger: cumulative registered carryforwards
     vs actually applied - the gap is "should have clawed
     back, hasn't"
3. Version management: every generated statement carries a
   version number; any changed figure requires a new version,
   old versions remain viewable - mutually confirmed
   versions cannot be silently re-edited

Usage boundary (printed in the tool footer):
- Data stays in the local browser; nothing uploads
- The tool computes money, it does not pay money - total
  payable links to no payment; payouts run the store's
  separate approval flow
- Every adjustment row must pick from a reason-code dropdown
  (agreement concession / dispute settlement / data
  correction / rate recompute ...) with no free-text
  "other adjustment" - an adjustment without a reason is
  next quarter's open case

Prohibitions:
- Rates, slot fees, and delta thresholds stay blank - no
  pre-filled "typical industry rates"; pre-fills become
  authoritative defaults
- No "apply the verbal agreement automatically" feature -
  every adjustment walks reason code + version bump
- No verdict vocabulary on statements ("inflated,"
  "anomalous") - the tool outputs numbers and rule names;
  liability is decided elsewhere

Why it is written this way

Commission disputes are almost never arithmetic errors; they are definitional splits - and the largest split is timing: refunds before versus after the settlement date offset in different places. The creator's books say "it refunded, so deduct it"; the cash office's books say "post-date refunds carry to next period"; both are right alone and irreconcilable together. Parameterizing the clawback policy in the tool and making "next-period carryforward" a permanent statement row means both sides read the same policy map at reconciliation, and the dispute loses its soil.

The slot fee on its own un-clawed line is the second definitional high ground: a slot fee buys the appearance and the time slot and, per agreement, does not float with sales or refunds; commission buys results and claws back. Two different species of money merged into one "total payable" become unexplainable the moment any refund lands. Split them, refunds touch only the commission line, the slot-fee line stands still, and the dispute's blast radius collapses.

"Adjustments must carry a reason code" aims at a real scar: every long-lived settlement sheet grows an "other adjustments" row - sizeable, cause unremembered - which is next reconciliation's open case and internal misappropriation's favorite hiding spot. Closing the free-text lane forces every adjustment into history with its reason, and version numbers make that history tamper-evident: changes bump versions, old versions stay viewable, and confirmed versions cannot be silently re-edited. These constraints feel heavy for small settlements, but the day a commission dispute arrives, the heaviness is the evidence chain.

Cross-show duplicates get flagged, not auto-deleted, drawing the line between "helpful" and "overreaching": duplicates are usually entry error, but occasionally both shows genuinely sold - the tool surfaces it for human confirmation rather than deciding. That line runs through the whole tool: computes but does not pay, reports deltas but renders no verdicts - a neutral statement is what earns the right to be the settlement baseline.

Variables

Variable Description
Rate versions Each payee's rates and effective shows - changes are routine; the version chain drives both the splits and the audit trail
Clawback policy How pre- and post-date refunds offset - chosen per agreement, then held stable period to period
Delta warning line What percentage change versus last period flags yellow - set against each payee's historical volatility

commission-settlementrefund-clawbacksingle-file-tool