pnpm merge-duplicates |
Fold duplicate rounds, sources, and investor spellings; clear ungrounded amounts; move borrowed days to a surer source; publish verified rows left flagged |
pnpm merge-duplicate-rounds |
Print every duplicate-round merge (survivor, company fold, sources, investors, deliveries, fields, deletions) without writing; -- --pair <id>,<id> for one pair, -- --apply to merge, --force for a pair the rule does not join |
pnpm retitle-sources -- --dry-run |
Give sources titled from a sibling article their own title back (drop the flag to write) |
pnpm reverify-profiles |
Clear company profiles written before the homepage identity check so the next enrichment redoes them (--name-alone widens it); a row that refused namesake hosts keeps them on a retry row |
pnpm replace-profile <id> --note "why" |
Write a hand-checked profile for one company (--website, --refuse, --unreadable, --description), clearing the old one in the same transaction so no sweep refills it in between; refused hosts carry over |
pnpm prune-corroboration -- --dry-run |
Drop corroboration sources that describe another company's round (drop the flag to write) |
pnpm prune-unsupported-investors |
Print each round whose own verification rejects an investor it still shows: the links it would remove, the leads it would clear, the verdict's words, and the sources; -- --apply to write (the links go, a cleared lead stays a participant, the row is rescored and noted), --round <id>[,<id>] for some rows. Reads only the store, safe to run again |
pnpm prune-unrelated-sources |
Print, per round, each source link that is not about the round and why (a job posting, a front page or other non-article, an aggregator's other story, a page that never names the company) without writing. -- --read-pages reads with Firecrawl, once each, the pages nothing stored ties to the company (about a credit a page, cached in data/prune-sources-pages.json, or --page-cache <file>): a page with a sentence naming the company and a figure stays and the sentence is written onto the link, a full page that never names it goes, and a page too short, in another script, or naming the company without a figure is left unverified. --apply writes (links go, sources linked to no round go), --round <id>[,<id>] for some rows. A round's last source never goes: the round is listed as held for review. Safe to run again |
pnpm repair-investors |
Print what today's investor name hygiene makes of every stored investor without writing: a description of investors ("executives from OpenAI", "some business angels") comes off its rounds, a spelling today's key folds into another firm ("a16z's Speedrun accelerator" into "a16z speedrun", "Wells Fargo & Co" out of "wells fargo and", "FJ Labs" out of "fj" now that the key keeps "AI" and "Labs") moves its links there with a lead kept a lead, a name whose shown form changes ("Eli Lilly (NYSE: LLY)", "Arm Holdings Inc", "Dr Michael Boyer") is renamed in place, and a row no round links to goes. A row moving off a key frees it for the firm that belongs there in the same pass. A spelling whose new key belongs to another firm by its words is held for a person; -- --decisions held.json carries out a person's decisions first (a rename with the site the round really names, or a forced merge, each citing its page; a decision whose row moved on is skipped). -- --apply to write; safe to run again |
pnpm repair-certainty |
Preview certainty classification of visible stored rounds with the supporting quote and source; reports counts and rows needing review. Run against an isolated restored copy before -- --apply, which updates certainty and places unsupported early reports in review. It does not automatically change the production database. |
pnpm prune-trending-posts |
Print every stored X post marked relevant that today's relevance rule would not keep (a shared word, a namesake, a figure far from the name) without writing; -- --sql <file> also writes the reviewed SQL (a backup table of those rows, then the update), -- --apply marks them irrelevant. A post whose stored snippet never names the company (its name was in the title, which is not kept) is left as it is. Only demotes, and the rows stay |
pnpm prune-page-snapshots |
Apply the same 90-day markdown snapshot retention as the daily accuracy workflow; SNAPSHOT_RETENTION_DAYS overrides the age for a manual run |
pnpm repair-money |
Replay stored rounds under the money and visibility rules: a valuation no sentence supports for its round, a row that breaks an invariant, a row only secondhand pages state. Prints each change and why; -- --reground reads an unsupported valuation's own sources again (Firecrawl and a model key, RECONCILE_MODEL_REPAIR picks the model; --pause <ms> between rows), --apply writes |
pnpm repair-financing |
Replay stored rounds under the financing and stage rules and print what changes; -- --reground reads sources with Firecrawl, --limit N, --ids a,b, --verbose, --apply writes |
pnpm repair-audit |
Re-evaluate existing rows under the issuer, identity, financing, stage, and company-date rules; dry run by default, -- --reground reads a source through Firecrawl, --apply writes only quoted changes |
pnpm repair-late-history |
Print the rounds first seen past the news window after their announcement, which belong in history; -- --apply moves them |
pnpm purge-third-party-firmographics |
Remove what the retired firmographics and funding-event providers left in the store: their enrichment rows and firmographics, a headquarters or logo only they gave (YC's location or the homepage's logo takes its place), dossier figures confirmed only by their facts, holds and notes citing their funding events, their unverified leads, flags, and runs. Promoted history rounds stay, with their round's own facts as the lead. Dry run by default; writes a JSON backup of every row it touches (--backup-dir, default data/backups) before --apply |
pnpm backfill-homepage-facts |
Read each verified homepage once more for its links and branding (one credit each): the LinkedIn company page it links goes on the profile, and a logo fills a company that has none. Dry run by default; --apply writes from the same reads (cached in data/homepage-facts.json), --limit N |
pnpm repair-trust-freshness |
Re-check each visible round's trusted evidence and date, searching with Firecrawl where the store cannot settle it, and print which would be hidden, redated, or moved to history; -- --limit=N --offset=N for a slice, --apply writes |
pnpm repair-request-names |
Give companies a request created with a homepage tagline in their name their clean name; display name only, safe to run again |
pnpm fix-records -- --file fixes.json |
Print hand-checked corrections to stored rows (a new day with the page that states it, a rejection, a forced merge, a company's own domain, a stage the page names, a description the company's own page supports, a round's leads and participants as its announcement states them, a company's headquarters or sector, a name the company went by before a rebrand stored as a name alias (refused when another company goes by it), a page unlinked from a round it does not belong to (a second deal's reading merged into the row), a company row with no domain folded into the company it duplicates, a round's valuation in the words of the sentence that states it (pinned), a flagged or review row published after a hand check of a page it already cites (a person's publish, as from the review queue; the quote must state the row's amount), or a missing earlier round queued on the history ledger as a lead with its page, requeue sending a lead that ended without a source back with a new page) without writing; --apply to write. Every fix but a merge cites the page it rests on, and each names what the row holds now, so a row that has moved on is refused and a fix already in place is skipped |
pnpm history-backfill -- --file history.json |
A company's funding history from hand-checked leads: adds each company the file names by its homepage (only when the homepage passes the identity check a company request runs), applies the file's fixes in the fix-records format (a missing round is a history_lead with the page that states it), then works every lead due for those companies through the history lane: search, page reads, read-back, persist. No page that states a round, no row; valuations come from the pages read. --corroborate then gives each flagged or review row of those companies the corroboration lane's second reading, and a row that gained sources is read back with all of them. Dry run by default (reads no page); --apply writes. Needs FIRECRAWL_API_KEY and a model key, as the history lane does |
pnpm seed-tombstones -- --dir <folder> |
Print the merge tombstones (round_merges) for merges applied before the table existed, read from the folder's --apply logs (*.applied.txt), fix files' merge entries, and *merge-backup*/round_sources.csv backups, each checked against the store (the dropped row gone, the kept row there, chains followed); --apply to write. Run it once after the migration |
pnpm clean-company-ids |
Print the new id for every company whose id would make an unclean URL (a space, or a namesake's :identity: suffix): its verified domain, else its name hyphenated (nexbank-capital), numbered when the name is taken (ghost-2). Dry run by default; -- --json <file> writes the plan, --apply writes a JSON backup of every row it touches (--backup-dir, default data/backups) and renames each company in its own transaction. Every round, enrichment, alias, ledger row, and flag moves with it, and the old URL answers with a permanent redirect. Safe to run again |
pnpm repair-round-records |
Apply the round-record rules to stored rows: lift namesake holds the company's own site settled, show investors' full names, record withheld valuations, and move audit fingerprints of renamed companies. Dry run by default and store-only; -- --web also finds visible rounds' announcements on the company's site or a newswire and reads verified homepages' own lines (Firecrawl credits, about 7 a round; no model key), --ids a,b or --limit N for some rounds, --show <id> prints one round's API row before and after, --json <file> writes the plan, --apply writes a JSON backup of every row it touches first (--backup-dir) |
pnpm repair-sole-leads |
List rounds whose one investor is stored as a participant while their pages give it the whole round, and raise it to lead; dry run by default, -- --ids a,b --apply writes; safe to run again |
pnpm repair-lead-flags |
List rounds whose own pages name a lead the row does not mark, or a firm a later lone reading took off the round, and write them; adds and raises only; dry run by default, -- --ids a,b --apply writes; safe to run again |
pnpm repair-slug-names |
List companies saved under a slug or lowercase name ("sandboxaq") whose evidence writes a proper name ("SandboxAQ"), and rename them; display name and name key only, ids and URLs stay; --apply writes; safe to run again |
pnpm reset-data -- --yes |
Start the data over: rounds, companies, sources, investors, runs go; coverage, feed tokens, delivery targets, and monitors stay |