techprotrade commited on
Commit
6fe9b86
·
verified ·
1 Parent(s): 49e2b87

Add loan-advisor-agent

Browse files
Files changed (1) hide show
  1. loan-advisor-agent/GEMINI.md +55 -0
loan-advisor-agent/GEMINI.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Coding Agent Guide
2
+
3
+ ## Prerequisites
4
+
5
+ Install the CLI (one-time):
6
+ ```bash
7
+ uv tool install google-agents-cli
8
+ ```
9
+
10
+ ---
11
+
12
+ ## Development Phases
13
+
14
+ ### Phase 1: Understand Requirements
15
+ Before writing any code, understand the project's requirements, constraints, and success criteria.
16
+
17
+ ### Phase 2: Build and Implement
18
+ Implement agent logic in `app/`. Use `agents-cli playground` for interactive testing. Iterate based on user feedback.
19
+
20
+ ### Phase 3: The Evaluation Loop (Main Iteration Phase)
21
+ Start with 1-2 eval cases, run `agents-cli eval run`, iterate. Expect 5-10+ iterations. See the **Evaluation Guide** for metrics, evalset schema, LLM-as-judge config, and common gotchas.
22
+
23
+ ### Phase 4: Pre-Deployment Tests
24
+ Run `uv run pytest tests/unit tests/integration`. Fix issues until all tests pass.
25
+
26
+ ### Phase 5: Deploy to Dev
27
+ **Requires explicit human approval.** Run `agents-cli deploy` only after user confirms. See the **Deployment Guide** for details.
28
+
29
+ ### Phase 6: Production Deployment
30
+ Ask the user: Option A (simple single-project) or Option B (full CI/CD pipeline with `agents-cli infra cicd`).
31
+
32
+ ## Development Commands
33
+
34
+ | Command | Purpose |
35
+ |---------|---------|
36
+ | `agents-cli playground` | Interactive local testing |
37
+ | `uv run pytest tests/unit tests/integration` | Run unit and integration tests |
38
+ | `agents-cli eval run` | Run evaluation against evalsets |
39
+ | `agents-cli lint` | Check code quality |
40
+ | `agents-cli infra single-project` | Set up project infrastructure (Terraform) |
41
+ | `agents-cli deploy` | Deploy to dev |
42
+ | `agents-cli scaffold enhance` | Add deployment target or CI/CD to project |
43
+ | `agents-cli scaffold upgrade` | Upgrade project to latest version |
44
+
45
+ ---
46
+
47
+ ## Operational Guidelines for Coding Agents
48
+
49
+ - **Code preservation**: Only modify code directly targeted by the user's request. Preserve all surrounding code, config values (e.g., `model`), comments, and formatting.
50
+ - **NEVER change the model** unless explicitly asked.
51
+ - **Model 404 errors**: Fix `GOOGLE_CLOUD_LOCATION` (e.g., `global` instead of `us-east1`), not the model name.
52
+ - **ADK tool imports**: Import the tool instance, not the module: `from google.adk.tools.load_web_page import load_web_page`
53
+ - **Run Python with `uv`**: `uv run python script.py`. Run `agents-cli install` first.
54
+ - **Stop on repeated errors**: If the same error appears 3+ times, fix the root cause instead of retrying.
55
+ - **Terraform conflicts** (Error 409): Use `terraform import` instead of retrying creation.