// agent

Brawll

by brawll · Oct 04, 2026 Public

Choose how to run this agent

⚡ Local runs on your GPU. For usable speed it needs a WebGPU-capable browser — Chrome or Edge on a machine with a graphics card, or an Apple Silicon Mac. This agent runs on-device only. Check your machine
Try it now

Requires an API key and an AgentOp account.

7 downloads
0 forks
0.0 rating

Description

Requirement Agent

This agent takes any requirement from the customer and builds the knowledge base through fragmneted sources like JIRA, CONFLUECE, github or pdfs .
After undertsanding the customer requirements go aheads and writes functional and non functional requirements.
Follows these steps:
Authenticate and authorize the user.
Retrieve the Jira story and authorized supporting context.
Discover appropriate PRD/Confluence information.
Generate structured functional and non-functional requirements.
Generate acceptance criteria.
Identify dependencies, assumptions, constraints, security/data needs and risks.
Detect missing, ambiguous, and conflicting information.
Link material AI outputs to supporting evidence or flag them for confirmation.
Present clarification questions to a human.
Capture human responses and reanalyze affected requirements.
Calculate the requirement quality score.
Version every material revision.
Allow an authorized Product Owner to approve, reject, or request rework.
Lock the approved version against silent modification.
Maintain the complete AI/human audit trail.

What this agent can do

Brawll is built from the Requirement Agent template. Runs fully on your own device: llama.cpp compiled to WebAssembly, GPU-accelerated through WebGPU, with no API key and no server. After the one-time model download it works offline.

Source Code

agent.py
import json
import uuid
import datetime

class RequirementsAgent:

    def __init__(self):

        self.audit = []
        self.versions = []

    def log(self, action, user):

        self.audit.append({
            "timestamp": str(datetime.datetime.utcnow()),
            "user": user,
            "action": action
        })

    def authenticate(self, user):

        role_map = {
            "sandeep":"analyst",
            "po":"product_owner"
        }

        return role_map.get(user)

    def analyze_story(self, jira_story, context):

        requirements = {
            "functional": [
                "System shall process ticket data",
                "System shall validate user permissions"
            ],
            "non_functional": [
                "Response < 2 sec",
                "Audit trail maintained"
            ]
        }

        return requirements

    def generate_acceptance_criteria(self):

        return [
            "Given valid permissions user can access story",
            "Given invalid permission access denied"
        ]

    def detect_gaps(self, text):

        gaps = []

        if "security" not in text.lower():
            gaps.append("Security requirements missing")

        if "performance" not in text.lower():
            gaps.append("Performance requirements missing")

        return gaps

    def generate_questions(self, gaps):

        return [
            f"Please clarify: {gap}"
            for gap in gaps
        ]

    def quality_score(self,
                      requirements,
                      gaps):

        score = 100

        score -= len(gaps) * 10

        return max(score, 0)

    def save_version(self,
                     requirements,
                     author):

        version = {
            "id": str(uuid.uuid4()),
            "created_by": author,
            "timestamp": str(datetime.datetime.utcnow()),
            "requirements": requirements
        }

        self.versions.append(version)

        return version

    def approve(self,
                version_id,
                user_role):

        if user_role != "product_owner":
            raise Exception("Only Product Owner can approve")

        return {
            "version": version_id,
            "status": "APPROVED"
        }