learntodriveai.dev/Web Development/CI/CD Pipeline and AI Tool Connection
Web Development·Project 08·6 units

CI/CD Pipeline and AI Tool Connection

**Track:** Web Dev

§ Brief

You're adding CI/CD infrastructure and an AI tool connection to a shot-tracking system for an animation and VFX studio in Singapore — building quality gates around a working codebase you didn't write.

The discipline skills: GitHub Actions pipeline configuration with lint, test, build, and deploy steps, branch-based deployment, environment variable management in CI, and connecting a PostgreSQL MCP server so AI reads the database schema directly.

The AI-direction lesson: two new things about directing AI. First, AI generates CI/CD pipelines that look complete and block nothing — steps that pass regardless of failure, secrets printed to build logs, test stages with continue-on-error: true. You verify the pipeline itself, not just its output. The quality gate only works if it actually closes. Second, connecting AI to the database via MCP changes what directing can accomplish — queries that failed because you described the schema imprecisely now succeed because AI reads it directly. But the new failure modes matter too: AI connected to a database will query eagerly, running expensive operations when you only needed the schema.

Your Role

You add infrastructure to a working system. The application already exists — Express backend, Next.js frontend, PostgreSQL database. Your job is to make it safe to change.

The CI/CD pipeline you build is the first automated quality gate in this codebase. Until now, every verification step required someone to remember to do it. The pipeline enforces quality whether anyone remembers or not.

What's New

Last time you built a museum website from scratch — rendering strategy decisions, WCAG AA accessibility, custom observability metrics, the whole architecture. You were the architect.

Two things change.

You build infrastructure around existing code. The tracking system already works. You're not building an application — you're adding the automation and tooling that protect it. This is the first time you work with a codebase you didn't write. AI accelerates code generation, but with inherited code, you spend proportionally more time on review, coordination, and understanding. The total workload doesn't shrink — it shifts.

You connect AI to real data. Every project until now, you've described your database to Claude in prompts. This project, you connect a PostgreSQL MCP server. Claude reads the schema directly. The difference in output quality is immediate — and so are the new failure modes.

Tools

  • GitHub Actions — CI/CD pipeline configuration. New.
  • PostgreSQL MCP server — first MCP connection, connecting Claude to the database. New.
  • Next.js, Express, TypeScript, PostgreSQL, Prisma — the existing stack. Continuing.
  • Vitest — tests that will run in CI. Continuing.
  • ESLint — linting that will run in CI. Continuing.
  • VS Code + Claude Code — continuing.
  • Git + GitHub — continuing.

Materials

  • Existing shot-tracking system — a working Next.js + Express + PostgreSQL application with API routes, database schema, seed data, and existing tests. This is the codebase you're protecting.
  • Pipeline template — a GitHub Actions YAML skeleton with placeholder steps. Structure only — you fill it in.
  • MCP setup reference — a brief guide to the PostgreSQL MCP server and where it's configured.
  • Project governance file — a pre-built CLAUDE.md that gives Claude context about the codebase.