frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Domscribe – Deterministic DOM-to-source mapping for AI coding agents

https://github.com/patchorbit/domscribe
2•NarratorTD•1h ago
Hey HN! I built Domscribe to solve a problem that was eating my productivity.

I spend a lot of my time working with AI coding agents. The thing that kept eating at my productivity though was that every time I asked an agent to fix something on the frontend, the actual edit took maybe 200 tokens. But before that happened, the agent would go on this whole journey, grepping through the codebase and at times having to backtrack. That search loop could burn 5,000-10,000 tokens before a single line of code changed.

The agent has zero awareness of what's actually rendering in the browser because the rendered DOM and the source tree are two completely different topologies. So I started thinking about this differently; what if we could optimize a solution to the search problem by giving the agents the right context? What if every DOM element already knew exactly where it came from in source?

That's the core idea behind Domscribe. At build time, an AST transform walks your JSX and Vue templates, assigns every element a deterministic ID via xxhash64 content hashing, and writes a manifest mapping each ID to its exact file, line, and column. The IDs are stable across HMR; same file content and element position always produces the same ID. At runtime, framework adapters walk the React fiber tree or inspect Vue VNodes to capture live props, state, and component metadata. A local relay daemon connects the browser and your agent via MCP.

The result is two workflows that didn't exist before. Your agent can query any source location and get back only what's actually rendering there; live DOM snapshot, props, state, the works. And from the other direction, you can click any element in the browser overlay, type "make this button use the primary color" in plain English, and Domscribe resolves the exact file:line:col so your agent edits the right file on the first try.

(I should mention that the overlay runs as Lit web components inside shadow DOM, specifically so it can't mess with your app's styles.)

One thing I'm genuinely proud of is the architecture. I spent a LOT of time making sure this wasn't just a tool that works for React-and-Vite-and-nothing-else. The transform layer has a ParserInterface that the injector consumes without knowing which parser produced the AST (the Acorn, Babel, and Vue SFC parsers are all implementations of the same interface), and the ID injection logic is completely abstracted away. Adding a new template syntax (Lit, Svelte, Stencil) means implementing one interface. On the runtime side, a FrameworkAdapter interface defines methods such as captureProps, captureState, and getComponentInstance; and the React and Vue adapters are built on the same public interface that any community contributor would use. No internal escape hatches.

I took the same approach with bundler support (Vite, Webpack, Turbopack) and agent support (Claude Code, Cursor, GitHub Copilot CLI, Gemini CLI - all via first-party plugins that bundle the MCP config and a skill file). But the MCP layer means any compatible agent works out of the box.

PII redaction is built in and on by default. All captured data passes through pattern matching for emails, phone numbers, API keys, JWTs etc. before it leaves the browser.

Everything is stripped in production builds; zero data-ds attributes and zero overlay scripts. It's enforced by CI tests that run against every real fixture. (Speaking of tests: the entire integration and e2e suite runs against real published packages via a local Verdaccio registry. )

Anyway, MIT licensed, fully open source, the whole codebase is right there on GitHub. I'd genuinely love feedback on the architecture and the approach. And I'm especially curious if anyone has thoughts on extending the ParserInterface to other template syntaxes; that's the piece I'm most excited about people contributing to.

Easily Create preview environments for iOS and Android

https://twitter.com/anamhira/status/2039011489689092207
1•anamhira•12s ago•1 comments

Solar Balconies Take Europe by Storm

https://hackaday.com/2026/03/31/solar-balconies-take-europe-by-storm/
1•toomuchtodo•23s ago•0 comments

Apple Confirms Mac Pro Is Dead, No Future Models Planned

https://www.macrumors.com/2026/03/26/apple-discontinues-mac-pro/
1•redm•1m ago•0 comments

JetStream 3: A modern benchmark for high-performance, compute-intensive Web apps

https://blog.chromium.org/2026/03/jetstream-3-a-modern-benchmark.html
1•emschwartz•1m ago•0 comments

Software You Can Love 2026 tickets are on sale

https://mattnite.net/blog/sycl-2026-tickets-are-here/
1•eatonphil•6m ago•0 comments

Bloomberg Announces Open Source Partnership, Will Contribute to OpenTelemetry

https://www.bloomberg.com/company/stories/sustaining-opentelemetry-cncf-moving-from-dependency-ma...
2•telinfra•6m ago•0 comments

Accelerating the Next Phase of AI

https://openai.com/index/accelerating-the-next-phase-ai
6•surprisetalk•8m ago•1 comments

Mercor AI has allegedly been breached by Lapsus

https://twitter.com/AlvieriD/status/2038779690295378004
3•takira•9m ago•0 comments

Ask HN: What custom instructions do you use to minimize LLM sycophancy?

1•YossarianFrPrez•9m ago•1 comments

Meat-Based LLM Proxies

https://not-an-llm.bearblog.dev/meat-based-llm-proxies/
1•nusl•11m ago•0 comments

Ten Months with Copilot Coding Agent in Dotnet/Runtime

https://devblogs.microsoft.com/dotnet/ten-months-with-cca-in-dotnet-runtime/
2•andyjohnson0•13m ago•0 comments

Next.js template for US credit card affiliate sites

https://template.creditpilotusa.com
1•dnosoz•14m ago•0 comments

Claude Code's source code appears to have leaked

https://venturebeat.com/technology/claude-codes-source-code-appears-to-have-leaked-heres-what-we-...
1•takira•15m ago•0 comments

Deploy Aikido Safe-Chain via Iru (Kandji) or Jamf

https://github.com/AikidoSec/deploy-safe-chain
1•yhamade•15m ago•1 comments

The .env File Nobody Needs

https://vivianvoss.net/blog/the-env-file
1•alwillis•15m ago•1 comments

AWS SCP Catalog

https://mijndertstuij.nl/posts/aws-scp-catalog/
1•speckx•15m ago•0 comments

I Read Claude Code's Leaked Source – Here's What's Inside

https://www.saadnaveed.com/writing/claude-code-source-leak
1•saadn92•15m ago•0 comments

Super Micro Computer Investors Look for Exits

https://catenaa.com/markets/equities/super-micro-computer-investors-look-for-exits/
1•malindasp•18m ago•1 comments

The architectural trade-offs of AI code generation

https://www.aha.io/engineering/articles/the-architectural-trade-offs-of-ai-code-generation
1•FigurativeVoid•18m ago•0 comments

Prefer do notation over Applicative operators when assembling records (2024)

https://haskellforall.com/2024/05/prefer-do-notation-over-applicative
2•wazHFsRy•18m ago•0 comments

Iran's internet blackout has entered day 32 [video]

https://www.youtube.com/watch?v=v4enYB8IwwE
2•us321•19m ago•0 comments

Chernobyl Fungus Seems to Have Evolved the Ability to Harness Radiation

https://www.sciencealert.com/chernobyl-fungus-seems-to-have-evolved-an-incredible-ability
3•CharlesW•20m ago•0 comments

Show HN: The 42-Day Vibe – A mockumentary on "Vibe Coding" taken to the extreme

https://bugramming.dev/post/the-42-days-vibe-ghost-ledger/
1•codekidX•21m ago•0 comments

Job Isn't Programming

https://codeandcake.dev/posts/2025-12-12-your-job-isnt-programming
2•dondraper36•21m ago•1 comments

Should AI First Do No Harm?

https://joelratnasothy.com/should-ai-first-do-no-harm/
2•MrDrDr•22m ago•1 comments

Producer by Google

https://www.producer.ai
1•oldfuture•22m ago•0 comments

A Taxonomy of AI Agents

https://efexen.substack.com/p/a-taxonomy-of-ai-agents
2•efexen•22m ago•0 comments

What it's like to live in Portland, Oregon

https://www.nytimes.com/2026/03/25/realestate/portland-ore-weird-but-life-is-good.html
6•bookofjoe•27m ago•1 comments

Yes, a Smartphone Can Be Too Big for the Masses

https://www.wsj.com/business/telecom/yes-a-smartphone-can-be-too-big-for-the-masses-7968b2fb
2•apparent•27m ago•1 comments

I Traced My Traffic Through a Home Tailscale Exit Node

https://tech.stonecharioteer.com/posts/2026/tailscale-exit-nodes/
3•stonecharioteer•29m ago•2 comments