---
season: 3
season_name: "Season 3 — October 2026 (Autumn / Halloween Edition)"
day: 30
title: "Continuous Alignment: Catch Regressions Before Production"
summary: "Gate pre-deploy updates with golden-dataset policy rubrics and audit live production sessions with AQuA."
tags: ["Phase 6: Day 2 Operations", "AQuA", "Evaluation", "Alignment"]
canonical_url: "https://adventofagents.com/2026/10/30"
markdown_url: "https://adventofagents.com/2026/10/30.md"
video_url: "https://www.youtube.com/embed/gni4FsXTDgs"
primary_video:
  title: "Day 30: Continuous Alignment: Catch Regressions Before Production"
  creator_name: "Ali Beydoun"
  duration: "11:37"
  video_url: "https://www.youtube.com/embed/gni4FsXTDgs"
---

# 🎃 Day 30: Continuous Alignment: Catch Regressions Before Production

> **Season 3 — October 2026 (Autumn / Halloween Edition)** · [Interactive Web View](https://adventofagents.com/2026/10/30?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s3_2026&utm_content=day30) · [Raw Markdown](https://adventofagents.com/2026/10/30.md?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s3_2026&utm_content=day30)

**Summary:** Gate pre-deploy updates with golden-dataset policy rubrics and audit live production sessions with AQuA.

**Day 30 of Google's Advent of Agents — Season 3**

When you update a production agent's prompt, model, or `SKILL.md` instructions to make responses faster or more conversational, the agent can still pass standard unit tests and return `HTTP 200 OK` while silently dropping mandatory business rules. In today's kata, a neighborhood Trick-or-Treat audit agent (`candy_auditor`) gets a routine prompt update that keeps its festive tone score at `5.0/5.0`, yet silently stops calculating unit pricing (`$/treat`) and ignores unwrapped peanut bowls sitting right next to a "Peanut-Free" sign. Because nothing crashes and no error is logged, uptime dashboards stay green while users receive unsafe or non-compliant answers.

**How It Works**

**Continuous Alignment** closes this gap across two stages: a pre-deploy regression gate in CI/CD and post-deploy ambient auditing in Google Cloud. Before an update ships, **Gemini Platform Evaluation Service** grades agent traces from a golden dataset against explicit 1-to-5 `PointwiseMetric` policy rubrics and returns a Judge rationale whenever a threshold fails. Once the agent is deployed to **Agent Runtime**, **Ambient Quality Agent (AQuA)** runs alongside it in your Google Cloud project (daily and 15 minutes after every deploy), reading session telemetry and the deployed source snapshot in Cloud Storage and writing verified findings to BigQuery.

![Continuous Alignment pre-deploy policy gate and post-deploy AQuA architecture](/s03/s3-day30-continuous-alignment.png)

- **Pre-Deploy Policy Gate**: Run automated `EvalTask` pipelines against curated golden datasets (`HOUSE-1031`, `HOUSE-666`, `HOUSE-404`) to block subtle behavioral regressions (`cost-per-treat < 4.0` or `neighboring-allergen-risk < 4.0`) before any code, prompt, or `SKILL.md` update reaches production.
- **Post-Deploy Ambient Quality (AQuA)**: Continuously evaluate sampled production conversations across a 9-question compliance checklist, cluster findings by root cause, re-verify transcripts to drop false positives, and pinpoint the exact offending line in `candy_auditor/agent.py` with a 14-day resolution clock.

**Resources:**

- [AQuA: An Ambient Quality Agent That Diagnoses Your Production Agent](https://g.dev/cloud/adventofagents-season3-blog-aqua-ambient-quality-agent)
- [Gemini Platform Evaluation Service](https://g.dev/cloud/adventofagents-season3-docs-genai-evaluation-overview)
- [ADK Documentation and SkillToolset Guide](https://g.dev/cloud/adventofagents-season3-docs-adk)
- [Agent Starter Pack Templates](https://g.dev/cloud/adventofagents-season3-agent-starter-pack)
- [Day 30 Kata Repository (advent-of-agents-day30)](https://g.dev/cloud/adventofagents-season3-day30-demo)

## Code & Commands

### Run the Pre-Deploy Policy Gate & Post-Deploy AQuA Kata

```bash
# Clone the Day 30 Kata repository:
git clone https://github.com/minimaximus/advent-of-agents-day30.git
cd advent-of-agents-day30

# 1. Run Pre-Deploy Golden-Dataset Policy Gate (catches 1.33 & 1.00 policy regressions)
#    Use `make eval` with GOOGLE_CLOUD_PROJECT set to grade via cloud EvalTask
make kata
make explain

# 2. Restore SKILL.md compliance rules and re-verify (passes at 5.00 / 5.0)
make fix
make kata

# 3. Run Post-Deploy AQuA 3-stage audit across 1,240 production Halloween sessions
#    (use `python3 -m eval_harness.run_aqua --live` for live Gemini Agent diagnosis)
make aqua
```

### Define the Halloween Candy Auditor Agent with ADK SkillToolset

```python
from google.adk.agents import Agent
from google.adk.models import Gemini
from google.adk.skills import load_skill_from_dir
from google.adk.tools.skill_toolset import SkillToolset

skill_toolset = SkillToolset(
    skills=[
        load_skill_from_dir("candy_auditor/skills/analyze-porch-tier"),
        load_skill_from_dir("candy_auditor/skills/analyze-candy-value"),
        load_skill_from_dir("candy_auditor/skills/analyze-allergen-safety"),
    ],
    additional_tools=[bowl_tool, trade_tool],
)

candy_auditor_agent = Agent(
    name="candy_auditor_agent",
    model=Gemini(model="gemini-3.8-flash"),
    instruction=SYSTEM_INSTRUCTION,
    tools=[skill_toolset],
)
```

## Resources & Links

- **[AQuA: Ambient Quality Agent for Production Agents](https://g.dev/cloud/adventofagents-season3-blog-aqua-ambient-quality-agent)** — How AQuA audits production agent sessions, verifies findings against transcripts, and pinpoints root causes.
- **[Gemini Platform Evaluation Service](https://g.dev/cloud/adventofagents-season3-docs-genai-evaluation-overview)** — Define PointwiseMetric rubrics and run automated golden-dataset evaluation pipelines.
- **[ADK Documentation](https://g.dev/cloud/adventofagents-season3-docs-adk)** — Official Agent Development Kit documentation for agents, tools, and SkillToolset.
- **[Day 30 Kata Repository](https://g.dev/cloud/adventofagents-season3-day30-demo)** — Standalone kata code for running the Pre-Deploy Golden-Dataset Policy Gate and Post-Deploy AQuA audit.
