DEV Community

Cover image for Building ScopeCouncil: an agentic system that decides what software NOT to build yet
yobanrg
yobanrg

Posted on

Building ScopeCouncil: an agentic system that decides what software NOT to build yet

I built this project and wrote this post for the Google Cloud "All Things Agentic" Hackathon.

The problem

One of the most expensive software mistakes happens before the first line of code: building too much. A growing business already knows something is wrong — "the inventory never matches," "we have no idea what to build for the restaurant" — and the reflex is to ask an LLM to sketch an ERP. It will happily invent a Treasury module nobody needs while skipping the Inventory fix that actually matters. Its opinion on scope isn't verifiable, isn't consistent, and isn't accountable to anything.

ScopeCouncil takes one sentence about a business and decides the minimum viable ERP scope it needs today: a BUILD_NOW list, a DO_NOT_BUILD_YET list, and a downloadable Build Pack of 10 markdown documents ready to hand to a dev team or an AI coding agent.

How it's built

The pipeline is a Google ADK orchestrator:

  1. Discovery Agent (Gemini) — pulls business facts and a "is this a broken process or a missing module?" signal from free text. Free-text understanding is the one thing LLMs are genuinely good at here.
  2. ScopeProposalAgent (Gemini) + GemmaScopeAgent (Gemma) — the same question asked of two different model families, in parallel. Each proposes candidate modules with urgency/complexity estimates.
  3. reconcile_and_score_all (pure Python) — reconciles both proposals against versioned rules in rules/domain_rules.yaml and decides BUILD_NOW / DO_NOT_BUILD_YET / HUMAN_REVIEW. Every verdict cites the exact rule that produced it. A module only one model flags is never silently dropped or silently approved — the disagreement is shown.
  4. schema_validator.py (Python) — structural sanity check on the draft database schema: circular references, missing primary keys, untyped columns, dangling foreign keys.
  5. BuildPackAgent (Gemini) — writes prose around a verdict that is already final. It cannot change a decision or invent a citation.

Output: a SQLite-stored, downloadable .zip.

The design decision I like most

Two independent models disagree on the same free-text symptom more often than I expected — and ScopeCouncil treats that disagreement as signal, not noise to average away. The actual gate is agents/scoring.py running against an auditable YAML rules file. The rules file is a deliberately small seed (~12 rules from real SME ERP work), and the README says so: the point isn't "this covers every industry," it's "every decision here traces to a line of code, not a paragraph of LLM prose."

What I learned

gemma-4-26b-a4b-it is genuinely slow for this reasoning load — 25–55 seconds, verified with the raw google-genai client with no ADK involved. Two consequences:

  • It runs as its own asyncio.create_task, not a bare asyncio.gather, so a failed Gemini call cancels the orphaned Gemma task instead of leaking it.
  • Forcing response_schema-constrained JSON decoding on Gemma for this task hangs past 40s even with a minimal schema. So GemmaScopeAgent runs without output_schema on purpose — the JSON shape is in the prompt, parsed with a markdown-fence-tolerant fallback.

Links

Stack: Gemini 3.5 Flash-Lite + Gemma via Google ADK, FastAPI + SSE, SQLite, deployed on Google Cloud Run. Built for the Google Cloud "All Things Agentic" Hackathon.

Top comments (0)