LawLink AGENTS.md

LawLink AGENTS.md is an instructions file for Codex, OpenCode from lawflow-boop/LawLink. It costs 2,493 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.

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.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,493 This file is loaded in full into every session.
When invoked 2,493 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.02493 $0.02493
Opus 5 $0.01247 $0.01247
Sonnet 5 $0.00499 $0.00499
Haiku 4.5 $0.00249 $0.00249

Measured 6d ago against content hash 4da566ea4ca0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 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 · 169 lines

How it starts

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

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


一、项目定位

  • LawLink 是面向独立律师、小团队和小型律所的开源、自部署案件/项目管理系统。
  • 第一版主线工作流: 收案登记 → 冲突检索 → 转正式案件 → 持续跟进 → 财务记录 → 结案归档 → 数据导出
  • 不做共享 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)/         # 登录后的主应用路由分组
│   │   └── 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 引入)

规则

  • src/components/ui/ 只放 shadcn/Radix 原子组件。允许在原子层维护全站统一的语义 token、无障碍和基础动效适配,但禁止加入 LawLink 业务结构或领域判断;更新 shadcn 时必须审计并保留这些适配。
  • src/components/patterns/PageHeaderListToolbarFormSection、全局动效策略等 LawLink 品牌化跨页面模式,不承载 Server Action 或领域状态机。
  • 跨页面复用的业务组件提到对应领域目录,仅单页用的组件就近放在路由目录下 _components/
  • 业务规则(金额计算、状态机、冲突匹配算法)一律沉淀到 src/lib/src/server/,禁止散落在页面里。

Read the full file on GitHub · 169 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 · 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 (87 stars, last pushed 6d ago), licensed MIT. It adds 2,493 tokens to every session, about $0.0125 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