{"slug": "swiss-army-knife-part-2-ai", "title": "Swiss Army Knife, Part 2: AI", "summary": "A developer building a cross-platform side project spanning Android and Rust native apps documented an AI-assisted workflow that uses condensed \"rules\" rather than full Architecture Decision Records and Feature Decision Records to keep model context manageable. The developer found that AI-generated ADRs and FDRs, modeled on the approach used by chatto and Karpathy's LLM Wiki idea, accumulated faster than the developer could review them and contained assumptions that were sometimes wrong, so the developer moved the \"R\" in ADR and FDR to the front to create short rules describing how the system should work. The developer also reported that AI-assisted UI discovery works for iterating on native components and mocked backends, but that evaluating overarching user flows that way leads to circular prompting, so those flows were mapped in LikeC4 diagrams instead.", "body_md": "Like everyone and their dog, I cannot resist the urge to say one or two words about AI usage in my private projects (at least I am not starting a podcast about it). As laid out in my [initial plan](https://pelle.io/posts/swiss-army-knife-1/) for this project, the size and tech stacks touched in the planned solution (Android apps, Rust-based native apps) are partly way out of my comfort zone, so my plan is to also use this project to figure out an AI development process for this undertaking.\n\n# Discovery\n\nProbably the easiest (and sometimes the most fun) phase is the AI-assisted discovery. Especially for the UI part, the capabilities of current models allow me to skip the abstract design phase in tools like Figma or Sketch and directly try out concepts and feature ideas with a native look & feel across all platforms.\n\nFor someone like me who last built a native GUI application in Delphi, this allows me to quickly iterate on ideas and come up with templates and design patterns.\n\nFor example, I can create three different variants of the backup progress indicator using native components and a mocked backend, to get a feel for how each one looks and behaves.\n\n**backup progress bar iterations**\n\nIt’s important not to get lost in this process. It’s perfectly fine to flesh out the design details of my application, but in my experience, trying to evaluate overarching user flows this way leads straight into circular-prompting hell.\n\nFor those, I turned back to classic conceptual flow diagrams using [LikeC4](https://likec4.dev/), which lets me spot flows and dead ends in how users move through my application.\n\n**screen flow example for sakadmin**\n\n# Context\n\nAfter the discovery phase, I usually have a pretty good model in my head of how a certain feature should look and behave. The big question now is how to convert this model into a context an AI can read to help me with the actual implementation.\n\nI have looked at several solutions that were derived from Karpathy’s [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) idea, for example [Google’s OKF](https://cloud.google.com/blog/products/data-analytics/how-the-open-knowledge-format-can-improve-data-sharing) and especially the way [chatto](https://chatto.run) is developed, as described in this [blog post](https://www.hmans.dev/blog/chatto-is-robots).\n\nEspecially the [Architecture Decision Record](https://github.com/chattocorp/chatto/blob/main/.agents/skills/adr/SKILL.md) and [Feature Decision Record](https://github.com/chattocorp/chatto/blob/main/.agents/skills/fdr/SKILL.md) skills with their accompanying review skills led to very concise documentation of every technical and feature decision.\n\nThe issue, though, was that while each record on its own was concise, together they piled up quickly, and after a few iterations the AI had more context of how the system should look and behave than I did. The amount of generated documentation needed constant reduction to keep it at a level I could digest while still grasping the whole system (keep in mind this is a side project, not my full-time job). Looking into what the AI wrote into those documents, much of it was assumptions the AI made or derived from the current state, which were not always wrong, but sometimes were. A more rigorous review process of the ADRs and FDRs would likely have reduced those issues, but I did not want to become a full-time PO for my own side project.\n\n## Taming the context\n\nStill, this is a small side project, and not a distributed system with hundreds of developers, so I need a way to preserve context in a form I can understand without having to read the equivalent of the Lord of the Rings trilogy in ADRs and FDRs. At the same time, it has to be enough for the AI to assist me during development. To solve this, I moved the **R** in AD**R** and FD**R** from the end of the word to the front, to create **R** ules on how the system should work.\n\nThe idea is that a rule is a very condensed version of an [A|F]DR, with just enough context for human and AI: no deep context, no history, no alternatives that have been looked at, just a specification of how a certain aspect of the whole system is supposed to work now.\n\nFor example, the ~98-line ADR that described how error messages are presented on the API becomes rule `API-1`:\n\n`API-1` **One form for every error.** Errors answer `{\"errors\": [{\"code\": \"...\", \"message\": \"...\"}]}`, for each\nproblem its code, the same in every language, and one readable sentence in the language of `Accept-Language`.\n\nHow rules are built is described at length in [RULES.md](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/RULES.md), but the first five rules are the most important:\n\n```\n# Rules\n\n- `RULE-1` **A rule is a decision with an id.** A rule is one decision on how SAK is built or how it behaves, which\n  the code, the tests and the documents follow until the rule changes. Text that only explains or describes is no\n  rule. A rule is written once; other text refers to it by its id.\n- `RULE-2` **The title is the rule in short.** The title says the decision in two to eight words, e.g. **Soft delete\n  only.**, not only its subject, e.g. not **Deletes.**\n- `RULE-3` **An id is a name for good.** The prefix of an id is the name of its chapter or of its component, in\n  capitals and not shortened; one subject has one prefix in all documents. A new rule gets the next number of its\n  prefix. An id never changes and is never used again, also when its rule is deleted. A rule that moves to another\n  document gets a new id there, and every reference to it changes in the same commit.\n- `RULE-4` **Plain words in the present tense.** A rule is written in ASD-STE100 Simplified Technical English, with\n  the words of the glossary. It says what is true, in the present tense and the active voice, e.g. \"The backend keeps\n  …\", not \"The backend should keep …\". \"Never\" says what is forbidden. A rule does not use \"should\"; an example in a\n  rule comes with \"e.g.\".\n- `RULE-5` **One decision for each rule.** A rule says one decision, and why when the reason is not clear.\n```\n\nThese rules greatly help to boil down the essence of each decision. [RULES.md](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/RULES.md) lives inside the [docs/](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/) folder, which is referenced from the root [AGENT.md](https://github.com/pellepelster/swiss-army-knife/blob/main/AGENT.md). That file also holds another instruction that is vital to keep the AI in check:\n\n- Never add, change, move or delete content of\n`docs/development/` and of this file on your own, also when a change, a review or a fix makes it necessary or incorrect; the reviews in docs/development/reviews/ are the exception. Show the user the exact new text (and the old text of changed content), wait for the explicit agreement, write exactly the agreed text. An agreement is for one change; an instruction to move or to shorten text is not an agreement to its new text. When code and a rule do not agree, stop and ask.\n\nIn my experience, the rules together with the need for explicit consent from the developer help to form a dense and concise context for developers and AI that is suitable for smaller projects with a limited scope.\n\n# Implementation\n\nNow that the description of the system is persisted in the form of rules, the next step is the implementation. Before any code gets written, the AI has to find the rules that apply to the part of the system it touches, without reading all of them. Here I make use of the fact that the rules reference a hierarchy of components that make up the whole system, very much like the root AGENT.md can be refined by more detailed AGENT.md files for individual components.\n\nThe Todo app is a good example of the rule hierarchy: [UI-UX.md](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/ui-ux/UI-UX.md) defines global UI/UX rules common to all user interfaces, which are then detailed in [UI-UX-WEB.md](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/ui-ux/UI-UX-WEB.md) for web-based apps.\nThe same is true for the behaviour of the app itself: [LIST-APPS.md](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/architecture/components/LIST-APPS.md) defines how list-based apps behave in general, with the details for the Todo app in [TODO.md](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/architecture/components/TODO.md).\n\nAs usual, the root [AGENT.md](https://github.com/pellepelster/swiss-army-knife/blob/main/AGENT.md) serves as an entry point for all agents, detailing what to find where, together with some prime directives that describe universal rules that are true for the whole system. Notably, the one that had the biggest effect here (again borrowed from chatto) was:\n\n- Write all new or changed documentation in ASD-STE100 Simplified Technical English, with the vocabulary of\n[`docs/development/GLOSSARY.md`](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/GLOSSARY.md).\n\nwhich led to more concise and easier-to-read docs, and the shared [GLOSSARY.md](https://github.com/pellepelster/swiss-army-knife/blob/main/docs/development/GLOSSARY.md) led to consistent wording across all apps and docs.\n\nThe actual code writing (or generation) exposes the same issues I had with the content of `docs/development/`: I want assistance from AI, but I still want to be in control and be able to understand how the system is built on the lowest level. For my workflow, I decided against automatic PR creation and instead restricted the AI to making all changes on `main`:\n\n- All changes happen on main, except when directed otherwise\n\nThis allows me to directly see the changes in the code, and enter a local code → review → validate cycle, which benefits greatly from having both a human and an AI in the review part. While the AI is much more thorough when it comes to finding weird or hard-to-find edge cases, I often observed architectural and coding style issues while looking at the proposed implementations. Those largely (but not entirely) went away with more detailed and thus way longer rules, but then again, this moved my focus too much into managing specs, and for this project I wanted to stay close to the code.\n\nThe issues ranged from simple smells (like implementing e-mail address validation four times) to classes accumulating way too many responsibilities, to weird attempts at breaking dependency cycles using `Class.forName(<clazz>)` patterns. The code still worked and would likely have stayed maintainable for quite some time. Whether it is (or was) good is at least open for debate and also walks the fine line of taste, which I don’t want to follow up on here because it would be beyond the scope of this post.\n\n# Feedback\n\nNow, with perfectly implemented features, I needed what many AI-assisted projects lack: users. As the “IT guy” in my family, I was in the lucky position of being able to force my grocery app on my poor wife and children, scaling the user base from 1 to 5 in only 10 minutes :-), closing the development cycle with the most important thing for every project: user feedback.\n\nIn summary, after a few months of usage and roughly 70 releases during that time, I can say that AI in combination with a human (me) can catch a lot of issues that would definitely have slipped through the cracks before. But real-life usage still surfaced many issues that even a detailed review by two or three frontier models did not anticipate, even for a simple grocery app. Although most of them were minor, they included issues like content not being scrollable, data loss on device rotation and broken layouts caused by different screen sizes. That last one was especially interesting: the AI had claimed it verified the layouts with screenshots on every common device type.\n\nMy conclusion until today is, that the setups works well as a single developer and together with AI I was able to produce software with a higher (estimated) standard and fewer bugs than, before because it helped me to fill in the boring parts that I would previously have skipped due to time constraints (especially test coverage).", "url": "https://wpnews.pro/news/swiss-army-knife-part-2-ai", "canonical_source": "https://pelle.io/posts/swiss-army-knife-2/", "published_at": "2026-11-21 19:00:00+00:00", "updated_at": "2026-11-24 15:14:42.012730+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["LikeC4", "chatto", "Google", "Andrej Karpathy", "Delphi", "Figma", "Sketch"], "also_reported_by": [], "takeaway": "Replace accumulated AI-generated ADRs and FDRs with short, human-reviewed \"rules\" that condense each decision, since unreviewed records pile up faster than a solo developer can digest and embed AI assumptions that are sometimes wrong.", "recommendation": {"advice": "Keep agent context to condensed, human-reviewed rules instead of full ADR/FDR logs, and use diagram tools like LikeC4 for user flows rather than prompting the model to evaluate them.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/swiss-army-knife-part-2-ai", "markdown": "https://wpnews.pro/news/swiss-army-knife-part-2-ai.md", "text": "https://wpnews.pro/news/swiss-army-knife-part-2-ai.txt", "jsonld": "https://wpnews.pro/news/swiss-army-knife-part-2-ai.jsonld"}}