FinTrack: Instructions file for Codex

AGENTS.md

FinTrack AGENTS.md is an instructions file for Codex, OpenCode from Chasen-Liao/FinTrack. It costs 1,230 tokens per session, scanned A, original, MIT.

Project instructions for the FinTrack codebase that describe its folders, technologies, documentation, and preferred way to make changes. They tell coding agents to understand the project first and keep modifications small and verifiable.

In plain words
What is it for?
Use them before editing FinTrack to locate API, data-processing, machine-learning, frontend, and test code; preserve configuration and existing model outputs; and update related tests or callers when interfaces change.
Why use it?
They reduce accidental changes to the wrong layer or to teaching materials, while calling out special risks such as look-ahead bias in financial backtests.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is Chasen-Liao/FinTrack's own configuration. It tells Codex and OpenCode how to work on FinTrack itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything FinTrack configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Chasen-Liao/FinTrack. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Chasen-Liao/FinTrack/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Chasen-Liao/FinTrack

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for FinTrack AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chasen-liao/fintrack/agents-md.svg)](https://agentmods.dev/instructions/chasen-liao/fintrack/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/chasen-liao/fintrack/agents-md"><img src="https://agentmods.dev/badge/instructions/chasen-liao/fintrack/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,230 This file is loaded in full into every session.
When invoked 1,230 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01230 $0.01230
Opus 5 $0.00615 $0.00615
Sonnet 5 $0.00246 $0.00246
Haiku 4.5 $0.00123 $0.00123

Measured 6d ago against content hash fddba9da09f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

FinTrack AGENTS.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 6d 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.

AGENTS.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

本文件为进入 PokieTicker / FinTrack 仓库的 AI 编码代理提供项目级默认指引。目标只有两个:

  • 先理解实验语境、目录分层与约束
  • 再做小而准、可验证、尽量不外溢的修改

开始前先读

仓库定位

  • 后端:FastAPI + SQLite + Polygon + LLM
  • 前端:React 19 + TypeScript + Vite + D3
  • 机器学习:特征工程、XGBoost / LSTM、推理、策略回测
  • 仓库同时包含课程文档、实验结果与报告草稿;除非用户明确要求,不要主动修改这些教学材料

目录分层

  • backend/api/:API 入口与路由;优先在现有 router 中扩展
  • backend/pipeline/:新闻分层处理、对齐、相似度
  • backend/ml/:特征、训练、推理、回测、模型元数据
  • backend/llm/:LLM 客户端封装
  • backend/polygon/:行情/新闻数据访问
  • frontend/src/:页面、组件、样式、i18n
  • tests/:测试,重点覆盖 ML 与回测逻辑

默认工作方式

  1. 先判断任务属于 api / pipeline / ml / frontend / docs 哪一层,再决定改动位置。
  2. 优先最小改动,复用现有函数、路由、数据结构和模式,不为了“更优雅”引入新架构。
  3. 不打破分层边界:API 负责输入输出,pipeline 负责新闻处理,ml 负责特征、训练、推理与回测。
  4. 不硬编码密钥、模型名、地址或环境差异;继续使用 .env、配置模块或现有 settings。
  5. 变更接口、模型输出或数据结构时,优先保持兼容;如果必须变更,要同步更新调用方与测试。
  6. 遇到歧义时先判断影响面:如果会影响架构、数据含义、用户体验、安全性或破坏现有产物,应先确认;否则可做最合理假设,但完成后要说明。

项目特有约束

  • 涉及交易日对齐、T+N 收益、标签生成或回测时,必须显式避免前视偏差。
  • backend/ml/models/ 存放现有模型产物与回测 JSON;除非用户明确要求重新训练,不要覆盖、重写或清理。
  • 修改 LLM 相关逻辑时,注意全局配置与 Layer1 独立配置可能不同,不要默认两者完全一致。
  • 新增 SQLite schema、字段或迁移逻辑前,先检查 backend/migration.py 与现有初始化流程。
  • 后端 CORS 当前已允许 51737777;前端端口、调用地址或部署方式有变动时,要一并验证。

验证要求

  • 先把请求转换成可验证的成功标准,再实施修改。
  • 修改 backend/ml/strategy_backtest.py、特征工程、收益计算、标签生成时,尽量补或更新 tests/
  • 修改 API 序列化字段时,至少检查受影响路由和前端调用点是否一致。
  • 修改前端图表、页面或数据字段时,至少完成一次构建验证;如条件允许,再补充实际页面检查。
  • 完成后明确区分:哪些已经验证,哪些因环境、数据或时间限制尚未验证。

常用命令

  • 后端启动:python -m uvicorn backend.api.main:app --reload --host 127.0.0.1 --port 8000
  • Python 测试:pytest tests/ -v
  • 前端开发:cd frontend && npm run dev
  • 前端构建:cd frontend && npm run build
  • 前端检查:cd frontend && npm run lint

专用 Agents

Read the full file on GitHub · 70 lines

Changes

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.

  1. 6d ago First seen · 70 lines · 1,230 tokens per session scan A fddba9da09f0

Subscribe to this mod's changes

FinTrack AGENTS.md is an instructions file published in the GitHub repository Chasen-Liao/FinTrack (5 stars, last pushed 2mo ago), licensed MIT. It adds 1,230 tokens to every session, about $0.0062 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-31.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,182 tokens

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).

microsoft/vscode · 6,785 tokens

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).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens