Digg — Printing Press CLI Prerequisites: Install the CLI This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first: 1. Install via the Printing Press installer: 2. Verify: 3. Ensure (or ) is on . If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer): If reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds. When to Use This CLI Use this CLI when an agent…

). The RSC reference\n// system uses this form to point at already-rendered nodes elsewhere\n// in the stream; the rankings page emits them inside `entries` arrays\n// for the main ranking to reference up-/down-movers without\n// duplicating the underlying object.\n//\n// Trade-off: this WILL also match any legitimate string entry whose\n// value starts with '

Digg — Printing Press CLI Prerequisites: Install the CLI This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first: 1. Install via the Printing Press installer: 2. Verify: 3. Ensure (or ) is on . If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer): If reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds. When to Use This CLI Use this CLI when an agent…

. In the company-rankings entries arrays the\n// only string-valued elements observed are RSC references; if a\n// future schema starts emitting other strings beginning with '

Digg — Printing Press CLI Prerequisites: Install the CLI This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first: 1. Install via the Printing Press installer: 2. Verify: 3. Ensure (or ) is on . If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer): If reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds. When to Use This CLI Use this CLI when an agent…

we'd\n// drop them here. The risk is acceptable because the alternative\n// (decoding to confirm reference shape) is heavier and the false\n// positive surface is narrow.\nfunc isRSCReference(r json.RawMessage) bool {\n\ttrimmed := bytes.TrimSpace(r)\n\treturn len(trimmed) >= 2 && trimmed[0] == '\"' && trimmed[1] == '

Digg — Printing Press CLI Prerequisites: Install the CLI This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first: 1. Install via the Printing Press installer: 2. Verify: 3. Ensure (or ) is on . If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer): If reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds. When to Use This CLI Use this CLI when an agent…

\n}\n\n// mergeStats sums two ParseStats (used when an extractor combines\n// multiple sub-arrays, e.g. Movers up + down). Errors are concatenated\n// up to ParseStatsMaxErrors.\nfunc mergeStats(a, b ParseStats) ParseStats {\n\tout := ParseStats{\n\t\tAttempted: a.Attempted + b.Attempted,\n\t\tDecoded: a.Decoded + b.Decoded,\n\t\tSkipped: a.Skipped + b.Skipped,\n\t}\n\tout.Errors = append(out.Errors, a.Errors...)\n\tfor _, e := range b.Errors {\n\t\tif len(out.Errors) >= ParseStatsMaxErrors {\n\t\t\tbreak\n\t\t}\n\t\tout.Errors = append(out.Errors, e)\n\t}\n\treturn out\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":15479,"content_sha256":"5bab3fae63e5b3dcae8d4223851f16ca58f1008bbd95e1179294ea41bd60bad4"},{"filename":"internal/diggparse/roster_1000_test.go","content":"package diggparse\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n)\n\n// loadFixture reads the trimmed /ai/1000 fixture from testdata.\nfunc loadFixture(t *testing.T) []byte {\n\tt.Helper()\n\t// testdata lives at the repo root: ../../testdata/ai-1000-fixture.html\n\t// (parser package is internal/diggparse).\n\tcandidates := []string{\n\t\tfilepath.Join(\"..\", \"..\", \"testdata\", \"ai-1000-fixture.html\"),\n\t\tfilepath.Join(\"testdata\", \"ai-1000-fixture.html\"),\n\t}\n\tfor _, p := range candidates {\n\t\tif data, err := os.ReadFile(p); err == nil {\n\t\t\treturn data\n\t\t}\n\t}\n\tt.Fatalf(\"ai-1000-fixture.html not found; tried: %v\", candidates)\n\treturn nil\n}\n\nfunc TestParseRoster1000_FixtureReturnsTrimmedRoster(t *testing.T) {\n\thtml := loadFixture(t)\n\tauthors, err := ParseRoster1000(html)\n\tif err != nil {\n\t\tt.Fatalf(\"ParseRoster1000: %v\", err)\n\t}\n\t// Trimmed fixture should have at least 30 records — the trim keeps a\n\t// representative subset (~46 picks) but allow margin in case the\n\t// fixture is regenerated with fewer slots.\n\tif len(authors) \u003c 30 {\n\t\tt.Fatalf(\"got %d authors, want >= 30\", len(authors))\n\t}\n\t// Every record has a non-empty username and a positive rank.\n\tfor _, a := range authors {\n\t\tif a.Username == \"\" {\n\t\t\tt.Errorf(\"rank %d has empty username\", a.Rank)\n\t\t}\n\t\tif a.Rank \u003c= 0 {\n\t\t\tt.Errorf(\"@%s has non-positive rank %d\", a.Username, a.Rank)\n\t\t}\n\t}\n\t// Spot-check rank 1 is sama (matches live snapshot at fixture-capture time).\n\tvar sama *Roster1000Author\n\tfor i := range authors {\n\t\tif authors[i].Username == \"sama\" {\n\t\t\tsama = &authors[i]\n\t\t\tbreak\n\t\t}\n\t}\n\tif sama == nil {\n\t\tt.Fatal(\"expected fixture to contain sama\")\n\t}\n\tif sama.Rank != 1 {\n\t\tt.Errorf(\"sama rank = %d, want 1\", sama.Rank)\n\t}\n\tif sama.Category == \"\" {\n\t\tt.Errorf(\"sama category empty\")\n\t}\n}\n\nfunc TestParseRoster1000_PreviousRankNullableNeverMissing(t *testing.T) {\n\thtml := loadFixture(t)\n\tauthors, err := ParseRoster1000(html)\n\tif err != nil {\n\t\tt.Fatalf(\"ParseRoster1000: %v\", err)\n\t}\n\t// Confirm the fixture contains BOTH a record with previousRank=null and\n\t// at least one with a non-null value — otherwise the test would pass\n\t// vacuously.\n\tsawNull, sawInt := false, false\n\tfor _, a := range authors {\n\t\tif a.PreviousRank == nil {\n\t\t\tsawNull = true\n\t\t} else {\n\t\t\tsawInt = true\n\t\t}\n\t}\n\tif !sawNull {\n\t\tt.Error(\"expected at least one record with previousRank=null in fixture\")\n\t}\n\tif !sawInt {\n\t\tt.Error(\"expected at least one record with a non-null previousRank in fixture\")\n\t}\n\t// The schema decoder represents \"missing key\" and \"null\" identically\n\t// (both produce nil pointer); since the upstream record always emits\n\t// the key, every record has either int or null — no record drops it.\n\t// We assert non-zero records and the null/int split above; nothing more\n\t// to check at the value-level.\n}\n\nfunc TestParseRoster1000_VibeDistributionDecodedAsMap(t *testing.T) {\n\thtml := loadFixture(t)\n\tauthors, err := ParseRoster1000(html)\n\tif err != nil {\n\t\tt.Fatalf(\"ParseRoster1000: %v\", err)\n\t}\n\trequiredKeys := []string{\n\t\t\"troll\", \"banter\", \"hopeful\", \"humorous\", \"teaching\",\n\t\t\"combative\", \"informing\", \"announcing\", \"supportive\",\n\t\t\"provocative\", \"devils_advocate\",\n\t}\n\t// Find any author with a non-empty vibeDistribution and verify shape.\n\tvar probe *Roster1000Author\n\tfor i := range authors {\n\t\tif len(authors[i].VibeDistribution) > 0 {\n\t\t\tprobe = &authors[i]\n\t\t\tbreak\n\t\t}\n\t}\n\tif probe == nil {\n\t\tt.Fatal(\"no author with vibeDistribution; fixture should include some\")\n\t}\n\tfor _, k := range requiredKeys {\n\t\tif _, ok := probe.VibeDistribution[k]; !ok {\n\t\t\tt.Errorf(\"@%s vibeDistribution missing key %q\", probe.Username, k)\n\t\t}\n\t}\n}\n\nfunc TestParseRoster1000_LogangrahamFieldsPopulated(t *testing.T) {\n\thtml := loadFixture(t)\n\tauthors, err := ParseRoster1000(html)\n\tif err != nil {\n\t\tt.Fatalf(\"ParseRoster1000: %v\", err)\n\t}\n\tvar lg *Roster1000Author\n\tfor i := range authors {\n\t\tif authors[i].Username == \"logangraham\" {\n\t\t\tlg = &authors[i]\n\t\t\tbreak\n\t\t}\n\t}\n\tif lg == nil {\n\t\tt.Fatal(\"fixture should contain logangraham (rank 991)\")\n\t}\n\tif lg.Rank != 991 {\n\t\tt.Errorf(\"logangraham rank = %d, want 991\", lg.Rank)\n\t}\n\tif !strings.Contains(strings.ToLower(lg.Bio), \"frontier red team\") {\n\t\tt.Errorf(\"logangraham bio missing 'frontier red team' substring; got %q\", lg.Bio)\n\t}\n\tif lg.Category != \"AI Safety\" {\n\t\tt.Errorf(\"logangraham category = %q, want \\\"AI Safety\\\"\", lg.Category)\n\t}\n}\n\nfunc TestExtractRoster1000Authors_MalformedChunkIsToleratedNotPanic(t *testing.T) {\n\t// Inject a half-formed object alongside one valid one. The valid record\n\t// must still come through; the malformed slice must not panic. The\n\t// scanObjectsContaining helper already requires balanced braces, so a\n\t// mid-string truncation gets dropped earlier — the way to surface the\n\t// \"malformed JSON inside a balanced object\" path is to keep braces\n\t// balanced but corrupt the JSON syntax.\n\tdecoded := `{\"target_x_id\":\"1\",\"rank\":1,\"username\":\"alice\"}` + // valid\n\t\t`{\"target_x_id\":\"2\",\"rank\":2,\"username\":\"bob\",\"score\":not_a_number}` + // malformed\n\t\t`{\"target_x_id\":\"3\",\"rank\":3,\"username\":\"carol\"}` // valid\n\tauthors, err := ExtractRoster1000Authors(decoded)\n\tif err == nil {\n\t\tt.Error(\"expected an error wrapping the malformed chunk index\")\n\t}\n\tgotUsers := make(map[string]bool)\n\tfor _, a := range authors {\n\t\tgotUsers[a.Username] = true\n\t}\n\tif !gotUsers[\"alice\"] || !gotUsers[\"carol\"] {\n\t\tt.Errorf(\"valid records dropped: got %v\", gotUsers)\n\t}\n\tif gotUsers[\"bob\"] {\n\t\tt.Errorf(\"malformed bob record should not have decoded\")\n\t}\n}\n\nfunc TestParseRoster1000_LiveURL(t *testing.T) {\n\tif os.Getenv(\"DIGG_LIVE_TESTS\") != \"1\" {\n\t\tt.Skip(\"set DIGG_LIVE_TESTS=1 to run live /ai/1000 fetch\")\n\t}\n\tresp, err := http.Get(\"https://di.gg/ai/1000\")\n\tif err != nil {\n\t\tt.Fatalf(\"live fetch: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != 200 {\n\t\tt.Fatalf(\"live fetch status %d\", resp.StatusCode)\n\t}\n\tbuf := make([]byte, 4*1024*1024)\n\tn, _ := resp.Body.Read(buf)\n\tbody := buf[:n]\n\tfor {\n\t\tmore := make([]byte, 4*1024*1024)\n\t\tm, _ := resp.Body.Read(more)\n\t\tif m == 0 {\n\t\t\tbreak\n\t\t}\n\t\tbody = append(body, more[:m]...)\n\t}\n\tauthors, err := ParseRoster1000(body)\n\tif err != nil && len(authors) == 0 {\n\t\tt.Fatalf(\"live parse: %v\", err)\n\t}\n\tif len(authors) \u003c 990 {\n\t\tt.Errorf(\"live parse got %d authors, want >= 990\", len(authors))\n\t}\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":6312,"content_sha256":"8850c4be9e1214e97f40af819658e4c280c02390ef08873a155cf0b766bceca2"},{"filename":"internal/diggparse/roster_1000.go","content":"// Roster1000 parser: extracts the structured AI 1000 author records from\n// the /ai/1000 page's RSC payload.\n//\n// The /ai/1000 page is a Next.js 15 SPA. The roster — every ranked\n// author, with rank/score/category/bio/vibeDistribution — ships embedded\n// in one of the page's self.__next_f.push([1, \"...\"]) calls as an\n// `entries` array shaped like:\n//\n//\t{\"entries\":[{\"rank\":1,\"target_x_id\":\"1605\",\"username\":\"sama\",\n//\t \"display_name\":\"Sam Altman\", ...,\n//\t \"previousRank\":1,\"rankChange\":0,\"categoryRank\":1,\n//\t \"vibeDistribution\":{\"troll\":0,\"banter\":3.1,...},\n//\t \"vibeTweetCount\":200},{\"rank\":2,...}], \"maxScore\":...}\n//\n// We reuse the existing DecodeRSC stream walker, scan for objects\n// containing the `target_x_id` key (the most distinctive marker; clusters\n// don't have it), and JSON-decode each.\n//\n// Tolerances:\n// - previousRank and rankChange are commonly null (newly-listed accounts);\n// we keep the JSON null distinction by typing them as *int.\n// - githubUrl is null for most entries; *string.\n// - vibeDistribution is decoded into a map[string]float64 so future keys\n// don't break the parser.\n// - Malformed object substrings are skipped and reported as a partial\n// error wrapping the bad index, never panicked.\npackage diggparse\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n)\n\n// Roster1000Author is one entry from /ai/1000.\ntype Roster1000Author struct {\n\tRank int `json:\"rank\"`\n\tTargetXID string `json:\"target_x_id,omitempty\"`\n\tFollowedByCount int `json:\"followed_by_count\"`\n\tScore float64 `json:\"score\"`\n\tUsername string `json:\"username\"`\n\tDisplayName string `json:\"display_name,omitempty\"`\n\tProfileImageURL string `json:\"profile_image_url,omitempty\"`\n\tFollowersCount int `json:\"followers_count\"`\n\tBio string `json:\"bio,omitempty\"`\n\tCategory string `json:\"category,omitempty\"`\n\tCategoryConfidence float64 `json:\"categoryConfidence,omitempty\"`\n\tGithubURL *string `json:\"githubUrl\"`\n\tPreviousRank *int `json:\"previousRank\"`\n\tRankChange *int `json:\"rankChange\"`\n\tCategoryRank int `json:\"categoryRank,omitempty\"`\n\tVibeDistribution map[string]float64 `json:\"vibeDistribution,omitempty\"`\n\tVibeTweetCount int `json:\"vibeTweetCount,omitempty\"`\n\n\t// RawJSON keeps the original record substring so callers that need a\n\t// field we didn't surface can decode it themselves. Not exported as\n\t// JSON; lives solely for round-trip access.\n\tRawJSON json.RawMessage `json:\"-\"`\n}\n\n// ExtractRoster1000Authors walks the decoded RSC stream and returns every\n// distinct author record found. Authors are deduplicated by username\n// (lowercased) — earlier occurrences win. Returns the slice and, when at\n// least one chunk failed to decode, an error wrapping the bad chunk\n// indexes; valid records are still returned alongside the error so\n// callers can tolerate partial parses.\nfunc ExtractRoster1000Authors(decoded string) ([]Roster1000Author, error) {\n\tobjs := scanObjectsContaining(decoded, `\"target_x_id\":`)\n\tout := make([]Roster1000Author, 0, len(objs))\n\tseen := make(map[string]bool, len(objs))\n\tvar badIdxs []int\n\tfor i, raw := range objs {\n\t\tvar a Roster1000Author\n\t\tif err := json.Unmarshal(raw, &a); err != nil {\n\t\t\tbadIdxs = append(badIdxs, i)\n\t\t\tcontinue\n\t\t}\n\t\tif a.Username == \"\" || a.Rank \u003c= 0 {\n\t\t\t// Object had target_x_id but isn't a roster entry (defensive —\n\t\t\t// a future schema may carry the field elsewhere).\n\t\t\tcontinue\n\t\t}\n\t\tkey := strings.ToLower(a.Username)\n\t\tif seen[key] {\n\t\t\tcontinue\n\t\t}\n\t\tseen[key] = true\n\t\ta.RawJSON = append(a.RawJSON[:0:0], raw...)\n\t\tout = append(out, a)\n\t}\n\tif len(badIdxs) > 0 {\n\t\treturn out, fmt.Errorf(\"roster /ai/1000: %d malformed RSC chunk(s) at indexes %v\", len(badIdxs), badIdxs)\n\t}\n\treturn out, nil\n}\n\n// ParseRoster1000 is the convenience entry for the /ai/1000 page: decode\n// RSC, extract author records, return them. If decoded RSC is empty or\n// no records are found, returns a typed error so callers can distinguish\n// \"page changed shape\" from a genuine empty roster.\nfunc ParseRoster1000(html []byte) ([]Roster1000Author, error) {\n\tdecoded := DecodeRSC(html)\n\tif decoded == \"\" {\n\t\treturn nil, fmt.Errorf(\"no RSC pushes found in /ai/1000 HTML (%d bytes); page shape may have changed\", len(html))\n\t}\n\tauthors, err := ExtractRoster1000Authors(decoded)\n\tif len(authors) == 0 {\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"/ai/1000 parse produced 0 authors: %w\", err)\n\t\t}\n\t\treturn nil, errors.New(\"/ai/1000 parse produced 0 authors; page shape may have changed\")\n\t}\n\treturn authors, err\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":4836,"content_sha256":"8d520c99ee45a2fa2c3100503548e579a282ac5bef9d5a207e77ba3ad94291cf"},{"filename":"internal/diggstore/store_test.go","content":"package diggstore\n\nimport (\n\t\"database/sql\"\n\t\"path/filepath\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/internal/diggparse\"\n\n\t_ \"modernc.org/sqlite\"\n)\n\nfunc openTempDB(t *testing.T) *sql.DB {\n\tt.Helper()\n\tdir := t.TempDir()\n\tdb, err := sql.Open(\"sqlite\", filepath.Join(dir, \"test.db\"))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tt.Cleanup(func() { db.Close() })\n\tif err := EnsureSchema(db); err != nil {\n\t\tt.Fatal(err)\n\t}\n\treturn db\n}\n\nfunc TestEnsureSchemaIsIdempotent(t *testing.T) {\n\tdb := openTempDB(t)\n\tif err := EnsureSchema(db); err != nil {\n\t\tt.Errorf(\"second EnsureSchema call failed: %v\", err)\n\t}\n\t// Confirm the cluster table is in place.\n\tvar n int\n\tif err := db.QueryRow(`SELECT COUNT(*) FROM digg_clusters`).Scan(&n); err != nil {\n\t\tt.Fatalf(\"digg_clusters not queryable: %v\", err)\n\t}\n\tif n != 0 {\n\t\tt.Errorf(\"fresh DB should have zero clusters; got %d\", n)\n\t}\n}\n\nfunc TestUpsertClusterRoundTrip(t *testing.T) {\n\tdb := openTempDB(t)\n\tnow := time.Date(2026, 5, 9, 12, 0, 0, 0, time.UTC)\n\tc := diggparse.Cluster{\n\t\tClusterID: \"c-1\",\n\t\tClusterURLID: \"abcd1234\",\n\t\tLabel: \"hello world\",\n\t\tTLDR: \"a tldr\",\n\t\tCurrentRank: 3,\n\t\tDelta: 2,\n\t\tAuthors: []diggparse.ClusterAuthor{\n\t\t\t{Username: \"alice\", DisplayName: \"Alice\", PostType: \"quote\", PostXID: \"x1\"},\n\t\t},\n\t}\n\tif err := UpsertCluster(db, c, now); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tvar rank int\n\tvar label, urlID string\n\tif err := db.QueryRow(`SELECT cluster_url_id, label, current_rank FROM digg_clusters WHERE cluster_id = ?`, c.ClusterID).Scan(&urlID, &label, &rank); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif urlID != \"abcd1234\" || label != \"hello world\" || rank != 3 {\n\t\tt.Errorf(\"cluster round-trip mismatch: urlID=%q label=%q rank=%d\", urlID, label, rank)\n\t}\n\t// Author row\n\tvar username string\n\tif err := db.QueryRow(`SELECT username FROM digg_authors WHERE username = ?`, \"alice\").Scan(&username); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif username != \"alice\" {\n\t\tt.Errorf(\"author row not written\")\n\t}\n\t// Membership row\n\tvar postType string\n\tif err := db.QueryRow(`SELECT post_type FROM digg_cluster_authors WHERE cluster_id = ? AND username = ?`, c.ClusterID, \"alice\").Scan(&postType); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif postType != \"quote\" {\n\t\tt.Errorf(\"membership row not written; got post_type=%q\", postType)\n\t}\n\t// Snapshot row\n\tvar snapRank int\n\tif err := db.QueryRow(`SELECT current_rank FROM digg_snapshots WHERE cluster_id = ?`, c.ClusterID).Scan(&snapRank); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif snapRank != 3 {\n\t\tt.Errorf(\"snapshot rank mismatch: got %d\", snapRank)\n\t}\n}\n\nfunc TestUpsertEvent(t *testing.T) {\n\tdb := openTempDB(t)\n\tnow := time.Date(2026, 5, 9, 12, 0, 0, 0, time.UTC)\n\te := diggparse.Event{\n\t\tID: \"e-1\",\n\t\tType: \"fast_climb\",\n\t\tClusterID: \"c-1\",\n\t\tLabel: \"Fast Climber\",\n\t\tDelta: 9,\n\t\tCurrentRank: 4,\n\t\tPreviousRank: 13,\n\t\tAt: \"2026-05-09T11:00:00Z\",\n\t}\n\tif err := UpsertEvent(db, e, now); err != nil {\n\t\tt.Fatal(err)\n\t}\n\t// Idempotent: second insert is a no-op.\n\tif err := UpsertEvent(db, e, now); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tvar n int\n\tif err := db.QueryRow(`SELECT COUNT(*) FROM digg_events WHERE id = ?`, e.ID).Scan(&n); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif n != 1 {\n\t\tt.Errorf(\"expected exactly one event row; got %d\", n)\n\t}\n\tvar typ string\n\tvar delta int\n\tif err := db.QueryRow(`SELECT type, COALESCE(delta,0) FROM digg_events WHERE id = ?`, e.ID).Scan(&typ, &delta); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif typ != \"fast_climb\" || delta != 9 {\n\t\tt.Errorf(\"event row mismatch: type=%q delta=%d\", typ, delta)\n\t}\n}\n\nfunc intp(v int) *int { return &v }\n\nfunc TestEnsureSchemaAddsRosterColumnsToOldDB(t *testing.T) {\n\t// Simulate an \"old schema\" database: create digg_authors with the pre-\n\t// roster column set, then run EnsureSchema and confirm the migration\n\t// added every roster column. The matching index check confirms the\n\t// migration helper ran end-to-end.\n\tdir := t.TempDir()\n\tdb, err := sql.Open(\"sqlite\", filepath.Join(dir, \"old.db\"))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tt.Cleanup(func() { db.Close() })\n\tif _, err := db.Exec(`CREATE TABLE digg_authors (\n\t\tusername TEXT PRIMARY KEY,\n\t\tdisplay_name TEXT,\n\t\tx_id TEXT,\n\t\tavatar_url TEXT,\n\t\tinfluence REAL,\n\t\tpodist REAL,\n\t\tcontributed_count INTEGER DEFAULT 0,\n\t\tlast_seen_at TEXT\n\t)`); err != nil {\n\t\tt.Fatal(err)\n\t}\n\t// Seed an existing row so we know migration preserves data.\n\tif _, err := db.Exec(`INSERT INTO digg_authors (username, display_name, contributed_count, last_seen_at)\n\t\tVALUES ('legacy_alice', 'Legacy Alice', 7, '2026-04-01T00:00:00Z')`); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif err := EnsureSchema(db); err != nil {\n\t\tt.Fatalf(\"EnsureSchema migration: %v\", err)\n\t}\n\n\t// Every roster column we care about must now exist.\n\trows, err := db.Query(`PRAGMA table_info(digg_authors)`)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer rows.Close()\n\thave := map[string]bool{}\n\tfor rows.Next() {\n\t\tvar cid int\n\t\tvar name, typ string\n\t\tvar notnull, pk int\n\t\tvar dflt sql.NullString\n\t\tif err := rows.Scan(&cid, &name, &typ, ¬null, &dflt, &pk); err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t\thave[name] = true\n\t}\n\tfor _, want := range []string{\n\t\t\"rank\", \"previous_rank\", \"rank_change\", \"score\",\n\t\t\"category\", \"category_rank\", \"category_confidence\",\n\t\t\"followers_count\", \"followed_by_count\",\n\t\t\"bio\", \"github_url\",\n\t\t\"vibe_distribution_json\", \"vibe_tweet_count\",\n\t\t\"profile_image_url\",\n\t} {\n\t\tif !have[want] {\n\t\t\tt.Errorf(\"expected migration to add column %q\", want)\n\t\t}\n\t}\n\n\t// Existing row preserved.\n\tvar dn string\n\tvar cc int\n\tif err := db.QueryRow(`SELECT display_name, contributed_count FROM digg_authors WHERE username = 'legacy_alice'`).Scan(&dn, &cc); err != nil {\n\t\tt.Fatalf(\"legacy row dropped: %v\", err)\n\t}\n\tif dn != \"Legacy Alice\" || cc != 7 {\n\t\tt.Errorf(\"legacy row mutated: dn=%q cc=%d\", dn, cc)\n\t}\n\n\t// UpsertRoster1000 cleanly inserts after migration.\n\tnow := time.Date(2026, 5, 9, 12, 0, 0, 0, time.UTC)\n\trosterIn := []diggparse.Roster1000Author{\n\t\t{\n\t\t\tRank: 991, Username: \"logangraham\", DisplayName: \"Logan Graham\",\n\t\t\tBio: \"Head of the Frontier Red Team @anthropicai\",\n\t\t\tCategory: \"AI Safety\", CategoryRank: 7,\n\t\t\tFollowersCount: 12345, FollowedByCount: 88,\n\t\t\tPreviousRank: nil, RankChange: nil,\n\t\t\tGithubURL: nil,\n\t\t\tVibeDistribution: map[string]float64{\n\t\t\t\t\"troll\": 0.1, \"informing\": 12.3, \"teaching\": 5.0,\n\t\t\t},\n\t\t\tVibeTweetCount: 200,\n\t\t\tScore: 1.23e-6,\n\t\t},\n\t}\n\twritten, err := UpsertRoster1000(db, rosterIn, now)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif written != 1 {\n\t\tt.Errorf(\"UpsertRoster1000 wrote %d, want 1\", written)\n\t}\n\n\tvar rank, catRank int\n\tvar bio, category string\n\tif err := db.QueryRow(`SELECT rank, category_rank, bio, category FROM digg_authors WHERE username = 'logangraham'`).Scan(&rank, &catRank, &bio, &category); err != nil {\n\t\tt.Fatalf(\"roster row not written: %v\", err)\n\t}\n\tif rank != 991 || catRank != 7 || category != \"AI Safety\" {\n\t\tt.Errorf(\"roster fields wrong: rank=%d catRank=%d category=%q\", rank, catRank, category)\n\t}\n\tif !contains(bio, \"Frontier Red Team\") {\n\t\tt.Errorf(\"bio not stored: %q\", bio)\n\t}\n}\n\nfunc TestUpsertRoster1000_TwiceUpdatesNoDup(t *testing.T) {\n\tdb := openTempDB(t)\n\tt1 := time.Date(2026, 5, 9, 12, 0, 0, 0, time.UTC)\n\tt2 := time.Date(2026, 5, 10, 12, 0, 0, 0, time.UTC)\n\tfirst := []diggparse.Roster1000Author{\n\t\t{\n\t\t\tRank: 200, Username: \"alice\", DisplayName: \"Alice\", Score: 1.0,\n\t\t\tPreviousRank: intp(210), RankChange: intp(10),\n\t\t\tCategory: \"Researcher\",\n\t\t},\n\t}\n\tsecond := []diggparse.Roster1000Author{\n\t\t{\n\t\t\tRank: 195, Username: \"alice\", DisplayName: \"Alice (renamed)\", Score: 1.5,\n\t\t\tPreviousRank: intp(200), RankChange: intp(5),\n\t\t\tCategory: \"Researcher\",\n\t\t},\n\t}\n\tif _, err := UpsertRoster1000(db, first, t1); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif _, err := UpsertRoster1000(db, second, t2); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tvar n int\n\tif err := db.QueryRow(`SELECT COUNT(*) FROM digg_authors WHERE username = 'alice'`).Scan(&n); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif n != 1 {\n\t\tt.Errorf(\"expected exactly one row for alice; got %d\", n)\n\t}\n\tvar rank, change int\n\tvar lastSeen string\n\tif err := db.QueryRow(`SELECT rank, rank_change, last_seen_at FROM digg_authors WHERE username = 'alice'`).Scan(&rank, &change, &lastSeen); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif rank != 195 || change != 5 {\n\t\tt.Errorf(\"upsert did not overwrite rank/change; got rank=%d change=%d\", rank, change)\n\t}\n\tif !contains(lastSeen, \"2026-05-10\") {\n\t\tt.Errorf(\"last_seen_at should reflect t2; got %q\", lastSeen)\n\t}\n}\n\nfunc TestUpsertRoster1000_RollbackOnFTSFailure(t *testing.T) {\n\t// Verify the whole roster upsert is atomic: if the FTS write fails\n\t// mid-loop, the main digg_authors table must roll back too so\n\t// digg_authors and digg_authors_fts can't drift out of sync.\n\t//\n\t// To force a failure, drop the digg_authors_fts table after schema\n\t// init. The first author's main INSERT will succeed inside the\n\t// transaction; the subsequent FTS DELETE will fail with \"no such\n\t// table\"; the transaction rolls back; digg_authors must be empty.\n\tdb := openTempDB(t)\n\tif _, err := db.Exec(`DROP TABLE digg_authors_fts`); err != nil {\n\t\tt.Fatalf(\"dropping FTS table: %v\", err)\n\t}\n\n\tnow := time.Date(2026, 5, 9, 12, 0, 0, 0, time.UTC)\n\tin := []diggparse.Roster1000Author{\n\t\t{Rank: 5, Username: \"alice\", DisplayName: \"Alice\", Score: 1.0, Category: \"Researcher\"},\n\t\t{Rank: 6, Username: \"bob\", DisplayName: \"Bob\", Score: 0.9, Category: \"Founder\"},\n\t}\n\twritten, err := UpsertRoster1000(db, in, now)\n\tif err == nil {\n\t\tt.Fatal(\"expected UpsertRoster1000 to fail because the FTS table is gone\")\n\t}\n\tif written != 0 {\n\t\tt.Errorf(\"on rollback written should be 0; got %d\", written)\n\t}\n\t// Main table must NOT contain partial rows from before the failure.\n\tvar n int\n\tif err := db.QueryRow(`SELECT COUNT(*) FROM digg_authors`).Scan(&n); err != nil {\n\t\tt.Fatalf(\"counting digg_authors: %v\", err)\n\t}\n\tif n != 0 {\n\t\tt.Errorf(\"rollback failed: digg_authors has %d rows, want 0 (transaction should have undone the main INSERT)\", n)\n\t}\n}\n\nfunc TestUpsertRoster1000_BioQueryableViaFTS5(t *testing.T) {\n\tdb := openTempDB(t)\n\tnow := time.Date(2026, 5, 9, 12, 0, 0, 0, time.UTC)\n\tgh := \"https://github.com/logangraham\"\n\tin := []diggparse.Roster1000Author{\n\t\t{\n\t\t\tRank: 991, Username: \"logangraham\", DisplayName: \"Logan Graham\",\n\t\t\tBio: \"Head of the Frontier Red Team @anthropicai. Make things radically good.\",\n\t\t\tCategory: \"AI Safety\", CategoryRank: 7,\n\t\t\tFollowersCount: 12345,\n\t\t\tGithubURL: &gh,\n\t\t},\n\t\t{\n\t\t\tRank: 1, Username: \"sama\", DisplayName: \"Sam Altman\",\n\t\t\tBio: \"AI is cool i guess\", Category: \"Founder\", CategoryRank: 1,\n\t\t\tFollowersCount: 4773236,\n\t\t},\n\t}\n\tif _, err := UpsertRoster1000(db, in, now); err != nil {\n\t\tt.Fatal(err)\n\t}\n\trows, err := db.Query(`\n\t\tSELECT username FROM digg_authors_fts WHERE digg_authors_fts MATCH ?\n\t`, `\"frontier red team\"`)\n\tif err != nil {\n\t\tt.Fatalf(\"fts query: %v\", err)\n\t}\n\tdefer rows.Close()\n\tvar got []string\n\tfor rows.Next() {\n\t\tvar u string\n\t\tif err := rows.Scan(&u); err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t\tgot = append(got, u)\n\t}\n\tif len(got) != 1 || got[0] != \"logangraham\" {\n\t\tt.Errorf(\"FTS bio search returned %v, want [logangraham]\", got)\n\t}\n}\n\nfunc contains(haystack, needle string) bool {\n\treturn len(haystack) >= len(needle) && (haystack == needle ||\n\t\t(len(haystack) > 0 && (indexOf(haystack, needle) >= 0)))\n}\n\n// indexOf is a tiny strings.Index to avoid pulling strings in.\nfunc indexOf(s, sub string) int {\n\tif len(sub) == 0 {\n\t\treturn 0\n\t}\n\tfor i := 0; i+len(sub) \u003c= len(s); i++ {\n\t\tif s[i:i+len(sub)] == sub {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}\n\nfunc TestUpsertClusterPosts_RoundTrip(t *testing.T) {\n\tdb := openTempDB(t)\n\t// Use real wall-clock now so the TTL math reflects the live\n\t// time.Since(fetchedAt) check the production reader uses.\n\tnow := time.Now().UTC().Truncate(time.Second)\n\tbody := \"hmm\"\n\tposts := []diggparse.ClusterPost{\n\t\t{\n\t\t\tPostXID: \"1111\",\n\t\t\tPostType: \"tweet\",\n\t\t\tPostedAt: \"2026-05-09T08:02:21+00:00\",\n\t\t\tAuthor: diggparse.ClusterPostAuthor{\n\t\t\t\tUsername: \"tszzl\", DisplayName: \"roon\",\n\t\t\t\tCategory: \"Researcher\", Rank: 32,\n\t\t\t},\n\t\t\tXURL: \"https://x.com/tszzl/status/1111\",\n\t\t\tBody: &body,\n\t\t\tBodyLoaded: true,\n\t\t\tMediaURLs: []string{\"https://pbs.twimg.com/media/AAA.jpg\"},\n\t\t},\n\t}\n\tif err := UpsertClusterPosts(db, \"65idu2x5\", posts, now); err != nil {\n\t\tt.Fatalf(\"UpsertClusterPosts: %v\", err)\n\t}\n\tgot, ok, fetchedAt, err := GetClusterPosts(db, \"65idu2x5\", time.Hour)\n\tif err != nil {\n\t\tt.Fatalf(\"GetClusterPosts: %v\", err)\n\t}\n\tif !ok {\n\t\tt.Fatal(\"expected cache hit, got miss\")\n\t}\n\tif !fetchedAt.Equal(now) {\n\t\tt.Errorf(\"fetched_at round-trip mismatch: got %v, want %v\", fetchedAt, now)\n\t}\n\tif len(got) != 1 || got[0].PostXID != \"1111\" {\n\t\tt.Errorf(\"round-trip mismatch: got %+v\", got)\n\t}\n\tif got[0].Body == nil || *got[0].Body != \"hmm\" {\n\t\tt.Errorf(\"body round-trip lost: got %v\", got[0].Body)\n\t}\n\tif len(got[0].MediaURLs) != 1 {\n\t\tt.Errorf(\"media URL round-trip mismatch: %v\", got[0].MediaURLs)\n\t}\n}\n\nfunc TestUpsertClusterPosts_TTLMiss(t *testing.T) {\n\tdb := openTempDB(t)\n\tstale := time.Now().Add(-2 * time.Hour) // older than 1h TTL\n\tposts := []diggparse.ClusterPost{\n\t\t{\n\t\t\tPostXID: \"1\", PostType: \"tweet\",\n\t\t\tAuthor: diggparse.ClusterPostAuthor{Username: \"alice\"},\n\t\t},\n\t}\n\tif err := UpsertClusterPosts(db, \"abc\", posts, stale); err != nil {\n\t\tt.Fatalf(\"UpsertClusterPosts: %v\", err)\n\t}\n\t// 1h TTL: a row from 2h ago should miss.\n\tgot, ok, _, err := GetClusterPosts(db, \"abc\", time.Hour)\n\tif err != nil {\n\t\tt.Fatalf(\"GetClusterPosts: %v\", err)\n\t}\n\tif ok {\n\t\tt.Errorf(\"expected TTL miss for stale row; got hit with %d posts\", len(got))\n\t}\n\t// But a 365d TTL should hit (used by the live-fail-with-stale-cache fallback).\n\t_, ok2, _, err := GetClusterPosts(db, \"abc\", 365*24*time.Hour)\n\tif err != nil {\n\t\tt.Fatalf(\"GetClusterPosts (long TTL): %v\", err)\n\t}\n\tif !ok2 {\n\t\tt.Error(\"long TTL should still find the cached row\")\n\t}\n}\n\nfunc TestUpsertClusterPosts_OverwriteSameKey(t *testing.T) {\n\tdb := openTempDB(t)\n\t// Anchor on real wall-clock so TTL math reflects production.\n\tt1 := time.Now().UTC().Add(-30 * time.Minute).Truncate(time.Second)\n\tt2 := t1.Add(20 * time.Minute)\n\tbody1, body2 := \"first\", \"second\"\n\tv1 := []diggparse.ClusterPost{\n\t\t{PostXID: \"1\", Author: diggparse.ClusterPostAuthor{Username: \"a\"}, Body: &body1, MediaURLs: []string{}},\n\t}\n\tv2 := []diggparse.ClusterPost{\n\t\t{PostXID: \"1\", Author: diggparse.ClusterPostAuthor{Username: \"a\"}, Body: &body2, MediaURLs: []string{}},\n\t\t{PostXID: \"2\", Author: diggparse.ClusterPostAuthor{Username: \"b\"}, MediaURLs: []string{}},\n\t}\n\tif err := UpsertClusterPosts(db, \"k\", v1, t1); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif err := UpsertClusterPosts(db, \"k\", v2, t2); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tgot, ok, fetchedAt, err := GetClusterPosts(db, \"k\", time.Hour)\n\tif err != nil || !ok {\n\t\tt.Fatalf(\"hit failed: ok=%v err=%v\", ok, err)\n\t}\n\tif len(got) != 2 {\n\t\tt.Errorf(\"expected 2 posts after overwrite, got %d\", len(got))\n\t}\n\tif got[0].Body == nil || *got[0].Body != \"second\" {\n\t\tt.Errorf(\"overwrite did not update body; got %v\", got[0].Body)\n\t}\n\tif !fetchedAt.Equal(t2) {\n\t\tt.Errorf(\"fetched_at not refreshed; got %v want %v\", fetchedAt, t2)\n\t}\n}\n\nfunc TestGetClusterPosts_EmptyKeyOrTTLReturnsMiss(t *testing.T) {\n\tdb := openTempDB(t)\n\tif _, ok, _, err := GetClusterPosts(db, \"\", time.Hour); ok || err != nil {\n\t\tt.Errorf(\"empty key should return (miss, nil); got ok=%v err=%v\", ok, err)\n\t}\n\tif _, ok, _, err := GetClusterPosts(db, \"x\", 0); ok || err != nil {\n\t\tt.Errorf(\"zero TTL should return (miss, nil); got ok=%v err=%v\", ok, err)\n\t}\n}\n\nfunc TestRecordReplacementsDropsClustersNotSeen(t *testing.T) {\n\tdb := openTempDB(t)\n\told := time.Date(2026, 5, 9, 11, 0, 0, 0, time.UTC)\n\tnow := time.Date(2026, 5, 9, 12, 0, 0, 0, time.UTC)\n\n\tprev := diggparse.Cluster{ClusterID: \"c-old\", ClusterURLID: \"oldid\", Label: \"Old\", CurrentRank: 5}\n\tstay := diggparse.Cluster{ClusterID: \"c-stay\", ClusterURLID: \"stayid\", Label: \"Stays\", CurrentRank: 6}\n\tif err := UpsertCluster(db, prev, old); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif err := UpsertCluster(db, stay, old); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\t// At \"now\", we observe only c-stay. c-old should be recorded as a replacement.\n\tif err := UpsertCluster(db, stay, now); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tobserved := map[string]bool{\"c-stay\": true}\n\tif err := RecordReplacements(db, observed, now); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tvar rationale string\n\tvar prevRank int\n\tif err := db.QueryRow(`SELECT rationale, previous_rank FROM digg_replacements WHERE cluster_id = ?`, \"c-old\").Scan(&rationale, &prevRank); err != nil {\n\t\tt.Fatalf(\"replacement row not written: %v\", err)\n\t}\n\tif rationale == \"\" {\n\t\tt.Errorf(\"rationale should be populated even when upstream didn't publish one\")\n\t}\n\tif prevRank != 5 {\n\t\tt.Errorf(\"previous_rank should be 5; got %d\", prevRank)\n\t}\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":16863,"content_sha256":"c2fda3d9e5622077925be1a493043b4d4a1f0cf0ef2542e03293b4245f967b1a"},{"filename":"internal/diggstore/store.go","content":"// Package diggstore extends the generated SQLite store with the\n// Digg-AI-specific tables that hold parsed clusters, snapshots,\n// authors, and events.\n//\n// Schema additions live here (rather than in the generated store\n// package) so a regeneration of the printed CLI does not blow them\n// away. EnsureSchema is idempotent and can run on every command.\npackage diggstore\n\nimport (\n\t\"database/sql\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/internal/diggparse\"\n)\n\n// EnsureSchema creates the Digg-specific tables if they don't already\n// exist. Safe to call repeatedly; uses CREATE TABLE IF NOT EXISTS.\nfunc EnsureSchema(db *sql.DB) error {\n\tstmts := []string{\n\t\t`CREATE TABLE IF NOT EXISTS digg_clusters (\n\t\t\tcluster_id TEXT PRIMARY KEY,\n\t\t\tcluster_url_id TEXT,\n\t\t\tlabel TEXT,\n\t\t\ttitle TEXT,\n\t\t\ttldr TEXT,\n\t\t\turl TEXT,\n\t\t\tpermalink TEXT,\n\t\t\ttopic TEXT,\n\t\t\tcurrent_rank INTEGER,\n\t\t\tpeak_rank INTEGER,\n\t\t\tprevious_rank INTEGER,\n\t\t\tdelta INTEGER,\n\t\t\tgravity_score REAL,\n\t\t\tscore_components_json TEXT,\n\t\t\tevidence_json TEXT,\n\t\t\tnumerator_count INTEGER,\n\t\t\tnumerator_label TEXT,\n\t\t\tpercent_above_average REAL,\n\t\t\treplacement_rationale TEXT,\n\t\t\tpos6h REAL, pos12h REAL, pos24h REAL, pos_last REAL,\n\t\t\tbookmarks INTEGER, likes INTEGER, comments INTEGER, replies INTEGER,\n\t\t\tquotes INTEGER, views INTEGER, view_count INTEGER, impressions INTEGER,\n\t\t\tretweets INTEGER, quote_tweets INTEGER,\n\t\t\tsource_title TEXT,\n\t\t\thacker_news_json TEXT,\n\t\t\ttechmeme_json TEXT,\n\t\t\texternal_feeds_json TEXT,\n\t\t\tauthors_json TEXT,\n\t\t\tactivity_at TEXT,\n\t\t\tcomputed_at TEXT,\n\t\t\tfirst_post_at TEXT,\n\t\t\traw_json TEXT,\n\t\t\tfetched_at TEXT NOT NULL,\n\t\t\tlast_seen_at TEXT NOT NULL\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_clusters_rank ON digg_clusters(current_rank)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_clusters_delta ON digg_clusters(delta DESC)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_clusters_url_id ON digg_clusters(cluster_url_id)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_clusters_last_seen ON digg_clusters(last_seen_at)`,\n\n\t\t// Per-snapshot rank/score history. One row per (cluster, fetched_at).\n\t\t`CREATE TABLE IF NOT EXISTS digg_snapshots (\n\t\t\tcluster_id TEXT NOT NULL,\n\t\t\tfetched_at TEXT NOT NULL,\n\t\t\tcurrent_rank INTEGER,\n\t\t\tpeak_rank INTEGER,\n\t\t\tprevious_rank INTEGER,\n\t\t\tdelta INTEGER,\n\t\t\tgravity_score REAL,\n\t\t\tpos6h REAL, pos12h REAL, pos24h REAL,\n\t\t\tlikes INTEGER, views INTEGER, impressions INTEGER,\n\t\t\tPRIMARY KEY (cluster_id, fetched_at)\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_snapshots_at ON digg_snapshots(fetched_at)`,\n\n\t\t// Authors (Digg's tracked AI-news accounts; upstream calls this the /ai/1000 roster).\n\t\t`CREATE TABLE IF NOT EXISTS digg_authors (\n\t\t\tusername TEXT PRIMARY KEY,\n\t\t\tdisplay_name TEXT,\n\t\t\tx_id TEXT,\n\t\t\tavatar_url TEXT,\n\t\t\tinfluence REAL,\n\t\t\tpodist REAL,\n\t\t\tcontributed_count INTEGER DEFAULT 0,\n\t\t\tlast_seen_at TEXT\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_authors_influence ON digg_authors(influence DESC)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_authors_count ON digg_authors(contributed_count DESC)`,\n\n\t\t// Author membership in clusters.\n\t\t`CREATE TABLE IF NOT EXISTS digg_cluster_authors (\n\t\t\tcluster_id TEXT NOT NULL,\n\t\t\tusername TEXT NOT NULL,\n\t\t\tpost_type TEXT,\n\t\t\tpost_x_id TEXT,\n\t\t\tpost_permalink TEXT,\n\t\t\tPRIMARY KEY (cluster_id, username, post_x_id)\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_cluster_authors_user ON digg_cluster_authors(username)`,\n\n\t\t// /api/trending/status events.\n\t\t`CREATE TABLE IF NOT EXISTS digg_events (\n\t\t\tid TEXT PRIMARY KEY,\n\t\t\ttype TEXT NOT NULL,\n\t\t\trun_id TEXT,\n\t\t\tcluster_id TEXT,\n\t\t\tlabel TEXT,\n\t\t\tusername TEXT,\n\t\t\tpost_type TEXT,\n\t\t\tpost_x_id TEXT,\n\t\t\tpermalink TEXT,\n\t\t\tdelta INTEGER,\n\t\t\tcurrent_rank INTEGER,\n\t\t\tprevious_rank INTEGER,\n\t\t\tcount INTEGER,\n\t\t\ttotal INTEGER,\n\t\t\toriginal_posts INTEGER,\n\t\t\tretweets INTEGER,\n\t\t\tquote_tweets INTEGER,\n\t\t\treplies INTEGER,\n\t\t\tlinks INTEGER,\n\t\t\tvideos INTEGER,\n\t\t\timages INTEGER,\n\t\t\tembedded_count INTEGER,\n\t\t\ttotal_count INTEGER,\n\t\t\tat TEXT,\n\t\t\tcreated_at TEXT,\n\t\t\tdedupe_key TEXT,\n\t\t\traw_json TEXT,\n\t\t\tfetched_at TEXT NOT NULL\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_events_type_at ON digg_events(type, at DESC)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_events_cluster ON digg_events(cluster_id)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_events_at ON digg_events(at DESC)`,\n\n\t\t// Replacement archaeology — derived during sync.\n\t\t`CREATE TABLE IF NOT EXISTS digg_replacements (\n\t\t\tcluster_id TEXT NOT NULL,\n\t\t\tobserved_at TEXT NOT NULL,\n\t\t\trationale TEXT,\n\t\t\tprevious_rank INTEGER,\n\t\t\tcluster_url_id TEXT,\n\t\t\tlabel TEXT,\n\t\t\tPRIMARY KEY (cluster_id, observed_at)\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_replacements_at ON digg_replacements(observed_at DESC)`,\n\n\t\t// FTS5 over cluster searchable text.\n\t\t`CREATE VIRTUAL TABLE IF NOT EXISTS digg_clusters_fts USING fts5(\n\t\t\tcluster_id UNINDEXED,\n\t\t\tcluster_url_id UNINDEXED,\n\t\t\tlabel,\n\t\t\ttitle,\n\t\t\ttldr,\n\t\t\tsource_title,\n\t\t\ttokenize='porter unicode61'\n\t\t)`,\n\n\t\t// FTS5 over the AI 1000 author bio + display_name. Lets agents\n\t\t// answer \"who works on frontier red teaming?\" against the cached\n\t\t// roster (after a single `authors list` call) without a network\n\t\t// round-trip.\n\t\t`CREATE VIRTUAL TABLE IF NOT EXISTS digg_authors_fts USING fts5(\n\t\t\tusername UNINDEXED,\n\t\t\tdisplay_name,\n\t\t\tbio,\n\t\t\tcategory,\n\t\t\ttokenize='porter unicode61'\n\t\t)`,\n\n\t\t// Per-cluster posts cache. One row per clusterUrlId; the parsed\n\t\t// posts are stored as a JSON-encoded blob so the schema doesn't\n\t\t// have to track the structured-post-plus-DOM-correlation shape\n\t\t// in normalized form. fetched_at is the cache freshness anchor;\n\t\t// `posts \u003cid>` and `story \u003cid>` honor a 1h TTL by default and\n\t\t// can bypass via --no-cache.\n\t\t`CREATE TABLE IF NOT EXISTS digg_cluster_posts (\n\t\t\tcluster_url_id TEXT PRIMARY KEY,\n\t\t\tposts_json TEXT NOT NULL,\n\t\t\tfetched_at TEXT NOT NULL\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_cluster_posts_at ON digg_cluster_posts(fetched_at)`,\n\t}\n\tfor _, q := range stmts {\n\t\tif _, err := db.Exec(q); err != nil {\n\t\t\treturn fmt.Errorf(\"ensuring digg schema: %w (stmt: %s)\", err, firstLine(q))\n\t\t}\n\t}\n\t// Migration: add the rich AI-1000-roster columns to digg_authors. The\n\t// existing schema predates the /ai/1000 ingest; we add columns\n\t// idempotently so older databases keep working.\n\tif err := ensureAuthorsRosterColumns(db); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// ensureAuthorsRosterColumns adds the AI-1000-roster columns to\n// digg_authors if they don't already exist. SQLite has no `ADD COLUMN IF\n// NOT EXISTS`; we read PRAGMA table_info and only run the ALTERs we need.\nfunc ensureAuthorsRosterColumns(db *sql.DB) error {\n\trows, err := db.Query(`PRAGMA table_info(digg_authors)`)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"reading digg_authors columns: %w\", err)\n\t}\n\tdefer rows.Close()\n\thave := map[string]bool{}\n\tfor rows.Next() {\n\t\tvar cid int\n\t\tvar name, typ string\n\t\tvar notnull, pk int\n\t\tvar dflt sql.NullString\n\t\tif err := rows.Scan(&cid, &name, &typ, ¬null, &dflt, &pk); err != nil {\n\t\t\treturn fmt.Errorf(\"scanning digg_authors columns: %w\", err)\n\t\t}\n\t\thave[name] = true\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn err\n\t}\n\twantCols := []struct{ name, ddl string }{\n\t\t{\"rank\", \"INTEGER\"},\n\t\t{\"previous_rank\", \"INTEGER\"},\n\t\t{\"rank_change\", \"INTEGER\"},\n\t\t{\"score\", \"REAL\"},\n\t\t{\"category\", \"TEXT\"},\n\t\t{\"category_rank\", \"INTEGER\"},\n\t\t{\"category_confidence\", \"REAL\"},\n\t\t{\"followers_count\", \"INTEGER\"},\n\t\t{\"followed_by_count\", \"INTEGER\"},\n\t\t{\"bio\", \"TEXT\"},\n\t\t{\"github_url\", \"TEXT\"},\n\t\t{\"vibe_distribution_json\", \"TEXT\"},\n\t\t{\"vibe_tweet_count\", \"INTEGER\"},\n\t\t{\"profile_image_url\", \"TEXT\"},\n\t}\n\tfor _, c := range wantCols {\n\t\tif have[c.name] {\n\t\t\tcontinue\n\t\t}\n\t\tstmt := fmt.Sprintf(`ALTER TABLE digg_authors ADD COLUMN %s %s`, c.name, c.ddl)\n\t\tif _, err := db.Exec(stmt); err != nil {\n\t\t\treturn fmt.Errorf(\"adding column %s: %w\", c.name, err)\n\t\t}\n\t}\n\t// Indexes used by `authors list` ranking + filters.\n\tindexes := []string{\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_authors_rank ON digg_authors(rank)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_authors_rank_change ON digg_authors(rank_change)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_authors_category ON digg_authors(category, category_rank)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_digg_authors_followers ON digg_authors(followers_count DESC)`,\n\t}\n\tfor _, q := range indexes {\n\t\tif _, err := db.Exec(q); err != nil {\n\t\t\treturn fmt.Errorf(\"indexing digg_authors: %w\", err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc firstLine(s string) string {\n\tif i := strings.IndexByte(s, '\\n'); i > 0 {\n\t\treturn s[:i]\n\t}\n\treturn s\n}\n\n// UpsertCluster writes a cluster row. The first time we see a clusterId,\n// fetched_at is set to now. Every write updates last_seen_at.\nfunc UpsertCluster(db *sql.DB, c diggparse.Cluster, fetchedAt time.Time) error {\n\tauthorsJSON, _ := json.Marshal(c.Authors)\n\tscJSON := raw(c.ScoreComponents)\n\tevJSON := raw(c.Evidence)\n\thnJSON := raw(c.HackerNews)\n\ttmJSON := raw(c.Techmeme)\n\textJSON := raw(c.ExternalFeeds)\n\trawJSON := raw(c.RawJSON)\n\tnow := fetchedAt.UTC().Format(time.RFC3339Nano)\n\n\t_, err := db.Exec(`\n\t\tINSERT INTO digg_clusters (\n\t\t\tcluster_id, cluster_url_id, label, title, tldr, url, permalink, topic,\n\t\t\tcurrent_rank, peak_rank, previous_rank, delta, gravity_score,\n\t\t\tscore_components_json, evidence_json,\n\t\t\tnumerator_count, numerator_label, percent_above_average,\n\t\t\treplacement_rationale,\n\t\t\tpos6h, pos12h, pos24h, pos_last,\n\t\t\tbookmarks, likes, comments, replies, quotes, views, view_count, impressions,\n\t\t\tretweets, quote_tweets, source_title,\n\t\t\thacker_news_json, techmeme_json, external_feeds_json,\n\t\t\tauthors_json, activity_at, computed_at, first_post_at,\n\t\t\traw_json, fetched_at, last_seen_at\n\t\t) VALUES (\n\t\t\t?,?,?,?,?,?,?,?,\n\t\t\t?,?,?,?,?,\n\t\t\t?,?,\n\t\t\t?,?,?,\n\t\t\t?,\n\t\t\t?,?,?,?,\n\t\t\t?,?,?,?,?,?,?,?,\n\t\t\t?,?,?,\n\t\t\t?,?,?,\n\t\t\t?,?,?,?,\n\t\t\t?,?,?\n\t\t) ON CONFLICT(cluster_id) DO UPDATE SET\n\t\t\tcluster_url_id=COALESCE(excluded.cluster_url_id, digg_clusters.cluster_url_id),\n\t\t\tlabel=COALESCE(NULLIF(excluded.label,''), digg_clusters.label),\n\t\t\ttitle=COALESCE(NULLIF(excluded.title,''), digg_clusters.title),\n\t\t\ttldr=COALESCE(NULLIF(excluded.tldr,''), digg_clusters.tldr),\n\t\t\turl=COALESCE(NULLIF(excluded.url,''), digg_clusters.url),\n\t\t\tpermalink=COALESCE(NULLIF(excluded.permalink,''), digg_clusters.permalink),\n\t\t\ttopic=COALESCE(NULLIF(excluded.topic,''), digg_clusters.topic),\n\t\t\tcurrent_rank=excluded.current_rank,\n\t\t\tpeak_rank=MAX(IFNULL(digg_clusters.peak_rank, 9999), IFNULL(excluded.peak_rank, 9999)) * (CASE WHEN excluded.peak_rank IS NULL AND digg_clusters.peak_rank IS NULL THEN 0 ELSE 1 END),\n\t\t\tprevious_rank=excluded.previous_rank,\n\t\t\tdelta=excluded.delta,\n\t\t\tgravity_score=excluded.gravity_score,\n\t\t\tscore_components_json=COALESCE(excluded.score_components_json, digg_clusters.score_components_json),\n\t\t\tevidence_json=COALESCE(excluded.evidence_json, digg_clusters.evidence_json),\n\t\t\tnumerator_count=excluded.numerator_count,\n\t\t\tnumerator_label=excluded.numerator_label,\n\t\t\tpercent_above_average=excluded.percent_above_average,\n\t\t\treplacement_rationale=COALESCE(NULLIF(excluded.replacement_rationale,''), digg_clusters.replacement_rationale),\n\t\t\tpos6h=excluded.pos6h,\n\t\t\tpos12h=excluded.pos12h,\n\t\t\tpos24h=excluded.pos24h,\n\t\t\tpos_last=excluded.pos_last,\n\t\t\tbookmarks=excluded.bookmarks,\n\t\t\tlikes=excluded.likes,\n\t\t\tcomments=excluded.comments,\n\t\t\treplies=excluded.replies,\n\t\t\tquotes=excluded.quotes,\n\t\t\tviews=excluded.views,\n\t\t\tview_count=excluded.view_count,\n\t\t\timpressions=excluded.impressions,\n\t\t\tretweets=excluded.retweets,\n\t\t\tquote_tweets=excluded.quote_tweets,\n\t\t\tsource_title=COALESCE(NULLIF(excluded.source_title,''), digg_clusters.source_title),\n\t\t\thacker_news_json=COALESCE(excluded.hacker_news_json, digg_clusters.hacker_news_json),\n\t\t\ttechmeme_json=COALESCE(excluded.techmeme_json, digg_clusters.techmeme_json),\n\t\t\texternal_feeds_json=COALESCE(excluded.external_feeds_json, digg_clusters.external_feeds_json),\n\t\t\tauthors_json=COALESCE(NULLIF(excluded.authors_json,'null'), digg_clusters.authors_json),\n\t\t\tactivity_at=COALESCE(NULLIF(excluded.activity_at,''), digg_clusters.activity_at),\n\t\t\tcomputed_at=COALESCE(NULLIF(excluded.computed_at,''), digg_clusters.computed_at),\n\t\t\tfirst_post_at=COALESCE(NULLIF(excluded.first_post_at,''), digg_clusters.first_post_at),\n\t\t\traw_json=excluded.raw_json,\n\t\t\tlast_seen_at=excluded.last_seen_at\n\t`,\n\t\tc.ClusterID, c.ClusterURLID, c.Label, c.Title, c.TLDR, c.URL, c.Permalink, c.Topic,\n\t\tc.CurrentRank, nullableInt(c.PeakRank), c.PreviousRank, c.Delta, c.GravityScore,\n\t\tscJSON, evJSON,\n\t\tc.NumeratorCount, c.NumeratorLabel, c.PercentAboveAverage,\n\t\tc.ReplacementRationale,\n\t\tc.Pos6h, c.Pos12h, c.Pos24h, c.PosLast,\n\t\tc.Bookmarks, c.Likes, c.Comments, c.Replies, c.Quotes, c.Views, c.ViewCount, c.Impressions,\n\t\tc.Retweets, c.QuoteTweets, c.SourceTitle,\n\t\thnJSON, tmJSON, extJSON,\n\t\tstring(authorsJSON), c.ActivityAt, c.ComputedAt, c.FirstPostAt,\n\t\trawJSON, now, now,\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"upsert cluster %s: %w\", c.ClusterID, err)\n\t}\n\n\t// Snapshot row.\n\tif _, err := db.Exec(`\n\t\tINSERT OR REPLACE INTO digg_snapshots (\n\t\t\tcluster_id, fetched_at, current_rank, peak_rank, previous_rank, delta,\n\t\t\tgravity_score, pos6h, pos12h, pos24h, likes, views, impressions\n\t\t) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\n\t`, c.ClusterID, now, c.CurrentRank, nullableInt(c.PeakRank), c.PreviousRank, c.Delta,\n\t\tc.GravityScore, c.Pos6h, c.Pos12h, c.Pos24h, c.Likes, c.Views, c.Impressions); err != nil {\n\t\treturn fmt.Errorf(\"snapshot %s: %w\", c.ClusterID, err)\n\t}\n\n\t// Authors and membership.\n\tfor _, a := range c.Authors {\n\t\tif a.Username == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tif err := upsertAuthor(db, a, now); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, err := db.Exec(`\n\t\t\tINSERT OR REPLACE INTO digg_cluster_authors\n\t\t\t(cluster_id, username, post_type, post_x_id, post_permalink)\n\t\t\tVALUES (?,?,?,?,?)\n\t\t`, c.ClusterID, a.Username, a.PostType, a.PostXID, a.PostPermalink); err != nil {\n\t\t\treturn fmt.Errorf(\"cluster_author %s/%s: %w\", c.ClusterID, a.Username, err)\n\t\t}\n\t}\n\n\t// FTS row.\n\tif _, err := db.Exec(`DELETE FROM digg_clusters_fts WHERE cluster_id = ?`, c.ClusterID); err != nil {\n\t\treturn fmt.Errorf(\"fts delete: %w\", err)\n\t}\n\tif _, err := db.Exec(`\n\t\tINSERT INTO digg_clusters_fts (cluster_id, cluster_url_id, label, title, tldr, source_title)\n\t\tVALUES (?,?,?,?,?,?)\n\t`, c.ClusterID, c.ClusterURLID, c.Label, c.Title, c.TLDR, c.SourceTitle); err != nil {\n\t\treturn fmt.Errorf(\"fts insert: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc upsertAuthor(db *sql.DB, a diggparse.ClusterAuthor, now string) error {\n\t_, err := db.Exec(`\n\t\tINSERT INTO digg_authors (username, display_name, x_id, avatar_url, influence, podist, contributed_count, last_seen_at)\n\t\tVALUES (?,?,?,?,?,?,1,?)\n\t\tON CONFLICT(username) DO UPDATE SET\n\t\t\tdisplay_name=COALESCE(NULLIF(excluded.display_name,''), digg_authors.display_name),\n\t\t\tx_id=COALESCE(NULLIF(excluded.x_id,''), digg_authors.x_id),\n\t\t\tavatar_url=COALESCE(NULLIF(excluded.avatar_url,''), digg_authors.avatar_url),\n\t\t\tinfluence=CASE WHEN excluded.influence > 0 THEN excluded.influence ELSE digg_authors.influence END,\n\t\t\tpodist=CASE WHEN excluded.podist > 0 THEN excluded.podist ELSE digg_authors.podist END,\n\t\t\tcontributed_count=digg_authors.contributed_count + 1,\n\t\t\tlast_seen_at=excluded.last_seen_at\n\t`, a.Username, a.DisplayName, a.XID, a.AvatarURL, a.Influence, a.Podist, now)\n\treturn err\n}\n\n// UpsertEvent writes one event row from /api/trending/status.events[].\nfunc UpsertEvent(db *sql.DB, e diggparse.Event, fetchedAt time.Time) error {\n\tif e.ID == \"\" {\n\t\treturn nil\n\t}\n\trawJSON := raw(e.RawJSON)\n\tnow := fetchedAt.UTC().Format(time.RFC3339Nano)\n\t_, err := db.Exec(`\n\t\tINSERT INTO digg_events (\n\t\t\tid, type, run_id, cluster_id, label, username, post_type, post_x_id, permalink,\n\t\t\tdelta, current_rank, previous_rank, count, total,\n\t\t\toriginal_posts, retweets, quote_tweets, replies, links, videos, images,\n\t\t\tembedded_count, total_count, at, created_at, dedupe_key, raw_json, fetched_at\n\t\t) VALUES (?,?,?,?,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?,?,?, ?,?,?,?,?,?,?)\n\t\tON CONFLICT(id) DO NOTHING\n\t`,\n\t\te.ID, e.Type, e.RunID, e.ClusterID, e.Label, e.Username, e.PostType, e.PostXID, e.Permalink,\n\t\te.Delta, e.CurrentRank, e.PreviousRank, e.Count, e.Total,\n\t\te.OriginalPosts, e.Retweets, e.QuoteTweets, e.Replies, e.Links, e.Videos, e.Images,\n\t\te.EmbeddedCount, e.TotalCount, e.At, e.CreatedAt, e.DedupeKey, rawJSON, now,\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"upsert event %s: %w\", e.ID, err)\n\t}\n\treturn nil\n}\n\n// RecordReplacements compares the cluster IDs we just observed against\n// the cluster IDs we had in the local store and records a replacement\n// row for any cluster present last sync but missing from the current\n// snapshot. The \"rationale\" is best-effort — Digg only sometimes ships\n// it; otherwise we record a synthetic \"fell out of feed\" rationale.\nfunc RecordReplacements(db *sql.DB, observedClusterIDs map[string]bool, observedAt time.Time) error {\n\tnow := observedAt.UTC().Format(time.RFC3339Nano)\n\trows, err := db.Query(`\n\t\tSELECT cluster_id, cluster_url_id, label, current_rank, replacement_rationale, last_seen_at\n\t\tFROM digg_clusters\n\t\tWHERE last_seen_at \u003c ?\n\t\t AND last_seen_at >= datetime(?, '-2 hours')\n\t`, now, now)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"scanning replacements: %w\", err)\n\t}\n\tdefer rows.Close()\n\n\ttype pending struct {\n\t\tid, urlID, label, rationale string\n\t\trank int\n\t}\n\tvar pendings []pending\n\tfor rows.Next() {\n\t\tvar id, urlID, label, rationale string\n\t\tvar rank sql.NullInt64\n\t\tvar lastSeen string\n\t\tif err := rows.Scan(&id, &urlID, &label, &rank, &rationale, &lastSeen); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif observedClusterIDs[id] {\n\t\t\tcontinue\n\t\t}\n\t\tr := rationale\n\t\tif r == \"\" {\n\t\t\tr = \"fell out of feed (no rationale published)\"\n\t\t}\n\t\tpendings = append(pendings, pending{id: id, urlID: urlID, label: label, rationale: r, rank: int(rank.Int64)})\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn err\n\t}\n\tfor _, p := range pendings {\n\t\tif _, err := db.Exec(`\n\t\t\tINSERT OR IGNORE INTO digg_replacements (cluster_id, observed_at, rationale, previous_rank, cluster_url_id, label)\n\t\t\tVALUES (?,?,?,?,?,?)\n\t\t`, p.id, now, p.rationale, p.rank, p.urlID, p.label); err != nil {\n\t\t\treturn fmt.Errorf(\"record replacement %s: %w\", p.id, err)\n\t\t}\n\t}\n\treturn nil\n}\n\n// PATCH(digg-enhancements): topic-scoped variant of RecordReplacements.\n// The multi-topic sync flag means a single run may cover only a subset of\n// topics. The non-scoped version scans all digg_clusters in the 2-hour\n// window, so a `sync --topics technology` run would falsely mark every\n// recently-seen `ai` cluster as fell-out-of-feed. Scoping by topic IN (...)\n// fixes the cross-topic pollution. Passing an empty slice falls back to the\n// non-scoped behavior so callers that genuinely sync everything still work.\nfunc RecordReplacementsForTopics(db *sql.DB, observedClusterIDs map[string]bool, observedAt time.Time, topics []string) error {\n\tif len(topics) == 0 {\n\t\treturn RecordReplacements(db, observedClusterIDs, observedAt)\n\t}\n\tnow := observedAt.UTC().Format(time.RFC3339Nano)\n\n\tplaceholders := strings.Repeat(\"?,\", len(topics))\n\tplaceholders = strings.TrimSuffix(placeholders, \",\")\n\targs := make([]any, 0, len(topics)+2)\n\targs = append(args, now, now)\n\tfor _, t := range topics {\n\t\targs = append(args, t)\n\t}\n\n\tquery := `\n\t\tSELECT cluster_id, cluster_url_id, label, current_rank, replacement_rationale, last_seen_at\n\t\tFROM digg_clusters\n\t\tWHERE last_seen_at \u003c ?\n\t\t AND last_seen_at >= datetime(?, '-2 hours')\n\t\t AND topic IN (` + placeholders + `)\n\t`\n\trows, err := db.Query(query, args...)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"scanning replacements: %w\", err)\n\t}\n\tdefer rows.Close()\n\n\ttype pending struct {\n\t\tid, urlID, label, rationale string\n\t\trank int\n\t}\n\tvar pendings []pending\n\tfor rows.Next() {\n\t\tvar id, urlID, label, rationale string\n\t\tvar rank sql.NullInt64\n\t\tvar lastSeen string\n\t\tif err := rows.Scan(&id, &urlID, &label, &rank, &rationale, &lastSeen); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif observedClusterIDs[id] {\n\t\t\tcontinue\n\t\t}\n\t\tr := rationale\n\t\tif r == \"\" {\n\t\t\tr = \"fell out of feed (no rationale published)\"\n\t\t}\n\t\tpendings = append(pendings, pending{id: id, urlID: urlID, label: label, rationale: r, rank: int(rank.Int64)})\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn err\n\t}\n\tfor _, p := range pendings {\n\t\tif _, err := db.Exec(`\n\t\t\tINSERT OR IGNORE INTO digg_replacements (cluster_id, observed_at, rationale, previous_rank, cluster_url_id, label)\n\t\t\tVALUES (?,?,?,?,?,?)\n\t\t`, p.id, now, p.rationale, p.rank, p.urlID, p.label); err != nil {\n\t\t\treturn fmt.Errorf(\"record replacement %s: %w\", p.id, err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc raw(r json.RawMessage) any {\n\tif len(r) == 0 {\n\t\treturn nil\n\t}\n\treturn string(r)\n}\n\nfunc nullableInt(v int) any {\n\tif v == 0 {\n\t\treturn nil\n\t}\n\treturn v\n}\n\n// UpsertRoster1000 writes the parsed /ai/1000 roster into digg_authors.\n// One row per username; the rich roster columns (rank, previous_rank,\n// rank_change, score, category, category_rank, followers_count, bio,\n// github_url, vibe_distribution_json, etc.) are upserted on every call.\n//\n// The existing digg_authors columns from cluster ingest (display_name,\n// x_id, avatar_url, influence, podist, contributed_count) are preserved\n// when the roster row already had values populated by sync. The roster\n// path overwrites display_name, avatar_url (via profile_image_url), and\n// x_id (via target_x_id) only when the existing values are empty —\n// callers expect cluster-ingest data to be authoritative for those.\n//\n// Each upsert also writes a parallel row into digg_authors_fts so that\n// `search \"\u003ckeyword>\" --data-source local` can match on bio text.\n//\n// All 3000+ statements (one main upsert + one FTS delete + one FTS\n// insert per author) run inside a single transaction. If any statement\n// fails mid-loop we ROLLBACK so digg_authors and digg_authors_fts can't\n// drift out of sync (e.g. main row updated but FTS row missing or\n// stale). Returns the count actually committed; on error returns 0\n// and the wrapped failure.\nfunc UpsertRoster1000(db *sql.DB, authors []diggparse.Roster1000Author, fetchedAt time.Time) (int, error) {\n\tif len(authors) == 0 {\n\t\treturn 0, nil\n\t}\n\tnow := fetchedAt.UTC().Format(time.RFC3339Nano)\n\n\ttx, err := db.Begin()\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"begin roster transaction: %w\", err)\n\t}\n\t// Deferred rollback is a no-op after a successful commit (sql.ErrTxDone).\n\tcommitted := false\n\tdefer func() {\n\t\tif !committed {\n\t\t\t_ = tx.Rollback()\n\t\t}\n\t}()\n\n\twritten := 0\n\tfor _, a := range authors {\n\t\tif a.Username == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tvar prevRank, rankChange any\n\t\tif a.PreviousRank != nil {\n\t\t\tprevRank = *a.PreviousRank\n\t\t}\n\t\tif a.RankChange != nil {\n\t\t\trankChange = *a.RankChange\n\t\t}\n\t\tvar githubURL any\n\t\tif a.GithubURL != nil {\n\t\t\tgithubURL = *a.GithubURL\n\t\t}\n\t\tvar vibeJSON any\n\t\tif len(a.VibeDistribution) > 0 {\n\t\t\tb, jerr := json.Marshal(a.VibeDistribution)\n\t\t\tif jerr == nil {\n\t\t\t\tvibeJSON = string(b)\n\t\t\t}\n\t\t}\n\t\t_, err := tx.Exec(`\n\t\t\tINSERT INTO digg_authors (\n\t\t\t\tusername, display_name, x_id, avatar_url,\n\t\t\t\trank, previous_rank, rank_change, score,\n\t\t\t\tcategory, category_rank, category_confidence,\n\t\t\t\tfollowers_count, followed_by_count,\n\t\t\t\tbio, github_url,\n\t\t\t\tvibe_distribution_json, vibe_tweet_count,\n\t\t\t\tprofile_image_url, last_seen_at\n\t\t\t) VALUES (\n\t\t\t\t?,?,?,?,\n\t\t\t\t?,?,?,?,\n\t\t\t\t?,?,?,\n\t\t\t\t?,?,\n\t\t\t\t?,?,\n\t\t\t\t?,?,\n\t\t\t\t?,?\n\t\t\t)\n\t\t\tON CONFLICT(username) DO UPDATE SET\n\t\t\t\tdisplay_name=COALESCE(NULLIF(digg_authors.display_name,''), excluded.display_name),\n\t\t\t\tx_id=COALESCE(NULLIF(digg_authors.x_id,''), excluded.x_id),\n\t\t\t\tavatar_url=COALESCE(NULLIF(digg_authors.avatar_url,''), excluded.avatar_url),\n\t\t\t\trank=excluded.rank,\n\t\t\t\tprevious_rank=excluded.previous_rank,\n\t\t\t\trank_change=excluded.rank_change,\n\t\t\t\tscore=excluded.score,\n\t\t\t\tcategory=COALESCE(NULLIF(excluded.category,''), digg_authors.category),\n\t\t\t\tcategory_rank=excluded.category_rank,\n\t\t\t\tcategory_confidence=excluded.category_confidence,\n\t\t\t\tfollowers_count=excluded.followers_count,\n\t\t\t\tfollowed_by_count=excluded.followed_by_count,\n\t\t\t\tbio=COALESCE(NULLIF(excluded.bio,''), digg_authors.bio),\n\t\t\t\tgithub_url=COALESCE(excluded.github_url, digg_authors.github_url),\n\t\t\t\tvibe_distribution_json=COALESCE(excluded.vibe_distribution_json, digg_authors.vibe_distribution_json),\n\t\t\t\tvibe_tweet_count=excluded.vibe_tweet_count,\n\t\t\t\tprofile_image_url=COALESCE(NULLIF(excluded.profile_image_url,''), digg_authors.profile_image_url),\n\t\t\t\tlast_seen_at=excluded.last_seen_at\n\t\t`,\n\t\t\ta.Username, a.DisplayName, a.TargetXID, a.ProfileImageURL,\n\t\t\ta.Rank, prevRank, rankChange, a.Score,\n\t\t\ta.Category, nullableInt(a.CategoryRank), a.CategoryConfidence,\n\t\t\ta.FollowersCount, a.FollowedByCount,\n\t\t\ta.Bio, githubURL,\n\t\t\tvibeJSON, nullableInt(a.VibeTweetCount),\n\t\t\ta.ProfileImageURL, now,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn 0, fmt.Errorf(\"upsert roster author %s: %w\", a.Username, err)\n\t\t}\n\n\t\t// FTS row: refresh atomically.\n\t\tif _, err := tx.Exec(`DELETE FROM digg_authors_fts WHERE username = ?`, a.Username); err != nil {\n\t\t\treturn 0, fmt.Errorf(\"fts delete @%s: %w\", a.Username, err)\n\t\t}\n\t\tif _, err := tx.Exec(`\n\t\t\tINSERT INTO digg_authors_fts (username, display_name, bio, category)\n\t\t\tVALUES (?,?,?,?)\n\t\t`, a.Username, a.DisplayName, a.Bio, a.Category); err != nil {\n\t\t\treturn 0, fmt.Errorf(\"fts insert @%s: %w\", a.Username, err)\n\t\t}\n\t\twritten++\n\t}\n\n\tif err := tx.Commit(); err != nil {\n\t\treturn 0, fmt.Errorf(\"commit roster transaction: %w\", err)\n\t}\n\tcommitted = true\n\treturn written, nil\n}\n\n// UpsertClusterPosts caches the parsed posts for a single cluster.\n// One row per clusterUrlId; subsequent calls overwrite. The posts\n// blob is JSON-marshalled directly from the slice so the structured\n// shape (per-post body / media_urls / repost_context) round-trips\n// untouched on the read side.\n//\n// fetchedAt is the cache anchor — readers compare it to time.Now()\n// against a TTL (1h by default; `--no-cache` bypasses entirely).\n// We store the timestamp in RFC3339Nano UTC so SQL ordering stays\n// monotonic.\nfunc UpsertClusterPosts(db *sql.DB, clusterUrlID string, posts []diggparse.ClusterPost, fetchedAt time.Time) error {\n\tif clusterUrlID == \"\" {\n\t\treturn fmt.Errorf(\"UpsertClusterPosts: clusterUrlID required\")\n\t}\n\tbody, err := json.Marshal(posts)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"marshalling cluster posts: %w\", err)\n\t}\n\tnow := fetchedAt.UTC().Format(time.RFC3339Nano)\n\t_, err = db.Exec(`\n\t\tINSERT INTO digg_cluster_posts (cluster_url_id, posts_json, fetched_at)\n\t\tVALUES (?,?,?)\n\t\tON CONFLICT(cluster_url_id) DO UPDATE SET\n\t\t\tposts_json = excluded.posts_json,\n\t\t\tfetched_at = excluded.fetched_at\n\t`, clusterUrlID, string(body), now)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"upsert cluster posts %s: %w\", clusterUrlID, err)\n\t}\n\treturn nil\n}\n\n// GetClusterPosts reads the cached posts for one clusterUrlId,\n// honoring the supplied TTL. Returns:\n//\n// - (posts, true, fetchedAt, nil) when a fresh row exists.\n// - (nil, false, time.Time{}, nil) when no row exists OR the row\n// has aged past the TTL. The caller refetches in either case.\n// - (nil, false, time.Time{}, err) on a SQL or JSON-decode error\n// — surfaced rather than swallowed so flaky storage doesn't\n// silently look like a cache miss.\n//\n// A zero-or-negative ttl disables the cache (always returns miss).\nfunc GetClusterPosts(db *sql.DB, clusterUrlID string, ttl time.Duration) ([]diggparse.ClusterPost, bool, time.Time, error) {\n\tif clusterUrlID == \"\" || ttl \u003c= 0 {\n\t\treturn nil, false, time.Time{}, nil\n\t}\n\tvar body, fetchedStr string\n\trow := db.QueryRow(`SELECT posts_json, fetched_at FROM digg_cluster_posts WHERE cluster_url_id = ?`, clusterUrlID)\n\tif err := row.Scan(&body, &fetchedStr); err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\treturn nil, false, time.Time{}, nil\n\t\t}\n\t\treturn nil, false, time.Time{}, fmt.Errorf(\"read cluster posts %s: %w\", clusterUrlID, err)\n\t}\n\tfetchedAt, perr := time.Parse(time.RFC3339Nano, fetchedStr)\n\tif perr != nil {\n\t\t// Defensive: if the timestamp is unparseable, treat as a miss\n\t\t// rather than crashing. A subsequent upsert will fix the row.\n\t\treturn nil, false, time.Time{}, nil\n\t}\n\tif time.Since(fetchedAt) > ttl {\n\t\treturn nil, false, fetchedAt, nil\n\t}\n\tvar posts []diggparse.ClusterPost\n\tif err := json.Unmarshal([]byte(body), &posts); err != nil {\n\t\treturn nil, false, fetchedAt, fmt.Errorf(\"decode cluster posts %s: %w\", clusterUrlID, err)\n\t}\n\treturn posts, true, fetchedAt, nil\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":28538,"content_sha256":"c2dc3a409aaccf41ab5a05da7a30dffe62eac030ab011e4633807decdb1d8076"},{"filename":"internal/mcp/cobratree/classify.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage cobratree\n\nimport (\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n)\n\nconst (\n\tEndpointAnnotation = \"pp:endpoint\"\n\tHiddenAnnotation = \"mcp:hidden\"\n\t// ReadOnlyAnnotation, when set on a Cobra command to \"true\"/\"1\"/\"yes\",\n\t// causes the runtime walker to register the resulting MCP tool with\n\t// readOnlyHint=true. Use for novel CLI commands that don't mutate\n\t// external state — read-only API queries, local cache reads, etc.\n\t// Without it, hosts like Claude Desktop default to \"could write or\n\t// delete\" and demand permission per call.\n\tReadOnlyAnnotation = \"mcp:read-only\"\n)\n\ntype commandKind int\n\nconst (\n\tcommandNovel commandKind = iota\n\tcommandEndpoint\n\tcommandFramework\n\tcommandHidden\n)\n\n// frameworkCommands are top-level CLI commands the walker should skip when\n// mirroring the Cobra tree. Two cases qualify:\n//\n// 1. A typed MCP tool already covers the same capability (the typed tool's\n// schema is strictly better than a shell-out). Examples: `sql`, `search`,\n// `context`/`about`/`agent-context`, `api` (endpoint mirror tools cover it).\n// 2. The command is non-functional via MCP (interactive setup, shell-only\n// ergonomics, trivial introspection, local-only feedback). Examples:\n// `auth`, `completion`, `doctor`, `version`, `feedback`, `profile`,\n// `which`, `help`.\n//\n// Commands that DO have agent value — `sync` (populates the store that `sql`\n// and `search` query), `stale`/`orphans`/`reconcile`/`load` (store\n// diagnostics), `export`/`import` (data movement), `workflow`\n// (compound operations), `analytics` (aggregations) — must NOT be in this\n// list. Excluding `sync` while exposing `sql` is a broken contract because\n// the typed `sql` tool returns empty results until something populates the\n// store. See AGENTS.md \"Agent-Native Surface\" for the principle.\n//\n// Adding a new generator-emitted command means deciding which of the two\n// cases above applies. When in doubt, leave it out — the walker registers\n// any user-facing command as a shell-out tool, and the cost of a slightly\n// underused tool is much smaller than the cost of a broken contract like\n// `sql` without `sync`.\nvar frameworkCommands = map[string]bool{\n\t\"about\": true,\n\t\"agent-context\": true,\n\t\"api\": true,\n\t\"auth\": true,\n\t\"completion\": true,\n\t\"doctor\": true,\n\t\"feedback\": true,\n\t\"help\": true,\n\t\"profile\": true,\n\t\"search\": true,\n\t\"sql\": true,\n\t\"version\": true,\n\t\"which\": true,\n}\n\nfunc classify(cmd *cobra.Command) commandKind {\n\tif cmd == nil || cmd.Hidden || isMCPHidden(cmd) {\n\t\treturn commandHidden\n\t}\n\tif endpointID(cmd) != \"\" {\n\t\treturn commandEndpoint\n\t}\n\tif frameworkCommands[cmd.Name()] {\n\t\treturn commandFramework\n\t}\n\treturn commandNovel\n}\n\nfunc endpointID(cmd *cobra.Command) string {\n\tif cmd == nil || cmd.Annotations == nil {\n\t\treturn \"\"\n\t}\n\treturn strings.TrimSpace(cmd.Annotations[EndpointAnnotation])\n}\n\nfunc isMCPHidden(cmd *cobra.Command) bool {\n\treturn annotationIsTrue(cmd, HiddenAnnotation)\n}\n\nfunc isMCPReadOnly(cmd *cobra.Command) bool {\n\treturn annotationIsTrue(cmd, ReadOnlyAnnotation)\n}\n\nfunc annotationIsTrue(cmd *cobra.Command, key string) bool {\n\tif cmd == nil || cmd.Annotations == nil {\n\t\treturn false\n\t}\n\tv := strings.ToLower(strings.TrimSpace(cmd.Annotations[key]))\n\treturn v == \"true\" || v == \"1\" || v == \"yes\"\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":3559,"content_sha256":"b5cd20c0e8d490e3793facfb65c77c4e4a653051a39affc97d09cc71b3ff0a3a"},{"filename":"internal/mcp/cobratree/cli_path.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage cobratree\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n)\n\n// SiblingCLIPath resolves the companion CLI via sibling-of-executable,\n// DIGG_CLI_PATH env var, then PATH.\nfunc SiblingCLIPath() (string, error) {\n\tconst cliName = \"digg-pp-cli\"\n\tif exe, err := os.Executable(); err == nil {\n\t\tcandidate := filepath.Join(filepath.Dir(exe), cliName)\n\t\tif _, err := os.Stat(candidate); err == nil {\n\t\t\treturn candidate, nil\n\t\t}\n\t}\n\tif v := os.Getenv(\"DIGG_CLI_PATH\"); v != \"\" {\n\t\treturn v, nil\n\t}\n\treturn exec.LookPath(cliName)\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":716,"content_sha256":"b2cb9eaadbeb172793d8d70a08702190e092b40f7e86e68702ebe43878c2c833"},{"filename":"internal/mcp/cobratree/names.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage cobratree\n\nimport (\n\t\"strings\"\n\t\"unicode\"\n)\n\nfunc toolNameForPath(parts []string) string {\n\tvar out []rune\n\tfor _, part := range parts {\n\t\tfor _, r := range part {\n\t\t\tswitch {\n\t\t\tcase unicode.IsLetter(r) || unicode.IsDigit(r):\n\t\t\t\tout = append(out, unicode.ToLower(r))\n\t\t\tdefault:\n\t\t\t\tout = append(out, '_')\n\t\t\t}\n\t\t}\n\t\tout = append(out, '_')\n\t}\n\treturn strings.Trim(strings.Join(strings.FieldsFunc(string(out), func(r rune) bool { return r == '_' }), \"_\"), \"_\")\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":661,"content_sha256":"0e690eb2bb4f5790981ec470d9e1c261d48a39b4c54545d7b6b12c0897a1d701"},{"filename":"internal/mcp/cobratree/shellout.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage cobratree\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os/exec\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\n\tmcplib \"github.com/mark3labs/mcp-go/mcp\"\n\t\"github.com/mark3labs/mcp-go/server\"\n)\n\nfunc shellOutToCLI(cliPath func() (string, error), commandPath []string) server.ToolHandlerFunc {\n\tlookupPath, lookupErr := cliPath()\n\tprefixArgs := append([]string{}, commandPath...)\n\treturn func(ctx context.Context, req mcplib.CallToolRequest) (*mcplib.CallToolResult, error) {\n\t\tif lookupErr != nil {\n\t\t\treturn mcplib.NewToolResultError(fmt.Sprintf(\"companion CLI binary not found: %v\\nTried sibling lookup, DIGG_CLI_PATH env var, and PATH.\", lookupErr)), nil\n\t\t}\n\t\targs := req.GetArguments()\n\t\tfinalArgs := append([]string{}, prefixArgs...)\n\t\tfinalArgs = append(finalArgs, cliArgsFromMCP(args)...)\n\t\tif raw, _ := args[\"args\"].(string); strings.TrimSpace(raw) != \"\" {\n\t\t\tfinalArgs = append(finalArgs, splitShellArgs(raw)...)\n\t\t}\n\t\tcmd := exec.CommandContext(ctx, lookupPath, finalArgs...)\n\t\tout, err := cmd.CombinedOutput()\n\t\tif err != nil {\n\t\t\treturn mcplib.NewToolResultError(string(out)), nil\n\t\t}\n\t\treturn mcplib.NewToolResultText(string(out)), nil\n\t}\n}\n\nfunc cliArgsFromMCP(args map[string]any) []string {\n\tkeys := make([]string, 0, len(args))\n\tfor k := range args {\n\t\tif k != \"args\" {\n\t\t\tkeys = append(keys, k)\n\t\t}\n\t}\n\tsort.Strings(keys)\n\n\tvar out []string\n\tfor _, k := range keys {\n\t\tv := args[k]\n\t\tswitch tv := v.(type) {\n\t\tcase bool:\n\t\t\tif tv {\n\t\t\t\tout = append(out, \"--\"+k)\n\t\t\t}\n\t\tcase float64:\n\t\t\tout = append(out, \"--\"+k, strconv.FormatFloat(tv, 'f', -1, 64))\n\t\tcase string:\n\t\t\tif tv != \"\" {\n\t\t\t\tout = append(out, \"--\"+k, tv)\n\t\t\t}\n\t\tcase []any:\n\t\t\tif len(tv) > 0 {\n\t\t\t\tparts := make([]string, 0, len(tv))\n\t\t\t\tfor _, item := range tv {\n\t\t\t\t\tparts = append(parts, fmt.Sprintf(\"%v\", item))\n\t\t\t\t}\n\t\t\t\tout = append(out, \"--\"+k, strings.Join(parts, \",\"))\n\t\t\t}\n\t\tdefault:\n\t\t\tif v != nil {\n\t\t\t\tout = append(out, \"--\"+k, fmt.Sprintf(\"%v\", v))\n\t\t\t}\n\t\t}\n\t}\n\treturn out\n}\n\n// splitShellArgs whitespace-splits with double-quoted-token preservation.\nfunc splitShellArgs(s string) []string {\n\tvar tokens []string\n\tvar cur []rune\n\tinQuote := false\n\tfor _, r := range s {\n\t\tswitch {\n\t\tcase r == '\"':\n\t\t\tinQuote = !inQuote\n\t\tcase (r == ' ' || r == '\\t') && !inQuote:\n\t\t\tif len(cur) > 0 {\n\t\t\t\ttokens = append(tokens, string(cur))\n\t\t\t\tcur = cur[:0]\n\t\t\t}\n\t\tdefault:\n\t\t\tcur = append(cur, r)\n\t\t}\n\t}\n\tif len(cur) > 0 {\n\t\ttokens = append(tokens, string(cur))\n\t}\n\treturn tokens\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":2628,"content_sha256":"f8a5ad56d62cac166603bd1664b9413991d2234768138a70113c5cf4af1f1d2a"},{"filename":"internal/mcp/cobratree/typemap.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage cobratree\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n\n\tmcplib \"github.com/mark3labs/mcp-go/mcp\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/pflag\"\n)\n\nvar positionalPattern = regexp.MustCompile(`(?:^|\\s)(?:\u003c[^>]+>|\\[[^\\]]+\\])`)\n\nfunc toolOptionsForFlags(cmd *cobra.Command) []mcplib.ToolOption {\n\tvar opts []mcplib.ToolOption\n\tseen := map[string]bool{}\n\taddFlag := func(flag *pflag.Flag) {\n\t\tif flag == nil || flag.Hidden || flag.Deprecated != \"\" {\n\t\t\treturn\n\t\t}\n\t\tif seen[flag.Name] {\n\t\t\treturn\n\t\t}\n\t\tseen[flag.Name] = true\n\t\topts = append(opts, toolOptionForFlag(flag))\n\t}\n\tcmd.InheritedFlags().VisitAll(addFlag)\n\tcmd.NonInheritedFlags().VisitAll(addFlag)\n\treturn opts\n}\n\nfunc toolOptionForFlag(flag *pflag.Flag) mcplib.ToolOption {\n\tpropOpts := []mcplib.PropertyOption{mcplib.Description(flagDescription(flag))}\n\tif isRequired(flag) {\n\t\tpropOpts = append(propOpts, mcplib.Required())\n\t}\n\tswitch flag.Value.Type() {\n\tcase \"bool\":\n\t\treturn mcplib.WithBoolean(flag.Name, propOpts...)\n\tcase \"int\", \"int8\", \"int16\", \"int32\", \"int64\",\n\t\t\"uint\", \"uint8\", \"uint16\", \"uint32\", \"uint64\",\n\t\t\"float32\", \"float64\", \"count\":\n\t\treturn mcplib.WithNumber(flag.Name, propOpts...)\n\tcase \"string\", \"stringSlice\", \"stringArray\", \"duration\":\n\t\treturn mcplib.WithString(flag.Name, propOpts...)\n\tdefault:\n\t\tpropOpts[0] = mcplib.Description(flagDescription(flag) + \" (unknown Cobra flag type \" + flag.Value.Type() + \"; pass as a string)\")\n\t\treturn mcplib.WithString(flag.Name, propOpts...)\n\t}\n}\n\nfunc flagDescription(flag *pflag.Flag) string {\n\tusage := strings.TrimSpace(flag.Usage)\n\tif usage == \"\" {\n\t\tusage = \"Value for --\" + flag.Name\n\t}\n\tif flag.DefValue != \"\" && flag.DefValue != \"[]\" {\n\t\tusage += \" (default: \" + flag.DefValue + \")\"\n\t}\n\treturn usage\n}\n\nfunc isRequired(flag *pflag.Flag) bool {\n\tif flag == nil || flag.Annotations == nil {\n\t\treturn false\n\t}\n\t_, ok := flag.Annotations[cobra.BashCompOneRequiredFlag]\n\treturn ok\n}\n\nfunc commandTakesArgs(cmd *cobra.Command) bool {\n\treturn positionalPattern.MatchString(cmd.Use)\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":2197,"content_sha256":"faa5e5e40ce9ac74e38bb669ce8e3e4f31cb7495734615f75b5dc3dc0fae8460"},{"filename":"internal/mcp/cobratree/walker.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage cobratree\n\nimport (\n\tmcplib \"github.com/mark3labs/mcp-go/mcp\"\n\t\"github.com/mark3labs/mcp-go/server\"\n\t\"github.com/spf13/cobra\"\n)\n\n// RegisterAll walks root's user-facing Cobra commands and registers shell-out\n// MCP tools for commands that are not already covered by typed endpoint tools.\nfunc RegisterAll(s *server.MCPServer, root *cobra.Command, cliPath func() (string, error)) {\n\tif root == nil {\n\t\treturn\n\t}\n\twalk(root, nil, func(cmd *cobra.Command, path []string) {\n\t\tswitch classify(cmd) {\n\t\tcase commandHidden:\n\t\t\treturn\n\t\tcase commandEndpoint, commandFramework:\n\t\t\treturn\n\t\t}\n\t\tif !cmd.Runnable() {\n\t\t\treturn\n\t\t}\n\n\t\ttoolName := toolNameForPath(path)\n\t\tif toolName == \"\" {\n\t\t\treturn\n\t\t}\n\t\toptions := []mcplib.ToolOption{mcplib.WithDescription(descriptionFor(cmd))}\n\t\toptions = append(options, toolOptionsForFlags(cmd)...)\n\t\tif commandTakesArgs(cmd) {\n\t\t\toptions = append(options, mcplib.WithString(\"args\", mcplib.Description(\"Additional positional arguments or raw CLI flags to append to the command.\")))\n\t\t}\n\t\tif isMCPReadOnly(cmd) {\n\t\t\toptions = append(options, mcplib.WithReadOnlyHintAnnotation(true), mcplib.WithDestructiveHintAnnotation(false))\n\t\t}\n\t\ts.AddTool(mcplib.NewTool(toolName, options...), shellOutToCLI(cliPath, path))\n\t})\n}\n\nfunc walk(cmd *cobra.Command, path []string, visit func(*cobra.Command, []string)) {\n\tfor _, child := range cmd.Commands() {\n\t\tif child.Hidden || isMCPHidden(child) {\n\t\t\tcontinue\n\t\t}\n\t\tchildPath := append(append([]string{}, path...), child.Name())\n\t\tvisit(child, childPath)\n\t\tif kind := classify(child); kind != commandHidden && kind != commandFramework {\n\t\t\twalk(child, childPath, visit)\n\t\t}\n\t}\n}\n\nfunc descriptionFor(cmd *cobra.Command) string {\n\tif cmd.Long != \"\" {\n\t\treturn cmd.Long\n\t}\n\tif cmd.Short != \"\" {\n\t\treturn cmd.Short\n\t}\n\treturn \"Run `\" + cmd.CommandPath() + \"` through the companion CLI binary.\"\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":2056,"content_sha256":"c509e3e1209434f1f86f5d4d29a9b200f60c807336ba89f34a50a6f49ba2c7a8"},{"filename":"internal/mcp/tools_test.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage mcp\n\nimport (\n\t\"strings\"\n\t\"testing\"\n)\n\n// TestValidateReadOnlyQuery_AllowsSelectAndWITH pins the contract: the MCP\n// sql tool's allowlist accepts SELECT and WITH-prefix queries, including\n// CTEs, mixed case, leading whitespace, leading SQL comments, and leading\n// statement separators. SELECT-form CTEs (\"WITH x AS (SELECT ...) SELECT\")\n// must work because novel CLI sql commands in the public library accept\n// them as legitimate read-only queries; the MCP surface keeps parity.\nfunc TestValidateReadOnlyQuery_AllowsSelectAndWITH(t *testing.T) {\n\tallowed := []string{\n\t\t\"SELECT 1\",\n\t\t\"select * from resources\",\n\t\t\" SELECT 1\",\n\t\t\"\\tSELECT 1\",\n\t\t\"\\nSELECT 1\",\n\t\t\";SELECT 1\",\n\t\t\"-- comment\\nSELECT 1\",\n\t\t\"/* comment */ SELECT 1\",\n\t\t\"/* comment */SELECT 1\",\n\t\t\"/**/SELECT 1\",\n\t\t\"-- one\\n-- two\\nSELECT 1\",\n\t\t\"/* a *//* b */ SELECT 1\",\n\t\t\"WITH r AS (SELECT 1) SELECT * FROM r\",\n\t\t\"with r as (select 1) select * from r\",\n\t}\n\tfor _, q := range allowed {\n\t\tif err := validateReadOnlyQuery(q); err != nil {\n\t\t\tt.Errorf(\"validateReadOnlyQuery(%q) = %v, want nil\", q, err)\n\t\t}\n\t}\n}\n\n// TestValidateReadOnlyQuery_RejectsBypassVectors covers the comment-prefix\n// bypass class that defeated the earlier prefix-blocklist gate. mode=ro on\n// modernc.org/sqlite does not block VACUUM INTO (writes a fresh file) or\n// ATTACH DATABASE (opens a separate writable handle), so the gate is the\n// only defense against those vectors. A successful bypass at this layer\n// would let an MCP-trusting agent silently exfiltrate the local database.\nfunc TestValidateReadOnlyQuery_RejectsBypassVectors(t *testing.T) {\n\trejected := []string{\n\t\t\"VACUUM INTO '/tmp/x.db'\",\n\t\t\"ATTACH DATABASE 'file:/tmp/x.db?mode=rwc' AS evil\",\n\t\t\"INSERT INTO resources VALUES ('x', 'y', '{}')\",\n\t\t\"UPDATE resources SET resource_type = 'evil'\",\n\t\t\"DELETE FROM resources\",\n\t\t\"REPLACE INTO resources VALUES ('seed', 'evil', '{}')\",\n\t\t\"DROP TABLE resources\",\n\t\t\"PRAGMA writable_schema = ON\",\n\t\t\"REINDEX\",\n\t\t\"DETACH DATABASE x\",\n\t\t\"/* x */ VACUUM INTO '/tmp/exfil.db'\",\n\t\t\"/* x */VACUUM INTO '/tmp/exfil.db'\",\n\t\t\"-- x\\nVACUUM INTO '/tmp/exfil.db'\",\n\t\t\"/**/VACUUM INTO '/tmp/exfil.db'\",\n\t\t\"/* x */ ATTACH DATABASE 'file:/tmp/x.db?mode=rwc' AS evil\",\n\t\t\"-- x\\nATTACH DATABASE '/tmp/x.db' AS evil\",\n\t\t\";VACUUM INTO '/tmp/x.db'\",\n\t\t\"; ; VACUUM INTO '/tmp/x.db'\",\n\t\t\"/* a */ /* b */ INSERT INTO t VALUES (1)\",\n\t\t\"/* outer /* not nested */ */ SELECT 1\", // SQLite doesn't nest, so trailing \"*/\" closes; second SELECT remains. Reject — the gate must err on the side of caution when the leading shape is suspicious.\n\t\t\"-- only a comment\",\n\t\t\"/* only a comment */\",\n\t\t\"\",\n\t\t\" \",\n\t\t\";\",\n\t}\n\tfor _, q := range rejected {\n\t\tif err := validateReadOnlyQuery(q); err == nil {\n\t\t\tt.Errorf(\"validateReadOnlyQuery(%q) = nil, want error\", q)\n\t\t}\n\t}\n}\n\n// TestStripLeadingSQLNoise checks the helper directly so a regression in the\n// stripping logic (off-by-one on /* */ length, missing newline handling on\n// --) surfaces close to the source rather than only via the integration\n// behavior of validateReadOnlyQuery.\nfunc TestStripLeadingSQLNoise(t *testing.T) {\n\tcases := []struct {\n\t\tin, want string\n\t}{\n\t\t{\"SELECT 1\", \"SELECT 1\"},\n\t\t{\" SELECT 1\", \"SELECT 1\"},\n\t\t{\"\\t\\nSELECT 1\", \"SELECT 1\"},\n\t\t{\";SELECT 1\", \"SELECT 1\"},\n\t\t{\";; ;SELECT 1\", \"SELECT 1\"},\n\t\t{\"-- x\\nSELECT 1\", \"SELECT 1\"},\n\t\t{\"-- x\\n-- y\\nSELECT 1\", \"SELECT 1\"},\n\t\t{\"/* x */SELECT 1\", \"SELECT 1\"},\n\t\t{\"/**/SELECT 1\", \"SELECT 1\"},\n\t\t{\"/* x */ /* y */ SELECT 1\", \"SELECT 1\"},\n\t\t{\"-- only\", \"\"},\n\t\t{\"/* only\", \"\"},\n\t\t{\"\", \"\"},\n\t}\n\tfor _, c := range cases {\n\t\tgot := stripLeadingSQLNoise(c.in)\n\t\tif !strings.EqualFold(got, c.want) {\n\t\t\tt.Errorf(\"stripLeadingSQLNoise(%q) = %q, want %q\", c.in, got, c.want)\n\t\t}\n\t}\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":3913,"content_sha256":"4f868d5646274853b7ab6b3779a29bbe946bd417deea06981b5e51450f0c2d0c"},{"filename":"internal/mcp/tools.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n\n\tmcplib \"github.com/mark3labs/mcp-go/mcp\"\n\t\"github.com/mark3labs/mcp-go/server\"\n\t\"github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/internal/cli\"\n\t\"github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/internal/client\"\n\t\"github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/internal/config\"\n\t\"github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/internal/mcp/cobratree\"\n\t\"github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/internal/store\"\n)\n\n// RegisterTools registers all API operations as MCP tools.\nfunc RegisterTools(s *server.MCPServer) {\n\ts.AddTool(\n\t\tmcplib.NewTool(\"feed_raw\",\n\t\t\tmcplib.WithDescription(\"Fetch the raw /ai HTML page. The CLI's sync command parses this; most users should run `sync` then `top` instead of calling this directly. Returns the RawHTML.\"),\n\t\t\tmcplib.WithReadOnlyHintAnnotation(true),\n\t\t\tmcplib.WithDestructiveHintAnnotation(false),\n\t\t\tmcplib.WithOpenWorldHintAnnotation(true),\n\t\t),\n\t\tmakeAPIHandler(\"GET\", \"/ai\", []mcpParamBinding{}, []string{}),\n\t)\n\ts.AddTool(\n\t\tmcplib.NewTool(\"feed_story_raw\",\n\t\t\tmcplib.WithDescription(\"Fetch the raw /ai/{clusterUrlId} story detail page (HTML). The CLI's `story` command parses this; users should not need to call this directly. Required: cluster_url_id. Returns the RawHTML.\"),\n\t\t\tmcplib.WithString(\"cluster_url_id\", mcplib.Required(), mcplib.Description(\"Short alphanumeric cluster URL ID (8 chars), e.g. iq7usf9e\")),\n\t\t\tmcplib.WithReadOnlyHintAnnotation(true),\n\t\t\tmcplib.WithDestructiveHintAnnotation(false),\n\t\t\tmcplib.WithOpenWorldHintAnnotation(true),\n\t\t),\n\t\tmakeAPIHandler(\"GET\", \"/ai/{cluster_url_id}\", []mcpParamBinding{{PublicName: \"cluster_url_id\", WireName: \"cluster_url_id\", Location: \"path\"}}, []string{\"cluster_url_id\"}),\n\t)\n\ts.AddTool(\n\t\tmcplib.NewTool(\"trending_status\",\n\t\t\tmcplib.WithDescription(\"Read the current pipeline status: storiesToday, clustersToday, isFetching, nextFetchAt, and the recent event stream (cluster_detected, fast_climb, post_understanding, batch_started, batch_breakdown, posts_stored, embedding_progress). Returns the TrendingStatus.\"),\n\t\t\tmcplib.WithReadOnlyHintAnnotation(true),\n\t\t\tmcplib.WithDestructiveHintAnnotation(false),\n\t\t\tmcplib.WithOpenWorldHintAnnotation(true),\n\t\t),\n\t\tmakeAPIHandler(\"GET\", \"/api/trending/status\", []mcpParamBinding{}, []string{}),\n\t)\n\t// SQL tool — ad-hoc analysis on synced data without API calls\n\ts.AddTool(\n\t\tmcplib.NewTool(\"sql\",\n\t\t\tmcplib.WithDescription(\"Run read-only SQL against local database. Use for ad-hoc analysis, aggregations, and joins across synced resources. Requires sync first.\"),\n\t\t\tmcplib.WithString(\"query\", mcplib.Required(), mcplib.Description(\"SQL query (SELECT or WITH...SELECT). Tables match resource names.\")),\n\t\t\tmcplib.WithReadOnlyHintAnnotation(true),\n\t\t\tmcplib.WithDestructiveHintAnnotation(false),\n\t\t),\n\t\thandleSQL,\n\t)\n\n\t// Context tool — front-loaded domain knowledge for agents.\n\t// Call this first to understand the API taxonomy, query patterns, and capabilities.\n\ts.AddTool(\n\t\tmcplib.NewTool(\"context\",\n\t\t\tmcplib.WithDescription(\"Get API domain context: resource taxonomy, auth requirements, query tips, and unique capabilities. Call this first.\"),\n\t\t\tmcplib.WithReadOnlyHintAnnotation(true),\n\t\t\tmcplib.WithDestructiveHintAnnotation(false),\n\t\t),\n\t\thandleContext,\n\t)\n\n\t// Runtime Cobra-tree mirror — exposes every user-facing command that is\n\t// not already covered by a typed endpoint or framework MCP tool.\n\tcobratree.RegisterAll(s, cli.RootCmd(), cobratree.SiblingCLIPath)\n}\n\ntype mcpParamBinding struct {\n\tPublicName string\n\tWireName string\n\tLocation string\n}\n\n// makeAPIHandler creates a generic MCP tool handler for an API endpoint.\nfunc makeAPIHandler(method, pathTemplate string, bindings []mcpParamBinding, positionalParams []string) server.ToolHandlerFunc {\n\treturn func(ctx context.Context, req mcplib.CallToolRequest) (*mcplib.CallToolResult, error) {\n\t\tc, err := newMCPClient()\n\t\tif err != nil {\n\t\t\treturn mcplib.NewToolResultError(err.Error()), nil\n\t\t}\n\n\t\t// mcp-go v0.47+ made CallToolParams.Arguments an `any` to support\n\t\t// non-map payloads; GetArguments() returns the map[string]any shape\n\t\t// we rely on here (or an empty map when the payload is something else).\n\t\targs := req.GetArguments()\n\n\t\t// positionalParams mixes real URL path params with CLI positional\n\t\t// args that map to query params (e.g. `search \u003cquery>` -> ?query=);\n\t\t// the placeholder check below disambiguates them at runtime.\n\t\tpath := pathTemplate\n\t\tknownArgs := make(map[string]bool, len(bindings))\n\t\tpathParams := make(map[string]bool, len(positionalParams))\n\t\tparams := make(map[string]string)\n\t\tbodyArgs := make(map[string]any)\n\t\tfor _, binding := range bindings {\n\t\t\tknownArgs[binding.PublicName] = true\n\t\t\tv, ok := args[binding.PublicName]\n\t\t\tif !ok {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch binding.Location {\n\t\t\tcase \"path\":\n\t\t\t\tplaceholder := \"{\" + binding.WireName + \"}\"\n\t\t\t\tpathParams[binding.PublicName] = true\n\t\t\t\tpath = strings.Replace(path, placeholder, fmt.Sprintf(\"%v\", v), 1)\n\t\t\tcase \"body\":\n\t\t\t\tbodyArgs[binding.WireName] = v\n\t\t\tdefault:\n\t\t\t\tparams[binding.WireName] = fmt.Sprintf(\"%v\", v)\n\t\t\t}\n\t\t}\n\t\tfor _, p := range positionalParams {\n\t\t\tplaceholder := \"{\" + p + \"}\"\n\t\t\tif !strings.Contains(pathTemplate, placeholder) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tpathParams[p] = true\n\t\t\tif v, ok := args[p]; ok {\n\t\t\t\tpath = strings.Replace(path, placeholder, fmt.Sprintf(\"%v\", v), 1)\n\t\t\t}\n\t\t}\n\n\t\tfor k, v := range args {\n\t\t\tif pathParams[k] || knownArgs[k] {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch method {\n\t\t\tcase \"POST\", \"PUT\", \"PATCH\":\n\t\t\t\tbodyArgs[k] = v\n\t\t\tdefault:\n\t\t\t\tparams[k] = fmt.Sprintf(\"%v\", v)\n\t\t\t}\n\t\t}\n\n\t\tvar data json.RawMessage\n\t\tswitch method {\n\t\tcase \"GET\":\n\t\t\tdata, err = c.Get(path, params)\n\t\tcase \"POST\":\n\t\t\tbody, _ := json.Marshal(bodyArgs)\n\t\t\tdata, _, err = c.Post(path, body)\n\t\tcase \"PUT\":\n\t\t\tbody, _ := json.Marshal(bodyArgs)\n\t\t\tdata, _, err = c.Put(path, body)\n\t\tcase \"PATCH\":\n\t\t\tbody, _ := json.Marshal(bodyArgs)\n\t\t\tdata, _, err = c.Patch(path, body)\n\t\tcase \"DELETE\":\n\t\t\tdata, _, err = c.Delete(path)\n\t\tdefault:\n\t\t\treturn mcplib.NewToolResultError(\"unsupported method: \" + method), nil\n\t\t}\n\n\t\tif err != nil {\n\t\t\tmsg := err.Error()\n\t\t\tswitch {\n\t\t\tcase strings.Contains(msg, \"HTTP 409\"):\n\t\t\t\treturn mcplib.NewToolResultText(\"already exists (no-op)\"), nil\n\t\t\tcase strings.Contains(msg, \"HTTP 401\"):\n\t\t\t\treturn mcplib.NewToolResultError(\"authentication failed: \" + msg +\n\t\t\t\t\t\"\\nhint: check your API credentials.\" +\n\t\t\t\t\t\"\\n Run 'digg-pp-cli doctor' to check auth status.\"), nil\n\t\t\tcase strings.Contains(msg, \"HTTP 403\"):\n\t\t\t\treturn mcplib.NewToolResultError(\"permission denied: \" + msg +\n\t\t\t\t\t\"\\nhint: this API is configured without credentials; the service may be blocking the request by rate limit, geography, bot protection, or endpoint policy.\" +\n\t\t\t\t\t\"\\n Run 'digg-pp-cli doctor' to check auth status.\"), nil\n\t\t\tcase strings.Contains(msg, \"HTTP 404\"):\n\t\t\t\tif method == \"DELETE\" {\n\t\t\t\t\treturn mcplib.NewToolResultText(\"already deleted (no-op)\"), nil\n\t\t\t\t}\n\t\t\t\treturn mcplib.NewToolResultError(\"not found: \" + msg), nil\n\t\t\tcase strings.Contains(msg, \"HTTP 429\"):\n\t\t\t\treturn mcplib.NewToolResultError(\"rate limited: \" + msg), nil\n\t\t\tdefault:\n\t\t\t\treturn mcplib.NewToolResultError(msg), nil\n\t\t\t}\n\t\t}\n\n\t\t// For GET responses, wrap bare arrays with count metadata\n\t\tif method == \"GET\" {\n\t\t\ttrimmed := strings.TrimSpace(string(data))\n\t\t\tif len(trimmed) > 0 && trimmed[0] == '[' {\n\t\t\t\tvar items []json.RawMessage\n\t\t\t\tif json.Unmarshal(data, &items) == nil {\n\t\t\t\t\twrapped := map[string]any{\n\t\t\t\t\t\t\"count\": len(items),\n\t\t\t\t\t\t\"items\": items,\n\t\t\t\t\t}\n\t\t\t\t\tout, _ := json.Marshal(wrapped)\n\t\t\t\t\treturn mcplib.NewToolResultText(string(out)), nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn mcplib.NewToolResultText(string(data)), nil\n\t}\n}\n\nfunc newMCPClient() (*client.Client, error) {\n\thome, _ := os.UserHomeDir()\n\tcfgPath := filepath.Join(home, \".config\", \"digg-pp-cli\", \"config.toml\")\n\tcfg, err := config.Load(cfgPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading config: %w\", err)\n\t}\n\tc := client.New(cfg, 30*time.Second, 0)\n\t// Agents calling through MCP need fresh data every call. The on-disk\n\t// response cache survives across MCP server invocations, so a\n\t// DELETE/PATCH followed by a GET would otherwise return the\n\t// pre-mutation snapshot for up to the cache TTL. The interactive CLI\n\t// constructs its own client and is unaffected.\n\tc.NoCache = true\n\treturn c, nil\n}\n\nfunc dbPath() string {\n\thome, _ := os.UserHomeDir()\n\treturn filepath.Join(home, \".local\", \"share\", \"digg-pp-cli\", \"data.db\")\n}\n\n// Note: MCP tools use their own dbPath() because they are in a separate package (main, not cli).\n// The CLI's defaultDBPath() in the cli package uses the same canonical path.\n\n// validateReadOnlyQuery gates the MCP sql tool. The agent contract advertised\n// to the host is ReadOnlyHintAnnotation(true); a false annotation on a\n// mutating tool lets MCP hosts auto-approve writes and is treated as a real\n// bug per the project's agent-native security model.\n//\n// The gate is an allowlist (SELECT or WITH only) applied AFTER stripping the\n// leading whitespace, line comments, block comments, and semicolons that\n// SQLite itself ignores before parsing. A naive HasPrefix check on a\n// keyword blocklist is bypassable by prefixing the dangerous statement with\n// \"/* x */\" or \"-- x\\n\" — TrimSpace strips outer whitespace but does not\n// understand SQL comment syntax. Combined with the empirical fact that\n// modernc.org/sqlite's mode=ro does NOT block VACUUM INTO (writes a snapshot\n// to a new file) or ATTACH DATABASE (opens a separate writable handle),\n// such a bypass produces silent exfiltration to an attacker-chosen path.\n//\n// SELECT and WITH are the only allowed leading keywords. WITH supports\n// SELECT-form CTEs; CTE-wrapped writes (\"WITH x AS (...) INSERT ...\") are\n// caught by OpenReadOnly's mode=ro one layer down. PRAGMA, ATTACH, VACUUM,\n// and every other DDL/DML keyword fail at this gate before reaching SQLite.\nfunc validateReadOnlyQuery(query string) error {\n\tupper := strings.ToUpper(stripLeadingSQLNoise(query))\n\tif !strings.HasPrefix(upper, \"SELECT\") && !strings.HasPrefix(upper, \"WITH\") {\n\t\treturn fmt.Errorf(\"only SELECT queries are allowed\")\n\t}\n\treturn nil\n}\n\n// stripLeadingSQLNoise removes leading whitespace, SQL line comments\n// (-- to end of line), block comments (/* ... */), and statement\n// separators (;) from query. SQLite skips these before parsing the first\n// keyword, so a security gate that does not strip them mismatches what the\n// driver actually executes.\nfunc stripLeadingSQLNoise(query string) string {\n\tfor {\n\t\tquery = strings.TrimLeft(query, \" \\t\\r\\n;\")\n\t\tswitch {\n\t\tcase strings.HasPrefix(query, \"--\"):\n\t\t\tif idx := strings.IndexByte(query, '\\n'); idx >= 0 {\n\t\t\t\tquery = query[idx+1:]\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn \"\"\n\t\tcase strings.HasPrefix(query, \"/*\"):\n\t\t\tif idx := strings.Index(query[2:], \"*/\"); idx >= 0 {\n\t\t\t\tquery = query[2+idx+2:]\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn \"\"\n\t\tdefault:\n\t\t\treturn query\n\t\t}\n\t}\n}\n\nfunc handleSQL(ctx context.Context, req mcplib.CallToolRequest) (*mcplib.CallToolResult, error) {\n\targs := req.GetArguments()\n\tquery, ok := args[\"query\"].(string)\n\tif !ok || query == \"\" {\n\t\treturn mcplib.NewToolResultError(\"query is required\"), nil\n\t}\n\n\tif err := validateReadOnlyQuery(query); err != nil {\n\t\treturn mcplib.NewToolResultError(err.Error()), nil\n\t}\n\n\tdb, err := store.OpenReadOnly(dbPath())\n\tif err != nil {\n\t\treturn mcplib.NewToolResultError(fmt.Sprintf(\"opening database: %v\", err)), nil\n\t}\n\tdefer db.Close()\n\n\trows, err := db.Query(query)\n\tif err != nil {\n\t\treturn mcplib.NewToolResultError(fmt.Sprintf(\"query failed: %v\", err)), nil\n\t}\n\tdefer rows.Close()\n\n\tcols, _ := rows.Columns()\n\tvar results []map[string]any\n\tfor rows.Next() {\n\t\tvalues := make([]any, len(cols))\n\t\tptrs := make([]any, len(cols))\n\t\tfor i := range values {\n\t\t\tptrs[i] = &values[i]\n\t\t}\n\t\trows.Scan(ptrs...)\n\t\trow := make(map[string]any)\n\t\tfor i, col := range cols {\n\t\t\trow[col] = values[i]\n\t\t}\n\t\tresults = append(results, row)\n\t}\n\n\tdata, _ := json.MarshalIndent(results, \"\", \" \")\n\treturn mcplib.NewToolResultText(string(data)), nil\n}\n\nfunc handleContext(_ context.Context, _ mcplib.CallToolRequest) (*mcplib.CallToolResult, error) {\n\tctx := map[string]any{\n\t\t\"api\": \"digg\",\n\t\t// PATCH(digg-rename-and-github-feeds): drop Digg AI 1000 branding; add github resource.\n\t\t\"description\": \"Tail Digg's news cycle, GitHub feeds, and pipeline events from the terminal — read-only, with rank-history nobody else surfaces.\",\n\t\t\"archetype\": \"generic\",\n\t\t\"tool_count\": 3,\n\t\t// tool_surface tells agents which surface a capability lives on.\n\t\t\"tool_surface\": \"MCP exposes typed endpoint tools plus a runtime mirror of user-facing CLI commands. Endpoint tools keep typed schemas; command-mirror tools shell out to the companion digg-pp-cli binary.\",\n\t\t\"resources\": []map[string]any{\n\t\t\t{\n\t\t\t\t\"name\": \"feed\",\n\t\t\t\t\"description\": \"Top-level story feed (HTML page; CLI parses the embedded RSC stream)\",\n\t\t\t\t\"endpoints\": []string{\"raw\", \"story_raw\"},\n\t\t\t\t\"searchable\": true,\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"name\": \"github\",\n\t\t\t\t\"description\": \"GitHub feeds Digg surfaces alongside the X-account leaderboard (stars / new / activity / recent).\",\n\t\t\t\t\"endpoints\": []string{\"stars\", \"new\", \"activity\", \"recent\"},\n\t\t\t\t\"searchable\": true,\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"name\": \"trending\",\n\t\t\t\t\"description\": \"Public ingestion-pipeline status and event stream\",\n\t\t\t\t\"endpoints\": []string{\"status\"},\n\t\t\t},\n\t\t},\n\t\t\"query_tips\": []string{\n\t\t\t\"Pagination uses cursor-based paging. Pass after parameter for subsequent pages.\",\n\t\t\t\"Control page size with the limit parameter (default 100).\",\n\t\t\t\"Use the sql tool for ad-hoc analysis on synced data. Run sync first to populate the local database.\",\n\t\t\t\"Use the search tool for full-text search across all synced resources. Faster than iterating list endpoints.\",\n\t\t\t\"Prefer sql/search over repeated API calls when the data is already synced.\",\n\t\t},\n\t\t// Command-mirror capabilities are exposed through MCP by shelling out\n\t\t// to the companion CLI binary.\n\t\t\"command_mirror_capabilities\": []map[string]string{\n\t\t\t{\"name\": \"Live pipeline event tail\", \"command\": \"events\", \"description\": \"Tail Digg's ingestion pipeline in real time — see clusters as they're detected, stories fast-climbing the...\", \"rationale\": \"Requires reading the public /api/trending/status JSON endpoint that the web UI consumes silently. The web UI shows...\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Replacement archaeology\", \"command\": \"replaced\", \"description\": \"Show stories that were knocked out of the rankings since the last sync, with Digg's own published replacement rationale.\", \"rationale\": \"Digg explicitly publishes a replacementRationale field per cluster. The web UI shows current rankings only — once...\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Score component breakdown\", \"command\": \"evidence\", \"description\": \"Print the full ranking transparency record for one cluster — scoreComponents, evidence array, numeratorLabel,...\", \"rationale\": \"Digg ships gravity-score components and evidence in the page payload. The web UI shows only the final gravity score.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Time-windowed sentiment\", \"command\": \"sentiment\", \"description\": \"Read per-time-window positivity ratios (pos6h, pos12h, pos24h, posLast) for a cluster.\", \"rationale\": \"Each cluster carries pos6h/12h/24h fields. No web UI surfaces them.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Cross-aggregator references\", \"command\": \"crossref\", \"description\": \"Show this cluster's Hacker News and Techmeme mirrors when Digg has detected the story is being discussed there.\", \"rationale\": \"Each cluster carries hackerNews and techmeme cross-reference fields populated by Digg's own pipeline.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Influence-ranked author leaderboard\", \"command\": \"authors top\", \"description\": \"Top accounts Digg tracks, ranked by Digg's influence score, story count, or reach.\", \"rationale\": \"Digg's product premise is a ranked leaderboard of AI-news accounts on X. The /ai/influencers page is currently 404; the data is embedded in every feed response.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"GitHub: top starred AI repos\", \"command\": \"github stars\", \"description\": \"Top AI repos ranked by starring activity from Digg-tracked accounts: stargazers, recent starrers, breakout/novel/ai_related scores, language, one-sentence classification.\", \"rationale\": \"Digg's /ai/github/stars page embeds the full repo + scoring JSON in its RSC payload. CLI extracts and exposes as structured records.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"GitHub: newly first-seen repos\", \"command\": \"github new\", \"description\": \"Recently first-seen GitHub repos with the Digg-tracked creator/starrer who first put them on Digg's radar (event_id, event_created_at, repo_full_name, creator).\", \"rationale\": \"Digg's /ai/github/new page exposes per-event flat records; CLI parses them.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"GitHub: contributor leaderboard\", \"command\": \"github activity\", \"description\": \"Top GitHub contributor leaderboard: per-author rank, contribution count, and distinct repos count over Digg's tracking window.\", \"rationale\": \"Digg's /ai/github/activity page lists contributors with rank + contribution + repos counts; CLI scrapes the rendered table.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"GitHub: live activity feed\", \"command\": \"github recent\", \"description\": \"Live GitHub activity feed: per-event entries with the GitHub URL (issue/PR/commit/repo), the user who acted, and a short description of the target.\", \"rationale\": \"Digg's /ai/github/recent page is a real-time event stream; CLI extracts the github.com URL + actor user JSON per entry.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Rank history per cluster\", \"command\": \"history\", \"description\": \"Full trajectory of one cluster's currentRank, peakRank, and delta over local snapshot history.\", \"rationale\": \"Local snapshots persist what the web UI overwrites every fetch.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Author surfacing record\", \"command\": \"author\", \"description\": \"Every cluster a given X account contributed to, with post type (original, retweet, quote, reply).\", \"rationale\": \"Cluster payloads list all contributing X posts with username, xId, displayName, and postType. Local store joins them...\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Rank-movement watcher\", \"command\": \"watch\", \"description\": \"Poll /ai, diff against last snapshot, alert when any cluster moves N+ ranks.\", \"rationale\": \"Read-only polling combined with the local snapshot store and AdaptiveLimiter.\", \"via\": \"mcp-command-mirror\"},\n\t\t\t{\"name\": \"Pipeline status dashboard\", \"command\": \"pipeline status\", \"description\": \"One-screen view of /api/trending/status: isFetching, nextFetchAt, storiesToday, clustersToday, last 5 events.\", \"rationale\": \"Operational telemetry endpoint exposed publicly; CLI presents it as a dashboard.\", \"via\": \"mcp-command-mirror\"},\n\t\t},\n\t\t\"playbook\": []map[string]string{\n\t\t\t{\"topic\": \"Live pipeline event tail\", \"insight\": \"Requires reading the public /api/trending/status JSON endpoint that the web UI consumes silently. The web UI shows nothing about pipeline state; this surfaces it.\"},\n\t\t\t{\"topic\": \"Replacement archaeology\", \"insight\": \"Digg explicitly publishes a replacementRationale field per cluster. The web UI shows current rankings only — once a story drops, the rationale is gone. The local snapshot store keeps it.\"},\n\t\t\t{\"topic\": \"Score component breakdown\", \"insight\": \"Digg ships gravity-score components and evidence in the page payload. The web UI shows only the final gravity score.\"},\n\t\t\t{\"topic\": \"Time-windowed sentiment\", \"insight\": \"Each cluster carries pos6h/12h/24h fields. No web UI surfaces them.\"},\n\t\t\t{\"topic\": \"Cross-aggregator references\", \"insight\": \"Each cluster carries hackerNews and techmeme cross-reference fields populated by Digg's own pipeline.\"},\n\t\t\t{\"topic\": \"Influence-ranked author leaderboard\", \"insight\": \"Digg's product premise is a ranked leaderboard of AI-news accounts on X. The /ai/influencers page is currently 404; the data is embedded in every feed response.\"},\n\t\t\t{\"topic\": \"GitHub feeds\", \"insight\": \"Digg surfaces four parallel GitHub views — /ai/github/{stars,new,activity,recent}. Stars and New embed rich JSON records (repo_full_name, stargazers_count, breakout_score, novel_score, ai_related_score, classification_tldr). Activity is a contributor leaderboard table. Recent is a live event stream with github.com URLs in href.\"},\n\t\t\t{\"topic\": \"Rank history per cluster\", \"insight\": \"Local snapshots persist what the web UI overwrites every fetch.\"},\n\t\t\t{\"topic\": \"Author surfacing record\", \"insight\": \"Cluster payloads list all contributing X posts with username, xId, displayName, and postType. Local store joins them per author.\"},\n\t\t\t{\"topic\": \"Rank-movement watcher\", \"insight\": \"Read-only polling combined with the local snapshot store and AdaptiveLimiter.\"},\n\t\t\t{\"topic\": \"Pipeline status dashboard\", \"insight\": \"Operational telemetry endpoint exposed publicly; CLI presents it as a dashboard.\"},\n\t\t},\n\t}\n\tdata, _ := json.MarshalIndent(ctx, \"\", \" \")\n\treturn mcplib.NewToolResultText(string(data)), nil\n}\n\n// RegisterNovelFeatureTools is kept as a compatibility no-op for older MCP\n// mains. New generated mains call RegisterTools only; RegisterTools now\n// includes the runtime Cobra-tree mirror.\nfunc RegisterNovelFeatureTools(s *server.MCPServer) {\n\t_ = s\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":21916,"content_sha256":"c7fd0c4a871c8591d6aa3fe40fdcc712d291f32494916ba59c5bdcc8827fbb1b"},{"filename":"internal/store/schema_version_test.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage store\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"errors\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t_ \"modernc.org/sqlite\"\n)\n\n// TestSchemaVersion_StampedOnFreshDB verifies that opening a brand-new\n// database stamps the current schema version. This is the contract that\n// makes StoreSchemaVersion upgrades safe: every freshly-created DB\n// records the version it was built under.\nfunc TestSchemaVersion_StampedOnFreshDB(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open fresh db: %v\", err)\n\t}\n\tdefer s.Close()\n\n\tv, err := s.SchemaVersion()\n\tif err != nil {\n\t\tt.Fatalf(\"read schema version: %v\", err)\n\t}\n\tif v != StoreSchemaVersion {\n\t\tt.Fatalf(\"fresh db version = %d, want %d\", v, StoreSchemaVersion)\n\t}\n}\n\n// TestSchemaVersion_StampExistingZeroDB verifies the stamp-and-continue\n// rule for existing deployed databases. A DB that predates the gate has\n// user_version = 0; opening it with this binary should stamp the version\n// to 1 without touching any data.\nfunc TestSchemaVersion_StampExistingZeroDB(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\t// Pre-create the DB with user_version = 0 and no tables, simulating\n\t// a database created by a pre-gate version of the binary before any\n\t// migrations ran.\n\traw, err := sql.Open(\"sqlite\", dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open raw: %v\", err)\n\t}\n\tif _, err := raw.Exec(`PRAGMA user_version = 0`); err != nil {\n\t\tt.Fatalf(\"stamp zero: %v\", err)\n\t}\n\traw.Close()\n\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open pre-gate db: %v\", err)\n\t}\n\tdefer s.Close()\n\n\tv, err := s.SchemaVersion()\n\tif err != nil {\n\t\tt.Fatalf(\"read schema version: %v\", err)\n\t}\n\tif v != StoreSchemaVersion {\n\t\tt.Fatalf(\"post-stamp version = %d, want %d\", v, StoreSchemaVersion)\n\t}\n}\n\n// TestSchemaVersion_RefusesNewerDB verifies fail-fast when the on-disk\n// schema is newer than the binary supports. Without this gate, a user\n// who upgrades their library but not their binary would hit silent\n// \"no such column\" errors instead of a clear version mismatch.\nfunc TestSchemaVersion_RefusesNewerDB(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\traw, err := sql.Open(\"sqlite\", dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open raw: %v\", err)\n\t}\n\tif _, err := raw.Exec(`PRAGMA user_version = 999`); err != nil {\n\t\tt.Fatalf(\"stamp future version: %v\", err)\n\t}\n\traw.Close()\n\n\t_, err = Open(dbPath)\n\tif err == nil {\n\t\tt.Fatalf(\"expected open to fail on newer schema, got nil\")\n\t}\n}\n\n// TestMigrate_ConcurrentFreshDB exercises the BEGIN IMMEDIATE migration\n// transaction. Without it, N goroutines opening the same fresh DB in\n// parallel race per CREATE TABLE statement and trip SQLITE_BUSY despite\n// the busy_timeout. With it, they serialize on the RESERVED lock\n// acquired at BEGIN time and every Open succeeds.\nfunc TestMigrate_ConcurrentFreshDB(t *testing.T) {\n\tif testing.Short() {\n\t\tt.Skip(\"concurrent migration test can take up to migrationLockTimeout under contention\")\n\t}\n\tt.Parallel()\n\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\tconst n = 8\n\terrs := make(chan error, n)\n\tvar wg sync.WaitGroup\n\twg.Add(n)\n\tfor i := 0; i \u003c n; i++ {\n\t\tgo func() {\n\t\t\tdefer wg.Done()\n\t\t\ts, err := Open(dbPath)\n\t\t\tif err != nil {\n\t\t\t\terrs \u003c- err\n\t\t\t\treturn\n\t\t\t}\n\t\t\ts.Close()\n\t\t}()\n\t}\n\twg.Wait()\n\tclose(errs)\n\n\tfor err := range errs {\n\t\tt.Fatalf(\"concurrent Open failed: %v\", err)\n\t}\n}\n\n// holdWriteLock takes an exclusive write lock on dbPath that a peer's\n// BEGIN IMMEDIATE cannot acquire until the returned cleanup runs. Used\n// to construct contention scenarios in the migration tests.\nfunc holdWriteLock(t *testing.T, dbPath string) (cleanup func()) {\n\tt.Helper()\n\tholder, err := sql.Open(\"sqlite\", dbPath+\"?_journal_mode=WAL&_busy_timeout=5000\")\n\tif err != nil {\n\t\tt.Fatalf(\"open holder: %v\", err)\n\t}\n\thtx, err := holder.Begin()\n\tif err != nil {\n\t\t_ = holder.Close()\n\t\tt.Fatalf(\"begin holder tx: %v\", err)\n\t}\n\tif _, err := htx.Exec(`CREATE TABLE IF NOT EXISTS holder_lock (id INTEGER)`); err != nil {\n\t\t_ = htx.Rollback()\n\t\t_ = holder.Close()\n\t\tt.Fatalf(\"seed holder write: %v\", err)\n\t}\n\treturn func() {\n\t\t_ = htx.Rollback()\n\t\t_ = holder.Close()\n\t}\n}\n\n// TestOpenWithContext_RespectsCancellation verifies that a caller that\n// cancels its context during a stalled migration sees the cancellation\n// surface as the returned error within a short window, instead of\n// having to wait out the full migrationLockTimeout. SIGINT in a Cobra\n// command's context must interrupt store.Open, not just block on it.\nfunc TestOpenWithContext_RespectsCancellation(t *testing.T) {\n\tt.Parallel()\n\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\tdefer holdWriteLock(t, dbPath)()\n\n\t// Pre-cancel the context. The migration's BEGIN IMMEDIATE will BUSY\n\t// against the holder; the very first iteration of retryOnBusy then\n\t// hits the ctx.Done() arm of its select and propagates ctx.Canceled.\n\t// A blocked-then-cancel pattern using time.Sleep would prove the\n\t// same property but cost the sleep interval on every CI run.\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\tstart := time.Now()\n\t_, err := OpenWithContext(ctx, dbPath)\n\telapsed := time.Since(start)\n\n\tif err == nil {\n\t\tt.Fatalf(\"expected OpenWithContext to fail under contention with cancelled ctx\")\n\t}\n\tif !errors.Is(err, context.Canceled) {\n\t\tt.Fatalf(\"expected context.Canceled in error chain, got: %v\", err)\n\t}\n\t// Without ctx threading this would block until migrationLockTimeout\n\t// (default 30s). 5s is generous headroom over the actual return\n\t// time (microseconds for a pre-cancelled ctx) without flaking CI.\n\tif elapsed > 5*time.Second {\n\t\tt.Fatalf(\"OpenWithContext returned after %s; pre-cancelled ctx should short-circuit immediately\", elapsed)\n\t}\n}\n\n// TestMigrate_RejectsNewerDBImmediately verifies that an old binary\n// opening a newer-schema DB rejects fast even when a peer migrator is\n// still holding the write lock. The schema-version check runs on the\n// pinned connection BEFORE BEGIN IMMEDIATE so the rejection path\n// doesn't have to wait out the migration lock.\nfunc TestMigrate_RejectsNewerDBImmediately(t *testing.T) {\n\tt.Parallel()\n\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\t// Pre-stamp the DB at a version this binary doesn't support.\n\traw, err := sql.Open(\"sqlite\", dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open raw: %v\", err)\n\t}\n\tif _, err := raw.Exec(`PRAGMA user_version = 999`); err != nil {\n\t\tt.Fatalf(\"stamp future version: %v\", err)\n\t}\n\traw.Close()\n\n\tdefer holdWriteLock(t, dbPath)()\n\n\tstart := time.Now()\n\t_, err = Open(dbPath)\n\telapsed := time.Since(start)\n\n\tif err == nil {\n\t\tt.Fatalf(\"expected Open to refuse a newer-schema DB\")\n\t}\n\t// The fast-path goal: rejection must arrive well under\n\t// migrationLockTimeout. 5s leaves headroom over the WAL init race\n\t// (a few ms in practice) without being so tight CI flakes.\n\tif elapsed > 5*time.Second {\n\t\tt.Fatalf(\"Open rejected after %s; fast-path should reject in well under migrationLockTimeout (30s)\", elapsed)\n\t}\n}\n\n// TestSchemaVersion_ReopenIsIdempotent verifies that opening an already\n// correctly-stamped DB is a no-op — the second open reads the version\n// and the migrations are all idempotent (CREATE TABLE IF NOT EXISTS).\nfunc TestSchemaVersion_ReopenIsIdempotent(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\ts1, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"first open: %v\", err)\n\t}\n\ts1.Close()\n\n\ts2, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"second open: %v\", err)\n\t}\n\tdefer s2.Close()\n\n\tv, err := s2.SchemaVersion()\n\tif err != nil {\n\t\tt.Fatalf(\"read schema version: %v\", err)\n\t}\n\tif v != StoreSchemaVersion {\n\t\tt.Fatalf(\"reopened version = %d, want %d\", v, StoreSchemaVersion)\n\t}\n}\n\n// TestOpenReadOnly_RejectsWrites pins the contract: direct and CTE-wrapped\n// writes against the main DB fail under mode=ro. Deliberately does not\n// assert VACUUM INTO and ATTACH DATABASE — modernc.org/sqlite allows both\n// under mode=ro, so those defenses live in the handleSQL keyword blocklist.\nfunc TestOpenReadOnly_RejectsWrites(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\trw, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"seed open: %v\", err)\n\t}\n\tif _, err := rw.DB().Exec(`INSERT INTO resources (id, resource_type, data) VALUES ('seed', 'thing', '{}')`); err != nil {\n\t\tt.Fatalf(\"seed insert: %v\", err)\n\t}\n\trw.Close()\n\n\tro, err := OpenReadOnly(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open read-only: %v\", err)\n\t}\n\tdefer ro.Close()\n\n\twrites := []struct {\n\t\tname string\n\t\tstmt string\n\t}{\n\t\t{\"insert\", `INSERT INTO resources (id, resource_type, data) VALUES ('x', 'y', '{}')`},\n\t\t{\"update\", `UPDATE resources SET resource_type = 'hijacked' WHERE id = 'seed'`},\n\t\t{\"delete\", `DELETE FROM resources WHERE id = 'seed'`},\n\t\t{\"replace\", `REPLACE INTO resources (id, resource_type, data) VALUES ('seed', 'evil', '{}')`},\n\t\t// CTE-wrapped INSERT is load-bearing: it justifies leaving WITH\n\t\t// out of the handleSQL blocklist so SELECT-form CTEs work.\n\t\t{\"cte_insert\", `WITH stale AS (SELECT id FROM resources) INSERT INTO resources (id, resource_type, data) SELECT id || '-evil', 'thing', '{}' FROM stale`},\n\t}\n\tfor _, w := range writes {\n\t\tif _, err := ro.DB().Exec(w.stmt); err == nil {\n\t\t\tt.Errorf(\"%s succeeded under mode=ro; expected rejection. stmt=%q\", w.name, w.stmt)\n\t\t}\n\t}\n\n\tvar count int\n\tif err := ro.DB().QueryRow(`SELECT COUNT(*) FROM resources`).Scan(&count); err != nil {\n\t\tt.Fatalf(\"read-only SELECT failed: %v\", err)\n\t}\n\tif count != 1 {\n\t\tt.Fatalf(\"SELECT returned %d rows, want 1 (only the seed should remain)\", count)\n\t}\n\tif err := ro.DB().QueryRow(`WITH r AS (SELECT id FROM resources WHERE id = 'seed') SELECT COUNT(*) FROM r`).Scan(&count); err != nil {\n\t\tt.Fatalf(\"read-only WITH...SELECT CTE failed: %v\", err)\n\t}\n\tif count != 1 {\n\t\tt.Fatalf(\"CTE SELECT returned %d rows, want 1\", count)\n\t}\n}\n\n// TestMigrate_AddsColumnsOnUpgrade_Feed verifies that opening a\n// database created by an older binary succeeds and adds newly generated\n// columns before CREATE INDEX runs against the pre-existing table. Regression\n// coverage for parent_id upgrades and indexed generated columns.\nfunc TestMigrate_AddsColumnsOnUpgrade_Feed(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\t// Pre-create the DB with the older table shape: id, data, synced_at and\n\t// none of the newer generated columns. user_version stays 0 (pre-gate).\n\traw, err := sql.Open(\"sqlite\", dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open raw: %v\", err)\n\t}\n\tif _, err := raw.Exec(`CREATE TABLE feed (\n\t\tid TEXT PRIMARY KEY,\n\t\tdata JSON NOT NULL,\n\t\tsynced_at DATETIME DEFAULT CURRENT_TIMESTAMP\n\t)`); err != nil {\n\t\traw.Close()\n\t\tt.Fatalf(\"create old table: %v\", err)\n\t}\n\traw.Close()\n\n\t// Opening with the new binary must run CREATE INDEX statements without\n\t// erroring on missing generated columns.\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open upgraded db: %v\", err)\n\t}\n\tdefer s.Close()\n\n\t// The migration must have added every generated column.\n\trows, err := s.DB().Query(`PRAGMA table_info(feed)`)\n\tif err != nil {\n\t\tt.Fatalf(\"table_info: %v\", err)\n\t}\n\tdefer rows.Close()\n\n\thasColumn := make(map[string]bool)\n\tfor rows.Next() {\n\t\tvar cid int\n\t\tvar name, typ string\n\t\tvar notnull, pk int\n\t\tvar dflt sql.NullString\n\t\tif err := rows.Scan(&cid, &name, &typ, ¬null, &dflt, &pk); err != nil {\n\t\t\tt.Fatalf(\"scan: %v\", err)\n\t\t}\n\t\thasColumn[name] = true\n\t}\n\tif err := rows.Err(); err != nil {\n\t\tt.Fatalf(\"rows: %v\", err)\n\t}\n\n\tfor _, want := range []string{\n\t\t\"body\",\n\t} {\n\t\tif !hasColumn[want] {\n\t\t\tt.Fatalf(\"%s column missing from feed after migrate\", want)\n\t\t}\n\t}\n}\n\n// TestMigrate_AddsColumnsOnUpgrade_Trending verifies that opening a\n// database created by an older binary succeeds and adds newly generated\n// columns before CREATE INDEX runs against the pre-existing table. Regression\n// coverage for parent_id upgrades and indexed generated columns.\nfunc TestMigrate_AddsColumnsOnUpgrade_Trending(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\t// Pre-create the DB with the older table shape: id, data, synced_at and\n\t// none of the newer generated columns. user_version stays 0 (pre-gate).\n\traw, err := sql.Open(\"sqlite\", dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open raw: %v\", err)\n\t}\n\tif _, err := raw.Exec(`CREATE TABLE trending (\n\t\tid TEXT PRIMARY KEY,\n\t\tdata JSON NOT NULL,\n\t\tsynced_at DATETIME DEFAULT CURRENT_TIMESTAMP\n\t)`); err != nil {\n\t\traw.Close()\n\t\tt.Fatalf(\"create old table: %v\", err)\n\t}\n\traw.Close()\n\n\t// Opening with the new binary must run CREATE INDEX statements without\n\t// erroring on missing generated columns.\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open upgraded db: %v\", err)\n\t}\n\tdefer s.Close()\n\n\t// The migration must have added every generated column.\n\trows, err := s.DB().Query(`PRAGMA table_info(trending)`)\n\tif err != nil {\n\t\tt.Fatalf(\"table_info: %v\", err)\n\t}\n\tdefer rows.Close()\n\n\thasColumn := make(map[string]bool)\n\tfor rows.Next() {\n\t\tvar cid int\n\t\tvar name, typ string\n\t\tvar notnull, pk int\n\t\tvar dflt sql.NullString\n\t\tif err := rows.Scan(&cid, &name, &typ, ¬null, &dflt, &pk); err != nil {\n\t\t\tt.Fatalf(\"scan: %v\", err)\n\t\t}\n\t\thasColumn[name] = true\n\t}\n\tif err := rows.Err(); err != nil {\n\t\tt.Fatalf(\"rows: %v\", err)\n\t}\n\n\tfor _, want := range []string{\n\t\t\"computed_at\",\n\t\t\"next_fetch_at\",\n\t\t\"last_fetch_completed_at\",\n\t\t\"is_fetching\",\n\t\t\"stories_today\",\n\t\t\"clusters_today\",\n\t} {\n\t\tif !hasColumn[want] {\n\t\t\tt.Fatalf(\"%s column missing from trending after migrate\", want)\n\t\t}\n\t}\n}\n\n// TestMigrate_AddsColumnsOnUpgrade_SyncState verifies that opening a\n// database created by an older binary succeeds and adds newly generated\n// columns before CREATE INDEX runs against the pre-existing table. Regression\n// coverage for parent_id upgrades and indexed generated columns.\nfunc TestMigrate_AddsColumnsOnUpgrade_SyncState(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\n\t// Pre-create the DB with the older table shape: id, data, synced_at and\n\t// none of the newer generated columns. user_version stays 0 (pre-gate).\n\traw, err := sql.Open(\"sqlite\", dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open raw: %v\", err)\n\t}\n\tif _, err := raw.Exec(`CREATE TABLE sync_state (\n\t\tid TEXT PRIMARY KEY,\n\t\tdata JSON NOT NULL,\n\t\tsynced_at DATETIME DEFAULT CURRENT_TIMESTAMP\n\t)`); err != nil {\n\t\traw.Close()\n\t\tt.Fatalf(\"create old table: %v\", err)\n\t}\n\traw.Close()\n\n\t// Opening with the new binary must run CREATE INDEX statements without\n\t// erroring on missing generated columns.\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open upgraded db: %v\", err)\n\t}\n\tdefer s.Close()\n\n\t// The migration must have added every generated column.\n\trows, err := s.DB().Query(`PRAGMA table_info(sync_state)`)\n\tif err != nil {\n\t\tt.Fatalf(\"table_info: %v\", err)\n\t}\n\tdefer rows.Close()\n\n\thasColumn := make(map[string]bool)\n\tfor rows.Next() {\n\t\tvar cid int\n\t\tvar name, typ string\n\t\tvar notnull, pk int\n\t\tvar dflt sql.NullString\n\t\tif err := rows.Scan(&cid, &name, &typ, ¬null, &dflt, &pk); err != nil {\n\t\t\tt.Fatalf(\"scan: %v\", err)\n\t\t}\n\t\thasColumn[name] = true\n\t}\n\tif err := rows.Err(); err != nil {\n\t\tt.Fatalf(\"rows: %v\", err)\n\t}\n\n\tfor _, want := range []string{\n\t\t\"last_cursor\",\n\t\t\"last_synced_at\",\n\t\t\"total_count\",\n\t} {\n\t\tif !hasColumn[want] {\n\t\t\tt.Fatalf(\"%s column missing from sync_state after migrate\", want)\n\t\t}\n\t}\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":15530,"content_sha256":"144109e390a6627db65b9146d515e244b0bddcfeddc8ecc1f28ce5f77dba3c7b"},{"filename":"internal/store/store.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\n// Package store provides local SQLite persistence for digg-pp-cli.\n// Uses modernc.org/sqlite (pure Go, no CGO) for zero-dependency cross-compilation.\n// FTS5 full-text search indexes are created for searchable content.\npackage store\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t_ \"modernc.org/sqlite\"\n)\n\nvar uuidPattern = regexp.MustCompile(`^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12} pp-digg — Skillopedia )\n\n// IsUUID returns true if the input looks like a UUID.\nfunc IsUUID(s string) bool {\n\treturn uuidPattern.MatchString(s)\n}\n\n// StoreSchemaVersion is the on-disk schema version this binary understands.\n// It is stamped into SQLite's PRAGMA user_version on fresh databases and\n// checked on every open. Bump this whenever a migration changes table\n// shape — adding columns, dropping indexes, changing FTS5 tokenizers —\n// so an older binary refuses to open a newer database rather than silently\n// producing wrong results against a schema it cannot read.\nconst StoreSchemaVersion = 1\n\ntype Store struct {\n\tdb *sql.DB\n\t// writeMu serializes all DB writes. Read paths bypass the lock and run\n\t// concurrently against WAL. Resource-level concurrency in sync.go.tmpl\n\t// is 1 (one goroutine per resource via len(resources)-sized work channel)\n\t// — read-then-write sequences (e.g., GetSyncCursor → SaveSyncState) are\n\t// race-free by construction within a resource.\n\twriteMu sync.Mutex\n\tpath string\n}\n\n// Open opens or creates the SQLite store at dbPath using the background\n// context. Prefer OpenWithContext from a Cobra command so SIGINT during\n// a slow migration interrupts the open instead of stranding the caller.\nfunc Open(dbPath string) (*Store, error) {\n\treturn OpenWithContext(context.Background(), dbPath)\n}\n\n// OpenReadOnly opens an existing SQLite store at dbPath in read-only mode.\n// mode=ro rejects direct and CTE-wrapped writes (INSERT, UPDATE, DELETE,\n// REPLACE, \"WITH x AS (...) INSERT ...\") at the driver level. Skips\n// MkdirAll and migrate; the file is expected to exist.\n//\n// The file: URI prefix is load-bearing: modernc.org/sqlite only honors\n// SQLite's URI query parameters (mode, cache, etc.) when the DSN starts\n// with \"file:\". Without the prefix, \"?mode=ro\" is silently dropped and\n// the connection opens read-write. Pragmas use the driver's _pragma=\n// name(value) syntax — modernc.org/sqlite does NOT recognize the\n// mattn/go-sqlite3 _journal_mode=WAL / _busy_timeout=5000 form and drops\n// those keys silently, so the busy_timeout below is what keeps a read\n// concurrent with a writer from failing immediately with SQLITE_BUSY.\nfunc OpenReadOnly(dbPath string) (*Store, error) {\n\tdb, err := sql.Open(\"sqlite\", \"file:\"+dbPath+\"?mode=ro&_pragma=busy_timeout(5000)&_pragma=foreign_keys(ON)&_pragma=temp_store(MEMORY)&_pragma=mmap_size(268435456)\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"opening database (read-only): %w\", err)\n\t}\n\tdb.SetMaxOpenConns(2)\n\treturn &Store{db: db, path: dbPath}, nil\n}\n\n// OpenWithContext opens or creates the SQLite store at dbPath. The\n// context is honored by the migration path: cancellation interrupts the\n// retry-on-SQLITE_BUSY loop and propagates ctx.Err() back to the caller\n// instead of waiting out the full migrationLockTimeout.\nfunc OpenWithContext(ctx context.Context, dbPath string) (*Store, error) {\n\tif err := os.MkdirAll(filepath.Dir(dbPath), 0o755); err != nil {\n\t\treturn nil, fmt.Errorf(\"creating db directory: %w\", err)\n\t}\n\n\tdb, err := sql.Open(\"sqlite\", dbPath+\"?_pragma=journal_mode(WAL)&_pragma=synchronous(NORMAL)&_pragma=busy_timeout(5000)&_pragma=foreign_keys(ON)&_pragma=temp_store(MEMORY)&_pragma=mmap_size(268435456)\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"opening database: %w\", err)\n\t}\n\n\t// WAL mode + 2 connections allows one read cursor open while a second\n\t// query executes (e.g., analytics commands calling helpers during row\n\t// iteration). Writes are still serialized by SQLite's WAL lock.\n\tdb.SetMaxOpenConns(2)\n\n\ts := &Store{db: db, path: dbPath}\n\tif err := s.migrate(ctx); err != nil {\n\t\tdb.Close()\n\t\treturn nil, fmt.Errorf(\"running migrations: %w\", err)\n\t}\n\n\treturn s, nil\n}\n\nfunc (s *Store) Close() error {\n\treturn s.db.Close()\n}\n\n// Path returns the on-disk path of the backing SQLite file.\nfunc (s *Store) Path() string {\n\treturn s.path\n}\n\n// DB exposes the underlying *sql.DB for callers that need to run ad-hoc\n// queries (e.g., doctor's cache inspection, share snapshot import).\n// Callers must not call Close on the returned handle.\nfunc (s *Store) DB() *sql.DB {\n\treturn s.db\n}\n\n// SchemaVersion reads PRAGMA user_version, which is stamped by migrate().\n// A zero value means the database predates the schema-version gate — not\n// a bug, but the caller may want to warn.\nfunc (s *Store) SchemaVersion() (int, error) {\n\tvar v int\n\tif err := s.db.QueryRow(`PRAGMA user_version`).Scan(&v); err != nil {\n\t\treturn 0, fmt.Errorf(\"read user_version: %w\", err)\n\t}\n\treturn v, nil\n}\n\n// ensureColumn adds a column to an existing table if it isn't already\n// present. It is the upgrade-path safety valve for schema additions:\n// CREATE TABLE IF NOT EXISTS is a no-op when the table already exists, so\n// columns added by newer binaries (e.g. parent_id from the dependent-\n// resources work) never land on databases created by older binaries —\n// which then trip \"no such column\" when a follow-on CREATE INDEX runs.\n//\n// Skips silently if the table doesn't yet exist (fresh install — the\n// CREATE TABLE migration will create it with the column already declared)\n// or if the column already exists. Runs on the pinned migration\n// connection so it sees the writes performed by the in-flight BEGIN\n// IMMEDIATE transaction; using s.db here would route through the pool\n// and BUSY against the holding writer under concurrent migrators.\nfunc (s *Store) ensureColumn(ctx context.Context, conn *sql.Conn, table, column, decl string) error {\n\tvar name string\n\terr := conn.QueryRowContext(ctx,\n\t\t`SELECT name FROM sqlite_master WHERE type='table' AND name=?`, table,\n\t).Scan(&name)\n\tif err == sql.ErrNoRows {\n\t\treturn nil\n\t}\n\tif err != nil {\n\t\treturn fmt.Errorf(\"checking table %s: %w\", table, err)\n\t}\n\n\trows, err := conn.QueryContext(ctx, fmt.Sprintf(`PRAGMA table_info(\"%s\")`, table))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"table_info %s: %w\", table, err)\n\t}\n\tdefer rows.Close()\n\tfor rows.Next() {\n\t\tvar cid int\n\t\tvar n, typ string\n\t\tvar notnull, pk int\n\t\tvar dflt sql.NullString\n\t\tif err := rows.Scan(&cid, &n, &typ, ¬null, &dflt, &pk); err != nil {\n\t\t\treturn fmt.Errorf(\"scan table_info %s: %w\", table, err)\n\t\t}\n\t\tif n == column {\n\t\t\treturn nil\n\t\t}\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn fmt.Errorf(\"iterating table_info %s: %w\", table, err)\n\t}\n\n\tif _, err := conn.ExecContext(ctx, fmt.Sprintf(`ALTER TABLE \"%s\" ADD COLUMN \"%s\" %s`, table, column, decl)); err != nil {\n\t\t// A concurrent Open() may have added the column between our\n\t\t// PRAGMA check and this ALTER. SQLite returns SQLITE_ERROR with\n\t\t// \"duplicate column name\", which busy_timeout does not retry.\n\t\t// The DB is now in the desired state regardless of who won.\n\t\tif strings.Contains(err.Error(), \"duplicate column name\") {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"add column %s.%s: %w\", table, column, err)\n\t}\n\treturn nil\n}\n\n// backfillColumns adds columns that newer binaries declare but that\n// pre-existing databases (created before those columns were added) lack.\n// Must run before the migrations slice so that subsequent CREATE INDEX\n// statements referencing the column can succeed against the upgraded\n// table. Idempotent: safe to call on fresh DBs (table-not-found short-\n// circuit) and on already-current DBs (column-exists short-circuit).\n//\n// Table names are emitted bare (no safeName) — ensureColumn double-quotes\n// them at SQL emit time and uses parameter binding for the sqlite_master\n// lookup, so the values flow as Go string literals first and SQL\n// identifiers second. Wrapping with safeName here would embed literal\n// double-quote characters into the Go string and break compilation for\n// any spec whose dependent-resource snake_cased name is a SQL reserved\n// word.\nfunc (s *Store) backfillColumns(ctx context.Context, conn *sql.Conn) error {\n\tfor _, c := range []struct{ table, column, decl string }{\n\t\t{table: \"feed\", column: \"body\", decl: \"TEXT\"},\n\t\t{table: \"trending\", column: \"computed_at\", decl: \"TEXT\"},\n\t\t{table: \"trending\", column: \"next_fetch_at\", decl: \"TEXT\"},\n\t\t{table: \"trending\", column: \"last_fetch_completed_at\", decl: \"TEXT\"},\n\t\t{table: \"trending\", column: \"is_fetching\", decl: \"INTEGER\"},\n\t\t{table: \"trending\", column: \"stories_today\", decl: \"INTEGER\"},\n\t\t{table: \"trending\", column: \"clusters_today\", decl: \"INTEGER\"},\n\t\t{table: \"sync_state\", column: \"last_cursor\", decl: \"TEXT\"},\n\t\t{table: \"sync_state\", column: \"last_synced_at\", decl: \"DATETIME\"},\n\t\t{table: \"sync_state\", column: \"total_count\", decl: \"INTEGER DEFAULT 0\"},\n\t} {\n\t\tif err := s.ensureColumn(ctx, conn, c.table, c.column, c.decl); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (s *Store) migrate(ctx context.Context) error {\n\tconn, err := s.db.Conn(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"acquiring migration connection: %w\", err)\n\t}\n\tdefer conn.Close()\n\n\t// Read user_version before the migration lock so an old binary\n\t// opening a newer-schema DB rejects immediately. WAL readers don't\n\t// normally block on writers, but the fresh-DB WAL-init race can BUSY\n\t// a SELECT — share the lock's deadline so total budget stays bounded.\n\tdeadline := time.Now().Add(migrationLockTimeout)\n\tvar current int\n\tif err := retryOnBusy(ctx, deadline, \"reading schema version\", func() error {\n\t\treturn conn.QueryRowContext(ctx, `PRAGMA user_version`).Scan(¤t)\n\t}); err != nil {\n\t\treturn err\n\t}\n\tif current > StoreSchemaVersion {\n\t\treturn fmt.Errorf(\"database schema version %d is newer than supported version %d; upgrade the CLI binary or open an older database\", current, StoreSchemaVersion)\n\t}\n\n\tmigrations := []string{\n\t\t`CREATE TABLE IF NOT EXISTS resources (\n\t\t\tid TEXT PRIMARY KEY,\n\t\t\tresource_type TEXT NOT NULL,\n\t\t\tdata JSON NOT NULL,\n\t\t\tsynced_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n\t\t\tupdated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n\t\t)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_resources_type ON resources(resource_type)`,\n\t\t`CREATE INDEX IF NOT EXISTS idx_resources_synced ON resources(synced_at)`,\n\t\t`CREATE TABLE IF NOT EXISTS sync_state (\n\t\t\tresource_type TEXT PRIMARY KEY,\n\t\t\tlast_cursor TEXT,\n\t\t\tlast_synced_at DATETIME,\n\t\t\ttotal_count INTEGER DEFAULT 0\n\t\t)`,\n\t\t`CREATE VIRTUAL TABLE IF NOT EXISTS resources_fts USING fts5(\n\t\t\tid, resource_type, content, tokenize='porter unicode61'\n\t\t)`,\n\t\t`CREATE TABLE IF NOT EXISTS feed (\n\t\t\tid TEXT PRIMARY KEY,\n\t\t\tdata JSON NOT NULL,\n\t\t\tsynced_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n\t\t\tbody TEXT\n\t\t)`,\n\t\t`CREATE TABLE IF NOT EXISTS trending (\n\t\t\tid TEXT PRIMARY KEY,\n\t\t\tdata JSON NOT NULL,\n\t\t\tsynced_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n\t\t\tcomputed_at TEXT,\n\t\t\tnext_fetch_at TEXT,\n\t\t\tlast_fetch_completed_at TEXT,\n\t\t\tis_fetching INTEGER,\n\t\t\tstories_today INTEGER,\n\t\t\tclusters_today INTEGER\n\t\t)`,\n\t}\n\n\t// Run every migration — including the column backfill and the\n\t// schema-version stamp — inside a single BEGIN IMMEDIATE transaction\n\t// pinned to one connection. IMMEDIATE acquires SQLite's RESERVED lock\n\t// at BEGIN time so concurrent migrators serialize on it instead of\n\t// racing per-statement and tripping SQLITE_BUSY despite busy_timeout.\n\t// modernc.org/sqlite's busy_timeout does not always cover write-write\n\t// contention at BEGIN/COMMIT time, so we retry both explicitly on\n\t// SQLITE_BUSY for up to migrationLockTimeout.\n\treturn withMigrationLock(ctx, conn, deadline, func() error {\n\t\t// Re-read user_version inside the lock. This is load-bearing,\n\t\t// not paranoid: between the pre-lock read above and our\n\t\t// successful BEGIN IMMEDIATE, a newer-binary peer may have\n\t\t// committed a higher version stamp. Without this re-read, an\n\t\t// older binary (smaller StoreSchemaVersion) would proceed to\n\t\t// stamp its own lower version at the end of the closure,\n\t\t// silently downgrading user_version on a schema that's already\n\t\t// at the newer level. Future maintainers: leave this read in.\n\t\tvar current int\n\t\tif err := conn.QueryRowContext(ctx, `PRAGMA user_version`).Scan(¤t); err != nil {\n\t\t\treturn fmt.Errorf(\"reading schema version: %w\", err)\n\t\t}\n\t\tif current > StoreSchemaVersion {\n\t\t\treturn fmt.Errorf(\"database schema version %d is newer than supported version %d; upgrade the CLI binary or open an older database\", current, StoreSchemaVersion)\n\t\t}\n\n\t\tif err := s.backfillColumns(ctx, conn); err != nil {\n\t\t\treturn fmt.Errorf(\"backfilling columns: %w\", err)\n\t\t}\n\t\tfor _, m := range migrations {\n\t\t\tif _, err := conn.ExecContext(ctx, m); err != nil {\n\t\t\t\treturn fmt.Errorf(\"migration failed: %w\", err)\n\t\t\t}\n\t\t}\n\t\t// Stamp the schema version. On a fresh DB this writes 1; on an\n\t\t// already-stamped DB this is a no-op write of the same value.\n\t\t// An older DB with user_version = 0 and pre-existing tables\n\t\t// gets stamped here without any data rewrites because the\n\t\t// migrations above are idempotent via CREATE TABLE IF NOT EXISTS.\n\t\tif _, err := conn.ExecContext(ctx, fmt.Sprintf(`PRAGMA user_version = %d`, StoreSchemaVersion)); err != nil {\n\t\t\treturn fmt.Errorf(\"stamp user_version: %w\", err)\n\t\t}\n\t\treturn nil\n\t})\n}\n\nconst (\n\tmigrationLockTimeout = 30 * time.Second\n\tmigrationLockBackoffMin = 5 * time.Millisecond\n\tmigrationLockBackoffMax = 100 * time.Millisecond\n)\n\n// withMigrationLock runs fn inside a BEGIN IMMEDIATE / COMMIT pair on\n// conn, retrying both BEGIN and COMMIT on SQLITE_BUSY against the\n// caller-provided deadline. Sharing the deadline with the pre-lock\n// version read keeps total Open() latency bounded by a single budget.\n// The real upper bound is deadline + one trailing backoff interval\n// (≤100ms) + the driver's busy_timeout for the in-flight Exec, since\n// the deadline is checked after each failed attempt rather than as a\n// hard wall-clock cutoff. fn must use conn (not s.db) so its writes\n// participate in the held transaction.\nfunc withMigrationLock(ctx context.Context, conn *sql.Conn, deadline time.Time, fn func() error) error {\n\tif err := execWithBusyRetry(ctx, conn, \"BEGIN IMMEDIATE\", \"begin migration transaction\", deadline); err != nil {\n\t\treturn err\n\t}\n\tcommitted := false\n\tdefer func() {\n\t\tif committed {\n\t\t\treturn\n\t\t}\n\t\t// ROLLBACK uses context.Background() so caller-context cancellation\n\t\t// can't strand the connection in an open transaction. A failed\n\t\t// rollback is rare on local SQLite (broken file handle, fatal\n\t\t// driver error) but worth surfacing — silent swallow leaves a\n\t\t// pinned connection returned to the pool with state that will\n\t\t// confuse later queries.\n\t\tif _, rerr := conn.ExecContext(context.Background(), \"ROLLBACK\"); rerr != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"warning: store migration rollback failed: %v\\n\", rerr)\n\t\t}\n\t}()\n\n\tif err := fn(); err != nil {\n\t\treturn err\n\t}\n\n\tif err := execWithBusyRetry(ctx, conn, \"COMMIT\", \"commit migration transaction\", deadline); err != nil {\n\t\treturn err\n\t}\n\tcommitted = true\n\treturn nil\n}\n\n// execWithBusyRetry runs stmt on conn and retries on SQLITE_BUSY until\n// deadline. It covers BEGIN IMMEDIATE and COMMIT contention;\n// modernc.org/sqlite's busy_timeout does not reliably cover either when\n// multiple connections race for the WAL write lock.\nfunc execWithBusyRetry(ctx context.Context, conn *sql.Conn, stmt, label string, deadline time.Time) error {\n\treturn retryOnBusy(ctx, deadline, label, func() error {\n\t\t_, err := conn.ExecContext(ctx, stmt)\n\t\treturn err\n\t})\n}\n\n// retryOnBusy runs op and retries it on SQLITE_BUSY/LOCKED until\n// deadline. The same retry shape covers Exec, Query, and any other\n// SQLite call that can race the WAL writer lock — including the\n// pre-lock user_version read, where the WAL initialization race on a\n// fresh DB can BUSY a SELECT that should otherwise succeed under WAL\n// reader/writer concurrency.\nfunc retryOnBusy(ctx context.Context, deadline time.Time, label string, op func() error) error {\n\tbackoff := migrationLockBackoffMin\n\tfor {\n\t\terr := op()\n\t\tif err == nil {\n\t\t\treturn nil\n\t\t}\n\t\tif !isSQLiteBusy(err) {\n\t\t\treturn fmt.Errorf(\"%s: %w\", label, err)\n\t\t}\n\t\tif time.Now().After(deadline) {\n\t\t\t// The label carries the operation context (e.g. \"begin\n\t\t\t// migration transaction\", \"reading schema version\") — we\n\t\t\t// don't hardcode \"waiting for write lock\" because pre-lock\n\t\t\t// reads also flow through this helper.\n\t\t\treturn fmt.Errorf(\"%s: timed out after %s under SQLite contention: %w\", label, migrationLockTimeout, err)\n\t\t}\n\t\tselect {\n\t\tcase \u003c-ctx.Done():\n\t\t\treturn fmt.Errorf(\"%s: %w\", label, ctx.Err())\n\t\tcase \u003c-time.After(backoff):\n\t\t}\n\t\tbackoff = min(backoff*2, migrationLockBackoffMax)\n\t}\n}\n\n// isSQLiteBusy reports whether err is a retryable SQLite lock condition.\n// Covers both the file-level WAL writer race (SQLITE_BUSY / \"database is\n// locked\") and the table-level shared-cache contention (SQLITE_LOCKED /\n// \"database table is locked\"). The match is on the error string because\n// modernc.org/sqlite does not export an error type the generated code\n// can switch on without dragging the driver package into every store\n// consumer.\nfunc isSQLiteBusy(err error) bool {\n\tif err == nil {\n\t\treturn false\n\t}\n\tmsg := err.Error()\n\treturn strings.Contains(msg, \"SQLITE_BUSY\") ||\n\t\tstrings.Contains(msg, \"SQLITE_LOCKED\") ||\n\t\tstrings.Contains(msg, \"database is locked\") ||\n\t\tstrings.Contains(msg, \"database table is locked\")\n}\n\nfunc (s *Store) upsertGenericResourceTx(tx *sql.Tx, resourceType, id string, data json.RawMessage) error {\n\t_, err := tx.Exec(\n\t\t`INSERT INTO resources (id, resource_type, data, synced_at, updated_at)\n\t\t VALUES (?, ?, ?, ?, ?)\n\t\t ON CONFLICT(id) DO UPDATE SET data = excluded.data, synced_at = excluded.synced_at, updated_at = excluded.updated_at`,\n\t\tid, resourceType, string(data), time.Now(), time.Now(),\n\t)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tftsRowid := ftsRowID(id)\n\t// Use explicit rowid for FTS5 compatibility with modernc.org/sqlite.\n\t// Standard DELETE WHERE column=? may not work on FTS5 virtual tables.\n\tif _, err = tx.Exec(`DELETE FROM resources_fts WHERE rowid = ?`, ftsRowid); err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"warning: FTS index cleanup failed: %v\\n\", err)\n\t}\n\n\tif _, err = tx.Exec(\n\t\t`INSERT INTO resources_fts (rowid, id, resource_type, content)\n\t\t VALUES (?, ?, ?, ?)`,\n\t\tftsRowid, id, resourceType, string(data),\n\t); err != nil {\n\t\t// FTS insert failure is non-fatal\n\t\tfmt.Fprintf(os.Stderr, \"warning: FTS index update failed: %v\\n\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (s *Store) Upsert(resourceType, id string, data json.RawMessage) error {\n\ts.writeMu.Lock()\n\tdefer s.writeMu.Unlock()\n\ttx, err := s.db.Begin()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer tx.Rollback()\n\n\tif err := s.upsertGenericResourceTx(tx, resourceType, id, data); err != nil {\n\t\treturn err\n\t}\n\n\treturn tx.Commit()\n}\n\nfunc (s *Store) Get(resourceType, id string) (json.RawMessage, error) {\n\tvar data string\n\terr := s.db.QueryRow(\n\t\t`SELECT data FROM resources WHERE resource_type = ? AND id = ?`,\n\t\tresourceType, id,\n\t).Scan(&data)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn json.RawMessage(data), nil\n}\n\nfunc (s *Store) List(resourceType string, limit int) ([]json.RawMessage, error) {\n\tif limit \u003c= 0 {\n\t\tlimit = 200\n\t}\n\trows, err := s.db.Query(\n\t\t`SELECT data FROM resources WHERE resource_type = ? ORDER BY updated_at DESC LIMIT ?`,\n\t\tresourceType, limit,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\tvar results []json.RawMessage\n\tfor rows.Next() {\n\t\tvar data string\n\t\tif err := rows.Scan(&data); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresults = append(results, json.RawMessage(data))\n\t}\n\treturn results, rows.Err()\n}\n\nfunc (s *Store) Search(query string, limit int) ([]json.RawMessage, error) {\n\tif limit \u003c= 0 {\n\t\tlimit = 50\n\t}\n\trows, err := s.db.Query(\n\t\t`SELECT r.data FROM resources r\n\t\t JOIN resources_fts f ON r.id = f.id\n\t\t WHERE resources_fts MATCH ?\n\t\t ORDER BY rank\n\t\t LIMIT ?`,\n\t\tquery, limit,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\tvar results []json.RawMessage\n\tfor rows.Next() {\n\t\tvar data string\n\t\tif err := rows.Scan(&data); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresults = append(results, json.RawMessage(data))\n\t}\n\treturn results, rows.Err()\n}\n\nfunc extractObjectID(obj map[string]any) string {\n\tfor _, key := range []string{\"id\", \"ID\", \"uuid\", \"slug\", \"name\"} {\n\t\tif v, ok := obj[key]; ok {\n\t\t\treturn fmt.Sprintf(\"%v\", v)\n\t\t}\n\t}\n\treturn \"\"\n}\n\n// ftsRowID derives a deterministic rowid from a string ID for use with FTS5.\n// modernc.org/sqlite's FTS5 implementation may not support DELETE WHERE column=?\n// on virtual tables, so we use explicit rowids and DELETE WHERE rowid=? instead.\nfunc ftsRowID(id string) int64 {\n\tvar h uint64\n\tfor _, c := range id {\n\t\th = h*31 + uint64(c)\n\t}\n\treturn int64(h & 0x7FFFFFFFFFFFFFFF) // ensure positive\n}\n\n// LookupFieldValue resolves a field value from a JSON object map, trying\n// the snake_case key first and the camelCase rendering second. Exported so\n// the sync command's extractID and the upsert path resolve fields the same\n// way — a divergence here produces silent drops on heterogeneous payloads.\nfunc LookupFieldValue(obj map[string]any, snakeKey string) any {\n\tif v, ok := obj[snakeKey]; ok {\n\t\treturn sqliteFieldValue(v)\n\t}\n\tparts := strings.Split(snakeKey, \"_\")\n\tfor i := 1; i \u003c len(parts); i++ {\n\t\tif parts[i] == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tparts[i] = strings.ToUpper(parts[i][:1]) + parts[i][1:]\n\t}\n\tif v, ok := obj[strings.Join(parts, \"\")]; ok {\n\t\treturn sqliteFieldValue(v)\n\t}\n\treturn nil\n}\n\nfunc sqliteFieldValue(v any) any {\n\tswitch v.(type) {\n\tcase nil, string, bool, int, int64, float64, []byte:\n\t\treturn v\n\tdefault:\n\t\tdata, err := json.Marshal(v)\n\t\tif err != nil {\n\t\t\treturn fmt.Sprint(v)\n\t\t}\n\t\treturn string(data)\n\t}\n}\n\n// lookupFieldValue is kept as an unexported alias for in-package callers so\n// the existing UpsertBatch code reads naturally without prefixing every call\n// with the package name.\nfunc lookupFieldValue(obj map[string]any, snakeKey string) any {\n\treturn LookupFieldValue(obj, snakeKey)\n}\n\n// upsertFeedTx writes the typed-table portion of a feed upsert\n// inside an existing transaction. The caller is responsible for the generic\n// resources insert (via upsertGenericResourceTx) and for committing the tx.\n// Splitting this out lets UpsertBatch dispatch typed inserts per item without\n// opening a per-item transaction.\nfunc (s *Store) upsertFeedTx(tx *sql.Tx, id string, obj map[string]any, data json.RawMessage) error {\n\tif _, err := tx.Exec(\n\t\t`INSERT INTO feed (id, data, synced_at, body)\n\t\t VALUES (?, ?, ?, ?)\n\t\t ON CONFLICT(id) DO UPDATE SET data = excluded.data, synced_at = excluded.synced_at, body = excluded.body`,\n\t\tid,\n\t\tstring(data),\n\t\ttime.Now(),\n\t\tlookupFieldValue(obj, \"body\"),\n\t); err != nil {\n\t\treturn fmt.Errorf(\"insert into feed: %w\", err)\n\t}\n\n\treturn nil\n}\n\n// UpsertFeed inserts or updates a feed record with domain-specific columns.\nfunc (s *Store) UpsertFeed(data json.RawMessage) error {\n\tvar obj map[string]any\n\tif err := json.Unmarshal(data, &obj); err != nil {\n\t\treturn fmt.Errorf(\"unmarshaling feed: %w\", err)\n\t}\n\n\tid := extractObjectID(obj)\n\tif id == \"\" {\n\t\treturn fmt.Errorf(\"missing id for feed\")\n\t}\n\n\ts.writeMu.Lock()\n\tdefer s.writeMu.Unlock()\n\ttx, err := s.db.Begin()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer tx.Rollback()\n\n\tif err := s.upsertGenericResourceTx(tx, \"feed\", id, data); err != nil {\n\t\treturn err\n\t}\n\tif err := s.upsertFeedTx(tx, id, obj, data); err != nil {\n\t\treturn err\n\t}\n\n\treturn tx.Commit()\n}\n\n// upsertTrendingTx writes the typed-table portion of a trending upsert\n// inside an existing transaction. The caller is responsible for the generic\n// resources insert (via upsertGenericResourceTx) and for committing the tx.\n// Splitting this out lets UpsertBatch dispatch typed inserts per item without\n// opening a per-item transaction.\nfunc (s *Store) upsertTrendingTx(tx *sql.Tx, id string, obj map[string]any, data json.RawMessage) error {\n\tif _, err := tx.Exec(\n\t\t`INSERT INTO trending (id, data, synced_at, computed_at, next_fetch_at, last_fetch_completed_at, is_fetching, stories_today, clusters_today)\n\t\t VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\n\t\t ON CONFLICT(id) DO UPDATE SET data = excluded.data, synced_at = excluded.synced_at, computed_at = excluded.computed_at, next_fetch_at = excluded.next_fetch_at, last_fetch_completed_at = excluded.last_fetch_completed_at, is_fetching = excluded.is_fetching, stories_today = excluded.stories_today, clusters_today = excluded.clusters_today`,\n\t\tid,\n\t\tstring(data),\n\t\ttime.Now(),\n\t\tlookupFieldValue(obj, \"computed_at\"),\n\t\tlookupFieldValue(obj, \"next_fetch_at\"),\n\t\tlookupFieldValue(obj, \"last_fetch_completed_at\"),\n\t\tlookupFieldValue(obj, \"is_fetching\"),\n\t\tlookupFieldValue(obj, \"stories_today\"),\n\t\tlookupFieldValue(obj, \"clusters_today\"),\n\t); err != nil {\n\t\treturn fmt.Errorf(\"insert into trending: %w\", err)\n\t}\n\n\treturn nil\n}\n\n// UpsertTrending inserts or updates a trending record with domain-specific columns.\nfunc (s *Store) UpsertTrending(data json.RawMessage) error {\n\tvar obj map[string]any\n\tif err := json.Unmarshal(data, &obj); err != nil {\n\t\treturn fmt.Errorf(\"unmarshaling trending: %w\", err)\n\t}\n\n\tid := extractObjectID(obj)\n\tif id == \"\" {\n\t\treturn fmt.Errorf(\"missing id for trending\")\n\t}\n\n\ts.writeMu.Lock()\n\tdefer s.writeMu.Unlock()\n\ttx, err := s.db.Begin()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer tx.Rollback()\n\n\tif err := s.upsertGenericResourceTx(tx, \"trending\", id, data); err != nil {\n\t\treturn err\n\t}\n\tif err := s.upsertTrendingTx(tx, id, obj, data); err != nil {\n\t\treturn err\n\t}\n\n\treturn tx.Commit()\n}\n\n// resourceIDFieldOverrides projects per-resource IDField (set by the profiler\n// from x-resource-id or response-schema fallback) into a runtime lookup map.\n// UpsertBatch consults this first so the templated path wins over the\n// generic fallback list. Empty when no resource declared an override; the\n// runtime fallback list still applies.\n//\n// Includes both flat resources and dependent (parent-child) resources so a\n// child path-item annotated with x-resource-id resolves the same as a flat\n// path-item.\nvar resourceIDFieldOverrides = map[string]string{}\n\n// genericIDFieldFallbacks is the runtime safety net for resources that did\n// NOT receive a templated IDField. API-specific names belong in spec\n// annotations (x-resource-id), not this list.\nvar genericIDFieldFallbacks = []string{\"id\", \"ID\", \"name\", \"uuid\", \"slug\", \"key\", \"code\", \"uid\"}\n\n// UpsertBatch inserts or replaces multiple records in a single transaction\n// and returns (stored, extractFailures, err). stored counts rows actually\n// landed; extractFailures counts items that survived JSON unmarshal but had\n// no extractable primary key (templated IDField AND generic fallback both\n// missed). callers (sync.go.tmpl) compare these against len(items) to emit\n// the per-item primary_key_unresolved warning and the F4b\n// stored_count_zero_after_extraction probe.\n//\n// For resource types that have a domain-specific typed table, the per-item\n// generic insert is followed by a dispatch to the matching upsert\u003cPascal>Tx\n// inside the same transaction. Without that dispatch, paginated syncs would\n// only populate the generic resources table — typed tables (and indexed\n// columns like parent_id added by dependent-resource sync) would stay empty.\nfunc (s *Store) UpsertBatch(resourceType string, items []json.RawMessage) (int, int, error) {\n\ts.writeMu.Lock()\n\tdefer s.writeMu.Unlock()\n\ttx, err := s.db.Begin()\n\tif err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"starting batch transaction: %w\", err)\n\t}\n\tdefer tx.Rollback()\n\n\tvar stored, skippedCount, extractFailures int\n\tfor _, item := range items {\n\t\tvar obj map[string]any\n\t\tif err := json.Unmarshal(item, &obj); err != nil {\n\t\t\tskippedCount++\n\t\t\tcontinue\n\t\t}\n\t\t// Templated IDField wins; generic fallback list runs second when\n\t\t// the override is empty OR the override field is absent on this\n\t\t// particular item (response shape mismatches happen even when the\n\t\t// spec declares x-resource-id).\n\t\tvar id string\n\t\tif override, ok := resourceIDFieldOverrides[resourceType]; ok && override != \"\" {\n\t\t\tif v := lookupFieldValue(obj, override); v != nil {\n\t\t\t\ts := fmt.Sprintf(\"%v\", v)\n\t\t\t\tif s != \"\" && s != \"\u003cnil>\" {\n\t\t\t\t\tid = s\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif id == \"\" {\n\t\t\tfor _, key := range genericIDFieldFallbacks {\n\t\t\t\tif v := lookupFieldValue(obj, key); v != nil {\n\t\t\t\t\ts := fmt.Sprintf(\"%v\", v)\n\t\t\t\t\tif s != \"\" && s != \"\u003cnil>\" {\n\t\t\t\t\t\tid = s\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif id == \"\" {\n\t\t\tskippedCount++\n\t\t\textractFailures++\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := s.upsertGenericResourceTx(tx, resourceType, id, item); err != nil {\n\t\t\treturn 0, extractFailures, fmt.Errorf(\"upserting %s/%s: %w\", resourceType, id, err)\n\t\t}\n\n\t\tswitch resourceType {\n\t\tcase \"feed\":\n\t\t\tif err := s.upsertFeedTx(tx, id, obj, item); err != nil {\n\t\t\t\treturn 0, extractFailures, fmt.Errorf(\"typed upsert for %s/%s: %w\", resourceType, id, err)\n\t\t\t}\n\t\tcase \"trending\":\n\t\t\tif err := s.upsertTrendingTx(tx, id, obj, item); err != nil {\n\t\t\t\treturn 0, extractFailures, fmt.Errorf(\"typed upsert for %s/%s: %w\", resourceType, id, err)\n\t\t\t}\n\t\t}\n\t\tstored++\n\t}\n\n\t// Warn when most items in a batch lack an extractable ID — this likely\n\t// means the API uses a primary key field we don't recognize yet.\n\tif skippedCount > 0 && len(items) > 0 && skippedCount*2 > len(items) {\n\t\tfmt.Fprintf(os.Stderr, \"warning: %d/%d %s items skipped (no extractable ID field found)\\n\", skippedCount, len(items), resourceType)\n\t}\n\n\tif err := tx.Commit(); err != nil {\n\t\treturn 0, extractFailures, err\n\t}\n\treturn stored, extractFailures, nil\n}\n\nfunc (s *Store) SaveSyncState(resourceType, cursor string, count int) error {\n\ts.writeMu.Lock()\n\tdefer s.writeMu.Unlock()\n\t_, err := s.db.Exec(\n\t\t`INSERT INTO sync_state (resource_type, last_cursor, last_synced_at, total_count)\n\t\t VALUES (?, ?, ?, ?)\n\t\t ON CONFLICT(resource_type) DO UPDATE SET last_cursor = excluded.last_cursor,\n\t\t last_synced_at = excluded.last_synced_at, total_count = excluded.total_count`,\n\t\tresourceType, cursor, time.Now(), count,\n\t)\n\treturn err\n}\n\nfunc (s *Store) GetSyncState(resourceType string) (cursor string, lastSynced time.Time, count int, err error) {\n\terr = s.db.QueryRow(\n\t\t`SELECT last_cursor, last_synced_at, total_count FROM sync_state WHERE resource_type = ?`,\n\t\tresourceType,\n\t).Scan(&cursor, &lastSynced, &count)\n\tif err == sql.ErrNoRows {\n\t\treturn \"\", time.Time{}, 0, nil\n\t}\n\treturn\n}\n\n// SaveSyncCursor stores the pagination cursor for a resource type.\nfunc (s *Store) SaveSyncCursor(resourceType, cursor string) error {\n\ts.writeMu.Lock()\n\tdefer s.writeMu.Unlock()\n\t_, err := s.db.Exec(\n\t\t`INSERT INTO sync_state (resource_type, last_cursor, last_synced_at, total_count)\n\t\t VALUES (?, ?, CURRENT_TIMESTAMP, 0)\n\t\t ON CONFLICT(resource_type) DO UPDATE SET last_cursor = ?, last_synced_at = CURRENT_TIMESTAMP`,\n\t\tresourceType, cursor, cursor,\n\t)\n\treturn err\n}\n\n// GetSyncCursor returns the last pagination cursor for a resource type.\nfunc (s *Store) GetSyncCursor(resourceType string) string {\n\tvar cursor sql.NullString\n\ts.db.QueryRow(\"SELECT last_cursor FROM sync_state WHERE resource_type = ?\", resourceType).Scan(&cursor)\n\tif cursor.Valid {\n\t\treturn cursor.String\n\t}\n\treturn \"\"\n}\n\n// ListIDs returns all IDs from a resource's domain table, or from the generic\n// resources table if no domain table exists. Used by dependent sync to iterate parents.\nfunc (s *Store) ListIDs(resourceType string) ([]string, error) {\n\t// Try domain table first (tables are named after the resource type)\n\tquery := fmt.Sprintf(\"SELECT id FROM %s\", resourceType)\n\trows, err := s.db.Query(query)\n\tif err != nil {\n\t\t// Fall back to generic resources table\n\t\trows, err = s.db.Query(\"SELECT id FROM resources WHERE resource_type = ?\", resourceType)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tdefer rows.Close()\n\n\tvar ids []string\n\tfor rows.Next() {\n\t\tvar id string\n\t\tif err := rows.Scan(&id); err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tids = append(ids, id)\n\t}\n\treturn ids, rows.Err()\n}\n\n// GetLastSyncedAt returns the last sync timestamp for a resource type.\nfunc (s *Store) GetLastSyncedAt(resourceType string) string {\n\tvar ts sql.NullString\n\ts.db.QueryRow(\"SELECT last_synced_at FROM sync_state WHERE resource_type = ?\", resourceType).Scan(&ts)\n\tif ts.Valid {\n\t\treturn ts.String\n\t}\n\treturn \"\"\n}\n\n// ClearSyncCursors resets all sync state for a full resync.\nfunc (s *Store) ClearSyncCursors() error {\n\ts.writeMu.Lock()\n\tdefer s.writeMu.Unlock()\n\t_, err := s.db.Exec(\"DELETE FROM sync_state\")\n\treturn err\n}\n\n// Query executes a raw SQL query and returns the rows.\n// Used by workflow commands that need custom queries against the local store.\nfunc (s *Store) Query(query string, args ...any) (*sql.Rows, error) {\n\treturn s.db.Query(query, args...)\n}\n\nfunc (s *Store) Count(resourceType string) (int, error) {\n\tvar count int\n\terr := s.db.QueryRow(\n\t\t`SELECT COUNT(*) FROM resources WHERE resource_type = ?`,\n\t\tresourceType,\n\t).Scan(&count)\n\treturn count, err\n}\n\nfunc (s *Store) Status() (map[string]int, error) {\n\trows, err := s.db.Query(\n\t\t`SELECT resource_type, COUNT(*) FROM resources GROUP BY resource_type ORDER BY resource_type`,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\tstatus := make(map[string]int)\n\tfor rows.Next() {\n\t\tvar rt string\n\t\tvar count int\n\t\tif err := rows.Scan(&rt, &count); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstatus[rt] = count\n\t}\n\treturn status, rows.Err()\n}\n\n// ResolveByName resolves a human-readable name to a UUID from synced data.\n// If the input is already a UUID, it is returned as-is.\n// matchFields are JSON field names to search against (e.g., \"name\", \"key\", \"email\").\nfunc (s *Store) ResolveByName(resourceType string, input string, matchFields ...string) (string, error) {\n\tif IsUUID(input) {\n\t\treturn input, nil\n\t}\n\n\tvar matches []string\n\tfor _, field := range matchFields {\n\t\tquery := fmt.Sprintf(\n\t\t\t`SELECT id FROM resources WHERE resource_type = ? AND LOWER(json_extract(data, '$.%s')) = LOWER(?)`,\n\t\t\tfield,\n\t\t)\n\t\trows, err := s.db.Query(query, resourceType, input)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tfor rows.Next() {\n\t\t\tvar id string\n\t\t\tif rows.Scan(&id) == nil {\n\t\t\t\t// Deduplicate\n\t\t\t\tfound := false\n\t\t\t\tfor _, m := range matches {\n\t\t\t\t\tif m == id {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif !found {\n\t\t\t\t\tmatches = append(matches, id)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trows.Close()\n\t}\n\n\tswitch len(matches) {\n\tcase 0:\n\t\treturn \"\", fmt.Errorf(\"%s %q not found in local store. Run 'sync' first, or use the UUID directly\", resourceType, input)\n\tcase 1:\n\t\treturn matches[0], nil\n\tdefault:\n\t\thint := matches[0]\n\t\tif len(matches) > 5 {\n\t\t\thint = strings.Join(matches[:5], \", \") + \"...\"\n\t\t} else {\n\t\t\thint = strings.Join(matches, \", \")\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"ambiguous: %q matches %d %s entries (%s). Use the exact UUID instead\", input, len(matches), resourceType, hint)\n\t}\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":35252,"content_sha256":"cb010503a7a48722ba578b75dcb383d70ddad93b2afff623366cb7f9d9cd7dca"},{"filename":"internal/store/upsert_batch_test.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage store\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\n\t_ \"modernc.org/sqlite\"\n)\n\n// TestStoreWrite_NoSQLITE_BUSY_HighConcurrency exercises the writeMu serialization\n// guarantee: 16 fetcher-style goroutines hammer the store with a mix of\n// UpsertBatch, SaveSyncState, and SaveSyncCursor calls. Before the mutex\n// fix, this test reproduces SQLITE_BUSY at default sync concurrency on\n// pure-Go SQLite (modernc.org/sqlite + WAL) because multiple writers\n// race for the WAL lock and busy_timeout retries are not exhaustive.\n//\n// Run under `go test -race` to catch any data races on Store fields.\nfunc TestStoreWrite_NoSQLITE_BUSY_HighConcurrency(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open: %v\", err)\n\t}\n\tdefer s.Close()\n\n\tconst goroutines = 16\n\tconst itemsPerBatch = 5\n\n\tvar wg sync.WaitGroup\n\terrCh := make(chan error, goroutines*3)\n\n\tfor g := 0; g \u003c goroutines; g++ {\n\t\twg.Add(1)\n\t\tgo func(gid int) {\n\t\t\tdefer wg.Done()\n\t\t\trt := fmt.Sprintf(\"rt_%d\", gid)\n\t\t\titems := make([]json.RawMessage, 0, itemsPerBatch)\n\t\t\tfor i := 0; i \u003c itemsPerBatch; i++ {\n\t\t\t\titems = append(items, json.RawMessage(fmt.Sprintf(`{\"id\": \"g%d-i%d\"}`, gid, i)))\n\t\t\t}\n\t\t\tif _, _, err := s.UpsertBatch(rt, items); err != nil {\n\t\t\t\terrCh \u003c- fmt.Errorf(\"UpsertBatch goroutine %d: %w\", gid, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err := s.SaveSyncState(rt, fmt.Sprintf(\"cursor-%d\", gid), itemsPerBatch); err != nil {\n\t\t\t\terrCh \u003c- fmt.Errorf(\"SaveSyncState goroutine %d: %w\", gid, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err := s.SaveSyncCursor(rt, fmt.Sprintf(\"cursor2-%d\", gid)); err != nil {\n\t\t\t\terrCh \u003c- fmt.Errorf(\"SaveSyncCursor goroutine %d: %w\", gid, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}(g)\n\t}\n\twg.Wait()\n\tclose(errCh)\n\n\tfor err := range errCh {\n\t\tif err == nil {\n\t\t\tcontinue\n\t\t}\n\t\t// SQLITE_BUSY surfaces as \"database is locked\" or \"SQLITE_BUSY\"\n\t\t// in the error message — assert neither occurs.\n\t\tmsg := err.Error()\n\t\tif strings.Contains(msg, \"SQLITE_BUSY\") || strings.Contains(strings.ToLower(msg), \"database is locked\") {\n\t\t\tt.Fatalf(\"got SQLITE_BUSY-class error under concurrent writers: %v\", err)\n\t\t}\n\t\tt.Fatalf(\"unexpected error under concurrent writers: %v\", err)\n\t}\n\n\t// Verify all rows persisted: goroutines * itemsPerBatch in the generic\n\t// resources table.\n\tdb := s.DB()\n\tvar total int\n\tif err := db.QueryRow(`SELECT COUNT(*) FROM resources`).Scan(&total); err != nil {\n\t\tt.Fatalf(\"count resources: %v\", err)\n\t}\n\tif total != goroutines*itemsPerBatch {\n\t\tt.Fatalf(\"resources total = %d, want %d\", total, goroutines*itemsPerBatch)\n\t}\n}\n\n// TestStoreWrite_PanicReleasesLock confirms that a panic inside a locked\n// section unwinds via defer s.writeMu.Unlock() so subsequent writers can\n// proceed. A leaked lock would deadlock the second call indefinitely.\nfunc TestStoreWrite_PanicReleasesLock(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open: %v\", err)\n\t}\n\tdefer s.Close()\n\n\t// Trigger panic by passing a nil *Store method receiver indirectly:\n\t// we call UpsertBatch with malformed JSON that survives Unmarshal\n\t// (it's wrapped in skipped-count handling) — there's no easy panic\n\t// path inside a locked section that doesn't also corrupt state, so\n\t// we instead simulate the post-panic state by manually locking and\n\t// unlocking, then assert subsequent calls succeed.\n\tfunc() {\n\t\tdefer func() {\n\t\t\trecover()\n\t\t}()\n\t\ts.writeMu.Lock()\n\t\tdefer s.writeMu.Unlock()\n\t\tpanic(\"simulated writer panic\")\n\t}()\n\n\t// Subsequent writer must not block.\n\tdone := make(chan struct{})\n\tgo func() {\n\t\tif _, _, err := s.UpsertBatch(\"post_panic\", []json.RawMessage{json.RawMessage(`{\"id\": \"x\"}`)}); err != nil {\n\t\t\tt.Errorf(\"post-panic UpsertBatch: %v\", err)\n\t\t}\n\t\tclose(done)\n\t}()\n\t\u003c-done\n}\n\n// TestUpsertBatch_TemplatedIDFieldOverrideWins exercises the\n// per-resource ID-field override. When the spec author annotates a\n// path-item with x-resource-id, the profiler emits SyncableResource.IDField,\n// the generator templates this into resourceIDFieldOverrides, and\n// UpsertBatch consults that map first. This test seeds the override map\n// at runtime (since the generated table here may or may not declare any\n// override) to assert the lookup path itself works.\nfunc TestUpsertBatch_TemplatedIDFieldOverrideWins(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open: %v\", err)\n\t}\n\tdefer s.Close()\n\n\t// Inject a runtime override for a synthetic resource. Item carries\n\t// no generic-fallback field (no id/name/uuid/...) — only a custom\n\t// \"ticker\" field. Without the override, all 3 items would be\n\t// dropped as PK-unresolved; with it, all 3 land.\n\tprev, hadPrev := resourceIDFieldOverrides[\"overrideTest\"]\n\tresourceIDFieldOverrides[\"overrideTest\"] = \"ticker\"\n\tdefer func() {\n\t\tif hadPrev {\n\t\t\tresourceIDFieldOverrides[\"overrideTest\"] = prev\n\t\t} else {\n\t\t\tdelete(resourceIDFieldOverrides, \"overrideTest\")\n\t\t}\n\t}()\n\n\titems := []json.RawMessage{\n\t\tjson.RawMessage(`{\"ticker\": \"AAPL\", \"price\": 100}`),\n\t\tjson.RawMessage(`{\"ticker\": \"GOOG\", \"price\": 200}`),\n\t\tjson.RawMessage(`{\"ticker\": \"MSFT\", \"price\": 300}`),\n\t}\n\tstored, extractFailures, err := s.UpsertBatch(\"overrideTest\", items)\n\tif err != nil {\n\t\tt.Fatalf(\"UpsertBatch: %v\", err)\n\t}\n\tif stored != 3 {\n\t\tt.Fatalf(\"stored = %d, want 3 (templated override should resolve all PKs)\", stored)\n\t}\n\tif extractFailures != 0 {\n\t\tt.Fatalf(\"extractFailures = %d, want 0\", extractFailures)\n\t}\n}\n\n// TestUpsertBatch_GenericFallbackList covers each name in the reduced\n// fallback list. The kalshi-accreted names (ticker/event_ticker/series_ticker)\n// were dropped because the user owns kalshi and will regenerate\n// it with x-resource-id annotations; this test pins what the generic list\n// is now responsible for so a future trim doesn't silently break unannotated\n// specs.\nfunc TestUpsertBatch_GenericFallbackList(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open: %v\", err)\n\t}\n\tdefer s.Close()\n\n\tfor _, key := range []string{\"id\", \"ID\", \"name\", \"uuid\", \"slug\", \"key\", \"code\", \"uid\"} {\n\t\tt.Run(key, func(t *testing.T) {\n\t\t\trt := \"fallback_\" + key\n\t\t\titems := []json.RawMessage{\n\t\t\t\tjson.RawMessage(fmt.Sprintf(`{%q: %q}`, key, \"value-1\")),\n\t\t\t\tjson.RawMessage(fmt.Sprintf(`{%q: %q}`, key, \"value-2\")),\n\t\t\t}\n\t\t\tstored, extractFailures, err := s.UpsertBatch(rt, items)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"UpsertBatch(%q): %v\", key, err)\n\t\t\t}\n\t\t\tif stored != 2 {\n\t\t\t\tt.Fatalf(\"stored = %d, want 2 (fallback %q must resolve)\", stored, key)\n\t\t\t}\n\t\t\tif extractFailures != 0 {\n\t\t\t\tt.Fatalf(\"extractFailures = %d, want 0\", extractFailures)\n\t\t\t}\n\t\t})\n\t}\n\n\t// Negative: API-specific names dropped must NOT resolve.\n\t// Spec authors annotate these via x-resource-id instead.\n\tfor _, key := range []string{\"ticker\", \"event_ticker\", \"series_ticker\"} {\n\t\tt.Run(\"dropped_\"+key, func(t *testing.T) {\n\t\t\trt := \"dropped_\" + key\n\t\t\titems := []json.RawMessage{\n\t\t\t\tjson.RawMessage(fmt.Sprintf(`{%q: %q}`, key, \"v1\")),\n\t\t\t}\n\t\t\tstored, extractFailures, err := s.UpsertBatch(rt, items)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"UpsertBatch(%q): %v\", key, err)\n\t\t\t}\n\t\t\tif stored != 0 {\n\t\t\t\tt.Fatalf(\"stored = %d, want 0 (%q must NOT be in the generic fallback list)\", stored, key)\n\t\t\t}\n\t\t\tif extractFailures != 1 {\n\t\t\t\tt.Fatalf(\"extractFailures = %d, want 1 (%q drop must surface as extract failure)\", extractFailures, key)\n\t\t\t}\n\t\t})\n\t}\n}\n\n// TestUpsertBatch_ExtractFailuresReturnedForPerItemMisses pins the third\n// return value: items that survive JSON unmarshal but have no extractable\n// PK (templated override AND generic fallback both miss) bump\n// extractFailures. The sync.go.tmpl call site uses this to emit the\n// per-resource primary_key_unresolved sync_anomaly the first time silent\n// drops occur.\nfunc TestUpsertBatch_ExtractFailuresReturnedForPerItemMisses(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open: %v\", err)\n\t}\n\tdefer s.Close()\n\n\titems := []json.RawMessage{\n\t\tjson.RawMessage(`{\"id\": \"ok-1\"}`),\n\t\tjson.RawMessage(`{\"some_random_field\": \"no-pk-here\"}`),\n\t\tjson.RawMessage(`{\"id\": \"ok-2\"}`),\n\t\tjson.RawMessage(`{\"another_field\": 42}`),\n\t}\n\tstored, extractFailures, err := s.UpsertBatch(\"mixed_extraction\", items)\n\tif err != nil {\n\t\tt.Fatalf(\"UpsertBatch: %v\", err)\n\t}\n\tif stored != 2 {\n\t\tt.Fatalf(\"stored = %d, want 2 (only items with id should land)\", stored)\n\t}\n\tif extractFailures != 2 {\n\t\tt.Fatalf(\"extractFailures = %d, want 2 (two items have no extractable PK)\", extractFailures)\n\t}\n}\n\n// TestUpsertBatch_PopulatesFeedTable verifies that UpsertBatch\n// dispatches paginated items into both the generic resources table AND the\n// typed feed table. Regression for issue #268: before the fix, paginated\n// syncs only filled the generic resources table, so domain commands that\n// query the typed table saw zero rows.\nfunc TestUpsertBatch_PopulatesFeedTable(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open: %v\", err)\n\t}\n\tdefer s.Close()\n\n\titems := []json.RawMessage{\n\t\tjson.RawMessage(`{\"id\": \"test-001\"}`),\n\t\tjson.RawMessage(`{\"id\": \"test-002\"}`),\n\t\tjson.RawMessage(`{\"id\": \"test-003\"}`),\n\t}\n\tif _, _, err := s.UpsertBatch(\"feed\", items); err != nil {\n\t\tt.Fatalf(\"UpsertBatch: %v\", err)\n\t}\n\n\tdb := s.DB()\n\n\tvar generic int\n\tif err := db.QueryRow(`SELECT COUNT(*) FROM resources WHERE resource_type = ?`, \"feed\").Scan(&generic); err != nil {\n\t\tt.Fatalf(\"count resources: %v\", err)\n\t}\n\tif generic != len(items) {\n\t\tt.Fatalf(\"resources count = %d, want %d\", generic, len(items))\n\t}\n\n\tvar typed int\n\ttypedQuery := fmt.Sprintf(`SELECT COUNT(*) FROM \"%s\"`, \"feed\")\n\tif err := db.QueryRow(typedQuery).Scan(&typed); err != nil {\n\t\tt.Fatalf(\"count feed: %v\", err)\n\t}\n\tif typed != len(items) {\n\t\tt.Fatalf(\"feed count = %d, want %d (typed table not populated by UpsertBatch)\", typed, len(items))\n\t}\n}\n\n// TestUpsertBatch_PopulatesTrendingTable verifies that UpsertBatch\n// dispatches paginated items into both the generic resources table AND the\n// typed trending table. Regression for issue #268: before the fix, paginated\n// syncs only filled the generic resources table, so domain commands that\n// query the typed table saw zero rows.\nfunc TestUpsertBatch_PopulatesTrendingTable(t *testing.T) {\n\tdbPath := filepath.Join(t.TempDir(), \"data.db\")\n\ts, err := Open(dbPath)\n\tif err != nil {\n\t\tt.Fatalf(\"open: %v\", err)\n\t}\n\tdefer s.Close()\n\n\titems := []json.RawMessage{\n\t\tjson.RawMessage(`{\"id\": \"test-001\"}`),\n\t\tjson.RawMessage(`{\"id\": \"test-002\"}`),\n\t\tjson.RawMessage(`{\"id\": \"test-003\"}`),\n\t}\n\tif _, _, err := s.UpsertBatch(\"trending\", items); err != nil {\n\t\tt.Fatalf(\"UpsertBatch: %v\", err)\n\t}\n\n\tdb := s.DB()\n\n\tvar generic int\n\tif err := db.QueryRow(`SELECT COUNT(*) FROM resources WHERE resource_type = ?`, \"trending\").Scan(&generic); err != nil {\n\t\tt.Fatalf(\"count resources: %v\", err)\n\t}\n\tif generic != len(items) {\n\t\tt.Fatalf(\"resources count = %d, want %d\", generic, len(items))\n\t}\n\n\tvar typed int\n\ttypedQuery := fmt.Sprintf(`SELECT COUNT(*) FROM \"%s\"`, \"trending\")\n\tif err := db.QueryRow(typedQuery).Scan(&typed); err != nil {\n\t\tt.Fatalf(\"count trending: %v\", err)\n\t}\n\tif typed != len(items) {\n\t\tt.Fatalf(\"trending count = %d, want %d (typed table not populated by UpsertBatch)\", typed, len(items))\n\t}\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":11655,"content_sha256":"51d967d47aa5af7fb0685907bfba9efb80522cbf8bab3dd01d79986d7bf75fc4"},{"filename":"internal/types/types.go","content":"// Copyright 2026 Matt Van Horn and contributors. Licensed under Apache-2.0. See LICENSE.\n// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.\n\npackage types\n\ntype RawHTML struct {\n\tBody string `json:\"body\"`\n}\n\ntype TrendingStatus struct {\n\tComputedAt string `json:\"computedAt\"`\n\tNextFetchAt string `json:\"nextFetchAt\"`\n\tLastFetchCompletedAt string `json:\"lastFetchCompletedAt\"`\n\tIsFetching bool `json:\"isFetching\"`\n\tStoriesToday int `json:\"storiesToday\"`\n\tClustersToday int `json:\"clustersToday\"`\n}\n","content_type":"text/plain; charset=utf-8","language":"go","size":597,"content_sha256":"d09e0cc9d71a311e3b7090956ce2d99950b57c0263b0ec5d76a745a4f4d3a55b"},{"filename":"Makefile","content":".PHONY: build test lint install clean\n\nbuild:\n\tgo build -o bin/digg-pp-cli ./cmd/digg-pp-cli\n\ntest:\n\tgo test ./...\n\nlint:\n\tgolangci-lint run\n\ninstall:\n\tgo install ./cmd/digg-pp-cli\n\nclean:\n\trm -rf bin/\n\nbuild-mcp:\n\tgo build -o bin/digg-pp-mcp ./cmd/digg-pp-mcp\n\ninstall-mcp:\n\tgo install ./cmd/digg-pp-mcp\n\nbuild-all: build build-mcp\n","content_type":"text/plain; charset=utf-8","language":"makefile","size":333,"content_sha256":"008805e2a9dc2c6dacdd1e451d5ff2d394ecbe40767ece4cc07bf7792dadcc2d"},{"filename":"manifest.json","content":"{\n \"manifest_version\": \"0.3\",\n \"name\": \"digg-pp-mcp\",\n \"display_name\": \"Digg\",\n \"version\": \"4.0.6\",\n \"description\": \"Read-only CLI for Digg — the AI story leaderboard, GitHub feeds, and ingestion pipeline events on digg.com.\",\n \"author\": {\n \"name\": \"CLI Printing Press\"\n },\n \"license\": \"Apache-2.0\",\n \"server\": {\n \"type\": \"binary\",\n \"entry_point\": \"bin/digg-pp-mcp\",\n \"mcp_config\": {\n \"command\": \"${__dirname}/bin/digg-pp-mcp\",\n \"args\": []\n }\n },\n \"compatibility\": {\n \"claude_desktop\": \">=1.0.0\",\n \"platforms\": [\n \"darwin\",\n \"linux\",\n \"win32\"\n ]\n }\n}\n","content_type":"application/json; charset=utf-8","language":"json","size":614,"content_sha256":"db731ccd7b6c24ad6113eb8653329988b4c12758473fb9ba095516f7d3bc377b"},{"filename":"NOTICE","content":"digg-pp-cli\nCopyright 2026 Matt Van Horn and contributors\n\nCreated by Matt Van Horn (@mvanhorn).\n\nThis CLI was generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press)\nby Matt Van Horn and Trevin Chow. The Non-Obvious Insight, domain archetype detection, workflow commands,\nand behavioral insight commands were produced by the printing press's creative vision engine.\n\nCLI Printing Press is licensed separately under the MIT License.\n","content_type":"text/plain; charset=utf-8","language":null,"size":458,"content_sha256":"ddd5d4386d9a0e78a9e2f4b258159ddc5448dee86f78828eac59ec2d12d99100"},{"filename":"README.md","content":"# Digg CLI\n\n**Tail Digg's news cycle from the terminal — read-only, with the full pipeline event stream, GitHub feeds, and rank-history nobody else surfaces.**\n\nDigg is a curated AI-news leaderboard powered by tracked accounts on X and a parallel GitHub feed (stars / new / activity / recent). The web UI shows you today's snapshot. This CLI tails the pipeline events, keeps a local rank-history that survives daily overwrites, exposes Digg's own replacement rationale and gravity components, and surfaces the four GitHub feeds as structured data.\n\nCreated by [@mvanhorn](https://github.com/mvanhorn) (Matt Van Horn).\n\n## Install\n\nThe recommended path installs both the `digg-pp-cli` binary and the `pp-digg` agent skill (Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, and other agents supported by the upstream [`skills`](https://github.com/vercel-labs/skills) CLI) in one shot:\n\n```bash\nnpx -y @mvanhorn/printing-press-library install digg\n```\n\nFor CLI only (no skill):\n\n```bash\nnpx -y @mvanhorn/printing-press-library install digg --cli-only\n```\n\nFor skill only — installs the skill into the same agents as the default command above, but skips the CLI binary (use this to update or reinstall just the skill):\n\n```bash\nnpx -y @mvanhorn/printing-press-library install digg --skill-only\n```\n\nTo constrain the skill install to one or more specific agents (repeatable — agent names match the [`skills`](https://github.com/vercel-labs/skills) CLI):\n\n```bash\nnpx -y @mvanhorn/printing-press-library install digg --agent claude-code\nnpx -y @mvanhorn/printing-press-library install digg --agent claude-code --agent codex\n```\n\n### Without Node (Go fallback)\n\nIf `npx` isn't available (no Node, offline), install the CLI directly via Go (requires Go 1.26.3 or newer):\n\n```bash\ngo install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/cmd/digg-pp-cli@latest\n```\n\nThis installs the CLI only — no skill.\n\n### Pre-built binary\n\nDownload a pre-built binary for your platform from the [latest release](https://github.com/mvanhorn/printing-press-library/releases/tag/digg-current). On macOS, clear the Gatekeeper quarantine: `xattr -d com.apple.quarantine \u003cbinary>`. On Unix, mark it executable: `chmod +x \u003cbinary>`.\n\n\u003c!-- pp-hermes-install-anchor -->\n## Install for Hermes\n\nFrom the Hermes CLI:\n\n```bash\nhermes skills install mvanhorn/printing-press-library/cli-skills/pp-digg --force\n```\n\nInside a Hermes chat session:\n\n```bash\n/skills install mvanhorn/printing-press-library/cli-skills/pp-digg --force\n```\n\n## Install for OpenClaw\n\nTell your OpenClaw agent (copy this):\n\n```\nInstall the pp-digg skill from https://github.com/mvanhorn/printing-press-library/tree/main/cli-skills/pp-digg. The skill defines how its required CLI can be installed.\n```\n\n## Use with Claude Desktop\n\nThis CLI ships an [MCPB](https://github.com/modelcontextprotocol/mcpb) bundle — Claude Desktop's standard format for one-click MCP extension installs (no JSON config required).\n\nTo install:\n\n1. Download the `.mcpb` for your platform from the [latest release](https://github.com/mvanhorn/printing-press-library/releases/tag/digg-current).\n2. Double-click the `.mcpb` file. Claude Desktop opens and walks you through the install.\n\nRequires Claude Desktop 1.0.0 or later. Pre-built bundles ship for macOS Apple Silicon (`darwin-arm64`) and Windows (`amd64`, `arm64`); for other platforms, use the manual config below.\n\n\u003cdetails>\n\u003csummary>Manual JSON config (advanced)\u003c/summary>\n\nIf you can't use the MCPB bundle (older Claude Desktop, unsupported platform), install the MCP binary and configure it manually.\n\n\nInstall the MCP binary from this CLI's published public-library entry or pre-built release.\n\nAdd to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n \"mcpServers\": {\n \"digg\": {\n \"command\": \"digg-pp-mcp\"\n }\n }\n}\n```\n\n\u003c/details>\n\n## Authentication\n\nNo auth required. The CLI uses only public surfaces — the /ai page (HTML+RSC scrape) and /api/trending/status (public JSON). It does not use Clerk session cookies or any authenticated endpoint, by design: this is a read-only research tool, and Digg's parent platform was shut down over AI-agent abuse. The CLI is read-only and identifies itself with a clear User-Agent so Digg ops can rate-limit it cleanly.\n\n## Quick Start\n\n```bash\n# Pull the current /ai feed and /api/trending/status events into the local store\ndigg-pp-cli sync\n\n# Read today's top 10 clusters as structured JSON\ndigg-pp-cli top --limit 10 --json\n\n# See which stories climbed the rankings in the last hour with explicit rank deltas\ndigg-pp-cli events --since 1h --type fast_climb\n\n# What got knocked out of the rankings overnight and Digg's own rationale for each\ndigg-pp-cli replaced --since 24h\n\n# Top influencers tracked by Digg, ranked by Digg's score\ndigg-pp-cli authors top --by influence --limit 25\n\n# Top AI repos by starring activity from Digg-tracked accounts\ndigg-pp-cli github stars --limit 10 --json\n\n# Smart-money convergence — repos starred by >= 2 distinct AI-builder accounts\ndigg-pp-cli github stars --min-starrers 2 --json\n\n# Live GitHub activity feed: who starred / committed / opened issues, in real time\ndigg-pp-cli github recent --limit 20 --json\n\n# Curated emerging AI companies from the /ai/x/rankings/companies snapshot\ndigg-pp-cli rankings emerging --json\n\n# Companies climbing fastest in follower count since the last snapshot\ndigg-pp-cli rankings movers --direction up --json\n\n# Full company ranking (initial-HTML slice)\ndigg-pp-cli rankings list --limit 20 --json\n\n```\n\n## Unique Features\n\nThese capabilities aren't available in any other tool for this API.\n\n### Topic search and per-post citations\n- **`search`** — Topic search across Digg's full window. Live by default — hits `/api/search/stories`, the same server-side search that backs the di.gg/ai Cmd+K modal — with FTS5 fallback to the local store on network error or `--data-source local`.\n\n _Returns ranked clusters with engagement metadata (postCount, uniqueAuthors, firstPostAge); the load-bearing recipe for last30days-style research workflows._\n\n ```bash\n digg-pp-cli search \"\u003ctopic>\" --since 30d --agent --select clusterUrlId,title,rank,postCount,uniqueAuthors,firstPostAge\n ```\n - **`--since Nh|Nd|Nw|Nm`** — filter to clusters first posted within the window (live mode parses Digg's own `firstPostAge`; local mode reads `digg_clusters.first_post_at`).\n- **`posts`** — X posts attached to one cluster, with author rank, body when rendered, media URLs, repost-context, and minted xUrl for one-click citation.\n\n _The citations recipe: surface the highest-credibility AI 1000 voices on a story, sortable by rank, type, or time._\n\n ```bash\n digg-pp-cli posts \u003cclusterUrlId> --by rank --limit 5 --agent --select author.username,author.rank,post_type,xUrl,body\n ```\n\n### Author lookup and roster browse\n- **`authors get`** — Look up any X handle in Digg's full author universe (1000 + off-1000) via `/api/search/users`. For off-1000 handles, the response includes `subject_peer_follow_count`, the rank-1000 anchor's `peer_follow_count`, and a signed `peer_follow_gap` — the gap to the 1000 measured in AI-1000 peer follows (NOT raw X follower count).\n\n _The credibility lookup: an agent can decide whether to quote a handle by reading one structured record._\n\n ```bash\n digg-pp-cli authors get \u003chandle> --agent\n ```\n\n Trimmed off-1000 example for `mvanhorn`:\n ```json\n {\n \"username\": \"mvanhorn\",\n \"current_rank\": null,\n \"subject_peer_follow_count\": 19,\n \"nearest_in_1000\": {\"rank\": 1000, \"username\": \"...\", \"peer_follow_count\": 90},\n \"peer_follow_gap\": 71\n }\n ```\n `peer_follow_gap` is the gap to rank-1000's `followed_by_count` (peer follows from inside the AI 1000). Do not read it as a raw X follower delta.\n- **`authors list`** — Full ranked AI 1000 from `/ai/1000`, persisted with rich fields (rank, category, bio, vibeDistribution, GitHub URL).\n\n _Identify rising voices in a category, find authors who just joined the 1000, see who's falling fast — sortable, filterable, scriptable._\n\n ```bash\n # Biggest movers since the last snapshot\n digg-pp-cli authors list --by rankChange --limit 20 --agent\n\n # Newly listed (first appearance in the 1000)\n digg-pp-cli authors list --only-new --agent\n ```\n Sort with `--by rank|rankChange|category|followers`; filter with `--category \"\u003cname>\"`, `--only-new`, `--only-fallers`.\n\n### Live pipeline observability\n- **`events`** — Tail Digg's ingestion pipeline in real time — see clusters as they're detected, stories fast-climbing the leaderboard with explicit rank deltas, X posts being processed, batch breakdowns.\n\n _When an agent needs 'tell me when story X just climbed N ranks' or 'what new clusters did Digg detect in the last hour', this is the only way._\n\n ```bash\n digg-pp-cli events --since 1h --type fast_climb --json --select clusterId,label,delta,currentRank,previousRank\n ```\n- **`watch`** — Poll /ai, diff against last snapshot, alert when any cluster moves N+ ranks.\n\n _Read-only operational watcher; never writes anything back to Digg._\n\n ```bash\n digg-pp-cli watch --alert 'rank.delta>=10'\n ```\n- **`pipeline status`** — One-screen view of /api/trending/status: isFetching, nextFetchAt, storiesToday, clustersToday, last 5 events.\n\n _Lets ops and power users see when a fresh batch is about to land and what's been ingested in the last hour._\n\n ```bash\n digg-pp-cli pipeline status --watch\n ```\n\n### Local state that compounds\n- **`replaced`** — Show stories that were knocked out of the rankings since the last sync, with Digg's own published replacement rationale.\n\n _Best-of-feed shifts faster than people remember. This makes 'what did Digg drop and why' queryable._\n\n ```bash\n digg-pp-cli replaced --since 24h --json\n ```\n- **`crossref`** — Show this cluster's Hacker News and Techmeme mirrors when Digg has detected the story is being discussed there.\n\n _Removes the manual 'is HN talking about this too' step from any cross-aggregator research workflow._\n\n ```bash\n digg-pp-cli crossref iq7usf9e\n ```\n- **`authors top`** — Top accounts Digg tracks, ranked by Digg's influence score, story count, or reach.\n\n _Investors and AI scouts care which accounts move the news cycle. Now queryable, sortable, scriptable._\n\n ```bash\n digg-pp-cli authors top --by influence --limit 50 --json\n ```\n- **`history`** — Full trajectory of one cluster's currentRank, peakRank, and delta over local snapshot history.\n\n _'Entered at #18, peaked at #4 over 6h, dropped to #22 by 24h' is impossible to learn from the live site._\n\n ```bash\n digg-pp-cli history iq7usf9e --json\n ```\n- **`author`** — Every cluster a given X account contributed to, with post type (original, retweet, quote, reply).\n\n _'Show me every story this account surfaced this week' is the investor-scout query._\n\n ```bash\n digg-pp-cli author Scobleizer --since 7d --json\n ```\n\n### Transparency\n- **`evidence`** — Print the full ranking transparency record for one cluster — scoreComponents, evidence array, numeratorLabel, percentAboveAverage.\n\n _When a user asks 'why is THIS the top story', the answer is structured data; agents can compose with it._\n\n ```bash\n digg-pp-cli evidence iq7usf9e --json\n ```\n- **`sentiment`** — Read per-time-window positivity ratios (pos6h, pos12h, pos24h, posLast) for a cluster.\n\n _Tells an agent whether the conversation around a story is still net-positive or has soured; useful before quoting a story._\n\n ```bash\n digg-pp-cli sentiment iq7usf9e --window 6h --json\n ```\n\n## Usage\n\nRun `digg-pp-cli --help` for the full command reference and flag list.\n\n## Commands\n\n### feed\n\nTop-level story feed (HTML page; CLI parses the embedded RSC stream)\n\n- **`digg-pp-cli feed raw`** - Fetch the raw /ai HTML page. The CLI's sync command parses this; most users should run `sync` then `top` instead of calling this directly.\n- **`digg-pp-cli feed story_raw`** - Fetch the raw /ai/{clusterUrlId} story detail page (HTML). The CLI's `story` command parses this; users should not need to call this directly.\n\n### github\n\nGitHub feeds Digg surfaces alongside the X-account leaderboard. Four flavors, each parsed from the embedded RSC stream.\n\n- **`digg-pp-cli github stars`** - Top AI repos ranked by starring activity from Digg-tracked accounts. Returns repo name, language, stargazers_count, recent starrer list, breakout_score, novel_score, ai_related_score, and the model's one-sentence classification. Flag: `--min-starrers N` filters to repos starred by >= N distinct accounts (smart-money convergence).\n- **`digg-pp-cli github new`** - Recently first-seen repos with the Digg-tracked creator/starrer who first put them on Digg's radar (event_id, event_created_at, repo_full_name, creator).\n- **`digg-pp-cli github activity`** - Top GitHub contributor leaderboard: per-author rank, contribution count, and distinct repos.\n- **`digg-pp-cli github recent`** - Live activity feed: per-event entries with the GitHub URL and the user who acted.\n\n### Rankings views\n\nSub-views of the `/ai/x/rankings/companies` page, each parsed from a distinct section of the same RSC stream. Every command shares a schema-drift gate via `--max-skip-ratio` (default 0.10).\n\n- **`digg-pp-cli rankings emerging`** - Curated list of small AI companies (the \"EMERGING STARTUPS — CURATED THIS SNAPSHOT\" section). ~10 rows per snapshot. Each row carries `isEmergingStartup` (the AI judge's verdict) plus the curator's `emergingReasoning` text.\n- **`digg-pp-cli rankings movers`** - Companies whose follower count shifted most since the last snapshot. `--direction up|down|both` (default both, with direction tagged per row). ~10 rows per side.\n- **`digg-pp-cli rankings list`** - Full company ranking (the \"Companies followed by the AI 2K\" section). Server-paginated; returns the initial-HTML slice. `--limit` caps.\n\n### search\n\nTopic search across the full Digg window\n\n- **`digg-pp-cli search \"\u003cquery>\"`** - Live by default (`/api/search/stories`); FTS5 fallback to the local store. Flags: `--since Nh|Nd|Nw|Nm`, `--data-source live|local|auto`, `--limit`.\n\n### authors\n\nInspect Digg's tracked AI-news accounts (the /ai/1000 roster).\n\n- **`digg-pp-cli authors get \u003chandle>`** - Look up any X handle (1000 + off-1000); off-1000 records include `subject_peer_follow_count`, the rank-1000 `nearest_in_1000` anchor, and `peer_follow_gap`. Flag: `--limit` (fuzzy fallback).\n- **`digg-pp-cli authors list`** - Full ranked roster from `/ai/1000`, persisted with rich fields. Flags: `--by rank|rankChange|category|followers`, `--category`, `--only-new`, `--only-fallers`, `--limit`.\n- **`digg-pp-cli authors top`** - Top contributors by influence, post count, or reach.\n\n### posts\n\nX posts attached to one cluster\n\n- **`digg-pp-cli posts \u003cclusterUrlId>`** - Origins, replies, quotes, retweets with author rank, body when rendered, media URLs, minted xUrl. Flags: `--by rank|type|time`, `--type tweet|reply|quote|retweet`, `--limit`, `--no-cache`.\n\n### story\n\nFull cluster detail. The envelope now includes `posts` and `postsMeta` fields populated by the U5 RSC parser.\n\n### trending\n\nPublic ingestion-pipeline status and event stream\n\n- **`digg-pp-cli trending status`** - Read the current pipeline status: storiesToday, clustersToday, isFetching, nextFetchAt, and the recent event stream (cluster_detected, fast_climb, post_understanding, batch_started, batch_breakdown, posts_stored, embedding_progress).\n\n## Output Formats\n\n```bash\n# Human-readable table (default in terminal, JSON when piped)\ndigg-pp-cli feed raw\n\n# JSON for scripting and agents\ndigg-pp-cli feed raw --json\n\n# Filter to specific fields\ndigg-pp-cli feed raw --json --select id,name,status\n\n# Dry run — show the request without sending\ndigg-pp-cli feed raw --dry-run\n\n# Agent mode — JSON + compact + no prompts in one flag\ndigg-pp-cli feed raw --agent\n```\n\n## Agent Usage\n\nThis CLI is designed for AI agent consumption:\n\n- **Non-interactive** - never prompts, every input is a flag\n- **Pipeable** - `--json` output to stdout, errors to stderr\n- **Filterable** - `--select id,name` returns only fields you need\n- **Previewable** - `--dry-run` shows the request without sending\n- **Read-only by default** - this CLI does not create, update, delete, publish, send, or mutate remote resources\n- **Offline-friendly** - sync/search commands can use the local SQLite store when available\n- **Agent-safe by default** - no colors or formatting unless `--human-friendly` is set\n\nExit codes: `0` success, `2` usage error, `3` not found, `5` API error, `7` rate limited, `10` config error.\n\n## Health Check\n\n```bash\ndigg-pp-cli doctor\n```\n\nVerifies configuration and connectivity to the API.\n\n## Configuration\n\nConfig file: `~/.config/digg-pp-cli/config.toml`\n\n## Troubleshooting\n**Not found errors (exit code 3)**\n- Check the resource ID is correct\n- Run the `list` command to see available items\n\n### API-specific\n\n- **All commands return empty after install** — Run `digg-pp-cli sync` first — the local store is empty until the first sync.\n- **`events` shows no fast_climb / cluster_detected events** — The pipeline batches every ~10 minutes. Wait for `nextFetchAt` from `digg-pp-cli pipeline status` or filter by a different `--type`.\n- **HTTP 429 on sync** — Adaptive limiter backs off automatically. If it persists, lower the polling rate with `--interval 120s` on `watch` commands.\n- **Story command returns 'cluster not found'** — Use `clusterUrlId` (the 8-char alphanumeric short ID), not the UUID-style clusterId. `digg-pp-cli top --json --select clusterUrlId` lists them.\n\n## HTTP Transport\n\nThis CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.\n\n---\n\n## Sources & Inspiration\n\nThis CLI was built by studying these projects and resources:\n\n- [**haxor-news**](https://github.com/donnemartin/haxor-news) — Python (4000 stars)\n- [**circumflex**](https://github.com/bensadeh/circumflex) — Go (1900 stars)\n- [**rafaelrinaldi/hn-cli**](https://github.com/rafaelrinaldi/hn-cli) — JavaScript (700 stars)\n- [**brianlovin/hn-cli**](https://github.com/brianlovin/hn-cli) — TypeScript (250 stars)\n- [**heartleo/hn-cli**](https://github.com/heartleo/hn-cli) — Rust (100 stars)\n- [**hntop-cli**](https://github.com/nilic/hntop-cli) — Go (30 stars)\n\nGenerated by [CLI Printing Press](https://github.com/mvanhorn/cli-printing-press)\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":18550,"content_sha256":"86099569c8125337f6da0f9e268401fb111f03ca570168f966cdff94e0089e8d"},{"filename":"spec.yaml","content":"name: digg\ndisplay_name: Digg\ndescription: \"Digg: tail the AI story leaderboard, GitHub feeds, ranking-change history, and live ingestion pipeline events from the terminal. Read-only.\"\nversion: \"0.2.0\"\nbase_url: \"https://di.gg\"\ncli_description: \"Read-only CLI for Digg — the AI story leaderboard, GitHub feeds, and ingestion pipeline events on digg.com.\"\n\nauth:\n type: none\n\nconfig:\n format: toml\n path: \"~/.config/digg-pp-cli/config.toml\"\n\nresources:\n trending:\n description: \"Public ingestion-pipeline status and event stream\"\n endpoints:\n status:\n method: GET\n path: \"/api/trending/status\"\n description: \"Read the current pipeline status: storiesToday, clustersToday, isFetching, nextFetchAt, and the recent event stream (cluster_detected, fast_climb, post_understanding, batch_started, batch_breakdown, posts_stored, embedding_progress).\"\n params: []\n response:\n type: object\n item: TrendingStatus\n\n feed:\n description: \"Top-level story feed (HTML page; CLI parses the embedded RSC stream)\"\n endpoints:\n raw:\n method: GET\n path: \"/ai\"\n description: \"Fetch the raw /ai HTML page. The CLI's sync command parses this; most users should run `sync` then `top` instead of calling this directly.\"\n params: []\n response:\n type: object\n item: RawHTML\n\n story_raw:\n method: GET\n path: \"/ai/{cluster_url_id}\"\n description: \"Fetch the raw /ai/{clusterUrlId} story detail page (HTML). The CLI's `story` command parses this; users should not need to call this directly.\"\n params:\n - name: cluster_url_id\n type: string\n required: true\n positional: true\n description: \"Short alphanumeric cluster URL ID (8 chars), e.g. iq7usf9e\"\n response:\n type: object\n item: RawHTML\n\n github:\n description: \"GitHub feeds Digg surfaces alongside the X-account leaderboard (stars / new / activity / recent).\"\n endpoints:\n stars:\n method: GET\n path: \"/ai/github/stars\"\n description: \"Top AI repos ranked by starring activity from Digg-tracked accounts. Returns repo_full_name, language, stargazers_count, recent starrer list, breakout/novel/ai_related scores, and the model's one-sentence classification.\"\n params:\n # PATCH(digg-rankings-and-min-starrers): smart-money-convergence filter.\n - name: min-starrers\n type: int\n required: false\n description: \"Keep only repos starred by >= N distinct Digg-tracked accounts (reads .repo.distinct_starrers, falls back to len(.repo.starrers) when absent). Applied BEFORE --limit. 0 = no filter; must be >= 0.\"\n response:\n type: object\n item: RawHTML\n\n new:\n method: GET\n path: \"/ai/github/new\"\n description: \"Recently first-seen GitHub repos with the Digg-tracked creator/starrer who first put them on Digg's radar (event_id + event_created_at + creator).\"\n params: []\n response:\n type: object\n item: RawHTML\n\n activity:\n method: GET\n path: \"/ai/github/activity\"\n description: \"Top GitHub contributor leaderboard: per-author rank, contribution count, and distinct repos count over Digg's tracking window.\"\n params: []\n response:\n type: object\n item: RawHTML\n\n recent:\n method: GET\n path: \"/ai/github/recent\"\n description: \"Live GitHub activity feed: per-event entries with the github.com URL (issue/PR/commit/repo), the user who acted, and a short description of the target.\"\n params: []\n response:\n type: object\n item: RawHTML\n\n # PATCH(digg-rankings-and-min-starrers): three sub-views of the\n # /ai/x/rankings/companies page, each parsed from a distinct section\n # of the same embedded RSC stream.\n rankings:\n description: \"Rankings views Digg publishes alongside the AI 1000 leaderboard. Three sub-views of the /ai/x/rankings/companies snapshot.\"\n endpoints:\n emerging:\n method: GET\n path: \"/ai/x/rankings/companies\"\n description: \"Curated list of small AI companies (the 'EMERGING STARTUPS — CURATED THIS SNAPSHOT' block). ~10 rows refreshed per snapshot. Mixes AI-judge-flagged emerging startups (IsEmergingStartup=true) with adjacent new entrants the curator surfaced.\"\n params:\n - name: max-skip-ratio\n type: float\n required: false\n description: \"Schema-drift tolerance: fraction of entries that may fail to decode before the command exits non-zero. Default 0.10. Range [0, 1].\"\n response:\n type: object\n item: RawHTML\n\n movers:\n method: GET\n path: \"/ai/x/rankings/companies\"\n description: \"Companies whose follower count shifted most since the last snapshot. --direction up returns gainers, down returns losers, both returns both with direction stamped per row.\"\n params:\n - name: direction\n type: string\n required: false\n description: \"Movers direction: up | down | both (default both).\"\n - name: max-skip-ratio\n type: float\n required: false\n description: \"Schema-drift tolerance (see emerging).\"\n response:\n type: object\n item: RawHTML\n\n list:\n method: GET\n path: \"/ai/x/rankings/companies\"\n description: \"Full company ranking — the 'Companies followed by the AI 2K' section. Server-paginated; this returns the initial-HTML slice (typically the top 50-200 entries).\"\n params:\n - name: limit\n type: int\n required: false\n description: \"Max rows to return from the initial-HTML slice (0 = all).\"\n - name: max-skip-ratio\n type: float\n required: false\n description: \"Schema-drift tolerance (see emerging).\"\n response:\n type: object\n item: RawHTML\n\ntypes:\n TrendingStatus:\n fields:\n - name: computedAt\n type: string\n - name: nextFetchAt\n type: string\n - name: lastFetchCompletedAt\n type: string\n - name: isFetching\n type: bool\n - name: storiesToday\n type: int\n - name: clustersToday\n type: int\n\n RawHTML:\n fields:\n - name: body\n type: string\n","content_type":"application/yaml; charset=utf-8","language":"yaml","size":6484,"content_sha256":"35fe2c2058d356391e2421400504a10b4cb1140b0baa62931de7cfd8b096599b"},{"filename":"testdata/ai-1000-fixture.html","content":"\u003c!DOCTYPE html>\n\u003chtml lang=\"en\">\n\u003chead>\n\u003cmeta charset=\"UTF-8\" />\n\u003ctitle>Digg AI 1000 — trimmed fixture\u003c/title>\n\u003c/head>\n\u003cbody>\n\u003cscript>self.__next_f.push([1,\"19:[\\\"$\\\",\\\"$L25\\\",null,{\\\"entries\\\":[{\\\"rank\\\":1,\\\"target_x_id\\\":\\\"1605\\\",\\\"followed_by_count\\\":573,\\\"score\\\":0.00000302210685691912,\\\"username\\\":\\\"sama\\\",\\\"display_name\\\":\\\"Sam Altman\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1605/avatar-ba04d329d59d7ed5.jpg\\\",\\\"followers_count\\\":4773236,\\\"bio\\\":\\\"AI is cool i guess\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":1,\\\"rankChange\\\":0,\\\"categoryRank\\\":1,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":3.1,\\\"hopeful\\\":21.9,\\\"humorous\\\":9.4,\\\"teaching\\\":3.9,\\\"combative\\\":0.3,\\\"informing\\\":17.4,\\\"announcing\\\":21.8,\\\"supportive\\\":19.5,\\\"provocative\\\":2.2,\\\"devils_advocate\\\":0.7},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":2,\\\"target_x_id\\\":\\\"33836629\\\",\\\"followed_by_count\\\":679,\\\"score\\\":0.00000296811832908434,\\\"username\\\":\\\"karpathy\\\",\\\"display_name\\\":\\\"Andrej Karpathy\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/33836629/avatar-a74d9abc4ba9fd95.jpg\\\",\\\"followers_count\\\":2381794,\\\"bio\\\":\\\"I like to train large deep neural nets. Previously Director of AI @ Tesla, founding team @ OpenAI, PhD @ Stanford.\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/karpathy\\\",\\\"previousRank\\\":2,\\\"rankChange\\\":0,\\\"categoryRank\\\":1,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.4,\\\"hopeful\\\":10.8,\\\"humorous\\\":12.7,\\\"teaching\\\":22.6,\\\"combative\\\":0.1,\\\"informing\\\":25.8,\\\"announcing\\\":12,\\\"supportive\\\":6.5,\\\"provocative\\\":7.6,\\\"devils_advocate\\\":1.6},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":3,\\\"target_x_id\\\":\\\"44196397\\\",\\\"followed_by_count\\\":351,\\\"score\\\":0.00000290777307839567,\\\"username\\\":\\\"elonmusk\\\",\\\"display_name\\\":\\\"Elon Musk\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/44196397/avatar-d3afe8d4a4ae7bd7.jpg\\\",\\\"followers_count\\\":240008864,\\\"bio\\\":\\\"http://Terafab.ai\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":9,\\\"githubUrl\\\":null,\\\"previousRank\\\":3,\\\"rankChange\\\":0,\\\"categoryRank\\\":2,\\\"vibeDistribution\\\":{\\\"troll\\\":0.5,\\\"banter\\\":10.7,\\\"hopeful\\\":6.6,\\\"humorous\\\":6.9,\\\"teaching\\\":5,\\\"combative\\\":4.2,\\\"informing\\\":17.2,\\\"announcing\\\":9.9,\\\"supportive\\\":24.2,\\\"provocative\\\":13.7,\\\"devils_advocate\\\":1},\\\"vibeTweetCount\\\":140},{\\\"rank\\\":4,\\\"target_x_id\\\":\\\"911297187664949248\\\",\\\"followed_by_count\\\":645,\\\"score\\\":0.00000290113107316847,\\\"username\\\":\\\"JeffDean\\\",\\\"display_name\\\":\\\"Jeff Dean\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/911297187664949248/avatar-b882eab139e1e725.jpg\\\",\\\"followers_count\\\":437429,\\\"bio\\\":\\\"Chief Scientist, Google DeepMind \\u0026 Google Research. Gemini Lead. Opinions stated here are my own, not those of Google. TensorFlow, MapReduce, Bigta...\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":4,\\\"rankChange\\\":0,\\\"categoryRank\\\":1,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.8,\\\"hopeful\\\":14.1,\\\"humorous\\\":7,\\\"teaching\\\":11.7,\\\"combative\\\":1.1,\\\"informing\\\":26.9,\\\"announcing\\\":15.8,\\\"supportive\\\":19.9,\\\"provocative\\\":1.4,\\\"devils_advocate\\\":0.3},\\\"vibeTweetCount\\\":180},{\\\"rank\\\":5,\\\"target_x_id\\\":\\\"48008938\\\",\\\"followed_by_count\\\":550,\\\"score\\\":0.00000264374546951532,\\\"username\\\":\\\"ylecun\\\",\\\"display_name\\\":\\\"Yann LeCun\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/48008938/avatar-ca3d3a7145bf1d79.jpg\\\",\\\"followers_count\\\":1147866,\\\"bio\\\":\\\"Professor at NYU \\u0026 Executive Chairman at AMI Labs. \\\\nEx-Chief AI Scientist at Meta.\\\\nResearcher in AI, Machine Learning, Robotics, etc.\\\\nACM Turing Aw...\\\",\\\"category\\\":\\\"Academic\\\",\\\"categoryConfidence\\\":7.2,\\\"githubUrl\\\":\\\"https://github.com/ylecun\\\",\\\"previousRank\\\":6,\\\"rankChange\\\":1,\\\"categoryRank\\\":2,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":15.7,\\\"hopeful\\\":0.7,\\\"humorous\\\":31.1,\\\"teaching\\\":5.4,\\\"combative\\\":1.1,\\\"informing\\\":11.4,\\\"announcing\\\":2.6,\\\"supportive\\\":0.4,\\\"provocative\\\":31.1,\\\"devils_advocate\\\":0.3},\\\"vibeTweetCount\\\":35},{\\\"rank\\\":6,\\\"target_x_id\\\":\\\"1720046887\\\",\\\"followed_by_count\\\":601,\\\"score\\\":0.00000262991419714078,\\\"username\\\":\\\"ilyasut\\\",\\\"display_name\\\":\\\"Ilya Sutskever\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1720046887/avatar-46073f8f96cc04ec.jpg\\\",\\\"followers_count\\\":667121,\\\"bio\\\":\\\"SSI @SSI\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":5,\\\"rankChange\\\":-1,\\\"categoryRank\\\":3,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.1,\\\"hopeful\\\":16.2,\\\"humorous\\\":12.6,\\\"teaching\\\":28.5,\\\"combative\\\":0.1,\\\"informing\\\":9.5,\\\"announcing\\\":4.6,\\\"supportive\\\":9.7,\\\"provocative\\\":17,\\\"devils_advocate\\\":1.7},\\\"vibeTweetCount\\\":199},{\\\"rank\\\":7,\\\"target_x_id\\\":\\\"1482581556\\\",\\\"followed_by_count\\\":561,\\\"score\\\":0.00000239091179596819,\\\"username\\\":\\\"demishassabis\\\",\\\"display_name\\\":\\\"Demis Hassabis\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1482581556/avatar-bad54d51929922a5.jpg\\\",\\\"followers_count\\\":875438,\\\"bio\\\":\\\"Nobel Laureate. Co-Founder \\u0026 CEO @GoogleDeepMind - working on AGI. Solving disease @IsomorphicLabs. Trying to understand the fundamental nature of ...\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":9,\\\"githubUrl\\\":\\\"https://github.com/demishassabis\\\",\\\"previousRank\\\":7,\\\"rankChange\\\":0,\\\"categoryRank\\\":4,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.4,\\\"hopeful\\\":22.1,\\\"humorous\\\":7.2,\\\"teaching\\\":6.6,\\\"combative\\\":0,\\\"informing\\\":23.4,\\\"announcing\\\":21.9,\\\"supportive\\\":17.7,\\\"provocative\\\":0.6,\\\"devils_advocate\\\":0.1},\\\"vibeTweetCount\\\":180},{\\\"rank\\\":8,\\\"target_x_id\\\":\\\"1084212657761148928\\\",\\\"followed_by_count\\\":502,\\\"score\\\":0.00000237953567801154,\\\"username\\\":\\\"geoffreyhinton\\\",\\\"display_name\\\":\\\"Geoffrey Hinton\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1084212657761148928/avatar-f82ddb54caf554dd.jpg\\\",\\\"followers_count\\\":586302,\\\"bio\\\":\\\"deep learning\\\",\\\"category\\\":\\\"AI Safety\\\",\\\"categoryConfidence\\\":8,\\\"githubUrl\\\":null,\\\"previousRank\\\":8,\\\"rankChange\\\":0,\\\"categoryRank\\\":3,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0,\\\"hopeful\\\":8,\\\"humorous\\\":5.9,\\\"teaching\\\":12.5,\\\"combative\\\":5.1,\\\"informing\\\":26.5,\\\"announcing\\\":13.1,\\\"supportive\\\":17.8,\\\"provocative\\\":9.6,\\\"devils_advocate\\\":1.5},\\\"vibeTweetCount\\\":71},{\\\"rank\\\":9,\\\"target_x_id\\\":\\\"162124540\\\",\\\"followed_by_count\\\":501,\\\"score\\\":0.00000230414497383093,\\\"username\\\":\\\"gdb\\\",\\\"display_name\\\":\\\"Greg Brockman\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/162124540/avatar-dfa5286158023830.jpg\\\",\\\"followers_count\\\":971598,\\\"bio\\\":\\\"President \\u0026 Co-Founder @OpenAI\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/gdb\\\",\\\"previousRank\\\":9,\\\"rankChange\\\":0,\\\"categoryRank\\\":5,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.4,\\\"hopeful\\\":27.7,\\\"humorous\\\":3.3,\\\"teaching\\\":6.8,\\\"combative\\\":0,\\\"informing\\\":26.6,\\\"announcing\\\":19.9,\\\"supportive\\\":14,\\\"provocative\\\":1.4,\\\"devils_advocate\\\":0.2},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":10,\\\"target_x_id\\\":\\\"775449094739197953\\\",\\\"followed_by_count\\\":506,\\\"score\\\":0.00000224619496214014,\\\"username\\\":\\\"goodfellow_ian\\\",\\\"display_name\\\":\\\"Ian Goodfellow\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/775449094739197953/avatar-c1aa2268a6974edf.jpg\\\",\\\"followers_count\\\":367994,\\\"bio\\\":\\\"Co-founder of stealth startup. Inventor of GANs. Lead author of https://t.co/M6vl8pEQ4I Founding chairman of @pubhealthaction\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":9.5,\\\"githubUrl\\\":\\\"https://github.com/goodfeli\\\",\\\"previousRank\\\":10,\\\"rankChange\\\":0,\\\"categoryRank\\\":4,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0,\\\"hopeful\\\":9.9,\\\"humorous\\\":0.6,\\\"teaching\\\":23.8,\\\"combative\\\":0.4,\\\"informing\\\":34.7,\\\"announcing\\\":12.3,\\\"supportive\\\":15.1,\\\"provocative\\\":2.5,\\\"devils_advocate\\\":0.6},\\\"vibeTweetCount\\\":79},{\\\"rank\\\":25,\\\"target_x_id\\\":\\\"70831441\\\",\\\"followed_by_count\\\":446,\\\"score\\\":0.00000199109643797931,\\\"username\\\":\\\"soumithchintala\\\",\\\"display_name\\\":\\\"Soumith Chintala\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/70831441/avatar-41344d11a79db05e.jpg\\\",\\\"followers_count\\\":298419,\\\"bio\\\":\\\"Building new things @thinkymachines. Also dabble in robotics at NYU. Cofounded @PyTorch. AI is delicious when it is accessible and open-source.\\\",\\\"category\\\":\\\"Open Source\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/soumith\\\",\\\"previousRank\\\":24,\\\"rankChange\\\":-1,\\\"categoryRank\\\":8,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.8,\\\"hopeful\\\":15,\\\"humorous\\\":7.1,\\\"teaching\\\":11.3,\\\"combative\\\":0.3,\\\"informing\\\":28.5,\\\"announcing\\\":8.9,\\\"supportive\\\":17.9,\\\"provocative\\\":7.7,\\\"devils_advocate\\\":1.7},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":50,\\\"target_x_id\\\":\\\"1007413134\\\",\\\"followed_by_count\\\":404,\\\"score\\\":0.00000176449984440401,\\\"username\\\":\\\"DrJimFan\\\",\\\"display_name\\\":\\\"Jim Fan\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1007413134/avatar-64d9bdbf750f3d49.jpg\\\",\\\"followers_count\\\":398428,\\\"bio\\\":\\\"NVIDIA Director of Robotics \\u0026 Distinguished Scientist. Co-Lead of GEAR lab. Solving Physical AGI, one motor at a time. Stanford Ph.D. OpenAI's 1st ...\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/DrJimFan\\\",\\\"previousRank\\\":49,\\\"rankChange\\\":-1,\\\"categoryRank\\\":33,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.5,\\\"hopeful\\\":16.5,\\\"humorous\\\":7.1,\\\"teaching\\\":13,\\\"combative\\\":0,\\\"informing\\\":23.8,\\\"announcing\\\":17.5,\\\"supportive\\\":14.7,\\\"provocative\\\":6.7,\\\"devils_advocate\\\":0.4},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":75,\\\"target_x_id\\\":\\\"37254334\\\",\\\"followed_by_count\\\":291,\\\"score\\\":0.00000166425046581782,\\\"username\\\":\\\"ShaneLegg\\\",\\\"display_name\\\":\\\"Shane Legg\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/37254334/avatar-4df6f424dbd06e9d.jpg\\\",\\\"followers_count\\\":78445,\\\"bio\\\":\\\"Chief AGI Scientist \\u0026 Co-Founder, Google DeepMind\\\\n\\\\nWork website: https://t.co/E4SyeGVYXk\\\\nPersonal blog: https://t.co/LL9JNdNpW1\\\",\\\"category\\\":\\\"AI Safety\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/mathemajician\\\",\\\"previousRank\\\":77,\\\"rankChange\\\":2,\\\"categoryRank\\\":14,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.7,\\\"hopeful\\\":19.1,\\\"humorous\\\":9.8,\\\"teaching\\\":6.7,\\\"combative\\\":0,\\\"informing\\\":19.2,\\\"announcing\\\":18.2,\\\"supportive\\\":23.4,\\\"provocative\\\":2.3,\\\"devils_advocate\\\":0.7},\\\"vibeTweetCount\\\":159},{\\\"rank\\\":100,\\\"target_x_id\\\":\\\"15626406\\\",\\\"followed_by_count\\\":289,\\\"score\\\":0.00000158208054649588,\\\"username\\\":\\\"michael_nielsen\\\",\\\"display_name\\\":\\\"Michael Nielsen\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/15626406/avatar-1632c5e7e7dab320.jpg\\\",\\\"followers_count\\\":118279,\\\"bio\\\":\\\"Searching for the numinous\\\\n🇦🇺 🇨🇦, currently live in 🇺🇸\\\\nResearch @AsteraInstitute\\\\n\\\\nhttp://michaelnotebook.com\\\\nhttps://bsky.app/profile/michaelnielse...\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":7.5,\\\"githubUrl\\\":\\\"https://github.com/mnielsen\\\",\\\"previousRank\\\":103,\\\"rankChange\\\":3,\\\"categoryRank\\\":64,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.4,\\\"hopeful\\\":6.9,\\\"humorous\\\":7.6,\\\"teaching\\\":19.7,\\\"combative\\\":0,\\\"informing\\\":37.6,\\\"announcing\\\":6.1,\\\"supportive\\\":12.8,\\\"provocative\\\":6.8,\\\"devils_advocate\\\":2.3},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":150,\\\"target_x_id\\\":\\\"197313522\\\",\\\"followed_by_count\\\":193,\\\"score\\\":0.00000145613726096062,\\\"username\\\":\\\"earnmyturns\\\",\\\"display_name\\\":\\\"Fernando Pereira\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/197313522/avatar-fd4d6d2098763b14.jpg\\\",\\\"followers_count\\\":18653,\\\"bio\\\":\\\"Google VP \\u0026 Engineering Fellow; former Penn professor; ML/NLP researcher; fanatic skier; he/him.\\\\nAlso @earnmyturns at https://t.co/saabSbObxd\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":7.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":155,\\\"rankChange\\\":5,\\\"categoryRank\\\":98,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.7,\\\"hopeful\\\":8.1,\\\"humorous\\\":7.1,\\\"teaching\\\":11,\\\"combative\\\":0.4,\\\"informing\\\":34.2,\\\"announcing\\\":17,\\\"supportive\\\":14.4,\\\"provocative\\\":4.9,\\\"devils_advocate\\\":1.2},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":175,\\\"target_x_id\\\":\\\"823957466\\\",\\\"followed_by_count\\\":208,\\\"score\\\":0.00000142289942472439,\\\"username\\\":\\\"hannawallach\\\",\\\"display_name\\\":\\\"Hanna Wallach (@hannawallach.bsky.social)\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/823957466/avatar-a11091a7902b0ff1.jpeg\\\",\\\"followers_count\\\":20766,\\\"bio\\\":\\\"Microsoft Research NYC. Fairness, accountability \\u0026 transparency in AI/ML. NeurIPS \\u0026 ICML board member, WiML co-founder, sloth enthusiast. She/her.\\\",\\\"category\\\":\\\"AI Safety\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/hannawallach\\\",\\\"previousRank\\\":199,\\\"rankChange\\\":24,\\\"categoryRank\\\":113,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.5,\\\"hopeful\\\":10,\\\"humorous\\\":3.6,\\\"teaching\\\":15.7,\\\"combative\\\":0,\\\"informing\\\":24.4,\\\"announcing\\\":18.8,\\\"supportive\\\":23.1,\\\"provocative\\\":3.8,\\\"devils_advocate\\\":0.2},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":200,\\\"target_x_id\\\":\\\"636513296\\\",\\\"followed_by_count\\\":181,\\\"score\\\":0.00000139598611064218,\\\"username\\\":\\\"nikitabier\\\",\\\"display_name\\\":\\\"Nikita Bier\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/636513296/avatar-38d9b55b0c527cd1.jpg\\\",\\\"followers_count\\\":1036626,\\\"bio\\\":\\\"head of product @x, advisor @solana, venture partner @lightspeedvp, ex-founder @gasappteam (acq by discord), ex-founder @thetbhapp (acq by facebook)\\\",\\\"category\\\":\\\"Executive\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":176,\\\"rankChange\\\":-24,\\\"categoryRank\\\":30,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":3.8,\\\"hopeful\\\":11.9,\\\"humorous\\\":23.4,\\\"teaching\\\":5.1,\\\"combative\\\":0.2,\\\"informing\\\":17.2,\\\"announcing\\\":21.3,\\\"supportive\\\":10.3,\\\"provocative\\\":6.4,\\\"devils_advocate\\\":0.4},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":225,\\\"target_x_id\\\":\\\"978823301802819584\\\",\\\"followed_by_count\\\":196,\\\"score\\\":0.00000136851855304881,\\\"username\\\":\\\"ancadianadragan\\\",\\\"display_name\\\":\\\"Anca Dragan\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/978823301802819584/avatar-5964abd5ebcd0287.jpg\\\",\\\"followers_count\\\":13414,\\\"bio\\\":\\\"Google DeepMind • AI safety, alignment, collaboration • post training • associate professor @ UC Berkeley EECS\\\",\\\"category\\\":\\\"AI Safety\\\",\\\"categoryConfidence\\\":8,\\\"githubUrl\\\":null,\\\"previousRank\\\":239,\\\"rankChange\\\":14,\\\"categoryRank\\\":145,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.2,\\\"hopeful\\\":14.5,\\\"humorous\\\":4.7,\\\"teaching\\\":10.7,\\\"combative\\\":0,\\\"informing\\\":23.5,\\\"announcing\\\":20.5,\\\"supportive\\\":24,\\\"provocative\\\":0.8,\\\"devils_advocate\\\":0.2},\\\"vibeTweetCount\\\":165},{\\\"rank\\\":250,\\\"target_x_id\\\":\\\"2530947115\\\",\\\"followed_by_count\\\":173,\\\"score\\\":0.00000134298047928162,\\\"username\\\":\\\"tegmark\\\",\\\"display_name\\\":\\\"Max Tegmark\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/2530947115/avatar-ec2c316955b6926c.jpeg\\\",\\\"followers_count\\\":154754,\\\"bio\\\":\\\"Known as Mad Max for my unorthodox ideas and passion for adventure, my scientific interests range from artificial intelligence to the ultimate natu...\\\",\\\"category\\\":\\\"AI Safety\\\",\\\"categoryConfidence\\\":8,\\\"githubUrl\\\":\\\"https://github.com/mtegmark\\\",\\\"previousRank\\\":245,\\\"rankChange\\\":-5,\\\"categoryRank\\\":164,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.3,\\\"hopeful\\\":7.3,\\\"humorous\\\":6.8,\\\"teaching\\\":8.9,\\\"combative\\\":2.2,\\\"informing\\\":28,\\\"announcing\\\":12,\\\"supportive\\\":11.4,\\\"provocative\\\":20.7,\\\"devils_advocate\\\":1.4},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":300,\\\"target_x_id\\\":\\\"29178343\\\",\\\"followed_by_count\\\":193,\\\"score\\\":0.00000129585297262931,\\\"username\\\":\\\"AlexGDimakis\\\",\\\"display_name\\\":\\\"Alex Dimakis\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/29178343/avatar-179d141fb405e76a.jpeg\\\",\\\"followers_count\\\":23122,\\\"bio\\\":\\\"Professor, UC berkeley | Founder @bespokelabsai |\\\",\\\"category\\\":\\\"Academic\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":321,\\\"rankChange\\\":21,\\\"categoryRank\\\":195,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.5,\\\"hopeful\\\":13.4,\\\"humorous\\\":9.1,\\\"teaching\\\":11.1,\\\"combative\\\":0,\\\"informing\\\":30.3,\\\"announcing\\\":13.8,\\\"supportive\\\":15.3,\\\"provocative\\\":4.7,\\\"devils_advocate\\\":0.9},\\\"vibeTweetCount\\\":199},{\\\"rank\\\":350,\\\"target_x_id\\\":\\\"9445792\\\",\\\"followed_by_count\\\":169,\\\"score\\\":0.00000126849714715107,\\\"username\\\":\\\"zoink\\\",\\\"display_name\\\":\\\"Dylan Field\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/9445792/avatar-c6c5583d6c6d26da.jpg\\\",\\\"followers_count\\\":182723,\\\"bio\\\":\\\"eliminate the gap between imagination and reality\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":9.5,\\\"githubUrl\\\":\\\"https://github.com/dfield\\\",\\\"previousRank\\\":329,\\\"rankChange\\\":-21,\\\"categoryRank\\\":49,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":3.2,\\\"hopeful\\\":16.9,\\\"humorous\\\":14.4,\\\"teaching\\\":6.3,\\\"combative\\\":0,\\\"informing\\\":19.8,\\\"announcing\\\":13.8,\\\"supportive\\\":16.2,\\\"provocative\\\":7.3,\\\"devils_advocate\\\":2},\\\"vibeTweetCount\\\":198},{\\\"rank\\\":400,\\\"target_x_id\\\":\\\"136262002\\\",\\\"followed_by_count\\\":149,\\\"score\\\":0.00000123892461140837,\\\"username\\\":\\\"Michael_J_Black\\\",\\\"display_name\\\":\\\"Michael Black\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/136262002/avatar-4e199bcb1efae858.jpg\\\",\\\"followers_count\\\":96000,\\\"bio\\\":\\\"VP Digital Human Research, Epic Games. Emeritus Director, Max Planck Institute for Intelligent Systems (@MPI_IS).\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":6.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":420,\\\"rankChange\\\":20,\\\"categoryRank\\\":267,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.5,\\\"hopeful\\\":10.1,\\\"humorous\\\":6.9,\\\"teaching\\\":15.1,\\\"combative\\\":0,\\\"informing\\\":25,\\\"announcing\\\":22.5,\\\"supportive\\\":15.3,\\\"provocative\\\":3.8,\\\"devils_advocate\\\":0.8},\\\"vibeTweetCount\\\":199},{\\\"rank\\\":450,\\\"target_x_id\\\":\\\"771970414155182081\\\",\\\"followed_by_count\\\":160,\\\"score\\\":0.00000122437631001795,\\\"username\\\":\\\"realGeorgeHotz\\\",\\\"display_name\\\":\\\"George Hotz 🌑\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/771970414155182081/avatar-f397b22d0b7721d0.jpg\\\",\\\"followers_count\\\":302690,\\\"bio\\\":\\\"President @comma_ai. Founder @__tinygrad__\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":7.5,\\\"githubUrl\\\":\\\"https://github.com/geohot\\\",\\\"previousRank\\\":438,\\\"rankChange\\\":-12,\\\"categoryRank\\\":57,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0},{\\\"rank\\\":500,\\\"target_x_id\\\":\\\"355616314\\\",\\\"followed_by_count\\\":131,\\\"score\\\":0.00000120667073845316,\\\"username\\\":\\\"mpshanahan\\\",\\\"display_name\\\":\\\"Murray Shanahan\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/355616314/avatar-b2c428d2c2bb7667.jpg\\\",\\\"followers_count\\\":20395,\\\"bio\\\":\\\"Professor at Imperial College London and Principal Scientist at Google DeepMind. Tweeting in a personal capacity. To send me a message please use e...\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/mpshanahan\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":339,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.2,\\\"hopeful\\\":3.2,\\\"humorous\\\":7.9,\\\"teaching\\\":19.9,\\\"combative\\\":0,\\\"informing\\\":33.4,\\\"announcing\\\":15.3,\\\"supportive\\\":13.6,\\\"provocative\\\":3.7,\\\"devils_advocate\\\":1.9},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":550,\\\"target_x_id\\\":\\\"22330739\\\",\\\"followed_by_count\\\":105,\\\"score\\\":0.00000119486273155445,\\\"username\\\":\\\"Benioff\\\",\\\"display_name\\\":\\\"Marc Benioff\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/22330739/avatar-f753f9942c141d41.jpg\\\",\\\"followers_count\\\":1884710,\\\"bio\\\":\\\"[email protected] [email protected]\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":9.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":63,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.1,\\\"hopeful\\\":22.7,\\\"humorous\\\":7.9,\\\"teaching\\\":4.6,\\\"combative\\\":0.1,\\\"informing\\\":12,\\\"announcing\\\":27.2,\\\"supportive\\\":21.6,\\\"provocative\\\":2.6,\\\"devils_advocate\\\":0.3},\\\"vibeTweetCount\\\":160},{\\\"rank\\\":600,\\\"target_x_id\\\":\\\"945809834112200704\\\",\\\"followed_by_count\\\":117,\\\"score\\\":0.00000118125134647502,\\\"username\\\":\\\"peterxichen\\\",\\\"display_name\\\":\\\"Peter Chen\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/945809834112200704/avatar-095f7b2c441e7dee.jpg\\\",\\\"followers_count\\\":4060,\\\"bio\\\":\\\"Building general purpose robotics at Amazon FAR. Previously Covariant CEO and Co-Founder, @OpenAI, @UCBerkeley PhD.\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":7.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":31,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0,\\\"hopeful\\\":27.5,\\\"humorous\\\":0,\\\"teaching\\\":16.6,\\\"combative\\\":0,\\\"informing\\\":28.8,\\\"announcing\\\":8.9,\\\"supportive\\\":18.2,\\\"provocative\\\":0,\\\"devils_advocate\\\":0},\\\"vibeTweetCount\\\":28},{\\\"rank\\\":650,\\\"target_x_id\\\":\\\"226053662\\\",\\\"followed_by_count\\\":105,\\\"score\\\":0.00000116886662109122,\\\"username\\\":\\\"_jongwook_kim\\\",\\\"display_name\\\":\\\"Jong Wook Kim 💟\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/226053662/avatar-9877f8a973e7045e.jpg\\\",\\\"followers_count\\\":4029,\\\"bio\\\":\\\"Member of Technical Staff @OpenAI; previously at @nyuMARL, @SpotifyResearch, @pandoramusic, @kakaocorpglobal, and @NCSOFT\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/jongwook\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":432,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":2,\\\"hopeful\\\":15.5,\\\"humorous\\\":16.2,\\\"teaching\\\":5.8,\\\"combative\\\":0,\\\"informing\\\":17.6,\\\"announcing\\\":17.3,\\\"supportive\\\":20.9,\\\"provocative\\\":4.8,\\\"devils_advocate\\\":0},\\\"vibeTweetCount\\\":33},{\\\"rank\\\":700,\\\"target_x_id\\\":\\\"38724319\\\",\\\"followed_by_count\\\":95,\\\"score\\\":0.00000115967699720318,\\\"username\\\":\\\"samsamoa\\\",\\\"display_name\\\":\\\"sam\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/38724319/avatar-acd402ac75dcd65a.jpg\\\",\\\"followers_count\\\":3722,\\\"bio\\\":\\\"\\\",\\\"category\\\":\\\"Founder\\\",\\\"categoryConfidence\\\":8,\\\"githubUrl\\\":\\\"https://github.com/samsamoa\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":83,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0},{\\\"rank\\\":750,\\\"target_x_id\\\":\\\"19387570\\\",\\\"followed_by_count\\\":89,\\\"score\\\":0.00000115214110864083,\\\"username\\\":\\\"tsimonite\\\",\\\"display_name\\\":\\\"Tom Simonite\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/19387570/avatar-dea175dc3694946a.jpeg\\\",\\\"followers_count\\\":16293,\\\"bio\\\":\\\"Tech companies editor @washingtonpost // [email protected] // DM for Signal\\\",\\\"category\\\":\\\"Creator\\\",\\\"categoryConfidence\\\":9,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":50,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":2.4,\\\"hopeful\\\":3.1,\\\"humorous\\\":15.7,\\\"teaching\\\":3.6,\\\"combative\\\":0.2,\\\"informing\\\":53.6,\\\"announcing\\\":3.6,\\\"supportive\\\":2.3,\\\"provocative\\\":14.9,\\\"devils_advocate\\\":0.6},\\\"vibeTweetCount\\\":140},{\\\"rank\\\":800,\\\"target_x_id\\\":\\\"2281473800\\\",\\\"followed_by_count\\\":79,\\\"score\\\":0.0000011441586614355,\\\"username\\\":\\\"tamarawinter\\\",\\\"display_name\\\":\\\"Tamara Winter\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/2281473800/avatar-0f37ae88c6b2358d.jpg\\\",\\\"followers_count\\\":30900,\\\"bio\\\":\\\"Publisher @stripepress | Board @ifp + @joinFAI | Creator of TACIT, a mini-documentary series following master craftspeople at work\\\",\\\"category\\\":\\\"Creator\\\",\\\"categoryConfidence\\\":8,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":37,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.5,\\\"hopeful\\\":10.8,\\\"humorous\\\":9.8,\\\"teaching\\\":15.5,\\\"combative\\\":0.3,\\\"informing\\\":22.5,\\\"announcing\\\":13.4,\\\"supportive\\\":17.4,\\\"provocative\\\":7.4,\\\"devils_advocate\\\":1.5},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":850,\\\"target_x_id\\\":\\\"1314686042\\\",\\\"followed_by_count\\\":104,\\\"score\\\":0.00000113936418085729,\\\"username\\\":\\\"rowancheung\\\",\\\"display_name\\\":\\\"Rowan Cheung\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1314686042/avatar-d076521786254330.jpg\\\",\\\"followers_count\\\":587829,\\\"bio\\\":\\\"Founder of the world’s most read daily AI newsletter @therundownai. Sharing the latest developments in the world of artificial intelligence.\\\",\\\"category\\\":\\\"Creator\\\",\\\"categoryConfidence\\\":8,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":97,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.1,\\\"hopeful\\\":10,\\\"humorous\\\":1.4,\\\"teaching\\\":18.7,\\\"combative\\\":0,\\\"informing\\\":39.1,\\\"announcing\\\":21.9,\\\"supportive\\\":6.4,\\\"provocative\\\":2.4,\\\"devils_advocate\\\":0.2},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":900,\\\"target_x_id\\\":\\\"2850858010\\\",\\\"followed_by_count\\\":105,\\\"score\\\":0.00000113296759710025,\\\"username\\\":\\\"rao2z\\\",\\\"display_name\\\":\\\"Subbarao Kambhampati (కంభంపాటి సుబ్బారావు)\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/2850858010/avatar-ddc523ad966e4e55.jpg\\\",\\\"followers_count\\\":27690,\\\"bio\\\":\\\"AI researcher \\u0026 teacher @SCAI_ASU. Former President of @RealAAAI; Chair of @AAAS Sec T. Here to tweach #AI. YouTube Ch: http://bit.ly/38twrAV Bsky...\\\",\\\"category\\\":\\\"Academic\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":591,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":2.3,\\\"hopeful\\\":4.9,\\\"humorous\\\":23.2,\\\"teaching\\\":12.6,\\\"combative\\\":0.2,\\\"informing\\\":18.8,\\\"announcing\\\":16.1,\\\"supportive\\\":7.8,\\\"provocative\\\":13.4,\\\"devils_advocate\\\":0.8},\\\"vibeTweetCount\\\":180},{\\\"rank\\\":950,\\\"target_x_id\\\":\\\"15616053\\\",\\\"followed_by_count\\\":63,\\\"score\\\":0.00000112596321390008,\\\"username\\\":\\\"SoloGen\\\",\\\"display_name\\\":\\\"Amir-massoud Farahmand\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/15616053/avatar-cb5bdf5107d8dc44.jpeg\\\",\\\"followers_count\\\":5834,\\\"bio\\\":\\\"Goal: Understanding the computational and statistical principles required to design adaptive agents.\\\\nAssociate Prof @polymtl @Mila_Quebec 🇨🇦\\\\n#Mahsa...\\\",\\\"category\\\":\\\"Academic\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":\\\"https://github.com/amfarahmand\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":623,\\\"vibeDistribution\\\":{\\\"troll\\\":0.1,\\\"banter\\\":1.7,\\\"hopeful\\\":5.6,\\\"humorous\\\":10.2,\\\"teaching\\\":18.8,\\\"combative\\\":1.2,\\\"informing\\\":24.7,\\\"announcing\\\":8.7,\\\"supportive\\\":12.4,\\\"provocative\\\":13.2,\\\"devils_advocate\\\":3.3},\\\"vibeTweetCount\\\":180},{\\\"rank\\\":980,\\\"target_x_id\\\":\\\"80603\\\",\\\"followed_by_count\\\":98,\\\"score\\\":0.00000112274676847079,\\\"username\\\":\\\"Fraser\\\",\\\"display_name\\\":\\\"fraser\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/80603/avatar-bd515243701ef5be.jpg\\\",\\\"followers_count\\\":14106,\\\"bio\\\":\\\"vc at @sparkcapital past: head of product at @openai; co-founder/ceo of an AI startup that was acquired by Airbnb\\\",\\\"category\\\":\\\"Investor\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":41,\\\"vibeDistribution\\\":{\\\"troll\\\":0.1,\\\"banter\\\":0.3,\\\"hopeful\\\":22.9,\\\"humorous\\\":4.5,\\\"teaching\\\":11.5,\\\"combative\\\":0,\\\"informing\\\":24.9,\\\"announcing\\\":14.8,\\\"supportive\\\":15.9,\\\"provocative\\\":4,\\\"devils_advocate\\\":1.1},\\\"vibeTweetCount\\\":117},{\\\"rank\\\":985,\\\"target_x_id\\\":\\\"1561140974\\\",\\\"followed_by_count\\\":83,\\\"score\\\":0.00000112234783106817,\\\"username\\\":\\\"jasminewsun\\\",\\\"display_name\\\":\\\"jasmine sun\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1561140974/avatar-b66f63ef6ea3c384.jpg\\\",\\\"followers_count\\\":20165,\\\"bio\\\":\\\"anthropologist of disruption ✰ contributor @theatlantic ✰ newsletter http://jasmi.news\\\",\\\"category\\\":\\\"Creator\\\",\\\"categoryConfidence\\\":9,\\\"githubUrl\\\":\\\"https://github.com/jaswsunny\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":68,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":4.9,\\\"hopeful\\\":5.3,\\\"humorous\\\":16.8,\\\"teaching\\\":11.8,\\\"combative\\\":0.9,\\\"informing\\\":18.7,\\\"announcing\\\":12.8,\\\"supportive\\\":9.4,\\\"provocative\\\":16.3,\\\"devils_advocate\\\":3},\\\"vibeTweetCount\\\":198},{\\\"rank\\\":990,\\\"target_x_id\\\":\\\"807327556072402945\\\",\\\"followed_by_count\\\":89,\\\"score\\\":0.00000112189737428812,\\\"username\\\":\\\"machelreid\\\",\\\"display_name\\\":\\\"Machel Reid\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/807327556072402945/avatar-57c49f09fa60bb03.jpg\\\",\\\"followers_count\\\":3155,\\\"bio\\\":\\\"research scientist @googledeepmind ♊️\\\\n\\\\npost-training/thinking/rl\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":9,\\\"githubUrl\\\":\\\"https://github.com/machelreid\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":649,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":2.7,\\\"hopeful\\\":13.4,\\\"humorous\\\":14.6,\\\"teaching\\\":14.9,\\\"combative\\\":0,\\\"informing\\\":21.7,\\\"announcing\\\":15.8,\\\"supportive\\\":14.6,\\\"provocative\\\":1.5,\\\"devils_advocate\\\":0.8},\\\"vibeTweetCount\\\":142},{\\\"rank\\\":991,\\\"target_x_id\\\":\\\"47195143\\\",\\\"followed_by_count\\\":122,\\\"score\\\":0.00000112171228433177,\\\"username\\\":\\\"logangraham\\\",\\\"display_name\\\":\\\"Logan Graham\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/47195143/avatar-d55c68ed373aaeab.jpg\\\",\\\"followers_count\\\":16894,\\\"bio\\\":\\\"Head of the Frontier Red Team @anthropicai. 🌎 Make things radically good.\\\",\\\"category\\\":\\\"AI Safety\\\",\\\"categoryConfidence\\\":8.2,\\\"githubUrl\\\":\\\"https://github.com/logangraham\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":650,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1,\\\"hopeful\\\":14.9,\\\"humorous\\\":6.3,\\\"teaching\\\":10.3,\\\"combative\\\":0,\\\"informing\\\":31.3,\\\"announcing\\\":20,\\\"supportive\\\":11.8,\\\"provocative\\\":4.1,\\\"devils_advocate\\\":0.4},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":992,\\\"target_x_id\\\":\\\"19829477\\\",\\\"followed_by_count\\\":55,\\\"score\\\":0.00000112166171883824,\\\"username\\\":\\\"djhsu\\\",\\\"display_name\\\":\\\"daniel hsu\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/19829477/avatar-bcb8c3047ade730d.jpg\\\",\\\"followers_count\\\":1426,\\\"bio\\\":\\\"@[email protected]\\\",\\\"category\\\":\\\"Academic\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":\\\"https://github.com/djhsu\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":651,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":2.3,\\\"hopeful\\\":0,\\\"humorous\\\":3.8,\\\"teaching\\\":0,\\\"combative\\\":0,\\\"informing\\\":56.9,\\\"announcing\\\":36.9,\\\"supportive\\\":0,\\\"provocative\\\":0,\\\"devils_advocate\\\":0},\\\"vibeTweetCount\\\":13},{\\\"rank\\\":993,\\\"target_x_id\\\":\\\"229669572\\\",\\\"followed_by_count\\\":75,\\\"score\\\":0.0000011215819201257,\\\"username\\\":\\\"hunterlightman\\\",\\\"display_name\\\":\\\"hunter\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/229669572/avatar-969e4c6b38029b90.jpg\\\",\\\"followers_count\\\":4039,\\\"bio\\\":\\\"openai\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":8.7,\\\"githubUrl\\\":\\\"https://github.com/huntrr\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":652,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":2,\\\"hopeful\\\":12.3,\\\"humorous\\\":24.5,\\\"teaching\\\":10,\\\"combative\\\":0,\\\"informing\\\":6.5,\\\"announcing\\\":3.5,\\\"supportive\\\":26.3,\\\"provocative\\\":10,\\\"devils_advocate\\\":5},\\\"vibeTweetCount\\\":20},{\\\"rank\\\":994,\\\"target_x_id\\\":\\\"1940856026\\\",\\\"followed_by_count\\\":80,\\\"score\\\":0.00000112156971430023,\\\"username\\\":\\\"recurseparadox\\\",\\\"display_name\\\":\\\"Pranav Shyam\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1940856026/avatar-23fe15a84c009398.jpg\\\",\\\"followers_count\\\":1723,\\\"bio\\\":\\\"research scientist at google deepmind. ಕನ್ನಡಿಗ. past: generative models @openai\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/pranv\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":653,\\\"vibeDistribution\\\":{\\\"troll\\\":0.1,\\\"banter\\\":5.1,\\\"hopeful\\\":10.4,\\\"humorous\\\":25.4,\\\"teaching\\\":9.1,\\\"combative\\\":0.8,\\\"informing\\\":15.9,\\\"announcing\\\":5,\\\"supportive\\\":11.1,\\\"provocative\\\":14.6,\\\"devils_advocate\\\":2.5},\\\"vibeTweetCount\\\":180},{\\\"rank\\\":995,\\\"target_x_id\\\":\\\"1258886893\\\",\\\"followed_by_count\\\":95,\\\"score\\\":0.0000011214955222718,\\\"username\\\":\\\"stephzhan\\\",\\\"display_name\\\":\\\"Stephanie Zhan\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1258886893/avatar-ae5ae687bcae8f01.jpg\\\",\\\"followers_count\\\":30172,\\\"bio\\\":\\\"GP @Sequoia, investing in AI, from company formation. 1st partner to @linear @mach_industries @middeskhq @reflection_ai @ricursiveai @skildai @tavus\\\",\\\"category\\\":\\\"Investor\\\",\\\"categoryConfidence\\\":9,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":43,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.1,\\\"hopeful\\\":21.9,\\\"humorous\\\":1.8,\\\"teaching\\\":7.8,\\\"combative\\\":0,\\\"informing\\\":23,\\\"announcing\\\":24.6,\\\"supportive\\\":17.7,\\\"provocative\\\":2.4,\\\"devils_advocate\\\":0.8},\\\"vibeTweetCount\\\":197},{\\\"rank\\\":996,\\\"target_x_id\\\":\\\"1467438402\\\",\\\"followed_by_count\\\":108,\\\"score\\\":0.00000112138731837285,\\\"username\\\":\\\"niloofar_mire\\\",\\\"display_name\\\":\\\"Niloofar\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1467438402/avatar-f888f6bd54097dc5.jpg\\\",\\\"followers_count\\\":9943,\\\"bio\\\":\\\"Technical staff @humansand, incoming asst. prof @LTIatCMU @CMU_EPP, ex RS in @AIatMeta, postdoc @uwcse, Ph.D. @ucsd_cse, former @MSFTResearch -Priv...\\\",\\\"category\\\":\\\"Researcher\\\",\\\"categoryConfidence\\\":8.7,\\\"githubUrl\\\":\\\"https://github.com/mireshghallah\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":654,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.9,\\\"hopeful\\\":11.1,\\\"humorous\\\":6,\\\"teaching\\\":12.1,\\\"combative\\\":0,\\\"informing\\\":19.2,\\\"announcing\\\":24.2,\\\"supportive\\\":17.3,\\\"provocative\\\":8.7,\\\"devils_advocate\\\":0.5},\\\"vibeTweetCount\\\":66},{\\\"rank\\\":997,\\\"target_x_id\\\":\\\"3895721659\\\",\\\"followed_by_count\\\":73,\\\"score\\\":0.00000112130124586356,\\\"username\\\":\\\"_rlys\\\",\\\"display_name\\\":\\\"rachel lim\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/3895721659/avatar-299aa4e84e3f4ad6.jpg\\\",\\\"followers_count\\\":2650,\\\"bio\\\":\\\"eng, aesthete, bookreader. building things @openai\\\",\\\"category\\\":\\\"Engineer\\\",\\\"categoryConfidence\\\":7.2,\\\"githubUrl\\\":\\\"https://github.com/rachellim\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":60,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":2.7,\\\"hopeful\\\":12.1,\\\"humorous\\\":27.1,\\\"teaching\\\":6,\\\"combative\\\":0,\\\"informing\\\":24.8,\\\"announcing\\\":13,\\\"supportive\\\":7,\\\"provocative\\\":6.6,\\\"devils_advocate\\\":0.7},\\\"vibeTweetCount\\\":163},{\\\"rank\\\":998,\\\"target_x_id\\\":\\\"10580512\\\",\\\"followed_by_count\\\":92,\\\"score\\\":0.00000112085549614338,\\\"username\\\":\\\"spolu\\\",\\\"display_name\\\":\\\"Stanislas Polu\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/10580512/avatar-6994c0dab18d7c63.jpeg\\\",\\\"followers_count\\\":21544,\\\"bio\\\":\\\"co-founder+engineer(https://t.co/SXBR0l9TrF); alumni(https://t.co/z6zJ8xaKGI, https://t.co/CvVTA1CHAo, https://t.co/WOVEe2aLcK, https://t.co/ui9I4N...\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":8,\\\"githubUrl\\\":\\\"https://github.com/spolu\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":61,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":1.3,\\\"hopeful\\\":15.9,\\\"humorous\\\":7.7,\\\"teaching\\\":20.7,\\\"combative\\\":0.1,\\\"informing\\\":23.7,\\\"announcing\\\":13.5,\\\"supportive\\\":5.5,\\\"provocative\\\":9.5,\\\"devils_advocate\\\":2.2},\\\"vibeTweetCount\\\":200},{\\\"rank\\\":999,\\\"target_x_id\\\":\\\"824207366484848641\\\",\\\"followed_by_count\\\":93,\\\"score\\\":0.00000112076060625133,\\\"username\\\":\\\"MichaelTrazzi\\\",\\\"display_name\\\":\\\"Michaël Trazzi\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/824207366484848641/avatar-aed50b402d75c1d6.jpg\\\",\\\"followers_count\\\":22990,\\\"bio\\\":\\\"https://t.co/gZL7Ttk7zB\\\",\\\"category\\\":\\\"AI Safety\\\",\\\"categoryConfidence\\\":7,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":23,\\\"vibeDistribution\\\":{\\\"troll\\\":0,\\\"banter\\\":0.4,\\\"hopeful\\\":7.7,\\\"humorous\\\":2.1,\\\"teaching\\\":8.4,\\\"combative\\\":0.2,\\\"informing\\\":38.2,\\\"announcing\\\":28.5,\\\"supportive\\\":6,\\\"provocative\\\":6.6,\\\"devils_advocate\\\":1.6},\\\"vibeTweetCount\\\":199},{\\\"rank\\\":1000,\\\"target_x_id\\\":\\\"999734461758562305\\\",\\\"followed_by_count\\\":90,\\\"score\\\":0.00000112065001845981,\\\"username\\\":\\\"brhydon\\\",\\\"display_name\\\":\\\"Brydon Eastman\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/999734461758562305/avatar-e49803fc2deb4769.jpg\\\",\\\"followers_count\\\":3460,\\\"bio\\\":\\\"🇨🇦\\\\n\\\\nMathematician (heavy on the ish)\\\\n\\\\n@thinkymachines \\\\n\\\\nPrev. MTS @OpenAI; PhD @WaterlooMath\\\\n\\\\nCertified wife guy, featured twice in Lego Magazine ©...\\\",\\\"category\\\":\\\"Research Engineer\\\",\\\"categoryConfidence\\\":8.5,\\\"githubUrl\\\":\\\"https://github.com/brydon\\\",\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":655,\\\"vibeDistribution\\\":{\\\"troll\\\":0.1,\\\"banter\\\":7.3,\\\"hopeful\\\":7.6,\\\"humorous\\\":25.6,\\\"teaching\\\":12.2,\\\"combative\\\":1.4,\\\"informing\\\":12.3,\\\"announcing\\\":4.1,\\\"supportive\\\":10.3,\\\"provocative\\\":16.7,\\\"devils_advocate\\\":2.4},\\\"vibeTweetCount\\\":160}}],\\\"maxScore\\\":0.00000302210685691912,\\\"searchSlot\\\":\\\"$L26\\\"}]\\n\"])\u003c/script>\n\u003c/body>\n\u003c/html>\n","content_type":"text/html; charset=utf-8","language":"markup","size":38074,"content_sha256":"4925859656cfc17f1aab9fc7fcc0afac55eafb99161d48ee15fecd927e0b2eb8"},{"filename":"testdata/cluster-nvidia-smsfvt1s.html","content":"\u003c!DOCTYPE html>\u003chtml data-dpl-id=\"dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" lang=\"en\" class=\"font-mono roobert_5b9f2ef3-module__MhV_Ca__variable roobertmono_1c9b74c0-module__1gYL6W__variable ibm_plex_sans_3fe6b80b-module__gGWq6q__variable vt323_e797edd-module__xfr93W__variable\">\u003chead>\u003cmeta charSet=\"utf-8\"/>\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\u003clink rel=\"preload\" as=\"image\" href=\"/digg-logo.svg?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\"/>\u003clink rel=\"stylesheet\" href=\"/_next/static/chunks/0lvsx._w8pzil.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" data-precedence=\"next\"/>\u003clink rel=\"stylesheet\" href=\"/_next/static/chunks/1756jf1h5ux_d.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" data-precedence=\"next\"/>\u003clink rel=\"preload\" as=\"script\" fetchPriority=\"low\" href=\"/_next/static/chunks/0.ew75x5.gr8c.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\"/>\u003cscript src=\"/_next/static/chunks/0yf5lpgkckp6~.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/12a-_~1ghvwb3.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0vl.b5ewoe-6w.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0gsg5q0x7rqra.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0b-gs--tmnuk0.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/12_oxpqqyqkfq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0lqn1-6146o~2.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/10b_4mpa-frym.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/00lyiuj6u3dfn.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0.bgz3.i6wsdh.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0nf-z73t~gfo3.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/turbopack-0ohv61p8febm~.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0pwwa~klc58xq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/13gmk6_lng5-~.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0x7v.223181wa.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cscript src=\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" async=\"\">\u003c/script>\u003cmeta name=\"next-size-adjust\" content=\"\"/>\u003cscript>try{var views=new Set([\"kro2\"]);var v=new URLSearchParams(location.search).get('view');document.documentElement.dataset.topicView=views.has(v)?v:\"kro2\"}catch(e){}\u003c/script>\u003cmeta name=\"sentry-trace\" content=\"9c74de67d26c374335f1def75e40b573-403b886fef8cc91c\"/>\u003cmeta name=\"baggage\" content=\"sentry-environment=production,sentry-release=2f1589462048c1f766d20598a8f206fdf3496ba0,sentry-public_key=cdd8f10040d477e2c584558ca60e8f88,sentry-trace_id=9c74de67d26c374335f1def75e40b573,sentry-org_id=4511323215167488\"/>\u003cscript src=\"/_next/static/chunks/03~yq9q893hmn.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" noModule=\"\">\u003c/script>\u003c/head>\u003cbody class=\"antialiased\">\u003cdiv hidden=\"\">\u003c!--$?-->\u003ctemplate id=\"B:0\">\u003c/template>\u003c!--/$-->\u003c/div>\u003cscript>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=[\"light\",\"dark\"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c=\"class\"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&\"system\"===a?window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\":a;k(d)}catch(a){}})(\"class\",\"theme\",\"system\",null,[\"light\",\"dark\"],null,true,true)\u003c/script>\u003c!--&-->\u003c!--&-->\u003cdiv class=\"min-h-screen bg-background antialiased\">\u003c!--&-->\u003cdiv data-cluster-id=\"989f7cd2-ef43-4079-afd0-33ae6f2dff84\">\u003cdiv>\u003carticle class=\"mx-auto grid max-w-6xl grid-cols-12 gap-6 px-4 pb-4 pt-4 sm:px-10 sm:pb-6 sm:pt-6\">\u003cdiv class=\"col-span-12 mb-8 sm:mb-10\">\u003ca aria-label=\"digg home\" class=\"inline-flex items-end gap-2 hover:no-underline\" href=\"/ai\">\u003cimg alt=\"digg\" width=\"300\" height=\"80\" decoding=\"async\" data-nimg=\"1\" class=\"h-[28px] w-auto\" style=\"color:transparent\" src=\"/digg-logo.svg?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\"/>\u003cspan class=\"mb-2 font-mono text-xs uppercase tracking-wider text-muted-foreground\">/ai\u003c/span>\u003c/a>\u003c/div>\u003cdiv class=\"col-span-12 sm:col-span-7\">\u003cdiv class=\"mb-8 flex flex-wrap items-center gap-x-5 gap-y-3 sm:mb-10\">\u003ca aria-label=\"Back to feed\" class=\"transition-opacity hover:opacity-60\" href=\"/ai\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-left text-muted-foreground\" aria-hidden=\"true\">\u003cpath d=\"m12 19-7-7 7-7\">\u003c/path>\u003cpath d=\"M19 12H5\">\u003c/path>\u003c/svg>\u003c/a>\u003cspan class=\"font-mono text-xs font-medium leading-3 uppercase tracking-[0.1em] text-muted-foreground\">9h\u003c!-- --> ago\u003c/span>\u003c/div>\u003ch1 class=\"mb-4 text-balance wrap-anywhere font-sans text-3xl font-bold leading-[1.1] tracking-tight text-foreground sm:text-4xl\">NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x\u003c/h1>\u003c!--$?-->\u003ctemplate id=\"B:1\">\u003c/template>\u003cdiv data-cluster-hero-stats=\"true\" class=\"mb-9 flex flex-wrap items-center gap-x-10 gap-y-2 font-mono text-sm leading-5 text-muted-foreground\">\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-message-circle\" aria-hidden=\"true\">\u003cpath d=\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\">\u003c/path>\u003c/svg>—\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-heart\" aria-hidden=\"true\">\u003cpath d=\"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\">\u003c/path>\u003c/svg>—\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-repeat2 lucide-repeat-2\" aria-hidden=\"true\">\u003cpath d=\"m2 9 3-3 3 3\">\u003c/path>\u003cpath d=\"M13 18H7a2 2 0 0 1-2-2V6\">\u003c/path>\u003cpath d=\"m22 15-3 3-3-3\">\u003c/path>\u003cpath d=\"M11 6h6a2 2 0 0 1 2 2v10\">\u003c/path>\u003c/svg>0\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-bookmark\" aria-hidden=\"true\">\u003cpath d=\"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z\">\u003c/path>\u003c/svg>—\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-chart-column\" aria-hidden=\"true\">\u003cpath d=\"M3 3v16a2 2 0 0 0 2 2h16\">\u003c/path>\u003cpath d=\"M18 17V9\">\u003c/path>\u003cpath d=\"M13 17V5\">\u003c/path>\u003cpath d=\"M8 17v-3\">\u003c/path>\u003c/svg>—\u003c/span>\u003c/div>\u003c!--/$-->\u003cfieldset class=\"rounded-md border border-border p-4 sm:p-6\">\u003clegend class=\"ml-3 bg-background px-2 font-mono text-xs font-semibold uppercase leading-none tracking-[0.1em] text-muted-foreground\">Original post\u003c/legend>\u003cdiv class=\"space-y-3\">\u003cdiv class=\"flex min-w-0 items-center\">\u003cspan class=\"isolate inline-flex min-w-0 shrink-0 items-center\">\u003ca class=\"inline-flex h-7 max-w-[160px] shrink items-center gap-1 overflow-hidden rounded-full bg-muted pr-3 sm:max-w-[190px] relative z-10 group/chip transition-colors hover:bg-muted/80\" href=\"/u/x/daniellefong\">\u003cspan data-slot=\"avatar\" data-size=\"sm\" class=\"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten ring-2 ring-background\">\u003cspan data-slot=\"avatar-fallback\" class=\"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs\">DF\u003c/span>\u003c/span>\u003cspan class=\"whitespace-nowrap font-mono text-xs font-medium leading-4 tabular-nums text-muted-foreground\">#\u003c!-- -->632\u003c/span>\u003cspan class=\"truncate whitespace-nowrap font-mono text-xs font-semibold leading-4 text-foreground group-hover/chip:text-foreground group-hover/chip:underline\">@\u003c!-- -->DANIELLEFONG\u003c/span>\u003c/a>\u003ca class=\"inline-flex h-7 max-w-[180px] shrink-0 items-center gap-1.5 rounded-full border border-border/60 bg-background px-2 relative z-0 -ml-1.5 pl-4 transition-colors hover:bg-secondary/70 hover:no-underline\" href=\"/u/x/himanshustwts\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-repeat2 lucide-repeat-2 h-4 w-4 shrink-0 text-muted-foreground\" role=\"img\" aria-label=\"Reposted by\">\u003cpath d=\"m2 9 3-3 3 3\">\u003c/path>\u003cpath d=\"M13 18H7a2 2 0 0 1-2-2V6\">\u003c/path>\u003cpath d=\"m22 15-3 3-3-3\">\u003c/path>\u003cpath d=\"M11 6h6a2 2 0 0 1 2 2v10\">\u003c/path>\u003c/svg>\u003cspan class=\"truncate font-mono text-[11px] font-bold text-foreground\">@\u003c!-- -->HIMANSHUSTWTS\u003c/span>\u003c/a>\u003c/span>\u003c/div>\u003cdiv class=\"group block\">\u003cdiv class=\"flex items-center gap-3\">\u003ca class=\"flex min-w-0 flex-1 items-center gap-3 rounded-sm transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/50\" href=\"/u/x/himanshustwts\">\u003cspan data-slot=\"avatar\" data-size=\"sm\" class=\"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten ring-3 ring-background\">\u003cspan data-slot=\"avatar-fallback\" class=\"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs\">HI\u003c/span>\u003c/span>\u003cdiv class=\"flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-1\">\u003cspan class=\"min-w-0 truncate font-mono text-base font-semibold leading-6 text-foreground\">himanshu\u003c/span>\u003cspan class=\"min-w-0 truncate font-mono text-xs font-medium leading-4 text-muted-foreground\">@\u003c!-- -->HIMANSHUSTWTS\u003c/span>\u003c/div>\u003c/a>\u003ca href=\"https://x.com/himanshustwts/status/2053033764167794940\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"View original post on X\" class=\"shrink-0 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/50\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-chevron-right h-4 w-4\" aria-hidden=\"true\">\u003cpath d=\"m9 18 6-6-6-6\">\u003c/path>\u003c/svg>\u003c/a>\u003c/div>\u003cdiv class=\"mt-4 grid gap-4 sm:items-start sm:grid-cols-[minmax(0,1fr)_96px]\">\u003cp class=\"wrap-anywhere whitespace-pre-wrap font-sans text-base leading-6 text-foreground\">the harness of claude code is very interesting.\n\na random unstable header at the start of the prompt was breaking KV-cache reuse on a 52k-token context.\n\nNVIDIA stripped it out and TTFT dropped by 5x. https://twitter.com/nvidiaai/status/2052835023217103080\u003c/p>\u003cdiv class=\"grid shrink-0 gap-1\">\u003ca href=\"https://pbs.twimg.com/media/HH3XUrAaUAAXwXa.jpg\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"relative overflow-hidden rounded-md border border-border bg-background size-24 block transition-shadow hover:ring-1 hover:ring-foreground/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-foreground\" aria-label=\"View image\" title=\"View image\">\u003cimg src=\"https://pbs.twimg.com/media/HH3XUrAaUAAXwXa.jpg\" alt=\"\" loading=\"lazy\" class=\"size-full object-cover\"/>\u003c/a>\u003c/div>\u003c/div>\u003ca href=\"https://x.com/himanshustwts/status/2053033764167794940\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"mt-5 inline-flex font-mono text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/50\">\u003cspan>1:46 AM · May 9, 2026\u003c/span>\u003cspan class=\"sr-only\"> View on X\u003c/span>\u003c/a>\u003c/div>\u003c/div>\u003c/fieldset>\u003c/div>\u003caside class=\"col-span-12 flex flex-col gap-4 sm:col-span-5\">\u003c!--$?-->\u003ctemplate id=\"B:2\">\u003c/template>\u003cdiv data-cluster-sentiment-section=\"true\">\u003c/div>\u003c!--/$-->\u003c!--$?-->\u003ctemplate id=\"B:3\">\u003c/template>\u003cdiv data-cluster-awards-section=\"true\">\u003c/div>\u003c!--/$-->\u003c/aside>\u003cdiv class=\"col-span-12\">\u003c!--$?-->\u003ctemplate id=\"B:4\">\u003c/template>\u003cdiv data-cluster-engagement-section=\"true\">\u003c/div>\u003c!--/$-->\u003csection class=\"mt-10 pb-8 sm:pb-14\">\u003ch2 class=\"mb-6 font-mono text-xs font-semibold leading-3 uppercase tracking-[0.1em] text-muted-foreground\">AI 1000 · \u003c!-- -->1\u003c!-- --> \u003c!-- -->action\u003c/h2>\u003cul class=\"flex flex-col\">\u003cli class=\"group/row border-b border-border last:border-b-0\">\u003cdiv tabindex=\"0\" class=\"flex flex-wrap items-center gap-3 py-3 transition-colors sm:flex-nowrap sm:gap-4 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/40\">\u003cspan class=\"inline-flex h-7 w-16 shrink-0 items-center justify-center rounded-sm border border-border bg-background px-2.5 font-mono text-[10px] font-medium uppercase leading-[10px] tracking-[0.1em] text-muted-foreground\">REPOST\u003c/span>\u003cspan class=\"isolate inline-flex min-w-0 shrink items-center\">\u003ca class=\"inline-flex h-7 max-w-[160px] shrink items-center gap-1 overflow-hidden rounded-full bg-muted pr-3 sm:max-w-[190px] relative z-10 group/chip transition-colors hover:bg-muted/80\" href=\"/u/x/daniellefong\">\u003cspan data-slot=\"avatar\" data-size=\"sm\" class=\"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten ring-2 ring-background\">\u003cspan data-slot=\"avatar-fallback\" class=\"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs\">DF\u003c/span>\u003c/span>\u003cspan class=\"whitespace-nowrap font-mono text-xs font-medium leading-4 tabular-nums text-muted-foreground\">#\u003c!-- -->632\u003c/span>\u003cspan class=\"truncate whitespace-nowrap font-mono text-xs font-semibold leading-4 text-foreground group-hover/chip:text-foreground group-hover/chip:underline\">@\u003c!-- -->DANIELLEFONG\u003c/span>\u003c/a>\u003ca class=\"inline-flex h-7 max-w-[150px] shrink items-center gap-1.5 rounded-full border border-border/60 bg-background px-2 sm:max-w-[180px] relative z-0 -ml-1.5 pl-4 transition-colors hover:bg-secondary/70 hover:no-underline\" href=\"/u/x/himanshustwts\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-repeat2 lucide-repeat-2 h-4 w-4 shrink-0 text-muted-foreground\" role=\"img\" aria-label=\"Reposted from\">\u003cpath d=\"m2 9 3-3 3 3\">\u003c/path>\u003cpath d=\"M13 18H7a2 2 0 0 1-2-2V6\">\u003c/path>\u003cpath d=\"m22 15-3 3-3-3\">\u003c/path>\u003cpath d=\"M11 6h6a2 2 0 0 1 2 2v10\">\u003c/path>\u003c/svg>\u003cspan class=\"truncate font-mono text-[11px] font-bold text-foreground\">@\u003c!-- -->HIMANSHUSTWTS\u003c/span>\u003c/a>\u003c/span>\u003ca href=\"https://x.com/himanshustwts/status/2053033764167794940\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"group/msg inline-flex min-w-0 flex-[1_1_100%] items-center gap-2 font-sans text-sm leading-5 text-foreground hover:text-foreground sm:flex-1\">\u003cspan class=\"line-clamp-2 min-w-0 wrap-anywhere sm:truncate\">the harness of claude code is very interesting.\n\na random unstable header at the start of the prompt was breaking KV-cache reuse on a 52k-token context.\n\nNVIDIA stripped it out and TTFT dropped by 5x. https://x.com/himanshustwts/status/2053033764167794940/photo/1 https://twitter.com/nvidiaai/status/2052835023217103080\u003c/span>\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-up-right h-[18px] w-[18px] shrink-0 text-muted-foreground/60 transition-opacity group-hover/msg:text-muted-foreground\" aria-hidden=\"true\">\u003cpath d=\"M7 7h10v10\">\u003c/path>\u003cpath d=\"M7 17 17 7\">\u003c/path>\u003c/svg>\u003c/a>\u003c/div>\u003cdiv aria-hidden=\"true\" class=\"grid grid-rows-[0fr] transition-[grid-template-rows] duration-300 ease-out group-hover/row:grid-rows-[1fr] group-focus-within/row:grid-rows-[1fr]\">\u003cdiv class=\"overflow-hidden\">\u003cdiv class=\"px-3 pb-3 pt-1 sm:pl-[5rem] opacity-0 transition-opacity duration-200 delay-100 group-hover/row:opacity-100 group-focus-within/row:opacity-100\">\u003cp class=\"wrap-anywhere border-l-2 border-border/80 pl-3 text-sm leading-relaxed text-foreground/90\">the harness of claude code is very interesting.\n\na random unstable header at the start of the prompt was breaking KV-cache reuse on a 52k-token context.\n\nNVIDIA stripped it out and TTFT dropped by 5x. https://x.com/himanshustwts/status/2053033764167794940/photo/1 https://twitter.com/nvidiaai/status/2052835023217103080\u003c/p>\u003c/div>\u003c/div>\u003c/div>\u003c/li>\u003c/ul>\u003c/section>\u003c/div>\u003c/article>\u003c/div>\u003c/div>\u003c!--$?-->\u003ctemplate id=\"B:5\">\u003c/template>\u003c!--/$-->\u003c!--/&-->\u003c/div>\u003c!--/&-->\u003c!--/&-->\u003c!--$-->\u003c!--$-->\u003c!--/$-->\u003c!--$-->\u003c!--/$-->\u003c!--/$-->\u003cscript type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://di.gg#organization\",\"name\":\"Basic Intelligence\",\"url\":\"https://di.gg\",\"sameAs\":[\"https://x.com/basic_in_\"]},{\"@type\":\"WebSite\",\"@id\":\"https://di.gg#website\",\"name\":\"Digg\",\"alternateName\":\"DI.GG\",\"url\":\"https://di.gg\",\"description\":\"What the smartest voices on X are paying attention to — a live ranking of 1,000 AI influencers and the stories they're surfacing.\",\"publisher\":{\"@id\":\"https://di.gg#organization\"},\"inLanguage\":\"en-US\"}]}\u003c/script>\u003cscript>requestAnimationFrame(function(){$RT=performance.now()});\u003c/script>\u003cscript src=\"/_next/static/chunks/0.ew75x5.gr8c.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\" id=\"_R_\" async=\"\">\u003c/script>\u003cscript>(self.__next_f=self.__next_f||[]).push([0])\u003c/script>\u003cscript>self.__next_f.push([1,\"1:\\\"$Sreact.fragment\\\"\\n2:I[689554,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"ThemeProvider\\\"]\\n3:I[472463,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"default\\\"]\\n4:I[42735,[\\\"/_next/static/chunks/0pwwa~klc58xq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"default\\\"]\\n5:I[408821,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/13gmk6_lng5-~.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"default\\\"]\\n6:I[275925,[\\\"/_next/static/chunks/0pwwa~klc58xq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"default\\\"]\\n8:\\\"$Sreact.suspense\\\"\\n9:I[740875,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"Analytics\\\"]\\na:I[714544,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"SpeedInsights\\\"]\\nc:I[912969,[\\\"/_next/static/chunks/0pwwa~klc58xq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"OutletBoundary\\\"]\\nf:I[912969,[\\\"/_next/static/chunks/0pwwa~klc58xq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"ViewportBoundary\\\"]\\n11:I[912969,[\\\"/_next/static/chunks/0pwwa~klc58xq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"MetadataBoundary\\\"]\\n13:I[253348,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0x7v.223181wa.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"default\\\"]\\n:HL[\\\"/_next/static/chunks/0lvsx._w8pzil.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"style\\\"]\\n:HL[\\\"/_next/static/chunks/1756jf1h5ux_d.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"style\\\"]\\n:HL[\\\"/_next/static/media/RoobertItalicsVF-s.p.11bvu7mg4ag_3.woff2?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"font\\\",{\\\"crossOrigin\\\":\\\"\\\",\\\"type\\\":\\\"font/woff2\\\"}]\\n:HL[\\\"/_next/static/media/RoobertMonoItalicsVF-s.p.027sf7ir2.chl.woff2?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"font\\\",{\\\"crossOrigin\\\":\\\"\\\",\\\"type\\\":\\\"font/woff2\\\"}]\\n:HL[\\\"/_next/static/media/RoobertMonoVF-s.p.05dqoij8kj1xu.woff2?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"font\\\",{\\\"crossOrigin\\\":\\\"\\\",\\\"type\\\":\\\"font/woff2\\\"}]\\n:HL[\\\"/_next/static/media/RoobertVF-s.p.0g~ypblr_g~68.woff2?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"font\\\",{\\\"crossOrigin\\\":\\\"\\\",\\\"type\\\":\\\"font/woff2\\\"}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"0:{\\\"P\\\":null,\\\"c\\\":[\\\"\\\",\\\"ai\\\",\\\"smsfvt1s\\\"],\\\"q\\\":\\\"\\\",\\\"i\\\":false,\\\"f\\\":[[[\\\"\\\",{\\\"children\\\":[\\\"ai\\\",{\\\"children\\\":[[\\\"clusterId\\\",\\\"smsfvt1s\\\",\\\"d\\\",null],{\\\"children\\\":[\\\"__PAGE__\\\",{}]}]}]},\\\"$undefined\\\",\\\"$undefined\\\",16],[[\\\"$\\\",\\\"$1\\\",\\\"c\\\",{\\\"children\\\":[[[\\\"$\\\",\\\"link\\\",\\\"0\\\",{\\\"rel\\\":\\\"stylesheet\\\",\\\"href\\\":\\\"/_next/static/chunks/0lvsx._w8pzil.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"precedence\\\":\\\"next\\\",\\\"crossOrigin\\\":\\\"$undefined\\\",\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"link\\\",\\\"1\\\",{\\\"rel\\\":\\\"stylesheet\\\",\\\"href\\\":\\\"/_next/static/chunks/1756jf1h5ux_d.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"precedence\\\":\\\"next\\\",\\\"crossOrigin\\\":\\\"$undefined\\\",\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"script\\\",\\\"script-0\\\",{\\\"src\\\":\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true,\\\"nonce\\\":\\\"$undefined\\\"}]],[\\\"$\\\",\\\"html\\\",null,{\\\"lang\\\":\\\"en\\\",\\\"suppressHydrationWarning\\\":true,\\\"className\\\":\\\"font-mono roobert_5b9f2ef3-module__MhV_Ca__variable roobertmono_1c9b74c0-module__1gYL6W__variable ibm_plex_sans_3fe6b80b-module__gGWq6q__variable vt323_e797edd-module__xfr93W__variable\\\",\\\"children\\\":[[\\\"$\\\",\\\"head\\\",null,{\\\"children\\\":[\\\"$\\\",\\\"script\\\",null,{\\\"dangerouslySetInnerHTML\\\":{\\\"__html\\\":\\\"try{var views=new Set([\\\\\\\"kro2\\\\\\\"]);var v=new URLSearchParams(location.search).get('view');document.documentElement.dataset.topicView=views.has(v)?v:\\\\\\\"kro2\\\\\\\"}catch(e){}\\\"}}]}],[\\\"$\\\",\\\"body\\\",null,{\\\"className\\\":\\\"antialiased\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L2\\\",null,{\\\"children\\\":[\\\"$\\\",\\\"$L3\\\",null,{\\\"children\\\":[\\\"$\\\",\\\"$L4\\\",null,{\\\"parallelRouterKey\\\":\\\"children\\\",\\\"error\\\":\\\"$5\\\",\\\"errorStyles\\\":[],\\\"errorScripts\\\":[[\\\"$\\\",\\\"script\\\",\\\"script-0\\\",{\\\"src\\\":\\\"/_next/static/chunks/13gmk6_lng5-~.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true}]],\\\"template\\\":[\\\"$\\\",\\\"$L6\\\",null,{}],\\\"templateStyles\\\":\\\"$undefined\\\",\\\"templateScripts\\\":\\\"$undefined\\\",\\\"notFound\\\":[\\\"$L7\\\",[]],\\\"forbidden\\\":\\\"$undefined\\\",\\\"unauthorized\\\":\\\"$undefined\\\"}]}]}],[\\\"$\\\",\\\"$8\\\",null,{\\\"fallback\\\":null,\\\"children\\\":[[\\\"$\\\",\\\"$L9\\\",null,{}],[\\\"$\\\",\\\"$La\\\",null,{}]]}],[\\\"$\\\",\\\"script\\\",null,{\\\"type\\\":\\\"application/ld+json\\\",\\\"dangerouslySetInnerHTML\\\":{\\\"__html\\\":\\\"{\\\\\\\"@context\\\\\\\":\\\\\\\"https://schema.org\\\\\\\",\\\\\\\"@graph\\\\\\\":[{\\\\\\\"@type\\\\\\\":\\\\\\\"Organization\\\\\\\",\\\\\\\"@id\\\\\\\":\\\\\\\"https://di.gg#organization\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"Basic Intelligence\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://di.gg\\\\\\\",\\\\\\\"sameAs\\\\\\\":[\\\\\\\"https://x.com/basic_in_\\\\\\\"]},{\\\\\\\"@type\\\\\\\":\\\\\\\"WebSite\\\\\\\",\\\\\\\"@id\\\\\\\":\\\\\\\"https://di.gg#website\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"Digg\\\\\\\",\\\\\\\"alternateName\\\\\\\":\\\\\\\"DI.GG\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://di.gg\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"What the smartest voices on X are paying attention to — a live ranking of 1,000 AI influencers and the stories they're surfacing.\\\\\\\",\\\\\\\"publisher\\\\\\\":{\\\\\\\"@id\\\\\\\":\\\\\\\"https://di.gg#organization\\\\\\\"},\\\\\\\"inLanguage\\\\\\\":\\\\\\\"en-US\\\\\\\"}]}\\\"}}]]}]]}]]}],{\\\"children\\\":[[\\\"$\\\",\\\"$1\\\",\\\"c\\\",{\\\"children\\\":[null,[\\\"$\\\",\\\"$L4\\\",null,{\\\"parallelRouterKey\\\":\\\"children\\\",\\\"error\\\":\\\"$undefined\\\",\\\"errorStyles\\\":\\\"$undefined\\\",\\\"errorScripts\\\":\\\"$undefined\\\",\\\"template\\\":[\\\"$\\\",\\\"$L6\\\",null,{}],\\\"templateStyles\\\":\\\"$undefined\\\",\\\"templateScripts\\\":\\\"$undefined\\\",\\\"notFound\\\":\\\"$undefined\\\",\\\"forbidden\\\":\\\"$undefined\\\",\\\"unauthorized\\\":\\\"$undefined\\\"}]]}],{\\\"children\\\":[[\\\"$\\\",\\\"$1\\\",\\\"c\\\",{\\\"children\\\":[null,[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"min-h-screen bg-background antialiased\\\",\\\"children\\\":[\\\"$\\\",\\\"$L4\\\",null,{\\\"parallelRouterKey\\\":\\\"children\\\",\\\"error\\\":\\\"$undefined\\\",\\\"errorStyles\\\":\\\"$undefined\\\",\\\"errorScripts\\\":\\\"$undefined\\\",\\\"template\\\":[\\\"$\\\",\\\"$L6\\\",null,{}],\\\"templateStyles\\\":\\\"$undefined\\\",\\\"templateScripts\\\":\\\"$undefined\\\",\\\"notFound\\\":\\\"$undefined\\\",\\\"forbidden\\\":\\\"$undefined\\\",\\\"unauthorized\\\":\\\"$undefined\\\"}]}]]}],{\\\"children\\\":[[\\\"$\\\",\\\"$1\\\",\\\"c\\\",{\\\"children\\\":[\\\"$Lb\\\",[[\\\"$\\\",\\\"script\\\",\\\"script-0\\\",{\\\"src\\\":\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true,\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"script\\\",\\\"script-1\\\",{\\\"src\\\":\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true,\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"script\\\",\\\"script-2\\\",{\\\"src\\\":\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true,\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"script\\\",\\\"script-3\\\",{\\\"src\\\":\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true,\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"script\\\",\\\"script-4\\\",{\\\"src\\\":\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true,\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"script\\\",\\\"script-5\\\",{\\\"src\\\":\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"async\\\":true,\\\"nonce\\\":\\\"$undefined\\\"}]],[\\\"$\\\",\\\"$Lc\\\",null,{\\\"children\\\":[\\\"$\\\",\\\"$8\\\",null,{\\\"name\\\":\\\"Next.MetadataOutlet\\\",\\\"children\\\":\\\"$@d\\\"}]}]]}],{},null,false,null]},null,false,null]},null,false,\\\"$@e\\\"]},null,false,null],[\\\"$\\\",\\\"$1\\\",\\\"h\\\",{\\\"children\\\":[null,[\\\"$\\\",\\\"$Lf\\\",null,{\\\"children\\\":\\\"$L10\\\"}],[\\\"$\\\",\\\"div\\\",null,{\\\"hidden\\\":true,\\\"children\\\":[\\\"$\\\",\\\"$L11\\\",null,{\\\"children\\\":[\\\"$\\\",\\\"$8\\\",null,{\\\"name\\\":\\\"Next.Metadata\\\",\\\"children\\\":\\\"$L12\\\"}]}]}],[\\\"$\\\",\\\"meta\\\",null,{\\\"name\\\":\\\"next-size-adjust\\\",\\\"content\\\":\\\"\\\"}]]}],false]],\\\"m\\\":\\\"$undefined\\\",\\\"G\\\":[\\\"$13\\\",[[\\\"$\\\",\\\"link\\\",\\\"0\\\",{\\\"rel\\\":\\\"stylesheet\\\",\\\"href\\\":\\\"/_next/static/chunks/0lvsx._w8pzil.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"precedence\\\":\\\"next\\\",\\\"crossOrigin\\\":\\\"$undefined\\\",\\\"nonce\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"link\\\",\\\"1\\\",{\\\"rel\\\":\\\"stylesheet\\\",\\\"href\\\":\\\"/_next/static/chunks/1756jf1h5ux_d.css?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"precedence\\\":\\\"next\\\",\\\"crossOrigin\\\":\\\"$undefined\\\",\\\"nonce\\\":\\\"$undefined\\\"}]]],\\\"S\\\":true,\\\"h\\\":null,\\\"s\\\":\\\"$undefined\\\",\\\"l\\\":\\\"$undefined\\\",\\\"p\\\":\\\"$undefined\\\",\\\"d\\\":\\\"$undefined\\\"}\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"14:[]\\ne:\\\"$W14\\\"\\n10:[[\\\"$\\\",\\\"meta\\\",\\\"0\\\",{\\\"charSet\\\":\\\"utf-8\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"1\\\",{\\\"name\\\":\\\"viewport\\\",\\\"content\\\":\\\"width=device-width, initial-scale=1\\\"}]]\\n7:E{\\\"digest\\\":\\\"NEXT_REDIRECT;replace;/ai;307;\\\"}\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"15:I[97256,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"\\\"]\\n16:I[134518,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"Image\\\"]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"b:[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-id\\\":\\\"989f7cd2-ef43-4079-afd0-33ae6f2dff84\\\",\\\"children\\\":[\\\"$\\\",\\\"div\\\",null,{\\\"children\\\":[\\\"$\\\",\\\"article\\\",null,{\\\"className\\\":\\\"mx-auto grid max-w-6xl grid-cols-12 gap-6 px-4 pb-4 pt-4 sm:px-10 sm:pb-6 sm:pt-6\\\",\\\"children\\\":[[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"col-span-12 mb-8 sm:mb-10\\\",\\\"children\\\":[\\\"$\\\",\\\"$L15\\\",null,{\\\"href\\\":\\\"/ai\\\",\\\"aria-label\\\":\\\"digg home\\\",\\\"className\\\":\\\"inline-flex items-end gap-2 hover:no-underline\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L16\\\",null,{\\\"src\\\":\\\"/digg-logo.svg\\\",\\\"alt\\\":\\\"digg\\\",\\\"width\\\":300,\\\"height\\\":80,\\\"priority\\\":true,\\\"className\\\":\\\"h-[28px] w-auto\\\"}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"mb-2 font-mono text-xs uppercase tracking-wider text-muted-foreground\\\",\\\"children\\\":\\\"/ai\\\"}]]}]}],[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"col-span-12 sm:col-span-7\\\",\\\"children\\\":[[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"mb-8 flex flex-wrap items-center gap-x-5 gap-y-3 sm:mb-10\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L15\\\",null,{\\\"href\\\":\\\"/ai\\\",\\\"aria-label\\\":\\\"Back to feed\\\",\\\"className\\\":\\\"transition-opacity hover:opacity-60\\\",\\\"children\\\":[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":20,\\\"height\\\":20,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.75,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-arrow-left text-muted-foreground\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"1l729n\\\",{\\\"d\\\":\\\"m12 19-7-7 7-7\\\"}],[\\\"$\\\",\\\"path\\\",\\\"x3x0zl\\\",{\\\"d\\\":\\\"M19 12H5\\\"}],\\\"$undefined\\\"]}]}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"font-mono text-xs font-medium leading-3 uppercase tracking-[0.1em] text-muted-foreground\\\",\\\"children\\\":[\\\"9h\\\",\\\" ago\\\"]}]]}],[\\\"$\\\",\\\"h1\\\",null,{\\\"className\\\":\\\"mb-4 text-balance wrap-anywhere font-sans text-3xl font-bold leading-[1.1] tracking-tight text-foreground sm:text-4xl\\\",\\\"children\\\":\\\"NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x\\\"}],[\\\"$\\\",\\\"$8\\\",null,{\\\"fallback\\\":[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-hero-stats\\\":true,\\\"className\\\":\\\"mb-9 flex flex-wrap items-center gap-x-10 gap-y-2 font-mono text-sm leading-5 text-muted-foreground\\\",\\\"children\\\":[[\\\"$\\\",\\\"span\\\",\\\"0\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-message-circle\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"1sd12s\\\",{\\\"d\\\":\\\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\\\"}],\\\"$undefined\\\"]}],\\\"—\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"1\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-heart\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"mvr1a0\\\",{\\\"d\\\":\\\"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\\\"}],\\\"$undefined\\\"]}],\\\"—\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"2\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-repeat2 lucide-repeat-2\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"1ltn5i\\\",{\\\"d\\\":\\\"m2 9 3-3 3 3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"1r6tfw\\\",{\\\"d\\\":\\\"M13 18H7a2 2 0 0 1-2-2V6\\\"}],[\\\"$\\\",\\\"path\\\",\\\"4rnwn2\\\",{\\\"d\\\":\\\"m22 15-3 3-3-3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"2f72bc\\\",{\\\"d\\\":\\\"M11 6h6a2 2 0 0 1 2 2v10\\\"}],\\\"$undefined\\\"]}],\\\"0\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"3\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-bookmark\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"oz39mx\\\",{\\\"d\\\":\\\"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z\\\"}],\\\"$undefined\\\"]}],\\\"—\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"4\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[\\\"$L17\\\",\\\"—\\\"]}]]}],\\\"children\\\":\\\"$L18\\\"}],null,\\\"$L19\\\"]}],\\\"$L1a\\\",\\\"$L1b\\\"]}]}]}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"1c:I[63270,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"Avatar\\\"]\\n1d:I[63270,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"AvatarImage\\\"]\\n1e:I[63270,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"AvatarFallback\\\"]\\n17:[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-chart-column\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"c24i48\\\",{\\\"d\\\":\\\"M3 3v16a2 2 0 0 0 2 2h16\\\"}],[\\\"$\\\",\\\"path\\\",\\\"2bz60n\\\",{\\\"d\\\":\\\"M18 17V9\\\"}],[\\\"$\\\",\\\"path\\\",\\\"1frdt8\\\",{\\\"d\\\":\\\"M13 17V5\\\"}],[\\\"$\\\",\\\"path\\\",\\\"17ska0\\\",{\\\"d\\\":\\\"M8 17v-3\\\"}],\\\"$undefined\\\"]}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"19:[\\\"$\\\",\\\"fieldset\\\",null,{\\\"className\\\":\\\"rounded-md border border-border p-4 sm:p-6\\\",\\\"children\\\":[[\\\"$\\\",\\\"legend\\\",null,{\\\"className\\\":\\\"ml-3 bg-background px-2 font-mono text-xs font-semibold uppercase leading-none tracking-[0.1em] text-muted-foreground\\\",\\\"children\\\":\\\"Original post\\\"}],[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"space-y-3\\\",\\\"children\\\":[[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"flex min-w-0 items-center\\\",\\\"children\\\":[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"isolate inline-flex min-w-0 shrink-0 items-center\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L15\\\",null,{\\\"href\\\":\\\"/u/x/daniellefong\\\",\\\"prefetch\\\":false,\\\"className\\\":\\\"inline-flex h-7 max-w-[160px] shrink items-center gap-1 overflow-hidden rounded-full bg-muted pr-3 sm:max-w-[190px] relative z-10 group/chip transition-colors hover:bg-muted/80\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L1c\\\",null,{\\\"size\\\":\\\"sm\\\",\\\"className\\\":\\\"ring-2 ring-background\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L1d\\\",null,{\\\"src\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/13232322/avatar-b912e945f3e4691c.jpg\\\",\\\"alt\\\":\\\"Danielle Fong 🔆\\\"}],[\\\"$\\\",\\\"$L1e\\\",null,{\\\"children\\\":\\\"DF\\\"}]]}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"whitespace-nowrap font-mono text-xs font-medium leading-4 tabular-nums text-muted-foreground\\\",\\\"children\\\":[\\\"#\\\",632]}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"truncate whitespace-nowrap font-mono text-xs font-semibold leading-4 text-foreground group-hover/chip:text-foreground group-hover/chip:underline\\\",\\\"children\\\":[\\\"@\\\",\\\"DANIELLEFONG\\\"]}]]}],[\\\"$\\\",\\\"$L15\\\",null,{\\\"href\\\":\\\"/u/x/himanshustwts\\\",\\\"prefetch\\\":false,\\\"className\\\":\\\"inline-flex h-7 max-w-[180px] shrink-0 items-center gap-1.5 rounded-full border border-border/60 bg-background px-2 relative z-0 -ml-1.5 pl-4 transition-colors hover:bg-secondary/70 hover:no-underline\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":24,\\\"height\\\":24,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.7,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-repeat2 lucide-repeat-2 h-4 w-4 shrink-0 text-muted-foreground\\\",\\\"role\\\":\\\"img\\\",\\\"aria-label\\\":\\\"Reposted by\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"1ltn5i\\\",{\\\"d\\\":\\\"m2 9 3-3 3 3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"1r6tfw\\\",{\\\"d\\\":\\\"M13 18H7a2 2 0 0 1-2-2V6\\\"}],[\\\"$\\\",\\\"path\\\",\\\"4rnwn2\\\",{\\\"d\\\":\\\"m22 15-3 3-3-3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"2f72bc\\\",{\\\"d\\\":\\\"M11 6h6a2 2 0 0 1 2 2v10\\\"}],\\\"$undefined\\\"]}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"truncate font-mono text-[11px] font-bold text-foreground\\\",\\\"children\\\":[\\\"@\\\",\\\"HIMANSHUSTWTS\\\"]}]]}]]}]}],null,[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"group block\\\",\\\"children\\\":[[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"flex items-center gap-3\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L15\\\",null,{\\\"href\\\":\\\"/u/x/himanshustwts\\\",\\\"prefetch\\\":false,\\\"className\\\":\\\"flex min-w-0 flex-1 items-center gap-3 rounded-sm transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/50\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L1c\\\",null,{\\\"size\\\":\\\"sm\\\",\\\"className\\\":\\\"ring-3 ring-background\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L1d\\\",null,{\\\"src\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1515048998742425601/avatar-b4de93a0ba95e4b8.jpg\\\",\\\"alt\\\":\\\"himanshustwts\\\"}],[\\\"$\\\",\\\"$L1e\\\",null,{\\\"children\\\":\\\"HI\\\"}]]}],[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-1\\\",\\\"children\\\":[[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"min-w-0 truncate font-mono text-base font-semibold leading-6 text-foreground\\\",\\\"children\\\":\\\"himanshu\\\"}],null,[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"min-w-0 truncate font-mono text-xs font-medium leading-4 text-muted-foreground\\\",\\\"children\\\":[\\\"@\\\",\\\"HIMANSHUSTWTS\\\"]}]]}]]}],[\\\"$\\\",\\\"a\\\",null,{\\\"href\\\":\\\"https://x.com/himanshustwts/status/2053033764167794940\\\",\\\"target\\\":\\\"_blank\\\",\\\"rel\\\":\\\"noopener noreferrer\\\",\\\"aria-label\\\":\\\"View original post on X\\\",\\\"className\\\":\\\"shrink-0 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/50\\\",\\\"children\\\":[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":24,\\\"height\\\":24,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":2,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-chevron-right h-4 w-4\\\",\\\"aria-hidden\\\":true,\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"mthhwq\\\",{\\\"d\\\":\\\"m9 18 6-6-6-6\\\"}],\\\"$undefined\\\"]}]}]]}],\\\"$L1f\\\",\\\"$L20\\\"]}]]}]]}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"1a:[\\\"$\\\",\\\"aside\\\",null,{\\\"className\\\":\\\"col-span-12 flex flex-col gap-4 sm:col-span-5\\\",\\\"children\\\":[[\\\"$\\\",\\\"$8\\\",null,{\\\"fallback\\\":[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-sentiment-section\\\":true,\\\"children\\\":null}],\\\"children\\\":\\\"$L21\\\"}],[\\\"$\\\",\\\"$8\\\",null,{\\\"fallback\\\":[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-awards-section\\\":true,\\\"children\\\":null}],\\\"children\\\":\\\"$L22\\\"}]]}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"1b:[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"col-span-12\\\",\\\"children\\\":[[\\\"$\\\",\\\"$8\\\",null,{\\\"fallback\\\":[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-engagement-section\\\":true,\\\"children\\\":null}],\\\"children\\\":\\\"$L23\\\"}],[\\\"$\\\",\\\"section\\\",null,{\\\"className\\\":\\\"mt-10 pb-8 sm:pb-14\\\",\\\"children\\\":[[\\\"$\\\",\\\"h2\\\",null,{\\\"className\\\":\\\"mb-6 font-mono text-xs font-semibold leading-3 uppercase tracking-[0.1em] text-muted-foreground\\\",\\\"children\\\":[\\\"AI 1000 · \\\",1,\\\" \\\",\\\"action\\\"]}],[\\\"$\\\",\\\"ul\\\",null,{\\\"className\\\":\\\"flex flex-col\\\",\\\"children\\\":[[\\\"$\\\",\\\"li\\\",\\\"2053121428413956106\\\",{\\\"className\\\":\\\"group/row border-b border-border last:border-b-0\\\",\\\"children\\\":[[\\\"$\\\",\\\"div\\\",null,{\\\"tabIndex\\\":0,\\\"className\\\":\\\"flex flex-wrap items-center gap-3 py-3 transition-colors sm:flex-nowrap sm:gap-4 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/40\\\",\\\"children\\\":[[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"inline-flex h-7 w-16 shrink-0 items-center justify-center rounded-sm border border-border bg-background px-2.5 font-mono text-[10px] font-medium uppercase leading-[10px] tracking-[0.1em] text-muted-foreground\\\",\\\"children\\\":\\\"REPOST\\\"}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"isolate inline-flex min-w-0 shrink items-center\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L15\\\",null,{\\\"href\\\":\\\"/u/x/daniellefong\\\",\\\"prefetch\\\":false,\\\"className\\\":\\\"inline-flex h-7 max-w-[160px] shrink items-center gap-1 overflow-hidden rounded-full bg-muted pr-3 sm:max-w-[190px] relative z-10 group/chip transition-colors hover:bg-muted/80\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L1c\\\",null,{\\\"size\\\":\\\"sm\\\",\\\"className\\\":\\\"ring-2 ring-background\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L1d\\\",null,{\\\"src\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/13232322/avatar-b912e945f3e4691c.jpg\\\",\\\"alt\\\":\\\"Danielle Fong 🔆\\\"}],[\\\"$\\\",\\\"$L1e\\\",null,{\\\"children\\\":\\\"DF\\\"}]]}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"whitespace-nowrap font-mono text-xs font-medium leading-4 tabular-nums text-muted-foreground\\\",\\\"children\\\":[\\\"#\\\",632]}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"truncate whitespace-nowrap font-mono text-xs font-semibold leading-4 text-foreground group-hover/chip:text-foreground group-hover/chip:underline\\\",\\\"children\\\":[\\\"@\\\",\\\"DANIELLEFONG\\\"]}]]}],[\\\"$\\\",\\\"$L15\\\",null,{\\\"href\\\":\\\"/u/x/himanshustwts\\\",\\\"prefetch\\\":false,\\\"className\\\":\\\"inline-flex h-7 max-w-[150px] shrink items-center gap-1.5 rounded-full border border-border/60 bg-background px-2 sm:max-w-[180px] relative z-0 -ml-1.5 pl-4 transition-colors hover:bg-secondary/70 hover:no-underline\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":24,\\\"height\\\":24,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.7,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-repeat2 lucide-repeat-2 h-4 w-4 shrink-0 text-muted-foreground\\\",\\\"role\\\":\\\"img\\\",\\\"aria-label\\\":\\\"Reposted from\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"1ltn5i\\\",{\\\"d\\\":\\\"m2 9 3-3 3 3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"1r6tfw\\\",{\\\"d\\\":\\\"M13 18H7a2 2 0 0 1-2-2V6\\\"}],[\\\"$\\\",\\\"path\\\",\\\"4rnwn2\\\",{\\\"d\\\":\\\"m22 15-3 3-3-3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"2f72bc\\\",{\\\"d\\\":\\\"M11 6h6a2 2 0 0 1 2 2v10\\\"}],\\\"$undefined\\\"]}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"truncate font-mono text-[11px] font-bold text-foreground\\\",\\\"children\\\":[\\\"@\\\",\\\"HIMANSHUSTWTS\\\"]}]]}]]}],[\\\"$\\\",\\\"a\\\",null,{\\\"href\\\":\\\"https://x.com/himanshustwts/status/2053033764167794940\\\",\\\"target\\\":\\\"_blank\\\",\\\"rel\\\":\\\"noopener noreferrer\\\",\\\"className\\\":\\\"group/msg inline-flex min-w-0 flex-[1_1_100%] items-center gap-2 font-sans text-sm leading-5 text-foreground hover:text-foreground sm:flex-1\\\",\\\"children\\\":[[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"line-clamp-2 min-w-0 wrap-anywhere sm:truncate\\\",\\\"children\\\":\\\"the harness of claude code is very interesting.\\\\n\\\\na random unstable header at the start of the prompt was breaking KV-cache reuse on a 52k-token context.\\\\n\\\\nNVIDIA stripped it out and TTFT dropped by 5x. https://x.com/himanshustwts/status/2053033764167794940/photo/1 https://twitter.com/nvidiaai/status/2052835023217103080\\\"}],[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":24,\\\"height\\\":24,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":2,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-arrow-up-right h-[18px] w-[18px] shrink-0 text-muted-foreground/60 transition-opacity group-hover/msg:text-muted-foreground\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[\\\"$L24\\\",\\\"$L25\\\",\\\"$undefined\\\"]}]]}]]}],\\\"$L26\\\"]}]]}]]}]]}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"27:I[898254,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"KroMediaPreview\\\"]\\n28:I[834979,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"LocalPostMetaTime\\\"]\\n1f:[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"mt-4 grid gap-4 sm:items-start sm:grid-cols-[minmax(0,1fr)_96px]\\\",\\\"children\\\":[[\\\"$\\\",\\\"p\\\",null,{\\\"className\\\":\\\"wrap-anywhere whitespace-pre-wrap font-sans text-base leading-6 text-foreground\\\",\\\"children\\\":\\\"the harness of claude code is very interesting.\\\\n\\\\na random unstable header at the start of the prompt was breaking KV-cache reuse on a 52k-token context.\\\\n\\\\nNVIDIA stripped it out and TTFT dropped by 5x. https://twitter.com/nvidiaai/status/2052835023217103080\\\"}],[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"grid shrink-0 gap-1\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L27\\\",\\\"https://pbs.twimg.com/media/HH3XUrAaUAAXwXa.jpg\\\",{\\\"media\\\":{\\\"url\\\":\\\"https://pbs.twimg.com/media/HH3XUrAaUAAXwXa.jpg\\\",\\\"type\\\":\\\"photo\\\",\\\"width\\\":1206,\\\"height\\\":1859,\\\"mediaKey\\\":\\\"3_2053033755292618752\\\"},\\\"videoHref\\\":\\\"https://x.com/himanshustwts/status/2053033764167794940\\\",\\\"className\\\":\\\"size-24\\\"}]]}]]}]\\n20:[\\\"$\\\",\\\"a\\\",null,{\\\"href\\\":\\\"https://x.com/himanshustwts/status/2053033764167794940\\\",\\\"target\\\":\\\"_blank\\\",\\\"rel\\\":\\\"noopener noreferrer\\\",\\\"className\\\":\\\"mt-5 inline-flex font-mono text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/50\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L28\\\",null,{\\\"iso\\\":\\\"2026-05-09T08:46:07+00:00\\\",\\\"fallback\\\":\\\"1:46 AM · May 9, 2026\\\"}],[\\\"$\\\",\\\"span\\\",null,{\\\"className\\\":\\\"sr-only\\\",\\\"children\\\":\\\" View on X\\\"}]]}]\\n24:[\\\"$\\\",\\\"path\\\",\\\"1tivn9\\\",{\\\"d\\\":\\\"M7 7h10v10\\\"}]\\n25:[\\\"$\\\",\\\"path\\\",\\\"1vkiza\\\",{\\\"d\\\":\\\"M7 17 17 7\\\"}]\\n26:[\\\"$\\\",\\\"div\\\",null,{\\\"aria-hidden\\\":\\\"true\\\",\\\"className\\\":\\\"grid grid-rows-[0fr] transition-[grid-template-rows] duration-300 ease-out group-hover/row:grid-rows-[1fr] group-focus-within/row:grid-rows-[1fr]\\\",\\\"children\\\":[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"overflow-hidden\\\",\\\"children\\\":[\\\"$\\\",\\\"div\\\",null,{\\\"className\\\":\\\"px-3 pb-3 pt-1 sm:pl-[5rem] opacity-0 transition-opacity duration-200 delay-100 group-hover/row:opacity-100 group-focus-within/row:opacity-100\\\",\\\"children\\\":[\\\"$\\\",\\\"p\\\",null,{\\\"className\\\":\\\"wrap-anywhere border-l-2 border-border/80 pl-3 text-sm leading-relaxed text-foreground/90\\\",\\\"children\\\":\\\"the harness of claude code is very interesting.\\\\n\\\\na random unstable header at the start of the prompt was breaking KV-cache reuse on a 52k-token context.\\\\n\\\\nNVIDIA stripped it out and TTFT dropped by 5x. https://x.com/himanshustwts/status/2053033764167794940/photo/1 https://twitter.com/nvidiaai/status/2052835023217103080\\\"}]}]}]}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"22:[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-awards-section\\\":true,\\\"children\\\":null}]\\n\"])\u003c/script>\u003cdiv hidden id=\"S:3\">\u003cdiv data-cluster-awards-section=\"true\">\u003c/div>\u003c/div>\u003cscript>$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b\u003ca.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d||\"/&\"===d)if(0===h)break;else h--;else\"$\"!==d&&\"$?\"!==d&&\"$~\"!==d&&\"$!\"!==d&&\"&\"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data=\"$\";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data=\"$~\",$RB.push(a,b),2===$RB.length&&(\"number\"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3\u003ca?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};$RC(\"B:3\",\"S:3\")\u003c/script>\u003cscript>self.__next_f.push([1,\"29:I[331187,[\\\"/_next/static/chunks/0pwwa~klc58xq.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"IconMark\\\"]\\nd:null\\n12:[[\\\"$\\\",\\\"title\\\",\\\"0\\\",{\\\"children\\\":\\\"NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x · KRO · Digg\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"1\\\",{\\\"name\\\":\\\"description\\\",\\\"content\\\":\\\"2 posts from 2 authors.\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"2\\\",{\\\"name\\\":\\\"application-name\\\",\\\"content\\\":\\\"Digg\\\"}],[\\\"$\\\",\\\"link\\\",\\\"3\\\",{\\\"rel\\\":\\\"manifest\\\",\\\"href\\\":\\\"/manifest.webmanifest\\\",\\\"crossOrigin\\\":\\\"$undefined\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"4\\\",{\\\"name\\\":\\\"robots\\\",\\\"content\\\":\\\"index, follow\\\"}],[\\\"$\\\",\\\"link\\\",\\\"5\\\",{\\\"rel\\\":\\\"canonical\\\",\\\"href\\\":\\\"https://di.gg\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"6\\\",{\\\"name\\\":\\\"format-detection\\\",\\\"content\\\":\\\"telephone=no, address=no, email=no\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"7\\\",{\\\"property\\\":\\\"og:title\\\",\\\"content\\\":\\\"NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x · KRO\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"8\\\",{\\\"property\\\":\\\"og:description\\\",\\\"content\\\":\\\"2 posts from 2 authors.\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"9\\\",{\\\"property\\\":\\\"og:url\\\",\\\"content\\\":\\\"https://di.gg/ai/smsfvt1s\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"10\\\",{\\\"name\\\":\\\"twitter:card\\\",\\\"content\\\":\\\"summary_large_image\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"11\\\",{\\\"name\\\":\\\"twitter:title\\\",\\\"content\\\":\\\"NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x · KRO\\\"}],[\\\"$\\\",\\\"meta\\\",\\\"12\\\",{\\\"name\\\":\\\"twitter:description\\\",\\\"content\\\":\\\"2 posts from 2 authors.\\\"}],[\\\"$\\\",\\\"link\\\",\\\"13\\\",{\\\"rel\\\":\\\"icon\\\",\\\"href\\\":\\\"/icon.svg?icon.023sepevr6k9d.svg\\\",\\\"sizes\\\":\\\"any\\\",\\\"type\\\":\\\"image/svg+xml\\\"}],[\\\"$\\\",\\\"$L29\\\",\\\"14\\\",{}]]\\n\"])\u003c/script>\u003ctitle>NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x · KRO · Digg\u003c/title>\u003cmeta name=\"description\" content=\"2 posts from 2 authors.\"/>\u003cmeta name=\"application-name\" content=\"Digg\"/>\u003clink rel=\"manifest\" href=\"/manifest.webmanifest\"/>\u003cmeta name=\"robots\" content=\"index, follow\"/>\u003clink rel=\"canonical\" href=\"https://di.gg\"/>\u003cmeta name=\"format-detection\" content=\"telephone=no, address=no, email=no\"/>\u003cmeta property=\"og:title\" content=\"NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x · KRO\"/>\u003cmeta property=\"og:description\" content=\"2 posts from 2 authors.\"/>\u003cmeta property=\"og:url\" content=\"https://di.gg/ai/smsfvt1s\"/>\u003cmeta name=\"twitter:card\" content=\"summary_large_image\"/>\u003cmeta name=\"twitter:title\" content=\"NVIDIA Fixes Unstable Prompt Header, Slashes Claude Code TTFT by 5x · KRO\"/>\u003cmeta name=\"twitter:description\" content=\"2 posts from 2 authors.\"/>\u003clink rel=\"icon\" href=\"/icon.svg?icon.023sepevr6k9d.svg\" sizes=\"any\" type=\"image/svg+xml\"/>\u003cscript >document.querySelectorAll('body link[rel=\"icon\"], body link[rel=\"apple-touch-icon\"]').forEach(el => document.head.appendChild(el))\u003c/script>\u003cdiv hidden id=\"S:5\">\u003c/div>\u003cscript>$RC(\"B:5\",\"S:5\")\u003c/script>\u003cdiv hidden id=\"S:0\">\u003c/div>\u003cscript>$RC(\"B:0\",\"S:0\")\u003c/script>\u003cscript>self.__next_f.push([1,\"2a:I[544045,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"SentimentBarChart\\\"]\\n21:[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-sentiment-section\\\":true,\\\"children\\\":[\\\"$\\\",\\\"$L2a\\\",null,{\\\"sentiment\\\":{\\\"clusterId\\\":\\\"989f7cd2-ef43-4079-afd0-33ae6f2dff84\\\",\\\"analysisVersion\\\":\\\"cluster-sentiment-v2:2026-05-09T17:52:00.121Z\\\",\\\"status\\\":\\\"ok\\\",\\\"guardedPercentages\\\":{\\\"negative\\\":60,\\\"positive\\\":40},\\\"sentimentPercentages\\\":{\\\"negative\\\":60,\\\"positive\\\":40},\\\"userWeightedPercentages\\\":{\\\"negative\\\":60,\\\"positive\\\":40},\\\"storyWeightedPercentages\\\":{\\\"negative\\\":60,\\\"positive\\\":40},\\\"commentCount\\\":10,\\\"commentsAnalyzedCount\\\":5,\\\"distinctCommentAuthorCount\\\":10,\\\"sourcePostCount\\\":1,\\\"confidence\\\":9.1,\\\"summary\\\":\\\"Positive users highlight the clever discovery that minor prompt elements like timestamps broke KV caching in Claude, while negative users decry the staggering global compute waste and production disruptions from such basic oversights.\\\",\\\"summaryIsStale\\\":false,\\\"caveats\\\":[],\\\"generatedAt\\\":\\\"2026-05-09T17:52:05.504+00:00\\\"}}]}]\\n\"])\u003c/script>\u003cdiv hidden id=\"S:2\">\u003cdiv data-cluster-sentiment-section=\"true\">\u003csection class=\"flex w-full flex-col gap-5 rounded-md p-6\">\u003cdiv class=\"flex items-center justify-between\">\u003ch2 class=\"font-mono text-xs font-medium leading-3 uppercase tracking-[0.1em] text-muted-foreground\">Sentiment\u003c/h2>\u003c/div>\u003cdiv class=\"flex flex-col gap-4\">\u003cdiv class=\"flex flex-col gap-1\">\u003cdiv class=\"flex items-center justify-between gap-3\">\u003cbutton type=\"button\" aria-label=\"Show positive comments (40%)\" style=\"width:40%;max-width:100%;background-color:var(--success)\" class=\"flex h-10 min-w-0 items-center rounded-sm px-3 outline-none transition-opacity focus-visible:ring-1 focus-visible:ring-blue-600 disabled:cursor-default disabled:opacity-50\">\u003cspan class=\"truncate font-mono text-sm font-semibold leading-[14px] uppercase tracking-[0.1em] text-background\">Positive\u003c/span>\u003c/button>\u003cspan class=\"shrink-0 px-2 font-mono text-sm font-medium leading-[14px] tabular-nums uppercase tracking-[0.1em] text-foreground\">40\u003c!-- -->%\u003c/span>\u003c/div>\u003cdiv class=\"flex items-center justify-between gap-3\">\u003cbutton type=\"button\" aria-label=\"Show negative comments (60%)\" style=\"width:60%;max-width:100%;background-color:var(--primary)\" class=\"flex h-10 min-w-0 items-center rounded-sm px-3 outline-none transition-opacity focus-visible:ring-1 focus-visible:ring-blue-600 disabled:cursor-default disabled:opacity-50\">\u003cspan class=\"truncate font-mono text-sm font-semibold leading-[14px] uppercase tracking-[0.1em] text-background\">Negative\u003c/span>\u003c/button>\u003cspan class=\"shrink-0 px-2 font-mono text-sm font-medium leading-[14px] tabular-nums uppercase tracking-[0.1em] text-foreground\">60\u003c!-- -->%\u003c/span>\u003c/div>\u003c/div>\u003cp class=\"border-l border-border px-3 py-1 text-pretty font-sans text-sm leading-5 text-foreground\">Positive users highlight the clever discovery that minor prompt elements like timestamps broke KV caching in Claude, while negative users decry the staggering global compute waste and production disruptions from such basic oversights.\u003c/p>\u003cp class=\"font-mono text-xs font-medium leading-3 uppercase tracking-[0.1em] text-muted-foreground\">5\u003c!-- --> / \u003c!-- -->10\u003c!-- --> replies with clear sentiment\u003c/p>\u003c/div>\u003c/section>\u003c/div>\u003c/div>\u003cscript>$RC(\"B:2\",\"S:2\")\u003c/script>\u003cscript>self.__next_f.push([1,\"2b:I[722865,[\\\"/_next/static/chunks/0gdxf-hu~~73r.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0h8a6lawp39~t.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0bur-juelv0qk.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/00s0yybcz-sxj.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/136so6qdtqzub.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0ono48mmtoiz7.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\",\\\"/_next/static/chunks/0v_eeihkcyf92.js?dpl=dpl_9qdV1XnsszJjkmEDmzRAFrj5T8wr\\\"],\\\"ClusterEngagementPanel\\\"]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"18:[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-hero-stats\\\":true,\\\"className\\\":\\\"mb-9 flex flex-wrap items-center gap-x-10 gap-y-2 font-mono text-sm leading-5 text-muted-foreground\\\",\\\"children\\\":[[\\\"$\\\",\\\"span\\\",\\\"0\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-message-circle\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"1sd12s\\\",{\\\"d\\\":\\\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\\\"}],\\\"$undefined\\\"]}],\\\"10\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"1\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-heart\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"mvr1a0\\\",{\\\"d\\\":\\\"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\\\"}],\\\"$undefined\\\"]}],\\\"238\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"2\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-repeat2 lucide-repeat-2\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"1ltn5i\\\",{\\\"d\\\":\\\"m2 9 3-3 3 3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"1r6tfw\\\",{\\\"d\\\":\\\"M13 18H7a2 2 0 0 1-2-2V6\\\"}],[\\\"$\\\",\\\"path\\\",\\\"4rnwn2\\\",{\\\"d\\\":\\\"m22 15-3 3-3-3\\\"}],[\\\"$\\\",\\\"path\\\",\\\"2f72bc\\\",{\\\"d\\\":\\\"M11 6h6a2 2 0 0 1 2 2v10\\\"}],\\\"$undefined\\\"]}],\\\"29\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"3\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-bookmark\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"oz39mx\\\",{\\\"d\\\":\\\"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z\\\"}],\\\"$undefined\\\"]}],\\\"143\\\"]}],[\\\"$\\\",\\\"span\\\",\\\"4\\\",{\\\"className\\\":\\\"inline-flex min-w-16 items-center gap-2\\\",\\\"children\\\":[[\\\"$\\\",\\\"svg\\\",null,{\\\"ref\\\":\\\"$undefined\\\",\\\"xmlns\\\":\\\"http://www.w3.org/2000/svg\\\",\\\"width\\\":18,\\\"height\\\":18,\\\"viewBox\\\":\\\"0 0 24 24\\\",\\\"fill\\\":\\\"none\\\",\\\"stroke\\\":\\\"currentColor\\\",\\\"strokeWidth\\\":1.5,\\\"strokeLinecap\\\":\\\"round\\\",\\\"strokeLinejoin\\\":\\\"round\\\",\\\"className\\\":\\\"lucide lucide-chart-column\\\",\\\"aria-hidden\\\":\\\"true\\\",\\\"children\\\":[[\\\"$\\\",\\\"path\\\",\\\"c24i48\\\",{\\\"d\\\":\\\"M3 3v16a2 2 0 0 0 2 2h16\\\"}],[\\\"$\\\",\\\"path\\\",\\\"2bz60n\\\",{\\\"d\\\":\\\"M18 17V9\\\"}],[\\\"$\\\",\\\"path\\\",\\\"1frdt8\\\",{\\\"d\\\":\\\"M13 17V5\\\"}],[\\\"$\\\",\\\"path\\\",\\\"17ska0\\\",{\\\"d\\\":\\\"M8 17v-3\\\"}],\\\"$undefined\\\"]}],\\\"30.3K\\\"]}]]}]\\n\"])\u003c/script>\u003cscript>self.__next_f.push([1,\"23:[\\\"$\\\",\\\"div\\\",null,{\\\"data-cluster-engagement-section\\\":true,\\\"children\\\":[\\\"$\\\",\\\"$L2b\\\",null,{\\\"series\\\":{\\\"source\\\":\\\"signal_snapshots\\\",\\\"metricSeries\\\":{\\\"views\\\":[0,0.6606666666666666,0.43733333333333335,0.6206666666666667,1,0.758,0.6933333333333334,0.812,0.8246666666666667,0.49866666666666665,0.5593333333333333,0.888,0.6666666666666666,0.626,0.6266666666666667,0.6153333333333333,0.6133333333333333,0.568,0.5773333333333334,0.534,0.37933333333333336,0,0.45866666666666667],\\\"comments\\\":[0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0],\\\"reposts\\\":[0,1,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0],\\\"bookmarks\\\":[0,0.5454545454545454,0.2727272727272727,0.09090909090909091,1,0.45454545454545453,0.36363636363636365,0.5454545454545454,0.18181818181818182,0.18181818181818182,0.45454545454545453,0.2727272727272727,0.6363636363636364,0.18181818181818182,0.5454545454545454,0.8181818181818182,0.2727272727272727,0.5454545454545454,0.45454545454545453,0.09090909090909091,0.18181818181818182,0,0.09090909090909091]},\\\"snapshots\\\":[{\\\"bucket_start\\\":\\\"2026-05-09T18:30:00+00:00\\\",\\\"impression_count\\\":30328,\\\"like_count\\\":238,\\\"retweet_count\\\":29,\\\"reply_count\\\":10,\\\"bookmark_count\\\":143,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T18:20:00+00:00\\\",\\\"impression_count\\\":29640,\\\"like_count\\\":232,\\\"retweet_count\\\":29,\\\"reply_count\\\":10,\\\"bookmark_count\\\":142,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T18:10:00+00:00\\\",\\\"impression_count\\\":29640,\\\"like_count\\\":232,\\\"retweet_count\\\":29,\\\"reply_count\\\":10,\\\"bookmark_count\\\":142,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T18:00:00+00:00\\\",\\\"impression_count\\\":29071,\\\"like_count\\\":228,\\\"retweet_count\\\":29,\\\"reply_count\\\":10,\\\"bookmark_count\\\":140,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T17:50:00+00:00\\\",\\\"impression_count\\\":28270,\\\"like_count\\\":225,\\\"retweet_count\\\":29,\\\"reply_count\\\":9,\\\"bookmark_count\\\":139,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T17:40:00+00:00\\\",\\\"impression_count\\\":27404,\\\"like_count\\\":220,\\\"retweet_count\\\":29,\\\"reply_count\\\":9,\\\"bookmark_count\\\":134,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T17:30:00+00:00\\\",\\\"impression_count\\\":26552,\\\"like_count\\\":216,\\\"retweet_count\\\":29,\\\"reply_count\\\":9,\\\"bookmark_count\\\":128,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T17:20:00+00:00\\\",\\\"impression_count\\\":25632,\\\"like_count\\\":211,\\\"retweet_count\\\":29,\\\"reply_count\\\":9,\\\"bookmark_count\\\":125,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T17:10:00+00:00\\\",\\\"impression_count\\\":24709,\\\"like_count\\\":205,\\\"retweet_count\\\":29,\\\"reply_count\\\":8,\\\"bookmark_count\\\":116,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T17:00:00+00:00\\\",\\\"impression_count\\\":23769,\\\"like_count\\\":197,\\\"retweet_count\\\":29,\\\"reply_count\\\":8,\\\"bookmark_count\\\":110,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T16:50:00+00:00\\\",\\\"impression_count\\\":22830,\\\"like_count\\\":191,\\\"retweet_count\\\":29,\\\"reply_count\\\":8,\\\"bookmark_count\\\":108,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T16:40:00+00:00\\\",\\\"impression_count\\\":21830,\\\"like_count\\\":184,\\\"retweet_count\\\":29,\\\"reply_count\\\":8,\\\"bookmark_count\\\":101,\\\"quote_count\\\":4},{\\\"bucket_start\\\":\\\"2026-05-09T16:30:00+00:00\\\",\\\"impression_count\\\":21142,\\\"like_count\\\":180,\\\"retweet_count\\\":29,\\\"reply_count\\\":8,\\\"bookmark_count\\\":100,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T16:20:00+00:00\\\",\\\"impression_count\\\":20498,\\\"like_count\\\":177,\\\"retweet_count\\\":28,\\\"reply_count\\\":8,\\\"bookmark_count\\\":98,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T16:10:00+00:00\\\",\\\"impression_count\\\":19659,\\\"like_count\\\":166,\\\"retweet_count\\\":27,\\\"reply_count\\\":8,\\\"bookmark_count\\\":93,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T16:00:00+00:00\\\",\\\"impression_count\\\":18911,\\\"like_count\\\":164,\\\"retweet_count\\\":26,\\\"reply_count\\\":8,\\\"bookmark_count\\\":91,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T15:50:00+00:00\\\",\\\"impression_count\\\":17674,\\\"like_count\\\":158,\\\"retweet_count\\\":26,\\\"reply_count\\\":7,\\\"bookmark_count\\\":89,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T15:40:00+00:00\\\",\\\"impression_count\\\":16456,\\\"like_count\\\":153,\\\"retweet_count\\\":26,\\\"reply_count\\\":7,\\\"bookmark_count\\\":83,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T15:30:00+00:00\\\",\\\"impression_count\\\":15416,\\\"like_count\\\":146,\\\"retweet_count\\\":25,\\\"reply_count\\\":7,\\\"bookmark_count\\\":79,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T15:20:00+00:00\\\",\\\"impression_count\\\":14279,\\\"like_count\\\":137,\\\"retweet_count\\\":24,\\\"reply_count\\\":7,\\\"bookmark_count\\\":74,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T15:10:00+00:00\\\",\\\"impression_count\\\":12779,\\\"like_count\\\":122,\\\"retweet_count\\\":23,\\\"reply_count\\\":7,\\\"bookmark_count\\\":63,\\\"quote_count\\\":3},{\\\"bucket_start\\\":\\\"2026-05-09T15:00:00+00:00\\\",\\\"impression_count\\\":11848,\\\"like_count\\\":116,\\\"retweet_count\\\":22,\\\"reply_count\\\":6,\\\"bookmark_count\\\":62,\\\"quote_count\\\":2},{\\\"bucket_start\\\":\\\"2026-05-09T14:50:00+00:00\\\",\\\"impression_count\\\":11192,\\\"like_count\\\":110,\\\"retweet_count\\\":21,\\\"reply_count\\\":5,\\\"bookmark_count\\\":59,\\\"quote_count\\\":2},{\\\"bucket_start\\\":\\\"2026-05-09T14:40:00+00:00\\\",\\\"impression_count\\\":10201,\\\"like_count\\\":107,\\\"retweet_count\\\":20,\\\"reply_count\\\":5,\\\"bookmark_count\\\":53,\\\"quote_count\\\":2},{\\\"bucket_start\\\":\\\"2026-05-09T14:30:00+00:00\\\",\\\"impression_count\\\":10201,\\\"like_count\\\":107,\\\"retweet_count\\\":20,\\\"reply_count\\\":5,\\\"bookmark_count\\\":53,\\\"quote_count\\\":2}],\\\"totals\\\":{\\\"total_likes\\\":238,\\\"total_bookmarks\\\":143,\\\"total_impressions\\\":30328,\\\"total_replies\\\":10,\\\"total_retweets\\\":29,\\\"total_quotes\\\":4},\\\"snapshotCount\\\":25,\\\"diagnostics\\\":{}},\\\"posts\\\":[{\\\"post_x_id\\\":\\\"2053121428413956106\\\",\\\"posted_at\\\":\\\"2026-05-09T14:34:28+00:00\\\",\\\"post_type\\\":\\\"retweet\\\",\\\"author_username\\\":\\\"DanielleFong\\\",\\\"author_display_name\\\":\\\"Danielle Fong 🔆\\\",\\\"author_category\\\":\\\"Creator\\\",\\\"author_profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/13232322/avatar-b912e945f3e4691c.jpg\\\",\\\"author_rank\\\":632}]}]}]\\n\"])\u003c/script>\u003cdiv hidden id=\"S:1\">\u003cdiv data-cluster-hero-stats=\"true\" class=\"mb-9 flex flex-wrap items-center gap-x-10 gap-y-2 font-mono text-sm leading-5 text-muted-foreground\">\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-message-circle\" aria-hidden=\"true\">\u003cpath d=\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\">\u003c/path>\u003c/svg>10\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-heart\" aria-hidden=\"true\">\u003cpath d=\"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\">\u003c/path>\u003c/svg>238\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-repeat2 lucide-repeat-2\" aria-hidden=\"true\">\u003cpath d=\"m2 9 3-3 3 3\">\u003c/path>\u003cpath d=\"M13 18H7a2 2 0 0 1-2-2V6\">\u003c/path>\u003cpath d=\"m22 15-3 3-3-3\">\u003c/path>\u003cpath d=\"M11 6h6a2 2 0 0 1 2 2v10\">\u003c/path>\u003c/svg>29\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-bookmark\" aria-hidden=\"true\">\u003cpath d=\"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z\">\u003c/path>\u003c/svg>143\u003c/span>\u003cspan class=\"inline-flex min-w-16 items-center gap-2\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-chart-column\" aria-hidden=\"true\">\u003cpath d=\"M3 3v16a2 2 0 0 0 2 2h16\">\u003c/path>\u003cpath d=\"M18 17V9\">\u003c/path>\u003cpath d=\"M13 17V5\">\u003c/path>\u003cpath d=\"M8 17v-3\">\u003c/path>\u003c/svg>30.3K\u003c/span>\u003c/div>\u003c/div>\u003cscript>$RC(\"B:1\",\"S:1\")\u003c/script>\u003cdiv hidden id=\"S:4\">\u003cdiv data-cluster-engagement-section=\"true\">\u003csection class=\"border-t border-border pt-8\">\u003cdiv class=\"mb-5 flex flex-wrap items-baseline justify-between gap-3\">\u003ch2 class=\"font-mono text-xs font-bold uppercase tracking-[0.18em] text-foreground\">Cluster engagement\u003c/h2>\u003cspan class=\"font-mono text-[10px] uppercase text-muted-foreground\">25\u003c!-- --> snapshots\u003c/span>\u003c/div>\u003cdiv class=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4\">\u003cbutton type=\"button\" aria-label=\"Open views engagement details\" class=\"group relative block min-w-0 cursor-pointer rounded border border-border px-3 pb-3 pt-4 text-left transition-colors hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent\">\u003cspan class=\"absolute -top-2 left-6 bg-background px-1.5 font-mono text-[10px] uppercase text-accent\">Views\u003c/span>\u003cspan data-testid=\"metric-card-expand-icon-views\" class=\"absolute right-2.5 top-2.5 inline-flex size-5 items-center justify-center rounded-[3px] text-muted-foreground transition-colors group-hover:bg-muted group-hover:text-foreground\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-up-right size-3.5\" aria-hidden=\"true\">\u003cpath d=\"M7 7h10v10\">\u003c/path>\u003cpath d=\"M7 17 17 7\">\u003c/path>\u003c/svg>\u003c/span>\u003cspan class=\"mb-1 flex items-center justify-between gap-3 pr-6\">\u003cspan class=\"font-mono text-lg font-bold tabular-nums text-foreground\">30.3K\u003c/span>\u003cspan class=\"font-mono text-[9px] uppercase text-muted-foreground\">24h\u003c/span>\u003c/span>\u003csvg aria-hidden=\"true\" width=\"100%\" height=\"62\" viewBox=\"0 0 220 62\" preserveAspectRatio=\"none\" class=\"block\">\u003cdefs>\u003clinearGradient id=\"cluster-metric-grad-views\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\u003cstop offset=\"0%\" stop-color=\"var(--accent)\" stop-opacity=\"0.24\">\u003c/stop>\u003cstop offset=\"100%\" stop-color=\"var(--accent)\" stop-opacity=\"0\">\u003c/stop>\u003c/linearGradient>\u003c/defs>\u003cpath fill=\"url(#cluster-metric-grad-views)\" d=\"M 0,62 L 0,58 H 10 V 22.324000000000005 H 20 V 34.384 H 30 V 24.483999999999995 H 40 V 4 H 50 V 17.067999999999998 H 60 V 20.560000000000002 H 70 V 14.151999999999994 H 80 V 13.468000000000004 H 90 V 31.072000000000003 H 100 V 27.796 H 110 V 10.048000000000002 H 120 V 22 H 130 V 24.195999999999998 H 140 V 24.159999999999997 H 150 V 24.772000000000006 H 160 V 24.880000000000003 H 170 V 27.328000000000003 H 180 V 26.823999999999998 H 190 V 29.163999999999998 H 200 V 37.516 H 210 V 58 H 220 V 33.232 H 220 V 62 Z\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 0,58 H 10\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,58 V 22.324000000000005\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,22.324000000000005 H 20\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 20,22.324000000000005 V 34.384\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 20,34.384 H 30\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 30,34.384 V 24.483999999999995\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 30,24.483999999999995 H 40\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 40,24.483999999999995 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 40,4 H 50\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 50,4 V 17.067999999999998\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 50,17.067999999999998 H 60\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 60,17.067999999999998 V 20.560000000000002\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 60,20.560000000000002 H 70\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 70,20.560000000000002 V 14.151999999999994\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 70,14.151999999999994 H 80\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 80,14.151999999999994 V 13.468000000000004\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 80,13.468000000000004 H 90\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 90,13.468000000000004 V 31.072000000000003\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 90,31.072000000000003 H 100\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,31.072000000000003 V 27.796\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,27.796 H 110\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 110,27.796 V 10.048000000000002\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 110,10.048000000000002 H 120\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 120,10.048000000000002 V 22\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 120,22 H 130\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 130,22 V 24.195999999999998\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 130,24.195999999999998 H 140\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,24.195999999999998 V 24.159999999999997\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,24.159999999999997 H 150\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 150,24.159999999999997 V 24.772000000000006\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 150,24.772000000000006 H 160\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 160,24.772000000000006 V 24.880000000000003\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 160,24.880000000000003 H 170\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 170,24.880000000000003 V 27.328000000000003\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 170,27.328000000000003 H 180\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 180,27.328000000000003 V 26.823999999999998\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 180,26.823999999999998 H 190\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 190,26.823999999999998 V 29.163999999999998\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 190,29.163999999999998 H 200\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 200,29.163999999999998 V 37.516\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 200,37.516 H 210\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 210,37.516 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 210,58 H 220\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 220,58 V 33.232\">\u003c/path>\u003c/svg>\u003c/button>\u003cbutton type=\"button\" aria-label=\"Open comments engagement details\" class=\"group relative block min-w-0 cursor-pointer rounded border border-border px-3 pb-3 pt-4 text-left transition-colors hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent\">\u003cspan class=\"absolute -top-2 left-6 bg-background px-1.5 font-mono text-[10px] uppercase text-blue-600\">Comments\u003c/span>\u003cspan data-testid=\"metric-card-expand-icon-comments\" class=\"absolute right-2.5 top-2.5 inline-flex size-5 items-center justify-center rounded-[3px] text-muted-foreground transition-colors group-hover:bg-muted group-hover:text-foreground\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-up-right size-3.5\" aria-hidden=\"true\">\u003cpath d=\"M7 7h10v10\">\u003c/path>\u003cpath d=\"M7 17 17 7\">\u003c/path>\u003c/svg>\u003c/span>\u003cspan class=\"mb-1 flex items-center justify-between gap-3 pr-6\">\u003cspan class=\"font-mono text-lg font-bold tabular-nums text-foreground\">10\u003c/span>\u003cspan class=\"font-mono text-[9px] uppercase text-muted-foreground\">24h\u003c/span>\u003c/span>\u003csvg aria-hidden=\"true\" width=\"100%\" height=\"62\" viewBox=\"0 0 220 62\" preserveAspectRatio=\"none\" class=\"block\">\u003cdefs>\u003clinearGradient id=\"cluster-metric-grad-comments\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\u003cstop offset=\"0%\" stop-color=\"var(--blue-600)\" stop-opacity=\"0.24\">\u003c/stop>\u003cstop offset=\"100%\" stop-color=\"var(--blue-600)\" stop-opacity=\"0\">\u003c/stop>\u003c/linearGradient>\u003c/defs>\u003cpath fill=\"url(#cluster-metric-grad-comments)\" d=\"M 0,62 L 0,58 H 10 V 58 H 20 V 4 H 30 V 4 H 40 V 58 H 50 V 58 H 60 V 58 H 70 V 58 H 80 V 4 H 90 V 58 H 100 V 58 H 110 V 58 H 120 V 58 H 130 V 58 H 140 V 58 H 150 V 4 H 160 V 58 H 170 V 58 H 180 V 58 H 190 V 4 H 200 V 58 H 210 V 58 H 220 V 58 H 220 V 62 Z\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 0,58 H 10\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,58 H 20\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 20,58 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 20,4 H 30\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 30,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 30,4 H 40\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 40,4 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 40,58 H 50\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 50,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 50,58 H 60\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 60,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 60,58 H 70\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 70,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 70,58 H 80\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 80,58 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 80,4 H 90\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 90,4 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 90,58 H 100\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,58 H 110\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 110,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 110,58 H 120\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 120,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 120,58 H 130\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 130,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 130,58 H 140\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,58 H 150\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 150,58 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 150,4 H 160\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 160,4 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 160,58 H 170\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 170,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 170,58 H 180\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 180,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 180,58 H 190\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 190,58 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 190,4 H 200\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 200,4 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 200,58 H 210\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 210,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 210,58 H 220\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 220,58 V 58\">\u003c/path>\u003c/svg>\u003c/button>\u003cbutton type=\"button\" aria-label=\"Open reposts engagement details\" class=\"group relative block min-w-0 cursor-pointer rounded border border-border px-3 pb-3 pt-4 text-left transition-colors hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent\">\u003cspan class=\"absolute -top-2 left-6 bg-background px-1.5 font-mono text-[10px] uppercase text-success\">Reposts\u003c/span>\u003cspan data-testid=\"metric-card-expand-icon-reposts\" class=\"absolute right-2.5 top-2.5 inline-flex size-5 items-center justify-center rounded-[3px] text-muted-foreground transition-colors group-hover:bg-muted group-hover:text-foreground\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-up-right size-3.5\" aria-hidden=\"true\">\u003cpath d=\"M7 7h10v10\">\u003c/path>\u003cpath d=\"M7 17 17 7\">\u003c/path>\u003c/svg>\u003c/span>\u003cspan class=\"mb-1 flex items-center justify-between gap-3 pr-6\">\u003cspan class=\"font-mono text-lg font-bold tabular-nums text-foreground\">29\u003c/span>\u003cspan class=\"font-mono text-[9px] uppercase text-muted-foreground\">24h\u003c/span>\u003c/span>\u003csvg aria-hidden=\"true\" width=\"100%\" height=\"62\" viewBox=\"0 0 220 62\" preserveAspectRatio=\"none\" class=\"block\">\u003cdefs>\u003clinearGradient id=\"cluster-metric-grad-reposts\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\u003cstop offset=\"0%\" stop-color=\"var(--success)\" stop-opacity=\"0.24\">\u003c/stop>\u003cstop offset=\"100%\" stop-color=\"var(--success)\" stop-opacity=\"0\">\u003c/stop>\u003c/linearGradient>\u003c/defs>\u003cpath fill=\"url(#cluster-metric-grad-reposts)\" d=\"M 0,62 L 0,58 H 10 V 4 H 20 V 4 H 30 V 4 H 40 V 4 H 50 V 4 H 60 V 4 H 70 V 58 H 80 V 58 H 90 V 4 H 100 V 4 H 110 V 4 H 120 V 58 H 130 V 58 H 140 V 58 H 150 V 58 H 160 V 58 H 170 V 58 H 180 V 58 H 190 V 58 H 200 V 58 H 210 V 58 H 220 V 58 H 220 V 62 Z\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 0,58 H 10\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,58 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,4 H 20\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 20,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 20,4 H 30\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 30,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 30,4 H 40\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 40,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 40,4 H 50\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 50,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 50,4 H 60\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 60,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 60,4 H 70\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 70,4 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 70,58 H 80\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 80,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 80,58 H 90\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 90,58 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 90,4 H 100\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,4 H 110\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 110,4 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 110,4 H 120\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 120,4 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 120,58 H 130\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 130,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 130,58 H 140\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,58 H 150\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 150,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 150,58 H 160\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 160,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 160,58 H 170\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 170,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 170,58 H 180\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 180,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 180,58 H 190\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 190,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 190,58 H 200\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 200,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 200,58 H 210\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 210,58 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 210,58 H 220\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 220,58 V 58\">\u003c/path>\u003c/svg>\u003c/button>\u003cbutton type=\"button\" aria-label=\"Open bookmarks engagement details\" class=\"group relative block min-w-0 cursor-pointer rounded border border-border px-3 pb-3 pt-4 text-left transition-colors hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent\">\u003cspan class=\"absolute -top-2 left-6 bg-background px-1.5 font-mono text-[10px] uppercase text-yellow-300\">Bookmarks\u003c/span>\u003cspan data-testid=\"metric-card-expand-icon-bookmarks\" class=\"absolute right-2.5 top-2.5 inline-flex size-5 items-center justify-center rounded-[3px] text-muted-foreground transition-colors group-hover:bg-muted group-hover:text-foreground\">\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-up-right size-3.5\" aria-hidden=\"true\">\u003cpath d=\"M7 7h10v10\">\u003c/path>\u003cpath d=\"M7 17 17 7\">\u003c/path>\u003c/svg>\u003c/span>\u003cspan class=\"mb-1 flex items-center justify-between gap-3 pr-6\">\u003cspan class=\"font-mono text-lg font-bold tabular-nums text-foreground\">143\u003c/span>\u003cspan class=\"font-mono text-[9px] uppercase text-muted-foreground\">24h\u003c/span>\u003c/span>\u003csvg aria-hidden=\"true\" width=\"100%\" height=\"62\" viewBox=\"0 0 220 62\" preserveAspectRatio=\"none\" class=\"block\">\u003cdefs>\u003clinearGradient id=\"cluster-metric-grad-bookmarks\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\u003cstop offset=\"0%\" stop-color=\"var(--yellow-300)\" stop-opacity=\"0.24\">\u003c/stop>\u003cstop offset=\"100%\" stop-color=\"var(--yellow-300)\" stop-opacity=\"0\">\u003c/stop>\u003c/linearGradient>\u003c/defs>\u003cpath fill=\"url(#cluster-metric-grad-bookmarks)\" d=\"M 0,62 L 0,58 H 10 V 28.545454545454547 H 20 V 43.27272727272727 H 30 V 53.09090909090909 H 40 V 4 H 50 V 33.45454545454545 H 60 V 38.36363636363636 H 70 V 28.545454545454547 H 80 V 48.18181818181818 H 90 V 48.18181818181818 H 100 V 33.45454545454545 H 110 V 43.27272727272727 H 120 V 23.63636363636364 H 130 V 48.18181818181818 H 140 V 28.545454545454547 H 150 V 13.818181818181813 H 160 V 43.27272727272727 H 170 V 28.545454545454547 H 180 V 33.45454545454545 H 190 V 53.09090909090909 H 200 V 48.18181818181818 H 210 V 58 H 220 V 53.09090909090909 H 220 V 62 Z\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 0,58 H 10\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,58 V 28.545454545454547\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 10,28.545454545454547 H 20\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 20,28.545454545454547 V 43.27272727272727\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 20,43.27272727272727 H 30\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 30,43.27272727272727 V 53.09090909090909\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 30,53.09090909090909 H 40\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 40,53.09090909090909 V 4\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 40,4 H 50\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 50,4 V 33.45454545454545\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 50,33.45454545454545 H 60\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 60,33.45454545454545 V 38.36363636363636\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 60,38.36363636363636 H 70\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 70,38.36363636363636 V 28.545454545454547\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 70,28.545454545454547 H 80\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 80,28.545454545454547 V 48.18181818181818\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 80,48.18181818181818 H 90\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 90,48.18181818181818 V 48.18181818181818\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 90,48.18181818181818 H 100\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,48.18181818181818 V 33.45454545454545\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 100,33.45454545454545 H 110\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 110,33.45454545454545 V 43.27272727272727\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 110,43.27272727272727 H 120\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 120,43.27272727272727 V 23.63636363636364\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 120,23.63636363636364 H 130\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 130,23.63636363636364 V 48.18181818181818\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 130,48.18181818181818 H 140\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,48.18181818181818 V 28.545454545454547\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 140,28.545454545454547 H 150\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 150,28.545454545454547 V 13.818181818181813\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 150,13.818181818181813 H 160\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 160,13.818181818181813 V 43.27272727272727\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 160,43.27272727272727 H 170\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 170,43.27272727272727 V 28.545454545454547\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 170,28.545454545454547 H 180\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 180,28.545454545454547 V 33.45454545454545\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 180,33.45454545454545 H 190\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 190,33.45454545454545 V 53.09090909090909\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 190,53.09090909090909 H 200\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 200,53.09090909090909 V 48.18181818181818\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 200,48.18181818181818 H 210\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 210,48.18181818181818 V 58\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--red-600)\" stroke-width=\"1.5\" d=\"M 210,58 H 220\">\u003c/path>\u003cpath fill=\"none\" stroke=\"var(--success)\" stroke-width=\"1.5\" d=\"M 220,58 V 53.09090909090909\">\u003c/path>\u003c/svg>\u003c/button>\u003c/div>\u003cdiv class=\"mt-3 flex justify-end\">\u003cbutton type=\"button\" aria-controls=\"_R_olubsnqdb_\" aria-expanded=\"false\" class=\"rounded-[3px] border border-border px-3 py-1.5 font-mono text-[10px] uppercase text-muted-foreground transition-colors hover:border-foreground/25 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent\">Expand Data\u003c/button>\u003c/div>\u003cdiv id=\"_R_olubsnqdb_\" class=\"mt-6\" hidden=\"\">\u003c/div>\u003c/section>\u003c/div>\u003c/div>\u003cscript>$RC(\"B:4\",\"S:4\")\u003c/script>\u003c/body>\u003c/html>","content_type":"text/html; charset=utf-8","language":"markup","size":96616,"content_sha256":"10e25995df34cfe7e1cc8455b0449b9616b4979ae13c1f2e1ca78a0e7a2464b1"},{"filename":"testdata/rankings-companies-dirty-fixture.html","content":"\u003c!DOCTYPE html>\n\u003chtml>\u003chead>\u003ctitle>Companies followed by the AI 2K · Digg\u003c/title>\u003c/head>\u003cbody>\n\u003c!-- Trimmed fixture for digg-pp-cli rankings tests. Keeps only the three data-bearing RSC pushes from a live /ai/x/rankings/companies capture. Main ranking trimmed to first 30 entries. -->\n\u003cscript>\nself.__next_f.push([1,\"16:[\\\"$\\\",\\\"section\\\",null,{\\\"children\\\":[[\\\"$\\\",\\\"section\\\",null,{\\\"aria-label\\\":\\\"Company movers since last snapshot\\\",\\\"className\\\":\\\"mb-3 flex flex-col gap-4 sm:mb-4 sm:gap-6\\\",\\\"children\\\":[[\\\"$\\\",\\\"$L39\\\",null,{\\\"direction\\\":\\\"emerging\\\",\\\"entries\\\":[{\\\"rank\\\":\\\"oops\\\",\\\"target_x_id\\\":\\\"1533893728498237441\\\",\\\"followed_by_count\\\":13,\\\"score\\\":0,\\\"username\\\":\\\"inspiredco_ai\\\",\\\"display_name\\\":\\\"Inspired Cognition\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1533893728498237441/avatar-8c9c67aca7c0f868.jpg\\\",\\\"followers_count\\\":192,\\\"bio\\\":\\\"\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":493,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":true,\\\"emergingReasoning\\\":\\\"Tiny emerging AI startup with minimal public footprint and real product focus.\\\",\\\"classificationTldr\\\":null},{\\\"rank\\\":942,\\\"target_x_id\\\":\\\"1592013380235280390\\\",\\\"followed_by_count\\\":13,\\\"score\\\":0,\\\"username\\\":\\\"EvolvingPx\\\",\\\"display_name\\\":\\\"Evolving Programs\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1592013380235280390/avatar-ef0be676038d9915.jpg\\\",\\\"followers_count\\\":4854,\\\"bio\\\":\\\"Generating code since 2022.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":448,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":true,\\\"emergingReasoning\\\":\\\"Small code-generation AI tool active since 2022, low mainstream awareness.\\\",\\\"classificationTldr\\\":\\\"Official account of Spellcraft (SpellcraftAI), a for-profit AI company (formerly GPT Labs) building LLM tooling and code generation products like UPG, GSH, and Merlin since 2022. Now associated with Evolving Programs.\\\"},{\\\"rank\\\":809,\\\"target_x_id\\\":\\\"1402597928611454980\\\",\\\"followed_by_count\\\":15,\\\"score\\\":0,\\\"username\\\":\\\"NlpWestlake\\\",\\\"display_name\\\":\\\"WestlakeNLP\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1402597928611454980/avatar-83b791a8a8afcb86.png\\\",\\\"followers_count\\\":1235,\\\"bio\\\":\\\"Westlake NLP group led by Yue Zhang.\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":386,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":831,\\\"target_x_id\\\":\\\"1787584583594106880\\\",\\\"followed_by_count\\\":15,\\\"score\\\":0,\\\"username\\\":\\\"ndif_team\\\",\\\"display_name\\\":\\\"NDIF\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1787584583594106880/avatar-bc777653de32be70.jpg\\\",\\\"followers_count\\\":514,\\\"bio\\\":\\\"The National Deep Inference Fabric, an NSF-funded computational infrastructure to enable research on large-scale Artificial Intelligence. https://n...\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":401,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":861,\\\"target_x_id\\\":\\\"1188863360873455617\\\",\\\"followed_by_count\\\":14,\\\"score\\\":0,\\\"username\\\":\\\"eval4nlp\\\",\\\"display_name\\\":\\\"Eval4NLP\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1188863360873455617/avatar-a441275e77d26b1a.jpg\\\",\\\"followers_count\\\":303,\\\"bio\\\":\\\"Workshop on Evaluation and Comparison of NLP Systems, co-located with #AACL2025.\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":426,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":922,\\\"target_x_id\\\":\\\"1189744336415723520\\\",\\\"followed_by_count\\\":13,\\\"score\\\":0,\\\"username\\\":\\\"SIGIRConf\\\",\\\"display_name\\\":\\\"SIGIR 2025\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1189744336415723520/avatar-5dc2811725d720ba.jpg\\\",\\\"followers_count\\\":3265,\\\"bio\\\":\\\"The 48th International ACM SIGIR Conference on Research and Development in Information Retrieval\\\\n🗓13-18 July, 2025\\\\n#SIGIR2025\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":478,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":936,\\\"target_x_id\\\":\\\"1491203210560040960\\\",\\\"followed_by_count\\\":13,\\\"score\\\":0,\\\"username\\\":\\\"MINTresearchlab\\\",\\\"display_name\\\":\\\"MINT Lab\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1491203210560040960/avatar-1fc2024b9110976f.jpg\\\",\\\"followers_count\\\":1073,\\\"bio\\\":\\\"Machine Intelligence and Normative Theory Lab, ANU, run by philosopher @sethlazar\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":491,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":945,\\\"target_x_id\\\":\\\"16363771\\\",\\\"followed_by_count\\\":13,\\\"score\\\":0,\\\"username\\\":\\\"siebelschool\\\",\\\"display_name\\\":\\\"Siebel School of Computing and Data Science\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/16363771/avatar-f2c30f0599b31dc5.jpg\\\",\\\"followers_count\\\":12853,\\\"bio\\\":\\\"Leading global engineering at The Grainger College of Engineering at the University of Illinois Urbana-Champaign.\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":496,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":949,\\\"target_x_id\\\":\\\"17063069\\\",\\\"followed_by_count\\\":13,\\\"score\\\":0,\\\"username\\\":\\\"shadowrobot\\\",\\\"display_name\\\":\\\"Shadow Robot\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/17063069/avatar-e40732fe9cce6cf9.jpg\\\",\\\"followers_count\\\":4224,\\\"bio\\\":\\\"We develop new robotics technologies. You've probably seen our robot hands!\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":500,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":950,\\\"target_x_id\\\":\\\"1745519412097224705\\\",\\\"followed_by_count\\\":13,\\\"score\\\":0,\\\"username\\\":\\\"tavus\\\",\\\"display_name\\\":\\\"Tavus\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1745519412097224705/avatar-48c01a780b31b19d.jpg\\\",\\\"followers_count\\\":9172,\\\"bio\\\":\\\"The human computing company.\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":null,\\\"rankChange\\\":null,\\\"categoryRank\\\":501,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":null,\\\"isNewEntrant\\\":true,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null}]}],\\\"$L3a\\\"]}],\\\"$L3b\\\"]}]\\n\"])\nself.__next_f.push([1,\"3a:[\\\"$\\\",\\\"$L3c\\\",null,{\\\"left\\\":{\\\"direction\\\":\\\"up\\\",\\\"entries\\\":[{\\\"rank\\\":76,\\\"target_x_id\\\":\\\"1138105948214505473\\\",\\\"followed_by_count\\\":108,\\\"score\\\":0,\\\"display_name\\\":\\\"ACL Anthology\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1138105948214505473/avatar-709d8844e851b4f1.png\\\",\\\"followers_count\\\":6948,\\\"bio\\\":\\\"Host of scientistic papers for @aclmeeting and other venues in the field of Natural Language Processing\\\\n\\\\nNot closely monitored, so responses may be...\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":86,\\\"rankChange\\\":10,\\\"categoryRank\\\":3,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":10,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":4,\\\"target_x_id\\\":\\\"33838201\\\",\\\"followed_by_count\\\":837,\\\"score\\\":0,\\\"username\\\":\\\"GoogleAI\\\",\\\"display_name\\\":\\\"Google AI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/33838201/avatar-d2ef0aacd9dfb06f.jpg\\\",\\\"followers_count\\\":2409507,\\\"bio\\\":\\\"Making AI helpful for everyone. Show thinking ↓\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":4,\\\"rankChange\\\":0,\\\"categoryRank\\\":4,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":10,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official @GoogleAI account for Google's AI research, products (Gemini), and initiatives. Represents the for-profit corporation Google. Tagged Company as the official corporate account promoting AI tools.\\\"},{\\\"rank\\\":206,\\\"target_x_id\\\":\\\"1354681717047476225\\\",\\\"followed_by_count\\\":49,\\\"score\\\":0,\\\"username\\\":\\\"TsinghuaNLP\\\",\\\"display_name\\\":\\\"TsinghuaNLP\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1354681717047476225/avatar-732c35f2b16dfdda.jpg\\\",\\\"followers_count\\\":3425,\\\"bio\\\":\\\"Natural Language Processing Lab at Tsinghua University\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":264,\\\"rankChange\\\":58,\\\"categoryRank\\\":33,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":9,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":187,\\\"target_x_id\\\":\\\"1413545724978122753\\\",\\\"followed_by_count\\\":53,\\\"score\\\":0,\\\"username\\\":\\\"aclmentorship\\\",\\\"display_name\\\":\\\"ACL Mentorship\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1413545724978122753/avatar-4437ebd7c1bd22d6.jpg\\\",\\\"followers_count\\\":2561,\\\"bio\\\":\\\"ACL Year-Round Mentorship Program: http://mentorship.aclweb.org\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":236,\\\"rankChange\\\":49,\\\"categoryRank\\\":25,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":9,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":106,\\\"target_x_id\\\":\\\"1417329311506264066\\\",\\\"followed_by_count\\\":84,\\\"score\\\":0,\\\"username\\\":\\\"ucsbNLP\\\",\\\"display_name\\\":\\\"UC Santa Barbara NLP Group\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1417329311506264066/avatar-18017f4ad1b6b94d.jpg\\\",\\\"followers_count\\\":2377,\\\"bio\\\":\\\"NLP and AI Researchers @ucsantabarbara. Profs. @xwang_lk, @WilliamWangNLP, @CodeTerminator, Xifeng Yan, Simon Todd. Account run by NLP Student Soci...\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":120,\\\"rankChange\\\":14,\\\"categoryRank\\\":8,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":9,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":69,\\\"target_x_id\\\":\\\"1002211204897517568\\\",\\\"followed_by_count\\\":116,\\\"score\\\":0,\\\"username\\\":\\\"nlp_usc\\\",\\\"display_name\\\":\\\"USC NLP\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1002211204897517568/avatar-7b220d3eaa0c5587.jpg\\\",\\\"followers_count\\\":3765,\\\"bio\\\":\\\"The NLP group at @USCViterbi. @DaniYogatama+@_jessethomason_+@jieyuzhao11+@robinomial+@swabhz+@xiangrenNLP at @CSatUSC + researchers @USC_ICT, @USC...\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":78,\\\"rankChange\\\":9,\\\"categoryRank\\\":1,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":8,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":91,\\\"target_x_id\\\":\\\"1376970544390750214\\\",\\\"followed_by_count\\\":96,\\\"score\\\":0,\\\"username\\\":\\\"tsvetshop\\\",\\\"display_name\\\":\\\"tsvetshop\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1376970544390750214/avatar-74f91d7bf315b695.jpg\\\",\\\"followers_count\\\":1018,\\\"bio\\\":\\\"Group account for Prof. Yulia Tsvetkov's lab at @uwnlp. We work on low-resource, multilingual, social-oriented NLP. Details on our website:\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":103,\\\"rankChange\\\":12,\\\"categoryRank\\\":5,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":8,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":6,\\\"target_x_id\\\":\\\"778764142412984320\\\",\\\"followed_by_count\\\":615,\\\"score\\\":0,\\\"username\\\":\\\"huggingface\\\",\\\"display_name\\\":\\\"Hugging Face\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/778764142412984320/avatar-ced551284510c19b.jpg\\\",\\\"followers_count\\\":687542,\\\"bio\\\":\\\"The AI community building the future. http://hf.co/careers\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":\\\"https://github.com/huggingface\\\",\\\"previousRank\\\":6,\\\"rankChange\\\":0,\\\"categoryRank\\\":6,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":8,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Hugging Face, the for-profit AI company behind the Hugging Face Hub, Transformers library, and open ML platform. Tagged Company as this is the official corporate account of a for-profit corporation.\\\"},{\\\"rank\\\":104,\\\"target_x_id\\\":\\\"1252310878965334016\\\",\\\"followed_by_count\\\":87,\\\"score\\\":0,\\\"username\\\":\\\"eaclmeeting\\\",\\\"display_name\\\":\\\"eaclmeeting\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1252310878965334016/avatar-21bc1dcd89dc8fe9.jpg\\\",\\\"followers_count\\\":4485,\\\"bio\\\":\\\"The European Chapter of the Association for Computational Linguistics\\\\nAn annual Top-tier *ACL conference. #EACL2027 #NLProc\\\\nMarch 9-14, 2027\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":112,\\\"rankChange\\\":8,\\\"categoryRank\\\":7,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null},{\\\"rank\\\":287,\\\"target_x_id\\\":\\\"1420575193039204354\\\",\\\"followed_by_count\\\":38,\\\"score\\\":0,\\\"username\\\":\\\"osunlp\\\",\\\"display_name\\\":\\\"OSU NLP Group\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1420575193039204354/avatar-856f6f593b99bce9.jpg\\\",\\\"followers_count\\\":1912,\\\"bio\\\":\\\"Natural Language Processing Group at The Ohio State University directed by @ysu_nlp @hhsun1 @shocheen\\\",\\\"category\\\":null,\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":361,\\\"rankChange\\\":74,\\\"categoryRank\\\":60,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":null}]},\\\"right\\\":{\\\"direction\\\":\\\"down\\\",\\\"entries\\\":[{\\\"rank\\\":19,\\\"target_x_id\\\":\\\"1307056292465274880\\\",\\\"followed_by_count\\\":233,\\\"score\\\":0,\\\"username\\\":\\\"midjourney\\\",\\\"display_name\\\":\\\"Midjourney\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1307056292465274880/avatar-282e63ec157cc4b2.jpg\\\",\\\"followers_count\\\":416584,\\\"bio\\\":\\\"A community supported research lab - exploring new mediums of thought and amplifying the imaginative powers of the human species.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":\\\"https://github.com/midjourney\\\",\\\"previousRank\\\":17,\\\"rankChange\\\":-2,\\\"categoryRank\\\":19,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Midjourney, Inc., the San Francisco-based for-profit AI research lab and company behind the popular text-to-image generation service. Tagged Company because this is the official account of a recognized for-profit corporation.\\\"},{\\\"rank\\\":48,\\\"target_x_id\\\":\\\"1633874951508721686\\\",\\\"followed_by_count\\\":148,\\\"score\\\":0,\\\"username\\\":\\\"OpenAIDevs\\\",\\\"display_name\\\":\\\"OpenAI Developers\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1633874951508721686/avatar-28a69526c51cc85f.jpg\\\",\\\"followers_count\\\":338348,\\\"bio\\\":\\\"Official updates for developers building with Codex & the OpenAI Platform • Service status: https://status.openai.com\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":45,\\\"rankChange\\\":-3,\\\"categoryRank\\\":48,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official developer account of OpenAI, the for-profit AI company. Shares updates on the OpenAI Platform, Codex, APIs, and developer tools. Tagged Company because it is an official corporate account, not a personal or organizational one.\\\"},{\\\"rank\\\":124,\\\"target_x_id\\\":\\\"1725745711755530240\\\",\\\"followed_by_count\\\":73,\\\"score\\\":0,\\\"username\\\":\\\"udiomusic\\\",\\\"display_name\\\":\\\"udio\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1725745711755530240/avatar-e4ea812281d7bda0.jpg\\\",\\\"followers_count\\\":35870,\\\"bio\\\":\\\"Generative music maker. Make your music.\\\\nDiscord https://discord.gg/udio\\\\nReddit r/udiomusic\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":116,\\\"rankChange\\\":-8,\\\"categoryRank\\\":115,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Udio, the for-profit AI music generation company behind the generative music platform at udio.com. Tagged Company because this is the official account of a for-profit corporation.\\\"},{\\\"rank\\\":58,\\\"target_x_id\\\":\\\"1741642915871600640\\\",\\\"followed_by_count\\\":137,\\\"score\\\":0,\\\"username\\\":\\\"theworldlabs\\\",\\\"display_name\\\":\\\"World Labs\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1741642915871600640/avatar-b4ce0f2ea2ea9b1b.jpg\\\",\\\"followers_count\\\":67443,\\\"bio\\\":\\\"World Labs is a spatial intelligence company, building frontier models that can perceive, generate, and interact with the 3D world.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":54,\\\"rankChange\\\":-4,\\\"categoryRank\\\":58,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for World Labs, a for-profit spatial intelligence AI startup founded by Fei-Fei Li building frontier Large World Models (LWMs) for 3D perception, generation, and interaction. Tagged Company because this is the official account of a for-profit corporation.\\\"},{\\\"rank\\\":49,\\\"target_x_id\\\":\\\"1803847768781524992\\\",\\\"followed_by_count\\\":147,\\\"score\\\":0,\\\"username\\\":\\\"OpenAINewsroom\\\",\\\"display_name\\\":\\\"OpenAI Newsroom\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1803847768781524992/avatar-bfe3efb3418486a5.jpg\\\",\\\"followers_count\\\":147081,\\\"bio\\\":\\\"The official newsroom for @OpenAI.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":46,\\\"rankChange\\\":-3,\\\"categoryRank\\\":49,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official newsroom account for OpenAI, the for-profit AI company behind ChatGPT and GPT models. Tagged Company as the verified official corporate account for company news and updates.\\\"},{\\\"rank\\\":27,\\\"target_x_id\\\":\\\"1001114465692200960\\\",\\\"followed_by_count\\\":202,\\\"score\\\":0,\\\"username\\\":\\\"runwayml\\\",\\\"display_name\\\":\\\"Runway\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1001114465692200960/avatar-1f9940932a77ed9e.jpg\\\",\\\"followers_count\\\":280147,\\\"bio\\\":\\\"Building AI to simulate the world. We're hiring: http://runwayml.com/careers\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":24,\\\"rankChange\\\":-3,\\\"categoryRank\\\":27,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-6,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Runway (Runway AI, Inc.), the for-profit AI company building generative video, image, and world simulation models (Gen-4.5, etc.). Tagged Company because this is a for-profit corporation headquartered in New York.\\\"},{\\\"rank\\\":40,\\\"target_x_id\\\":\\\"1318419526132862976\\\",\\\"followed_by_count\\\":169,\\\"score\\\":0,\\\"username\\\":\\\"NousResearch\\\",\\\"display_name\\\":\\\"Nous Research\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1318419526132862976/avatar-be04ba9f119fbe3a.jpg\\\",\\\"followers_count\\\":181886,\\\"bio\\\":\\\"World-class open source AI\\\\nhttps://discord.gg/nousresearch\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":\\\"https://github.com/nousresearch\\\",\\\"previousRank\\\":39,\\\"rankChange\\\":-1,\\\"categoryRank\\\":40,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-6,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Nous Research, a for-profit AI startup training open-source language models (Hermes series) and building distributed training infrastructure. Tagged Company because it is a funded private corporation (raised Series A, Paradigm/a16z backing) focused on commercial open AI development.\\\"},{\\\"rank\\\":34,\\\"target_x_id\\\":\\\"1714438092655149056\\\",\\\"followed_by_count\\\":183,\\\"score\\\":0,\\\"username\\\":\\\"ChatGPTapp\\\",\\\"display_name\\\":\\\"ChatGPT\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1714438092655149056/avatar-f11d3c77151d0077.png\\\",\\\"followers_count\\\":562773,\\\"bio\\\":\\\"ChatGPT is for the people.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":32,\\\"rankChange\\\":-2,\\\"categoryRank\\\":34,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-6,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official X account for ChatGPT, OpenAI's AI chatbot and product. Tagged Company as the verified official account of OpenAI's for-profit AI service.\\\"},{\\\"rank\\\":44,\\\"target_x_id\\\":\\\"895332160130891776\\\",\\\"followed_by_count\\\":158,\\\"score\\\":0,\\\"username\\\":\\\"neuralink\\\",\\\"display_name\\\":\\\"Neuralink\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/895332160130891776/avatar-58d8953cadb49d2a.jpg\\\",\\\"followers_count\\\":1756788,\\\"bio\\\":\\\"Creating a general-purpose, high-bandwidth interface to the brain\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":41,\\\"rankChange\\\":-3,\\\"categoryRank\\\":44,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-6,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Neuralink Corp, the neurotechnology company founded by Elon Musk developing implantable brain-computer interfaces. Tagged Company as this is the official for-profit corporate account for the BCI pioneer.\\\"},{\\\"rank\\\":70,\\\"target_x_id\\\":\\\"1337286147089678337\\\",\\\"followed_by_count\\\":115,\\\"score\\\":0,\\\"username\\\":\\\"imbue_ai\\\",\\\"display_name\\\":\\\"Imbue\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1337286147089678337/avatar-e91490ec0b25a968.jpg\\\",\\\"followers_count\\\":9464,\\\"bio\\\":\\\"We believe tech should serve humans, not the other way around.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":67,\\\"rankChange\\\":-3,\\\"categoryRank\\\":69,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-5,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Imbue (imbue.com), a for-profit AI research lab building agents and tools to empower humans. Formerly Generally Intelligent; raised $200M+ from Nvidia and others. Tagged Company as the official account of a VC-backed AI corporation.\\\"}]}}]\\n\"])\nself.__next_f.push([1,\"3b:[\\\"$\\\",\\\"$L3d\\\",null,{\\\"entries\\\":[{\\\"rank\\\":1,\\\"target_x_id\\\":\\\"4398626122\\\",\\\"followed_by_count\\\":1056,\\\"score\\\":0,\\\"username\\\":\\\"OpenAI\\\",\\\"display_name\\\":\\\"OpenAI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/4398626122/avatar-ded3b9a3cc0526f0.jpg\\\",\\\"followers_count\\\":4874222,\\\"bio\\\":\\\"OpenAI’s mission is to ensure that artificial general intelligence benefits all of humanity. We’re hiring: http://openai.com/jobs\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":1,\\\"rankChange\\\":0,\\\"categoryRank\\\":1,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for OpenAI, the for-profit AI company behind ChatGPT and GPT models. Tagged Company because this is the official account of a for-profit corporation.\\\"},{\\\"rank\\\":2,\\\"target_x_id\\\":\\\"4783690002\\\",\\\"followed_by_count\\\":1026,\\\"score\\\":0,\\\"username\\\":\\\"GoogleDeepMind\\\",\\\"display_name\\\":\\\"Google DeepMind\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/4783690002/avatar-32e6d78ed4c158fb.jpg\\\",\\\"followers_count\\\":1433166,\\\"bio\\\":\\\"The engine room of @Google. Building AI safely and responsibly to solve the world’s most complex problems. Join us: https://deepmind.google/careers/\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":2,\\\"rankChange\\\":0,\\\"categoryRank\\\":2,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Google DeepMind, the AI research lab of Google/Alphabet focused on advancing intelligence and building safe AI systems. Tagged Company because this is the official account representing a division of a for-profit corporation.\\\"},{\\\"rank\\\":3,\\\"target_x_id\\\":\\\"1353836358901501952\\\",\\\"followed_by_count\\\":878,\\\"score\\\":0,\\\"username\\\":\\\"AnthropicAI\\\",\\\"display_name\\\":\\\"Anthropic\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1353836358901501952/avatar-c2e27c1ef668f777.jpg\\\",\\\"followers_count\\\":1274880,\\\"bio\\\":\\\"We're an AI safety and research company that builds reliable, interpretable, and steerable AI systems. Talk to our AI assistant @claudeai on https:...\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":3,\\\"rankChange\\\":0,\\\"categoryRank\\\":3,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Anthropic, the for-profit AI safety and research company behind Claude. Tagged Company because this is a for-profit corporation that builds reliable AI systems.\\\"},\\\"$3a:props:left:entries:1\\\",{\\\"rank\\\":5,\\\"target_x_id\\\":\\\"1034844617261248512\\\",\\\"followed_by_count\\\":741,\\\"score\\\":0,\\\"username\\\":\\\"AIatMeta\\\",\\\"display_name\\\":\\\"AI at Meta\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1034844617261248512/avatar-c2c98f0659375aac.png\\\",\\\"followers_count\\\":797953,\\\"bio\\\":\\\"Together with the AI community, we are pushing the boundaries of what’s possible through open science to create a more connected world.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":5,\\\"rankChange\\\":0,\\\"categoryRank\\\":5,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":5,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for AI at Meta, Meta Platforms' AI research division and products (Llama models, Meta AI assistant). Tagged Company as the official account of a for-profit corporation advancing open AI science.\\\"},\\\"$3a:props:left:entries:7\\\",{\\\"rank\\\":7,\\\"target_x_id\\\":\\\"1891523745929732096\\\",\\\"followed_by_count\\\":588,\\\"score\\\":0,\\\"username\\\":\\\"thinkymachines\\\",\\\"display_name\\\":\\\"Thinking Machines\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1891523745929732096/avatar-ec61efaaa334d48f.jpg\\\",\\\"followers_count\\\":150200,\\\"bio\\\":\\\"Thinking, beeping, and booping.\\\\n@tinkerapi\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":7,\\\"rankChange\\\":0,\\\"categoryRank\\\":7,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":7,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Thinking Machines Lab, the for-profit AI startup founded by Mira Murati (ex-OpenAI CTO). They build research tools like the Tinker fine-tuning API. Tagged Company as this is the official account of a for-profit corporation.\\\"},{\\\"rank\\\":8,\\\"target_x_id\\\":\\\"1714580962569588736\\\",\\\"followed_by_count\\\":476,\\\"score\\\":0,\\\"username\\\":\\\"deepseek_ai\\\",\\\"display_name\\\":\\\"DeepSeek\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1714580962569588736/avatar-2caf722962286dd7.jpg\\\",\\\"followers_count\\\":1025407,\\\"bio\\\":\\\"Unravel the mystery of AGI with curiosity. Answer the essential question with long-termism.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":8,\\\"rankChange\\\":0,\\\"categoryRank\\\":8,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":0,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of DeepSeek, the Chinese for-profit AI company (Hangzhou DeepSeek Artificial Intelligence Co.) founded in 2023 by Liang Wenfeng. Develops and releases LLMs like DeepSeek-V3, R1, Coder V2 plus chatbot/API services. Tagged Company as the official account of a for-profit corporation.\\\"},{\\\"rank\\\":9,\\\"target_x_id\\\":\\\"1641378826537295874\\\",\\\"followed_by_count\\\":420,\\\"score\\\":0,\\\"username\\\":\\\"arena\\\",\\\"display_name\\\":\\\"Arena.ai\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1641378826537295874/avatar-c75d8d8fa948780e.jpg\\\",\\\"followers_count\\\":159515,\\\"bio\\\":\\\"Where AI meets the real world. Formerly LMArena. We measure and advance the frontier of AI through community-driven evaluation. We’re hiring → http...\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":9,\\\"rankChange\\\":0,\\\"categoryRank\\\":9,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Arena.ai (formerly LMArena/Chatbot Arena), a VC-backed startup offering community-driven LLM leaderboards and AI evaluations. Tagged Company as the official account of a for-profit AI corporation.\\\"},{\\\"rank\\\":10,\\\"target_x_id\\\":\\\"1802854238370050050\\\",\\\"followed_by_count\\\":364,\\\"score\\\":0,\\\"username\\\":\\\"ssi\\\",\\\"display_name\\\":\\\"SSI Inc.\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1802854238370050050/avatar-fba6b398bd9a45d1.jpg\\\",\\\"followers_count\\\":108120,\\\"bio\\\":\\\"A straight shot to safe superintelligence. Join us https://ssi.inc.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":10,\\\"rankChange\\\":0,\\\"categoryRank\\\":10,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-5,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Safe Superintelligence Inc. (SSI), a for-profit AI company founded by Ilya Sutskever dedicated to building safe superintelligence as its sole product. Tagged Company because this is the official account of a for-profit corporation.\\\"},{\\\"rank\\\":11,\\\"target_x_id\\\":\\\"1661523610111193088\\\",\\\"followed_by_count\\\":362,\\\"score\\\":0,\\\"username\\\":\\\"xai\\\",\\\"display_name\\\":\\\"xAI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1661523610111193088/avatar-10fac562065092bc.jpg\\\",\\\"followers_count\\\":1989810,\\\"bio\\\":\\\"\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":11,\\\"rankChange\\\":0,\\\"categoryRank\\\":11,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-2,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of xAI, the for-profit AI company founded by Elon Musk and creators of Grok. Tagged Company because this is the official account of a for-profit corporation (now a SpaceX division).\\\"},{\\\"rank\\\":12,\\\"target_x_id\\\":\\\"1667249535519805451\\\",\\\"followed_by_count\\\":339,\\\"score\\\":0,\\\"username\\\":\\\"MistralAI\\\",\\\"display_name\\\":\\\"Mistral AI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1667249535519805451/avatar-4cec2423afcf80fc.jpg\\\",\\\"followers_count\\\":182307,\\\"bio\\\":\\\"Frontier AI in your hands. http://chat.mistral.ai Apps: https://mistral.ai/app/ios https://mistral.ai/app/android\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":12,\\\"rankChange\\\":0,\\\"categoryRank\\\":12,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Mistral AI, the French for-profit AI company founded in 2023 known for open-weight frontier models like Mixtral. Tagged Company because this is the verified official account of a for-profit corporation, not a personal or nonprofit profile.\\\"},{\\\"rank\\\":13,\\\"target_x_id\\\":\\\"1281048162602369024\\\",\\\"followed_by_count\\\":304,\\\"score\\\":0,\\\"username\\\":\\\"StabilityAI\\\",\\\"display_name\\\":\\\"Stability AI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1281048162602369024/avatar-e81b200c25341a0f.png\\\",\\\"followers_count\\\":255313,\\\"bio\\\":\\\"We’ll help you make it like nobody’s business. Multimodal media generation and editing tools to get your idea to production. Self-deploy? 👍 Need a ...\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":13,\\\"rankChange\\\":0,\\\"categoryRank\\\":13,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Stability AI, the UK-based for-profit AI company behind Stable Diffusion and multimodal media generation/editing tools. Tagged Company because this is the official account of a private corporation developing generative AI.\\\"},{\\\"rank\\\":14,\\\"target_x_id\\\":\\\"1326237414025801729\\\",\\\"followed_by_count\\\":285,\\\"score\\\":0,\\\"username\\\":\\\"cohere\\\",\\\"display_name\\\":\\\"Cohere\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1326237414025801729/avatar-35d4854abd738f54.png\\\",\\\"followers_count\\\":111341,\\\"bio\\\":\\\"Empowering enterprises with private, powerful AI. Join us: http://cohere.com/careers\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":\\\"https://github.com/cohere-ai\\\",\\\"previousRank\\\":14,\\\"rankChange\\\":0,\\\"categoryRank\\\":14,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-1,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Cohere, the for-profit AI company building private enterprise LLMs. Tagged Company because this is the corporate entity, not a person or nonprofit org.\\\"},{\\\"rank\\\":15,\\\"target_x_id\\\":\\\"1592266692528197632\\\",\\\"followed_by_count\\\":281,\\\"score\\\":0,\\\"username\\\":\\\"togethercompute\\\",\\\"display_name\\\":\\\"Together AI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1592266692528197632/avatar-c7f1eff9754f3266.jpg\\\",\\\"followers_count\\\":55387,\\\"bio\\\":\\\"Accelerate inference, model shaping, and pre-training on a research-optimized platform.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":15,\\\"rankChange\\\":0,\\\"categoryRank\\\":15,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-1,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Together AI, the for-profit AI Native Cloud platform for inference, fine-tuning, pre-training, and GPU clusters. Tagged Company because this is a recognized for-profit corporation (founded 2022, backed by NVIDIA et al.).\\\"},{\\\"rank\\\":16,\\\"target_x_id\\\":\\\"1767285662087348224\\\",\\\"followed_by_count\\\":243,\\\"score\\\":0,\\\"username\\\":\\\"physical_int\\\",\\\"display_name\\\":\\\"Physical Intelligence\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1767285662087348224/avatar-a10763436a7167ad.png\\\",\\\"followers_count\\\":43962,\\\"bio\\\":\\\"Physical Intelligence (Pi), bringing AI into the physical world.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":16,\\\"rankChange\\\":0,\\\"categoryRank\\\":16,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-4,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Physical Intelligence (Pi), a for-profit robotics startup developing general-purpose AI foundation models for controlling any robot. Classified as Company because it is the official account of a privately held corporation with major venture backing.\\\"},{\\\"rank\\\":17,\\\"target_x_id\\\":\\\"1810393276287168516\\\",\\\"followed_by_count\\\":240,\\\"score\\\":0,\\\"username\\\":\\\"EurekaLabsAI\\\",\\\"display_name\\\":\\\"Eureka Labs\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1810393276287168516/avatar-ea55b5d5a723b6f9.jpg\\\",\\\"followers_count\\\":88626,\\\"bio\\\":\\\"We are building a new kind of school that is AI native.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":19,\\\"rankChange\\\":2,\\\"categoryRank\\\":17,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":1,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Eureka Labs, the AI education startup founded by Andrej Karpathy building an AI-native school. First product is LLM101n, an undergraduate AI course. Tagged Company as a for-profit edtech corporation.\\\"},{\\\"rank\\\":18,\\\"target_x_id\\\":\\\"20536157\\\",\\\"followed_by_count\\\":238,\\\"score\\\":0,\\\"username\\\":\\\"Google\\\",\\\"display_name\\\":\\\"Google\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/20536157/avatar-d91e62b9d32f724c.jpg\\\",\\\"followers_count\\\":31912614,\\\"bio\\\":\\\"Here to help.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":18,\\\"rankChange\\\":0,\\\"categoryRank\\\":18,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-2,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Google, the for-profit technology corporation behind search, Android, YouTube, and Gemini AI. Tagged Company because this is the verified corporate account of a major for-profit entity.\\\"},\\\"$3a:props:right:entries:0\\\",{\\\"rank\\\":20,\\\"target_x_id\\\":\\\"64844802\\\",\\\"followed_by_count\\\":219,\\\"score\\\":0,\\\"username\\\":\\\"a16z\\\",\\\"display_name\\\":\\\"a16z\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/64844802/avatar-d2c4df6e181a0e09.png\\\",\\\"followers_count\\\":980402,\\\"bio\\\":\\\"It's time to build.\\\\n\\\\nhttp://a16z.com/portfolio\\\\n\\\\nPosts are not investment advice or an advertisement for investment services. See http://a16z.com/di...\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":20,\\\"rankChange\\\":0,\\\"categoryRank\\\":20,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-1,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Andreessen Horowitz (a16z), a leading Silicon Valley venture capital firm. It backs bold tech founders and invests heavily in AI. Tagged Company because this is the verified account of a for-profit corporation.\\\"},{\\\"rank\\\":21,\\\"target_x_id\\\":\\\"113130846\\\",\\\"followed_by_count\\\":214,\\\"score\\\":0,\\\"username\\\":\\\"ycombinator\\\",\\\"display_name\\\":\\\"Y Combinator\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/113130846/avatar-a51248d2c4bf18ae.png\\\",\\\"followers_count\\\":1601728,\\\"bio\\\":\\\"We help founders make something people want. Subscribe to our newsletter: http://yc.link/newsletter\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":21,\\\"rankChange\\\":0,\\\"categoryRank\\\":21,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Y Combinator, the well-known for-profit startup accelerator and VC firm behind thousands of companies including many AI leaders. Tagged Company as this is the official account of a for-profit corporation.\\\"},{\\\"rank\\\":22,\\\"target_x_id\\\":\\\"1650159466032271360\\\",\\\"followed_by_count\\\":210,\\\"score\\\":0,\\\"username\\\":\\\"pika_labs\\\",\\\"display_name\\\":\\\"Pika\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1650159466032271360/avatar-837e80506a14eb04.jpg\\\",\\\"followers_count\\\":148519,\\\"bio\\\":\\\"Create your Pika Agent, then create anything together. \\\\n\\\\nhttp://pika.me/\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":22,\\\"rankChange\\\":0,\\\"categoryRank\\\":22,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-1,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Pika, the for-profit AI startup behind text-to-video generation, Pika Agents, and creative tools at pika.art. Tagged Company because this is the official branded account of a venture-backed corporation.\\\"},{\\\"rank\\\":23,\\\"target_x_id\\\":\\\"1863959670169501696\\\",\\\"followed_by_count\\\":209,\\\"score\\\":0,\\\"username\\\":\\\"Kimi_Moonshot\\\",\\\"display_name\\\":\\\"Kimi.ai\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1863959670169501696/avatar-2cc981034ba3d729.png\\\",\\\"followers_count\\\":169200,\\\"bio\\\":\\\"Built by Moonshot AI to empower everyone to be superhuman. ⚡️API: https://platform.kimi.ai/\\\\n@KimiProduct where we share cool use cases and prompts.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":25,\\\"rankChange\\\":2,\\\"categoryRank\\\":23,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":2,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Kimi.ai, the AI chatbot and LLM series (Kimi K2) developed by Moonshot AI, a Beijing-based for-profit AI company founded in 2023. Tagged Company because this is the official presence of a for-profit corporation's flagship product.\\\"},{\\\"rank\\\":24,\\\"target_x_id\\\":\\\"1589007443853340672\\\",\\\"followed_by_count\\\":205,\\\"score\\\":0,\\\"username\\\":\\\"LangChain\\\",\\\"display_name\\\":\\\"LangChain\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1589007443853340672/avatar-f1b7697c69aaef05.jpg\\\",\\\"followers_count\\\":250101,\\\"bio\\\":\\\"Powering the Agent Development Lifecycle. Makers of LangSmith and @LangChain_OSS and @LangChain_JS.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":\\\"https://github.com/langchain-ai\\\",\\\"previousRank\\\":23,\\\"rankChange\\\":-1,\\\"categoryRank\\\":24,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-4,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for LangChain, the for-profit company behind the popular open-source framework and agent engineering platform. Makers of LangSmith, with @LangChain_OSS and @LangChain_JS. Started as Harrison Chase side project in 2022, incorporated 2023.\\\"},{\\\"rank\\\":25,\\\"target_x_id\\\":\\\"218811492\\\",\\\"followed_by_count\\\":205,\\\"score\\\":0,\\\"username\\\":\\\"SakanaAILabs\\\",\\\"display_name\\\":\\\"Sakana AI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/218811492/avatar-726596a970c11aec.jpg\\\",\\\"followers_count\\\":70858,\\\"bio\\\":\\\"Sakana AI is an AI R&D company based in Tokyo. We develop AI solutions for Japan’s needs, and democratize AI in Japan. Try Sakana Chat: https://sak...\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":\\\"https://github.com/sakanaai\\\",\\\"previousRank\\\":28,\\\"rankChange\\\":3,\\\"categoryRank\\\":25,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-1,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Sakana AI, a Tokyo-based private AI R&D company founded in 2023 that develops nature-inspired foundation models and AI solutions for Japan. Tagged Company because this is the official account of a for-profit corporation.\\\"},{\\\"rank\\\":26,\\\"target_x_id\\\":\\\"1751810001751183361\\\",\\\"followed_by_count\\\":203,\\\"score\\\":0,\\\"username\\\":\\\"cognition\\\",\\\"display_name\\\":\\\"Cognition\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1751810001751183361/avatar-b1f34c84fd6dc931.jpg\\\",\\\"followers_count\\\":157549,\\\"bio\\\":\\\"Makers of Devin, the first AI software engineer. We are an applied AI lab building end-to-end software agents. Join us: http://cognition.ai\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":27,\\\"rankChange\\\":1,\\\"categoryRank\\\":26,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Cognition AI (Cognition Labs), the for-profit company behind Devin, the first AI software engineer. An applied AI lab building end-to-end software agents. Tagged Company because it is a recognized private AI corporation.\\\"},\\\"$3a:props:right:entries:5\\\",{\\\"rank\\\":28,\\\"target_x_id\\\":\\\"1599587232175849472\\\",\\\"followed_by_count\\\":201,\\\"score\\\":0,\\\"username\\\":\\\"perplexity_ai\\\",\\\"display_name\\\":\\\"Perplexity\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1599587232175849472/avatar-0552e0b2bea29fd0.jpg\\\",\\\"followers_count\\\":487904,\\\"bio\\\":\\\"Curiosity changes everything. Download our free app on iOS, Mac, Windows, and Android.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":26,\\\"rankChange\\\":-2,\\\"categoryRank\\\":28,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-5,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Perplexity AI, the for-profit AI search and answer engine company behind the Perplexity chatbot. Tagged Company as this is the official corporate account of a widely recognized AI startup.\\\"},{\\\"rank\\\":29,\\\"target_x_id\\\":\\\"1483922739488600064\\\",\\\"followed_by_count\\\":199,\\\"score\\\":0,\\\"username\\\":\\\"inflectionAI\\\",\\\"display_name\\\":\\\"Inflection AI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1483922739488600064/avatar-89948218ee80f63e.jpg\\\",\\\"followers_count\\\":49140,\\\"bio\\\":\\\"We are an AI studio creating a personal AI for everyone.\\\\n\\\\nOur first is @pi, a supportive and empathetic conversational AI.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":29,\\\"rankChange\\\":0,\\\"categoryRank\\\":29,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":0,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Inflection AI, the for-profit AI company behind the personal AI Pi. Tagged Company because this is the official corporate account of a private AI corporation.\\\"},{\\\"rank\\\":30,\\\"target_x_id\\\":\\\"2502019975\\\",\\\"followed_by_count\\\":192,\\\"score\\\":0,\\\"username\\\":\\\"BaiduResearch\\\",\\\"display_name\\\":\\\"Baidu Research\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/2502019975/avatar-b40b2b89a21acfeb.jpg\\\",\\\"followers_count\\\":67009,\\\"bio\\\":\\\"Baidu Research brings together top talent from around the world to focus on future-looking fundamental researches in #AI #deeplearning #machinelear...\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":30,\\\"rankChange\\\":0,\\\"categoryRank\\\":30,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":1,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Baidu Research, the AI research division of Baidu Inc. (China's leading search and AI company). Tagged Company as the official research arm of the for-profit corporation focused on fundamental AI, deep learning, and machine learning.\\\"},{\\\"rank\\\":31,\\\"target_x_id\\\":\\\"1274287728167915522\\\",\\\"followed_by_count\\\":190,\\\"score\\\":0,\\\"username\\\":\\\"PrimeIntellect\\\",\\\"display_name\\\":\\\"Prime Intellect\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1274287728167915522/avatar-76760fdc2d1afa8a.jpg\\\",\\\"followers_count\\\":64725,\\\"bio\\\":\\\"The Open Stack for Self-Improving Agents\\\\n\\\\nhttps://discord.gg/primeintellect\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":\\\"https://github.com/primeintellect-ai\\\",\\\"previousRank\\\":33,\\\"rankChange\\\":2,\\\"categoryRank\\\":31,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":3,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account of Prime Intellect, a for-profit startup building the open decentralized stack for self-improving AI agents (compute, RL post-training, environments, evals). Backed by Founders Fund and AI leaders; releases models like INTELLECT-3. Tagged Company as the official corporate account of a VC-backed AI infrastructure firm.\\\"},{\\\"rank\\\":32,\\\"target_x_id\\\":\\\"1973040751773892609\\\",\\\"followed_by_count\\\":188,\\\"score\\\":0,\\\"username\\\":\\\"humansand\\\",\\\"display_name\\\":\\\"humans&\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1973040751773892609/avatar-b30e855c29812d96.jpg\\\",\\\"followers_count\\\":8939,\\\"bio\\\":\\\"AI for humans\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":34,\\\"rankChange\\\":2,\\\"categoryRank\\\":32,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":6,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Humans& AI, Inc., a human-centric frontier AI lab and startup building models centered on human interaction. Tagged Company because this is the official for-profit corporation account.\\\"},{\\\"rank\\\":33,\\\"target_x_id\\\":\\\"1695890961094909952\\\",\\\"followed_by_count\\\":186,\\\"score\\\":0,\\\"username\\\":\\\"cursor_ai\\\",\\\"display_name\\\":\\\"Cursor\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/1695890961094909952/avatar-ecadbeb04d0b20c2.jpg\\\",\\\"followers_count\\\":376182,\\\"bio\\\":\\\"The best way to build software with AI.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":10,\\\"githubUrl\\\":null,\\\"previousRank\\\":31,\\\"rankChange\\\":-2,\\\"categoryRank\\\":33,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-4,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official account for Cursor, the AI-powered code editor and coding agent by Anysphere (cursor.com). Posts product updates, features, and announcements for developers. Tagged Company as the official for-profit startup account.\\\"},\\\"$3a:props:right:entries:7\\\",{\\\"rank\\\":35,\\\"target_x_id\\\":\\\"740238495952736256\\\",\\\"followed_by_count\\\":178,\\\"score\\\":0,\\\"username\\\":\\\"NVIDIAAI\\\",\\\"display_name\\\":\\\"NVIDIA AI\\\",\\\"profile_image_url\\\":\\\"https://cnl5taoq5on9lswk.public.blob.vercel-storage.com/authors/740238495952736256/avatar-5d1fe5064039bb76.png\\\",\\\"followers_count\\\":295567,\\\"bio\\\":\\\"Teaching your AI new tricks.\\\",\\\"category\\\":\\\"Company\\\",\\\"categoryConfidence\\\":null,\\\"githubUrl\\\":null,\\\"previousRank\\\":35,\\\"rankChange\\\":0,\\\"categoryRank\\\":35,\\\"vibeDistribution\\\":{},\\\"vibeTweetCount\\\":0,\\\"followCountChange\\\":-4,\\\"isNewEntrant\\\":false,\\\"isEmergingStartup\\\":false,\\\"emergingReasoning\\\":null,\\\"classificationTldr\\\":\\\"Official NVIDIA AI account (@NVIDIAAI) from the for-profit NVIDIA corporation. Focuses on AI models, products, datasets, developer tools, and inference engines for developers.\\\"}]}]\"])\n\u003c/script>\n\u003c/body>\u003c/html>\n","content_type":"text/html; charset=utf-8","language":"markup","size":54348,"content_sha256":"cae1a17bc8ad4741a46d6beebf66cc4c586c5036dc860e9dda12d3703151cb19"},{"filename":"testdata/rankings-companies-empty-fixture.html","content":"\u003c!DOCTYPE html>\n\u003chtml>\u003chead>\u003ctitle>Companies followed by the AI 2K · Digg\u003c/title>\u003c/head>\u003cbody>\n\u003c!-- Empty fixture for digg-pp-cli rankings tests: no RSC pushes,\n used to verify parsers return a clean \"no rows\" with a typed error,\n not a panic, when the page shape changes upstream. -->\n\u003cp>No data here.\u003c/p>\n\u003c/body>\u003c/html>\n","content_type":"text/html; charset=utf-8","language":"markup","size":331,"content_sha256":"7ebe3fc3279678886126b63bd8b8bd5c9a121a6b38e8cc020780a296f743765f"},{"filename":"tools-manifest.json","content":"{\n \"api_name\": \"digg\",\n \"base_url\": \"https://di.gg\",\n \"description\": \"Digg: tail the AI story leaderboard, GitHub feeds (stars/new/activity/recent), ranking-change history, and live ingestion pipeline events from the terminal. Read-only.\",\n \"mcp_ready\": \"full\",\n \"http_transport\": \"standard\",\n \"auth\": {\n \"type\": \"none\"\n },\n \"required_headers\": [],\n \"tools\": [\n {\n \"name\": \"feed_raw\",\n \"description\": \"Fetch the raw /ai HTML page. The CLI's sync command parses this; most users should run `sync` then `top` instead of calling this directly. Returns the RawHTML.\",\n \"method\": \"GET\",\n \"path\": \"/ai\",\n \"no_auth\": true,\n \"params\": []\n },\n {\n \"name\": \"feed_story_raw\",\n \"description\": \"Fetch the raw /ai/{clusterUrlId} story detail page (HTML). The CLI's `story` command parses this; users should not need to call this directly. Required: cluster_url_id. Returns the RawHTML.\",\n \"method\": \"GET\",\n \"path\": \"/ai/{cluster_url_id}\",\n \"no_auth\": true,\n \"params\": [\n {\n \"name\": \"cluster_url_id\",\n \"type\": \"string\",\n \"location\": \"path\",\n \"description\": \"Short alphanumeric cluster URL ID (8 chars), e.g. iq7usf9e\",\n \"required\": true\n }\n ]\n },\n {\n \"name\": \"trending_status\",\n \"description\": \"Read the current pipeline status: storiesToday, clustersToday, isFetching, nextFetchAt, and the recent event stream (cluster_detected, fast_climb, post_understanding, batch_started, batch_breakdown, posts_stored, embedding_progress). Returns the TrendingStatus.\",\n \"method\": \"GET\",\n \"path\": \"/api/trending/status\",\n \"no_auth\": true,\n \"params\": []\n },\n {\n \"name\": \"github_stars\",\n \"description\": \"Top AI repos ranked by starring activity from Digg-tracked accounts. Returns repo_full_name, language, stargazers_count, recent starrer list, breakout_score, novel_score, ai_related_score, and the model's one-sentence classification. Returns the RawHTML; structured records are extracted by the CLI from the embedded RSC payload.\",\n \"method\": \"GET\",\n \"path\": \"/ai/github/stars\",\n \"no_auth\": true,\n \"params\": [\n {\n \"name\": \"min-starrers\",\n \"type\": \"int\",\n \"required\": false,\n \"description\": \"Keep only repos starred by >= N distinct Digg-tracked accounts (reads .repo.distinct_starrers; falls back to len(.repo.starrers) when absent). Applied BEFORE --limit. 0 = no filter; must be >= 0.\"\n }\n ]\n },\n {\n \"name\": \"github_new\",\n \"description\": \"Recently first-seen GitHub repos with the Digg-tracked creator/starrer who first put them on Digg's radar (event_id, event_created_at, repo_full_name, creator). Returns the RawHTML; CLI extracts the per-event records.\",\n \"method\": \"GET\",\n \"path\": \"/ai/github/new\",\n \"no_auth\": true,\n \"params\": []\n },\n {\n \"name\": \"github_activity\",\n \"description\": \"Top GitHub contributor leaderboard: per-author rank, contribution count, and distinct repos count over Digg's tracking window. Returns the RawHTML; CLI extracts the leaderboard table rows.\",\n \"method\": \"GET\",\n \"path\": \"/ai/github/activity\",\n \"no_auth\": true,\n \"params\": []\n },\n {\n \"name\": \"github_recent\",\n \"description\": \"Live GitHub activity feed: per-event entries with the GitHub URL (issue/PR/commit/repo), the user who acted, and a short description of the target. Returns the RawHTML; CLI extracts the per-event tuples.\",\n \"method\": \"GET\",\n \"path\": \"/ai/github/recent\",\n \"no_auth\": true,\n \"params\": []\n },\n {\n \"name\": \"rankings_emerging\",\n \"description\": \"Curated list of small AI companies from /ai/x/rankings/companies (the 'EMERGING STARTUPS \\u2014 CURATED THIS SNAPSHOT' section). ~10 rows per snapshot, refreshed daily. Mixes IsEmergingStartup-flagged accounts with adjacent new entrants. Returns RawHTML; CLI extracts structured CompanyEntry rows.\",\n \"method\": \"GET\",\n \"path\": \"/ai/x/rankings/companies\",\n \"no_auth\": true,\n \"params\": [\n {\n \"name\": \"max-skip-ratio\",\n \"type\": \"float\",\n \"required\": false,\n \"description\": \"Schema-drift tolerance: fraction of entries that may fail to decode before the command exits non-zero. Default 0.10. Range [0, 1].\"\n }\n ]\n },\n {\n \"name\": \"rankings_movers\",\n \"description\": \"Companies whose follower count shifted most since the last rankings/companies snapshot. Two halves: --direction up = gainers, down = losers, both = both (default; direction stamped per row). Curated to ~10 entries per side.\",\n \"method\": \"GET\",\n \"path\": \"/ai/x/rankings/companies\",\n \"no_auth\": true,\n \"params\": [\n {\n \"name\": \"direction\",\n \"type\": \"string\",\n \"required\": false,\n \"description\": \"Movers direction: up | down | both (default both).\"\n },\n {\n \"name\": \"max-skip-ratio\",\n \"type\": \"float\",\n \"required\": false,\n \"description\": \"Schema-drift tolerance (see rankings_emerging).\"\n }\n ]\n },\n {\n \"name\": \"rankings_list\",\n \"description\": \"Full company ranking \\u2014 the 'Companies followed by the AI 2K' section of /ai/x/rankings/companies. Server-paginated; returns the initial-HTML slice (typically 50-200 entries). Pass --limit to cap.\",\n \"method\": \"GET\",\n \"path\": \"/ai/x/rankings/companies\",\n \"no_auth\": true,\n \"params\": [\n {\n \"name\": \"limit\",\n \"type\": \"int\",\n \"required\": false,\n \"description\": \"Max rows to return from the initial-HTML slice (0 = all).\"\n },\n {\n \"name\": \"max-skip-ratio\",\n \"type\": \"float\",\n \"required\": false,\n \"description\": \"Schema-drift tolerance (see rankings_emerging).\"\n }\n ]\n }\n ]\n}\n","content_type":"application/json; charset=utf-8","language":"json","size":5959,"content_sha256":"4fde276ad5e8b2a87017793f3712aff788299adb5c3e0dd575a53394ebdbee00"},{"filename":"workflow_verify.yaml","content":"# Verification manifest for the digg-pp-cli read-only research workflow:\n# (1) sync the current /ai feed and pipeline events,\n# (2) read the current top stories,\n# (3) ask why a specific story is top-ranked,\n# (4) tail recent fast_climb events for movers in the last hour.\n#\n# Every step is read-only against Digg. Run via:\n# printing-press workflow-verify --dir \u003ccli-dir>\nname: digg-ai-research-flow\ndescription: Power-user research flow over Digg AI's top stories and pipeline events\ngoal: |\n Pull a fresh snapshot of the AI news feed, list today's top clusters,\n drill into one cluster's score components, and tail any fast-climb events\n from the last hour.\n\nsteps:\n - name: doctor\n command: digg-pp-cli doctor\n expect:\n exit_code: 0\n\n - name: sync\n command: digg-pp-cli sync\n expect:\n exit_code: 0\n output_contains:\n - \"synced\"\n\n - name: top-stories\n command: digg-pp-cli top --limit 5 --json --select clusterUrlId,currentRank,delta,tldr\n expect:\n exit_code: 0\n output_contains:\n - \"clusterUrlId\"\n\n - name: tail-fast-climb-events\n command: digg-pp-cli events --since 1h --type fast_climb --json --select clusterId,label,delta,currentRank,previousRank\n expect:\n exit_code: 0\n\n - name: pipeline-status\n command: digg-pp-cli pipeline status --json\n expect:\n exit_code: 0\n output_contains:\n - \"storiesToday\"\n - \"clustersToday\"\n","content_type":"application/yaml; charset=utf-8","language":"yaml","size":1435,"content_sha256":"3b4f1e704e5fd0412f19279f3926d33f8f917bdbe672d7e0cb5170be331f4d8f"},{"filename":"workflow-verify-report.json","content":"{\n \"dir\": \"/Users/mvanhorn/printing-press/library/digg\",\n \"workflows\": null,\n \"verdict\": \"workflow-pass\"\n}","content_type":"application/json; charset=utf-8","language":"json","size":109,"content_sha256":"a3f9c00e85c9f1262589ebb957fe5aaf37008bedd0b62b5f118742fa3d17e0dd"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Digg — Printing Press CLI","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Prerequisites: Install the CLI","type":"text"}]},{"type":"paragraph","content":[{"text":"This skill drives the ","type":"text"},{"text":"digg-pp-cli","type":"text","marks":[{"type":"code_inline"}]},{"text":" binary. ","type":"text"},{"text":"You must verify the CLI is installed before invoking any command from this skill.","type":"text","marks":[{"type":"strong"}]},{"text":" If it is missing, install it first:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Install via the Printing Press installer:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"npx -y @mvanhorn/printing-press-library install digg --cli-only","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verify: ","type":"text"},{"text":"digg-pp-cli --version","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Ensure ","type":"text"},{"text":"$GOPATH/bin","type":"text","marks":[{"type":"code_inline"}]},{"text":" (or ","type":"text"},{"text":"$HOME/go/bin","type":"text","marks":[{"type":"code_inline"}]},{"text":") is on ","type":"text"},{"text":"$PATH","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"If the ","type":"text"},{"text":"npx","type":"text","marks":[{"type":"code_inline"}]},{"text":" install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/digg/cmd/digg-pp-cli@latest","type":"text"}]},{"type":"paragraph","content":[{"text":"If ","type":"text"},{"text":"--version","type":"text","marks":[{"type":"code_inline"}]},{"text":" reports \"command not found\" after install, the install step did not put the binary on ","type":"text"},{"text":"$PATH","type":"text","marks":[{"type":"code_inline"}]},{"text":". Do not proceed with skill commands until verification succeeds.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to Use This CLI","type":"text"}]},{"type":"paragraph","content":[{"text":"Use this CLI when an agent or power user needs structured access to Digg's rankings, ranking-change history, pipeline events, per-cluster transparency record, or the GitHub feeds. It is the right tool for tracking AI-news cycle movement, building cross-aggregator research over HN+Techmeme+Digg, watching new AI repos the moment they're starred by tracked accounts, or exposing Digg signals into a larger automation. Do NOT use it for vote, comment, or post automation — those mutations are explicitly out of scope.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When Not to Use This CLI","type":"text"}]},{"type":"paragraph","content":[{"text":"Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Unique Capabilities","type":"text"}]},{"type":"paragraph","content":[{"text":"These capabilities aren't available in any other tool for this API.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Topic search and per-post citations","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"search","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Topic search across Digg's full window. Live by default — hits ","type":"text"},{"text":"/api/search/stories","type":"text","marks":[{"type":"code_inline"}]},{"text":", the same server-side search that backs the di.gg/ai Cmd+K modal — with FTS5 fallback to the local store on network error or ","type":"text"},{"text":"--data-source local","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"Returns ranked clusters with engagement metadata (postCount, uniqueAuthors, firstPostAge); the load-bearing recipe for last30days-style research workflows.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli search \"\u003ctopic>\" --since 30d --agent --select clusterUrlId,title,rank,postCount,uniqueAuthors,firstPostAge","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"--since Nh|Nd|Nw|Nm","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — filter to clusters first posted within the window (live mode parses Digg's own ","type":"text"},{"text":"firstPostAge","type":"text","marks":[{"type":"code_inline"}]},{"text":"; local mode reads ","type":"text"},{"text":"digg_clusters.first_post_at","type":"text","marks":[{"type":"code_inline"}]},{"text":").","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"posts","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — X posts attached to one cluster, with author rank, body when rendered, media URLs, repost-context, and minted xUrl for one-click citation.","type":"text"}]},{"type":"paragraph","content":[{"text":"The citations recipe: surface the highest-credibility AI 1000 voices on a story, sortable by rank, type, or time.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli posts \u003cclusterUrlId> --by rank --limit 5 --agent --select author.username,author.rank,post_type,xUrl,body","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Author lookup and roster browse","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"authors get","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Look up any X handle in Digg's full author universe (1000 + off-1000) via ","type":"text"},{"text":"/api/search/users","type":"text","marks":[{"type":"code_inline"}]},{"text":". For off-1000 handles, the response includes ","type":"text"},{"text":"subject_peer_follow_count","type":"text","marks":[{"type":"code_inline"}]},{"text":", the rank-1000 anchor's ","type":"text"},{"text":"peer_follow_count","type":"text","marks":[{"type":"code_inline"}]},{"text":", and a signed ","type":"text"},{"text":"peer_follow_gap","type":"text","marks":[{"type":"code_inline"}]},{"text":" — the gap to the 1000 measured in AI-1000 peer follows (NOT raw X follower count).","type":"text"}]},{"type":"paragraph","content":[{"text":"The credibility lookup: an agent can decide whether to quote a handle by reading one structured record.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli authors get \u003chandle> --agent","type":"text"}]},{"type":"paragraph","content":[{"text":"Trimmed off-1000 example for ","type":"text"},{"text":"mvanhorn","type":"text","marks":[{"type":"code_inline"}]},{"text":":","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"json"},"content":[{"text":"{\n \"username\": \"mvanhorn\",\n \"current_rank\": null,\n \"subject_peer_follow_count\": 19,\n \"nearest_in_1000\": {\"rank\": 1000, \"username\": \"...\", \"peer_follow_count\": 90},\n \"peer_follow_gap\": 71\n}","type":"text"}]},{"type":"paragraph","content":[{"text":"peer_follow_gap","type":"text","marks":[{"type":"code_inline"}]},{"text":" is the gap to rank-1000's ","type":"text"},{"text":"followed_by_count","type":"text","marks":[{"type":"code_inline"}]},{"text":" (peer follows from inside the AI 1000). Do not read it as a raw X follower delta.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"authors list","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Full ranked AI 1000 from ","type":"text"},{"text":"/ai/1000","type":"text","marks":[{"type":"code_inline"}]},{"text":", persisted with rich fields (rank, category, bio, vibeDistribution, GitHub URL).","type":"text"}]},{"type":"paragraph","content":[{"text":"Identify rising voices in a category, find authors who just joined the 1000, see who's falling fast — sortable, filterable, scriptable.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Biggest movers since the last snapshot\ndigg-pp-cli authors list --by rankChange --limit 20 --agent\n\n# Newly listed (first appearance in the 1000)\ndigg-pp-cli authors list --only-new --agent","type":"text"}]},{"type":"paragraph","content":[{"text":"Sort with ","type":"text"},{"text":"--by rank|rankChange|category|followers","type":"text","marks":[{"type":"code_inline"}]},{"text":"; filter with ","type":"text"},{"text":"--category \"\u003cname>\"","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--only-new","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--only-fallers","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Live pipeline observability","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"events","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Tail Digg's ingestion pipeline in real time — see clusters as they're detected, stories fast-climbing the leaderboard with explicit rank deltas, X posts being processed, batch breakdowns.","type":"text"}]},{"type":"paragraph","content":[{"text":"When an agent needs 'tell me when story X just climbed N ranks' or 'what new clusters did Digg detect in the last hour', this is the only way.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli events --since 1h --type fast_climb --json --select clusterId,label,delta,currentRank,previousRank","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"watch","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Poll /ai, diff against last snapshot, alert when any cluster moves N+ ranks.","type":"text"}]},{"type":"paragraph","content":[{"text":"Read-only operational watcher; never writes anything back to Digg.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli watch --alert 'rank.delta>=10'","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"pipeline status","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — One-screen view of /api/trending/status: isFetching, nextFetchAt, storiesToday, clustersToday, last 5 events.","type":"text"}]},{"type":"paragraph","content":[{"text":"Lets ops and power users see when a fresh batch is about to land and what's been ingested in the last hour.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli pipeline status --watch","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Local state that compounds","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"replaced","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Show stories that were knocked out of the rankings since the last sync, with Digg's own published replacement rationale.","type":"text"}]},{"type":"paragraph","content":[{"text":"Best-of-feed shifts faster than people remember. This makes 'what did Digg drop and why' queryable.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli replaced --since 24h --json","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"crossref","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Show this cluster's Hacker News and Techmeme mirrors when Digg has detected the story is being discussed there.","type":"text"}]},{"type":"paragraph","content":[{"text":"Removes the manual 'is HN talking about this too' step from any cross-aggregator research workflow.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli crossref iq7usf9e","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"authors top","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Top accounts Digg tracks, ranked by Digg's influence score, story count, or reach.","type":"text"}]},{"type":"paragraph","content":[{"text":"Investors and AI scouts care which accounts move the news cycle. Now queryable, sortable, scriptable.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli authors top --by influence --limit 50 --json","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"history","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Full trajectory of one cluster's currentRank, peakRank, and delta over local snapshot history.","type":"text"}]},{"type":"paragraph","content":[{"text":"'Entered at #18, peaked at #4 over 6h, dropped to #22 by 24h' is impossible to learn from the live site.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli history iq7usf9e --json","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"author","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Every cluster a given X account contributed to, with post type (original, retweet, quote, reply).","type":"text"}]},{"type":"paragraph","content":[{"text":"'Show me every story this account surfaced this week' is the investor-scout query.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli author Scobleizer --since 7d --json","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Transparency","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"evidence","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Print the full ranking transparency record for one cluster — scoreComponents, evidence array, numeratorLabel, percentAboveAverage.","type":"text"}]},{"type":"paragraph","content":[{"text":"When a user asks 'why is THIS the top story', the answer is structured data; agents can compose with it.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli evidence iq7usf9e --json","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sentiment","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — Read per-time-window positivity ratios (pos6h, pos12h, pos24h, posLast) for a cluster.","type":"text"}]},{"type":"paragraph","content":[{"text":"Tells an agent whether the conversation around a story is still net-positive or has soured; useful before quoting a story.","type":"text","marks":[{"type":"em"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli sentiment iq7usf9e --window 6h --json","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"HTTP Transport","type":"text"}]},{"type":"paragraph","content":[{"text":"This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Command Reference","type":"text"}]},{"type":"paragraph","content":[{"text":"feed","type":"text","marks":[{"type":"strong"}]},{"text":" — Top-level AI story feed (HTML page; CLI parses the embedded RSC stream)","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli feed raw","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Fetch the raw /ai HTML page. The CLI's sync command parses this; most users should run ","type":"text"},{"text":"sync","type":"text","marks":[{"type":"code_inline"}]},{"text":" then ","type":"text"},{"text":"top","type":"text","marks":[{"type":"code_inline"}]},{"text":" instead of...","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli feed story_raw","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Fetch the raw /ai/{clusterUrlId} story detail page (HTML). The CLI's ","type":"text"},{"text":"story","type":"text","marks":[{"type":"code_inline"}]},{"text":" command parses this; users should not...","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"github","type":"text","marks":[{"type":"strong"}]},{"text":" — GitHub feeds Digg surfaces alongside the X-account leaderboard","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli github stars","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Top AI repos ranked by starring activity from Digg-tracked accounts. Returns repo_full_name, language, stargazers_count, recent starrers, breakout/novel/ai_related scores, and the model's one-sentence classification. Flags: ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--min-starrers N","type":"text","marks":[{"type":"code_inline"}]},{"text":" (keep only repos with >= N distinct starrers — smart-money convergence; applied BEFORE --limit).","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli github new","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Recently first-seen repos with the Digg-tracked creator/starrer who first put them on Digg's radar (event_id, event_created_at, repo_full_name, creator). Flag: ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli github activity","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Top GitHub contributor leaderboard: per-author rank, contribution count, and distinct repos count over Digg's tracking window. Flag: ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli github recent","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Live activity feed: per-event entries with the GitHub URL and the user who acted. Flag: ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"rankings","type":"text","marks":[{"type":"strong"}]},{"text":" — Sub-views of the /ai/x/rankings/companies snapshot","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli rankings emerging","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Curated list of small AI companies (the \"EMERGING STARTUPS — CURATED THIS SNAPSHOT\" section). ~10 rows per snapshot. Each row carries ","type":"text"},{"text":"isEmergingStartup","type":"text","marks":[{"type":"code_inline"}]},{"text":" (AI-judge verdict) and ","type":"text"},{"text":"emergingReasoning","type":"text","marks":[{"type":"code_inline"}]},{"text":" (curator text). Flag: ","type":"text"},{"text":"--max-skip-ratio","type":"text","marks":[{"type":"code_inline"}]},{"text":" (schema-drift tolerance; default 0.10).","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli rankings movers","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Companies whose follower count shifted most since the last snapshot. Flags: ","type":"text"},{"text":"--direction up|down|both","type":"text","marks":[{"type":"code_inline"}]},{"text":" (default both; direction stamped per row), ","type":"text"},{"text":"--max-skip-ratio","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli rankings list","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Full company ranking (the \"Companies followed by the AI 2K\" section). Server-paginated; returns the initial-HTML slice. Flags: ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--max-skip-ratio","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"search","type":"text","marks":[{"type":"strong"}]},{"text":" — Topic search across the full Digg window","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli search \"\u003cquery>\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Live by default (","type":"text"},{"text":"/api/search/stories","type":"text","marks":[{"type":"code_inline"}]},{"text":"); FTS5 fallback to the local store. Flags: ","type":"text"},{"text":"--since Nh|Nd|Nw|Nm","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--data-source live|local|auto","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"authors","type":"text","marks":[{"type":"strong"}]},{"text":" — Inspect Digg's tracked AI-news accounts (the /ai/1000 roster)","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli authors get \u003chandle>","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Look up any X handle (1000 + off-1000); off-1000 records include ","type":"text"},{"text":"subject_peer_follow_count","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"nearest_in_1000","type":"text","marks":[{"type":"code_inline"}]},{"text":" anchor, and ","type":"text"},{"text":"peer_follow_gap","type":"text","marks":[{"type":"code_inline"}]},{"text":". Flag: ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":" (fuzzy fallback).","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli authors list","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Full ranked roster from ","type":"text"},{"text":"/ai/1000","type":"text","marks":[{"type":"code_inline"}]},{"text":", persisted with rich fields. Flags: ","type":"text"},{"text":"--by rank|rankChange|category|followers","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--category","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--only-new","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--only-fallers","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli authors top","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Top contributors by influence, post count, or reach. Flags: ","type":"text"},{"text":"--by","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"posts","type":"text","marks":[{"type":"strong"}]},{"text":" — X posts attached to one cluster","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli posts \u003cclusterUrlId>","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Origins, replies, quotes, retweets with author rank, body when rendered, media URLs, minted xUrl. Flags: ","type":"text"},{"text":"--by rank|type|time","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--type tweet|reply|quote|retweet","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--limit","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--no-cache","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"story","type":"text","marks":[{"type":"strong"}]},{"text":" — Full cluster detail. Envelope now includes ","type":"text"},{"text":"posts","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"postsMeta","type":"text","marks":[{"type":"code_inline"}]},{"text":" fields populated by the U5 RSC parser.","type":"text"}]},{"type":"paragraph","content":[{"text":"trending","type":"text","marks":[{"type":"strong"}]},{"text":" — Public ingestion-pipeline status and event stream","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"digg-pp-cli trending","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Read the current pipeline status: storiesToday, clustersToday, isFetching, nextFetchAt, and the recent event stream...","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Finding the right command","type":"text"}]},{"type":"paragraph","content":[{"text":"When you know what you want to do but not which command does it, ask the CLI directly:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli which \"\u003ccapability in your own words>\"","type":"text"}]},{"type":"paragraph","content":[{"text":"which","type":"text","marks":[{"type":"code_inline"}]},{"text":" resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code ","type":"text"},{"text":"0","type":"text","marks":[{"type":"code_inline"}]},{"text":" means at least one match; exit code ","type":"text"},{"text":"2","type":"text","marks":[{"type":"code_inline"}]},{"text":" means no confident match — fall back to ","type":"text"},{"text":"--help","type":"text","marks":[{"type":"code_inline"}]},{"text":" or use a narrower query.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Recipes","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Topic search for research workflows","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli search \"\u003ctopic>\" --since 30d --agent --select clusterUrlId,title,rank,postCount,uniqueAuthors,firstPostAge","type":"text"}]},{"type":"paragraph","content":[{"text":"Server-side search across Digg's full window via ","type":"text"},{"text":"/api/search/stories","type":"text","marks":[{"type":"code_inline"}]},{"text":"; returns ranked clusters with engagement metadata (postCount, uniqueAuthors, firstPostAge). The load-bearing recipe for last30days-style consumers — pair with ","type":"text"},{"text":"posts","type":"text","marks":[{"type":"code_inline"}]},{"text":" for citations.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Author credibility lookup (in or out of the 1000)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli authors get \u003chandle> --agent","type":"text"}]},{"type":"paragraph","content":[{"text":"Resolves any X handle to a structured record. For an off-1000 handle like ","type":"text"},{"text":"mvanhorn","type":"text","marks":[{"type":"code_inline"}]},{"text":", the response includes ","type":"text"},{"text":"subject_peer_follow_count: 19","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"nearest_in_1000.peer_follow_count: 90","type":"text","marks":[{"type":"code_inline"}]},{"text":", and ","type":"text"},{"text":"peer_follow_gap: 71","type":"text","marks":[{"type":"code_inline"}]},{"text":". ","type":"text"},{"text":"peer_follow_gap","type":"text","marks":[{"type":"code_inline"}]},{"text":" is the distance to rank-1000 measured in AI-1000 peer follows (the metric Digg actually ranks by) — NOT a raw X follower-count delta.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Roster browse: biggest movers and newly listed","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Biggest movers since the last snapshot\ndigg-pp-cli authors list --by rankChange --limit 20 --agent\n\n# Newly listed (first appearance in the 1000)\ndigg-pp-cli authors list --only-new --agent","type":"text"}]},{"type":"paragraph","content":[{"text":"Identify rising voices in a category, find authors who just joined the 1000. Sort with ","type":"text"},{"text":"--by rank|rankChange|category|followers","type":"text","marks":[{"type":"code_inline"}]},{"text":"; filter with ","type":"text"},{"text":"--category","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--only-new","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--only-fallers","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Top comments per article (citations)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli posts \u003cclusterUrlId> --by rank --limit 5 --agent --select author.username,author.rank,post_type,xUrl,body","type":"text"}]},{"type":"paragraph","content":[{"text":"Surfaces the highest-credibility AI 1000 voices on a story; minted X URLs make citations one-click. Combine with ","type":"text"},{"text":"search","type":"text","marks":[{"type":"code_inline"}]},{"text":" to go from topic → cluster → quotable posts in two commands.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"What climbed >=10 ranks in the last hour","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli events --since 1h --type fast_climb --json --select clusterId,label,delta,currentRank,previousRank","type":"text"}]},{"type":"paragraph","content":[{"text":"Reads the public events stream, filters to fast-climb events only, and narrows the JSON to the five fields an agent actually needs.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Why is a story the top story","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli evidence 65idu2x5 --json","type":"text"}]},{"type":"paragraph","content":[{"text":"Print the scoreComponents and evidence array for one cluster. Get a clusterUrlId from ","type":"text"},{"text":"digg-pp-cli top --json --select clusterUrlId","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Show every cluster a given X account contributed to this week","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli author Scobleizer --since 7d --json --select label,clusterUrlId,activityAt","type":"text"}]},{"type":"paragraph","content":[{"text":"Queries the local store for clusters where the named author was a contributor; output is narrowed for agent consumption.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Cross-reference a story across HN and Techmeme","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli crossref 65idu2x5","type":"text"}]},{"type":"paragraph","content":[{"text":"Uses Digg's own hackerNews/techmeme reference fields so you don't have to search those sites manually. Pass any clusterUrlId from ","type":"text"},{"text":"top --json --select clusterUrlId","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Tail the pipeline live","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli pipeline status --watch","type":"text"}]},{"type":"paragraph","content":[{"text":"One-screen dashboard of isFetching, nextFetchAt, storiesToday, clustersToday, and the last few pipeline events.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Auth Setup","type":"text"}]},{"type":"paragraph","content":[{"text":"No authentication required.","type":"text"}]},{"type":"paragraph","content":[{"text":"Run ","type":"text"},{"text":"digg-pp-cli doctor","type":"text","marks":[{"type":"code_inline"}]},{"text":" to verify setup.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Agent Mode","type":"text"}]},{"type":"paragraph","content":[{"text":"Add ","type":"text"},{"text":"--agent","type":"text","marks":[{"type":"code_inline"}]},{"text":" to any command. Expands to: ","type":"text"},{"text":"--json --compact --no-input --no-color --yes","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Pipeable","type":"text","marks":[{"type":"strong"}]},{"text":" — JSON on stdout, errors on stderr","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Filterable","type":"text","marks":[{"type":"strong"}]},{"text":" — ","type":"text"},{"text":"--select","type":"text","marks":[{"type":"code_inline"}]},{"text":" keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli feed raw --agent --select id,name,status","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Previewable","type":"text","marks":[{"type":"strong"}]},{"text":" — ","type":"text"},{"text":"--dry-run","type":"text","marks":[{"type":"code_inline"}]},{"text":" shows the request without sending","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Offline-friendly","type":"text","marks":[{"type":"strong"}]},{"text":" — sync/search commands can use the local SQLite store when available","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Non-interactive","type":"text","marks":[{"type":"strong"}]},{"text":" — never prompts, every input is a flag","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Read-only","type":"text","marks":[{"type":"strong"}]},{"text":" — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Response envelope","type":"text"}]},{"type":"paragraph","content":[{"text":"Commands that read from the local store or the API wrap output in a provenance envelope:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"json"},"content":[{"text":"{\n \"meta\": {\"source\": \"live\" | \"local\", \"synced_at\": \"...\", \"reason\": \"...\"},\n \"results\": \u003cdata>\n}","type":"text"}]},{"type":"paragraph","content":[{"text":"Parse ","type":"text"},{"text":".results","type":"text","marks":[{"type":"code_inline"}]},{"text":" for data and ","type":"text"},{"text":".meta.source","type":"text","marks":[{"type":"code_inline"}]},{"text":" to know whether it's live or local. A human-readable ","type":"text"},{"text":"N results (live)","type":"text","marks":[{"type":"code_inline"}]},{"text":" summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Agent Feedback","type":"text"}]},{"type":"paragraph","content":[{"text":"When you (or the agent) notice something off about this CLI, record it:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"digg-pp-cli feedback \"the --since flag is inclusive but docs say exclusive\"\ndigg-pp-cli feedback --stdin \u003c notes.txt\ndigg-pp-cli feedback list --json --limit 10","type":"text"}]},{"type":"paragraph","content":[{"text":"Entries are stored locally at ","type":"text"},{"text":"~/.digg-pp-cli/feedback.jsonl","type":"text","marks":[{"type":"code_inline"}]},{"text":". They are never POSTed unless ","type":"text"},{"text":"DIGG_FEEDBACK_ENDPOINT","type":"text","marks":[{"type":"code_inline"}]},{"text":" is set AND either ","type":"text"},{"text":"--send","type":"text","marks":[{"type":"code_inline"}]},{"text":" is passed or ","type":"text"},{"text":"DIGG_FEEDBACK_AUTO_SEND=true","type":"text","marks":[{"type":"code_inline"}]},{"text":". Default behavior is local-only.","type":"text"}]},{"type":"paragraph","content":[{"text":"Write what ","type":"text"},{"text":"surprised","type":"text","marks":[{"type":"em"}]},{"text":" you, not a bug report. Short, specific, one line: that is the part that compounds.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Output Delivery","type":"text"}]},{"type":"paragraph","content":[{"text":"Every command accepts ","type":"text"},{"text":"--deliver \u003csink>","type":"text","marks":[{"type":"code_inline"}]},{"text":". The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Sink","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Effect","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"stdout","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Default; write to stdout only","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"file:\u003cpath>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Atomically write output to ","type":"text"},{"text":"\u003cpath>","type":"text","marks":[{"type":"code_inline"}]},{"text":" (tmp + rename)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"webhook:\u003curl>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"POST the output body to the URL (","type":"text"},{"text":"application/json","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"application/x-ndjson","type":"text","marks":[{"type":"code_inline"}]},{"text":" when ","type":"text"},{"text":"--compact","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Named Profiles","type":"text"}]},{"type":"paragraph","content":[{"text":"A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's \"Beacon\" pattern.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"digg-pp-cli profile save briefing --json\ndigg-pp-cli --profile briefing feed raw\ndigg-pp-cli profile list --json\ndigg-pp-cli profile show briefing\ndigg-pp-cli profile delete briefing --yes","type":"text"}]},{"type":"paragraph","content":[{"text":"Explicit flags always win over profile values; profile values win over defaults. ","type":"text"},{"text":"agent-context","type":"text","marks":[{"type":"code_inline"}]},{"text":" lists all available profiles under ","type":"text"},{"text":"available_profiles","type":"text","marks":[{"type":"code_inline"}]},{"text":" so introspecting agents discover them at runtime.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Exit Codes","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Code","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Meaning","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Success","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Usage error (wrong arguments)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"3","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Resource not found","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"5","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"API error (upstream issue)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"7","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Rate limited (wait and retry)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"10","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Config error","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Argument Parsing","type":"text"}]},{"type":"paragraph","content":[{"text":"Parse ","type":"text"},{"text":"$ARGUMENTS","type":"text","marks":[{"type":"code_inline"}]},{"text":":","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Empty, ","type":"text","marks":[{"type":"strong"}]},{"text":"help","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":", or ","type":"text","marks":[{"type":"strong"}]},{"text":"--help","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" → show ","type":"text"},{"text":"digg-pp-cli --help","type":"text","marks":[{"type":"code_inline"}]},{"text":" output","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Starts with ","type":"text","marks":[{"type":"strong"}]},{"text":"install","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" → ends with ","type":"text"},{"text":"mcp","type":"text","marks":[{"type":"code_inline"}]},{"text":" → MCP installation; otherwise → see Prerequisites above","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Anything else","type":"text","marks":[{"type":"strong"}]},{"text":" → Direct Use (execute as CLI command with ","type":"text"},{"text":"--agent","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"MCP Server Installation","type":"text"}]},{"type":"paragraph","content":[{"text":"Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"claude mcp add digg-pp-mcp -- digg-pp-mcp","type":"text"}]},{"type":"paragraph","content":[{"text":"Verify: ","type":"text"},{"text":"claude mcp list","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Direct Use","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check if installed: ","type":"text"},{"text":"which digg-pp-cli","type":"text","marks":[{"type":"code_inline"}]},{"text":" If not found, offer to install (see Prerequisites at the top of this skill).","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Match the user query to the best command from the Unique Capabilities and Command Reference above.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Execute with the ","type":"text"},{"text":"--agent","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"digg-pp-cli \u003ccommand> [subcommand] [args] --agent","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If ambiguous, drill into subcommand help: ","type":"text"},{"text":"digg-pp-cli \u003ccommand> --help","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"pp-digg","author":"@skillopedia","source":{"stars":1369,"repo_name":"printing-press-library","origin_url":"https://github.com/mvanhorn/printing-press-library/blob/HEAD/library/media-and-entertainment/digg/SKILL.md","repo_owner":"mvanhorn","body_sha256":"e8e269b5d01fb54505dc2b84bacf9d4b0a968a4dbe929701e309fc51e8103622","cluster_key":"999b0fcf59dc0e40c225edf6d0b5a108f0df020b3a4378f37884b3c409aebbf5","clean_bundle":{"format":"clean-skill-bundle-v1","source":"mvanhorn/printing-press-library/library/media-and-entertainment/digg/SKILL.md","attachments":[{"id":"c881a987-f0a7-5d34-80da-570a3d090653","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c881a987-f0a7-5d34-80da-570a3d090653/attachment.yml","path":".golangci.yml","size":147,"sha256":"41e91d2f2ed2b361555240c1ce682a57a3f3a650d7349ec5f8d10ac43c936b31","contentType":"application/yaml; charset=utf-8"},{"id":"ad7f8e3f-57a3-5d2b-9d18-54db121ea7e8","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ad7f8e3f-57a3-5d2b-9d18-54db121ea7e8/attachment.yaml","path":".goreleaser.yaml","size":1339,"sha256":"791007949a4eb0a6a5dc9df58fb03859db95c0a21e9a6e576f3c50d0dd0d76cc","contentType":"application/yaml; charset=utf-8"},{"id":"b07a8bdf-af6c-5618-9bd6-decbec75afe0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b07a8bdf-af6c-5618-9bd6-decbec75afe0/attachment.json","path":".manuscripts/20260508-234057/browser-browser-sniff-gate.json","size":275,"sha256":"e4ee0f2210177c6a0c50f6de6b38b450c5eb9df0d0c0011e6ecab8829e5b4bf6","contentType":"application/json; charset=utf-8"},{"id":"24238c7a-9631-5c13-adbf-2ad799dbf416","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/24238c7a-9631-5c13-adbf-2ad799dbf416/attachment.md","path":".manuscripts/20260508-234057/discovery/browser-sniff-report.md","size":7070,"sha256":"eddf4f5e8cfc06dddb199ef6cbb5348d246476ebf747c02f87188973d1087090","contentType":"text/markdown; charset=utf-8"},{"id":"93d3db41-bc57-59c9-ae65-d26815701131","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/93d3db41-bc57-59c9-ae65-d26815701131/attachment.md","path":".manuscripts/20260508-234057/proofs/2026-05-08-234616-fix-digg-pp-cli-acceptance.md","size":4295,"sha256":"2d97d6f080d14a245e56a13f1814d243eebefa50f5d0b052b22fab68fdab344f","contentType":"text/markdown; charset=utf-8"},{"id":"9832bab5-e287-5df5-9c40-75f8ddd20a71","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9832bab5-e287-5df5-9c40-75f8ddd20a71/attachment.md","path":".manuscripts/20260508-234057/proofs/2026-05-08-234616-fix-digg-pp-cli-build-log.md","size":4024,"sha256":"98c32de62a21238d8897536ad5ade57bfec84bf7b480f8fde878f3e426c1be64","contentType":"text/markdown; charset=utf-8"},{"id":"fa17eaa0-0cfc-58e2-b19e-6725fd4c06c0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/fa17eaa0-0cfc-58e2-b19e-6725fd4c06c0/attachment.md","path":".manuscripts/20260508-234057/proofs/2026-05-08-234616-fix-digg-pp-cli-shipcheck.md","size":4127,"sha256":"b71e99bdac1547c33321b059395ef544dc8a10beffd8734535594c598ca8643f","contentType":"text/markdown; charset=utf-8"},{"id":"f67ba1f3-42ed-543c-a9d6-e34f21791bf6","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f67ba1f3-42ed-543c-a9d6-e34f21791bf6/attachment.json","path":".manuscripts/20260508-234057/proofs/phase5-acceptance.json","size":1013,"sha256":"d170c5b03b72fd8095e73182e20dc57872d14f39afa263c4ac79d993be891458","contentType":"application/json; charset=utf-8"},{"id":"c93dbbe3-2f6b-5348-8a59-c2409a2fd16f","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c93dbbe3-2f6b-5348-8a59-c2409a2fd16f/attachment.json","path":".manuscripts/20260508-234057/research.json","size":19115,"sha256":"5bad98db39ed98492d7697ce243075a2c99ef4cdcbf6a12ea3cde582f47d2a50","contentType":"application/json; charset=utf-8"},{"id":"7ae37628-bb41-5b81-b86b-90733b45e554","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7ae37628-bb41-5b81-b86b-90733b45e554/attachment.md","path":".manuscripts/20260508-234057/research/2026-05-08-234616-feat-digg-pp-cli-absorb-manifest.md","size":10076,"sha256":"7a3c9d776a6a85284f06d134a363bdfd1632667ce78fefee198cf3aed392d519","contentType":"text/markdown; charset=utf-8"},{"id":"99e78ff6-0890-5419-acfd-10f4600a3ca9","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/99e78ff6-0890-5419-acfd-10f4600a3ca9/attachment.md","path":".manuscripts/20260508-234057/research/2026-05-08-234616-feat-digg-pp-cli-brief.md","size":7694,"sha256":"81d7b298cd552758c65af7c818612a4aaeb25b6114d2983f753ebc2dc39e8ecd","contentType":"text/markdown; charset=utf-8"},{"id":"12b83713-dbc4-5a24-b6dc-974f7b04f728","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/12b83713-dbc4-5a24-b6dc-974f7b04f728/attachment.yaml","path":".manuscripts/20260508-234057/research/digg-spec.yaml","size":2272,"sha256":"4605cfe7f157352a4d158f94d022baf20bea43963ad32c9e629c4301b1c4a7d0","contentType":"application/yaml; charset=utf-8"},{"id":"408d394d-5c21-5b0e-8f97-7712e9fc5edd","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/408d394d-5c21-5b0e-8f97-7712e9fc5edd/attachment.json","path":".printing-press-patches.json","size":8827,"sha256":"a094c6e2ff2a9dbb6b67d826fe015fa2399ae4d00e16d20956ccc09541c4b355","contentType":"application/json; charset=utf-8"},{"id":"e7a0cad0-fa62-5df6-a33e-9e4e4a7b4f08","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/e7a0cad0-fa62-5df6-a33e-9e4e4a7b4f08/attachment.json","path":".printing-press-tools-polish.json","size":239,"sha256":"11ebf7edae3c9d95b1e3653165254b5f7bc966ade6a71ca2876ca1ecf542b2f1","contentType":"application/json; charset=utf-8"},{"id":"29dd424f-1540-5868-888d-a65f94886420","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/29dd424f-1540-5868-888d-a65f94886420/attachment.json","path":".printing-press.json","size":4078,"sha256":"1c1fa98e62a83ee8d22a56e3965573fa89172812482ffad98238a64fbf38424d","contentType":"application/json; charset=utf-8"},{"id":"ea4cf5a9-e4c4-5298-931b-68ba045b2e43","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ea4cf5a9-e4c4-5298-931b-68ba045b2e43/attachment.md","path":"AGENTS.md","size":3004,"sha256":"291400219292b1f17fbb6b236c8cd3e724fcd7c34189d12fb44d945aca437d41","contentType":"text/markdown; charset=utf-8"},{"id":"fc79fe14-7470-5b87-9ce2-cdb559114f72","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/fc79fe14-7470-5b87-9ce2-cdb559114f72/attachment","path":"Makefile","size":333,"sha256":"008805e2a9dc2c6dacdd1e451d5ff2d394ecbe40767ece4cc07bf7792dadcc2d","contentType":"text/plain; charset=utf-8"},{"id":"c0dfecac-ed1f-5ece-b541-d018e891121b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c0dfecac-ed1f-5ece-b541-d018e891121b/attachment","path":"NOTICE","size":458,"sha256":"ddd5d4386d9a0e78a9e2f4b258159ddc5448dee86f78828eac59ec2d12d99100","contentType":"text/plain; charset=utf-8"},{"id":"9a4141fc-7714-51a6-8db6-eba77fb519dd","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9a4141fc-7714-51a6-8db6-eba77fb519dd/attachment.md","path":"README.md","size":18550,"sha256":"86099569c8125337f6da0f9e268401fb111f03ca570168f966cdff94e0089e8d","contentType":"text/markdown; charset=utf-8"},{"id":"4ba499c0-f32e-57b6-9ea0-0ac0b8549e86","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/4ba499c0-f32e-57b6-9ea0-0ac0b8549e86/attachment.go","path":"cmd/digg-pp-cli/main.go","size":451,"sha256":"0f9268bfba993bffcd151a98072ca2ffc96e275c1908f28d32f013824036ab58","contentType":"text/plain; charset=utf-8"},{"id":"d0775f67-7731-5887-8d67-15f8bf8009fd","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d0775f67-7731-5887-8d67-15f8bf8009fd/attachment.go","path":"cmd/digg-pp-mcp/main.go","size":627,"sha256":"30e9221e7ce4ac50d8a3d0b985bcf8a8da0cca87e3046d231d1f9cb13d49d25a","contentType":"text/plain; charset=utf-8"},{"id":"2d32026b-8bf2-55cb-9681-421479d874f7","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2d32026b-8bf2-55cb-9681-421479d874f7/attachment.json","path":"dogfood-results.json","size":1926,"sha256":"0f59a3546155e0957b033cc554e34d837ce60d97b07f93094bb2ca952e8202ab","contentType":"application/json; charset=utf-8"},{"id":"6ff92746-d431-51dd-87c8-3a343b15c338","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/6ff92746-d431-51dd-87c8-3a343b15c338/attachment.mod","path":"go.mod","size":1733,"sha256":"a9c3d53592be6ee844e91d29da1bbb5fc43bcf291ee2fb9653e243f3e01530fe","contentType":"application/xml-dtd"},{"id":"a58fe10a-552a-5205-aab3-4b4238b7d66e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a58fe10a-552a-5205-aab3-4b4238b7d66e/attachment.sum","path":"go.sum","size":10096,"sha256":"53b59fd0499fc8f6f6198598a5da581ec0c9e23ed1f24faa5232f03e0a8f7ba6","contentType":"text/plain; charset=utf-8"},{"id":"bb7aed9e-3b25-51eb-9f22-3dd3a273abad","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bb7aed9e-3b25-51eb-9f22-3dd3a273abad/attachment.go","path":"internal/cache/cache.go","size":1730,"sha256":"7d2b9ca87f7b085c1e3757d9f06c766019b09aefaa6e4b8d95391ef4b61a48ab","contentType":"text/plain; charset=utf-8"},{"id":"081fa0ba-9a8e-5919-9085-173a9b37f4db","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/081fa0ba-9a8e-5919-9085-173a9b37f4db/attachment.go","path":"internal/cli/agent_context.go","size":9007,"sha256":"a474bb61eb07aceffff94449aef2970b19d5376e74009f179d8b134678339c31","contentType":"text/plain; charset=utf-8"},{"id":"ba0e2802-5a05-549a-ba68-b55bccac1ea5","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ba0e2802-5a05-549a-ba68-b55bccac1ea5/attachment.go","path":"internal/cli/api_discovery.go","size":3670,"sha256":"97847611de0468bb2000f0280261807ceb691a7eac26961731f8dfb26559c467","contentType":"text/plain; charset=utf-8"},{"id":"44fb6951-8ac1-520f-b186-b98907385ebd","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/44fb6951-8ac1-520f-b186-b98907385ebd/attachment.go","path":"internal/cli/authors_get_test.go","size":29892,"sha256":"f28d635b2d13a381c0fe95aef8e990e39f4b46da8ba121f3fb293db0ae518f55","contentType":"text/plain; charset=utf-8"},{"id":"7b2d34a4-9140-5ba4-bed0-638317c7e901","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7b2d34a4-9140-5ba4-bed0-638317c7e901/attachment.go","path":"internal/cli/authors_list_test.go","size":8375,"sha256":"e5ee8299e28a39ce04b8409fe223ecbb0b8fb7d8ca7d54c702b126fb71b16610","contentType":"text/plain; charset=utf-8"},{"id":"34155962-ea7d-5def-8295-2552571c69da","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/34155962-ea7d-5def-8295-2552571c69da/attachment.go","path":"internal/cli/channel_workflow.go","size":5467,"sha256":"0f618eda09a1fd6825d463a41d4892e63b80400966be117cdd0a06f1d5b3837c","contentType":"text/plain; charset=utf-8"},{"id":"8d5ab64b-0b6f-5a3f-9af5-7a0952e4251d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/8d5ab64b-0b6f-5a3f-9af5-7a0952e4251d/attachment.go","path":"internal/cli/data_source.go","size":10068,"sha256":"207624a0dfbcb6491bb93edd4f6c85fd3f4024de59d7dddad957f229aac07882","contentType":"text/plain; charset=utf-8"},{"id":"ae884290-6819-5f16-aa9b-89b86744bd81","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ae884290-6819-5f16-aa9b-89b86744bd81/attachment.go","path":"internal/cli/deliver.go","size":3559,"sha256":"b1ace29cdb68324a6df924cf006b3b00c4a36b0e8328828e5854c26fd2c368c8","contentType":"text/plain; charset=utf-8"},{"id":"2209f331-b03b-5cdb-b513-4d4d776380ac","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2209f331-b03b-5cdb-b513-4d4d776380ac/attachment.go","path":"internal/cli/digg_commands.go","size":109973,"sha256":"489cf1053d2128576c2082a9bc13655ff52d1eacfd3093a1ca0e6370bbc539db","contentType":"text/plain; charset=utf-8"},{"id":"ee3b1496-c482-5c17-9b68-acf5cd69bf66","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ee3b1496-c482-5c17-9b68-acf5cd69bf66/attachment.go","path":"internal/cli/digg_commands_test.go","size":14923,"sha256":"2668e53f7d4efad40d4f8155f720c1fcb01c811d4fd66be220d74067b86176bf","contentType":"text/plain; charset=utf-8"},{"id":"ecfd6068-c0dc-55f4-a503-675fd72f1f8e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ecfd6068-c0dc-55f4-a503-675fd72f1f8e/attachment.go","path":"internal/cli/digg_sync.go","size":8740,"sha256":"f1fe3b8bf4e4ee03e9fb32d2fad9f8843dbb4573f6c2052f97bba50624c6c253","contentType":"text/plain; charset=utf-8"},{"id":"b55b8d36-6013-5a5f-afa8-92e2bd18b411","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b55b8d36-6013-5a5f-afa8-92e2bd18b411/attachment.go","path":"internal/cli/doctor.go","size":15965,"sha256":"332f35b354b4f075ff160c9c0e3401260a10f33564ce4debd2bd903c69fdf070","contentType":"text/plain; charset=utf-8"},{"id":"fd2617b8-bc7b-5d1e-b13a-c3727b9d53d9","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/fd2617b8-bc7b-5d1e-b13a-c3727b9d53d9/attachment.go","path":"internal/cli/feed.go","size":515,"sha256":"968175f62fbb925f457523107f75521662feb54508a2220463accc28d13866dd","contentType":"text/plain; charset=utf-8"},{"id":"cdd172ec-6ad6-58d4-8cd4-df481e9aef4d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/cdd172ec-6ad6-58d4-8cd4-df481e9aef4d/attachment.go","path":"internal/cli/feed_raw.go","size":2419,"sha256":"288413dc904e4b9662149aa3d8c6b81952b204fe6ff3449b413fae7321f60833","contentType":"text/plain; charset=utf-8"},{"id":"41148de6-4e0d-57c9-b8dc-f97d1b3ea835","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/41148de6-4e0d-57c9-b8dc-f97d1b3ea835/attachment.go","path":"internal/cli/feed_story_raw.go","size":2639,"sha256":"9b987f87a943a9156cf8ee59fabb4ffaa3face7560253c199495bdfb856d303e","contentType":"text/plain; charset=utf-8"},{"id":"3c91f29a-f2e4-577c-b9f0-8546b82ccadb","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/3c91f29a-f2e4-577c-b9f0-8546b82ccadb/attachment.go","path":"internal/cli/feedback.go","size":6576,"sha256":"4b83ceba520404a851cab23079e3f07efeab17ca39b47edc730412bf68015f8b","contentType":"text/plain; charset=utf-8"},{"id":"f806c6e2-d06f-5bb7-8c49-32cb298f8583","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f806c6e2-d06f-5bb7-8c49-32cb298f8583/attachment.go","path":"internal/cli/github.go","size":10558,"sha256":"36fc7f63215903b5ab7b472ec924cabae40850ba92ba34522813674c2771f6ff","contentType":"text/plain; charset=utf-8"},{"id":"39e2d5e3-fdde-54d3-a43f-96a62b72fac2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/39e2d5e3-fdde-54d3-a43f-96a62b72fac2/attachment.go","path":"internal/cli/github_test.go","size":5051,"sha256":"c1e9cce43e175208cdf9a82ccc2764d3770aae928b66e39968ad79895447844d","contentType":"text/plain; charset=utf-8"},{"id":"c917dbaf-6129-51ee-80b6-d22749cc8956","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c917dbaf-6129-51ee-80b6-d22749cc8956/attachment.go","path":"internal/cli/helpers.go","size":34124,"sha256":"4523d75a4b6147f131d47110522b82b2d87ab2c876a5e1e09b6d0af42cac2504","contentType":"text/plain; charset=utf-8"},{"id":"8a853560-3956-57b6-9c33-7c687a9e9e29","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/8a853560-3956-57b6-9c33-7c687a9e9e29/attachment.go","path":"internal/cli/import.go","size":2958,"sha256":"3e66e235d8ae1f8d602841ff8733cbf36b3e2e9073f33ed9895f0e279556270b","contentType":"text/plain; charset=utf-8"},{"id":"82d758ad-789d-5482-b490-55a38d38488a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/82d758ad-789d-5482-b490-55a38d38488a/attachment.go","path":"internal/cli/posts_test.go","size":12822,"sha256":"87da6ea164bd1cc53f01ca5cd00babb02b351e27f6fce45f6dc44b3e39c839af","contentType":"text/plain; charset=utf-8"},{"id":"6a52d8a0-70bb-58f7-b6bf-88fce2a03207","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/6a52d8a0-70bb-58f7-b6bf-88fce2a03207/attachment.go","path":"internal/cli/profile.go","size":10274,"sha256":"ce269918b85f2837b95c9e1513510042c7efba2e8fbbe2cfaee8ca7d90a3c1f4","contentType":"text/plain; charset=utf-8"},{"id":"0548d238-25d7-5129-bd1a-8fe01d396547","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0548d238-25d7-5129-bd1a-8fe01d396547/attachment.go","path":"internal/cli/promoted_trending.go","size":2982,"sha256":"2386eeb6d27e81e7eeb743699944f2b1cebc46849f886e7f7e85dfbd1e6c100b","contentType":"text/plain; charset=utf-8"},{"id":"9830379e-236e-5be4-a68d-bc9050447798","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9830379e-236e-5be4-a68d-bc9050447798/attachment.go","path":"internal/cli/rankings.go","size":12675,"sha256":"ff2644bef9e0f00dae83952febbb89286a41d19336aae900619d125df316eb30","contentType":"text/plain; charset=utf-8"},{"id":"cff62d50-d8f0-586e-979d-32c43745bcb0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/cff62d50-d8f0-586e-979d-32c43745bcb0/attachment.go","path":"internal/cli/rankings_test.go","size":13576,"sha256":"7c002d5dc86284d4c36dbc83096d30104d087ad3d49a0ccd036619d2a16bdf3a","contentType":"text/plain; charset=utf-8"},{"id":"bbd2c329-5f42-5575-ac0d-e76490364577","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bbd2c329-5f42-5575-ac0d-e76490364577/attachment.go","path":"internal/cli/root.go","size":10958,"sha256":"3c04478e02709c913524bdfa2ac7515f3db7ff1be768e7c4059142be8f201188","contentType":"text/plain; charset=utf-8"},{"id":"894f2077-2bc0-5875-9673-41a116af26d1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/894f2077-2bc0-5875-9673-41a116af26d1/attachment.go","path":"internal/cli/sql.go","size":3414,"sha256":"9e1639f936f3af3a886e48099fa10eb70a928006b426ad59aee643eb2f25eccd","contentType":"text/plain; charset=utf-8"},{"id":"ab49caf8-9fef-51f4-a160-b2bb3c9178f3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ab49caf8-9fef-51f4-a160-b2bb3c9178f3/attachment.go","path":"internal/cli/which.go","size":13257,"sha256":"c4061b5cc460f10773dbf48bf32216a11ba46410e91d7dffff84048fc2276fc1","contentType":"text/plain; charset=utf-8"},{"id":"fa756a04-ba2f-59b4-ba1e-fb17383c676b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/fa756a04-ba2f-59b4-ba1e-fb17383c676b/attachment.go","path":"internal/cli/which_test.go","size":4230,"sha256":"f3434697933e3ff28af41d2875de84b6dda20f833c1ac76a5b66b99cb9d2fb35","contentType":"text/plain; charset=utf-8"},{"id":"f3ce55cc-4d0e-528b-927d-1e5c1645b0f5","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f3ce55cc-4d0e-528b-927d-1e5c1645b0f5/attachment.go","path":"internal/client/client.go","size":11080,"sha256":"db9d459f316a2e39d08097f424833fa9e610b3fc99131543d578bfad9fa8ed71","contentType":"text/plain; charset=utf-8"},{"id":"7a15c0ba-368e-5a50-b1c1-3f11b2d188b6","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7a15c0ba-368e-5a50-b1c1-3f11b2d188b6/attachment.go","path":"internal/client/digg_html.go","size":17004,"sha256":"04fe83bc785cb6857d8f4a29a987bab7d81a81064ef32d9509685beef448686c","contentType":"text/plain; charset=utf-8"},{"id":"81d25a4f-18d7-5afd-8188-b9b04e0f6839","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/81d25a4f-18d7-5afd-8188-b9b04e0f6839/attachment.go","path":"internal/cliutil/cliutil_test.go","size":27359,"sha256":"6565145ba1ba77a910de82a548e328e48cc9a514e6c6cb4c3bc816655652308a","contentType":"text/plain; charset=utf-8"},{"id":"97128884-775b-513d-8d59-e8842300e4a2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/97128884-775b-513d-8d59-e8842300e4a2/attachment.go","path":"internal/cliutil/duration.go","size":2971,"sha256":"49a04ea6621360369cfe9540a59493718dd8f9e7c358d3f1c900d4a7f8d0f491","contentType":"text/plain; charset=utf-8"},{"id":"5b280ec9-3812-516e-89e2-1d0874ef1d30","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5b280ec9-3812-516e-89e2-1d0874ef1d30/attachment.go","path":"internal/cliutil/fanout.go","size":6388,"sha256":"911963c086076fa0e5578ebe9e209129d5fb37b0f7e960d6e8d285b402f32ab8","contentType":"text/plain; charset=utf-8"},{"id":"f427d00c-7e2b-5509-9978-5fba00832440","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f427d00c-7e2b-5509-9978-5fba00832440/attachment.go","path":"internal/cliutil/probe.go","size":4777,"sha256":"a5c65f1ed30839fe914bb918d9eda430bbf37ef0ab2ff39e8412197f0428e748","contentType":"text/plain; charset=utf-8"},{"id":"0180d44c-e0b0-5420-955b-40ce06986fa3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0180d44c-e0b0-5420-955b-40ce06986fa3/attachment.go","path":"internal/cliutil/ratelimit.go","size":4816,"sha256":"ce0db1662659973d172e1919b35c4c4aa1845be9f83791d336c6af64d5548164","contentType":"text/plain; charset=utf-8"},{"id":"23969776-33d5-5468-837b-0be0aff85198","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/23969776-33d5-5468-837b-0be0aff85198/attachment.go","path":"internal/cliutil/text.go","size":1739,"sha256":"1d91feb1c22f400eb6f3f0310fe536f7ca54a0eb70d9192f30f33ba36fd7f2a2","contentType":"text/plain; charset=utf-8"},{"id":"508df3d6-b260-511b-ba1b-945cc023f513","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/508df3d6-b260-511b-ba1b-945cc023f513/attachment.go","path":"internal/cliutil/verifyenv.go","size":1251,"sha256":"2dc84cb2ae2e690dadada68ce2453b5a121effc0afa39f50224bcc05b5316957","contentType":"text/plain; charset=utf-8"},{"id":"25d6bedf-cb92-58e7-93b2-2aa8cace4c8d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/25d6bedf-cb92-58e7-93b2-2aa8cace4c8d/attachment.go","path":"internal/config/config.go","size":2574,"sha256":"edf497775f9c82f3a822981dcc9aa2bce2e7e6a603ead88956b43f0775eab33f","contentType":"text/plain; charset=utf-8"},{"id":"3d6e5b67-f7cc-54b8-93e5-04b56cea360d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/3d6e5b67-f7cc-54b8-93e5-04b56cea360d/attachment.go","path":"internal/diggparse/cluster_posts.go","size":17669,"sha256":"7dfa8fb04ce831de1a1a9056a27067c779f04510f069d3a0a4444e22b5ec076c","contentType":"text/plain; charset=utf-8"},{"id":"38e33fac-47c6-508f-a59a-bec8f4c2c91b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/38e33fac-47c6-508f-a59a-bec8f4c2c91b/attachment.go","path":"internal/diggparse/cluster_posts_test.go","size":12681,"sha256":"4207ad93be08f1c594cf944c50fc821300186eca34391c1584cb335301d92049","contentType":"text/plain; charset=utf-8"},{"id":"c844c34e-89a3-5095-bde9-121c835b7ef2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c844c34e-89a3-5095-bde9-121c835b7ef2/attachment.go","path":"internal/diggparse/github.go","size":13210,"sha256":"15801554a0d0e25465aeffa9b2ec96a26e144d90e22adddf1b09f18b3db1ee74","contentType":"text/plain; charset=utf-8"},{"id":"cc0cda79-495b-5dd3-9772-5769c797ca97","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/cc0cda79-495b-5dd3-9772-5769c797ca97/attachment.go","path":"internal/diggparse/parse_stats.go","size":4655,"sha256":"105838d9cf2c5f6a2858f190e04d25115a8be75117a9fb035c3314f6b214add4","contentType":"text/plain; charset=utf-8"},{"id":"7e24a430-f1f9-58b8-8455-052346618573","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7e24a430-f1f9-58b8-8455-052346618573/attachment.go","path":"internal/diggparse/parse_stats_test.go","size":5041,"sha256":"8e6ac4d5a88b379f731dd7c90d50046b5d7a108d7e7bac06de83617bed4af0f5","contentType":"text/plain; charset=utf-8"},{"id":"f84b7a71-ed22-5422-b0a3-ca2d68e36dd2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f84b7a71-ed22-5422-b0a3-ca2d68e36dd2/attachment.go","path":"internal/diggparse/parser.go","size":17751,"sha256":"7b6c310a388bde8a7bad16e8f844706ef863abe34cb9f0c7cac983157d3e7f44","contentType":"text/plain; charset=utf-8"},{"id":"a4d0464e-8f8e-576b-b54c-678f8d7160ec","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a4d0464e-8f8e-576b-b54c-678f8d7160ec/attachment.go","path":"internal/diggparse/parser_rank_test.go","size":7572,"sha256":"602d9093b445bf0bcccfa34b4a05c92d73319b374b0dd6316d696bfc56f07ff0","contentType":"text/plain; charset=utf-8"},{"id":"c51277a7-c2d9-5ee3-8c6c-de8d6f841a79","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c51277a7-c2d9-5ee3-8c6c-de8d6f841a79/attachment.go","path":"internal/diggparse/parser_test.go","size":3539,"sha256":"7c76847fd3ec8179dacd4f88e35bdb89da0c0b7b4d7f5216a534232ccfdcac27","contentType":"text/plain; charset=utf-8"},{"id":"553d1a97-5d44-5539-adaa-a5c7021689fc","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/553d1a97-5d44-5539-adaa-a5c7021689fc/attachment.go","path":"internal/diggparse/rankings_companies.go","size":15479,"sha256":"5bab3fae63e5b3dcae8d4223851f16ca58f1008bbd95e1179294ea41bd60bad4","contentType":"text/plain; charset=utf-8"},{"id":"5768b256-d5c1-5bc6-8444-d17262a5773f","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5768b256-d5c1-5bc6-8444-d17262a5773f/attachment.go","path":"internal/diggparse/rankings_companies_test.go","size":13843,"sha256":"ab345ec29c8f6db482327857feb45e63fba2d684daa8217f46df02f171690d50","contentType":"text/plain; charset=utf-8"},{"id":"8402eb1f-1bf1-5f3a-80f9-2b6f65178abe","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/8402eb1f-1bf1-5f3a-80f9-2b6f65178abe/attachment.go","path":"internal/diggparse/roster_1000.go","size":4836,"sha256":"8d520c99ee45a2fa2c3100503548e579a282ac5bef9d5a207e77ba3ad94291cf","contentType":"text/plain; charset=utf-8"},{"id":"20c258e5-1a26-562b-963f-dd3387b967cd","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/20c258e5-1a26-562b-963f-dd3387b967cd/attachment.go","path":"internal/diggparse/roster_1000_test.go","size":6312,"sha256":"8850c4be9e1214e97f40af819658e4c280c02390ef08873a155cf0b766bceca2","contentType":"text/plain; charset=utf-8"},{"id":"5c5f04ee-19cf-590c-9b91-fbd0d9e1cdbf","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5c5f04ee-19cf-590c-9b91-fbd0d9e1cdbf/attachment.go","path":"internal/diggstore/store.go","size":28538,"sha256":"c2dc3a409aaccf41ab5a05da7a30dffe62eac030ab011e4633807decdb1d8076","contentType":"text/plain; charset=utf-8"},{"id":"9aa4e147-f99c-5408-b664-7b9f0d5fc3c8","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9aa4e147-f99c-5408-b664-7b9f0d5fc3c8/attachment.go","path":"internal/diggstore/store_test.go","size":16863,"sha256":"c2fda3d9e5622077925be1a493043b4d4a1f0cf0ef2542e03293b4245f967b1a","contentType":"text/plain; charset=utf-8"},{"id":"9d408f1e-a247-5e87-a036-2137a2cd27b3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9d408f1e-a247-5e87-a036-2137a2cd27b3/attachment.go","path":"internal/mcp/cobratree/classify.go","size":3559,"sha256":"b5cd20c0e8d490e3793facfb65c77c4e4a653051a39affc97d09cc71b3ff0a3a","contentType":"text/plain; charset=utf-8"},{"id":"83a91084-61fb-5b9c-ac0f-9ef78d225604","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/83a91084-61fb-5b9c-ac0f-9ef78d225604/attachment.go","path":"internal/mcp/cobratree/cli_path.go","size":716,"sha256":"b2cb9eaadbeb172793d8d70a08702190e092b40f7e86e68702ebe43878c2c833","contentType":"text/plain; charset=utf-8"},{"id":"390313de-5a7e-52ef-ae8e-6da40bcbc0b7","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/390313de-5a7e-52ef-ae8e-6da40bcbc0b7/attachment.go","path":"internal/mcp/cobratree/names.go","size":661,"sha256":"0e690eb2bb4f5790981ec470d9e1c261d48a39b4c54545d7b6b12c0897a1d701","contentType":"text/plain; charset=utf-8"},{"id":"956b44d6-6a84-5858-b6b3-b7eaa9278d9b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/956b44d6-6a84-5858-b6b3-b7eaa9278d9b/attachment.go","path":"internal/mcp/cobratree/shellout.go","size":2628,"sha256":"f8a5ad56d62cac166603bd1664b9413991d2234768138a70113c5cf4af1f1d2a","contentType":"text/plain; charset=utf-8"},{"id":"1f74dae7-2815-5f79-8b95-2fea4bbaea43","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/1f74dae7-2815-5f79-8b95-2fea4bbaea43/attachment.go","path":"internal/mcp/cobratree/typemap.go","size":2197,"sha256":"faa5e5e40ce9ac74e38bb669ce8e3e4f31cb7495734615f75b5dc3dc0fae8460","contentType":"text/plain; charset=utf-8"},{"id":"256f62b5-5419-50dd-ad52-c56bb18f9b26","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/256f62b5-5419-50dd-ad52-c56bb18f9b26/attachment.go","path":"internal/mcp/cobratree/walker.go","size":2056,"sha256":"c509e3e1209434f1f86f5d4d29a9b200f60c807336ba89f34a50a6f49ba2c7a8","contentType":"text/plain; charset=utf-8"},{"id":"64984262-fe46-51af-8407-76ef90ca903b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/64984262-fe46-51af-8407-76ef90ca903b/attachment.go","path":"internal/mcp/tools.go","size":21916,"sha256":"c7fd0c4a871c8591d6aa3fe40fdcc712d291f32494916ba59c5bdcc8827fbb1b","contentType":"text/plain; charset=utf-8"},{"id":"475ba9a4-cc78-537e-808a-fccd2a8fb8cb","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/475ba9a4-cc78-537e-808a-fccd2a8fb8cb/attachment.go","path":"internal/mcp/tools_test.go","size":3913,"sha256":"4f868d5646274853b7ab6b3779a29bbe946bd417deea06981b5e51450f0c2d0c","contentType":"text/plain; charset=utf-8"},{"id":"2e10a977-7786-58ef-9001-ea2a0b283c96","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2e10a977-7786-58ef-9001-ea2a0b283c96/attachment.go","path":"internal/store/schema_version_test.go","size":15530,"sha256":"144109e390a6627db65b9146d515e244b0bddcfeddc8ecc1f28ce5f77dba3c7b","contentType":"text/plain; charset=utf-8"},{"id":"9bef01b9-1f1f-5e78-bf4c-95afb0b56e0f","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9bef01b9-1f1f-5e78-bf4c-95afb0b56e0f/attachment.go","path":"internal/store/store.go","size":35252,"sha256":"cb010503a7a48722ba578b75dcb383d70ddad93b2afff623366cb7f9d9cd7dca","contentType":"text/plain; charset=utf-8"},{"id":"68b1aef3-6e94-5df5-97c6-f28c3c7590d7","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/68b1aef3-6e94-5df5-97c6-f28c3c7590d7/attachment.go","path":"internal/store/upsert_batch_test.go","size":11655,"sha256":"51d967d47aa5af7fb0685907bfba9efb80522cbf8bab3dd01d79986d7bf75fc4","contentType":"text/plain; charset=utf-8"},{"id":"0d3e259d-5742-5c51-a95e-00a53e2cc6a4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0d3e259d-5742-5c51-a95e-00a53e2cc6a4/attachment.go","path":"internal/types/types.go","size":597,"sha256":"d09e0cc9d71a311e3b7090956ce2d99950b57c0263b0ec5d76a745a4f4d3a55b","contentType":"text/plain; charset=utf-8"},{"id":"d7e44f8d-9e9e-524d-ba22-c17c0a6e6315","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d7e44f8d-9e9e-524d-ba22-c17c0a6e6315/attachment.json","path":"manifest.json","size":614,"sha256":"db731ccd7b6c24ad6113eb8653329988b4c12758473fb9ba095516f7d3bc377b","contentType":"application/json; charset=utf-8"},{"id":"25972221-7a76-5575-87a8-56bc9fc3c450","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/25972221-7a76-5575-87a8-56bc9fc3c450/attachment.yaml","path":"spec.yaml","size":6484,"sha256":"35fe2c2058d356391e2421400504a10b4cb1140b0baa62931de7cfd8b096599b","contentType":"application/yaml; charset=utf-8"},{"id":"b053bf8e-e22f-5af1-b085-f493c3ef9b39","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b053bf8e-e22f-5af1-b085-f493c3ef9b39/attachment.html","path":"testdata/ai-1000-fixture.html","size":38074,"sha256":"4925859656cfc17f1aab9fc7fcc0afac55eafb99161d48ee15fecd927e0b2eb8","contentType":"text/html; charset=utf-8"},{"id":"d0ddd097-5e5c-52f2-aade-1ef8735c6572","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d0ddd097-5e5c-52f2-aade-1ef8735c6572/attachment.html","path":"testdata/cluster-buddhism-65idu2x5.html","size":198085,"sha256":"8a595cd2c50f8188f73c5c93fb014963ba9bc7bbd3ca529500314c6f86780067","contentType":"text/html; charset=utf-8"},{"id":"395ce9a4-126d-5566-a10d-9ecdb4a9fcb7","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/395ce9a4-126d-5566-a10d-9ecdb4a9fcb7/attachment.html","path":"testdata/cluster-nvidia-smsfvt1s.html","size":96616,"sha256":"10e25995df34cfe7e1cc8455b0449b9616b4979ae13c1f2e1ca78a0e7a2464b1","contentType":"text/html; charset=utf-8"},{"id":"2fee0b50-864e-5c29-8e59-412a7ada351a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2fee0b50-864e-5c29-8e59-412a7ada351a/attachment.html","path":"testdata/rankings-companies-dirty-fixture.html","size":54348,"sha256":"cae1a17bc8ad4741a46d6beebf66cc4c586c5036dc860e9dda12d3703151cb19","contentType":"text/html; charset=utf-8"},{"id":"693b3b3c-e7aa-5750-8cc7-ce7e26341035","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/693b3b3c-e7aa-5750-8cc7-ce7e26341035/attachment.html","path":"testdata/rankings-companies-empty-fixture.html","size":331,"sha256":"7ebe3fc3279678886126b63bd8b8bd5c9a121a6b38e8cc020780a296f743765f","contentType":"text/html; charset=utf-8"},{"id":"5268a6e0-2003-59c9-bfb5-f81efe4ffd41","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5268a6e0-2003-59c9-bfb5-f81efe4ffd41/attachment.html","path":"testdata/rankings-companies-fixture.html","size":54378,"sha256":"3b0d931e45ec7afaa2bec267bc69919f816f5dddd24a8961e2300a14b51d0d7b","contentType":"text/html; charset=utf-8"},{"id":"56ec44cd-098c-5b89-8ce9-6a4f54d185a2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/56ec44cd-098c-5b89-8ce9-6a4f54d185a2/attachment.json","path":"tools-manifest.json","size":5959,"sha256":"4fde276ad5e8b2a87017793f3712aff788299adb5c3e0dd575a53394ebdbee00","contentType":"application/json; charset=utf-8"},{"id":"62fbb1f0-6f88-5709-8100-f04ec973268c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/62fbb1f0-6f88-5709-8100-f04ec973268c/attachment.json","path":"workflow-verify-report.json","size":109,"sha256":"a3f9c00e85c9f1262589ebb957fe5aaf37008bedd0b62b5f118742fa3d17e0dd","contentType":"application/json; charset=utf-8"},{"id":"f99fbf40-cc01-5d5c-ae3c-f2dc0fa17eb1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f99fbf40-cc01-5d5c-ae3c-f2dc0fa17eb1/attachment.yaml","path":"workflow_verify.yaml","size":1435,"sha256":"3b4f1e704e5fd0412f19279f3926d33f8f917bdbe672d7e0cb5170be331f4d8f","contentType":"application/yaml; charset=utf-8"}],"bundle_sha256":"0d61f0b381c8f848c1a888b051070858243f13947551399774276c9fd4913af6","attachment_count":100,"text_attachments":100,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"library/media-and-entertainment/digg/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"integrations-apis","category_label":"Integrations"},"exact_dupes_collapsed_into_this":0},"license":"Apache-2.0","version":"v1","category":"integrations-apis","metadata":{"openclaw":{"requires":{"bins":["digg-pp-cli"]}}},"import_tag":"clean-skills-v1","description":"Tail Digg's news cycle, GitHub feeds, and pipeline events from the terminal — read-only, with rank-history nobody else surfaces. Trigger phrases: `what's trending on Digg`, `digg top stories`, `digg github stars`, `digg github recent`, `what climbed the AI news rankings`, `digg leaderboard`, `what got replaced on Digg`, `tail the Digg pipeline`, `use digg`, `run digg-pp-cli`.","allowed-tools":"Read Bash","argument-hint":"\u003ccommand> [args] | install cli|mcp"}},"renderedAt":1782980031566}

Digg — Printing Press CLI Prerequisites: Install the CLI This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first: 1. Install via the Printing Press installer: 2. Verify: 3. Ensure (or ) is on . If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer): If reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds. When to Use This CLI Use this CLI when an agent…