Automation of software development for psychiatry, psychotherapy and medical psychology: methodology for creating technical specifications and code generation using artificial intelligence (vibe-coding)
Authors
D.S. Radionov
Federal State Budgetary Institution “V.M. Bekhterev National Medical Research Center for Psychiatry and Neurology” of the Ministry of Health of the Russian Federation, St. Petersburg, Russian Federation
A.V. Yakovlev
Federal State Budgetary Educational Institution of Higher Education “S.M. Kirov Military Medical Academy” Ministry of Defense of the Russian Federation, St. Petersburg, Russian Federation; Federal State Autonomous Educational Institution of Higher Education “Saint Petersburg State University of Aerospace Instrumentation”, St. Petersburg, Russian Federation
T.A. Karavaeva
Federal State Budgetary Institution “V.M. Bekhterev National Medical Research Center for Psychiatry and Neurology” of the Ministry of Health of the Russian Federation, St. Petersburg, Russian Federation; Federal State Budgetary Educational Institution of Higher Education “Saint Petersburg State University”, St. Petersburg, Russian Federation
Federal State Budgetary Educational Institution of Higher Education “Saint Petersburg State Pediatric Medical University” of the Ministry of Health of the Russian Federation, St. Petersburg, Russian Federation; Federal State Budgetary Institution “National Medical Research Center of Oncology named after N.N. Petrov” of the Ministry of Health of the Russian Federation, Pesochnyy Settlement, St. Petersburg, Russian Federation
A.V. Vasilieva
Federal State Budgetary Institution “V.M. Bekhterev National Medical Research Center for Psychiatry and Neurology” of the Ministry of Health of the Russian Federation, St. Petersburg, Russian Federation; Federal State Budgetary Educational Institution of Higher Education “North-West State Medical University named after I.I. Mechnikov” of the Ministry of Health of the Russian Federation, St. Petersburg, Russian Federation
https://doi.org/10.26617/1810-3111-2025-4(129)-57-70
Journal: Siberian Herald of Psychiatry and Addiction Psychiatry. 2025; 4 (129): 57-70.
Abstract
Context andBackground.The development of personalized software for psychiatry, psychotherapy, and medical psychology is complicated by the interdisciplinary barrier between clinicians and developers. The widespread use of large language models (LLM) and intuitive development environments opens up opportunities to automate the creation of specialized solutions, reducing development time from weeks to days. Theoretical Basis. The methodology is based on the spiral software life cycle model (ISO/IEC 12207:2008), which ensures iterative adaptation to the dynamic requirements of medical tasks. The integration of LLM into the code generation process is formalized through universal technical specifications (TS). Objective: to develop a methodology for creating deterministic TS for generative AI models, ensuring automated code generation for highly specialized tasks (assessment of comorbid pathology, addiction risks, fatigue as a predictor of neuroticism). Materials and Methods. Free-format technical specifications in Russian with iterative adjustments by experts. Code generation using LLM Qwen2.5-Max (medical terminology support, 131 thousand context tokens). Implementation of prototypes in Python 3.13 with the Tkinter library for GUI. Validation of a modular architecture for processing heterogeneous data (questionnaires, audiovisual markers). Results. A functional prototype for predicting medical risks with a multi-window interface and color indication of results was created. 98% of the generated code complied with the technical specifications after two iterations of refinement. Dynamic adaptation of modules (A/B/C) for the tasks of screening for depression, anxiety, and fatigue was implemented. Conclusions. The combination of formalized technical specifications and LLM accelerates the development of medical software, but requires interdisciplinary interaction at the requirements verification stage, strict ethical audit (in accordance with GOST R 71657-2024 and Federal Law No. 152), integration with IoT devices (neurovisors, biosensors) for multimodal data analysis. It is recommended to use the methodology for the mass development of personalized tools in the context of a specialist shortage. Key Limitations: dependence on the quality of technical specifications, the inability of AI to offer innovative architectural solutions, the need for manual adaptation for legacy technology stacks.
Keywords: automation of software development, artificial intelligence, vibe-coding, technical specifications, code generation, large language models, depressive disorders, anxiety disorders, fatigue, psychiatry, psychotherapy, medical psychology, diagnostics and screening.
Contacts
This email address is being protected from spambots. You need JavaScript enabled to view it.
Materials
For citation: Radionov D.S., Yakovlev A.V., Karavaeva T.A., Vasilieva A.V. Automation of software development for psychiatry, psychotherapy and medical psychology: methodology for creating technical specifications and code generation using artificial intelligence (vibe-coding). Siberian Herald of Psychiatry and Addiction Psychiatry. 2025; 4 (129): 57-70. https://doi.org/10.26617/1810-3111-2025-4(129)-57-70
REFERENCES
- Galkin SA, Sozonov AS, Bykova MA, Roshchina OV, Bokhan NA. The effectiveness of a relaxation scenario in virtual reality technology in young adults. Human Physiology. 2025;51(3):40-45. https://doi.org/10.31857/S0131164625030043 (in Russian).
- GOST R 71657-2024. Artificial intelligence technologies in education. Functional subsystem for creating scientific publications. General Provisions. Moscow: Russian Institute for Standardization; 2024:14 (in Russian).
- GOSTRISO/IEC12207-99. Information Technology. Software life cycle processes. Moscow: Publishing House of Standards, 2000:68 (in Russian).
- Zamyatin KA, Nozdrachev DI, Solovieva MN. Mobile applications for anxiety and stress reduction: potential for preventing noncommunicable diseases. Russian Journal of Cardiology. 2021;26(9):22-27. https://doi.org/10.15829/1560-4071-2021-4681(in Russian).
- Kasyanov ED, Kovaleva YaV, Mazo GE. Digital phenotyping as a new method of screening for mental disorders. V.M. Bekhterev Review of Psychiatry and Medical Psychology. 2022;56(4):96-100. https://doi.org/10.31363/2313-7053-2022-4-96-100 (in Russian).
- Kornetov AN, Starikova EG, Kaverina IS, Starikov YuV, Soldatov AA, Potapova NE, Tolmachev IV. Approaches to diagnostic automation for mental health in operators of certain occupations. Psychiatry, Psychotherapy and Clinical Psychology. 2023;14(1):95-104. https://doi.org/10.34883/PI.2023.14.1.002 (in Russian).
- Neznanov NG, Vasileva AV. Digitalization in the provision of mental health care. New opportunities for specialists and patients. National Healthcare. 2023;4(2):15-24. https://doi.org/10.47093/2713-069X.2023.4.2.15-24(in Russian).
- Neznanov NG, Vasilyeva AV, Salagay OO. The role of psychotherapy as a medical specialty in public health. Public Health. 2022;2(2):40-57. https://doi.org/10.21045/2782-1676-2022-2-2-40-57(in Russian).
- Skripov VS, Chekhonadsky II, Kochorova LV, Shvedova AA, Semenova NV. Results of interaction with regional services within telemedicine consultations in psychiatry and narcology. V.M. Bekhterev Review of Psychiatry and Medical Psychology. 2019;3:73-77. https://doi.org/10.31363/2313-7053-2019-3-73-77 (in Russian).
- Sozonov AS, Roshchina OV, Bykova MA, Kazennykh TV, Bokhan NA. Study of the influence of virtual reality technology on the psycho-emotional state of healthy volunteers. Siberian Herald of Psychiatry and Addiction Psychiatry. 2025;1(126):15-20. https://doi.org/10.26617/1810-3111-2025-1(126)-15-20 (in Russian).
- Sologub PS. Application of machine learning to neuroanatomical and physiological data in the field of ADHD diagnosis. Modern Foreign Psychology. 2024;13(2):84-91. https://doi.org/10.17759/jmfp.2024130208(in Russian).
- Federal Law No. 152-FZ of July 27, 2006 “On Personal Data” (as amended June 24, 2025). Legislation of the Russian Federation. 2006;31, Part 1:Art. 3451 (in Russian).
- Freize VB, Malyshko LV, Grachev GI, Dutov VB, Semenova NV, Neznanov NG. Outlook of applying of virtual reality (VR) technologies in the treatment of patients with mental disorders (review of foreign literature). V.M. Bekhterev Review of Psychiatry and Medical Psychology. 2021;55(1):18-24. https://doi.org/10.31363/2313-7053-2021-1-18-24 (in Russian).
- Psychotherapy: National Handbook / AV Vasilieva, TA Karavaeva, NG Neznanov (eds.). Moscow: GEOTAR-Media, 2023:992. https://doi.org/10.33029/9704-7567-6-PSY-2023-1-992 (in Russian).
- YankovskayaAE, KornetovNA, KornetovAN, KazantsevaNV. Systematization of cognitive-behavioral interventions for organizational stress for use in the IMSLOG intellectual system. Tomsk State University Bulletin. 2010;341:191-194(in Russian).
- Adugna T, Ramu A, Haldorai A. A review of pattern recognition and machine learning. J. Mach. Comput.2024,4:210-220. https://doi.org/10.53759/7669/jmc202404020.
- Ai Y, Zhang L, Zhang D. Research on the application of computer-based psychotherapy in clinical guidance. Transactions on Materials, Biotechnology and Life Sciences. 2024;2:12-18. https://doi.org/10.62051/qr21gp88.
- Alnuaimi A, Albaldawi T. Concepts of statistical learning and classification in machine learning: An overview. BIO Web of Conferences. 2024 Apr; 97(12):00129. https://doi.org/10.1051/bioconf/20249700129.
- Beames JR, Han J, Shvetcov A, Zheng WY, Slade A, Dabash O, Rosenberg J, O'Dea B, Kasturi S, Hoon L, Whitton AE, Christensen H, Newby JM. Use of smartphone sensor data in detecting and predicting depression and anxiety in young people (12-25 years): A scoping review. Heliyon. 2024 Jul 30;10(15):e35472.https://doi.org/10.1016/j.heliyon.2024.e35472. PMID: 39166029; PMCID: PMC11334877.
- Bufano P, Laurino M, Said S, Tognetti A, Menicucci D. Digital Phenotyping for Monitoring Mental Disorders: Systematic Review. J Med Internet Res. 2023 Dec 13;25:e46778. https://doi.org/10.2196/46778. PMID: 38090800; PMCID: PMC10753422.
- Gadde A. Democratizing software engineering through generative ai and vibe coding: The evolution of no-code development. J Computer Science and Technology Studies. 2025;7(4):556-572. https://doi.org/10.32996/jcsts.2025.7.4.66.
- Grebovic M, Filipović L, Katnic I, Vukotić M, Popović T. Machine learning models for statistical analysis. Int. Arab J. Inf. Technol. 2023;20(3a):505-514. https://doi.org/10.34028/iajit/20/3a/8.
- Gu X, Chen M, Lin Y, Hu Y, Zhang H, Wan C, Wei Z, Xu Y, Wang J. On the effectiveness of large language models in domain-specific code generation. ACM Transactions on Software Engineering and Methodology. 2023;34(3):1-22. https://doi.org/10.1145/3697012.
- Han Y, Lyu C. Multi-stage guided code generation for Large Language Models. Engineering Applications of Artificial Intelligence. 2025 Jan;139:109491. https://doi.org/10.1016/j.engappai.2024.109491.
- Hoseini SS, Dewar R. Empowering healthcare professionals with no-code artificial intelligence platforms for model development, a practical demonstration for pathology. Discoveries (Craiova). 2024 Mar 30;12(1):e182. https://doi.org/10.15190/d.2024.1. PMID: 39734805; PMCID: PMC11682784.
- Hu Y, Zhang S, Dang T, Jia H, Salim F, Hu W, Quigley A. Exploring large-scale language models to evaluate EEG-based multimodal data for mental health. Companion of the 2024 on ACM International Joint Conference on Pervasive and Ubiquitous Computing. 2024:412-417. https://doi.org/10.1145/3675094.3678494.
- Jiang J, Wang F, Shen J, Kim S, Kim S. A Survey on large language models for code generation. arXiv preprint arXiv:2406.00515. 2024. https://doi.org/10.48550/arxiv.2406.00515.
- Jiang X, Dong Y, Wang L, Shang Q, Li G. Self-planning code generation with large language models. ACM Trans Softw Eng Methodol. 2023Sept;33(7):1-30. https://doi.org/10.1145/3672456.
- Kim J, Ma PS, Chen M, Galatzer-Levy I, Torous J, Van Roessel P, Sharp C, Pfeffer M, Rodriguez C, Linos E, Chen J. Optimizing large language models for detecting symptoms of comorbid depression or anxiety in chronic diseases: Insights from patient messages. arXiv preprint arXiv:2503.11384. 2025. https://doi.org/10.48550/arxiv.2503.11384.
- Li J, Tao C, Li J, Li G, Jin Z, Zhang H, Fang Z, Liu F. Large language model-aware in-context learning for code generation. ACM Transactions on Software Engineering and Methodology. 2025;34(7):1-33. https://doi.org/10.1145/3715908.
- Linardon J, Chen K, Gajjar S, Eadara A, Wang S, Flathers M, Burns J, Torous J. Smartphone digital phenotyping in mental health disorders: A review of raw sensors utilized, machine learning processing pipelines, and derived behavioral features. Psychiatry Res. 2025 Jun;348:116483. https://doi.org/10.1016/j.psychres.2025.116483. Epub 2025 Apr 1. PMID: 40187059.
- Liu J, Gao M, Sabour S, Chen Z, Huang M, Lee T. Enhanced large language models for effective screening of depression and anxiety. Communications Medicine 2025Nov;5(1). https://doi.org/10.1038/s43856-025-01158-1.
- Maranhão GN de A, Oliveira WD de, Brito AU, Vasconcelos OC de M, Siqueira MR.S. Satisfaction assessment of training in artificial intelligence with a focus on sustainable projects for the amazon. Revista De Gestão Social E Ambiental. 2025 Jan;19(1):e010529. https://doi.org/10.24857/rgsa.v19n1-110.
- Moran K, Bernal-Cárdenas C, Curcio M, Bonett R, Poshyvanyk D. Machine learning-based prototyping of graphical user interfaces for mobile apps. IEEE Transactions on Software Engineering. 2018;46(2):196-221. https://doi.org/10.1109/TSE.2018.2844788.
- Nadas M, Dioşan L, Tomescu A. Synthetic data generation using large language models: Advances in text and code. IEEE Access. 2025;13:134615-134633. https://doi.org/10.1109/ACCESS.2025.3589503.
- Nie J, Shao H, Fan Y, Shao Q, You H, Preindl M, Jiang X. LLM-based conversational ai therapist for daily functioning screening and psychotherapeutic intervention via everyday smart devices. ACM Trans. Comput. Healthcare. 2025Jan. https://doi.org/10.48550/arxiv.2403.10779.
- Parsanna M. A review on various machine learning algorithms. Int J Sc. Res Eng Manag. 2025;09(03):1-9. https://doi.org/10.55041/ijsrem42692.
- Pasquale L, Sabetta A, d’Amorim M, Hegedűs P, Mirakhorli M, Okhravi H, Payer M, Rashid A, Santos J, Spring J, Tan L, Tuma K, Massacci F. Challenges to using large language models in code generation and repair. IEEE Secur Priv. 2025 March-Apr;23(2):81-88. https://doi.org/10.1109/MSEC.2025.3530488.
- Reiter J, Nickels S, Nelson B, Rainaldi E, Peng L, Doraiswamy P, Kapur R, Abernethy A, Trister A. Increasing psychopharmacology clinical trial success rates with digital measures and biomarkers: Future methods. NPP‒ Digit Psychiatry Neurosci. 2024May;2(7). https://doi.org/10.1038/s44277-024-00008-7.
- Roy K, Surana H, Eswaramoorthi D, Zi Y, Palit V, Garimella R, Sheth A. Large language models for mental health diagnostic assessments: exploring the potential of large language models for assisting with mental health diagnostic assessments ‒ the depression and anxiety case. arXiv preprint arXiv:2501.01305. 2025. https://doi.org/10.48550/arxiv.2501.01305.
- Saari M, Soini J, Grönman J, Rantanen P, Mäkinen T, Sillberg P. Modeling the software prototyping process in a research context. Information Modelling and Knowledge Bases XXXII. 2020;333:107-118. https://doi.org/10.3233/FAIA200823.
- Sanmocte EMT, Costales JA. Exploring effectiveness in software development: A comparative review of system analysis and design methodologies. Int J Comput Theory Eng. 2025;17(1):36-43. https://doi.org/10.7763/ijcte.2025.v17.1367.
- Saravanos A, Curinga MX. Simulating the software development lifecycle: The waterfall model. Appl Syst Innov. 2023;6(6):108. https://doi.org/10.3390/asi6060108.
- Sardesai N, Russo P, Martin J, Sardesai A. Utilizing generative conversational artificial intelligence to create simulated patient encounters: a pilot study for anaesthesia training. Postgrad Med J. 2024Jan;100(5). https://doi.org/10.1093/postmj/qgad137.
- Sidey-Gibbons JAM, Sidey-Gibbons CJ. Machine learning in medicine: a practical introduction. BMC Med Res Methodol. 2019 Mar 19;19(1):64. https://doi.org/10.1186/s12874-019-0681-4. PMID: 30890124; PMCID: PMC6425557.
- Singh B, Kaunert C. Paradise of virtual reality (VR) and augmented reality (AR) in mental health treatment: Breaking down barriers advancing supremely smart healthcare for futuristic growth. In: Soufiane BO, Chakraborty C, Unhelkar B. (eds.). Augmented Wellness. Springer, Singapore; 2025:243-258. https://doi.org/10.1007/978-981-96-2952.
- Stade EC, Stirman SW, Ungar LH, Boland CL, Schwartz HA, Yaden DB, Sedoc J, DeRubeis RJ, Willer R, Eichstaedt JC. Large language models could change the future of behavioral healthcare: a proposal for responsible development and evaluation. Npj Ment Health Res. 2024 Apr 2;3(1):12. https://doi.org/10.1038/s44184-024-00056-z. PMID: 38609507; PMCID: PMC10987499.
- Tupsakhare P. Revolutionizing oncology solutions with ai on low-code platforms. Journal of Oncology Research Review & Reports. 2023;(4):e101. https://doi.org/10.47363/jonrr/2023(4)e101.
- Xu S, Yan Y, Li F, Zhang S, Tang H, Luo C, Li Y, Liu H, Mei Y, Gu W, Qiu H, Wang Y, Qiu J, Yang T, Wang Z, Zhang Q, Geng H, Han Y, Shao J., Opel N., Bing L., Zhao M., Xu Y., Jiang X., Chen J. Identifying psychiatric manifestations in outpatients with depression and anxiety: A large language model-based approach. bioRxiv. 2025. https://doi.org/10.1101/2025.01.03.2431811.
- Yang Y, Li X, Ke W, Liu Z. Automated prototype generation from formal requirements model. IEEE Transactions on Reliability. 2020 Jun, 18;69(2):632-656. https://doi.org/10.1109/TR.2019.2934348.
- Yankovskaya AE, Kornetov AN, Il’inskikh NN, ObukhovskayaVB. An expansion of intelligent systems complex for express-diagnostics and prevention of organizational stress, depression, and deviant behavior on the basis of the biopsychosocial approach. Pattern Recognit. Image Anal. 2017;27:783-788. https://doi.org/10.1134/S1054661817040204.
- Zhang L, Liu Z, Wan Y, Fan Y, Chen D, Wang Q, Zhang K, Zheng Y. DepITCM: an audio-visual method for detecting depression. Front Psychiatry. 2025 Jan 23;15:1466507. https://doi.org/10.3389/fpsyt.2024.1466507. PMID: 39917382; PMCID: PMC11799262.
- Zhang S, Hu Y, Yi X, Nanayakkara S, Chen X. IntervEEG-LLM: Exploring EEG-based multimodal data for customized mental health interventions. Companion Proceedings of the ACM on Web Conference 2025. 2025;7:2320-2326. https://doi.org/10.1145/3701716.3717550