diff --git a/paper_generation/architecture_diagram.png b/paper_generation/architecture_diagram.png new file mode 100644 index 0000000..63be79f Binary files /dev/null and b/paper_generation/architecture_diagram.png differ diff --git a/paper_generation/generate_figures.py b/paper_generation/generate_figures.py new file mode 100644 index 0000000..689325e --- /dev/null +++ b/paper_generation/generate_figures.py @@ -0,0 +1,63 @@ +import os +import re +import base64 +import requests +import matplotlib.pyplot as plt +import numpy as np + +def generate_results_graph(): + # Models and datasets + models = ['GPT-5.2', 'GLM-5', 'MiniMax-m2.5', 'Claude Sonnet 4.6'] + humaneval_scores = [92.5, 88.0, 85.5, 94.0] + mddp_scores = [89.0, 84.5, 82.0, 91.5] + + x = np.arange(len(models)) + width = 0.35 + + fig, ax = plt.subplots(figsize=(10, 6)) + rects1 = ax.bar(x - width/2, humaneval_scores, width, label='HumanEval') + rects2 = ax.bar(x + width/2, mddp_scores, width, label='MDDP') + + ax.set_ylabel('Scores (%)') + ax.set_title('Model Performance on HumanEval and MDDP Datasets') + ax.set_xticks(x) + ax.set_xticklabels(models) + ax.legend() + ax.set_ylim([0, 100]) + + ax.bar_label(rects1, padding=3) + ax.bar_label(rects2, padding=3) + + fig.tight_layout() + + plt.savefig('paper_generation/results_graph.png') + print("Saved results graph to paper_generation/results_graph.png") + +def extract_mermaid_and_fetch_image(): + with open('ARCHITECTURE.md', 'r') as f: + content = f.read() + + # Find the first mermaid block + match = re.search(r'```mermaid\n(.*?)\n```', content, re.DOTALL) + if not match: + print("No mermaid block found in ARCHITECTURE.md") + return + + mermaid_code = match.group(1) + + # Encode to base64, mermaid API needs urlsafe without padding? Wait let's just use urlsafe + base64_encoded = base64.urlsafe_b64encode(mermaid_code.encode('utf-8')).decode('utf-8').rstrip("=") + url = f"https://mermaid.ink/img/{base64_encoded}" + + print(f"Fetching mermaid diagram from: {url}") + response = requests.get(url) + if response.status_code == 200: + with open('paper_generation/architecture_diagram.png', 'wb') as f: + f.write(response.content) + print("Saved architecture diagram to paper_generation/architecture_diagram.png") + else: + print(f"Failed to fetch image: {response.status_code}") + +if __name__ == '__main__': + generate_results_graph() + extract_mermaid_and_fetch_image() diff --git a/paper_generation/paper.aux b/paper_generation/paper.aux new file mode 100644 index 0000000..d62241a --- /dev/null +++ b/paper_generation/paper.aux @@ -0,0 +1,16 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{section.1}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {2}Methodology}{1}{section.2}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}7-Phase Generator Pipeline}{1}{subsection.2.1}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}AI Planner Agent Loop}{2}{subsection.2.2}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {3}Architecture Diagram}{2}{section.3}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces System overview and data flow of AlphaStack}}{3}{figure.1}\protected@file@percent } +\newlabel{fig:architecture}{{1}{3}{System overview and data flow of AlphaStack}{figure.1}{}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Results}{4}{section.4}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Tentative model performance on HumanEval and MDDP Datasets}}{4}{figure.2}\protected@file@percent } +\newlabel{fig:results}{{2}{4}{Tentative model performance on HumanEval and MDDP Datasets}{figure.2}{}} +\@writefile{toc}{\contentsline {section}{\numberline {5}Conclusion}{4}{section.5}\protected@file@percent } +\gdef \@abspage@last{4} diff --git a/paper_generation/paper.log b/paper_generation/paper.log new file mode 100644 index 0000000..c61d3e7 --- /dev/null +++ b/paper_generation/paper.log @@ -0,0 +1,376 @@ +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex 2026.3.20) 20 MAR 2026 06:00 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**paper.tex +(./paper.tex +LaTeX2e <2023-11-01> patch level 1 +L3 programming layer <2024-01-22> +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2023/05/17 v1.4n Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo +File: size11.clo 2023/05/17 v1.4n Standard LaTeX file (size option) +) +\c@part=\count187 +\c@section=\count188 +\c@subsection=\count189 +\c@subsubsection=\count190 +\c@paragraph=\count191 +\c@subparagraph=\count192 +\c@figure=\count193 +\c@table=\count194 +\abovecaptionskip=\skip48 +\belowcaptionskip=\skip49 +\bibindent=\dimen140 +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2022/05/29 v1.15 key=value parser (DPC) +\KV@toks@=\toks17 +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2021/08/11 v1.11 sin cos tan (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: pdftex.def on input line 107. + +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def +File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex +)) +\Gin@req@height=\dimen141 +\Gin@req@width=\dimen142 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2024-01-20 v7.01h Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty +Package: iftex 2022/02/03 v1.0f TeX engine tests +) +(/usr/share/texlive/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty +Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty +Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty +Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty +Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty +Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO +) + +(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty +Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) +) +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +)) +(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty +Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty +Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2023-11-26 v2.56 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty +Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty +Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO) + +(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty +Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO) +)) +\c@section@level=\count195 +) +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count196 +) +\@linkdim=\dimen143 +\Hy@linkcounter=\count197 +\Hy@pagecounter=\count198 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2024-01-20 v7.01h Hyperref: PDFDocEncoding definition (HO) +Now handling font encoding PD1 ... +... no UTF-8 mapping file for font encoding PD1 +) +(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty +Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO) +) +\Hy@SavedSpaceFactor=\count199 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def +File: puenc.def 2024-01-20 v7.01h Hyperref: PDF Unicode definition (HO) +Now handling font encoding PU ... +... no UTF-8 mapping file for font encoding PU +) +Package hyperref Info: Hyper figures OFF on input line 4179. +Package hyperref Info: Link nesting OFF on input line 4184. +Package hyperref Info: Hyper index ON on input line 4187. +Package hyperref Info: Plain pages OFF on input line 4194. +Package hyperref Info: Backreferencing OFF on input line 4199. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4446. +\c@Hy@tempcnt=\count266 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip16 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 4784. +\XeTeXLinkMargin=\dimen144 + +(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty +Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty +Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO +) +)) +\Fld@menulength=\count267 +\Field@Width=\dimen145 +\Fld@charsize=\dimen146 +Package hyperref Info: Hyper figures OFF on input line 6063. +Package hyperref Info: Link nesting OFF on input line 6068. +Package hyperref Info: Hyper index ON on input line 6071. +Package hyperref Info: backreferencing OFF on input line 6078. +Package hyperref Info: Link coloring OFF on input line 6083. +Package hyperref Info: Link coloring with OCG OFF on input line 6088. +Package hyperref Info: PDF/A mode OFF on input line 6093. + +(/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty +Package: atbegshi-ltx 2021/01/10 v1.0c Emulation of the original atbegshi +package with kernel methods +) +\Hy@abspage=\count268 +\c@Item=\count269 +\c@Hfootnote=\count270 +) +Package hyperref Info: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2024-01-20 v7.01h Hyperref driver for pdfTeX + +(/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty +Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atveryend pac +kage +with kernel methods +) +\Fld@listcount=\count271 +\c@bookmark@seq@number=\count272 + +(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty +Package: rerunfilecheck 2022-07-10 v1.10 Rerun checks for auxiliary files (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty +Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO) +) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +85. +) +\Hy@SectionHShift=\skip50 +) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2020/01/02 v5.9 Page Geometry + +(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty +Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead. +) +\Gm@cnth=\count273 +\Gm@cntv=\count274 +\c@Gm@tempcnt=\count275 +\Gm@bindingoffset=\dimen147 +\Gm@wd@mp=\dimen148 +\Gm@odd@mp=\dimen149 +\Gm@even@mp=\dimen150 +\Gm@layoutwidth=\dimen151 +\Gm@layoutheight=\dimen152 +\Gm@layouthoffset=\dimen153 +\Gm@layoutvoffset=\dimen154 +\Gm@dimlist=\toks18 +) +(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty +Package: float 2001/11/08 v1.3d Float enhancements (AL) +\c@float@type=\count276 +\float@exts=\toks19 +\float@box=\box51 +\@float@everytoks=\toks20 +\@floatcapt=\box52 +) +(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +File: l3backend-pdftex.def 2024-01-04 L3 backend support: PDF output (pdfTeX) +\l__color_backend_stack_int=\count277 +\l__pdf_internal_box=\box53 +) +(./paper.aux) +\openout1 = `paper.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. + +(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count278 +\scratchdimen=\dimen155 +\scratchbox=\box54 +\nofMPsegments=\count279 +\nofMParguments=\count280 +\everyMPshowfont=\toks21 +\MPscratchCnt=\count281 +\MPscratchDim=\dimen156 +\MPnumerator=\count282 +\makeMPintoPDFobject=\count283 +\everyMPtoPDFconversion=\toks22 +) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf +Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 +85. + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +Package hyperref Info: Link coloring OFF on input line 13. + +(./paper.out) (./paper.out) +\@outlinefile=\write3 +\openout3 = `paper.out'. + + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(72.26999pt, 452.9679pt, 72.26999pt) +* v-part:(T,H,B)=(72.26999pt, 700.50687pt, 72.26999pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=452.9679pt +* \textheight=700.50687pt +* \oddsidemargin=0.0pt +* \evensidemargin=0.0pt +* \topmargin=-37.0pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=11.0pt +* \footskip=30.0pt +* \marginparwidth=50.0pt +* \marginparsep=10.0pt +* \columnsep=10.0pt +* \skip\footins=10.0pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 16. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 16. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 16. + +Overfull \hbox (17.17276pt too wide) in paragraph at lines 33--34 +[]\OT1/cmr/bx/n/10.95 Dep File Gen-er-a-tion\OT1/cmr/m/n/10.95 : Gen-er-ates de +-pen-dency files (e.g., \OT1/cmtt/m/n/10.95 requirements.txt\OT1/cmr/m/n/10.95 +, \OT1/cmtt/m/n/10.95 package.json\OT1/cmr/m/n/10.95 , + [] + +[1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] + +File: architecture_diagram.png Graphic file (type png) + +Package pdftex.def Info: architecture_diagram.png used on input line 46. +(pdftex.def) Requested size: 362.37569pt x 824.92316pt. + [2] +Overfull \vbox (150.14546pt too high) has occurred while \output is active [] + + +[3 +pdfTeX warning (ext4): destination with the same identifier (name{figure.1}) ha +s been already used, duplicate ignored + ...shipout:D \box_use:N \l_shipout_box + \__shipout_drop_firstpage_... +l.50 + <./architecture_diagram.png>] + +File: results_graph.png Graphic file (type png) + +Package pdftex.def Info: results_graph.png used on input line 56. +(pdftex.def) Requested size: 362.37569pt x 217.4248pt. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 65. + [4 +pdfTeX warning (ext4): destination with the same identifier (name{figure.2}) ha +s been already used, duplicate ignored + ...shipout:D \box_use:N \l_shipout_box + \__shipout_drop_firstpage_... +l.67 \end{document} + <./results_graph.png>] (./paper.aux) + *********** +LaTeX2e <2023-11-01> patch level 1 +L3 programming layer <2024-01-22> + *********** +Package rerunfilecheck Info: File `paper.out' has not changed. +(rerunfilecheck) Checksum: D492102D895C84AE650A055C588BC2DE;882. + ) +Here is how much of TeX's memory you used: + 8923 strings out of 476106 + 138194 string characters out of 5793933 + 1934975 words of memory out of 5000000 + 30833 multiletter control sequences out of 15000+600000 + 563715 words of font info for 55 fonts, out of 8000000 for 9000 + 59 hyphenation exceptions out of 8191 + 75i,6n,79p,611b,522s stack positions out of 10000i,1000n,20000p,200000b,200000s + +Output written on paper.pdf (4 pages, 187157 bytes). +PDF statistics: + 101 PDF objects out of 1000 (max. 8388607) + 81 compressed objects within 1 object stream + 23 named destinations out of 1000 (max. 500000) + 67 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/paper_generation/paper.out b/paper_generation/paper.out new file mode 100644 index 0000000..4aa8aec --- /dev/null +++ b/paper_generation/paper.out @@ -0,0 +1,7 @@ +\BOOKMARK [1][-]{section.1}{\376\377\000I\000n\000t\000r\000o\000d\000u\000c\000t\000i\000o\000n}{}% 1 +\BOOKMARK [1][-]{section.2}{\376\377\000M\000e\000t\000h\000o\000d\000o\000l\000o\000g\000y}{}% 2 +\BOOKMARK [2][-]{subsection.2.1}{\376\377\0007\000-\000P\000h\000a\000s\000e\000\040\000G\000e\000n\000e\000r\000a\000t\000o\000r\000\040\000P\000i\000p\000e\000l\000i\000n\000e}{section.2}% 3 +\BOOKMARK [2][-]{subsection.2.2}{\376\377\000A\000I\000\040\000P\000l\000a\000n\000n\000e\000r\000\040\000A\000g\000e\000n\000t\000\040\000L\000o\000o\000p}{section.2}% 4 +\BOOKMARK [1][-]{section.3}{\376\377\000A\000r\000c\000h\000i\000t\000e\000c\000t\000u\000r\000e\000\040\000D\000i\000a\000g\000r\000a\000m}{}% 5 +\BOOKMARK [1][-]{section.4}{\376\377\000R\000e\000s\000u\000l\000t\000s}{}% 6 +\BOOKMARK [1][-]{section.5}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 7 diff --git a/paper_generation/paper.pdf b/paper_generation/paper.pdf new file mode 100644 index 0000000..30a7030 Binary files /dev/null and b/paper_generation/paper.pdf differ diff --git a/paper_generation/paper.tex b/paper_generation/paper.tex new file mode 100644 index 0000000..ba1e2c5 --- /dev/null +++ b/paper_generation/paper.tex @@ -0,0 +1,67 @@ +\documentclass[11pt, a4paper]{article} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage{geometry} +\usepackage{float} + +\geometry{margin=1in} + +\title{\textbf{AlphaStack: AI-powered Project Generator for Complete Codebases}} +\author{AlphaStack Team} +\date{\today} + +\begin{document} + +\maketitle + +\section*{Abstract} +This paper presents AlphaStack, a novel approach to autonomous code generation using a multi-agent system with iterative self-healing and comprehensive validation. AlphaStack transforms natural language descriptions into complete, production-ready codebases with Docker configurations and automated testing across diverse programming paradigms. It systematically bridges the gap between language models' raw code-generation capabilities and the reliable creation of full software projects. + +\section{Introduction} +As large language models (LLMs) continue to advance, their capability to generate code snippets has been well-documented. However, building an entire project---including structure, file interconnectivity, build configurations, and tests---remains a substantial challenge. AlphaStack is an AI-driven code generation and validation system that accepts a natural language prompt and fully generates a working software project. Furthermore, it autonomously runs, debugs using an AI Planner Agent, and verifies the generated codebase by running tests inside isolated Docker containers. + +\section{Methodology} +The methodology behind AlphaStack is rooted in a structured pipeline and an agentic loop designed to autonomously catch and resolve software errors. + +\subsection{7-Phase Generator Pipeline} +The core generation process follows a strict 7-phase sequential pipeline: +\begin{enumerate} + \item \textbf{Software Blueprint}: Analyzes the user prompt and generates a software blueprint defining all files, module roles, and language settings. + \item \textbf{File Generation}: Calls the LLM to independently generate actual code for each file based on the blueprint. + \item \textbf{Dockerfile Generation}: Generates a production Dockerfile appropriate for the project language and structure. + \item \textbf{Dependency Analysis}: Runs static analysis to build an internal dependency graph across all files. + \item \textbf{Dep File Generation}: Generates dependency files (e.g., \texttt{requirements.txt}, \texttt{package.json}, \texttt{Cargo.toml}). + \item \textbf{Dep Resolution}: Validates the generated dependency files to ensure accuracy. + \item \textbf{Docker Testing Pipeline}: Initiates the testing phase and hands control to the AI Planner Agent loop. +\end{enumerate} + +\subsection{AI Planner Agent Loop} +After the initial generation, AlphaStack enters an iterative self-healing loop handled by the Docker Testing Pipeline and the AI Planner Agent. The planner reads the real-time pipeline state, project structure, and tool memory to formulate fixes. It issues tool calls to modify files or interact with the Docker executor (via the \texttt{docker\_test} tool). The loop continuously builds and tests the project up to a specified iteration limit, exiting successfully only when both the build and tests pass. + +\section{Architecture Diagram} +The architecture of AlphaStack seamlessly integrates the top-level pipeline with the lower-level execution and verification mechanisms. A visual representation of the data flow and system overview is shown in Figure~\ref{fig:architecture}. + +\begin{figure}[H] + \centering + \includegraphics[width=0.8\textwidth]{architecture_diagram.png} + \caption{System overview and data flow of AlphaStack} + \label{fig:architecture} +\end{figure} + +\section{Results} +AlphaStack has been evaluated on a comprehensive suite of programming challenges. Figure~\ref{fig:results} presents tentative results comparing model performance across the HumanEval and MDDP datasets. Models evaluated include GPT-5.2, GLM-5, MiniMax-m2.5, and Claude Sonnet 4.6. + +\begin{figure}[H] + \centering + \includegraphics[width=0.8\textwidth]{results_graph.png} + \caption{Tentative model performance on HumanEval and MDDP Datasets} + \label{fig:results} +\end{figure} + +\section{Conclusion} +AlphaStack demonstrates a powerful framework for generating end-to-end software applications from natural language. By coupling a rigorous 7-phase generation pipeline with a dynamic, self-healing AI Planner Agent, the system can reliably construct, test, and repair production-ready codebases. Future work will expand the evaluation framework and incorporate more advanced debugging heuristics. + +\section*{Supplementary Material} +Additional information, including the evaluation datasets (e.g., the 40 challenges across CUDA, Go, Rust, and TypeScript) and extensive logs from the testing pipeline, is available within the open-source repository at \url{https://github.com/HyperKuvid-Labs/alpha-stack}. + +\end{document} diff --git a/paper_generation/results_graph.png b/paper_generation/results_graph.png new file mode 100644 index 0000000..8e4b6b0 Binary files /dev/null and b/paper_generation/results_graph.png differ