{"slug": "specification-files-for-agents", "title": "Specification Files for Agents", "summary": "A developer reports that writing detailed Markdown specification files and having an LLM generate code from them produces reliable output, using the Qwen 3.8 27B model (Bonsai Ternary 2) for functions such as parse_settings and parse_prompt that return a known struct type. The developer notes code generation takes about half an hour even for short 150-line outputs, that specifications can be reused across models including frontier cloud models, and that an LLM can debug a specification to resolve inconsistencies. The approach shifts maintenance from the actual code to the specifications themselves.", "body_md": "Something about **AI-based** code generation seems **lazy** or sloppy. After all, \"vibe-coding\" is often used to convey poor quality. And giving an AI agent short, poorly-reasoned prompts tends to give at best **inconsistent results**.\n\nRecently I started experimenting with writing detailed **specification files** (in Markdown) and having an LLM **generate** the required code. I have found using a single function, like `parse_settings` or `parse_prompt`, along with a known `struct` type that is returned is a good strategy.\n\nSome notes:\n\n• I can get reliable output from Qwen 3.8 27B (actually Bonsai Ternary 2).\n\n• Code generation takes about half an hour even for short 150-line outputs.\n\n• I can switch models (for example, using a frontier model in the cloud) and the specifications can be reused.\n\n• I can just maintain the specifications instead of the actual code, which could be simpler.\n\n• It is possible to use an LLM to \"debug\" a specification and resolve any inconsistencies, which is an important step in this approach.", "url": "https://wpnews.pro/news/specification-files-for-agents", "canonical_source": "https://www.dotnetperls.com/2026_9_22_specification-files-agents", "published_at": "2026-09-22 07:00:00+00:00", "updated_at": "2026-09-22 18:55:52.851487+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "generative-ai", "developer-tools"], "entities": ["Qwen 3.8 27B", "Bonsai Ternary 2", "parse_settings", "parse_prompt"], "alternates": {"html": "https://wpnews.pro/news/specification-files-for-agents", "markdown": "https://wpnews.pro/news/specification-files-for-agents.md", "text": "https://wpnews.pro/news/specification-files-for-agents.txt", "jsonld": "https://wpnews.pro/news/specification-files-for-agents.jsonld"}}