ai newsDo., 22. Okt.
EilmeldungHugging Face releases Carbon-X, an AI model for questions about DNA

Building a Feature Flag System with Three AI Agents and a Human Gate

Introduction Most developers have tried prompting a single LLM to write a complete feature. The result often works for the happy path but misses edge cases, security concerns, or architectural consistency. VIBA takes a different approach: you define a session with multiple models, each assigned a s

dev.toDonnerstag 13:45 · 22.10.2 Min. Lesezeit
Bild: dev.to

Most developers have tried prompting a single LLM to write a complete feature. The result often works for the happy path but misses edge cases, security concerns, or architectural consistency. VIBA takes a different approach: you define a session with multiple models, each assigned a specific role, and insert human approval gates at critical decision points. The platform runs ChatGPT, Claude, Gemini, and others side by side in one shared context, showing token usage and cost per agent as the work progresses.

Start by describing the task in a session brief: "Add a feature flag system to a Node.js/Express API with PostgreSQL, including a management UI, audit logging, and gradual rollout controls." Then assign three agents:

Each agent sees the full conversation history, so the Implementer can reference the Architect's schema decisions, and the Reviewer can flag deviations from the agreed contracts.

After the Architect posts its proposal, VIBA pauses the session and surfaces a summary card:

Proposed schema: feature_flags table with key, description, rollout_percentage, targeting_rules (JSONB), created_at. Middleware attaches req.flags object. Admin endpoints under /admin/flags with RBAC.

You can edit the schema directly in the UI, ask the Architect to revise, or approve with a single click. Only after approval does the Implementer begin writing code. This gate prevents the common failure mode where an LLM commits to a design that the team would have rejected early.

The Implementer streams files into the session: a migration, flagMiddleware.ts, CRUD routes, and a React component tree. The Reviewer then runs its analysis and produces a ranked repair report:

You click each item to see the offending snippet and the Reviewer's suggested fix. Accepting a fix rewrites that file in the session and updates the diff view. When the report is clear, you export the changes as a unified patch or push a branch directly from VIBA's GitHub integration.

Throughout the session, a sidebar shows cumulative tokens and estimated cost per agent. For a typical feature flag implementation, the Architect might consume 12k tokens ($0.04), the Implementer 45k tokens ($0.18), and the Reviewer 18k tokens ($0.06). Seeing these numbers in real time helps small teams decide whether to route a task to a cheaper model or keep the higher-capability one for the review pass.

Imagine applying this pattern to a legacy authentication module: one agent maps the current flow, another proposes a stratified migration to JWT with refresh tokens, a third writes the migration scripts, and a fourth runs your existing integration suite against the new code — all with human gates at the architecture and security review stages. VIBA handles the orchestration, context sharing, and cost tracking so you stay focused on the decisions that matter. Explore the platform at https://viba.guru

Quelle: dev.to (dev.to). Original öffnen