Skip to content

feat(gtm): graph-based go-to-market toolkit (the Figma playbook) - #401

Draft
NotASithLord wants to merge 2 commits into
mainfrom
claude/peerd-graph-gtm-strategy-pa0mc2
Draft

feat(gtm): graph-based go-to-market toolkit (the Figma playbook)#401
NotASithLord wants to merge 2 commits into
mainfrom
claude/peerd-graph-gtm-strategy-pa0mc2

Conversation

@NotASithLord

Copy link
Copy Markdown
Owner

What & why

Ports Dylan Field's pre-launch Figma playbook (scrape the community, build the network graph, find the influential nodes in Gephi, reach out to every one personally) to peerd as a runnable gtm/ toolkit: collectors for GitHub stars/follows, the Bluesky follow graph (public AppView API), and HN topic engagement; a pure scoring core (weighted PageRank, sampled Brandes betweenness, deterministic community detection); and exports to Gephi GEXF, CSV, and a ranked outreach worksheet. gtm/README.md carries the adapted strategy and outreach etiquette. Twitter/X is deliberately not a source (paywalled API, ToS-hostile scraping); the crawl uses public, ToS-clean APIs only.

Closes #

Checklist

  • bun test, bun run typecheck, lint, check:copy, check:docpaths, check:hygiene, check:invariants pass locally (full preflight not runnable in this sandbox; nothing here touches the extension, manifests, or packaging)
  • Only original or permissively-licensed code — no GPL / AGPL / copyleft
  • Tests added or updated (tests/gtm/graph.test.ts — fixture-graph coverage of the pure core, which also pulls it into the strict typecheck)
  • No hand-edited generated files (manifest.json, shared/channel-config.js)
  • No danger zones touched — gtm/ is a Bun-run analyst toolkit (same posture as packaging//scripts/); nothing ships in the extension

Notes for reviewers

  • Known CI failure to resolve: the check:copy commit-metadata rule will flag this commit because this remote environment pins the git author identity, which the rule rejects, and rewriting the author to your identity was out of bounds for the agent. To clear it: git rebase -i / git commit --amend --reset-author locally with your identity (or squash-merge if the gate permits it).
  • Crawl caches and outputs (gtm/data/, gtm/out/) are gitignored on purpose: they contain other people's handles and social edges — collected for a one-time private analysis, never published.
  • gtm/seeds.ts is meant to be edited — seed choice IS the strategy. The defaults span browser agents, local inference, local-first, and dweb/p2p; prune/extend before a real run.
  • Live crawling was not possible from this sandbox (network policy blocks Bluesky/HN; GitHub API is session-scoped), so the pipeline was verified end-to-end with synthetic crawl data plus the unit suite. First real run: export GITHUB_TOKEN=… && bun run gtm all.
  • The toolkit intentionally stops at a worksheet — no send automation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D1cGPZgGqT3sdDTEyL1PJZ


Generated by Claude Code

Port the Figma launch playbook (map the community's network graph, find
the influential nodes, reach out to each one personally) to peerd, with
2026 data sources: Twitter's graph is closed now, so the crawl maps
GitHub stars/follows, the Bluesky follow graph (public AppView), and HN
topic engagement instead.

- gtm/lib/graph.ts: pure core (no IO): weighted directed PageRank,
  sampled Brandes betweenness, deterministic label-propagation
  communities, GEXF (Gephi) + CSV export
- gtm/lib/rank.ts: percentile-blended outreach score plus a Markdown
  worksheet with per-community coverage
- gtm/collect/{github,bluesky,hn}.ts: rate-limit-aware collectors;
  follow edges are kept in-community only, so 300 followers inside the
  graph beat 100k generic ones
- gtm/seeds.ts: seed repos/actors/queries spanning peerd's four adjacent
  communities (browser agents, local inference, local-first, dweb/p2p)
- gtm/run.ts: collect (cached per source, resumable) and analyze CLI;
  `bun run gtm`
- gtm/README.md: the strategy, run instructions, and outreach etiquette
- tests/gtm/graph.test.ts: fixture-graph coverage for the pure core,
  which also pulls it into the strict typecheck

Crawl caches and outputs (gtm/data, gtm/out) are gitignored: they hold
other people's social edges and stay local. Nothing here ships in the
extension.
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Visual regression

No visual drift. Every state renders identically to the committed baselines.

📸 Browse the visual gallery — 62 baseline screens (light + dark) as of this commit.

Comment thread gtm/run.ts Fixed
The edge-key template held a raw NUL byte, which makes git treat
gtm/lib/graph.ts as binary (check:hygiene); write it as a unicode escape
sequence instead. In run.ts, replace existsSync probes with
attempt-then-handle: the cache write is exclusive ('wx') unless --fresh,
so a cache file appearing between the probe and the write is kept rather
than clobbered (CodeQL js/file-system-race), and a missing data dir
reads as an empty collection.
@NotASithLord

Copy link
Copy Markdown
Owner Author

CI status as of 7c80e79:

  • check:hygiene — fixed: the edge-key template held a raw NUL byte; now a written-out unicode escape
  • CodeQL file-system race in gtm/run.ts — fixed: cache writes are exclusive (wx) unless --fresh; no more existsSync check-then-use (awaiting re-scan to clear the alert)
  • lint, boundary, drift, docpaths, visual — green
  • check:copyneeds your hands: the authorship rule rejects both commits because this remote environment pins the git author to an assistant identity, and rewriting the author to yours was out of bounds for the agent. git rebase -i main --exec 'git commit --amend --no-edit --reset-author' (or equivalent) with your identity clears it.

Generated by Claude Code

@NotASithLord

Copy link
Copy Markdown
Owner Author

One more CI note: Firefox Store smoke + Gecko suite failed on 7c80e79, but it's a flake, not this PR — the single failing test (onboarding-view.test.js shard 6/8, "the tease type-deletes the mirror…") asserts the tease animation advanced within a 45ms wall-clock wait, the extension/ tree is byte-identical between both commits here (the second touched only gtm/), and the same suite passed on 97a6a56. No push from me for this one; the rebase that fixes the commit authorship will re-run CI and should clear it. If it flakes again after that, it's worth a deflake pass on that test's timing rather than anything in this PR.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants