Phase 2 part 4: discovery per signal (Claude web search, explee.com)
Each signal's page can search for organizations that show it, by hand or every 7, 14 or 30 days. Claude with the web_search_20260209 server tool (pause_turn resumed) works from the signal's "How to spot it" lines and the profile's targets; a company is kept only if its evidence URL was among the pages searched. explee.com's company search runs the signal's description in the target sizes, scored against the hypothesis, keeping strong matches. Our sites, the inventory, existing prospects, CRM Accounts and suppressed domains are left out. New companies go to Review tagged with the signal. Schema 8 adds discovery_runs (counts, searches, why companies were left out) and the signal's schedule and explee.com description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -274,6 +274,30 @@ CREATE UNIQUE INDEX funnel_events_external ON funnel_events (source, external_id
|
||||
CREATE INDEX funnel_events_by_signal ON funnel_events (signal_id, stage, at);
|
||||
CREATE INDEX funnel_events_by_subject ON funnel_events (subject);
|
||||
CREATE INDEX funnel_events_by_campaign ON funnel_events (campaign);
|
||||
`,
|
||||
// 8: discovery. Each signal can be searched for companies that show it
|
||||
// (Claude with web search, explee.com's company search), by hand or on
|
||||
// a schedule; every run is kept, with what it found and cost.
|
||||
`
|
||||
ALTER TABLE signals ADD COLUMN discover_every_days INTEGER NOT NULL DEFAULT 0; -- 0: only by hand
|
||||
ALTER TABLE signals ADD COLUMN explee_definition TEXT NOT NULL DEFAULT ''; -- what the companies do, for explee.com
|
||||
|
||||
CREATE TABLE discovery_runs (
|
||||
id INTEGER PRIMARY KEY,
|
||||
signal_id INTEGER NOT NULL REFERENCES signals (id) ON DELETE CASCADE,
|
||||
source TEXT NOT NULL, -- claude, explee
|
||||
status TEXT NOT NULL DEFAULT 'running', -- running, done, failed
|
||||
started_at TEXT NOT NULL,
|
||||
finished_at TEXT,
|
||||
found INTEGER NOT NULL DEFAULT 0, -- companies reported
|
||||
added INTEGER NOT NULL DEFAULT 0, -- new prospects
|
||||
existing INTEGER NOT NULL DEFAULT 0, -- already prospects
|
||||
skipped INTEGER NOT NULL DEFAULT 0, -- suppressed, ours, or without a source it read
|
||||
searches INTEGER NOT NULL DEFAULT 0, -- web searches (each billed)
|
||||
error TEXT NOT NULL DEFAULT '',
|
||||
notes TEXT NOT NULL DEFAULT '[]' -- JSON: why companies were skipped
|
||||
);
|
||||
CREATE INDEX discovery_runs_by_signal ON discovery_runs (signal_id, id);
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user