Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Patterns in AI Driven Software Development

Patterns in AI Driven Software Development

Presentation given at the Red Hat 3rd Swiss Dev Confederation, October 27th, 2026.

Avatar for Adrian Kosmaczewski

Adrian Kosmaczewski PRO

October 27, 2026

Resources

More Decks by Adrian Kosmaczewski

Other Decks in Technology

Transcript

  1. CLOUD-NATIVE & GENERATIVE AI The Intersection of Cloud-Native Complexity and

    Generative AI • Cloud-native power: Red Hat OpenShift, Quarkus, distributed systems. • Rise of generative AI: Open-source models in OpenShift AI, intelligent IDEs like Cursor. Red Hat
  2. The Intoxicating Promise vs. Uncompilable Code Reality THE PROMISE THE

    REALITY Create better software, faster. AI often generates chaotic, uncompilable messes when asked to build scalable Quarkus microservices. • • Accelerated Output: Rapid prototype generation and immediate code scaffolding. Elevated Efficiency: Automating boilerplate to focus on high-level architecture. • Broken Dependencies: Hallucinated annotations and mismatched runtime libraries. • Architectural Drift: Failure to respect Quarkus reactive patterns and cloud-native standards.
  3. UNSTRUCTURED PROMPTING The Flaws of Vibes-Based Prompting and Completion Bias

    01 02 03 Pattern Matching Vibes-Based Prompting Completion Bias LLMs are pattern-matching engines, not software engineers. "Vibes-based" prompting is essentially rolling the dice. AI suffers from completion bias, skipping crucial intermediate steps.
  4. Structured AI Workflows: Matt Pocock Relentless "Grill Me" Sessions Engage

    in rigorous interactive questioning to build and establish complete shared understanding between human and AI models. Test-Driven Development (TDD) Enforce strict TDD practices to establish firm behavioral boundaries and systematically prevent trivial AI "cheating". https://www.aihero.dev/skills
  5. Structured AI Workflows Lauren Tan's Pstack Framework 1 Cursor Plugin

    Integration Pstack operates seamlessly as a dedicated Cursor plugin built specifically for developer workflows. 2 Structured Agent Transformation Transforms unstructured AI coding agents into an engineered, highly predictable, and systematic workflow. 3 Extensive Skill System 23 SKILLS Framework Powerhouse Pstack orchestrates 23 distinct, modular skills. Each skill encodes precise context, execution rules, and domain patterns directly into the IDE agent environment. Leverages specialized operational rules to drive precision across complex development tasks. https://github.com/cursor/plugins/tree/main/pstack Red Hat
  6. Structured AI Workflows: Addy Osmani's Loop Engineering WARNING: Mitigate "intent

    debt" and avoid "cognitive surrender" by enforcing strict human-in-the-loop verification strategies. INNER LOOP OUTER LOOP (Human-Owned Verification) (AI-Owned Execution) Rapid Iteration: Fast, localized execution of low-level tasks, code generation, and scaffolding. Automated Context: Autonomous expansion of instructions using dynamic repository retrieval. High-Speed Drafts: Synthesizes complex modifications quickly, handling routine implementation detail. Strict Verification: Rigorous human review, validation of logic, architectural alignment, and correctness. Intent Preservation: Enforces design intent to stop silent divergence and quality degradation. Strategic Ownership: Maintains total human accountability for system integrity and business outcomes. https://skills.addy.ie/
  7. INTERACTION PATTERNS CHIRON CODEX Interaction Patterns for AI-Augmented Development •

    Focuses on AI-Augmented Software Development. • Formalizes how developers talk to AI. • https://www.patreon.com/cw/chironcodex Red Hat
  8. Origin & Gang of Four Analogy Creator & Origin Created

    by Dr. Graham Lee, DPhil (University of Oxford) Historical Parallel Analogous to the 1995 "Gang of Four" Design Patterns Core Value Proposition Provides a shared vocabulary for engineering standardized AI interactions and architectural structures
  9. Standardized Pattern Structure Intent Core goal and target problem statement

    addressed by the pattern. Implementation Motivation Business drivers, rationale, and context behind adoption. Examples Technical design, step-by-step guidance, and structure. Real-world usage scenarios, code samples, and reference specs. Consequences Related Patterns Trade-offs, benefits, and architectural implications. Complementary, alternative, or dependency patterns.
  10. CORE PHILOSOPHY BECOMING A SOFTWARE CENTAUR • Do not outsource

    understanding to the computer. • Become a "Software Centaur". • Actively augment expertise by orchestrating AI capabilities. Red Hat
  11. Pattern Language Formalizing Names for Industry-Wide Communication 01 02 Recognize

    Patterns Formalize Names Recognize patterns already in daily use. Formalize names to communicate ideas with colleagues easily.
  12. Mastering Context: Limits of AI Working Memory 01 02 Working

    Memory Capacity Attention Degradation Critical Limitation: AI systems operate within fixed context windows. Context Noise: Irrelevant files confuse self-attention mechanisms. An AI model's working memory bounds its ability to process, retain, and recall instructions simultaneously across large codebases or documents. Including extraneous context dilutes key details, leading to hallucinations, ignored logic, and degraded output quality.
  13. Semantic Structure Pattern • Domain Alignment: Organize codebase by •

    Targeted Context: Helps AI locate relevant problem domain vocabulary, not technological layers. code without pulling unrelated files.
  14. Guided Navigation Pattern Explicit Search Prompting Explicitly prompt AI to

    search specific files. Focus Attention Prevents attention dilution in massive environments. Scope Control Avoids sharing irrelevant source files.
  15. Clean Slate Pattern Explicit Context Reset Explicitly clear context before

    major tasks: Guarantees the LLM operates PRE-TASK ACTION with an unpolluted working memory, freeing capacity for optimal reasoning. Halt Mistake Loops Prevents AI from repeating mistakes: Cuts self-attention loops off SELF-ATTENTION PROTECTION from previous failed attempts, bad code generation, or hallucinatory context. Resource Efficiency Keeps generation time low & focused: Minimizes input token processing LATENCY & FOCUS overhead, directly accelerating response latency while sharpening task fidelity.
  16. Planning & Discovery Deep Organizational Understanding Software design requires deeply

    understanding organizational needs. Model Tendencies AI models inherently choose the path of least resistance.
  17. Stop & Plan and Disclose Ambiguity Stop and Plan Vibe

    plan before you vibe code. Disclose Ambiguity Prompt model to list assumptions and missing information.
  18. Ask for Alternatives and Model Bake-Off Ask for Alternatives Request

    multiple solutions to compare benefits and drawbacks before proceeding with implementation. Bake Off Evaluate interpretations across different assistants or models to uncover optimal trade-offs and edge cases.
  19. Baby Steps, Defer Details, and Write Down TODOs Baby Steps

    Defer Details Write Down TODOs Split large tasks into manageable chunks. Record open questions to maintain focus. Log architectural spikes for later.
  20. Quality Gates Save Output to File Declarative Artifacts Force AI

    to generate intermediate declarative artifacts (PlantUML, architecture records). Repository Storage Save directly to repository. Human Review Creates explicit review points.
  21. Generate Documentation Pattern Verify implemented behavior via reading guides. AI

    Creates Code Reading Guides Automatically generates comprehensive architectural overviews and contextual guides for complex codebases. Details Entry Points & External Interfaces Maps critical API endpoints, system boundaries, and data flow paths for developer review. Behavior Verification Compares requested specification behavior directly against actual code implementation to catch discrepancies.
  22. Quality Gates Enforce verification controls and trust automated test suites.

    Call Out Error Intervene Show explicit visual proof of failure. Stop generation and fix it yourself. Model Reviews Trust the Tests AI evaluates its own work. Let the test suite be the arbiter.
  23. Replace Vibes with Tools Pattern 01 02 03 Provide reproducible

    tools or scripts for deterministic tasks. Reduces context cost. Gives deterministic control over CI/CD pipelines.
  24. Give Examples Pattern Prefix Constraints Prompts act as prefixes constraining

    focus to clear boundaries and operational scope. Annotated Snippets Provide annotated snippets wrapped strictly in explicit <example> tags for parsing accuracy. Structural Mandates Mandates specific implementation structures (e.g., standardized Quarkus REST endpoints).
  25. Extract Prompt Pattern • Isolated Prompts: Turn corrections into isolated,

    reusable prompts. • Clear Steps: Specify steps clearly. • Scoped Execution: Invoke agent without dragging in unrelated context. 01. REUSABILITY Isolated Prompt Templates Turn corrections into isolated, reusable prompts for recurring engineering tasks. 02. PRECISION Explicit Step Logic Specify steps clearly to eliminate ambiguity and guarantee deterministic output. 03. CONTEXT CONTROL Focused Agent Scope Invoke agent without dragging in unrelated context or cluttering memory.
  26. Model Reflects & Remember What We Did 01 / REFLECTION

    02 / PERSISTENCE Model Reflects Remember What We Did AI identifies inflection points and bugs. Record choices to a persistent memory store (markdown or database).
  27. CENTAUR PATTERNS Fortifying Security with Centaur Patterns Give Examples Replace

    Vibes with Tools Mandate security in design. Embed concrete reference architectures, threat models, and secure coding patterns directly into the engineering workflow. Use deterministic analysis tools. Shift from subjective assessments to automated SAST, DAST, and continuous compliance verification routines. Model Reviews You Review Focus on OWASP Top Ten. Systematically evaluate designs against known vulnerability classes and emerging LLM attack vectors. Human oversight is the last defense. Ensure qualified experts validate critical decisions, boundary enforcement, and automated output integrity.
  28. EXAMPLE Operationalizing Patterns in Cursor • Capture patterns in .mdc

    files (.cursor/rules/). • Acts as AI's long-term memory for continuous contextual guidance. .cursor/rules/quarkus-health.mdc --description: Enforce Quarkus health check standards globs: "src/main/java/**/*.java" --- • Example: Enforcing Quarkus health check standards and OpenShift probes. # Quarkus Health & OpenShift Probes - Ensure @Liveness and @Readiness - Use HealthCheckResponseBuilder - Align with OpenShift deployment specs Red Hat
  29. CONCLUSION Reclaiming Control as a Software Centaur • Treat AI

    as a capable junior teammate, not an infallible oracle. • Stop outsourcing understanding. • Reclaim control to rapidly build, test, and deploy resilient Cloud-Native applications. Red Hat