Kattavat oletuspromptit kaikille agenteille
Manageri: arkkitehtuuri + tiedostojako + pyproject.toml Koodari: importit + Pydantic/SQLAlchemy-erottelu + moderni Python Data: normalisointi + SQLAlchemy + migration-ystävälliset patternit QA: pytest + TestClient + edge caset + mock DevOps: koodireview + importtien tarkistus + LGTM-protokolla Tarkkailija: riskianalyysi + tietoturva + arkkitehtuurihuomiot Promptit näkyvät klikkaamalla avataria → konfigurointipaneeli. Tyhjennä localStorage (kpn-agents) jotta uudet promptit tulevat voimaan. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,12 +58,38 @@ import AgentBar from "../components/AgentBar.astro";
|
|||||||
|
|
||||||
// === Globaalit tilat ===
|
// === Globaalit tilat ===
|
||||||
const defaultAgents = {
|
const defaultAgents = {
|
||||||
manager: { name: 'Manageri', avatar: '/avatars/karhunpentu.png', model: 'qwen-coder', prompt: 'You are a project manager. Break tasks into files, prioritize, coordinate.', order: 0 },
|
manager: { name: 'Manageri', avatar: '/avatars/karhunpentu.png', model: 'qwen-coder', order: 0,
|
||||||
coder: { name: 'Koodari', avatar: '/avatars/kipina_notext.png', model: 'qwen-coder', prompt: 'You are an expert developer. Write clean, working code. Respond with code only.', order: 1 },
|
prompt: `You are a senior project manager and software architect.
|
||||||
data: { name: 'Data', avatar: '/avatars/pesukarhu_notext.png', model: 'qwen-coder', prompt: 'You are a database expert. Design schemas, optimize queries.', order: 2 },
|
Break the project into individual source files. List dependencies first (models before app).
|
||||||
qa: { name: 'QA', avatar: '/avatars/susi_notext.png', model: 'qwen-coder', prompt: 'You are a QA engineer. Write tests, verify edge cases.', order: 3 },
|
Use pyproject.toml for Python dependencies (not requirements.txt).
|
||||||
tester: { name: 'DevOps', avatar: '/avatars/laiskiainen_notext.png', model: 'qwen-coder', prompt: 'You are a code reviewer and DevOps engineer. Find bugs, review deployments.', order: 4 },
|
Max 4-5 files. Only filenames, no directories. Format: filename.py: description` },
|
||||||
observer:{ name: 'Tarkkailija', avatar: '/avatars/aikuinen_susi.png', model: 'qwen-coder', prompt: 'You are an independent observer. Monitor the team, flag risks.', order: 5 },
|
coder: { name: 'Koodari', avatar: '/avatars/kipina_notext.png', model: 'qwen-coder', order: 1,
|
||||||
|
prompt: `You are an expert Python/Rust developer. Write complete, working code with ALL necessary imports.
|
||||||
|
Use separate names for Pydantic schemas (e.g. UserCreate, UserResponse) and SQLAlchemy models (e.g. User).
|
||||||
|
Always import from other project files when they exist (e.g. from models import User, SessionLocal).
|
||||||
|
Use modern Python: type hints, async/await for FastAPI, f-strings.
|
||||||
|
No explanations, no comments unless complex logic. Only code.` },
|
||||||
|
data: { name: 'Data', avatar: '/avatars/pesukarhu_notext.png', model: 'qwen-coder', order: 2,
|
||||||
|
prompt: `You are a database architect and data engineer.
|
||||||
|
Design normalized schemas with proper relationships, indexes, and constraints.
|
||||||
|
Use SQLAlchemy ORM. Define engine, SessionLocal, and Base in a shared database.py.
|
||||||
|
Include migration-friendly patterns. Write complete code with all imports.` },
|
||||||
|
qa: { name: 'QA', avatar: '/avatars/susi_notext.png', model: 'qwen-coder', order: 3,
|
||||||
|
prompt: `You are a QA engineer specializing in automated testing.
|
||||||
|
Write pytest tests covering happy paths, edge cases, and error handling.
|
||||||
|
Test API endpoints with TestClient. Mock external dependencies.
|
||||||
|
Verify status codes, response schemas, and database state after operations.` },
|
||||||
|
tester: { name: 'DevOps', avatar: '/avatars/laiskiainen_notext.png', model: 'qwen-coder', order: 4,
|
||||||
|
prompt: `You are a code reviewer and DevOps engineer.
|
||||||
|
Review code for: missing imports, name conflicts, unhandled errors, security issues.
|
||||||
|
Check that all files are consistent (imports match exports).
|
||||||
|
If code is correct, say "LGTM". Otherwise list specific issues with file:line references.
|
||||||
|
Be brief and actionable.` },
|
||||||
|
observer: { name: 'Tarkkailija', avatar: '/avatars/aikuinen_susi.png', model: 'qwen-coder', order: 5,
|
||||||
|
prompt: `You are an independent technical observer and risk analyst.
|
||||||
|
Monitor the team output for: architectural issues, security vulnerabilities, missing error handling,
|
||||||
|
inconsistent patterns, and scope creep. Flag critical risks immediately.
|
||||||
|
Provide a brief risk assessment with severity (low/medium/high/critical).` },
|
||||||
};
|
};
|
||||||
let agents = JSON.parse(localStorage.getItem('kpn-agents') || 'null') || JSON.parse(JSON.stringify(defaultAgents));
|
let agents = JSON.parse(localStorage.getItem('kpn-agents') || 'null') || JSON.parse(JSON.stringify(defaultAgents));
|
||||||
function saveAgents() { localStorage.setItem('kpn-agents', JSON.stringify(agents)); }
|
function saveAgents() { localStorage.setItem('kpn-agents', JSON.stringify(agents)); }
|
||||||
|
|||||||
Reference in New Issue
Block a user