Pipeline: QA kirjoittaa testit + DevOps tekee README:n
Uudet vaiheet koodiarvioinnin jälkeen: - QA: kirjoittaa test_app.py (pytest, max 3 testiä) - DevOps: kirjoittaa README.md (asennus, käynnistys, testaus) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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<span style="color:#3fb950;font-weight:bold">[${step5}] QA</span> — 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<span style="color:#d29922;font-weight:bold">[${step6}] DevOps</span> — 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<span style="color:#a371f7;font-weight:bold">━━━ Pipeline valmis (${Object.keys(generatedFiles).length} tiedostoa) ━━━</span>`);
|
||||
renderProjectCard(generatedFiles, task);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user