DEV Community

Space
Space

Posted on

Built a Tool That Deep-Links to Exact Answers, Not Question Pages

The Problem That Wouldn't Stop Bugging Me

Last year I spent 6+ years building HashiCorp Vault infrastructure at Expedia. Every week, the same pattern:

  1. Junior dev hits a Vault 403 error
  2. They search Stack Overflow
  3. They find a question page with 23 answers
  4. They scroll past 8 wrong answers to find the right one
  5. Next week, different dev, same error, same scroll

The answer existed. The address was permanent — stackoverflow.com/a/38716397. But nobody could get to it directly. They always landed on the question page and had to dig.

One day I was looking at how Slack threads work internally. Every message has a coordinate: channel/p{unix_microseconds}?thread_ts={parent_ts}. The timestamp IS the ID. If you know the coordinate, you go straight to the message — no scrolling, no searching.

I realized: this isn't just Slack. Every platform has permanent answer addresses.

  • Stack Overflow: /a/{answer_id} — the accepted answer, not the question
  • Reddit: /comments/{post}/{slug}/{comment_id} — the top comment, not the post
  • Hacker News: /item?id={objectID} — if Algolia says it's a comment, the objectID IS the deep-link
  • GitHub: /{org}/{repo}/issues/{n} — direct to the issue
  • Twitter/X: /{user}/status/{snowflake} — snowflake IDs embed the timestamp: ts = (id >> 22) + 1288834974657

Every answer on every platform has a deterministic address in (platform, thread_id, timestamp) space. I started calling this "thread coordinates."

What I Built

phi-thread is a Chrome extension (also a Python CLI on PyPI) that searches across 5 platforms simultaneously and returns deep-links to the exact answer — not the question page, not the post, the answer itself.

Here's what happens when you search "docker container keeps restarting":

Stack Overflow: The API returns questions. But phi-thread doesn't stop there — it fetches the accepted_answer_id, calls the answers endpoint, pulls the answer body, and gives you stackoverflow.com/a/38716397. You click, you're at the fix. No scrolling past 22 other answers.

Reddit: For each matching post, phi-thread fetches {permalink}.json?limit=1&sort=top to extract the top comment. You get a link to the actual comment, not the post.

Hacker News: Algolia's API returns both stories AND comments. If the result is a comment (has story_id and comment tag), the objectID is already the deep-link: news.ycombinator.com/item?id={objectID}.

Then it ranks them. Platform score × title relevance. A perfectly matching SO answer with 5 upvotes beats a Reddit post with 500 upvotes but irrelevant title.

The Three-Layer Architecture

The interesting part (to me) is how the knowledge base builds itself.

Layer 1 — Exact cache. SHA-256 hash of the normalized query → JSON in chrome.storage.local. 24-hour TTL. Same exact question = instant results, < 1ms.

Layer 2 — Keyword index. This is the one I'm most proud of. Every answer that comes back from a search gets its keywords extracted. Each keyword maps to the answer's coordinate and score in a persistent index.

Why this matters: you search "docker container restarting" today. Tomorrow you search "docker restart loop" — different query, but the keyword index finds yesterday's answers because they share the keywords "docker" and "restart." The KB builds itself from your search history.

The index grows forever. After a few hundred searches, it knows your stack. Searches for things you've queried before resolve from the index in ~5ms instead of 12 seconds of live API calls.

Layer 3 — Live search. Parallel fetch() calls to SO, Reddit, HN, GitHub, and DuckDuckGo (catches Medium, Dev.to, blogs, Twitter). All in the service worker, all client-side.

The "CONNECT" Feature

This is the one I'm most excited about. When you're on a Stack Overflow question page, phi-thread automatically extracts the question title, searches OTHER platforms (Reddit, HN, GitHub), and shows you a small floating panel: "φ 3 answers found on other platforms."

The question you're reading on SO might already be answered in an HN comment or a Reddit thread. phi-thread bridges that gap. No one platform has all the answers, but collectively they do.

Zero Dependencies, Zero Server

The entire extension is vanilla JS — no React, no build step, no bundler. The search engine is ~550 lines of code. It uses fetch() for API calls and chrome.storage.local for persistence. Installs in 1 second.

No API keys. All platforms are queried through their public free-tier APIs. Rate limits are generous enough for individual use.

No server. Everything runs in your browser. Your search history, your keyword index, your cache — all local. Nothing leaves your machine.

The Spacetime Analogy (for the Curious)

I found a fascinating paper while building this: Krioukov et al. (2012) proved that complex networks and de Sitter spacetime share identical large-scale causal structure. Past light cones in spacetime map to hyperbolic discs in networks, both producing the same power-law degree distributions.

This isn't a coincidence I'm forcing. The math is genuinely there. Lamport's happened-before relation in distributed systems (1978) was explicitly inspired by special relativity. Partially ordered sets — where "A happened before B" is defined but "A and B are concurrent" is also possible — describe both spacetime events and thread replies.

An answer on Stack Overflow and an event in spacetime are both points in a partially ordered set with a permanent coordinate. I wrote a literature review on this if anyone's interested (links in the repo).

I'm not claiming threads ARE spacetime. But they share mathematical structure, and that structure is what makes permanent answer coordinates possible.

What's Next

The self-building KB has an interesting property: if thousands of users each build their own index, and we aggregate them (anonymously — just keyword → URL → count), we get community-validated answers. When 50 developers independently find the same SO answer for "postgres connection pooling," that answer is probably excellent — without anyone voting or curating.

I'm working on cloud sync as a Pro feature, which would enable this aggregated intelligence layer. But the free version is fully functional right now.

Try It

Zero dependencies. Zero tracking. Zero server. Just a router to the answer that already exists.

Connect, don't create.
🌌

Top comments (0)