AI Development
Frequency uses a local-first, closed-loop agent orchestration system called AI Drivers. Nine specialist agents handle different aspects of development — from implementation to security audits to UI reviews — with automated quality gates that block unsafe code.
How It Works
When you issue a command like /freq "implement user authentication", the system:
- SHADOW ROUTE analyzes your request and routes it to the right specialist
- The specialist agent executes the work (writes code, reviews, audits, etc.)
- Quality gates run automatically on the output
- You receive a summary with files changed and any gate results
Specialist Agents
SHADOW ROUTE
Orchestrator — Opus 4.5
Routes requests to the right specialist. Triggers: /freq, automatic routing.
ARCHON
Master Engineer — Opus 4.5
Builds, implements, creates, and fixes features. The primary development agent.
VALIDITUS
Security Gate — Sonnet 4.5
Security audits. Checks for secrets, RLS policies, SQL injection, XSS. Blocks merges on violations.
GATED
Code Review — Opus 4.5
Code quality reviews. Checks types, tests, performance, architecture. Required for merge approval.
PERFORMICIL
Performance — Sonnet 4.5
Performance analysis. Bundle size, Lighthouse scores, Core Web Vitals. Advisory (non-blocking).
PIXELUS
UI/UX — Sonnet 4.5
UI/UX review. CSS, responsive design, accessibility, visual consistency. Triggers on UI-related changes.
SCRIBUS
Documentation — Sonnet 4.5
Documentation writer. README, API docs, inline comments, changelogs.
INVESTIGATUS
Debugging — Opus
Root cause analysis. Stack traces, error investigation, performance profiling.
ADVERSARIUS
Red Team — Opus 4.5
Adversarial analysis using STRIDE threat model. Finds P0–P3 security issues. Triggers via /redteam.
Operating Modes
Sandbox Mode (Default)
| Property | Value |
|---|---|
| Source of truth | Local SQLite (~/.archon/local.db) |
| Sync target | One-way to Notion (every 5 min, batched) |
| Rate limit | 2 requests/sec to Notion API |
| Cost | Free (Notion free tier) |
| Use for | Learning, prototyping, solo development |
Production Mode
| Property | Value |
|---|---|
| Source of truth | Linear (bidirectional sync) |
| Sync | Real-time via webhooks |
| Rate limit | 6 requests/sec to Linear API |
| Use for | Team sprints, delivery tracking |
Key Slash Commands
/freq <request>
Routes your request to the appropriate specialist:
/freq "implement user authentication" # → ARCHON
/freq "review this PR for security" # → VALIDITUS
/freq "optimize the dashboard queries" # → PERFORMICIL
/freq "fix the responsive layout issues" # → PIXELUS
/freq "document the API endpoints" # → SCRIBUSOutput: Summary of what was done, files changed, quality gate results.
/redteam <target>
Runs adversarial analysis using the STRIDE threat model:
/redteam src/app/api/ --severity high --focus authenticationOutput: Risk matrix, findings by severity (P0–P3), remediation recommendations.
/ai-setup
Interactive configuration wizard for the AI Drivers:
/ai-setup- Auto-detects project type
- Configures agent routing rules
- Creates symlinks for file projection
- Sets up sync targets
Quality Gate Thresholds
VALIDITUS (Security — Blocking)
| Severity | Threshold | Action |
|---|---|---|
| Critical | 0 allowed | Block merge |
| High | 0 allowed | Block merge |
| Medium | ≤3 allowed | Warning |
| Low | Unlimited | Informational |
GATED (Code Review — Blocking)
| Change Scope | Approvals | Checklist |
|---|---|---|
| Docs only | 1 | Content accuracy |
| Small changes | 1 | Quality, types, tests |
| Architecture | 2 | All items + design review |
PERFORMICIL (Performance — Advisory)
| Metric | Threshold |
|---|---|
| Bundle size | < 500KB |
| Lighthouse score | > 80 |
| LCP | < 2.5s |
| FID | < 100ms |
| CLS | < 0.1 |
Circuit Breakers & Resilience
The AI Drivers system includes built-in resilience:
- Rate limiting — respects API limits for Notion (2 req/s) and Linear (6 req/s)
- Circuit breakers — if a sync target is down, operations continue locally
- Batched sync — changes are collected and synced periodically, not on every operation
- Offline-capable — all task data stored locally in SQLite, sync is optional
- Graceful degradation — if an agent fails, the system routes to a fallback
Setup
The AI Drivers are included as a git submodule at .ai-drivers/:
# Initial setup (done automatically with --recurse-submodules)
git submodule update --init --recursive
# Link agents and hooks into your project
pnpm --prefix .ai-drivers run link
# Interactive configuration
pnpm --prefix .ai-drivers run initThis creates symlinks so Claude Code discovers the agents, hooks, and commands:
.ai-drivers/ → Submodule (source)
.agent/.ai-drivers/ → Projected agents & config
.claude/hooks/ → Projected Claude Code hooksFile Projection
The AI Drivers use file projection — a discovery mechanism where Claude Code finds agents, hooks, and commands by their directory location:
.ai-drivers/
├── agents/ # 9 agent definition files (.md)
├── commands/ # Slash command definitions
│ ├── freq.md # /freq command
│ ├── redteam.md # /redteam command
│ └── setup-project.md
├── skills/ # Extended capabilities
│ └── ai-setup.md # /ai-setup skill
├── hooks/ # Git & Claude Code hooks
│ ├── git/ # pre-commit, pre-push, commit-msg
│ └── claude/ # PreToolUse, PostToolUse, Notification
├── config/ # Default configuration
└── team-sync/ # Backend sync infrastructureBest Practices
- Use
/freqfor routing — don’t try to invoke agents directly - Let quality gates run — don’t skip or override blocking gates
- Start in sandbox mode — switch to production when you’re comfortable
- Review agent output — AI assistants are powerful but not infallible
- Use
/redteambefore launches — catch security issues before users do