uv kauttaaltaan + Tarkkailijan raportti rakenteelliseksi markdowniksi
uv-päivitykset: - Koodarin NEVER-lista: ei requirements.txt, ei pip, käytä uv - Template pyproject.toml: PEP 621, uv-yhteensopiva - Raportin Quick Start: uv sync + uv run uvicorn Tarkkailijan raportti uudessa formaatissa: - Overview (yksi kappale) - Files (taulukko: tiedosto + tarkoitus) - Quick Start (uv-komennot koodiblokissa) - Docker (build + run koodiblokissa) - API Endpoints (taulukko: method, path, description) - Architecture (rakenne ja päätökset) - Risk Assessment (taulukko: severity, issue) Malli saa taulukkopohjat valmiina → täyttää ne oikealla datalla. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"pyproject.toml": {
|
||||
"description": "Project dependencies",
|
||||
"example": "[project]\nname = \"myapp\"\nversion = \"0.1.0\"\nrequires-python = \">=3.11\"\ndependencies = [\n \"fastapi\",\n \"uvicorn[standard]\",\n \"sqlalchemy\",\n]\n\n[project.scripts]\ndev = \"uvicorn main:app --reload\"",
|
||||
"instructions": "List the exact dependencies needed. Use [project.scripts] for run commands."
|
||||
"instructions": "Use [project] format (PEP 621, compatible with uv). List dependencies under [project.dependencies]. Add [project.scripts] with dev command. Never use requirements.txt or Poetry format. Run with: uv run uvicorn main:app --reload"
|
||||
}
|
||||
},
|
||||
"order": ["models.py", "schemas.py", "main.py", "pyproject.toml"]
|
||||
|
||||
@@ -101,7 +101,9 @@ NEVER:
|
||||
- Add explanations or comments like "# Add routes here"
|
||||
- Leave placeholder code or TODO comments
|
||||
- Use Flask syntax (app.run) in FastAPI projects
|
||||
- Forget to import from other project files` },
|
||||
- Forget to import from other project files
|
||||
- Use requirements.txt or Poetry — always use pyproject.toml with [project] format (PEP 621)
|
||||
- Use pip install — use uv (e.g. uv run uvicorn main:app --reload)` },
|
||||
data: { name: 'Data', avatar: '/avatars/pesukarhu_notext.png', model: 'qwen-coder', order: 2,
|
||||
temperature: 0.5, topK: 40, repeatPenalty: 1.15, maxTokens: 1024,
|
||||
prompt: `You are a database architect specializing in SQLAlchemy and relational databases.
|
||||
@@ -878,15 +880,29 @@ OUTPUT FORMAT:
|
||||
highlightAgent('observer');
|
||||
explainStep('Raportti', `${obs.name} kokoaa yhteenvedon ja antaa arvosanan.`);
|
||||
const finalCode = Object.entries(files).map(([n,c]) => `--- ${n} ---\n${c}`).join('\n\n');
|
||||
const fileList = Object.keys(files).join(', ');
|
||||
const obsPrompt = (obs.prompt ? obs.prompt+'\n\n' : '') +
|
||||
`Write a project README.md report in markdown for: ${task}\n\n` +
|
||||
`IMPORTANT: Start the FIRST LINE with exactly one of these verdicts:\n` +
|
||||
`VERDICT: GREEN — project is production-ready, no issues\n` +
|
||||
`VERDICT: ORANGE — project works but has warnings or improvements needed\n` +
|
||||
`VERDICT: RED — project has critical issues that must be fixed\n\n` +
|
||||
`Then include:\n` +
|
||||
`# Project: ${task}\n` +
|
||||
`## Files\n## How to run\n## API Endpoints\n## Architecture\n## Risk assessment\n\n` +
|
||||
`Write a project report in clean markdown for: ${task}\n\n` +
|
||||
`FIRST LINE must be exactly one of:\n` +
|
||||
`VERDICT: GREEN\nVERDICT: ORANGE\nVERDICT: RED\n\n` +
|
||||
`Then write this report:\n\n` +
|
||||
`# ${task}\n\n` +
|
||||
`## Overview\nOne paragraph describing what this project does.\n\n` +
|
||||
`## Files\n| File | Purpose |\n|------|---------|` +
|
||||
Object.entries(files).map(([n]) => `\n| ${n} | ... |`).join('') + `\n\n` +
|
||||
`## Quick Start\n` +
|
||||
'```bash\n' +
|
||||
`git clone <repo>\ncd project\nuv sync\nuv run uvicorn main:app --reload\n` +
|
||||
'```\n\n' +
|
||||
`## Docker\n` +
|
||||
'```bash\n' +
|
||||
`docker build -t ${task.toLowerCase().replace(/[^a-z0-9]/g, '-')} .\ndocker run -p 8000:8000 ${task.toLowerCase().replace(/[^a-z0-9]/g, '-')}\n` +
|
||||
'```\n\n' +
|
||||
`## API Endpoints\n| Method | Path | Description |\n|--------|------|-------------|` +
|
||||
`\n| POST | /items/ | Create |\n| GET | /items/ | List all |\n| GET | /items/{id} | Get by ID |\n| PUT | /items/{id} | Update |\n| DELETE | /items/{id} | Delete |\n` +
|
||||
`(Adapt paths and descriptions to match the actual code)\n\n` +
|
||||
`## Architecture\nDescribe the project structure and design decisions.\n\n` +
|
||||
`## Risk Assessment\n| Severity | Issue |\n|----------|-------|\n| ... | ... |\n\n` +
|
||||
`Project code:\n${finalCode}`;
|
||||
const readme = await kpnRun(obs.model, obsPrompt);
|
||||
if (readme) {
|
||||
|
||||
Reference in New Issue
Block a user