Borrowing it
Nothing to install: this file belongs to kbhujbal/AlphaAnalyst-open-source-autonomous-equity-research-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kbhujbal/AlphaAnalyst-open-source-autonomous-equity-research-agent/main/CLAUDE.mdgit clone --depth 1 https://github.com/kbhujbal/AlphaAnalyst-open-source-autonomous-equity-research-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/kbhujbal/alphaanalyst-open-source-autonomous-equity-research-agent/claude-md)<a href="https://agentmods.dev/instructions/kbhujbal/alphaanalyst-open-source-autonomous-equity-research-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/kbhujbal/alphaanalyst-open-source-autonomous-equity-research-agent/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/kbhujbal/alphaanalyst-open-source-autonomous-equity-research-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/kbhujbal/alphaanalyst-open-source-autonomous-equity-research-agent/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01159 | $0.01159 |
| Opus 5 | $0.00580 | $0.00580 |
| Sonnet 5 | $0.00232 | $0.00232 |
| Haiku 4.5 | $0.00116 | $0.00116 |
Grade A, and why
AlphaAnalyst-open-source-autonomous-equity-research-agent CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are building "AlphaAnalyst" — an open-source autonomous equity research agent. Given a US stock ticker, it produces a research memo with DCF valuation, news analysis, and full citations. This file pins the architecture. Do not deviate.
========================== MONOREPO STRUCTURE
alpha-analyst/ ├── backend/ Python FastAPI service │ ├── pyproject.toml │ ├── alembic/ │ ├── config/models.yaml │ ├── src/ │ │ ├── settings.py │ │ ├── clients/ external API wrappers │ │ ├── llm/ LiteLLM wrapper + cost tracking │ │ ├── models/ Pydantic data models │ │ ├── fetchers/ orchestrate clients + cache │ │ ├── agents/ LLM-driven analysis units │ │ ├── modeler/ DCF + comps (pure Python) │ │ ├── orchestrator/ wires agents into pipeline │ │ └── api/ FastAPI routes │ └── tests/ ├── frontend/ Next.js app │ ├── package.json │ ├── app/ App Router pages │ ├── components/ │ ├── lib/ api client, utils, hooks │ ├── types/ generated from backend OpenAPI │ └── public/ ├── docker-compose.yml postgres + redis + (optional) services └── README.md
========================== LOCKED BACKEND STACK
- Python 3.11+ with uv
- FastAPI + uvicorn
- Postgres 16 + pgvector
- Redis 7
- LiteLLM (NEVER call provider SDKs directly)
- Pydantic v2, SQLAlchemy 2.x async + asyncpg, Alembic
- pytest + pytest-asyncio + respx
========================== LOCKED FRONTEND STACK
- Next.js 14+ with App Router (NOT Pages Router)
- TypeScript strict mode (NO any types unless justified in a comment)
- Tailwind CSS v3 (NO CSS-in-JS, NO styled-components)
- shadcn/ui for primitives (canary CLI; install components on demand only)
- TanStack Query v5 for server state (NOT SWR, NOT Redux)
- Tremor for charts/dashboard components (NOT Chart.js, NOT D3 directly)
- Lucide React for icons (NOT Heroicons, NOT Font Awesome)
- Zod for runtime validation
- next-themes for dark mode
- openapi-typescript to generate API types from backend OpenAPI schema
========================== LOCKED EXTERNAL APIS (do not invent endpoints)
SEC EDGAR, sec-api.io, Polygon.io, Financial Modeling Prep, Finnhub, MarketAux, Google News RSS, FRED, Voyage AI (voyage-finance-2)
========================== LLM ABSTRACTION RULE
All LLM calls go through backend/src/llm/client.py::AnalystLLM. Never call provider SDKs directly. Tasks map to models in backend/config/models.yaml. Never hardcode a model name in agent code.
========================== ANTI-HALLUCINATION RULES (MOST IMPORTANT)
- The LLM is a writer, not a knower. Numbers come from APIs ONLY. LLMs synthesize narrative; they NEVER type numerical facts from memory.
- Every fact passed to an LLM must include a source identifier. LLM output must include these citations.
- If a required input is missing, raise an exception. Do NOT default-and-pretend. Do NOT fabricate.
- Do not invent API endpoints, SDK methods, library functions, env var names, or shadcn/ui components.
- Do not add libraries not in pyproject.toml or package.json. Ask first.
- All numerical computation happens in Python — NEVER inside an LLM prompt.
- Frontend never invents data. If the API doesn't return a field, do NOT default it to "—" or "N/A" silently — show a typed empty state.
========================== API CONTRACT RULE
Backend exposes OpenAPI schema at /openapi.json. Frontend types are generated from this schema with npm run codegen. Frontend NEVER hand-writes types for backend responses. If the frontend needs a field that doesn't exist, update the backend Pydantic model first.
========================== SCOPE DISCIPLINE
- Implement ONLY what the current phase prompt requests.
- Stop at listed deliverables.
- TODOs use
# TODO Phase N: ...(Python) or// TODO Phase N: ...(TS). - Ask before: adding dependencies, restructuring, expanding scope.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 100 lines · 1,159 tokens per session scan A 8b0365a7232e
AlphaAnalyst-open-source-autonomous-equity-research-agent CLAUDE.md is an instructions file published in the GitHub repository kbhujbal/AlphaAnalyst-open-source-autonomous-equity-research-agent (47 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 1,159 tokens to every session, about $0.0058 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.