Home
Ashavid
Back to Portfolio

Built by AshaVidDeveloper Tools / AI Engineering Methodv0.1, October 2026

Divan

A Product Team of AI Agents With Seven Roles, Three Human Gates and One Owner Who Decides

An open-source kit for Claude Code that gives coding agents the structure human teams already have — separate roles, independent review, and approval points the agents cannot pass on their own.

spec-writerGate AarchitectGate Bbuilder → reviewerGate C
Scope, design and release are each approved by a human; the reviewer never sees the builder’s self-report.
Venture
Divan
Category
Agent team method for Claude Code
Stage
v0.1, adapted to one live product; full loop not yet run end to end
Core challenge
Speed without self-graded work
Our role
Method, kit and documentation
Focus areas
Role separation, human gates, honest success signals

Origin

Why we started building this

A single agent asked to build the feature acts as product manager, architect, developer and reviewer at once — and grades its own work.

AI coding agents are fast, and speed is not the problem. The problem is that one agent handed a feature request becomes the product manager, the architect, the developer and the reviewer, then approves its own work and — if nothing stops it — pushes to main.

Human teams solved this long ago with separate roles and approval points. Divan is that organisational shape applied to agents, and named after the Persian administration of specialised departments answering to one decision-maker.

It was built by using it: the first adaptation was to Taghvim, a live product with a 135-line decision log, a push-to-deploy pipeline and a public no-tracking promise. Every conflict between the generic kit and that repository was written down, resolved, and fed back into the kit.

What we built

What we built

An installer that never overwrites a file, seven agent definitions with explicit permissions, three skills (feature-loop, feature-definition, divan-adapt), a quality-gate Stop hook that blocks an agent from finishing while lint, type-check or tests fail, and deny rules for push, tag, release and reading secrets — plus the method, an adaptation guide and a case study in four languages.

  • Seven roles, one owner

    spec-writer, architect, builder, reviewer, security-checker, feature-engineer and release-docs. Only the builder edits product code; the reviewer is independent and never sees the builder’s own report.

  • Three gates

    Gate A approves scope including what was cut; Gate B approves design and picks one of three variants; Gate C — merge, deploy, publish — is human only. Agents never release.

  • A quality gate that blocks the stop

    A Stop hook runs lint, type-check and tests when code changed, returns the failure to the agent with exit 2, and lets documentation-only sessions finish untouched.

  • Three facts every agent must know

    What triggers a production deploy, what the tracking policy is, and what the product publicly promises — each written in CLAUDE.md and checked by the security agent by name.

  • Feature Definition, not Feature Engineering

    The kit separates turning needs into features (a product activity) from building model inputs (an ML activity), with different agents and different words.

  • divan-adapt for mature repos

    A skill for installing into a project that already has rules, producing a conflict table and resolving each row without breaking the repository’s own decisions.

The Problem

Why this needed to exist

  • A builder that grades its own work is not reviewing; independence has to be structural.

  • If a push to main deploys, an agent pushing is a release, and most kits do not know that.

  • Measuring a feature with an analytics event breaks a product that promises no tracking; the success signal has to respect the product’s own rules.

  • Mature repositories already have rules; a kit that copies its own over them does damage on day one.

  • The honest status of a method is unproven until a full loop has run — and saying so is part of the method.

The Thesis

How we framed the opportunity

The thesis was that agent-team failures are rarely coding mistakes. They are organisational: a missing role, a missing approval, or a fact nobody wrote down.

  • Start from the organisation

    Product, engineering leadership, QA, security and release are functions a product needs whether people or agents fill them; leadership is the one that stays human.

  • Independence is a rule, not a hope

    The reviewer judges the result, never the story; a task that fails three builder attempts goes back to the architect to be split.

  • Success signal, not success metric

    If the product promises no tracking, the signal comes from feedback mail, issues, replies and store reviews. The rule came directly from the first real adaptation.

  • Write the conflicts down

    Adapting to Taghvim produced a table of what the kit said, what the repo said and how each was resolved — and every generic row went back into Divan.

The Landscape

Where the existing options fell short

What agent setups looked like

  • One agent, one prompt, every role at once.
  • Review by the same context that wrote the code.
  • No distinction between committing on a branch and shipping to production.

What was missing

  • Role separation with explicit edit permissions.
  • Human approval points for scope, design and release.
  • A hook that stops the session, not just a note that tests should pass.
  • An adaptation method for repositories with existing rules.

Design Principles

The decisions that shaped the product

  1. 01

    Agents multiply a decision-maker; they do not replace one

    Taste, discovery, accounts and release stay with the owner, and the kit says so in its honest-limits section.

  2. 02

    Nothing is done because an agent said so

    The orchestrator checks the file or runs the command; the quality gate refuses to let a failing session end.

  3. 03

    Install without overwriting

    The installer writes beside existing files, warns about ignored .claude folders, and supports a dry run.

The Build

How it came together

  1. Phase 1

    The method and the kit

    Seven agent definitions, the feature loop with three gates, the Feature Definition skill, templates for feature cards, reviews and decision records.

  2. Phase 2

    First real adaptation

    Install on Taghvim: deny rules for push, tag and signing scripts; privacy-guard replacing the generic security checker; success signals without tracking; verification against a 559-test baseline.

  3. Phase 3

    Feed back and publish

    Fold the generic lessons into the kit — the three facts, success signals, divan-adapt — and publish the method, case study and READMEs in English, Persian, Arabic and Chinese.

Stack

  • Claude Code agents & skills
  • Stop hooks (bash)
  • Markdown specs
  • Python asset build
  • GitHub Pages

Role

Method Design & Engineering

Audience

Founders Shipping With Agents · Engineering Leads · Claude Code Users

What Shipped

  • A published v0.1 kit with seven agents, three skills, a quality-gate Stop hook and deny rules
  • An installer that never overwrites and supports dry runs
  • One documented adaptation to a live product, verified against an unchanged 559-test baseline
  • A method document, an adaptation guide and a case study, with READMEs in four languages
  • Stated openly: a full feature loop from idea to release has not yet been run; results, including failures, will be published

What building this taught us

  1. 01

    Most agent failures are missing roles, not missing capability.

  2. 02

    A reviewer who reads the builder’s report is not independent.

  3. 03

    Write down what a push does before any agent can push.

  4. 04

    Measure within the product’s promises or do not measure.

  5. 05

    Publish the status you have, not the one you want.

We build the products we would want to operate ourselves.

Divan is the method we use to build the ventures in this portfolio, published as open source.