Show HN:JsonUI – 透過程式碼結構而非提示來約束 AI 代理

Hacker News·

JsonUI 提出一種新的 AI 程式碼助手方法,利用程式碼結構和 JSON 作為單一真相來源,以強制執行一致性並防止 AI 代理違反規則,從單一定義生成跨平台程式碼和測試。

Image

The problem: AI coding assistants produce inconsistent code. Every session yields different implementations, and AI "forgets" rules mid-conversation. Prompt engineering helps, but quality still depends on how well you explain things each time.

The insight: Don't ask AI to follow rules—make it impossible to break them.

The approach:

  1. Specialized agents with strict boundaries - Instead of one AI doing everything, split responsibilities. Layout agent creates JSON UI structure (never touches data types). Data agent defines bindings (never writes business logic). ViewModel agent implements logic (never edits JSON).

  2. JSON as single source of truth - One JSON definition generates iOS native (SwiftUI/UIKit), Android native (Compose/XML), Web (React/Tailwind), tests, and docs. All in sync. Always.

  3. Cross-platform test runner - Same test JSON runs on XCUITest, UIAutomator, and Playwright.

Result: Spec, implementation, and docs stay in sync because they're generated from the same source. AI agents are productive because they have clear, narrow scopes.

Still in development. Repos:

  • Core: SwiftJsonUI, KotlinJsonUI, ReactJsonUI
  • Test runner: jsonui-test-runner (CLI + platform drivers)
  • Agents: JsonUI-Agents-for-claude

GitHub: https://github.com/Tai-Kimura

Would love feedback on the agent design approach.

Image

Hacker News

相關文章

  1. Show HN:使用AI代理進行生產環境測試

    3 個月前

  2. A2UI:Google 針對 AI 代理的聲明式使用者介面協定

    4 個月前

  3. Show HN:AI Lint – 教導程式碼代理團隊的標準,而不僅僅是語法

    3 個月前

  4. Show HN:Agentic Code – 讓 AI 編碼工具遵循真實工作流程

    7 個月前

  5. Show HN:將頂級公司的設計限制轉化為 AI 代理技能

    3 個月前