fairbrief-cle-hours 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +170 -2
- package/bin/fairbrief-cle-hours.js +7 -0
- package/evals/cases.json +422 -0
- package/evals/own.json +21 -0
- package/fixtures/README.md +9 -0
- package/fixtures/accuracy.json +55 -0
- package/fixtures/cle-records.csv +12 -0
- package/fixtures/cle-requirements-typo.json +1 -0
- package/fixtures/cle-requirements.json +7 -0
- package/fixtures/client-canaries.json +4 -0
- package/fixtures/intl/README.md +8 -0
- package/fixtures/intl/de/cle-records.csv +12 -0
- package/fixtures/intl/de/timekeepers.csv +7 -0
- package/fixtures/intl/ja/cle-records.csv +12 -0
- package/fixtures/intl/ja/timekeepers.csv +7 -0
- package/fixtures/timekeepers.csv +7 -0
- package/package.json +56 -4
- package/server.json +37 -0
- package/src/demo.js +13 -0
- package/src/index.js +2 -0
- package/src/logic.js +65 -0
- package/src/manifest.js +60 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kurt Francisco
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,171 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Fairbrief CLE Hours (`fairbrief-cle-hours`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Continuing legal education hours per lawyer in the current reporting period against the requirements you enter for each state: total hours, hours by category such as ethics, and periods ending soon with hours missing. Drafts a reminder to the lawyer. It holds no state's requirements.
|
|
4
|
+
|
|
5
|
+
**Fairbrief CLE Hours never reports hours to a bar or regulator. It never books or pays for courses.**
|
|
6
|
+
|
|
7
|
+
MIT · Node 20 or newer · local files only · client names masked before results reach the model · built on [`fairbrief-core`](../fairbrief-core)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx -y fairbrief-cle-hours demo
|
|
11
|
+
npx -y fairbrief-cle-hours mcp --root ./firm-exports
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What it checks
|
|
15
|
+
|
|
16
|
+
| Check | Severity | What it means | What a person does |
|
|
17
|
+
|---|---|---|---|
|
|
18
|
+
| `short_total` | warning | The lawyer has fewer CLE hours in the period than the total your settings give for the state. | Plan courses before the period ends. |
|
|
19
|
+
| `short_category` | warning | The lawyer is short of hours in a required category (for example ethics). | Book a course in that category. |
|
|
20
|
+
| `period_ending_soon` | error | The reporting period ends within your warning days and hours are still missing. | Book courses now; check the state's late-compliance rules. |
|
|
21
|
+
| `no_requirement` | info | The lawyer's state has no requirement in your settings. | Add the state's requirement to the settings so it can be checked. |
|
|
22
|
+
| `no_period_end` | info | The lawyer has no reporting period end date. | Add the period end date to the timekeeper list. |
|
|
23
|
+
|
|
24
|
+
<!-- generated:start -->
|
|
25
|
+
|
|
26
|
+
## A demo run
|
|
27
|
+
|
|
28
|
+
`npx -y fairbrief-cle-hours demo` runs the agent on the fictional files in [`fixtures/`](fixtures) in a temporary folder. Captured output:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
Fairbrief CLE Hours demo (fictional lawyers, example requirements) in <demo folder>
|
|
32
|
+
|
|
33
|
+
▶ Check CLE hours on 31 October
|
|
34
|
+
status: executed decision: allow
|
|
35
|
+
5 lawyer(s) on 2026-10-31: 2 on track, 2 short of hours (1 with the period ending within 60 days), 1 in a state with no requirement in the settings.
|
|
36
|
+
Priya Natarajan 8 / 12 period_ending_soon, short_total, short_category
|
|
37
|
+
Marcus Eriksen 7 / 15 short_total, short_category
|
|
38
|
+
Leo Brandt - / - no_requirement
|
|
39
|
+
Dana Whitlock 15 / 15 on track
|
|
40
|
+
Tomas Lindgren 15 / 15 on track
|
|
41
|
+
|
|
42
|
+
▶ Write the worklist
|
|
43
|
+
status: executed decision: allow
|
|
44
|
+
Worklist written: 5 lawyer(s) on 2026-10-31: 2 on track, 2 short of hours (1 with the period ending within 60 days), 1 in a state with no requirement in the settings. Files: fairbrief-out/cle/cle-hours.csv, fairbrief-out/cle/cle-hours.html.
|
|
45
|
+
|
|
46
|
+
▶ Draft a reminder for Priya Natarajan (waits for a person)
|
|
47
|
+
status: needs_approval decision: ask
|
|
48
|
+
reason: A draft is written only after a person says yes (or Auto is opted in).
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Tools
|
|
52
|
+
|
|
53
|
+
| Tool | What it does | Policy |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| `cle_check` | Each lawyer with their state, period, hours done, hours required, hours by category and findings. | runs |
|
|
56
|
+
| `cle_explain` | Show one lawyer from cle_check with every finding and the figures it was checked against. | runs |
|
|
57
|
+
| `cle_checks` | List every check cle runs, what it looks for and what a person does about it. | runs |
|
|
58
|
+
| `cle_write_report` | Write cle-hours.csv (one row per item, with blank owner, decision and notes columns) and cle-hours.html into out_dir (default fairbrief-out/cle). | runs |
|
|
59
|
+
| `cle_draft_cle_reminder` | Write drafts/cle_reminder-<hash>.md: an internal note to one lawyer with their hours, what is still missing and the period end. | asks first (Auto can be opted in) |
|
|
60
|
+
| `cle_request_send` | After one named human click (even in Auto), record that the reviewed cle reminder draft is approved in cle_reminder-requests.csv. | one named click, even in Auto (`binding_send`) |
|
|
61
|
+
| `cle_report_submit` | Fairbrief CLE Hours never reports hours to a bar or regulator. | refused |
|
|
62
|
+
| `course_register` | Fairbrief CLE Hours never books or pays for courses. | refused |
|
|
63
|
+
|
|
64
|
+
Any tool name not in this table is blocked, including names a model invents. `refused` tools are listed so a model can see they exist and are refused.
|
|
65
|
+
|
|
66
|
+
## Columns it reads
|
|
67
|
+
|
|
68
|
+
Table inputs can be CSV, TSV, semicolon- or pipe-separated text, Excel `.xlsx`, JSON or JSONL; invoice lines can also be LEDES 1998B files. Columns are matched by the agent's own name, then by the English names below, then by their names in German, French, Spanish, Portuguese, Italian, Japanese, Chinese and Korean. Dates become `YYYY-MM-DD`; amounts are read with either decimal mark. Every result lists under `sources` how each file was read. Columns marked *masked* hold client or party data: the model sees a pseudonym or nothing (see Client data).
|
|
69
|
+
|
|
70
|
+
### CLE records (`cle`)
|
|
71
|
+
|
|
72
|
+
| Column | Type | Also read as | For example, in other languages |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| `timekeeper` (required) | text | Timekeeper, User, Attorney, Lawyer, Staff, Billing User | Zeiterfasser, Intervenant, 担当弁護士, 计时人员 |
|
|
75
|
+
| `course` | text | Course, Course Title, Program, Activity, Title, Seminar | Beschreibung, Description, 摘要, 摘要 |
|
|
76
|
+
| `date` | date | Date, Course Date, Completed, Completion Date, Date Completed, Attended | Datum, Date, 日付, 日期 |
|
|
77
|
+
| `hours` | number | Hours, Credits, Credit Hours, CLE Hours, Units, Points | Stunden, Heures, 時間, 小时 |
|
|
78
|
+
| `category` | text | Category, Credit Type, Type, Subject Area, Credit Category | Kategorie, Catégorie, 経費科目, 费用类别 |
|
|
79
|
+
| `state` | text | State, Jurisdiction, Bar, Reported To | - |
|
|
80
|
+
| `provider` | text | Provider, Sponsor, Accredited Provider, Organizer | - |
|
|
81
|
+
| `format` | text | Format, Delivery, Live/On Demand, Method | - |
|
|
82
|
+
|
|
83
|
+
### Timekeeper list (`timekeepers`)
|
|
84
|
+
|
|
85
|
+
| Column | Type | Also read as | For example, in other languages |
|
|
86
|
+
|---|---|---|---|
|
|
87
|
+
| `timekeeper` (required) | text | Timekeeper, User, Attorney, Lawyer, Staff, Billing User | Zeiterfasser, Intervenant, 担当弁護士, 计时人员 |
|
|
88
|
+
| `timekeeper_id` | text | Timekeeper ID, TK ID, Timekeeper Number, Tkpr, Initials, User ID | - |
|
|
89
|
+
| `timekeeper_class` | text | Title, Role, Classification, Timekeeper Classification, Rank, Level | Rolle, Rôle, ロール, 角色 |
|
|
90
|
+
| `standard_rate` | amount | Standard Rate, Rate, Hourly Rate, Default Rate, Billing Rate, Std Rate | Stundensatz, Taux horaire, 単価, 费率 |
|
|
91
|
+
| `target_hours` | number | Target Hours, Billable Target, Annual Target, Budget Hours, Target, Billable Hours Target | - |
|
|
92
|
+
| `weekly_capacity` | number | Weekly Capacity, Capacity, Hours per Week, Weekly Hours, FTE Hours | - |
|
|
93
|
+
| `bar_state` | text | Bar State, Admitted In, Jurisdiction, State of Admission, Licensing State, Bar | - |
|
|
94
|
+
| `bar_number` | text | Bar Number, Bar No, Bar #, Licence Number, License Number, Registration Number | - |
|
|
95
|
+
| `licence_expires` | date | License Expires, Licence Expires, License Expiration, Bar Renewal, Renewal Date, Registration Due | Ablaufdatum, Date d'expiration, 有効期限, 到期日 |
|
|
96
|
+
| `cle_period_end` | date | CLE Period End, Compliance Deadline, CLE Due, Reporting Deadline, CLE Deadline, Compliance Period End | - |
|
|
97
|
+
| `start_date` | date | Start Date, Hire Date, Joined, Date Joined | Eintrittsdatum, Date d'entrée, 入社日, 入职日期 |
|
|
98
|
+
| `end_date` | date | End Date, Left, Termination Date, Departure Date | Austrittsdatum, Date de sortie, 退職日, 离职日期 |
|
|
99
|
+
| `status` | text | Status, Active, Employment Status | Status, Statut, ステータス, 状态 |
|
|
100
|
+
|
|
101
|
+
### Files from other countries
|
|
102
|
+
|
|
103
|
+
A German export in Windows-1252 with semicolons, `1.234,56` and `03.11.2026`, or a Japanese one in Shift_JIS with `2026/11/03`, is read the same way as the English file: `npm run intl` in the repository rewrites every eval fixture the way a German, French, Spanish, Brazilian, Italian, Japanese, Chinese and Korean export would write it and requires the same results. Columns named differently? Run `npx fairbrief-cle-hours inspect <file>` (names and shapes only, never values) and name them in `fairbrief-sources.json`:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{ "files": { "exports/time.csv": { "columns": { "matter": "Aktenzeichen" }, "date_order": "dmy" } } }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Install
|
|
110
|
+
|
|
111
|
+
Node 20 or newer. No other dependencies.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx -y fairbrief-cle-hours demo
|
|
115
|
+
npx -y fairbrief-cle-hours mcp --root /path/to/your/files
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Claude Desktop, Cursor and other MCP hosts:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"mcpServers": {
|
|
123
|
+
"fairbrief-cle-hours": {
|
|
124
|
+
"command": "npx",
|
|
125
|
+
"args": [
|
|
126
|
+
"-y",
|
|
127
|
+
"fairbrief-cle-hours",
|
|
128
|
+
"mcp",
|
|
129
|
+
"--root",
|
|
130
|
+
"/path/to/your/files"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Claude Code: `claude mcp add fairbrief-cle-hours -- npx -y fairbrief-cle-hours mcp --root .`, or install the `fairbrief-cle-hours` plugin from this repository's marketplace (`fairbrief-law-firm`).
|
|
138
|
+
|
|
139
|
+
## Modes and approvals
|
|
140
|
+
|
|
141
|
+
- **Review** (`--mode review`): reads and reports only.
|
|
142
|
+
- **Assist** (default): the policy above. A tool that asks returns an `approval_id`; a person approves it once with `fairbrief-cle-hours approve <id> --as "Your Name"` (or on the local approvals page, `fairbrief-cle-hours approvals`), and the same call is repeated.
|
|
143
|
+
- **Auto** (`--mode auto --auto <tool,...>`): opt-in per tool, with step caps and a kill switch (`fairbrief-cle-hours kill`). Sending, moving money, going live and accepting a learned fact stay **one named click even in Auto**; an approval is tied to the sha256 of the reviewed draft, so a changed draft needs a new click.
|
|
144
|
+
|
|
145
|
+
## CLI
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
fairbrief-cle-hours tools # every tool, its policy and arguments
|
|
149
|
+
fairbrief-cle-hours sources # the columns each input is read from
|
|
150
|
+
fairbrief-cle-hours inspect <file> # how a file would be read (names and shapes, never values)
|
|
151
|
+
fairbrief-cle-hours call cle_check '{"cle":"<cle>","timekeepers":"<timekeepers>","requirements":"<requirements>"}'
|
|
152
|
+
fairbrief-cle-hours eval # the private eval cases on the fictional fixtures
|
|
153
|
+
fairbrief-cle-hours demo
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Client data
|
|
157
|
+
|
|
158
|
+
Results go to an AI model, so client data is masked before it leaves the agent (`--mask mask`, the default): client, party, payee and referral-source names, matter names and bank account numbers become stable pseudonyms such as `CL-3f9a1c2e`; addresses, phones, e-mails and tax ids are removed, also inside free text. `--mask strict` also hides matter numbers and ZIP codes. Tools still take a pseudonym back as an argument. Report files written to disk keep real names, because people at the firm work from them: keep them in a folder only your staff can open. `--mask off` is possible and is recorded in the audit log. The shared tests check that no fictional client name from the fixtures reaches any eval result. Masking keeps client names away from the model; whether your firm may use an AI model with client data at all is the firm's decision under its confidentiality duties.
|
|
159
|
+
|
|
160
|
+
## Audit log and data
|
|
161
|
+
|
|
162
|
+
Every call is written to `.fairbrief/audit.jsonl` under the root: hash-chained JSON lines, with arguments stored as a hash, signed with an Ed25519 key when you configure one. Everything runs on your machine on files you choose. No network calls, no telemetry, no credentials. The bundled fixtures are fictional.
|
|
163
|
+
|
|
164
|
+
<!-- generated:end -->
|
|
165
|
+
|
|
166
|
+
## Limits
|
|
167
|
+
|
|
168
|
+
- It checks only what is in the files and settings you load. Trust-accounting rules, billing guidelines, CLE requirements and limits differ by state, client and firm: they live in your settings, and every result says when nobody at the firm has confirmed them. The example settings in `fixtures/` are not any state's or client's rules.
|
|
169
|
+
- It is not legal, ethics, tax or accounting advice. A person at the firm reviews every result; the agent never moves trust money, files with a court, sends anything or changes your practice-management system.
|
|
170
|
+
- Export layouts named in "Columns it reads" were written from knowledge of each system and not tested against a live account; `inspect` shows how a file was read.
|
|
171
|
+
- Masking keeps client names away from the model; it does not decide whether your firm may use an AI model with client data. That is a decision for the firm under its confidentiality duties.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { main } from 'fairbrief-core';
|
|
4
|
+
import { manifest } from '../src/manifest.js';
|
|
5
|
+
import { demo } from '../src/demo.js';
|
|
6
|
+
|
|
7
|
+
main(manifest, { bin: 'fairbrief-cle-hours', demo, evalFile: fileURLToPath(new URL('../evals/cases.json', import.meta.url)) });
|
package/evals/cases.json
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
{
|
|
2
|
+
"suite": "fairbrief-cle-hours",
|
|
3
|
+
"root": "..",
|
|
4
|
+
"data_note": "Fictional fixtures in ../fixtures. Deterministic checks; no model is called.",
|
|
5
|
+
"cases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "lawyers-on-31-october",
|
|
8
|
+
"tool": "cle_check",
|
|
9
|
+
"args": {
|
|
10
|
+
"cle": "fixtures/cle-records.csv",
|
|
11
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
12
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
13
|
+
"as_of": "2026-10-31"
|
|
14
|
+
},
|
|
15
|
+
"expect": {
|
|
16
|
+
"status": "executed",
|
|
17
|
+
"equals": {
|
|
18
|
+
"result.lawyers": 5,
|
|
19
|
+
"result.by_check.period_ending_soon": 1,
|
|
20
|
+
"result.by_check.short_total": 2,
|
|
21
|
+
"result.by_check.short_category": 2,
|
|
22
|
+
"result.by_check.no_requirement": 1
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "hours-in-the-reasons",
|
|
28
|
+
"tool": "cle_check",
|
|
29
|
+
"args": {
|
|
30
|
+
"cle": "fixtures/cle-records.csv",
|
|
31
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
32
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
33
|
+
"as_of": "2026-10-31"
|
|
34
|
+
},
|
|
35
|
+
"expect": {
|
|
36
|
+
"contains": [
|
|
37
|
+
"Marcus Eriksen (Example State): 7 of 15 hours",
|
|
38
|
+
"Marcus Eriksen (Example State): 2 of 3 ethics hours",
|
|
39
|
+
"Priya Natarajan: the period ends on 2026-11-30, in 30 days",
|
|
40
|
+
"0 of 1 elimination of bias hours",
|
|
41
|
+
"no requirement for \\\"Demo State\\\""
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "on-track-lawyer",
|
|
47
|
+
"tool": "cle_explain",
|
|
48
|
+
"args": {
|
|
49
|
+
"cle": "fixtures/cle-records.csv",
|
|
50
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
51
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
52
|
+
"as_of": "2026-10-31",
|
|
53
|
+
"lawyer": "Dana Whitlock"
|
|
54
|
+
},
|
|
55
|
+
"expect": {
|
|
56
|
+
"status": "executed",
|
|
57
|
+
"contains": [
|
|
58
|
+
"No findings",
|
|
59
|
+
"\"hours\":15"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "paralegal-not-listed",
|
|
65
|
+
"tool": "cle_explain",
|
|
66
|
+
"args": {
|
|
67
|
+
"cle": "fixtures/cle-records.csv",
|
|
68
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
69
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
70
|
+
"as_of": "2026-10-31",
|
|
71
|
+
"lawyer": "Grace Obi"
|
|
72
|
+
},
|
|
73
|
+
"expect": {
|
|
74
|
+
"status": "error",
|
|
75
|
+
"contains": [
|
|
76
|
+
"not found"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "earlier-date-counts-fewer-courses",
|
|
82
|
+
"tool": "cle_check",
|
|
83
|
+
"args": {
|
|
84
|
+
"cle": "fixtures/cle-records.csv",
|
|
85
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
86
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
87
|
+
"as_of": "2026-06-30"
|
|
88
|
+
},
|
|
89
|
+
"expect": {
|
|
90
|
+
"status": "executed",
|
|
91
|
+
"contains": [
|
|
92
|
+
"Dana Whitlock (Example State): 11 of 15 hours"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "reminder-only-when-short",
|
|
98
|
+
"tool": "cle_draft_cle_reminder",
|
|
99
|
+
"approve": "Pat Example (fictional)",
|
|
100
|
+
"args": {
|
|
101
|
+
"cle": "fixtures/cle-records.csv",
|
|
102
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
103
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
104
|
+
"as_of": "2026-10-31",
|
|
105
|
+
"lawyer": "Tomas Lindgren"
|
|
106
|
+
},
|
|
107
|
+
"expect": {
|
|
108
|
+
"status": "error",
|
|
109
|
+
"contains": [
|
|
110
|
+
"is not short of CLE hours"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "std-check-in-review-mode",
|
|
116
|
+
"tool": "cle_check",
|
|
117
|
+
"mode": "review",
|
|
118
|
+
"args": {
|
|
119
|
+
"cle": "fixtures/cle-records.csv",
|
|
120
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
121
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
122
|
+
"as_of": "2026-10-31"
|
|
123
|
+
},
|
|
124
|
+
"expect": {
|
|
125
|
+
"status": "executed"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "std-limit-one",
|
|
130
|
+
"tool": "cle_check",
|
|
131
|
+
"args": {
|
|
132
|
+
"cle": "fixtures/cle-records.csv",
|
|
133
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
134
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
135
|
+
"as_of": "2026-10-31",
|
|
136
|
+
"limit": 1
|
|
137
|
+
},
|
|
138
|
+
"expect": {
|
|
139
|
+
"status": "executed",
|
|
140
|
+
"max": {
|
|
141
|
+
"result.items.length": 1
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "std-masked",
|
|
147
|
+
"tool": "cle_check",
|
|
148
|
+
"args": {
|
|
149
|
+
"cle": "fixtures/cle-records.csv",
|
|
150
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
151
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
152
|
+
"as_of": "2026-10-31"
|
|
153
|
+
},
|
|
154
|
+
"expect": {
|
|
155
|
+
"status": "executed",
|
|
156
|
+
"not_contains": [
|
|
157
|
+
"Odessa Varga",
|
|
158
|
+
"Bram Holloway",
|
|
159
|
+
"Selene Mbeki"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "std-report",
|
|
165
|
+
"tool": "cle_write_report",
|
|
166
|
+
"args": {
|
|
167
|
+
"cle": "fixtures/cle-records.csv",
|
|
168
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
169
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
170
|
+
"as_of": "2026-10-31"
|
|
171
|
+
},
|
|
172
|
+
"expect": {
|
|
173
|
+
"status": "executed",
|
|
174
|
+
"contains": [
|
|
175
|
+
".csv",
|
|
176
|
+
".html"
|
|
177
|
+
],
|
|
178
|
+
"not_contains": [
|
|
179
|
+
"Odessa Varga",
|
|
180
|
+
"Bram Holloway"
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "std-report-german",
|
|
186
|
+
"tool": "cle_write_report",
|
|
187
|
+
"args": {
|
|
188
|
+
"cle": "fixtures/cle-records.csv",
|
|
189
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
190
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
191
|
+
"as_of": "2026-10-31",
|
|
192
|
+
"language": "de"
|
|
193
|
+
},
|
|
194
|
+
"expect": {
|
|
195
|
+
"status": "executed",
|
|
196
|
+
"equals": {
|
|
197
|
+
"result.lang": "de"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"id": "std-checks-list",
|
|
203
|
+
"tool": "cle_checks",
|
|
204
|
+
"args": {},
|
|
205
|
+
"expect": {
|
|
206
|
+
"status": "executed"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "std-explain",
|
|
211
|
+
"tool": "cle_explain",
|
|
212
|
+
"args": {
|
|
213
|
+
"cle": "fixtures/cle-records.csv",
|
|
214
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
215
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
216
|
+
"as_of": "2026-10-31",
|
|
217
|
+
"lawyer": "Priya Natarajan"
|
|
218
|
+
},
|
|
219
|
+
"expect": {
|
|
220
|
+
"status": "executed",
|
|
221
|
+
"contains": [
|
|
222
|
+
"Priya Natarajan"
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "std-explain-unknown",
|
|
228
|
+
"tool": "cle_explain",
|
|
229
|
+
"args": {
|
|
230
|
+
"cle": "fixtures/cle-records.csv",
|
|
231
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
232
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
233
|
+
"as_of": "2026-10-31",
|
|
234
|
+
"lawyer": "NO-SUCH-ITEM"
|
|
235
|
+
},
|
|
236
|
+
"expect": {
|
|
237
|
+
"status": "error",
|
|
238
|
+
"contains": [
|
|
239
|
+
"not found"
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "std-missing-file",
|
|
245
|
+
"tool": "cle_check",
|
|
246
|
+
"args": {
|
|
247
|
+
"cle": "fixtures/no-such-file.csv",
|
|
248
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
249
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
250
|
+
"as_of": "2026-10-31"
|
|
251
|
+
},
|
|
252
|
+
"expect": {
|
|
253
|
+
"status": "error",
|
|
254
|
+
"contains": [
|
|
255
|
+
"file not found"
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "std-outside-root",
|
|
261
|
+
"tool": "cle_check",
|
|
262
|
+
"args": {
|
|
263
|
+
"cle": "../../../../etc/passwd",
|
|
264
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
265
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
266
|
+
"as_of": "2026-10-31"
|
|
267
|
+
},
|
|
268
|
+
"expect": {
|
|
269
|
+
"status": "error",
|
|
270
|
+
"matches": [
|
|
271
|
+
"outside|leaves the allowed root"
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "std-settings-typo",
|
|
277
|
+
"tool": "cle_check",
|
|
278
|
+
"args": {
|
|
279
|
+
"cle": "fixtures/cle-records.csv",
|
|
280
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
281
|
+
"requirements": "fixtures/cle-requirements-typo.json",
|
|
282
|
+
"as_of": "2026-10-31"
|
|
283
|
+
},
|
|
284
|
+
"expect": {
|
|
285
|
+
"status": "error",
|
|
286
|
+
"contains": [
|
|
287
|
+
"is not a valid"
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"id": "std-unknown-tool",
|
|
293
|
+
"tool": "shell_exec",
|
|
294
|
+
"args": {
|
|
295
|
+
"cmd": "whoami"
|
|
296
|
+
},
|
|
297
|
+
"expect": {
|
|
298
|
+
"status": "blocked"
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"id": "std-refused-cle_report_submit",
|
|
303
|
+
"tool": "cle_report_submit",
|
|
304
|
+
"args": {},
|
|
305
|
+
"expect": {
|
|
306
|
+
"status": "blocked"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"id": "std-refused-course_register",
|
|
311
|
+
"tool": "course_register",
|
|
312
|
+
"args": {},
|
|
313
|
+
"expect": {
|
|
314
|
+
"status": "blocked"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"id": "std-cle_draft_cle_reminder-waits",
|
|
319
|
+
"tool": "cle_draft_cle_reminder",
|
|
320
|
+
"args": {
|
|
321
|
+
"cle": "fixtures/cle-records.csv",
|
|
322
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
323
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
324
|
+
"as_of": "2026-10-31",
|
|
325
|
+
"lawyer": "Priya Natarajan"
|
|
326
|
+
},
|
|
327
|
+
"expect": {
|
|
328
|
+
"status": "needs_approval"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"id": "std-cle_draft_cle_reminder-after-click",
|
|
333
|
+
"tool": "cle_draft_cle_reminder",
|
|
334
|
+
"args": {
|
|
335
|
+
"cle": "fixtures/cle-records.csv",
|
|
336
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
337
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
338
|
+
"as_of": "2026-10-31",
|
|
339
|
+
"lawyer": "Priya Natarajan"
|
|
340
|
+
},
|
|
341
|
+
"approve": "Pat Example (fictional)",
|
|
342
|
+
"expect": {
|
|
343
|
+
"status": "executed",
|
|
344
|
+
"contains": [
|
|
345
|
+
"draft_sha256"
|
|
346
|
+
],
|
|
347
|
+
"not_contains": [
|
|
348
|
+
"Odessa Varga",
|
|
349
|
+
"Bram Holloway"
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"id": "std-cle_draft_cle_reminder-review-mode",
|
|
355
|
+
"tool": "cle_draft_cle_reminder",
|
|
356
|
+
"mode": "review",
|
|
357
|
+
"args": {
|
|
358
|
+
"cle": "fixtures/cle-records.csv",
|
|
359
|
+
"timekeepers": "fixtures/timekeepers.csv",
|
|
360
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
361
|
+
"as_of": "2026-10-31",
|
|
362
|
+
"lawyer": "Priya Natarajan"
|
|
363
|
+
},
|
|
364
|
+
"expect": {
|
|
365
|
+
"status": "blocked"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"id": "std-cle_request_send-one-click",
|
|
370
|
+
"tool": "cle_request_send",
|
|
371
|
+
"mode": "auto",
|
|
372
|
+
"args": {
|
|
373
|
+
"draft": "fairbrief-out/cle/drafts/none.md",
|
|
374
|
+
"draft_sha256": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
375
|
+
},
|
|
376
|
+
"expect": {
|
|
377
|
+
"status": "needs_approval",
|
|
378
|
+
"decision": "ask"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"id": "intl-de-lawyers-on-31-october",
|
|
383
|
+
"tool": "cle_check",
|
|
384
|
+
"args": {
|
|
385
|
+
"cle": "fixtures/intl/de/cle-records.csv",
|
|
386
|
+
"timekeepers": "fixtures/intl/de/timekeepers.csv",
|
|
387
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
388
|
+
"as_of": "2026-10-31"
|
|
389
|
+
},
|
|
390
|
+
"expect": {
|
|
391
|
+
"status": "executed",
|
|
392
|
+
"equals": {
|
|
393
|
+
"result.lawyers": 5,
|
|
394
|
+
"result.by_check.period_ending_soon": 1,
|
|
395
|
+
"result.by_check.short_total": 2,
|
|
396
|
+
"result.by_check.short_category": 2,
|
|
397
|
+
"result.by_check.no_requirement": 1
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"id": "intl-ja-lawyers-on-31-october",
|
|
403
|
+
"tool": "cle_check",
|
|
404
|
+
"args": {
|
|
405
|
+
"cle": "fixtures/intl/ja/cle-records.csv",
|
|
406
|
+
"timekeepers": "fixtures/intl/ja/timekeepers.csv",
|
|
407
|
+
"requirements": "fixtures/cle-requirements.json",
|
|
408
|
+
"as_of": "2026-10-31"
|
|
409
|
+
},
|
|
410
|
+
"expect": {
|
|
411
|
+
"status": "executed",
|
|
412
|
+
"equals": {
|
|
413
|
+
"result.lawyers": 5,
|
|
414
|
+
"result.by_check.period_ending_soon": 1,
|
|
415
|
+
"result.by_check.short_total": 2,
|
|
416
|
+
"result.by_check.short_category": 2,
|
|
417
|
+
"result.by_check.no_requirement": 1
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
}
|
package/evals/own.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": "..",
|
|
3
|
+
"base": { "cle": "fixtures/cle-records.csv", "timekeepers": "fixtures/timekeepers.csv", "requirements": "fixtures/cle-requirements.json", "as_of": "2026-10-31" },
|
|
4
|
+
"item": "Priya Natarajan",
|
|
5
|
+
"settings_typo": "fixtures/cle-requirements-typo.json",
|
|
6
|
+
"draft_args": { "cle_draft_cle_reminder": { "lawyer": "Priya Natarajan" } },
|
|
7
|
+
"cases": [
|
|
8
|
+
{ "id": "lawyers-on-31-october", "tool": "cle_check", "args": { "cle": "fixtures/cle-records.csv", "timekeepers": "fixtures/timekeepers.csv", "requirements": "fixtures/cle-requirements.json", "as_of": "2026-10-31" },
|
|
9
|
+
"expect": { "status": "executed", "equals": { "result.lawyers": 5, "result.by_check.period_ending_soon": 1, "result.by_check.short_total": 2, "result.by_check.short_category": 2, "result.by_check.no_requirement": 1 } } },
|
|
10
|
+
{ "id": "hours-in-the-reasons", "tool": "cle_check", "args": { "cle": "fixtures/cle-records.csv", "timekeepers": "fixtures/timekeepers.csv", "requirements": "fixtures/cle-requirements.json", "as_of": "2026-10-31" },
|
|
11
|
+
"expect": { "contains": ["Marcus Eriksen (Example State): 7 of 15 hours", "Marcus Eriksen (Example State): 2 of 3 ethics hours", "Priya Natarajan: the period ends on 2026-11-30, in 30 days", "0 of 1 elimination of bias hours", "no requirement for \\\"Demo State\\\""] } },
|
|
12
|
+
{ "id": "on-track-lawyer", "tool": "cle_explain", "args": { "cle": "fixtures/cle-records.csv", "timekeepers": "fixtures/timekeepers.csv", "requirements": "fixtures/cle-requirements.json", "as_of": "2026-10-31", "lawyer": "Dana Whitlock" },
|
|
13
|
+
"expect": { "status": "executed", "contains": ["No findings", "\"hours\":15"] } },
|
|
14
|
+
{ "id": "paralegal-not-listed", "tool": "cle_explain", "args": { "cle": "fixtures/cle-records.csv", "timekeepers": "fixtures/timekeepers.csv", "requirements": "fixtures/cle-requirements.json", "as_of": "2026-10-31", "lawyer": "Grace Obi" },
|
|
15
|
+
"expect": { "status": "error", "contains": ["not found"] } },
|
|
16
|
+
{ "id": "earlier-date-counts-fewer-courses", "tool": "cle_check", "args": { "cle": "fixtures/cle-records.csv", "timekeepers": "fixtures/timekeepers.csv", "requirements": "fixtures/cle-requirements.json", "as_of": "2026-06-30" },
|
|
17
|
+
"expect": { "status": "executed", "contains": ["Dana Whitlock (Example State): 11 of 15 hours"] } },
|
|
18
|
+
{ "id": "reminder-only-when-short", "tool": "cle_draft_cle_reminder", "approve": "Pat Example (fictional)", "args": { "cle": "fixtures/cle-records.csv", "timekeepers": "fixtures/timekeepers.csv", "requirements": "fixtures/cle-requirements.json", "as_of": "2026-10-31", "lawyer": "Tomas Lindgren" },
|
|
19
|
+
"expect": { "status": "error", "contains": ["is not short of CLE hours"] } }
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Fairbrief CLE Hours fixtures
|
|
2
|
+
|
|
3
|
+
Everything here is fictional: the lawyers, states (Example State, Sample State, Demo State), course providers and hours. The requirements are examples, not any state's rules.
|
|
4
|
+
|
|
5
|
+
- `timekeepers.csv`: six timekeepers with title, bar state and period end.
|
|
6
|
+
- `cle-records.csv`: eleven courses.
|
|
7
|
+
- `cle-requirements.json`: two example states. `cle-requirements-typo.json` has a misspelt key.
|
|
8
|
+
|
|
9
|
+
Planted (as of 31 October 2026): Marcus Eriksen has 7 of 15 hours and 2 of 3 ethics hours (one course falls before his period); Priya Natarajan has 8 of 12 hours and no bias hours with her period ending 30 November; Leo Brandt's state has no requirement in the settings. Dana Whitlock and Tomas Lindgren are on track; Grace Obi is not a lawyer.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"note": "Accuracy recipe for scripts/accuracy.mjs. \"planted\" was checked by hand against the Planted paragraph of README.md in this folder (19 Nov 2026).",
|
|
3
|
+
"case": "lawyers-on-31-october",
|
|
4
|
+
"planted": [
|
|
5
|
+
[
|
|
6
|
+
"Priya Natarajan",
|
|
7
|
+
"period_ending_soon"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"Priya Natarajan",
|
|
11
|
+
"short_total"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"Priya Natarajan",
|
|
15
|
+
"short_category"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"Marcus Eriksen",
|
|
19
|
+
"short_total"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"Marcus Eriksen",
|
|
23
|
+
"short_category"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"Leo Brandt",
|
|
27
|
+
"no_requirement"
|
|
28
|
+
]
|
|
29
|
+
],
|
|
30
|
+
"clean": {
|
|
31
|
+
"edits": [
|
|
32
|
+
{
|
|
33
|
+
"arg": "timekeepers",
|
|
34
|
+
"dropWhere": {
|
|
35
|
+
"timekeeper": [
|
|
36
|
+
"Priya Natarajan",
|
|
37
|
+
"Marcus Eriksen",
|
|
38
|
+
"Leo Brandt"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"arg": "cle",
|
|
44
|
+
"dropWhere": {
|
|
45
|
+
"timekeeper": [
|
|
46
|
+
"Priya Natarajan",
|
|
47
|
+
"Marcus Eriksen",
|
|
48
|
+
"Leo Brandt"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"mutations": []
|
|
55
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
timekeeper,course,date,hours,category,state,provider
|
|
2
|
+
Dana Whitlock,Trial advocacy update,2026-02-10,8,General,Example State,Demo Bar Institute
|
|
3
|
+
Dana Whitlock,Professional responsibility,2026-05-12,3,Ethics,Example State,Demo Bar Institute
|
|
4
|
+
Dana Whitlock,Evidence review,2026-09-01,4,General,,Sample CLE Co
|
|
5
|
+
Marcus Eriksen,Contract drafting,2025-09-15,6,General,Example State,Sample CLE Co
|
|
6
|
+
Marcus Eriksen,Ethics in billing,2026-08-20,2,Ethics,Example State,Demo Bar Institute
|
|
7
|
+
Marcus Eriksen,Negotiation,2026-10-05,5,General,Example State,Sample CLE Co
|
|
8
|
+
Priya Natarajan,Discovery practice,2026-03-01,6,General,Sample State,Sample CLE Co
|
|
9
|
+
Priya Natarajan,Ethics for litigators,2026-06-01,2,Ethics,Sample State,Demo Bar Institute
|
|
10
|
+
Tomas Lindgren,Employment law update,2026-04-01,10,General,Example State,Sample CLE Co
|
|
11
|
+
Tomas Lindgren,Ethics,2026-07-07,3,Ethics,Example State,Demo Bar Institute
|
|
12
|
+
Tomas Lindgren,Technology competence,2026-10-10,2,General,Example State,Sample CLE Co
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "requirements": [ { "state": "Example State", "hours": 15 } ] }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Fixtures from other countries
|
|
2
|
+
|
|
3
|
+
Written by `node scripts/make-evals.mjs` from the English fixtures one folder up: the same fictional data the way a local export writes it.
|
|
4
|
+
|
|
5
|
+
- `de/`: German column names, Windows-1252 text, semicolons, comma decimals (1.234,56), day-first dotted dates (31.10.2026).
|
|
6
|
+
- `ja/`: Japanese column names, Shift_JIS text, year-first dates (2026/10/31).
|
|
7
|
+
|
|
8
|
+
Values (names, codes, descriptions) stay in English. The eval cases `intl-de-*` and `intl-ja-*` expect exactly the same results as the English case.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Zeiterfasser;Beschreibung;Datum;Stunden;Kategorie;state;provider
|
|
2
|
+
Dana Whitlock;Trial advocacy update;10.02.2026;8;General;Example State;Demo Bar Institute
|
|
3
|
+
Dana Whitlock;Professional responsibility;12.05.2026;3;Ethics;Example State;Demo Bar Institute
|
|
4
|
+
Dana Whitlock;Evidence review;01.09.2026;4;General;;Sample CLE Co
|
|
5
|
+
Marcus Eriksen;Contract drafting;15.09.2025;6;General;Example State;Sample CLE Co
|
|
6
|
+
Marcus Eriksen;Ethics in billing;20.08.2026;2;Ethics;Example State;Demo Bar Institute
|
|
7
|
+
Marcus Eriksen;Negotiation;05.10.2026;5;General;Example State;Sample CLE Co
|
|
8
|
+
Priya Natarajan;Discovery practice;01.03.2026;6;General;Sample State;Sample CLE Co
|
|
9
|
+
Priya Natarajan;Ethics for litigators;01.06.2026;2;Ethics;Sample State;Demo Bar Institute
|
|
10
|
+
Tomas Lindgren;Employment law update;01.04.2026;10;General;Example State;Sample CLE Co
|
|
11
|
+
Tomas Lindgren;Ethics;07.07.2026;3;Ethics;Example State;Demo Bar Institute
|
|
12
|
+
Tomas Lindgren;Technology competence;10.10.2026;2;General;Example State;Sample CLE Co
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Zeiterfasser;Rolle;bar_state;bar_number;cle_period_end;Zustand
|
|
2
|
+
Dana Whitlock;Partner;Example State;EX-100201;31.12.2026;Active
|
|
3
|
+
Marcus Eriksen;Partner;Example State;EX-100345;30.06.2027;Active
|
|
4
|
+
Priya Natarajan;Associate;Sample State;SA-552100;30.11.2026;Active
|
|
5
|
+
Tomas Lindgren;Associate;Example State;EX-100877;31.12.2026;Active
|
|
6
|
+
Grace Obi;Paralegal;;;;Active
|
|
7
|
+
Leo Brandt;Associate;Demo State;DM-7781;31.12.2026;Active
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
�S���ٌ�m,�E�v,���t,����,�o��Ȗ�,state,provider
|
|
2
|
+
Dana Whitlock,Trial advocacy update,2026/02/10,8,General,Example State,Demo Bar Institute
|
|
3
|
+
Dana Whitlock,Professional responsibility,2026/05/12,3,Ethics,Example State,Demo Bar Institute
|
|
4
|
+
Dana Whitlock,Evidence review,2026/09/01,4,General,,Sample CLE Co
|
|
5
|
+
Marcus Eriksen,Contract drafting,2025/09/15,6,General,Example State,Sample CLE Co
|
|
6
|
+
Marcus Eriksen,Ethics in billing,2026/08/20,2,Ethics,Example State,Demo Bar Institute
|
|
7
|
+
Marcus Eriksen,Negotiation,2026/10/05,5,General,Example State,Sample CLE Co
|
|
8
|
+
Priya Natarajan,Discovery practice,2026/03/01,6,General,Sample State,Sample CLE Co
|
|
9
|
+
Priya Natarajan,Ethics for litigators,2026/06/01,2,Ethics,Sample State,Demo Bar Institute
|
|
10
|
+
Tomas Lindgren,Employment law update,2026/04/01,10,General,Example State,Sample CLE Co
|
|
11
|
+
Tomas Lindgren,Ethics,2026/07/07,3,Ethics,Example State,Demo Bar Institute
|
|
12
|
+
Tomas Lindgren,Technology competence,2026/10/10,2,General,Example State,Sample CLE Co
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
�S���ٌ�m,���[��,bar_state,bar_number,cle_period_end,�X�e�[�^�X
|
|
2
|
+
Dana Whitlock,Partner,Example State,EX-100201,2026/12/31,Active
|
|
3
|
+
Marcus Eriksen,Partner,Example State,EX-100345,2027/06/30,Active
|
|
4
|
+
Priya Natarajan,Associate,Sample State,SA-552100,2026/11/30,Active
|
|
5
|
+
Tomas Lindgren,Associate,Example State,EX-100877,2026/12/31,Active
|
|
6
|
+
Grace Obi,Paralegal,,,,Active
|
|
7
|
+
Leo Brandt,Associate,Demo State,DM-7781,2026/12/31,Active
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
timekeeper,timekeeper_class,bar_state,bar_number,cle_period_end,status
|
|
2
|
+
Dana Whitlock,Partner,Example State,EX-100201,2026-12-31,Active
|
|
3
|
+
Marcus Eriksen,Partner,Example State,EX-100345,2027-06-30,Active
|
|
4
|
+
Priya Natarajan,Associate,Sample State,SA-552100,2026-11-30,Active
|
|
5
|
+
Tomas Lindgren,Associate,Example State,EX-100877,2026-12-31,Active
|
|
6
|
+
Grace Obi,Paralegal,,,,Active
|
|
7
|
+
Leo Brandt,Associate,Demo State,DM-7781,2026-12-31,Active
|
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fairbrief-cle-hours",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"mcpName": "io.github.fpavia111-creator/fairbrief-cle-hours",
|
|
5
|
+
"description": "Fairbrief CLE Hours: continuing legal education hours per lawyer against the requirements you enter for each state: total, ethics and other categories, and periods ending soon.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "Kurt Francisco",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=20"
|
|
11
|
+
},
|
|
12
|
+
"main": "src/index.js",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./src/index.js",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"bin": {
|
|
18
|
+
"fairbrief-cle-hours": "bin/fairbrief-cle-hours.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"src",
|
|
22
|
+
"bin",
|
|
23
|
+
"fixtures",
|
|
24
|
+
"evals",
|
|
25
|
+
"README.md",
|
|
26
|
+
"CHANGELOG.md",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"server.json"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"test": "node scripts/run-tests.cjs",
|
|
32
|
+
"demo": "node bin/fairbrief-cle-hours.js demo",
|
|
33
|
+
"eval": "node bin/fairbrief-cle-hours.js eval"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"fairbrief-core": "^0.1.0"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/fpavia111-creator/fairbrief-agents.git",
|
|
41
|
+
"directory": "packages/fairbrief-cle-hours"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/fpavia111-creator/fairbrief-agents/tree/master/packages/fairbrief-cle-hours#readme",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/fpavia111-creator/fairbrief-agents/issues"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"mcp",
|
|
49
|
+
"mcp-server",
|
|
50
|
+
"law-firm",
|
|
51
|
+
"legal",
|
|
52
|
+
"law-practice",
|
|
53
|
+
"fairbrief",
|
|
54
|
+
"cle",
|
|
55
|
+
"continuing-legal-education",
|
|
56
|
+
"compliance-tracking"
|
|
57
|
+
]
|
|
58
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.fpavia111-creator/fairbrief-cle-hours",
|
|
4
|
+
"title": "Fairbrief CLE Hours",
|
|
5
|
+
"description": "Fairbrief CLE Hours: continuing legal education hours per lawyer against the requirements you…",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"url": "https://github.com/fpavia111-creator/fairbrief-agents",
|
|
9
|
+
"source": "github",
|
|
10
|
+
"subfolder": "packages/fairbrief-cle-hours"
|
|
11
|
+
},
|
|
12
|
+
"websiteUrl": "https://fair-agents.com/fairbrief.html",
|
|
13
|
+
"packages": [
|
|
14
|
+
{
|
|
15
|
+
"registryType": "npm",
|
|
16
|
+
"identifier": "fairbrief-cle-hours",
|
|
17
|
+
"version": "0.1.0",
|
|
18
|
+
"transport": {
|
|
19
|
+
"type": "stdio"
|
|
20
|
+
},
|
|
21
|
+
"packageArguments": [
|
|
22
|
+
{
|
|
23
|
+
"type": "positional",
|
|
24
|
+
"value": "mcp"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "named",
|
|
28
|
+
"name": "--root",
|
|
29
|
+
"description": "Folder holding the exports this agent may read and write (it cannot reach outside it)",
|
|
30
|
+
"isRequired": true,
|
|
31
|
+
"format": "filepath",
|
|
32
|
+
"valueHint": "exports_folder"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
package/src/demo.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { demoRuntime, printStep } from 'fairbrief-core';
|
|
3
|
+
|
|
4
|
+
export async function demo(manifest) {
|
|
5
|
+
const rt = demoRuntime(manifest, fileURLToPath(new URL('../fixtures', import.meta.url)));
|
|
6
|
+
process.stdout.write(`Fairbrief CLE Hours demo (fictional lawyers, example requirements) in ${rt.root}\n`);
|
|
7
|
+
const f = { cle: 'cle-records.csv', timekeepers: 'timekeepers.csv', requirements: 'cle-requirements.json', as_of: '2026-10-31' };
|
|
8
|
+
const c = await rt.call('cle_check', f);
|
|
9
|
+
printStep('Check CLE hours on 31 October', c);
|
|
10
|
+
for (const i of c.result.items) process.stdout.write(` ${i.timekeeper.padEnd(16)} ${String(i.hours ?? '-').padStart(4)} / ${String(i.required ?? '-').padStart(3)} ${i.findings.map((x) => x.code).join(', ') || 'on track'}\n`);
|
|
11
|
+
printStep('Write the worklist', await rt.call('cle_write_report', f));
|
|
12
|
+
printStep('Draft a reminder for Priya Natarajan (waits for a person)', await rt.call('cle_draft_cle_reminder', { ...f, lawyer: 'Priya Natarajan' }));
|
|
13
|
+
}
|
package/src/index.js
ADDED
package/src/logic.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Continuing legal education. Each lawyer's CLE hours in the current reporting period,
|
|
2
|
+
// against the requirements you enter for each state (total hours and hours in named
|
|
3
|
+
// categories such as ethics). Fairbrief CLE Hours holds no state's requirements: every number comes
|
|
4
|
+
// from your settings, and a state with none is reported as such. It flags shortfalls and
|
|
5
|
+
// periods ending soon with hours still missing, and drafts a reminder to the lawyer.
|
|
6
|
+
import { str, num, round2, isoDate, addMonths, daysBetween, personKey, confirmedNote } from 'fairbrief-core';
|
|
7
|
+
|
|
8
|
+
export const CHECKS = Object.freeze({
|
|
9
|
+
short_total: { severity: 'warning', what: 'The lawyer has fewer CLE hours in the period than the total your settings give for the state.', fix: 'Plan courses before the period ends.' },
|
|
10
|
+
short_category: { severity: 'warning', what: 'The lawyer is short of hours in a required category (for example ethics).', fix: 'Book a course in that category.' },
|
|
11
|
+
period_ending_soon: { severity: 'error', what: 'The reporting period ends within your warning days and hours are still missing.', fix: 'Book courses now; check the state\'s late-compliance rules.' },
|
|
12
|
+
no_requirement: { severity: 'info', what: 'The lawyer\'s state has no requirement in your settings.', fix: 'Add the state\'s requirement to the settings so it can be checked.' },
|
|
13
|
+
no_period_end: { severity: 'info', what: 'The lawyer has no reporting period end date.', fix: 'Add the period end date to the timekeeper list.' },
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const SETTINGS_SCHEMA = {
|
|
17
|
+
type: 'object', additionalProperties: false, required: ['requirements'],
|
|
18
|
+
properties: {
|
|
19
|
+
requirements: { type: 'array', minItems: 1, maxItems: 100, description: 'One entry per state, from that state\'s current rules (examples only)', items: { type: 'object', additionalProperties: false, required: ['state', 'total'], properties: { state: { type: 'string', minLength: 1 }, total: { type: 'number', minimum: 0, maximum: 200 }, categories: { type: 'object', additionalProperties: { type: 'number', minimum: 0, maximum: 200 } }, period_months: { type: 'integer', minimum: 1, maximum: 60 } } } },
|
|
20
|
+
warn_days: { type: 'integer', minimum: 0, maximum: 365, description: 'Days before the period end to treat a shortfall as urgent (example default 60)' },
|
|
21
|
+
lawyer_titles: { type: 'array', maxItems: 30, items: { type: 'string', minLength: 2, maxLength: 60 }, description: 'Titles that are lawyers (default: partner, associate, counsel, of counsel, attorney, lawyer)' },
|
|
22
|
+
confirmed_by: { type: 'string', maxLength: 120, description: 'Person at the firm who checked these requirements against each state\'s current rules' },
|
|
23
|
+
confirmed_on: { type: 'string', format: 'date', description: 'When they checked them' },
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** Returns { items (per lawyer), summary, by_check }. */
|
|
28
|
+
export function checkCle(records, timekeepers, settings, asOf = null) {
|
|
29
|
+
const reqs = new Map(settings.requirements.map((r) => [str(r.state).toLowerCase(), r]));
|
|
30
|
+
const warn = settings.warn_days ?? 60; const titles = (settings.lawyer_titles && settings.lawyer_titles.length ? settings.lawyer_titles : ['partner', 'associate', 'counsel', 'of counsel', 'attorney', 'lawyer']).map((x) => x.toLowerCase());
|
|
31
|
+
const end = isoDate(asOf) || new Date().toISOString().slice(0, 10);
|
|
32
|
+
const items = [];
|
|
33
|
+
// Records grouped by person once, so the per-lawyer lookup does not rescan the whole file.
|
|
34
|
+
// Each record is read once (date, hours, category, state), not once per lawyer.
|
|
35
|
+
const byPerson = new Map(); for (const r of records) { const k = personKey(r.timekeeper); if (!byPerson.has(k)) byPerson.set(k, []); byPerson.get(k).push({ d: isoDate(r.date), h: num(r.hours) || 0, cat: str(r.category).toLowerCase(), st: str(r.state).toLowerCase() }); }
|
|
36
|
+
const sumsFor = new Map();
|
|
37
|
+
for (const t of timekeepers) {
|
|
38
|
+
const title = str(t.timekeeper_class).toLowerCase(); if (!titles.some((x) => title.includes(x)) && !str(t.bar_state)) continue;
|
|
39
|
+
if (/^(inactive|departed|former)$/i.test(str(t.status))) continue;
|
|
40
|
+
const name = str(t.timekeeper); const state = str(t.bar_state); const req = reqs.get(state.toLowerCase()); const periodEnd = isoDate(t.cle_period_end); const findings = [];
|
|
41
|
+
if (!req) { items.push({ timekeeper: name, state, period_start: null, period_end: periodEnd, hours: null, required: null, status: 'info', findings: [{ code: 'no_requirement', amount: null, detail: `${name}: no requirement for "${state || 'no state'}" in your settings.` }] }); continue; }
|
|
42
|
+
if (!periodEnd) { items.push({ timekeeper: name, state, period_start: null, period_end: null, hours: null, required: req.total, status: 'info', findings: [{ code: 'no_period_end', amount: null, detail: `${name}: no reporting period end date on the timekeeper list.` }] }); continue; }
|
|
43
|
+
const start = addMonths(periodEnd, -(req.period_months || 12));
|
|
44
|
+
// Hours per lawyer, state and period are added up once, even when the list repeats a lawyer.
|
|
45
|
+
const key = `${personKey(name)}|${state.toLowerCase()}|${start}|${periodEnd}`;
|
|
46
|
+
let sums = sumsFor.get(key);
|
|
47
|
+
if (!sums) {
|
|
48
|
+
const mine = (byPerson.get(personKey(name)) || []).filter((r) => r.d && r.d > start && r.d <= periodEnd && r.d <= end && (!r.st || r.st === state.toLowerCase()));
|
|
49
|
+
sums = { total: round2(mine.reduce((s, r) => s + r.h, 0)), cats: Object.fromEntries(Object.keys(req.categories || {}).map((cat) => [cat, round2(mine.filter((r) => r.cat.includes(cat.toLowerCase())).reduce((s, r) => s + r.h, 0))])) };
|
|
50
|
+
sumsFor.set(key, sums);
|
|
51
|
+
}
|
|
52
|
+
const total = sums.total;
|
|
53
|
+
if (total < req.total) findings.push({ code: 'short_total', amount: round2(req.total - total), detail: `${name} (${state}): ${total} of ${req.total} hours in the period ${addMonths(start, 0)} to ${periodEnd}; ${round2(req.total - total)} to go.` });
|
|
54
|
+
const cats = {};
|
|
55
|
+
for (const [cat, need] of Object.entries(req.categories || {})) { const got = sums.cats[cat]; cats[cat] = got; if (got < need) findings.push({ code: 'short_category', amount: round2(need - got), detail: `${name} (${state}): ${got} of ${need} ${cat} hours.` }); }
|
|
56
|
+
const left = daysBetween(end, periodEnd);
|
|
57
|
+
if (findings.length && left >= 0 && left <= warn) findings.unshift({ code: 'period_ending_soon', amount: null, detail: `${name}: the period ends on ${periodEnd}, in ${left} days, with hours still missing.` });
|
|
58
|
+
const sev = findings.map((f) => CHECKS[f.code].severity);
|
|
59
|
+
items.push({ timekeeper: name, state, period_start: start, period_end: periodEnd, days_left: left, hours: total, required: req.total, by_category: cats, status: sev.includes('error') ? 'error' : sev.includes('warning') ? 'warning' : 'ok', findings });
|
|
60
|
+
}
|
|
61
|
+
items.sort((a, b) => ['error', 'warning', 'info', 'ok'].indexOf(a.status) - ['error', 'warning', 'info', 'ok'].indexOf(b.status) || a.timekeeper.localeCompare(b.timekeeper));
|
|
62
|
+
const by_check = {}; for (const x of items) for (const f of x.findings) by_check[f.code] = (by_check[f.code] || 0) + 1;
|
|
63
|
+
const note = confirmedNote(settings);
|
|
64
|
+
return { summary: `${items.length} lawyer(s) on ${end}: ${items.filter((x) => x.status === 'ok').length} on track, ${items.filter((x) => x.status === 'error' || x.status === 'warning').length} short of hours (${by_check.period_ending_soon || 0} with the period ending within ${warn} days), ${by_check.no_requirement || 0} in a state with no requirement in the settings.`, as_of: end, lawyers: items.length, by_check, ...(note ? { settings_note: note } : {}), items };
|
|
65
|
+
}
|
package/src/manifest.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { familyAgent, CLE_FIELDS, TIMEKEEPER_FIELDS, LIMITS, sectionTitle } from 'fairbrief-core';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { checkCle, CHECKS, SETTINGS_SCHEMA } from './logic.js';
|
|
4
|
+
|
|
5
|
+
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
6
|
+
const args = {
|
|
7
|
+
cle: { type: 'string', description: 'CLE records under --root: lawyer, course, date, hours, category (ethics, general...), state' },
|
|
8
|
+
timekeepers: { type: 'string', description: 'Timekeeper list with title, bar state and the end of each lawyer\'s current reporting period' },
|
|
9
|
+
requirements: { type: 'string', description: 'cle_requirements JSON: per state the total hours, hours by category and the period length in months, as your firm confirms them' },
|
|
10
|
+
};
|
|
11
|
+
const run = (a, ctx) => checkCle(ctx.records(a.cle), ctx.records(a.timekeepers), ctx.readJson(a.requirements, 'cle_requirements'), a.as_of || null);
|
|
12
|
+
|
|
13
|
+
export const manifest = familyAgent({
|
|
14
|
+
name: 'fairbrief-cle-hours', prefix: 'cle', version: pkg.version,
|
|
15
|
+
description: 'Continuing legal education hours per lawyer in the current reporting period against the requirements you enter for each state: total hours, hours by category such as ethics, and periods ending soon with hours missing. Drafts a reminder to the lawyer. It holds no state\'s requirements.',
|
|
16
|
+
checkTitle: 'Check CLE hours',
|
|
17
|
+
checkDescription: 'Each lawyer with their state, period, hours done, hours required, hours by category and findings.',
|
|
18
|
+
sources: {
|
|
19
|
+
cle: { label: 'CLE records', args: ['cle'], fields: CLE_FIELDS },
|
|
20
|
+
timekeepers: { label: 'Timekeeper list', args: ['timekeepers'], fields: TIMEKEEPER_FIELDS },
|
|
21
|
+
},
|
|
22
|
+
configSchemas: { cle_requirements: SETTINGS_SCHEMA },
|
|
23
|
+
args, required: ['cle', 'timekeepers', 'requirements'], run, checks: CHECKS,
|
|
24
|
+
item: { key: 'timekeeper', label: 'lawyer', arg: 'lawyer', kind: 'item' },
|
|
25
|
+
argDocs: { lawyer: 'Lawyer\'s name as on the timekeeper list' },
|
|
26
|
+
report: {
|
|
27
|
+
base: 'cle-hours',
|
|
28
|
+
title: { en: 'CLE compliance by lawyer', de: 'Fortbildungsstand je Anwalt', fr: 'Formation continue par avocat', es: 'Formación continua por abogado', pt: 'Educação jurídica continuada por advogado', it: 'Formazione continua per avvocato', ja: '弁護士別の継続研修', zh: '律师继续教育情况', ko: '변호사별 연수 이수 현황' },
|
|
29
|
+
rows: (r) => r.items.map((i) => ({ timekeeper: i.timekeeper, state: i.state, period_end: i.period_end || '', days_left: i.days_left ?? '', completed: i.hours ?? '', required: i.required ?? '', categories: i.by_category ? Object.entries(i.by_category).map(([k, v]) => `${k} ${v}`).join('; ') : '', status: i.status, findings: i.findings.map((f) => f.code).join(' '), reasons: i.findings.map((f) => f.detail).join(' '), owner: '', decision: '', notes: '' })),
|
|
30
|
+
htmlColumns: ['timekeeper', 'state', 'period_end', 'completed', 'required', 'categories', 'reasons'],
|
|
31
|
+
sections: (r) => [{ title: sectionTitle('by_rule'), rows: Object.entries(r.by_check).map(([rule, count]) => ({ rule, severity: CHECKS[rule].severity, count })), columns: ['rule', 'severity', 'count'] }],
|
|
32
|
+
limits: [LIMITS.files, 'Requirements come only from your settings. States set their own hours, categories, carry-over and reporting rules, and change them; check the current rules with the state bar.', 'A course counts when its date is in the period and its state is blank or the lawyer\'s state; categories match by name.', LIMITS.advice],
|
|
33
|
+
},
|
|
34
|
+
drafts: [{
|
|
35
|
+
noun: 'cle_reminder', verb: 'send', category: 'binding_send', actor: 'the person who sends it',
|
|
36
|
+
description: 'Write drafts/cle_reminder-<hash>.md: an internal note to one lawyer with their hours, what is still missing and the period end. Marked DRAFT. Sending goes through cle_request_send (one click).',
|
|
37
|
+
args: { ...args, lawyer: { type: 'string', description: 'Lawyer\'s name as on the timekeeper list' } },
|
|
38
|
+
required: ['cle', 'timekeepers', 'requirements', 'lawyer'],
|
|
39
|
+
build: (a, ctx) => {
|
|
40
|
+
const r = run(a, ctx); const it = r.items.find((x) => x.timekeeper.toLowerCase() === String(a.lawyer).trim().toLowerCase());
|
|
41
|
+
if (!it) throw new Error(`${a.lawyer} is not a lawyer on the timekeeper list`);
|
|
42
|
+
if (!it.findings.some((f) => f.code !== 'no_requirement' && f.code !== 'no_period_end')) throw new Error(`${a.lawyer} is not short of CLE hours`);
|
|
43
|
+
const text = [`# CLE hours`, '', `**To:** ${it.timekeeper}`, '', `Your ${it.state} reporting period ends on ${it.period_end}. Our records show ${it.hours} of ${it.required} hours.`, '', ...it.findings.map((f) => `- ${f.detail}`), '', 'If you have done courses that are not on our list, please send the certificates. [TO CONFIRM: sender]'].join('\n');
|
|
44
|
+
return { id: it.timekeeper, to: it.timekeeper, text };
|
|
45
|
+
},
|
|
46
|
+
}],
|
|
47
|
+
refused: [{ name: 'cle_report_submit', category: 'binding_send', description: 'Fairbrief CLE Hours never reports hours to a bar or regulator.' }, { name: 'course_register', category: 'move_money', description: 'Fairbrief CLE Hours never books or pays for courses.' }],
|
|
48
|
+
prompt: {
|
|
49
|
+
name: 'cle_review', title: 'Check CLE hours',
|
|
50
|
+
description: 'Walks the host model through a CLE review with Fairbrief CLE Hours.',
|
|
51
|
+
arguments: [{ name: 'cle', description: 'CLE records under --root', required: true }, { name: 'timekeepers', description: 'Timekeeper list', required: true }, { name: 'requirements', description: 'cle_requirements JSON', required: true }],
|
|
52
|
+
text: `You are helping a law firm track CLE hours with fairbrief-cle-hours. Records: {{cle}}. Timekeepers: {{timekeepers}}. Requirements: {{requirements}}.
|
|
53
|
+
|
|
54
|
+
Rules: Fairbrief CLE Hours never reports to a bar or books courses (cle_report_submit and course_register are blocked). Requirements come only from the firm's file; never state a bar's rule as fact.
|
|
55
|
+
|
|
56
|
+
1. Call cle_check. Report lawyers whose period ends soon with hours missing first.
|
|
57
|
+
2. Call cle_write_report.
|
|
58
|
+
3. Offer cle_draft_cle_reminder for each lawyer who is short; sending waits for one named person.`,
|
|
59
|
+
},
|
|
60
|
+
});
|