One-liner koodi: system prompt vaatii rivinvaihdot + staattinen tarkistus

Ollaman system prompt: 'Use proper newlines and indentation'.
Staattinen analyysi: havaitsee jos .py-tiedosto on yhdellä rivillä.
Native node vaatii rebuildin.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 12:07:51 +03:00
parent 9ac90aa540
commit a12bd7ce7f
2 changed files with 5 additions and 1 deletions

View File

@@ -2597,6 +2597,10 @@ IMPORTANT: Keep the code SHORT. Max ~60 lines. No comments, no docstrings. Write
// Tarkista tyhjät funktiot
const emptyFuncs = code.match(/def \w+\([^)]*\):\s*\n\s*(pass|\.\.\.)/g);
if (emptyFuncs) staticIssues.push(`${name}: ${emptyFuncs.length} tyhjää funktiota`);
// Tarkista one-liner koodi (kaikki yhdellä rivillä)
if (lines.length <= 2 && code.length > 200) {
staticIssues.push(`${name}: koodi on yhdellä rivillä (${code.length} merkkiä) — generoi uudelleen`);
}
// Tarkista tiedostojen väliset importit (from db import get_db → onko get_db db.py:ssä?)
for (const imp of imports) {