Feat: Implement local path code review preflight and add system prompt tests
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Development Log: Local Path Code Review Preflight
|
||||
|
||||
## Purpose
|
||||
Prevent code review requests from falling back to "please upload files" when the user already provided an accessible local project path.
|
||||
|
||||
## User Feedback
|
||||
When the user gave a local path such as `/Volumes/Data/project/Antigravity/Skybound`, the agent did not inspect the folder and repeatedly asked for uploaded files. The expected behavior is to attempt local access first, then request uploads only if access fails.
|
||||
|
||||
## Implementation Summary
|
||||
- Added a Local Path Handling Rule to the base system prompt.
|
||||
- Explicitly forbade upload requests before attempting local path inspection.
|
||||
- Added code review ordering guidance: confirm path access, scan tree, inspect `package.json`, `src`, `docs`, README, and config files first.
|
||||
- Added deterministic local project path preflight in the agent execution flow.
|
||||
- When a review/analysis prompt contains an allowed Antigravity project path, the agent now:
|
||||
- validates path access
|
||||
- scans the directory tree
|
||||
- previews priority project files
|
||||
- injects the result into the model context before the answer is generated
|
||||
- If access fails, the injected context includes the concrete failure reason.
|
||||
|
||||
## Changed Files
|
||||
- `src/agent.ts`
|
||||
- `src/utils.ts`
|
||||
- `tests/systemPrompt.test.ts`
|
||||
|
||||
## Verification
|
||||
- `./node_modules/.bin/tsc --noEmit`
|
||||
- `npm run compile`
|
||||
- `./node_modules/.bin/jest --runInBand`
|
||||
|
||||
## Result
|
||||
For local project review requests, the agent should now inspect the provided path first and only ask for uploads when the path is inaccessible.
|
||||
@@ -20,3 +20,4 @@
|
||||
- Added a deterministic output brake that removes unsupported technical structure claims from final answers when Trace policy is `general-only`.
|
||||
- Tuned Second Brain retrieval by query intent so UX/business/approval questions prioritize customer journey, requirement fit, and business value notes over generic architecture notes.
|
||||
- Tuned answer readability: paragraph-first summaries, fewer bullet-heavy sections, clearer numbered-section spacing, and larger markdown headings in the sidebar.
|
||||
- Added local project path preflight for code review requests so the agent scans accessible Antigravity project folders before asking for uploads.
|
||||
|
||||
Reference in New Issue
Block a user