CC-301g · Module 1
Pipeline Design Principles
4 min read
A CI/CD pipeline has three phases where Claude Code adds value: pre-merge review, post-merge validation, and failure remediation. Each phase has different latency requirements and different risk profiles. Pre-merge review can take minutes — developers are waiting for feedback, but the code has not shipped yet. Post-merge validation must be fast — the code is on its way to production and you need to catch problems immediately. Failure remediation is reactive — something broke and you need it fixed now.
The architectural principle is: Claude Code should never be in the critical path of deployment. It should be in the quality path. A pipeline that blocks deployment on Claude completing a review is fragile — if the API is slow or down, your deployment halts. A pipeline that runs Claude review in parallel with your existing checks adds quality without adding latency. The review posts comments on the PR. A human reviews the comments. Deployment proceeds through the existing gates.
Do This
- Run Claude review in parallel with existing CI checks
- Use Claude for quality feedback, not deployment gates
- Design for API unavailability — Claude down should not block deploys
- Separate review workflows from build/test/deploy workflows
Avoid This
- Make Claude review a blocking step in the deployment pipeline
- Replace existing linting and testing with Claude review
- Assume the Claude API will always be available and fast
- Combine AI review with build steps in the same job — they have different failure modes