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

Quality Gates in the Age of Agentic Coding

Quality Gates in the Age of Agentic Coding

AI agents are revolutionising how we code, prompting, accepting, and shipping at unprecedented speed. But with great velocity comes great responsibility. This presentation explores why traditional engineering practices, such as quality gates and Git hooks, aren't just relevant in the AI era—they're absolutely critical.

What You'll Learn:
- Why AI-accelerated development amplifies both productivity AND technical debt.
- How quality gates act as essential safeguards in agentic coding workflows.
- Practical git hooks configuration for AI-assisted development teams.
- Strategic GenAI prompts for intelligent quality gate setup
Real-world strategies for balancing velocity with reliability.

Key Takeaways:
- The hidden risks of context-only AI development
- Step-by-step git hooks implementation guide
- Two-part GenAI prompt framework for comprehensive quality control
- Production-ready practices for scaling AI-assisted development

Perfect for engineering leaders, DevOps practitioners, and development teams embracing AI tooling while maintaining code quality standards. Learn how to guide the future of development rather than just riding the wave.

Avatar for Hélio Medeiros

Hélio Medeiros

July 18, 2025
Tweet

More Decks by Hélio Medeiros

Other Decks in Programming

Transcript

  1. Quality Gates in the Age of Agentic Coding Ensuring code

    quality while harnessing the speed of AI-assisted development by Helio Medeiros
  2. The old-new safety. After vibecoding and co-creating with AI, I've

    been saved over and over by quality gates. As we embrace AI collaboration, the safety nets beneath us become more critical than ever before.
  3. Why This Matters Agentic coding is remarkably fast, but inherently

    fragile AI lacks awareness of architecture debt, edge cases, and retry logic nuances Traditional engineering practices matter more, not less, in the AI era Without guardrails, velocity becomes a liability rather than an asset
  4. What Are Quality Gates? A quality gate acts as a

    checkpoint that validates your code meets specific criteria before allowing it to progress to the next stage in your development pipeline. Effective gates serve as safety barriers that protect both the codebase and the engineers working within it, especially when code generation speeds have increased dramatically. 1 Code Style Consistent formatting and adherence to team standards 2 Test Coverage Sufficient tests to validate behaviour across edge cases 3 Security Scans No known vulnerabilities or injection vectors 4 Maintainability Code that future humans (and AI) can understand
  5. Common Quality Gates Gate Purpose Linting Enforce code style and

    catch syntax errors early Unit tests Validate behaviour and protect against regressions Static analysis Detect complexity, code smells and potential bugs Security checks Prevent known vulnerabilities from entering production Dependency checks Avoid disallowed libraries and vulnerable packages Each gate provides a specific type of protection, creating multiple layers of defence against defects.
  6. GenAI Prompts for Individual Quality Gates Help me set up

    code linting and auto-formatting for my [TECHNOLOGY] project. I need: - Popular linter configuration (ESLint, Pylint, golangci-lint, etc.) - Auto-formatter setup (Prettier, Black, gofmt, etc.) - Git hook integration for pre-commit validation - IDE integration instructions - Team-shareable configuration files Linting & Formatting Configure comprehensive test coverage checking for [TECHNOLOGY]. Include: - Coverage tools setup (Jest, pytest-cov, go test -cover, JaCoCo) - Minimum threshold configuration (80%+ recommended) - Coverage reports in multiple formats (HTML, XML, JSON) - Integration with git hooks to block low-coverage commits - CI/CD pipeline integration Test Coverage
  7. GenAI Prompts for Individual Quality Gates Implement security vulnerability scanning

    for [TECHNOLOGY] project: - Dependency vulnerability scanning (npm audit, safety, snyk) - Static application security testing (SAST) tools - Secret detection in code and commits - License compliance checking - Integration with pre-commit hooks and CI/CD Security Scanning Set up static code analysis for [TECHNOLOGY] to catch: - Code complexity metrics (cyclomatic complexity, cognitive complexity) - Code smells and anti-patterns - Technical debt indicators - Performance bottlenecks - Maintainability scores - Integration with git hooks and IDE Static Code Analysis
  8. The Agentic Coding Flow Prompt AI Describe what you need

    and wait for code generation Accept Code Take the AI-generated solution with minimal review Auto-commit Commit changes without running tests locally Auto-push Push to repository without additional checks No testing? No review? No safeguards?
  9. The Risks Limited Context AI lacks system-wide architectural understanding and

    project history Pattern Propagation Bad patterns can be reused and spread throughout the codebase Main Branch Pollution Changes go straight to main without proper validation steps Cascading Failures Small mistakes become significant problems at scale
  10. Git Commit & Push Recap git add . git commit

    -m "fix: retry logic" git push origin main Each step is a signal: "I believe this is safe." But when working with AI-generated code, are you truly confident in that assertion? Or are you passing responsibility to future you and your teammates?
  11. What Are Git Hooks? Git hooks are scripts that run

    automatically at specific points in your git workflow, acting as enforcers of your quality gates. They intercept git commands and can either allow them to proceed or stop them based on whether your code passes specific checks. pre-commit Runs before a commit is created, ideal for linting and formatting commit-msg Validates commit message format for consistency pre-push Executes before code is pushed to remote, perfect for tests
  12. How to Configure Git Hooks cd .git/hooks touch pre-commit chmod

    +x pre-commit #!/bin/sh npm run lint npm test Sample script: These simple scripts can be the difference between a stable codebase and a chaotic one, especially when collaborating with AI. npx husky add .husky/pre-commit \ "npm run lint && npm test" Modern tools like Husky make hook management even easier:
  13. GenAI Prompt for Project-Aware Hook Configuration This comprehensive prompt enables

    AI assistants to analyze your existing setup and build intelligent git hooks tailored to your project. You are an expert DevOps engineer and code analyst. I need you to analyze my project and create intelligent git hooks. Please: **STEP 1: Project Analysis** Examine my project structure, package files, and existing configurations to identify: - Programming language(s) and frameworks in use - Existing quality tools already configured (linters, formatters, test runners) - Build system and dependency management - Current CI/CD setup (if any) - Testing framework and coverage tools - Security tools and static analyzers **STEP 2: Gap Analysis** Compare my current setup against industry best practices and identify: - Missing quality gates that should be implemented - Existing tools that need better integration - Performance optimization opportunities - Team workflow improvements **STEP 3: Hook Strategy Design** Recommend the optimal hook strategy: - Which checks should run on pre-commit vs pre-push - How to balance speed vs thoroughness - Fallback strategies for different development scenarios - Integration with existing CI/CD pipelines **STEP 4: Implementation** Generate production-ready hook scripts that: - Use existing project tools and configurations - Add missing quality gates with sensible defaults - Implement fail-fast with clear error messages - Include performance optimizations (parallel execution, caching) - Are cross-platform compatible - Include setup instructions for the entire team Please analyze the project first, then provide the complete implementation with explanations for each decision. This detailed prompt ensures the AI understands your context and delivers robust, integrated quality gates, rather than generic configurations.
  14. Hooks + Quality Gates When combined effectively, git hooks and

    quality gates create a powerful safety system that: Catches issues early in the development cycle Prevents regressions and security vulnerabilities Protects your team from silent failures and technical debt Allows you to move quickly while maintaining stability Offers immediate feedback on AI-generated code quality
  15. Final Thoughts 10x Productivity Boost AI helps you write more

    code with less effort 85% Issue Reduction Quality gates help you ship better, more reliable code 100% Automation Git hooks do the checking when you forget As AI code generation becomes more powerful, our quality gates must evolve in parallel.
  16. Try This Prompt Act as my AI engineer. List the

    quality gates I should check before committing this change. You're not fighting the future. You're guiding it. Embrace AI-assisted development, but surround it with thoughtful quality gates.