LawLink: Instructions file for Codex

AGENTS.md

LawLink AGENTS.md is an instructions file for Codex, OpenCode from lawflow-boop/LawLink. It costs 30,185 tokens per session, scanned A, original, MIT.

Project instructions for LawLink, an open-source, self-hosted case and project management system for lawyers and small law firms.

In plain words
What is it for?
Use them when developing LawLink features such as conflict searches, case tracking, financial records, archiving, and data export.
Why use it?
They define the project’s purpose, technology choices, folder structure, and naming rules so changes fit the existing codebase.

Instructions file for CodexOpenCode

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

This is lawflow-boop/LawLink's own configuration. It tells Codex and OpenCode how to work on LawLink 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 LawLink configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/yesen/Code/LawLink.

Reuse

Borrowing it

Nothing to install: this file belongs to lawflow-boop/LawLink. 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/lawflow-boop/LawLink/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/lawflow-boop/LawLink

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 LawLink AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lawflow-boop/lawlink/agents-md/github.svg)](https://agentmods.dev/instructions/lawflow-boop/lawlink/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lawflow-boop/lawlink/agents-md"><img src="https://agentmods.dev/badge/instructions/lawflow-boop/lawlink/agents-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.

agentmods 80×15 button for LawLink AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lawflow-boop/lawlink/agents-md"><img src="https://agentmods.dev/badge/instructions/lawflow-boop/lawlink/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30,185 This file is loaded in full into every session.
When invoked 30,185 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.30185 $0.30185
Opus 5.5 $0.12074 $0.12074
Sonnet 5.5 $0.06037 $0.06037
Haiku 4.5 $0.03019 $0.03019

Measured 1mo ago against content hash d85bf6e7dc37, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

LawLink 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 1mo 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 · 483 lines

How it starts

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

这是项目的"约束先行"文档。任何 AI 助手(含 Claude Code)或人类协作者在本仓库工作前,必须先读完本文件。 规则与实践冲突时,先改本文件、再改代码。


一、项目定位

  • LawLink 是面向独立律师、小团队和小型律所的开源、自部署案件/项目管理系统。
  • 品牌标语(2026-09-21 用户定稿):事有经纬,案有始终。 README、GitHub 仓库简介及后续品牌展示统一使用此句;产品功能说明另行保留。
  • 第一版主线工作流: 收案登记 → 冲突检索 → 转正式案件 → 持续跟进 → 财务记录 → 结案归档 → 数据导出
  • 不做共享 SaaS 多租户。一个律所/团队部署一套实例,单体应用 + 单库。
  • 协议:MIT。

二、技术栈(已定型)

层 选型 说明
框架 Next.js 16 App Router + TypeScript SSR + RSC,单仓单进程
UI 组件 shadcn/ui + Radix UI 拷贝式组件,深度可定制
样式 Tailwind CSS 高密度浅色工作台,保留主题扩展能力
动效 Framer Motion 微交互、页面切换
React React 19 Next.js 16 配套
图标 lucide-react
图表 Recharts 工作台、财务统计
表单 React Hook Form + Zod
表格 TanStack Table 表头筛选、排序、分页
数据库 PostgreSQL 16 + Prisma 5
鉴权 NextAuth.js(Credentials Provider) 邮箱密码登录
部署 Docker Compose(app + postgres)

已弃用:Ant Design。不要再引入 antd 或 @ant-design/*。

预留接入(V1.5):元典开放平台 MCP(law/case/company),用于冲突检索增强和企业核查。


三、目录约定

LawLink/
├── docs/                  # 设计文档(PRD / DATA-MODEL / UI-DESIGN)
├── prisma/                # schema、迁移、seed
├── public/                # 静态资源
├── storage/               # 本地私有文件(不入 git)
├── src/
│   ├── app/               # 路由与 Route Handler
│   │   ├── (auth)/        # 登录、注册路由分组
│   │   ├── (app)/         # 登录后的主应用路由分组
│   │   ├── (admin)/admin/ # 独立管理后台页面壳;仍复用同一登录、服务层与数据库
│   │   └── api/           # API 路由
│   ├── components/
│   │   ├── ui/            # shadcn/Radix 原子组件与全局无障碍、动效适配
│   │   ├── patterns/      # LawLink 跨页面视觉与交互模式
│   │   ├── layout/        # AppShell、Sidebar、Topbar
│   │   ├── matters/       # 案件相关组合组件
│   │   └── ...
│   ├── lib/               # 业务规则、工具函数、Prisma client
│   │   ├── auth/          # NextAuth 配置、session helpers
│   │   ├── permissions/   # 角色权限、案件可见性
│   │   └── ...
│   ├── server/            # Server Actions、服务层
│   ├── types/             # 共享 TS 类型
│   └── styles/            # globals.css、Tailwind config 扩展
└── tests/                 # (V1.5 引入)

Read the full file on GitHub · 483 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. 1mo ago Changed · +6 lines · +986 tokens per session d85bf6e7dc37
  2. 1mo ago Changed · +215 lines · +22,282 tokens per session e6f1d8d5f698
  3. 1mo ago Changed · +93 lines · +4,424 tokens per session a1d1e5890be5
  4. 2mo ago First seen · 169 lines · 2,493 tokens per session scan A 4da566ea4ca0

Subscribe to this mod's changes

LawLink AGENTS.md is an instructions file published in the GitHub repository lawflow-boop/LawLink (103 stars, last pushed 6d ago), licensed MIT. It adds 30,185 tokens to every session, about $0.1207 per session on Opus 5.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

LawLink AGENTS.md compared with instructions from other repositories

LawLink AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
LawLink AGENTS.mdlawflow-boop/LawLinkInstructions file1036d agoMITA30,185Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot