v1.4 — AI Workforce
Five autonomous AI employees run on schedule, produce reviewable artifacts, and — after human approval — ship them to GitHub, Mailtrap, or Slack, with a brand-voice post-filter gate, scoped MCP tools, persistent memory, and budget caps.
Summary
The core operational thesis: Objectuve already had ~40 Claude Code skills that a human operator ran manually (content drafting, metrics reports, alerts, moderation assistance, outreach). That's 8–12 hours/week of supervised LLM work. v1.4 turned those skills into scheduled autonomous employees.
Five "employees" shipped — Cori (Content Drafter), Emi (Email Sender), Scout (Metrics Reporter), Dash (Incident Responder), and Ally (Outreach) — each with a declared set of MCP tools (GitHub, Mailtrap, Sentry, PostHog, Slack via REST clients), a monthly budget cap, a cron schedule, and persistent memory injected into every run. A dedicated TypeScript Cloud Run service, agent_runner/, wraps the @anthropic-ai/claude-agent-sdk query() loop with safety guards (maxTurns, maxBudgetUsd, cancel), OIDC auth to Rails and LiteLLM, and an HMAC-signed webhook back to Rails.
Every artifact produced passes a mandatory brand-voice post-filter (a second query() call using tightening-brand-voice skill) before it can enter the operator's Review Queue. Auto-rejected artifacts surface rejection reasons into the employee's memory for the next run. Approval-triggered delivery handlers ship approved artifacts to the right destination (GitHub PR, Mailtrap send, Slack post). Autonomy progresses in three levels — supervised → semi-autonomous → autonomous — gated by approval-rate validations (80% over 4 weeks, 95% over 8 weeks).
All five employees launched in shadow mode (supervised) on 2026-04-13.
Goal
Turn Objectuve's existing Claude Code skills into autonomous AI employees that run on schedule, produce reviewable artifacts, and ship approved outputs — reducing 8–12 hours/week of operational work while maintaining brand-voice fidelity through mandatory post-filters and human oversight.
Scope — What Shipped
Rails platform (Phase 13):
- Four
PublicRecord+ soft-delete models:AiEmployee,AiRun,AiArtifact,AiEmployeeMemory— 51 passing specs, Rubocop clean. - Four GraphQL types, two query resolvers, three mutations, two interactions — complete admin-gated API.
- Approval workflow:
ApproveArtifact,RejectArtifactmutations + HMAC-authenticated webhook atPOST /webhooks/ai-workforce. ExecuteRunJobbackground worker;ScheduleRunsJobCrono cron dispatches runs on each employee's schedule.- Seeded 5 employees with role keys, budgets, schedules.
Agent Runner service (Phase 14):
- New TypeScript Express app at
agent_runner/deployed to Cloud Run. - Endpoints:
POST /runs,GET /runs/:id/status,POST /runs/:id/cancel,GET /health. @anthropic-ai/claude-agent-sdk@0.2.104query()loop withmaxTurns(30),maxBudgetUsd(default $1), and cancel safety guards.- OIDC token fetcher for service-to-service calls (Rails + LiteLLM).
- HMAC-SHA256 webhook sender posts run results back to Rails.
MCP + memory + brand-voice gate (Phase 15):
- GitHub MCP via stdio subprocess; PostHog, Sentry, Mailtrap, Slack via REST clients.
- MCP access is scoped per employee via the
mcp_serverscolumn. - Persistent memory:
AiEmployeeMemoryrecords merged into system prompt per run (~2000 token cap). - Brand-voice post-filter: a second
query()call using thetightening-brand-voiceskill runs after every artifact is produced; artifacts that fail are auto-rejected with reason captured in memory for next run.
Delivery + autonomy + monitoring (Phase 16):
DeliverArtifactJobdispatches approved artifacts: GitHub PR creation, Mailtrap send, Slack post.- Autonomy promotion: DB validation on
AiEmployeeenforces 80% approval rate over 4 weeks (semi-auto) and 95% over 8 weeks (auto);confirm_promotion_atrecords operator confirmation. - Budget alerts:
AiWorkforce::BudgetAlertJobhits Slack at 80% + 100% of monthly cap (dedup viaRails.cache45-day TTL). - Stale-run timeout:
TimeoutStaleRunsJobevery 15 min. - Edit-distance tracking: if an operator edits an artifact before approving,
edit_distanceis computed (Levenshtein ratio) and stored for autonomy gating. - Admin dashboard views:
AIWorkforceView,ReviewQueueView,EmployeeDetailView,RunDetailView— full operator surface for the five employees.
Phases
| Phase | Name | Status | Plans | Highlights |
|---|---|---|---|---|
| 13 | Rails Platform Infrastructure | Shipped | 5 | 4 models, 4 GraphQL types, 3 mutations, approval + webhook, seeded employees |
| 14 | Agent Runner Scaffold | Shipped | 3 | TypeScript Cloud Run service, query() loop, OIDC, HMAC webhook |
| 15 | MCP + Memory + Brand Voice | Shipped | 3 | MCP tool scoping, persistent memory, mandatory brand-voice post-filter, all 5 employees live |
| 16 | Delivery + Autonomy | Shipped | 3 | GitHub/Mailtrap/Slack delivery, autonomy gates, budget alerts, detailed run views |
Key Decisions
- Claude Agent SDK over CrewAI/LangGraph — same mental model as Claude Code, low learning curve. Package renamed from
@anthropic-ai/claude-codeto@anthropic-ai/claude-agent-sdk; do not use the old name. - Separate TypeScript Cloud Run service —
agent_runner/is stateless, has no DB access, communicates with Rails only via OIDC HTTP + HMAC webhook. Clean blast-radius isolation. - Brand-voice filter is a separate
query()call, not a loaded skill — keeping it out of the main run's skill context prevents context dilution. It's a gate, not an advisor. - MCP scoping via
mcp_serverscolumn — an employee without'github'in itsmcp_serversarray cannot invoke GitHub tools. Enforced at MCP config assembly time, not at prompt level. - Autonomy promotion is a DB validation, not a UI warning —
validate :promotion_requirements_metonAiEmployeeenforces promotion criteria at the model level. Manipulating the UI cannot advance an employee past the gates. - Memory injected into system prompt, not fetched mid-run — deterministic, measurable token cost. Capped at ~2000 tokens.
- Rails is the source of truth for runs, not
agent_runner/— the Agent Runner's in-memoryrunMapis lost on restart; Rails persists every run + artifact + delivery status. - Every AI Workforce mutation requires
require_admin!— regular users cannot access the surface.
Requirements Coverage
45 / 45 requirements satisfied. Audit status: tech_debt (14 INFO-level items, no blockers).
| Category | Count | Status |
|---|---|---|
| Platform (PLAT) | 6 | All satisfied |
| Agent Runner (AGENT) | 7 | All satisfied |
| Scheduling (SCHED) | 3 | All satisfied |
| Approval (APPR) | 6 | All satisfied |
| Delivery (DELIV) | 5 | All satisfied |
| Employee Config (EMP) | 5 | All satisfied |
| Memory (MEM) | 4 | All satisfied |
| MCP (MCP) | 6 | All satisfied |
| Dashboard (DASH) | 5 | All satisfied |
| Cost (COST) | 5 | All satisfied |
| Autonomy (AUTO) | 5 | All satisfied |
Full list: v1.4-REQUIREMENTS.md.
E2E Flows
All four target flows complete end-to-end:
- Employee → Run → Artifact → Approve → Deliver — operator can trigger a manual run, receive the artifact in Review Queue, approve, and see delivery succeed.
- Run → brand-voice filter → auto-reject → memory — failing artifacts never reach the operator; rejection reason is captured in the employee's memory for the next run.
- Review history → approval rate → promote autonomy — approval-rate chart drives the promotion validation; operator can confirm promotion once gates pass.
- Budget threshold → Slack alert —
AiWorkforce::BudgetAlertJobposts to Slack at 80% and 100% with dedup.
Tech Debt
From the audit (v1.4-MILESTONE-AUDIT.md):
- (phase 13) Visual verification of admin dashboard deferred (
VERIFICATION.mdstatus:human_needed). - (phase 14) Some verification items deferred during autonomous run (
gaps_found). - (phase 15)
EmployeeDetailView/RunDetailViewvisual check deferred. - (phase 15, 16)
OpenStructused for resolver return values — preferData.define(IN-01). - (phase 15, 16)
relativeTimehelper duplicated across 3 views — extract to composable (IN-04). - (phase 15) N+1 risk on
last_runresolver in list views (IN-02). - (phase 16) Top-level constants in job spec may conflict in parallel tests (IN-03).
- (phase 16) Missing artifact nil from
public_findsilently swallowed (IN-05).
All INFO-level; no blockers.
Related Artifacts
- Roadmap: v1.4-ROADMAP.md
- Requirements: v1.4-REQUIREMENTS.md
- Milestone audit: v1.4-MILESTONE-AUDIT.md
- Phase artifacts: folded into the audit; per-phase plans were not archived as standalone files under
v1.4-phases/. - PRD: AI Workforce PRD
- Git tag: v1.4
- Merge PR: #313
- Feature docs: docs/features/ai-workforce.md
Related Commits
51a902a92—feat: v1.4 AI Workforce — 5 autonomous employees in shadow mode (#313)e21b30515—chore: complete v1.4 AI Workforce milestone62590715d—docs(v1.4): milestone audit report5b84cea03—docs: comprehensive AI Workforce documentation for v1.499a78b860—docs: create milestone v1.4 roadmap (4 phases)
Last updated: 2026-05-22