stock-trading AGENTS.md

stock-trading AGENTS.md is an instructions file for Codex, OpenCode from mwangli/stock-trading. It costs 4,686 tokens per session, scanned A, original, MIT.

Instructions for a stock-trading system, requiring user-facing communication in Chinese and describing its Java backend, React frontend, machine-learning models, documentation, and temporary-file rules.

In plain words
What is it for?
Use them when developing or reviewing the trading system, especially its data collection, analysis, trade execution, Java services, React interface, models, and documentation.
Why use it?
They keep explanations in the required language and help an agent work in the correct part of a project that has separate backend and frontend applications.

Instructions file for CodexOpenCode

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mwangli/stock-trading/agents-md
Clone the repo
git clone --depth 1 https://github.com/mwangli/stock-trading

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 stock-trading AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mwangli/stock-trading/agents-md.svg)](https://agentmods.dev/instructions/mwangli/stock-trading/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mwangli/stock-trading/agents-md"><img src="https://agentmods.dev/badge/instructions/mwangli/stock-trading/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,686 This file is loaded in full into every session.
When invoked 4,686 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.04686 $0.04686
Opus 5 $0.02343 $0.02343
Sonnet 5 $0.00937 $0.00937
Haiku 4.5 $0.00469 $0.00469

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

Security

Grade A, and why

stock-trading 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 · 392 lines

How it starts

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

交互语言要求

  1. 强制使用中文:所有回答、思考过程、输出内容必须使用中文
  2. 代码除外:代码本身和特殊专有名词(如类名、方法名、API 名称)使用英文
  3. 展示思考过程:在回答问题时,需要展示分析和推理过程

补充强化(必须遵守)

  1. 不得直接粘贴英文原始输出:包括但不限于后台 Agent、外部文档、命令行输出等;如包含英文内容,必须先用中文进行归纳/翻译后再输出。
  2. 面向用户的最终输出必须中文:允许在代码块、类名/方法名/API 名称、URL、HTTP Header 等专有名词处使用英文。
  3. “展示思考过程”的边界:以“结论 → 证据 → 推理 → 验证步骤 → 规避方案”的结构化方式说明;避免输出无关的内部草稿或逐字推演。

AGENTS.md - AI 股票交易系统开发指南

项目结构

本项目采用前后端分离架构,包含以下两个主要部分:

stock-trading/
├── backend/                        # Java Spring Boot 单体应用
│   ├── src/main/java/com/stock/
│   │   ├── config/                # 全局配置
│   │   ├── dataCollector/        # 数据采集
│   │   ├── modelService/         # AI 模型(LSTM、情感分析)
│   │   ├── strategyAnalysis/    # 策略分析
│   │   ├── tradingExecutor/     # 交易执行(含 job 调度)
│   │   ├── event/、handler/、logging/、service/
│   │   └── ...
│   └── pom.xml
│
├── frontend-v2/                    # React + Vite 前端
│   ├── src/pages/、components/、layouts/、store/、locales/
│   ├── package.json、vite.config.ts
│   └── ...
│
├── models/sentiment/               # 情感模型(TorchScript,Git LFS)
├── docs/                           # 文档(00~04 模块需求与设计)
├── .tmp/                           # 临时文件(不提交)
├── docker-compose.yml
└── pom.xml

临时文件约定:项目根目录下的 .tmp/ 用于存放所有临时文件和中间脚本。Agent 生成的一次性脚本、临时输出、中间结果等均应放在此目录,且该目录已加入 .gitignore,不纳入版本控制。

构建与运行命令

Backend (Java/Maven)

工作目录: backend/

# 启动应用 (Spring Boot)
mvn spring-boot:run

# 构建打包 (跳过测试)
mvn clean package -DskipTests

# 编译代码
mvn compile

Frontend (React/Vite)

工作目录: D:\ai-stock-trading\frontend

# 安装依赖
npm install

# 启动开发服务器
npm run dev

# 构建生产版本
npm run build

# 代码检查 (Lint)
npm run lint

测试说明

本项目不维护自动化测试(无单元测试、集成测试)。原因与说明见 README - 关于测试。构建时使用 mvn package -DskipTests 跳过测试。

代码规范

Java (Backend)

  • 版本: Java 17, Spring Boot 3.2.x
  • 风格:
    • 类名 PascalCase, 方法/变量 camelCase, 常量 UPPER_SNAKE_CASE
    • 使用 Lombok (@Data, @Slf4j, @RequiredArgsConstructor) 简化代码
    • Controller 返回统一泛型对象 Response<T>
  • 分包策略: 按业务领域分包 (dataCollector, modelService 等),而非按层分包。
  • 错误处理: 使用全局异常处理 (@ControllerAdvice),禁止吞掉异常。

Read the full file on GitHub · 392 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 · 392 lines · 4,686 tokens per session scan A 35e348979190

Subscribe to this mod's changes

stock-trading AGENTS.md is an instructions file published in the GitHub repository mwangli/stock-trading (147 stars, last pushed 3mo ago), licensed MIT. It adds 4,686 tokens to every session, about $0.0234 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.

Related

Other instructions, from other repositories

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

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

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