Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Wix Engineering 8 min read Opinion mediumAdept

Our AI Agent’s Design Looked Complete. 3 Runtime Checks Proved It Wrong

An AI agent's retrospective on designing cross-component-boundary binding (DL#193) for Wix's Jay web framework shows a recurring failure: first drafts added unneeded machinery and made claims about runtime behavior that tracing disproved. Two additions, a parentViewState event field and re-basing forwarded refs to the outer scope, turned out unnecessary. A claim that updating parent context would refresh leaves broke on three reference-check gates in forEach rendering, causing stale bindings that were fixed with an opt-in compile-time dependsOnParent flag. The team added four design-log checklist steps: state why existing primitives don't suffice before adding new surface, trace changes through real runtime code with file:line citations, enumerate prior art and adjacent mechanisms, and lead with a TL;DR of decisions for the implementer.

Assumes: reactive UI renderingdesign docs / design review

Related posts

  • Components Are Dead; And Now for Something Completely Different

    Wix Engineering mediumAdept

    Wix's Jay framework replaces UI components with "regions": design-system templates are flattened into page-local HTML at coding time, while logic stays in shared headless components bound via fine-grained signals. The argument is that components suit human cognitive limits but force runtime work on slots, context and ref forwarding, whereas AI agents work best with single-file local context. Reactivity is kept without a virtual DOM through per-node update closures and phase-gated hydration. Drift between flattened copies and upstream templates is handled by a deterministic CLI that AST-diffs regions (validate) and re-flattens while preserving marked overrides (sync).

  • Turn one giant AI-generated pull request to a reviewable stack

    GitHub Engineering mediumAdept

    Stacked pull requests split a large, agent-generated feature diff into a chain of small, dependency-ordered PRs that are each scoped to one concern. A worked example adds product search to a shopping assistant as four layers: catalog data, search API, chat wiring, and grounded UI. Each layer is built by a scoped custom agent and reviewed by a different owner using the gh-stack CLI (init, add, push, submit, rebase, sync). The recommended review flow is to read top-down for context and review bottom-up. Fixes to a lower layer are propagated with gh stack sync. Prefer local gh stack rebase over the web Rebase button, because the server-side rebase resets the committer and produces unsigned commits that can break branch protection.

  • Six Principles for Production AI Agents

    Neon mediumAdept

    Production AI agents succeed through system design and conventional software engineering rather than clever prompts or frameworks. Six principles cover the work: write direct, detailed, non-contradictory system prompts kept static for prompt caching; give each component minimal context with tools to fetch more and automatic compaction; and design a small set of strictly typed, idempotent tools (typically under 10 with 1-3 parameters). The remaining principles are to pair creative LLM actors with strict critics such as compilers, tests and domain invariants, to use LLMs to analyze agent logs for failure patterns, and to treat frustrating agent behavior as a sign of system bugs like missing API keys or ambiguous instructions.

  • How AI Assistants Can Decode GitHub Repos for UI Writers

    Docker mediumAdept

    An LLM agent can reliably flag user-facing copy changes in a branch when it is given narrow tools and expert hints about what "user-facing" means. GitHub Copilot's repo chat could not even count open PRs. A first prompt that gave the model bash and raw git diff also failed: diffs were huge, important files were buried and extra tools invited hallucination. The working two-step flow first lists only likely UI files (using --files-only and --no-pager with an alpine/git container) and saves the list. It then diffs just those files against main with --no-color --minimal, guided by frontend-engineer hints about JSX text nodes, notifications, toasts and Error constructors. This produced an accurate list of copy changes on a real Docker PR.

  • Effective harnesses for long-running agents

    Anthropic Engineering mediumAdept

    Long-running coding agents lose all memory between context windows, and compaction alone doesn't stop them from trying to one-shot an app, leaving half-finished work, or declaring the project done early. The proposed harness for the Claude Agent SDK splits work between an initializer agent and a coding agent. The initializer writes an init.sh script, a claude-progress.txt log, an initial git commit and a JSON feature list (200+ end-to-end features, all marked failing). Each later coding session reads git logs and progress notes, smoke-tests the app, implements one feature, verifies it end-to-end with browser automation via Puppeteer MCP, then commits and updates progress. JSON proved less prone to inappropriate edits than Markdown, and browser-based testing caught bugs that unit tests and curl missed.

The quest for software engineering knowledge.

Look:
Layout: