Pipeline-promptit: rajoitteet kerrottu managerille ja koodarille
Manageri tietää nyt 400 tokenin rajan per tiedosto ja pitää tiedostomäärän max 3:ssa. Koodari kirjoittaa lyhyttä, fokusoidusti. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2055,14 +2055,15 @@
|
||||
termLog(`\n<span style="color:#d29922;font-weight:bold">[1] Manageri</span> — projektin suunnittelu`);
|
||||
pipelineStep('manager', 'Suunnittelu', 'active', task);
|
||||
const managerPrompt = `List the source files needed for this project. One file per line, format:
|
||||
filename.py: what this file contains
|
||||
filename.py: one-line description
|
||||
|
||||
Rules:
|
||||
- Max 4 files
|
||||
- Only .py, .toml, .json, .html files
|
||||
CONSTRAINTS — the coder can only generate ~400 tokens per file:
|
||||
- Max 3 files (keep it minimal)
|
||||
- Each file must be SHORT: one clear responsibility, no boilerplate
|
||||
- Only .py and pyproject.toml files
|
||||
- No directories, no paths, just filenames
|
||||
- List dependencies first, then main app (e.g. models.py before main.py)
|
||||
- Use pyproject.toml for dependencies (not requirements.txt)
|
||||
- List dependencies first, then main app
|
||||
- Prefer fewer, focused files over many small ones
|
||||
|
||||
Project: ${task}`;
|
||||
const plan = await kpnRun(agentPrompts.manager.model, managerPrompt);
|
||||
@@ -2133,7 +2134,7 @@ start = "uvicorn main:app --reload"`;
|
||||
|
||||
const coderPrompt = `${context}Project: ${task}
|
||||
Write ONLY the file "${file.name}"${file.desc ? ': ' + file.desc : ''}.${extraInstructions}
|
||||
Use the exact libraries mentioned in the project description. Write correct, working code.`;
|
||||
IMPORTANT: Keep the code SHORT and focused. Max ~50 lines. No comments, no docstrings, no type hints unless essential. Write minimal, working code.`;
|
||||
const code = await kpnRun(agentPrompts.coder.model, coderPrompt);
|
||||
if (!code) {
|
||||
termLog(` ✗ Pipeline keskeytyi (${file.name})`, '#f85149');
|
||||
|
||||
Reference in New Issue
Block a user