Pretty much WIP, but I am experimenting with simple sequence-based workflows that are designed to frequently reset the conversation [2]
This goes well with Microsoft paper "LLMs Get Lost In Multi-Turn Conversation " that was published Friday [1].
- [1]: https://arxiv.org/abs/2505.06120
- [2]: https://github.com/hbbio/nanoagent/blob/main/src/workflow.ts
Without more information I'm very skeptical that you had e.g. Claude Code create a whole app (so more than a simple script) with 20 cents. Unless it was able to one-shot it, but at that point you don't need an agent anyway.
They're a lot like a human in that regard, but we haven't been building that reflection and self awareness into them so far, so it's like a junior that doesn't realize when they're over their depth and should get help.
Only on this website of completely reality detached individuals such an obvious comment would be needed.
Maybe consider if you don't find it useful you're working on problems that it's not good at, or even more likely, you just suck at using the tools.
Anybody that finds value out of LLMs has a hard time understanding how one would conclude they are useless and you can't "give it instructions because that's that hard part" but it's actually really easy to understand. The folks that think this are just bad at it. We aren't living in some detached reality. The reality is that some people are just better than others
Explains a lot about software quality these days.
If you feel those tips are good then you are just a bad judge of tips, there is a reason self help books sell so well even though they don't really help anyone, their goal is to write a lot of tips that sound good since they are kind of vague and general but doesn't really help the reader.
I'm sorry if you're using it wrong.
Eventually it'll do something wrong or I realize I wanted things differently, which necessitates some further conversation, but other than that, it's just "go on" until we run out of plan, then devising a new plan, rinse repeat.
Once I'm happy that the readme accurately reflects what I want to build and all the architectural/technical/usage challenges have been addressed, I let the agent rip, instructing it to build one thing at a time, then typecheck, lint and test the code to ensure correctness, fixing any errors it finds (and re-running automated checks) before moving on to the next task. Given this workflow I've built complex software using agents with basically no intervention needed, with the exception of rare cases where its testing strategy is flakey in a way that makes it hard to get the tests passing.
Just curious, could you expand on the precise tools or way you do this?
For example, do you use the same well-crafted prompt in Claude or Gemini and use their in-house document curation features, or do you use a file in VS Code with Copilot Chat and just say "assist me in writing the requirements for this project in my README, ask questions, perform a socratic discussion with me, build a roadmap"?
You said you had 'great success' and I've found AI to be somewhat underwhelming at times, and I've been wondering if it's because of my choice of models, my very simple prompt engineering, or if my inputs are just insufficient/too complex.
# Cursor Rules for This Project
You are a software engineering expert. Your role is to work with your partner engineer to maximize their productivity, while ensuring the codebase remains simple, elegant, robust, testable, maintainable, and extensible to sustain team development velocity and deliver maximum value to the employer.
## Overview During the design phase, before being instructed to implement specific code:
- Be highly Socratic: ask clarifying questions, challenge assumptions, and verify understanding of the problem and goals.
- Seek to understand why the user proposes a certain solution.
- Test whether the proposed design meets the standards of simplicity, robustness, testability, maintainability, and extensibility.
- Update project documentation: README files, module docstrings, Typedoc comments, and optionally generate intermediate artifacts like PlantUML or D2 diagrams.
During the implementation phase, after being instructed to code:
- Focus on efficiently implementing the requested changes.
- Remain non-Socratic unless the requested code appears to violate design goals or cause serious technical issues.
- Write clean, type-annotated, well-structured code and immediately write matching unit tests.
- Ensure all code passes linting, typechecking and tests.
- Always follow any provided style guides or project-specific standards.
## Engineering Mindset- Prioritize *clarity, simplicity, robustness, and extensibility*. - Solve problems thoughtfully, considering the long-term maintainability of the code. - Challenge assumptions and verify problem understanding during design discussions. - Avoid cleverness unless it significantly improves readability and maintainability. - Strive to make code easy to test, easy to debug, and easy to change.
## Design First
- Before coding, establish a clear understanding of the problem and the proposed solution. - When designing, ask: - What are the failure modes? - What will be the long-term maintenance burden? - How can this be made simpler without losing necessary flexibility? - Update documentation during the design phase: - `README.md` for project-level understanding. - Architecture diagrams (e.g., PlantUML, D2) are encouraged for complex flows.
I use auto lint/test in aider like so:
file: - README.md - STYLEGUIDE.md - .cursorrules
aiderignore: .gitignore
# Commands for linting, typechecking, testing lint-cmd: - bun run lint - bun run typecheck
test-cmd: bun run test
Since you shared yours, it's only fair to share mine :). In my current projects, two major files I use are:
[[ CONVENTIONS.md ]] -- tends to be short and project-specifics; looks like this:
Project conventions
- Code must run entirely client-side (i.e. in-browser)
- Prefer solutions not requiring a build step - such as vanilla HTML/JS/CSS
- Minimize use of dependencies, and vendor them
E.g. if using HTMX, ensure (by providing instructions or executing commands) it's downloaded into the project sources, and referenced accordingly, as opposed to being loaded client-side from a CDN. I.e. `js/library.js` is OK, `https://cdn.blahblah/library.js` is not.
[[ AI.md ]] -- this I guess is similar to what people put in .cursorrules; mine looks like this:# Extra AI instructions Here are stored extra guidelines for you.
## AI collaborative project
I'm relying on you to do a good job here and I'm happy to embrace the directions you're giving, but I'll be editing it on my own as well.
## Evolving your instruction set
If I tell you to remember something, behave differently, or you realize yourself you'd benefit from remembering some specific guideline, please add it to this file (or modify existing guideline). The format of the guidelines is unspecified, except second-level headers to split them by categories; otherwise, whatever works best for you is best. You may store information about the project you want to retain long-term, as well as any instructions for yourself to make your work more efficient and correct.
## Coding Practice Guidelines
Strive to adhere to the following guidelines to improve code quality and reduce the need for repeated corrections:
- **Adhere to project conventions and specifications**
* Conventions are outlined in file `CONVENTIONS.md`
* Specification, if any, is available in file `SPECIFICATION.md`.
If it doesn't exist, consider creating one anyway based on your understanding of
what user has in mind wrt. the project. Specification will double as a guide / checklist
for you to know if what needed to be implemented already is.
- **Build your own memory helpers to stay oriented**
* Keep "Project Files and Structure" section of this file up to date;
* For larger tasks involving multiple conversation rounds, keep a running plan of your work
in a separate file (say, `PLAN.md`), and update it to match the actual plan.
* Evolve guidelines in "Coding Practice Guidelines" section of this file based on user feedback.
- **Proactively Apply DRY and Abstraction:**
* Actively identify and refactor repetitive code blocks into helper functions or methods.
- **Meticulous Code Generation and Diff Accuracy:**
* Thoroughly review generated code for syntax errors, logical consistency, and adherence
to existing conventions before presenting it.
* Ensure `SEARCH/REPLACE` blocks are precise and accurately reflect the changes against
the current, exact state of the provided files. Double-check line endings, whitespace,
and surrounding context.
- **Modularity for Improved Reliability of AI Code Generation**
* Unless instructed otherwise in project conventions, aggressively prefer dividing source
code into files, each handling a concern or functionality that might need to be worked
in isolation. The goal is to minimize unnecessary code being pulled into context window,
and reduce chance of confusion when generating edit diffs.
* As codebase grows and things are added and deleted, look for opportunities to improve
project structure by further subdivisions or rearranging the file structure; propose
such restructurings to the user after you're done with changes to actual code.
* Focus on keeping things that are likely to be independently edited separate. Examples:
- Keeping UI copoments separate, and within each, something a-la MVC pattern
might make sense, as display and input are likely to be independent from
business logic;
* Propose and maintain utility libraries for functions shared by different code files/modules.
Examples:
- Display utilities used by multiple views of different component;
- **Clear Separation of Concerns:**
* Continue to adhere to the project convention of separating concerns
into different source files.
* When introducing new, distinct functionalities propose creating new
files for them to maintain modularity.
- **Favor Fundamental Design Changes Over Incremental Patches for Flawed Approaches:**
* If an existing approach requires multiple, increasingly complex fixes
to address bugs or new requirements, pause and critically evaluate if
the underlying design is sound.
* Be ready to propose and implement more fundamental refactoring or
a design change if it leads to a more robust, maintainable, and extensible solution,
rather than continuing with a series of local patches.
- **Design for Foreseeable Complexity (Within Scope):**
* While adhering to the immediate task's scope ("do what they ask, but no more"),
consider the overall project requirements when designing initial solutions.
* If a core feature implies future complexity (e.g., formula evaluation, reactivity),
the initial structures should be reasonably accommodating of this, even if the first
implementation is a simplified version. This might involve placeholder modules or
slightly more robust data structures from the outset.
## Project platform noteThis project is targeting a Raspberry Pi 2 Model B V1.1 board with a 3.5 inch TFT LCD touchscreen sitting on top. That touchscreen is enabled/configured via system overlay and "just works", and is currently drawn to via framebuffer approach.
Keep in mind that the Rapsberry Pi board in question is old and can only run 32-bit code. Relevant specs:
- CPU - Broadcom BCM2836 Quad-core ARM Cortex-A7 CPU
- Speed - 900 MHz
- OS - Raspbian GNU/Linux 11 (bullseye)
- Python - 3.9.2 (Note: This version does not support `|` for type hints; use `typing.Optional` instead.
Avoid features from Python 3.10+ unless explicitly polyfilled or checked.)
- Memory - 1GB
- Network - 100Mbps Ethernet
- Video specs - H.264, MPEG-4 decode (1080p30); H.264 encode (1080p30), OpenGL ES 2.0
- Video ports - 1 HDMI (full-size), DSI
- Ports - 4 x USB 2.0, CSI, 4-pole audio/video
- GPIO - 40-pin (mostly taken by the TFT LCD screen)
- Power - Micro USB 5 V/2.5 A DC, 5 V via GPIO
- Size - 85.60 × 56.5mm
The board is dedicated to running this project and any supplementary tooling. There's a Home Assistant instance involved in larger system to which this is deployed, but that's running on a different board.## Project Files and Structure
This section outlines the core files of the project.
<<I let the AI put its own high-level "repo map" here, as recently, I found Aider has not been generating any useful repo maps for me for unknown reasons.>>
-------
This file ends up evolving from project to project, and it's not as project-independent as I'd like; I let AI add guidelines to this file based on a discussion (e.g. it's doing something systematically wrong and I point it out and tell it to remember). Also note that a lot of guidelines is focused on keeping projects broken down into a) lots of files, to reduce context use as it grows, and b) small, well-structured files, to minimize the amount of broken SEARCH/REPLACE diff blocks; something that's still a problem with Aider for me, despite models getting better.
I usually start by going through the initial project ideas in "ask mode", then letting it build the SPECIFICATION.md document and a PLAN.md document with a 2-level (task/subtask) work breakdown.
And yes, I've been using gemini for the past month or two - ever since gemini-2.5-pro came out and topped the Aider benchmark. It's good, but it sure does comment excessively, including in places like quoted scripts, where those comments are a syntax error...
I've tried the current top combo from Aider's benchmarks last night - that is, o3 (high) architect + GPT-4.1 editor. It's refreshingly concise, generates much smaller diffs, but man does it burn through money - a factor 16x relative to gemini-2.5-pro-preview-05-06. Not sure if it's worth it.
I constantly have to instruct them: - Go step by step, don't skip ahead until we're done with a step - Don't make assumptions, if you're unsure ask questions to clarify
And they mostly do this.
But this needs to be default behavior!
I'm surprised that, unless prompted, LLMs never seem to ask follow-up questions as a smart coworker might.
They also added the first pass of multi-monitor support for my WM while I was using it (restarted it repeatedly while Claude Code worked, in the same X session the terminal it was working in was running).
You do need to reign them back in, sure, but they can often go multiple iterations before they're ready to make changes to your files once you've approved safe tool uses etc.
Just like humans and human organisations also tend to experience drift, unless anchored in reality.
1. clickclickclick - A framework to let local LLMs control your android phone (https://github.com/BandarLabs/clickclickclick)
Longer term, I don't think this holds due to the nature of capitalism.
If given a choice between paying for an LLM to do something that's mostly correct versus paying for a human developer, businesses are going to choose the former, even if it results in accelerated enshittification. It's all in service of reducing headcount and taking control of the means of production away from workers.