$git clone https://github.com/Varietyz/Disciplined-AI-Software-Development</div>
| 1 | <div align="center"> |
| 2 | |
| 3 | <img src="https://banes-lab.com/assets/images/banes_lab/700px_Main_Animated.gif" width="70" /> |
| 4 | |
| 5 | <a href="https://github.com/Varietyz/Disciplined-AI-Software-Development">Disciplined AI Software Development Methodology</a> © 2025 by <a href="https://www.linkedin.com/in/jay-baleine/">Jay Baleine</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> <img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="" width="16" height="16"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="" width="16" height="16"><img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt="" width="16" height="16"> |
| 6 | |
| 7 | </div> |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | > **📘 Using CLI-based AI models?** (Claude Code, Cursor, Windsurf, etc.) |
| 12 | > |
| 13 | > This documentation covers web browser AI collaboration. For CLI agents with tool access, **[PAG (Pattern Abstract Grammar)](https://banes-lab.com/pag)** is an AI first language with explicit validation gates, phase sequencing, and constraint enforcement designed for agentic workflows. |
| 14 | > |
| 15 | > **PAG** expands on this methodology with formal grammar, tool invocation patterns, orchestration templates, and algorithm loop documentation. Visit **[banes-lab.com/pag](https://banes-lab.com/pag)** for the complete specification. |
| 16 | > |
| 17 | > **PAG Documents:** [PAG-COLLABORATION.md](PAG-COLLABORATION.md) | [PAG-AGENT-ORCHESTRATION.md](PAG-AGENT-ORCHESTRATION.md) |
| 18 | |
| 19 | --- |
| 20 | |
| 21 | # Disciplined AI Software Development - Collaborative |
| 22 | |
| 23 | A structured approach for working with AI on development projects. This methodology addresses common issues like code bloat, architectural drift, context dilution, and behavioral inconsistency through systematic constraints and behavioral enforcement. |
| 24 | |
| 25 | ## The Context Problem |
| 26 | |
| 27 | AI systems work on Question → Answer patterns. When you ask for broad, multi-faceted implementations, you typically get: |
| 28 | |
| 29 | - Functions that work but lack structure |
| 30 | - Repeated code across components |
| 31 | - Architectural inconsistency over sessions |
| 32 | - Context dilution causing output drift |
| 33 | - Behavioral pattern degradation across extended sessions |
| 34 | - More debugging time than planning time |
| 35 | |
| 36 | ## How This Works |
| 37 | |
| 38 | The methodology uses four stages with systematic constraints, behavioral consistency enforcement, and validation checkpoints. Each stage builds on empirical data rather than assumptions. |
| 39 | |
| 40 | **Planning saves debugging time.** Planning thoroughly upfront typically prevents days of fixing architectural issues later. |
| 41 | |
| 42 | ### Instruction Format Options |
| 43 | |
| 44 | This methodology supports multiple instruction formats: |
| 45 | |
| 46 | - **Prose (Markdown/XML)**: Natural language with structural headings. Paste directly into web-based AI chat interfaces. |
| 47 | - **PAG (Pattern Abstract Grammar)**: Structured instruction syntax using explicit keywords (`READ`, `WRITE`, `SET`, `VALIDATE`). Reduces interpretive ambiguity through code-like patterns. Effective for CLI-based AI agents or when explicit constraints matter. |
| 48 | |
| 49 | The principles remain identical; choose the format that matches your AI interface. |
| 50 | |
| 51 | ## The Four Stages |
| 52 | |
| 53 | ### Stage 1: AI Behavioral Configuration |
| 54 | |
| 55 | Deploy systematic behavioral consistency and constraint enforcement: |
| 56 | |
| 57 | 1. **Configure AI Custom Instructions:** |
| 58 | |
| 59 | Set up [AI-PREFERENCES.XML](prompt_formats/software_development/XML/AI-PREFERENCES.XML) as custom instructions. This establishes behavioral constraints and uncertainty flagging with ⚠️ indicators when the AI lacks certainty. |
| 60 | |
| 61 | 2. **RECOMMENDED: Load Persona Framework:** |
| 62 | |
| 63 | Upload [CORE-PERSONA-FRAMEWORK.json](persona/JSON/CORE-PERSONA-FRAMEWORK.json) and select domain-appropriate persona: |
| 64 | - **[GUIDE-PERSONA.json](persona/JSON/persona_plugins/GUIDE-PERSONA.json)** - Methodology enforcement specialist (prevents vibe coding) |
| 65 | - **[TECDOC-PERSONA.json](persona/JSON/persona_plugins/TECDOC-PERSONA.json)** - Technical documentation specialist |
| 66 | - **[R&D-PERSONA.json](persona/JSON/persona_plugins/R&D-PERSONA.json)** - Research scientist with absolute |