portfolio-copilot
AGENTS.md0 starsChanged 4 months agoApache-2.0View on GitHub
Instructions for any AI coding agent (Claude Code, Antigravity, or similar) working in this repository. Human contributors should read this too. Portfolio Copilot — a personal finance/investment assistant demonstrating registry-driven dynamic planning on the Gemini Enterprise Agent Platform. Start with docs/spec/00-overview.md for the full picture before making non-trivial changes. - /skills — runtime skills for the deployed Portfolio Copilot agent itself. These get registered with the Agent Registry and discovered by the root planner at runtime. Changing these changes what…
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- action-draftingSkill
- equity-researchSkill
- goals-onboardingSkill
- portfolio-analysisSkill
- researchSkill
- reviewerSkill
- spending-analysisSkill
- suitabilitySkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 10
Start with docs/spec/00-overview.md for the full picture before making non-trivial changes.
- Distinctive: line 63
Never commit or push directly to
main: All changes must go through a feature/fix branch and a Pull Request. - Distinctive: line 64
For large changes / architectural features: Always create a GitHub issue first outlining the scope, rationale, and design decisions, then …
- Distinctive: line 72
Before running git push, always execute:
- Distinctive: line 76
If only touching Python files, at a minimum verify:
- Very specific: line 84
Always use the Makefile to deploy services: Do not run ad-hoc gcloud builds submit or manual deployment commands directly.
- Very specific: line 117
If the change affects what the system does, check it against docs/spec/01-functional.md first — update the spec, don't let code drift from …
- Very specific: line 120
If the change is an architectural decision (new dependency, new data store, a tradeoff with real alternatives) — not just an implementation …
- Very specific: line 128
No secrets, tokens, or credentials committed anywhere, including scripts/ — use Secret Manager / environment injection
- Very specific: line 130
Every skill in /skills must have a complete SKILL.md (no TODOs) before it's registered with the Agent Registry
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for any AI coding agent (Claude Code, Antigravity, or similar) working in this repository. Human contributors should read this too.
What this repo is
Portfolio Copilot — a personal finance/investment assistant demonstrating
registry-driven dynamic planning on the Gemini Enterprise Agent Platform.
Start with docs/spec/00-overview.md for the
full picture before making non-trivial changes.
Two different "skills" folders — don't confuse them
/skills— runtime skills for the deployed Portfolio Copilot agent itself. These get registered with the Agent Registry and discovered by the root planner at runtime. Changing these changes what the product does. Any change here should trace back todocs/spec/01-functional.md./.agent/skills— engineering-practice skills for you, the coding agent working on this repo. Read these before writing code. They cover code conciseness, unit testing, and coverage expectations.
Repo map
docs/{spec,adr}/ Spec-driven design — read before changing architecture
skills/ Runtime skills (Agent Registry-facing, see above)
orchestrator/ Python — ADK root planner (DynamicNode), deployed to Agent Runtime
pkg/ Go — contracts, BigQuery, Firestore store
(library code for frontend/server; not consumed by orchestrator's Python)
frontend/ Vue 3 TypeScript SPA + Go backend server (Cloud Run)
scripts/ bash/gcloud/python and Makefiles for infra provisioning
.agent/skills/ Engineering-practice skills (this repo's coding agent, see above)Language note: orchestrator is Python (Agent Runtime's deployment contract is Python-only — see ADR-0008); frontend web host and shared libraries are Go, since they are not agents.
Build & test
# Full verification (lint + all test suites across Python, Go, and Vue)
make check
# Linting only (Python ruff + Go vet) — MUST pass before pushing any code
make lint # or: uv run --project orchestrator ruff check . && go vet ./...
# orchestrator/ (Python)
cd orchestrator && uv run pytest --cov
# Go shared libraries & frontend server (Go)
go build ./...
go test ./... -cover
# frontend UI (Vue + TS)
cd frontend && npm run build && npm run test -- --coverageBranching & PR Workflow (Mandatory)
- Never commit or push directly to
main. All changes must go through a feature/fix branch and a Pull Request. - For large changes / architectural features: Always create a GitHub issue first outlining the scope, rationale, and design decisions, then create a linked Pull Request.
- For smaller changes / bug fixes: Directly create a feature branch and open a Pull Request.
Pre-Push Checklist (Mandatory)
Never push a branch or create/update a PR until all linters and tests pass locally.
CI strictly runs ruff check . across the workspace and will reject any PR with lint errors.
Before running git push, always execute:
make check # runs: make lint && make testIf only touching Python files, at a minimum verify:
uv run --project orchestrator ruff check .
cd orchestrator && uv run pytestDeployment — Always Use Makefile
Always use the Makefile to deploy services. Do not run ad-hoc gcloud builds submit or manual deployment commands directly.
# Deploy Full Stack (Both Orchestrator and Frontend)
make deploy
# Deploy Orchestrator to Vertex AI Agent Runtime
make deploy-orchestrator # or: cd orchestrator && make deploy
# Deploy Frontend to Cloud Run
make deploy-frontend # or: cd frontend && make deploy
# Provision Worker Managed Agent
make deploy-managed-agent
# Register Skills with Agent Registry
make register-skills
# Setup Agent Runtime IAM & Permissions
make setup-agent-engine
# End-to-End Environment Provisioning & Test Data
make setup-all
make load-testdataBefore writing code
- Read
.agent/skills/concise-code/SKILL.md,.agent/skills/unit-testing/SKILL.md, and.agent/skills/code-coverage/SKILL.md. If you're touching anything Agent Runtime-related also read.agent/skills/agent-runtime/SKILL.md. - If the change affects what the system does, check it against
docs/spec/01-functional.mdfirst — update the spec, don't let code drift from it silently. - If the change is an architectural decision (new dependency, new data
store, a tradeoff with real alternatives) — not just an implementation
detail — add an ADR under
docs/adr/rather than only leaving reasoning in a commit message or PR description.
Conventions
- Conventional commits (
feat:,fix:,docs:,refactor:,test:) - No secrets, tokens, or credentials committed anywhere, including
scripts/— use Secret Manager / environment injection - Every skill in
/skillsmust have a completeSKILL.md(no TODOs) before it's registered with the Agent Registry
Talking to Agent Runtime (fka Agent Engine)
The only supported control-plane surface is the Python vertexai SDK
(vertexai.Client(...).agent_engines). The following gcloud command
groups do not exist — don't try them, and don't invent variants:
gcloud ai reasoning-engines …gcloud ai-platform …(the entire group is dead)gcloud agent-registry …/gcloud alpha agent-registry …gcloud alpha agents …
For list / describe / query / delete / logs use
scripts/agent_engine_admin.py — it
wraps the SDK behind a click CLI. Deploy/update is
scripts/deploy_agent_engine.py. See
.agent/skills/agent-runtime/SKILL.md
for the full playbook before troubleshooting.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

