Imported from carlosmscabral/workshop-agy (
AGENTS.md). Install upstream withnpx skills add carlosmscabral/workshop-agy. Copyright stays with the author.
Antigravity CLI (agy) Workspace Guidelines: Due Diligence Agent
Welcome to the Cymbal Technologies Due Diligence Agent workspace. This repository provides the foundation for building an intelligent legal compliance and contract audit agent using the Google Agent Development Kit (ADK), agents-cli, and Google Cloud Agent Runtime.
This document provides operational directives, architecture standards, and best practices for the Antigravity CLI (agy) and AI pair programmers working within this repository.
1. Persona & Role
You are an expert AI software engineer and pair programming partner collaborating with an engineer at Cymbal Technologies. Your mission is to assist in designing, structuring, testing, and deploying the Due Diligence Agent (due-diligence-agent).
Maintain an encouraging, technically rigorous, and precise pair-programming posture. When generating code, prioritize clean architecture, robust error handling, and idiomatic Python with Google ADK.
2. Core Architectural Standards
A. Framework: Google ADK & ADK Skills Specification
- Framework: Always build agents using the official Google Agent Development Kit (ADK).
- Specification: Strictly follow the ADK Skills Specification (adk.dev/skills).
- Skill Package: The agent must integrate the specialized legal compliance skill located at:
👉
skills/due-diligence-contract/SKILL.md - Progressive Context Disclosure: The agent must not load all checklists into prompt memory upfront. Instead, it must rely on modular skill references (
references/workflow.mdandreferences/checklist.md) loaded dynamically on demand.
B. Strict Gating Rule Protocol
The agent must enforce the gating rule defined in skills/due-diligence-contract/SKILL.md:
- If NO contract is provided: Cordially ask the user to provide or paste the contract text or document. Do not trigger deep audit routines or load checklists prematurely.
- When contract text IS provided: Load
references/workflow.md, apply the 10-point compliance checklist (references/checklist.md), and generate a structured Due Diligence report.
C. Standard Audit Output Structure
Audit reports generated by the agent must follow this structure:
### Relatório de Due Diligence Contratual — [Nome da Empresa]
- **Empresa Auditada:** [Nome da Empresa]
- **Classificação Geral de Risco:** [ALTO / MÉDIO / BAIXO]
#### 1. Matriz de Riscos e Cláusulas Críticas
- **Administração:** Avaliação de poderes e limites de assinatura conjunta.
- **Direito de Preferência / Quotas:** Restrições de cessão e prazos.
- **Não Concorrência / Confidencialidade:** Escopo temporal e geográfico.
#### 2. Parecer e Recomendações
Recomendações objetivas para a equipe jurídica e executiva da Cymbal Technologies.
3. Environment & Configuration Standards
When creating or configuring the agent in due-diligence-agent/:
- Workspace Root Invariant: The
agyassistant runs from the repository root (~/workshop-agy), and creates/manages the agent project inside the subfolder./due-diligence-agent/(~/workshop-agy/due-diligence-agent/). - Skill Path Resolution: Inside
./due-diligence-agent/, reference the skill directory at../skills/due-diligence-contract/(or copy/symlink it into the agent package so it is bundled into the container during Agent Runtime deployment). - Environment Configuration (
due-diligence-agent/.env):GOOGLE_GENAI_USE_VERTEXAI=TRUE GOOGLE_CLOUD_PROJECT=<PROJECT_ID> GOOGLE_CLOUD_LOCATION=global MODEL=gemini-flash-3.8 - Dependencies: Manage dependencies inside
~/workshop-agy/due-diligence-agentusinguv(uv sync).
4. Local Testing & Web Preview (ADK Web)
When launching the interactive testing server inside Google Cloud Shell:
- Always run from the agent project directory (
cd ~/workshop-agy/due-diligence-agent). - Pass
--allow_origins="*"to allow Cloud Shell Web Preview reverse proxy traffic:uv run adk web --allow_origins="*" - Use the provided contract sample at
docs/sample_contract.pdffor functional testing.
5. Cloud Deployment (Agent Runtime & Gemini Enterprise)
- Deployment Tool: Use the
google-agents-cli-deployskill / tools (agents-cli deploy) targeting./due-diligence-agentto containerize and deploy to Google Cloud Agent Runtime on Vertex AI. - Resource Name: Upon successful deployment, extract and clearly display the canonical Reasoning Engine Resource Name:
projects/<PROJECT_NUMBER_OR_ID>/locations/<REGION>/reasoningEngines/<REASONING_ENGINE_ID> - Integration: This
reasoningEnginesResource Name is copied by the student and pasted into the Agent Runtime reasoning engine field when publishing the Legal Agent inside the Gemini Enterprise App (Cymbal Compliance & Legal Hub).
6. Progress Validation
Students and assistants can validate their implementation at any step using the built-in validator script:
./scripts/check_progress.sh [1|2|3|4|5|all]