โ† Portfolio BRD Agent ยท v1.0
AI Tool by Sujeet Kumar
๐Ÿค–

BRD Generation
Agent

Input your business idea or upload a document โ€” the AI agent generates a complete, structured Business Requirements Document with user stories, acceptance criteria, NFRs, and risk analysis.

1
Input
2
Clarify
3
Generate
4
Download
Describe your project
Type your business requirements, idea, or upload an existing document (TXT, PDF text, or DOC content). Be as detailed or brief as you like โ€” the agent will ask for anything missing.
๐Ÿ“„

Drag & drop your file here, or browse

Supports TXT, MD files ยท PDF text will be extracted

A few clarifying questions
The agent identified some gaps. Please fill in the details below to ensure a complete BRD. All fields are important for generating accurate requirements.
Agent identified missing information
Analysing your requirements...
Parsing business context
Identifying stakeholders & user groups
Drafting functional requirements
Building non-functional requirements
Compiling modules & integrations
Finalising BRD document
BRD Generated Successfully ยท Ready to Download
Your Business Requirements Document
Review your BRD below. Download as PDF for sharing or DOCX for editing in Microsoft Word.
`); printWindow.document.close(); setTimeout(() => { printWindow.focus(); printWindow.print(); }, 600); } // ============================================================ // DOWNLOAD DOCX (RTF-based, opens in Word) // ============================================================ function downloadDOCX() { const md = generatedBRD; // Convert to clean plain text with structure for RTF const lines = md.split('\n'); let rtf = '{\\rtf1\\ansi\\deff0\n'; rtf += '{\\fonttbl{\\f0 Times New Roman;}{\\f1 Arial;}{\\f2 Courier New;}}\n'; rtf += '{\\colortbl;\\red28\\green28\\blue30;\\red139\\green105\\blue20;\\red201\\green149\\blue42;\\red255\\green255\\blue255;}\n'; rtf += '\\paperw12240\\paperh15840\\margl1800\\margr1800\\margt1440\\margb1440\n'; lines.forEach(line => { const t = line.trim(); if (!t) { rtf += '\\par\n'; return; } if (t.startsWith('# ')) { rtf += `\\pard\\sb300\\f1\\fs32\\b\\cf2 ${rtfEscape(t.slice(2))}\\b0\\cf1\\par\n`; } else if (t.startsWith('## ')) { rtf += `\\pard\\sb240\\f1\\fs26\\b\\cf2 ${rtfEscape(t.slice(3))}\\b0\\cf1\\par\n`; } else if (t.startsWith('### ')) { rtf += `\\pard\\sb180\\f1\\fs22\\b ${rtfEscape(t.slice(4))}\\b0\\par\n`; } else if (t.startsWith('#### ')) { rtf += `\\pard\\sb120\\f1\\fs20\\b\\cf3 ${rtfEscape(t.slice(5))}\\b0\\cf1\\par\n`; } else if (t.startsWith('- ') || t.startsWith('* ')) { rtf += `\\pard\\li360\\fi-180\\f0\\fs20 \\bullet ${rtfEscape(t.slice(2))}\\par\n`; } else if (t.match(/^\d+\. /)) { rtf += `\\pard\\li360\\fi-180\\f0\\fs20 ${rtfEscape(t)}\\par\n`; } else if (t.startsWith('|') && t.endsWith('|')) { // table row โ€” flatten const cells = t.slice(1,-1).split('|').map(c=>c.trim()).filter(c=>!c.match(/^[-:]+$/)); if (cells.length > 0) { rtf += `\\pard\\f0\\fs18\\cf1 ${cells.join(' | ')}\\par\n`; } } else if (t === '---') { rtf += `\\pard\\brdrb\\brdrs\\brdrw10 \\par\n`; } else { // inline bold const processed = t .replace(/\*\*(.+?)\*\*/g, '\\b $1\\b0 ') .replace(/\*(.+?)\*/g, '\\i $1\\i0 ') .replace(/`(.+?)`/g, '\\f2 $1\\f0 '); rtf += `\\pard\\f0\\fs20 ${rtfEscape(processed, true)}\\par\n`; } }); rtf += '}'; const blob = new Blob([rtf], { type: 'application/rtf' }); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'BRD_' + new Date().toISOString().slice(0,10) + '.rtf'; a.click(); URL.revokeObjectURL(a.href); } function rtfEscape(str, hasFormatting = false) { if (hasFormatting) return str.replace(/[\\{}]/g, c => '\\'+c); // already has RTF codes return str .replace(/\\/g, '\\\\') .replace(/\{/g, '\\{') .replace(/\}/g, '\\}') .replace(/\*\*(.+?)\*\*/g, '\\b $1\\b0 ') .replace(/`(.+?)`/g, '\\f2 $1\\f0 '); } // ============================================================ // RESET // ============================================================ function resetAll() { userText = ''; clarifyAnswers = {}; generatedBRD = ''; clarifyQuestionsList = []; document.getElementById('userInput').value = ''; document.getElementById('fileChosen').textContent = ''; document.getElementById('inputError').style.display = 'none'; document.getElementById('brdContent').innerHTML = ''; [1,2,3,4,5,6].forEach(i => document.getElementById('ls'+i)?.classList.remove('done')); switchTab('text'); setStep(1); showPanel(1); }