LightBot AGENTS.md

A project-specific coding guide for LightBot, a Java-based AI-agent platform with a Spring Boot backend and Vue frontend. It sets rules for module boundaries, model calls, database access, prompts, and shared services.

In plain words
What is it for?
Use it when changing LightBot code, especially its Java modules, AI integrations, prompts, database operations, middleware utilities, or Vue-related project structure.
Why use it?
It helps an agent follow the project’s architecture instead of adding direct dependencies or putting logic in the wrong layer. This reduces forbidden cross-module calls, duplicated integrations, and tangled dependencies.

Instructions file for CodexOpenCode

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/finch04/lightbot/agents-md
Clone the repo
git clone --depth 1 https://github.com/finch04/LightBot

Made for: Codex, OpenCode.

Per session 7,716 This file is loaded in full into every session.
When invoked 7,716 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 $0.07716 $0.07716
Opus 5 $0.03858 $0.03858
Sonnet 5 $0.01543 $0.01543
Haiku 4.5 $0.00772 $0.00772

Measured 2d ago against content hash a4ff334937ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

LightBot 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 1,022 lines

How it starts

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

LightBot - AI Coding Guide

轻量级 Java AI Agent 平台

Tech Stack: SpringBoot + SpringAI + Vue3


项目原则

原则 说明
模块化 每个功能域独立模块,边界清晰,可独立演进
AI Native 架构围绕 AI 能力设计,而非传统 CRUD 套壳
Java First 后端统一 Java,不混入 Python / Node
渐进式演进 先单体后拆分,先简单后复杂,不提前设计
低耦合 模块间通过接口通信,禁止直接依赖实现类

架构原则

禁止事项

❌ 禁止跨模块直接调用 Service
❌ 禁止 Controller 写业务逻辑
❌ 禁止循环依赖
❌ 禁止硬编码 Prompt
❌ 禁止直接依赖 OpenAI SDK / DashScope SDK
❌ 禁止在业务代码中直接 new RestTemplate 调用模型
❌ 禁止使用拼接SQL语句操作数据库(必须使用 MyBatis-Plus)
❌ 禁止在 Service 中直接操作中间件客户端(必须通过 Util 类)
❌ 禁止 lightbot-server 新增业务 Service、DTO/VO、tool/builtin、service/chat、workflow/*Executor*

必须遵守

✅ 所有模型调用必须通过统一 AI Framework(SpringAI)
✅ 跨模块调用通过 Service 接口;跨域聚合使用 Port 模式(如 Dashboard);禁止 import ...service.impl.*
✅ 所有 Prompt 必须模板化,存储于配置或数据库
✅ 所有外部依赖通过依赖注入,禁止静态方法调用
✅ 所有数据库操作必须使用 MyBatis-Plus(LambdaQueryWrapper / ServiceImpl)
✅ 所有中间件操作(MinIO/Redis/MQ等)必须封装为 Util 类
✅ 业务核心逻辑必须有注释说明意图

模块结构

架构边界详见 docs/architecture/module-boundaries.md

lightbot/
├── lightbot-common/           # Result、枚举、公共类型
├── lightbot-framework/        # Spring 配置、Redis/MinIO 等中间件 Util
├── lightbot-platform/         # 用户、任务、系统配置、API Key、Dashboard、日志
├── lightbot-ai/               # 模型工厂、Prompt、LLM Trace
├── lightbot-knowledge/        # RAG、文档、图谱、评测
├── lightbot-tool/             # Tool / MCP / Skill / SubAgent 定义与注册
├── lightbot-workflow/         # Workflow DSL、节点处理器、图校验
├── lightbot-agent/            # Agent 运行时(Chat、Workflow 执行、SubAgent)
├── lightbot-server/           # HTTP 入口(Controller、Config、拦截器)
└── lightbot-ui/               # Vue3 前端(独立目录,非 Maven 模块)

依赖规则

common ← framework ← platform ← ai ← knowledge ← tool ← workflow ← agent ← server
lightbot-server    → platform, ai, knowledge, tool, workflow, agent
lightbot-agent     → platform, workflow, knowledge
lightbot-workflow  → tool
lightbot-tool      → knowledge
lightbot-knowledge → ai
lightbot-ai        → framework, platform
lightbot-platform  → framework
lightbot-framework → common

Read the full file on GitHub · 1,022 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. 2d ago First seen · 1,022 lines · 7,716 tokens per session scan A a4ff334937ea

Subscribe to this mod's changes

LightBot AGENTS.md is an instructions file published in the GitHub repository finch04/LightBot (93 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 7,716 tokens to every session, about $0.0386 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

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

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

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

next.js 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