{"slug": "sudoku-in-zig", "title": "Sudoku in Zig", "summary": "A developer building a full Sudoku implementation in Zig with ascii, ansi, web and Android front ends concluded that AI coding assistants \"really has no idea, and will find the 'easy' way out of any task,\" describing the tool as \"a glorified refactoring and template tool, needing full direction from a software engineering point of view.\" The developer, who used the Matt Pocock workflow with TDD slices of vertical code, said the AI repeatedly failed to respect the project's UI-agnostic command-flow abstraction, solving tasks for only one front end at a time, until a mechanical parity test that runs each front end on the same command set and compares calls and answers enforced consistency. The developer reports growing Zig knowledge substantially and now feels \"in control\" of the AI through a set of rules, procedures and mechanical tests, while acknowledging the balance is treacherous.", "body_md": "Full Sudoku implementation with multiple front ends: ascii, ansi, web, android. See [GitHub - mwigzell/sudoku-zig: Zig implementation of basic Sudoku features multiple front ends. · GitHub](https://github.com/mwigzell/sudoku-zig).\n\nMy intention was to learn Zig and also to see whether AI is reliable enough.\n\nI used the Matt Pocock workflow and TDD slices of vertical code.  I found that the AI really has no idea, and will find the “easy” way out of any task. It of course doesn’t read the codebase and retain it, so it doesn’t operate on the entire project when it thinks.\n\nThat is the downside for sure. I was able to get a set of rules and procedures and mechanical tests around it, to the point where now I feel in control of it.\n\nMy Zig knowledge has grown tremendously (a major goal), and my understanding of how an AI might be an augmentation to the software engineering process also. It is a glorified refactoring and template tool, needing full direction from a software engineering point of view.\n\nThe design of the app has a game engine that is totally UI agnostic, and via a “command flow” strategem implemented differently by each front end it is able to support both a simple “ascii” terminal and web based frontends (so far). The showcase front end is the android app.\n\nThe major issue I encountered was in having the AI take heed of the command flow abstraction.\n\nIt often solved things for just one or the other front end. I finally figured out a mechanical way to enforce parity across the frontends, using a kind of test code that runs each front end on the same command set, noting the call and answer for each, and enforcing parity.\n\nI fully admit that it is a treacherous balance, and at this point I need to dig into writing Zig more actively, having seen a fair sampling of what can be done with it.", "url": "https://wpnews.pro/news/sudoku-in-zig", "canonical_source": "https://ziggit.dev/t/sudoku-in-zig/18570#post_1", "published_at": "2026-11-24 02:21:21+00:00", "updated_at": "2026-11-24 02:44:36.725841+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["Zig", "Matt Pocock", "GitHub", "Android"], "also_reported_by": [], "takeaway": "Enforce cross-front-end parity mechanically by running every front end on the same command set and asserting identical calls and answers, since the AI otherwise solved tasks for only one front end at a time.", "recommendation": {"advice": "When an AI agent keeps breaking an abstraction across multiple front ends, add a parity test that runs each front end on the same command set and asserts identical calls and answers.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/sudoku-in-zig", "markdown": "https://wpnews.pro/news/sudoku-in-zig.md", "text": "https://wpnews.pro/news/sudoku-in-zig.txt", "jsonld": "https://wpnews.pro/news/sudoku-in-zig.jsonld"}}