diff --git a/network-poc/static/index.html b/network-poc/static/index.html index fc82a5f..3ddf99c 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -2179,6 +2179,33 @@ Write the corrected code.`; } } + // Vaihe 5: QA kirjoittaa testit + const step5 = fileList.length + (review && !review.toLowerCase().includes('lgtm') ? 5 : 3); + termLog(`\n[${step5}] QA — testit`); + pipelineStep('qa', 'Testit', 'active', 'Kirjoitetaan testejä'); + const qaPrompt = `Write a short test file (test_app.py) for this project. Use pytest. Max 3 test functions. Keep it minimal. + +${Object.entries(generatedFiles).map(([n, c]) => `--- ${n} ---\n${c}`).join('\n\n')}`; + const tests = await kpnRun(agentPrompts.qa.model, qaPrompt); + if (tests) generatedFiles['test_app.py'] = tests; + pipelineStep('qa', 'Testit', 'done', 'test_app.py', tests); + + // Vaihe 6: DevOps — käynnistysohjeet + const step6 = step5 + 1; + termLog(`\n[${step6}] DevOps — käynnistys`); + pipelineStep('tester', 'DevOps', 'active', 'Käynnistysohjeet'); + const devopsPrompt = `Write a minimal README.md for this project. Include ONLY: +1. One-line description +2. How to install (pip/uv) +3. How to run +4. How to test +Max 15 lines. No badges, no license, no contributing section. + +Files: ${Object.keys(generatedFiles).join(', ')}`; + const readme = await kpnRun(agentPrompts.tester.model, devopsPrompt); + if (readme) generatedFiles['README.md'] = readme; + pipelineStep('tester', 'DevOps', 'done', 'README.md', readme); + termLog(`\n━━━ Pipeline valmis (${Object.keys(generatedFiles).length} tiedostoa) ━━━`); renderProjectCard(generatedFiles, task); }