Skip to content
New from the specs.md team — fabriqa orchestrates Claude Code, Codex, Gemini CLI & more in one workflow.Download free →
v1
Esc
navigateopen⌘Jpreview
On this page

Operations Agent

Deploys, verifies, and monitors systems in production

Overview

The Operations Agent handles the third phase of AI-DLC. It takes constructed features to production, verifies they work correctly, and sets up monitoring.

Invocation

/specsmd-operations-agent
/specsmd-operations-agent

Or use the @ prefix:

@specsmd-operations-agent
/specsmd-operations-agent

Commands

Command Purpose
build Build the project
deploy Deploy to environment
verify Verify deployment
monitor Set up monitoring

build

Builds the project for deployment:

> build

The agent will:

Check Prerequisites

Verify all construction bolts are complete

Run Build

Execute build commands from tech stack

Run Tests

Execute full test suite

Create Artifacts

Package for deployment

Example Session

User: build

Operations Agent: Starting build process...

## Prerequisites Check
✓ All construction bolts complete
✓ No uncommitted changes
✓ On main branch

## Build
Running: npm run build
✓ TypeScript compilation successful
✓ Bundle created (245KB gzipped)

## Tests
Running: npm test
✓ 47 unit tests passed
✓ 12 integration tests passed
✓ 5 e2e tests passed

## Artifacts
✓ Docker image built: myapp:1.2.0
✓ Image pushed to registry

Build complete. Ready for deployment.

deploy

Deploys to a target environment:

> deploy staging

Or for production:

> deploy production

The agent will:

Environment Check

Verify target environment configuration

Pre-deployment

Run database migrations, cache warming

Deploy

Deploy using configured strategy

Health Check

Verify services are healthy

Deployment Strategies

The agent supports common strategies based on your infrastructure:

Strategy Description
Rolling Replace instances gradually
Blue-Green Switch between two environments
Canary Route percentage of traffic to new version

verify

Runs verification after deployment:

> verify staging

The agent will:

Smoke Tests

Run quick sanity checks

Health Endpoints

Check all service health endpoints

Integration Check

Verify integrations are working

Performance Baseline

Ensure response times are acceptable

Example Output

User: verify staging

Operations Agent: Running verification for staging...

## Smoke Tests
✓ Homepage loads (234ms)
✓ API responds (45ms)
✓ Authentication works

## Health Endpoints
✓ /health - OK (12ms)
✓ /health/db - OK (23ms)
✓ /health/cache - OK (8ms)

## Integration Check
✓ Database connection
✓ Redis connection
✓ Email service

## Performance
✓ p50 latency: 45ms (target: <100ms)
✓ p95 latency: 123ms (target: <500ms)
✓ p99 latency: 234ms (target: <1000ms)

Verification passed. Staging is healthy.

monitor

Sets up or checks monitoring:

> monitor setup

Or check current status:

> monitor status

The agent helps with:

Logging

Structured logging configuration

Metrics

Key performance indicators

Alerts

Alert rules and thresholds

Dashboards

Visualization of system health

Key Metrics

The agent suggests monitoring:

Category Metrics
Availability Uptime, error rate, success rate
Performance Latency (p50, p95, p99), throughput
Resources CPU, memory, disk, connections
Business Active users, transactions, conversions

Human Checkpoints

The Operations Agent has 4 human checkpoints aligned with environment progression:

Gate Location Purpose
Gate 1 After build Approve build artifacts before deployment
Gate 2 Before staging deploy Confirm ready for staging environment
Gate 3 Before production deploy Critical approval for production
Gate 4 After monitoring setup Confirm operations complete

Artifacts

Operations artifacts are stored in:

memory-bank/operations/
├── environments.md      # Environment configurations
├── runbooks/           # Operational procedures
│   ├── deployment.md
│   ├── rollback.md
│   └── incident.md
└── monitoring/
    ├── alerts.md
    └── dashboards.md

Runbooks

The agent generates runbooks for common operations:

Deployment Runbook

Step-by-step deployment procedure:

  1. Pre-deployment checklist
  2. Deployment commands
  3. Verification steps
  4. Rollback procedure
Incident Response

What to do when things go wrong:

  1. Detection and triage
  2. Escalation matrix
  3. Communication template
  4. Post-mortem process
Scaling Runbook

How to handle increased load:

  1. Signs of scaling needs
  2. Horizontal vs vertical
  3. Scaling commands
  4. Verification

Best Practices

Always Verify

Never skip verification after deployment. Automated checks catch issues humans miss.

Stage Environments

Deploy to staging before production. Test the deployment process itself.

Monitor Proactively

Set up alerts before you need them. Don’t wait for production issues.

Document Runbooks

Keep runbooks updated. They’re essential during incidents.

Was this page helpful?