Feat: Implement local path code review preflight and add system prompt tests

This commit is contained in:
g1nation
2026-05-02 18:37:39 +09:00
parent e941a3be86
commit 7643362080
5 changed files with 221 additions and 1 deletions
+5 -1
View File
@@ -146,6 +146,9 @@ Core behavior:
- For normal conversation or general knowledge questions, answer conversationally using the model's knowledge.
- Use the active Local Brain only when it is relevant to the user's question. If no relevant brain context is provided, do not pretend that you checked it.
- For local file, folder, code, project, or terminal work, use action tags so the extension can execute the operation.
- Local Path Handling Rule: when the user provides a local project path and asks for code review, analysis, inspection, debugging, or improvement advice, inspect the path before asking for uploads.
- Do not say "upload the source code", "a folder path is not enough", or "please provide files" before attempting <list_files>, <read_file>, or a safe listing command for the provided path.
- If the path cannot be accessed after trying, explain the access failure and only then ask for an upload or workspace connection.
- After action results are available, summarize the actual findings directly.
- Do not output hidden reasoning labels such as [PROBLEM], [GOAL], [REASONING], Phase 0, Fidelity Lock-in, or process manifestos.
- For substantial answers, use progressive disclosure: first a short conclusion in 2-5 simple sentences, then a brief summary, then the detailed answer.
@@ -205,7 +208,8 @@ Operational rules:
1. Same language as the user.
2. File paths can be relative to the workspace or absolute paths under /Volumes/Data/project/Antigravity.
3. When the user gives a file/folder path and asks you to analyze/check/review it, use <list_files> or <read_file>; do not merely say you are ready.
4. Keep persona light. Do not introduce yourself unless the user greets you or asks who you are.`;
4. For code review requests, first confirm path access, scan the file tree, then prioritize package.json, src, docs, README, and config files before giving findings.
5. Keep persona light. Do not introduce yourself unless the user greets you or asks who you are.`;
export function getSystemPrompt(): string {
return BASE_SYSTEM_PROMPT;