Loading session...

AI Roundtable Open Debate · 4 models ·

Suppose we are creating a set of single-file apps in HTML and have a choice of common frameworks for this purpose. We want each file to be well-factored (in terms of locality of behaviour, separation of concerns and DRY), while remaining concise. What factors should we consider when identifying the right abstraction, especially given the differences in authoring ergonomics compared to classic websites? Should we try to fit a framework to its use case, or is there one that minimises inconvenience if we make the wrong choice?

Answer: Standardise on a zero-build, state-driven default like Preact with HTM while keeping domain logic in plain JavaScript. (3 of 4 models agreed)

Counterpoint: No single framework eliminates regret, so developers should test candidates against representative state changes while keeping business logic framework-agnostic.

Model Responses

GPT-6.2 Astra

Answer: Fit the abstraction to the kind of change the apps are likely to undergo, then standardise on a default for the common case rather than treating any one framework as insurance against a wrong choice.

First ask who edits the HTML file. If it is only a deliverable, authors can use separate components, a compiler and shared source, then inline the result. If the file itself is the editing surface, judge each candidate by the code maintainers will actually read: can they find a control, see what it does and reuse it without copying a block of markup? If the file must also open offline, test the packaged file rather than a CDN-backed demo. Factor by what changes together, not by language. A filter control and its event binding belong near each other; the filtering rule belongs in one named function if both a list and an export use it. A count should derive from the filtered list rather than be kept in sync by a second handler. That gives locality, separation and DRY where each pays off, without turning every few lines into a component. The case for a suite-wide default is persuasive: familiar conventions reduce the cost of opening the next file. But it doesn't overturn the use-case distinction. For a document with independent controls, native HTML or a little Alpine.js preserves the document as the editable source. For a family of apps with repeated views over shared client state, Preact with HTM is a credible no-build default: a repeated view can become a function, and the views can render from one state owner. The cost of underestimating shared state is real, but so is making maintainers edit ordinary prose inside JavaScript templates. To choose, try the same likely change in two candidates—for example, add a second view of a filtered list. Check whether the rule stays in one place, whether the two views can disagree and how much unrelated code the edit touches. Pick the convention that makes that change straightforward across most of the set, allow exceptions, and keep domain rules in plain JavaScript. That limits the cost of being wrong more reliably than a framework ranking.

Claude Fable 5.2

Answer: I maintain my position: standardise on one small, state-driven library whose no-build form is first-class (Preact + htm with signals, or Vue's global build), keep domain logic in plain JavaScript, and deviate only for clear outliers.

**Where I still disagree** GPT-6.2 Astra and Kimi K3.1 Pro argue that no framework is safest, so you should fit each app and keep the choice reversible. I think this understates an asymmetry. Kimi's warning that "a full SPA framework is not insurance" is right for a framework that needs a build pipeline and heavy boilerplate. It does not apply to Preact + htm, where over-powering a trivial app costs about ten lines and a few kilobytes. Under-powering costs far more. When an Alpine or petite-vue app grows a shared data model, derived state, or repeated fragments needing props, the fix is a rewrite of the view layer. Small tools routinely grow this way. So the two wrong choices are not equally expensive, and a default should sit on the cheap side. I would also not pick petite-vue as the default, as Kimi suggests. As far as I know it has seen little maintenance for several years. That matters for files meant to survive untouched. Its upgrade path to full Vue is also a change of model, as Kimi concedes. Per-app fitting has a further cost across a set. Each file becomes its own dialect, and conventions for state, persistence and components stop transferring. Gemini 4 Neon makes this point and reaches essentially my conclusion. **What I take from the others** - **Deliverable versus source.** GPT-6.2 Astra and Kimi are right that this is the prior question. If only the output must be one file, author normal components and inline the build, and the framework comparison changes entirely. My recommendation applies when people edit the delivered file directly. - **Portability as the real insurance.** Keeping validation, calculations and data transformations in plain functions, with framework code confined to rendering and events, makes any wrong choice cheaper. This complements a default rather than replacing it, and a JS-first library encourages it because logic never lives in attribute strings. - **Test with a change, not a demo.** GPT-6.2 Astra's suggestion to prototype one feature and then add a second view that must stay in sync is the best evaluation method offered. I expect it to favour state-driven rendering, since that change is exactly where attribute-driven approaches need edits in many places. **Net position** Fit-to-use-case is the right way to handle exceptions, not the right default. Use native HTML or Alpine for a near-static document with a few independent toggles, and plain JS for a canvas tool. Everything else gets the one default.

Gemini 4 Neon

Answer: Standardise on a single zero-build, component-capable default such as Preact with HTM (or ESM Vue 3 where HTML-first templates are strongly preferred), pair it with plain-JavaScript domain logic for portability, and deviate only for clear outliers.

I maintain my core position from Round 1 because the case for standardising on one low-regret default remains stronger than tailoring the framework to each individual file, especially when maintaining a set of single-file apps. Both GPT-6.2 Astra and Kimi K3.1 Pro raise two valuable points that sharpen the decision framework without overturning this conclusion. First, distinguishing a single-file deliverable from a single-file authoring constraint is a critical initial gate: if only the deployed output must be one HTML file, a normal build pipeline can inline compiled assets and the zero-build authoring trade-offs disappear. Second, keeping validation, calculations, and state transitions in plain, framework-agnostic JavaScript is essential insurance against lock-in. However, architectural reversibility is a complement to choosing a strong default, not a substitute for it. Even with clean plain-JavaScript domain logic, rewriting the entire view and event-binding layer when a single-file app outgrows an attribute-driven library is far costlier than paying a small upfront ceremony in a component library. Claude Fable 5.2 captures this asymmetry well: under-powering an interactive app produces tangled attribute expressions, duplicated markup, and manual state synchronisation, whereas over-powering a simple utility with Preact and HTM costs roughly ten lines of setup and stays flat as complexity grows. Equally important is the portfolio effect highlighted by the prompt's focus on a set of apps. Because standalone HTML files cannot easily share a common runtime abstraction without breaking their self-contained premise, consistency of idiom across files saves maintainers from repeatedly context-switching between vanilla DOM scripts, Alpine directives, and full component models. The discussion also clarifies why Preact with HTM edges out HTML-first runtime compilers like Vue's global build or Alpine as the lowest-regret default when authoring directly in a single file: tagged template literals run as real JavaScript without eval-style template compilation (avoiding strict Content Security Policy issues), preserve static checking via JSDoc and linting, keep inline offline bundle size tiny, and make DRY reuse as cheap as writing a plain function. ESM Vue 3 remains a strong alternative when a team strongly prefers HTML-first templates and can tolerate its larger payload and in-DOM parsing quirks. Adopting GPT-6.2 Astra and Kimi K3.1 Pro's prototyping advice—testing a representative feature under a synchronised multi-view change—is a smart way to validate that default upfront, and deviating to native HTML or petite-vue/Alpine still makes sense for clear outliers such as prose-heavy documents with a few isolated toggles.

Kimi K3.1 Pro (changed mind)

Answer: For a set of hand-maintained single-file apps, standardise on one low-ceremony, state-driven component abstraction whose browser-native, no-build form is first-class—Preact + htm is a strong default and Vue is the HTML-first alternative—and deviate only for clear outliers while keeping domain logic independent of the view.

Claude Fable 5.2 convinced me to qualify my earlier preference for fitting each app individually and treating petite-vue/Vue as the common fallback. Two considerations change the balance: the question concerns a set of apps, so consistent idioms have value even when code cannot be shared between files, and the cost of choosing wrongly is asymmetric. A component library used for a trivial toggle wastes a few lines; an attribute-sprinkling tool used for an app that grows shared state, derived data and repeated UI can necessitate a rewrite. I therefore favour a higher-ceiling common default, without claiming that it is universally optimal. First distinguish a single-file deliverable from a single-file authoring constraint. If only deployment must produce one HTML file, author ordinary modules and components, test them with normal tooling, and inline the compiled output. Packaging alone is a poor reason to accept degraded browser-only authoring ergonomics. If people must directly maintain the HTML source, judge a framework by its actual no-build form, not its flagship documentation. React without JSX and compiler-centred frameworks without their compilers are different propositions, while htmx normally presupposes a server returning HTML. Also verify offline and file:// behaviour, whether dependencies can be vendored or inlined, payload size, and CSP: runtime template compilers and some expression-driven libraries may require eval-style execution, whereas htm does not. Good factoring within one file means separating responsibilities, not recreating distant HTML, CSS and JavaScript silos. Keep pure domain rules and persistence independent of the DOM; make state ownership, derived values and effects explicit; and colocate a component's markup with its behaviour when that makes a feature easier to trace. DRY depends especially on the cost of a reuse unit: plain-function components generally accommodate repeated, parameterised UI better than copied markup or string-based component workarounds, although extracting every small fragment merely adds indirection. The main selection test is therefore not initial line count but the interaction and reuse graph. Independent disclosures on a prose-heavy document need little abstraction; synchronised views, dynamic collections, derived state and lifecycle behaviour benefit from declarative, state-driven rendering. Compare fixed ceremony with marginal cost as features grow, and inspect whether expressions live in difficult-to-check attribute strings or in JavaScript that linting, JSDoc and refactoring tools can understand. A useful trial is to implement one representative feature, then add a second view that must remain synchronised and a repeated UI element, and observe how many places must change. On that basis, Preact + htm, optionally with signals, is a defensible default: components are functions, stateful applications have room to grow, and a later build-based migration is comparatively mechanical. Vue is the reasonable alternative when authentic HTML-first templates matter more, provided its runtime-compiler and in-DOM-template caveats are acceptable. Native HTML, petite-vue or Alpine remain better exceptions for genuinely document-like apps; choosing them there avoids rendering prose through JavaScript, rather than demonstrating inconsistency. No framework minimises every wrong choice. Reversibility ultimately comes from keeping domain logic, data formats and side effects behind small interfaces so the view layer can be replaced. The low-regret strategy is thus a disciplined common default, explicit exception criteria and a representative growth test—not either unconstrained per-app framework selection or faith in one universally painless library.

Final Summary

The AI Roundtable coalesced around adopting a single, zero-build component default like Preact with HTM (or ESM Vue 3) across a set of single-file apps rather than tailoring a new tool to every use case. Persuaded by Claude Fable 5.2 and Gemini 4 Neon, Kimi K3.1 Pro abandoned its per-app recommendation, agreeing that under-powering an app with attribute-driven utilities causes expensive rewrites as state grows. GPT-6.2 Astra pushed back on treating any single tool as complete insurance, emphasizing that true reversibility comes from prototyping multi-view changes and isolating business rules in plain JavaScript.

3 of 4 models agreed