Structuring AI-Assisted Programming: Lattice, SPDD, and the Double Feedback Loop

By

Introduction

AI-assisted programming has promised to revolutionize how we write code, but early experiences often fall short: AI assistants jump straight to generating code, silently make design decisions, forget key constraints mid-conversation, and produce output that rarely gets reviewed against real engineering standards. Developers are left wrestling with unpredictable outputs and inconsistent quality. However, a wave of innovative approaches is emerging to bring structure and discipline back into the process. In this article, we explore three recent developments that address these challenges: an open-source framework called Lattice, the growing interest in Structured-Prompt-Driven Development (SPDD), and a tool that leverages the double feedback loop for iterative improvement of both software and the development environment itself.

Structuring AI-Assisted Programming: Lattice, SPDD, and the Double Feedback Loop
Source: martinfowler.com

Introducing Lattice: A Structured Framework for AI-Assisted Coding

Over the past few months, Rahul Garg published a series of posts on reducing friction in AI-assisted programming. Now, he has turned those insights into an open-source framework called Lattice, designed to operationalize proven patterns. Lattice addresses the core pain points of AI coding assistants by embedding battle-tested engineering disciplines directly into the prompting workflow.

The Three Tiers: Atoms, Molecules, and Refiners

At the heart of Lattice are composable skills organized into three tiers: atoms, molecules, and refiners. Atoms represent fundamental, atomic prompts that enforce a specific engineering practice—such as adhering to Clean Architecture principles, Domain-Driven Design (DDD), or a design-first methodology. Molecules combine multiple atoms into a cohesive workflow, while refiners apply iterative improvements based on context and feedback. Together, these tiers create a layered system that ensures every AI output is grounded in real engineering standards, from secure coding to architectural consistency.

Living Context with the .lattice/ Folder

A key innovation of Lattice is its living context layer, implemented as a .lattice/ folder within your project. This folder accumulates your project’s evolving standards, design decisions, and review insights. After a few feature cycles, the atoms stop applying generic rules and instead apply your rules—informed by your project’s history and your team’s specific practices. The system gets smarter with use, turning AI assistance into a disciplined, context-aware partner rather than a black box.

Installation and Usage

Lattice can be installed as a plugin for Claude Code, or downloaded for use with any AI tool. Its modular architecture makes it easy to integrate into existing workflows, allowing teams to gradually adopt structured prompting without overhauling their entire development process.

Structured-Prompt-Driven Development Gains Traction

In a related vein, the concept of Structured-Prompt-Driven Development (SPDD) has generated significant interest. An article by Wei Zhang and Jessie Jie Xia on SPDD has seen an enormous amount of traffic and sparked many questions. To address the community’s curiosity, the authors have added a comprehensive Q&A section that answers over a dozen of the most common inquiries.

The Q&A covers topics such as how SPDD differs from traditional prompt engineering, the role of templates and schemas, and best practices for scaling structured prompts across large projects. This resource is invaluable for developers looking to move beyond ad-hoc prompting and toward a systematic, repeatable approach to AI-assisted development.

The Double Feedback Loop: Building Tools to Improve Workflow

Jessica Kerr, known online as Jessitron, recently shared a delightful tidbit about a tool she built to work with conversation logs from AI assistants. Her observations highlight a crucial insight: there are at least two feedback loops at play in AI-assisted development.

Jessitron's Tool for Conversation Logs

Jessica’s tool analyzes logs of conversations with Claude, creating an interface to review and refine interactions. She describes the first feedback loop as the development loop: Claude does what she asks, and she checks whether that is indeed what she wants. But there is also a meta-level feedback loop—the “is this working?” check that arises when she feels resistance, frustration, or tedium. These feelings are signals that the process itself can be improved.

Molding Your Development Environment

This double loop has a transformative effect: it changes not only the thing we are building (the software), but also the thing we are using to build it (the tools and workflows). As Jessica notes, “with AI making software change superfast, changing our program to make debugging easier pays off immediately.” Moreover, she adds, “this is fun!” The ability to mold one’s own development environment is a joy that many developers have lost with the rise of complex, polished IDEs. But AI agents are rekindling that sense of agency and creativity.

This concept echoes what I previously called Internal Reprogramability—a central feature of the Smalltalk and Lisp communities, where developers routinely reshaped their tools to fit the problem and their personal tastes. AI, by lowering the cost of change, is bringing that joy back. Whether through flexible prompts, custom plugins, or logs analysis, developers now have unprecedented power to tailor their development environment.

Conclusion

The challenges of AI-assisted programming are real, but so are the solutions. Frameworks like Lattice bring engineering discipline back into the loop; SPDD offers structure at the prompting level; and tools that leverage double feedback loops empower developers to continuously improve both their code and their workflow. Together, these approaches represent a maturation of AI-assisted development—moving from experimental novelty to reliable, professional practice. As we continue to explore this space, the key takeaway is clear: structured frameworks and iterative refinement are the keys to harnessing AI’s potential without sacrificing control.

Tags:

Related Articles

Recommended

Discover More

How to Foster Amiability in Online Communities: Lessons from the Vienna CirclePython 3.15.0 Alpha 2: What Developers Need to KnowNavigating FDA's New Compounding Restrictions on Semaglutide and Tirzepatide: A Comprehensive GuideKubernetes v1.36 'Haru' Brings 70 Enhancements: Stable, Beta, and Alpha Features AnnouncedAWS Unveils Enhanced Console Customization: Color-Code Accounts, Hide Unused Regions and Services