Skip to content

Capstone: Multi-Agent Dev Pipeline ​

Build a development pipeline using Antigravity: a code review agent, a test generation agent, and a documentation agent working in parallel on the same codebase. Coordinated through a Project with shared skills and GEMINI.md context. Every piece draws from the five days of the course.

What you'll learn

  • Three parallel agents: code review, test generation, and documentation, coordinated through an Antigravity Project
  • Shared skill library with PR review, test generation, and API documentation skills
  • Scheduled automation runs the pipeline on every PR and every morning

Architecture ​

The system coordinates three specialized agents through a single project configuration. This diagram maps the automation triggers and agent dependencies.

Prerequisites ​

Complete before starting:

Build it ​

Phase 1: Create the skill library ​

Three skills in .gemini/skills/:

markdown
# .gemini/skills/pr-review/SKILL.md
---
name: pr-review
description: Reviews pull requests for bugs, security issues, and style problems. Use when asked to review a PR or code changes.
version: 1.0.0
---

## Procedure
1. Read the diff using `git diff origin/main...HEAD`
2. For each changed file, check for:
   - Security vulnerabilities (injection, XSS, hardcoded secrets)
   - Logic errors (off-by-one, null checks, race conditions)
   - Style violations (against the project's GEMINI.md standards)
3. For each issue found, report file, line number, severity, and suggested fix
4. Write findings to .antigravity/shared/review.md

## Verification
Run the project's test suite after applying fixes.

Next, define the test generation skill to automate unit test coverage for new endpoints.

markdown
# .gemini/skills/test-gen/SKILL.md
---
name: test-gen
description: Generates tests for changed API endpoints. Use when asked to write tests for new or modified code.
version: 1.0.0
---

## Procedure
1. Read the diff to identify changed API endpoints
2. For each endpoint, generate tests covering:
   - Happy path (valid inputs, expected outputs)
   - Edge cases (empty inputs, boundary values, nulls)
   - Error cases (invalid inputs, missing fields, auth failures)
3. Write tests to src/__tests__/ using vitest
4. Run the test suite and fix any failures

Finally, implement the documentation skill to keep API schemas aligned with code changes.

markdown
# .gemini/skills/api-docs/SKILL.md
---
name: api-docs
description: Updates API documentation for changed endpoints. Use when API code changes.
version: 1.0.0
---

## Procedure
1. Read the diff to identify changed API endpoints
2. Update docs/api.yaml in OpenAPI 3.0 format
3. Include request/response schemas for all changed endpoints
4. Add example requests and responses
5. Verify the OpenAPI spec is valid using a schema validator

Phase 2: Create the GEMINI.md ​

Configure the project context to coordinate the agents. This file sets the boundaries and shared conventions.

markdown
# GEMINI.md
## Project: Multi-Agent Dev Pipeline
This project uses parallel agents for automated PR pipelines.

## Agent Coordination
- Code Review Agent: focus on security, correctness, and style
- Test Generation Agent: cover all changed API endpoints
- Documentation Agent: update OpenAPI docs for changed endpoints

## Shared Output
- Review findings: .antigravity/shared/review.md
- Generated tests: src/__tests__/
- Updated docs: docs/api.yaml

## Standards
- Use vitest for testing
- OpenAPI 3.0 for documentation
- Conventional commits for commit messages

Phase 3: Run the pipeline ​

In Antigravity IDE or CLI, launch three parallel agents:

Agent 1 (Code Review):
Review the current branch for bugs and security issues using the pr-review skill.
Write findings to .antigravity/shared/review.md

Agent 2 (Test Generation):
Generate tests for changed API endpoints using the test-gen skill.
Write tests to src/__tests__/. Run the test suite and fix any failures.

Agent 3 (Documentation):
Update API documentation for changed endpoints using the api-docs skill.
Update docs/api.yaml in OpenAPI 3.0 format.

All three agents run simultaneously. The agent manager shows progress for each. When they complete, review the outputs in .antigravity/shared/review.md, src/__tests__/, and docs/api.yaml.

Phase 4: Schedule the morning summary ​

/schedule "Every weekday at 9 AM: Review all PRs opened in the last 24 hours. Summarize what was merged, what still needs review, and what's blocked. Post the summary."

What goes wrong ​

MistakeHow you notice itThe fix
Agents conflict on the same fileMerge conflicts or overwritten changesAssign non-overlapping file scopes. Review reads; tests write to __tests__/; docs write to docs/
Too many agents overwhelm the systemAgents time out or produce incomplete resultsLimit to 3 agents. Use /agents to monitor resource usage
Skill not loadingAgent doesn't follow the skill procedureVerify the skill file is in .gemini/skills/ with correct YAML frontmatter. Run /skills to list available skills
Scheduled task doesn't fireNo summary at 9 AMCheck /schedules for status. Verify the schedule syntax. Check agent API access

Confirm it worked ​

  1. All three agents complete within 5 minutes
  2. Review findings are in .antigravity/shared/review.md with specific file, line, and severity
  3. Generated tests are in src/__tests__/ and pass when run
  4. API documentation is updated in docs/api.yaml with valid OpenAPI 3.0 schema
  5. Morning schedule fires and produces a summary

Module map ​

Capstone componentCourse lesson
Skill libraryThe agentskills.io Standard
Parallel agentsParallel Agents
GEMINI.md contextGEMINI.md Context Files
Scheduled automationScheduled Messages & Automation
Multi-workspace ProjectsMulti-Workspace Projects

Resource links: