N NoBullshit.wiki 中文

Mobile & digital inventory count specialist - serial-number compare single-file tool - paste two columns of IMEIs (the ledger export in one, the physical-scan export in the other) and it cleans and matches them into four tables: in both (balanced) / ledger-only (missing) / scan-only (extra) / duplicates within one column (double-scanned or double-entered) - tolerant of spaces, dashes, case, and 15-vs-16-digit lengths, results exportable to CSV for pasting straight into the variance register, running locally with no network and no install

Works with:Claude / GPT-4 classCategories:Mobile & Digital StoreLevel:Advanced Updated

You are a coding agent. Build a single-file
HTML "serial compare tool" for the
inventory count specialist at a
mobile-and-digital store: two columns of
IMEIs pasted in, differences matched out
automatically. Local-only: no network, no
install, no external dependencies.

Scenario (design to this, not a
full-stocktake platform): the night of
the count, the system ledger exports one
column of serials, the scanner or manual
log another - hundreds to thousands of
lines. Today that means bare-eye matching
or hand-built formulas: slow and wrong.
This tool does exactly one thing: clean
both columns, match them cleanly, export
them.

Input:
- Two paste boxes, "ledger column" and
  "scan column," accepting any separation
  (newlines / commas / spaces, mixed)
- Paste triggers processing; no file-
  import button needed

Cleaning rules (clean before matching,
show per-rule stats):
- Strip all spaces, dashes, quotes, and
  similar separators
- Uppercase everything
- Length validation: keep only 15- or
  16-digit pure numeric strings; all
  other lines go to a separate "suspect
  typo" list and do not enter matching

Matching output, four tables:
1. Balanced: serials present in both
   (count suffices, expandable)
2. Missing: in the ledger, not in the
   scan - the first half of the variance
3. Extra: in the scan, not on the ledger
   - the other half; this table auto-runs
   a "mirror pre-check": pairs across
   missing and extra with equal length
   and only a few differing digits get
   flagged "suspected transposition"
   (the fingerprint of entry errors -
   flagging them saves half a day of
   attribution later)
4. Duplicates: serials appearing twice or
   more within one column (double-scans /
   double-entries), split into "ledger
   duplicates" and "scan duplicates"

Export:
- Each table exports CSV separately, or
  one click exports everything (missing +
  extra + duplicates merged into a
  "variance register" format: serial /
  variance type / note), paste-ready for
  the register
- Export filenames carry the date

Hard constraints:
- Pure front end; data never leaves the
  browser; no network requests, no
  external libraries, no accounts
- Serials are sensitive business data: no
  "cloud sync," no history upload;
  refresh clears everything - matching
  lives in this session's memory only
- Preload one sample dataset (with one
  transposition pair and one duplicate)
  so opening the page shows all four
  tables with no manual setup
- Sized for 5,000 entries, results in
  under a second

You may not:
- Attempt any variance attribution - the
  tool compares numbers; why a serial is
  missing is the analyzer's business, and
  no speculative copy appears on the
  results page
- Build dashboards, trends, or grand
  analytics - the four tables are the
  entire output
- Add registration, login, payment, or
  watermarks
- Make cleaning rules configurable - the
  cleaning logic is fixed (15/16-digit
  numerics); configurable cleaning lets
  people stop being wary of their own
  dirty data

Why it is written this way

Of the four tables, the within-column duplicates table looks like a bonus and is actually the first gate of data quality: one double-scan or one double-entered ledger line manufactures phantom variances - until duplicates are cleared first, every line in the missing and extra tables might be a hallucination. Making duplicate detection a built-in step rather than an advanced feature reflects the tool's real brief: guarantee the inputs are clean before promising the matching is right.

The "suspected transposition" mirror pre-check (equal length, few differing digits) is the highest-leverage design in this little tool. Entry transposition is an error type that simply happens in serial stocktaking, and its fingerprint is extremely regular - the wrong number looks almost exactly like the real one. Human eyes hunting those pairs across hundreds of lines is where overtime nights die; having the tool flag them first turns attribution from a full-table search into checking the flagged pairs against original records. This is not attribution (expressly banned) - it only marks "looks alike," which is a fact; why it looks alike stays human work.

"Data never leaves the browser; refresh clears" is written as a hard constraint because this tool handles some of the store's most sensitive operating data: the complete list of on-hand serials is the store with its cards on the table. A purely local, memoryless tool has a security perimeter that needs no explaining - the count specialist can paste the whole store's data without a second thought. That is also what "single-file HTML" means as a form: only what can be carried away on a USB stick truly stays in the store.

"Cleaning rules are not configurable" reads inflexible and is a foolproofing design. The moment cleaning (15/16-digit numerics only) becomes configurable, someone will "relax it to 14 digits this once" - and a 14-digit serial should be repaired, not relaxed. Fixed rules keep dirty data permanently outside the matching and separately listed, forcing the user to see, every single time, how many of their lines were entered wrong - an uncomfortable display that is precisely the tool's biggest contribution to data quality.

Variables

Variable Description
Matching capacity What volume the tool is sized for - this page specifies 5,000 lines for a single-store count; chain-level mega-counts can ask the coding agent to scale up, and pure front-end comparison supports far larger sets
Transposition similarity criterion What counts as "suspected transposition" - equal length with only a few differing digits, fixed here; a broader rule (including swapped adjacent digits) can be specified to the agent, but a fixed criterion beats an adjustable one
Variance register export format How the CSV columns are arranged - mirror the store's register fields (serial / type / note) so exports paste directly; when the register changes, have the agent update the export format in step

single-file toolserial comparisoncount efficiency