Skip to content

Structured Vibe Coding: The PAS/TDO Framework for Engineering AI Application Prompts

Sep 2026 · Zenodo (CERN European Organization for Nuclear Research)

Abstract

Abstract Generative AI (GenAI) applications are non-deterministic. That is the same input can produce different outputs from run to run, and increasingly it is the prompt, not a line of code, that stands between an unpredictable model, and a system people can rely on. Despite this, most AI-powered applications (i.e., applications with a generative-model component, however small — see P7 §7.7 for scope boundaries) are still built through informal, intuition-driven prompting, often called "vibe coding," with little connection to the requirements and design discipline that conventional software engineering (SE) treats as routine. This document brings that discipline back into the picture. It presents Structured Vibe Coding (SVC), a methodology that replaces ad hoc prompting with a structured, traceable process, along with PAS/TDO, a six-component prompt notation (Persona, Architecture, and Safety for the System Prompt; Task, Domain, and Output for the User Prompt) that refines the author's earlier three-part Instruction/Context/Constraints (ICC) framework. At the center of the framework is Source of Truth Mapping: every clause in a compiled prompt must trace back to a specific line in one of two lightweight, tiered documents — an SRS Lite (Software Requirements Specification) or an SDD Lite (Software Design Document)— rather than being written from memory or guesswork. Two mechanisms make this practical. A project's Data Flow Diagram converts directly into the Chain-of-Thought reasoning sequence given to the model, so a diagram engineers already draw becomes a derived prompt artifact rather than an invented one. And prompt development follows a two-phase lifecycle: an exploratory phase with high model temperature and loosely worded, inspirational constraints, followed by a production phase with low temperature and strict, guardrail-worded constraints, so that neither premature rigidity nor unreliable looseness takes hold. A companion Iteration Log turns production failures into a systematic, root-cause diagnostic exercise across all six prompt components, plus temperature and process-level failures —extending an earlier three-category diagnostic model. The framework is put to work in three complete, worked case studies spanning different architectural patterns and stakes: a multilingual halal ingredient classifier, a medicine label explainer for community health workers, and a retrieval-augmented job-market skills analyzer. The third case study is the most telling — it shows, rather than simply argues, that the framework needs real architectural extension, not just a drop-in adjustment, once domain knowledge comes from a live retrieval pipeline instead of static, expert-reviewed text. Beyond these three applications, the document points to a range of indirect uses for the framework's artifacts that don't require deploying any AI system at all — audit-ready compliance documentation, team onboarding material, and, in keeping with the framework's roots in software engineering, specifications that can simply be handed to a human developer. The limitations are stated as plainly as the contributions. The framework has only been validated for single-agent, largely single-interaction applications; long-running multi-turn or multi-session systems, multi-agent orchestration, large dynamic tool-use action spaces, and streaming output all remain untested. No empirical comparison against ad hoc prompting has been carried out yet. Instead, the document lays out a tiered evaluation methodology —spanning analytical, non-human empirical, and human-subject methods —covering internal effectiveness, token and cost efficiency, and external software quality against ISO/IEC 25010, as a concrete foundation for that future work. The framework is meant to engineer the AI-interaction layer of a system, not to replace the software development lifecycle around it. It is written for an international audience of students, practitioners, researchers, and engineering managers, organized so each can go directly to what matters most to them. Keywords: prompt engineering, requirements engineering, software design, generative AI applications, retrieval-augmented generation, AI safety, structured vibe coding, non-deterministic systems, software quality evaluation, software engineering education

View source

Similar papers

#artificial intelligence Conference Open access Apr 2020

ECCOLA - a Method for Implementing Ethically Aligned AI Systems

The method, ECCOLA, is presented, which aims at making the high-level AI ethics principles more practical, making it possible for developers to more easily implement them in practice.

Ville Vakkuri, Kai-Kristian Kemell, P. Abrahamsson · 64 citations · ⚡6
#computer vision Review Apr 2024

AI-powered Code Review with LLMs: Early Results

The goal is to not only refine the accuracy of the LLM-based tool but also to underscore its potential in streamlining the software development lifecycle through proactive code improvement and education.

Z. Rasheed, Malik Abdul Sami, Muhammad Waseem et al. · 62 citations · ⚡3
#computer vision Open access Mar 2024

LLM-based agents for automating the enhancement of user story quality: An early report

The use of large language models to automatically improve the user story quality in Austrian Post Group IT agile teams is explored, with a reference model for an Autonomous LLM-based Agent System developed and implemented at the company.

Zheying Zhang, M. Rayhan, Tomas Herda et al. · 48 citations · ⚡4
#computer vision Review Mar 2024

System for systematic literature review using multiple AI agents: Concept and an empirical evaluation

This paper introduces a novel multi-AI-agent system designed to fully automate SLRs, and demonstrates how it substantially reduces the time and effort traditionally required for SLRs while maintaining comprehensiveness and precision.

Abdul Malik Sami, Z. Rasheed, Kai-Kristian Kemell et al. · 44 citations · ⚡2
#computer vision Feb 2024

Can Large Language Models Serve as Data Analysts? A Multi-Agent Assisted Approach for Qualitative Data Analysis

The proposed LLM-based multi-agent system automates qualitative data analysis process, creating opportunities for researchers and practitioners, and future improvements focus on enhancing multilingual performance and integrating continuous expert feedback.

Z. Rasheed, Muhammad Waseem, Aakash Ahmad et al. · 41 citations

Related blog posts

GPT-Lab Sep 17, 2026

Beyond Prompt Engineering: The Role of Tacit Knowledge in Software Engineering

AI is making software generation faster, but speed does not remove the need for expertise. As more work is delegated to AI, tacit knowledge may become one of the most important human advantages in software engineering. The post Beyond Prompt Engineering: The Role of Tacit Knowledge in Software Engineering appeared first on GPT-Lab.

MIT News · Artificial Intelligence Sep 14, 2026

New method enables AI for safety-critical situations

The “HardFlow” algorithm could help generative AI models produce high-quality outputs that obey strict requirements when “pretty close” doesn’t cut it.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.