@pukujan/create-modular-monolith 2.0.0 → 2.2.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.
Files changed (97) hide show
  1. package/README.md +94 -23
  2. package/index.js +47 -0
  3. package/package.json +16 -19
  4. package/template/.cursor/commands/planning-study-log.md +25 -0
  5. package/template/.cursor/commands/pre-push-dev-log.md +52 -0
  6. package/template/.cursor/rules/api-documentation.mdc +21 -0
  7. package/template/.cursor/rules/file-exchange-inbox.mdc +29 -0
  8. package/template/.github/workflows/ci.yml +44 -0
  9. package/template/AGENTS.md +41 -0
  10. package/template/README.md +25 -55
  11. package/template/backend/.env.example +38 -0
  12. package/template/backend/package-lock.json +1118 -24
  13. package/template/backend/package.json +14 -4
  14. package/template/backend/scripts/check-module-boundaries.mjs +3 -0
  15. package/template/backend/src/modules/model-condenser/README.md +7 -0
  16. package/template/backend/src/modules/model-condenser/config/index.js +20 -0
  17. package/template/backend/src/modules/model-condenser/events/index.js +1 -0
  18. package/template/backend/src/modules/model-condenser/index.js +12 -0
  19. package/template/backend/src/modules/model-condenser/routes/health.routes.js +10 -0
  20. package/template/backend/src/modules/model-condenser/routes/index.js +10 -0
  21. package/template/backend/src/modules/model-condenser/routes/modelCondenser.routes.js +44 -0
  22. package/template/backend/src/modules/model-condenser/services/health.service.js +8 -0
  23. package/template/backend/src/modules/model-condenser/services/modelCondenser.facade.js +58 -0
  24. package/template/backend/src/modules/model-condenser/services/modelCondenser.service.js +513 -0
  25. package/template/backend/src/modules/model-condenser/tests/integration/modelCondenser.routes.test.js +40 -0
  26. package/template/backend/src/modules/model-condenser/tests/unit/modelCondenser.service.test.js +31 -0
  27. package/template/backend/src/modules/model-condenser/utils/index.js +1 -0
  28. package/template/backend/src/shared/contracts/consolidatedExports.contract.js +19 -0
  29. package/template/backend/src/shared/contracts/prePushDevLog.contract.js +28 -0
  30. package/template/backend/src/shared/domain/case-filing/core-models.js +117 -0
  31. package/template/backend/src/shared/http/errors.js +8 -0
  32. package/template/backend/src/shared/utils/consolidatedExport.js +30 -0
  33. package/template/backend/src/shared/utils/formatExchangeTimestamp.js +47 -0
  34. package/template/backend/src/shared/utils/formatExchangeTimestamp.test.js +30 -0
  35. package/template/backend/src/shared/utils/traceId.js +19 -0
  36. package/template/docs/API.md +42 -0
  37. package/template/docs/PUBLISHING.md +13 -1
  38. package/template/docs/README.md +7 -1
  39. package/template/docs/STARTER_PACK.md +4 -0
  40. package/template/docs/architecture/API_DOCUMENTATION_CONTRACT.md +112 -0
  41. package/template/docs/architecture/CONTRACTS_OVERVIEW.md +180 -0
  42. package/template/docs/architecture/EVAL_AND_CI.md +79 -0
  43. package/template/docs/architecture/MODULE_INTERNAL_CONTRACT.md +2 -0
  44. package/template/docs/architecture/PLATFORM_ARCHITECTURE.md +221 -0
  45. package/template/docs/architecture/REPO_ARTIFACT_LAYOUT.md +33 -0
  46. package/template/docs/architecture/contracts/apiDocumentationRegistry.contract.md +40 -0
  47. package/template/docs/architecture/contracts/changelog.jsonl +12 -0
  48. package/template/docs/architecture/contracts/consolidatedExports.contract.md +58 -0
  49. package/template/docs/architecture/contracts/fileExchange.contract.md +47 -0
  50. package/template/docs/architecture/contracts/manifest.json +39 -0
  51. package/template/docs/architecture/contracts/prePushDevLog.contract.md +69 -0
  52. package/template/docs/model-condenser/API.md +102 -0
  53. package/template/file-exchange/README.md +41 -0
  54. package/template/file-exchange/exports/.gitkeep +0 -0
  55. package/template/file-exchange/exports/consolidated-models.json +625 -0
  56. package/template/file-exchange/imports/.gitkeep +0 -0
  57. package/template/frontend/.env.example +2 -0
  58. package/template/frontend/package-lock.json +125 -122
  59. package/template/frontend/package.json +1 -1
  60. package/template/frontend/src/index.css +311 -0
  61. package/template/frontend/src/modules/_reference/services/health-api.js +1 -1
  62. package/template/frontend/src/shared/api/client.js +67 -5
  63. package/template/models/.gitkeep +0 -0
  64. package/template/package.json +13 -4
  65. package/template/scripts/check-api-docs.mjs +183 -0
  66. package/template/scripts/condense-file-structure.mjs +44 -0
  67. package/template/scripts/condense-models.mjs +70 -0
  68. package/template/scripts/condense-prompts.mjs +161 -0
  69. package/template/scripts/consolidated-output.mjs +49 -0
  70. package/template/scripts/export-consolidated-models.mjs +11 -0
  71. package/template/scripts/git-hooks/pre-push.sample +15 -0
  72. package/template/scripts/import-to-file-exchange.mjs +43 -0
  73. package/template/scripts/lib/api-inventory.mjs +182 -0
  74. package/template/scripts/lib/dev-log-human-format.mjs +360 -0
  75. package/template/scripts/lib/git-snapshot.mjs +46 -0
  76. package/template/scripts/lib/module-scaffold.mjs +37 -1
  77. package/template/scripts/lib/repo-tree.mjs +127 -0
  78. package/template/scripts/lib/run-tests.mjs +60 -0
  79. package/template/scripts/lint-contracts.mjs +57 -0
  80. package/template/scripts/lint-repo-artifacts.mjs +37 -0
  81. package/template/scripts/new-module.mjs +7 -0
  82. package/template/scripts/resolve-import-stamp.mjs +50 -0
  83. package/template/scripts/verify-dev-log.mjs +50 -0
  84. package/template/scripts/write-pre-push-dev-log.mjs +220 -0
  85. package/template/work-log/INDEX.md +3 -0
  86. package/template/work-log/README.md +40 -0
  87. package/template/work-log/dev-logs/README.md +97 -0
  88. package/template/work-log/dev-logs/schemas/dev-log-agent.v1.schema.json +119 -0
  89. package/template/work-log/dev-logs/templates/dev-log-human.template.md +10 -0
  90. package/template/work-log/handoffs/README.md +36 -0
  91. package/template/work-log/study-docs/README.md +13 -0
  92. package/bin/create-modular-monolith.js +0 -132
  93. package/template/backend/src/modules/_reference/evals/README.md +0 -6
  94. package/template/backend/src/modules/_reference/evals/datasets/example.cases.json +0 -12
  95. package/template/backend/src/modules/_reference/evals/runners/example.eval.mjs +0 -25
  96. package/template/scripts/sync-cli-template.mjs +0 -44
  97. /package/template/{frontend/src/modules → backend/db/migrations}/.gitkeep +0 -0
@@ -0,0 +1,625 @@
1
+ {
2
+ "meta": {
3
+ "generatedAt": "2026-05-23T17:33:00.382Z",
4
+ "repositoryRoot": "/private/tmp/create-modular-monolith/template",
5
+ "condensedBy": "model-condenser",
6
+ "description": "Consolidated inventory of JSON shapes used by the legal-prmpt-eng case filing pipeline."
7
+ },
8
+ "inventory": [
9
+ {
10
+ "id": "CaseModel",
11
+ "name": "CaseModel",
12
+ "category": "core_domain",
13
+ "sourcePaths": [
14
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
15
+ "backend/src/shared/domain/case-filing/core-models.js"
16
+ ],
17
+ "description": "Top-level case identity and phase tracking.",
18
+ "hasSchema": true,
19
+ "hasExample": true,
20
+ "exampleSourcePath": "data/case-filing-ai/examples/case.json"
21
+ },
22
+ {
23
+ "id": "DocumentModel",
24
+ "name": "DocumentModel",
25
+ "category": "core_domain",
26
+ "sourcePaths": [
27
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
28
+ "backend/src/shared/domain/case-filing/core-models.js",
29
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/db/migrations/001_case_filing_ai_schema.sql"
30
+ ],
31
+ "description": "A filing document linked to a case (NYSCEF-style metadata).",
32
+ "hasSchema": true,
33
+ "hasExample": false,
34
+ "exampleSourcePath": null
35
+ },
36
+ {
37
+ "id": "DocumentTextVersionModel",
38
+ "name": "DocumentTextVersionModel",
39
+ "category": "core_domain",
40
+ "sourcePaths": [
41
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
42
+ "backend/src/shared/domain/case-filing/core-models.js"
43
+ ],
44
+ "description": "Versioned extracted or reviewed text for a document (filing-text-vault).",
45
+ "hasSchema": true,
46
+ "hasExample": false,
47
+ "exampleSourcePath": null
48
+ },
49
+ {
50
+ "id": "TaskModel",
51
+ "name": "TaskModel",
52
+ "category": "core_domain",
53
+ "sourcePaths": [
54
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
55
+ "backend/src/shared/domain/case-filing/core-models.js"
56
+ ],
57
+ "description": "Docketing task with due date and workflow status.",
58
+ "hasSchema": true,
59
+ "hasExample": false,
60
+ "exampleSourcePath": null
61
+ },
62
+ {
63
+ "id": "HumanReviewItemModel",
64
+ "name": "HumanReviewItemModel",
65
+ "category": "core_domain",
66
+ "sourcePaths": [
67
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
68
+ "backend/src/shared/domain/case-filing/core-models.js"
69
+ ],
70
+ "description": "Mandatory human review queue item (OCR, handwriting, stamps, etc.).",
71
+ "hasSchema": true,
72
+ "hasExample": false,
73
+ "exampleSourcePath": null
74
+ },
75
+ {
76
+ "id": "CaseStateSnapshotModel",
77
+ "name": "CaseStateSnapshotModel",
78
+ "category": "core_domain",
79
+ "sourcePaths": [
80
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
81
+ "backend/src/shared/domain/case-filing/core-models.js",
82
+ "backend/src/modules/case-filing-ai/services/localJsonStore.service.js"
83
+ ],
84
+ "description": "Rolling case state after each processed document.",
85
+ "hasSchema": true,
86
+ "hasExample": true,
87
+ "exampleSourcePath": "data/case-filing-ai/examples/case-snapshot.json"
88
+ },
89
+ {
90
+ "id": "EmptyCaseStateSnapshot",
91
+ "name": "EmptyCaseStateSnapshot",
92
+ "category": "runtime_default",
93
+ "sourcePaths": [
94
+ "backend/src/modules/case-filing-ai/services/localJsonStore.service.js"
95
+ ],
96
+ "description": "Initial snapshot written when a new batch is created.",
97
+ "hasSchema": true,
98
+ "hasExample": true,
99
+ "exampleSourcePath": null
100
+ },
101
+ {
102
+ "id": "MasterCaseFilingPromptOutput",
103
+ "name": "MasterCaseFilingPromptOutput",
104
+ "category": "prompt_output",
105
+ "sourcePaths": [
106
+ "backend/src/modules/case-filing-ai/prompts/master-case-filing.prompt.md",
107
+ "work-log/handoffs/002_2026-05-23_00-42_handoff_second.md"
108
+ ],
109
+ "description": "Strict JSON returned by the master case-filing LLM prompt per document.",
110
+ "hasSchema": true,
111
+ "hasExample": false,
112
+ "exampleSourcePath": null
113
+ },
114
+ {
115
+ "id": "PartRuleParsed",
116
+ "name": "PartRuleParsed",
117
+ "category": "prompt_output",
118
+ "sourcePaths": [
119
+ "backend/src/modules/case-filing-ai/prompts/rule-parse.prompt.md"
120
+ ],
121
+ "description": "Structured part/judge rules after parsing user-supplied rule text.",
122
+ "hasSchema": true,
123
+ "hasExample": false,
124
+ "exampleSourcePath": "data/case-filing-ai/batches/batch-002/rule/part-rules-parsed.json"
125
+ },
126
+ {
127
+ "id": "PartRuleStoredRecord",
128
+ "name": "PartRuleStoredRecord",
129
+ "category": "pipeline_storage",
130
+ "sourcePaths": [
131
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
132
+ ],
133
+ "description": "part-rules-parsed.json on disk: PartRuleParsed plus batch metadata.",
134
+ "hasSchema": true,
135
+ "hasExample": false,
136
+ "exampleSourcePath": null
137
+ },
138
+ {
139
+ "id": "PartRuleExtraction",
140
+ "name": "PartRuleExtraction",
141
+ "category": "pipeline_storage",
142
+ "sourcePaths": [
143
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
144
+ ],
145
+ "description": "part-rules-extraction.json: file upload metadata for a part rule file.",
146
+ "hasSchema": true,
147
+ "hasExample": false,
148
+ "exampleSourcePath": "data/case-filing-ai/batches/batch-002/rule/part-rules-extraction.json"
149
+ },
150
+ {
151
+ "id": "ExtractionQuality",
152
+ "name": "ExtractionQuality",
153
+ "category": "pipeline_runtime",
154
+ "sourcePaths": [
155
+ "backend/src/modules/case-filing-ai/services/documentText.service.js"
156
+ ],
157
+ "description": "Text extraction quality flags for uploads and filings.",
158
+ "hasSchema": true,
159
+ "hasExample": false,
160
+ "exampleSourcePath": null
161
+ },
162
+ {
163
+ "id": "DocumentProcessingOutput",
164
+ "name": "DocumentProcessingOutput",
165
+ "category": "pipeline_storage",
166
+ "sourcePaths": [
167
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js",
168
+ "data/case-filing-ai/batches/batch-002/outputs/doc-001.json"
169
+ ],
170
+ "description": "Per-document JSON saved under data/.../outputs/doc-NNN.json after LLM processing.",
171
+ "hasSchema": true,
172
+ "hasExample": false,
173
+ "exampleSourcePath": "data/case-filing-ai/batches/batch-002/outputs/doc-001.json"
174
+ },
175
+ {
176
+ "id": "BatchProcessingResult",
177
+ "name": "BatchProcessingResult",
178
+ "category": "api_response",
179
+ "sourcePaths": [
180
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
181
+ ],
182
+ "description": "POST /process-batch and GET /batches/:id/results response body.",
183
+ "hasSchema": true,
184
+ "hasExample": false,
185
+ "exampleSourcePath": null
186
+ },
187
+ {
188
+ "id": "BatchStatus",
189
+ "name": "BatchStatus",
190
+ "category": "api_response",
191
+ "sourcePaths": [
192
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
193
+ ],
194
+ "description": "GET /batches/:id/status response body.",
195
+ "hasSchema": true,
196
+ "hasExample": false,
197
+ "exampleSourcePath": null
198
+ },
199
+ {
200
+ "id": "RuleTextExtractResponse",
201
+ "name": "RuleTextExtractResponse",
202
+ "category": "api_response",
203
+ "sourcePaths": [
204
+ "backend/src/modules/case-filing-ai/services/ruleText.service.js",
205
+ "backend/src/modules/case-filing-ai/routes/caseFiling.routes.js"
206
+ ],
207
+ "description": "POST /extract-rule-text response body.",
208
+ "hasSchema": true,
209
+ "hasExample": false,
210
+ "exampleSourcePath": null
211
+ }
212
+ ],
213
+ "definitions": {
214
+ "CaseModel": {
215
+ "name": "CaseModel",
216
+ "category": "core_domain",
217
+ "sourcePaths": [
218
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
219
+ "backend/src/shared/domain/case-filing/core-models.js"
220
+ ],
221
+ "description": "Top-level case identity and phase tracking.",
222
+ "schema": {
223
+ "caseId": "string",
224
+ "county": "string | null",
225
+ "court": "string | null",
226
+ "indexNumber": "string | null",
227
+ "caseName": "string | null",
228
+ "caseType": "string | null",
229
+ "judgeName": "string | null",
230
+ "partName": "string | null",
231
+ "currentPhase": "string | null",
232
+ "currentMiniPhase": "string | null",
233
+ "confidence": "high | medium | low"
234
+ },
235
+ "example": {
236
+ "caseId": "example_case",
237
+ "county": "Queens",
238
+ "part": "Part 10",
239
+ "currentPhase": "commencement",
240
+ "synthetic": true,
241
+ "note": "Placeholder example for model-condenser inventory only."
242
+ }
243
+ },
244
+ "DocumentModel": {
245
+ "name": "DocumentModel",
246
+ "category": "core_domain",
247
+ "sourcePaths": [
248
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
249
+ "backend/src/shared/domain/case-filing/core-models.js",
250
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/db/migrations/001_case_filing_ai_schema.sql"
251
+ ],
252
+ "description": "A filing document linked to a case (NYSCEF-style metadata).",
253
+ "schema": {
254
+ "documentId": "string",
255
+ "caseId": "string",
256
+ "nyscefDocNo": "number | null",
257
+ "title": "string | null",
258
+ "documentType": "string | null",
259
+ "filedDateTime": "string | null",
260
+ "filedBy": "string | null",
261
+ "sourceFileName": "string",
262
+ "pageCount": "number | null",
263
+ "extractionStatus": "string",
264
+ "textReviewStatus": "unreviewed | partially_reviewed | reviewed | rejected"
265
+ },
266
+ "example": null
267
+ },
268
+ "DocumentTextVersionModel": {
269
+ "name": "DocumentTextVersionModel",
270
+ "category": "core_domain",
271
+ "sourcePaths": [
272
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
273
+ "backend/src/shared/domain/case-filing/core-models.js"
274
+ ],
275
+ "description": "Versioned extracted or reviewed text for a document (filing-text-vault).",
276
+ "schema": {
277
+ "id": "string",
278
+ "caseId": "string",
279
+ "documentId": "string",
280
+ "versionType": "embedded_text | ocr_text | ai_parsed_text | human_reviewed_text",
281
+ "textContent": "string (optional)",
282
+ "structuredJson": "unknown (optional)",
283
+ "extractionMethod": "pdf_text | ocr | llm | human_review",
284
+ "reviewStatus": "unreviewed | partially_reviewed | reviewed | rejected",
285
+ "createdBy": "system | ai | human",
286
+ "createdAt": "string (ISO datetime)"
287
+ },
288
+ "example": null
289
+ },
290
+ "TaskModel": {
291
+ "name": "TaskModel",
292
+ "category": "core_domain",
293
+ "sourcePaths": [
294
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
295
+ "backend/src/shared/domain/case-filing/core-models.js"
296
+ ],
297
+ "description": "Docketing task with due date and workflow status.",
298
+ "schema": {
299
+ "taskId": "string",
300
+ "caseId": "string",
301
+ "documentId": "string (optional)",
302
+ "taskDescription": "string",
303
+ "taskType": "string",
304
+ "responsibleParty": "string | null",
305
+ "dueDate": "string | null",
306
+ "dueDateStatus": "fixed | calculated | no_fixed_due_date | needs_review",
307
+ "status": "ai_extracted_unreviewed | source_supported_auto_saved | conditional | needs_ocr_review | corrected_later | superseded | human_verified",
308
+ "sourcePage": "number (optional)",
309
+ "confidence": "high | medium | low",
310
+ "docketingNote": "string (optional)"
311
+ },
312
+ "example": null
313
+ },
314
+ "HumanReviewItemModel": {
315
+ "name": "HumanReviewItemModel",
316
+ "category": "core_domain",
317
+ "sourcePaths": [
318
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
319
+ "backend/src/shared/domain/case-filing/core-models.js"
320
+ ],
321
+ "description": "Mandatory human review queue item (OCR, handwriting, stamps, etc.).",
322
+ "schema": {
323
+ "itemId": "string",
324
+ "caseId": "string",
325
+ "documentId": "string",
326
+ "pageNumber": "number",
327
+ "location": "string",
328
+ "issue": "string",
329
+ "reason": "string",
330
+ "suggestedAction": "string",
331
+ "cropFilePath": "string (optional)",
332
+ "blocking": "boolean",
333
+ "status": "pending | reviewed | resolved"
334
+ },
335
+ "example": null
336
+ },
337
+ "CaseStateSnapshotModel": {
338
+ "name": "CaseStateSnapshotModel",
339
+ "category": "core_domain",
340
+ "sourcePaths": [
341
+ "work-log/handoffs/001_2026-05-23_starter_case-filing-ai-updated/models/typescript/core-models.ts",
342
+ "backend/src/shared/domain/case-filing/core-models.js",
343
+ "backend/src/modules/case-filing-ai/services/localJsonStore.service.js"
344
+ ],
345
+ "description": "Rolling case state after each processed document.",
346
+ "schema": {
347
+ "snapshotId": "string | null",
348
+ "caseId": "string | null",
349
+ "afterDocNo": "number | null",
350
+ "currentPhase": "string | null",
351
+ "currentMiniPhase": "string | null",
352
+ "confirmedFacts": "unknown[]",
353
+ "carriedForwardContext": "unknown[]",
354
+ "openTasks": "TaskModel[] | string[] (runtime varies)",
355
+ "completedTasks": "TaskModel[] | string[]",
356
+ "conditionalTasks": "TaskModel[] | string[]",
357
+ "deadlines": "unknown[]",
358
+ "supersededDeadlines": "unknown[]",
359
+ "unresolvedHumanReviewItems": "HumanReviewItemModel[]",
360
+ "conflicts": "unknown[]",
361
+ "auditNotes": "string[]"
362
+ },
363
+ "example": {
364
+ "snapshotId": "example_snapshot",
365
+ "caseId": "example_case",
366
+ "currentPhase": "commencement",
367
+ "confirmedFacts": [],
368
+ "openTasks": [],
369
+ "synthetic": true
370
+ }
371
+ },
372
+ "EmptyCaseStateSnapshot": {
373
+ "name": "EmptyCaseStateSnapshot",
374
+ "category": "runtime_default",
375
+ "sourcePaths": [
376
+ "backend/src/modules/case-filing-ai/services/localJsonStore.service.js"
377
+ ],
378
+ "description": "Initial snapshot written when a new batch is created.",
379
+ "schema": {
380
+ "snapshotId": null,
381
+ "caseId": null,
382
+ "afterDocNo": null,
383
+ "currentPhase": null,
384
+ "currentMiniPhase": null,
385
+ "confirmedFacts": [],
386
+ "carriedForwardContext": [],
387
+ "openTasks": [],
388
+ "completedTasks": [],
389
+ "conditionalTasks": [],
390
+ "deadlines": [],
391
+ "supersededDeadlines": [],
392
+ "unresolvedHumanReviewItems": [],
393
+ "conflicts": [],
394
+ "auditNotes": []
395
+ },
396
+ "example": {
397
+ "snapshotId": null,
398
+ "caseId": null,
399
+ "afterDocNo": null,
400
+ "currentPhase": null,
401
+ "currentMiniPhase": null,
402
+ "confirmedFacts": [],
403
+ "carriedForwardContext": [],
404
+ "openTasks": [],
405
+ "completedTasks": [],
406
+ "conditionalTasks": [],
407
+ "deadlines": [],
408
+ "supersededDeadlines": [],
409
+ "unresolvedHumanReviewItems": [],
410
+ "conflicts": [],
411
+ "auditNotes": []
412
+ }
413
+ },
414
+ "MasterCaseFilingPromptOutput": {
415
+ "name": "MasterCaseFilingPromptOutput",
416
+ "category": "prompt_output",
417
+ "sourcePaths": [
418
+ "backend/src/modules/case-filing-ai/prompts/master-case-filing.prompt.md",
419
+ "work-log/handoffs/002_2026-05-23_00-42_handoff_second.md"
420
+ ],
421
+ "description": "Strict JSON returned by the master case-filing LLM prompt per document.",
422
+ "schema": {
423
+ "documentMetadata": "object",
424
+ "extractionQuality": "object",
425
+ "docketEntry": "object",
426
+ "caseUpdates": "object",
427
+ "parties": "array",
428
+ "witnesses": "array",
429
+ "tasks": "array",
430
+ "deadlines": "array",
431
+ "humanReviewItems": "array",
432
+ "updatedCaseSnapshot": "object",
433
+ "auditNotes": "array",
434
+ "inferredPartRuleText": "string",
435
+ "partRuleExtracts": "array"
436
+ },
437
+ "example": null
438
+ },
439
+ "PartRuleParsed": {
440
+ "name": "PartRuleParsed",
441
+ "category": "prompt_output",
442
+ "sourcePaths": [
443
+ "backend/src/modules/case-filing-ai/prompts/rule-parse.prompt.md"
444
+ ],
445
+ "description": "Structured part/judge rules after parsing user-supplied rule text.",
446
+ "schema": {
447
+ "partName": "string | null",
448
+ "judgeName": "string | null",
449
+ "county": "string | null",
450
+ "court": "string | null",
451
+ "rules": "string[]",
452
+ "schedulingNotes": "string[]",
453
+ "deadlinePolicies": "string[]",
454
+ "sourceSummary": "string",
455
+ "confidence": "high | medium | low"
456
+ },
457
+ "example": null
458
+ },
459
+ "PartRuleStoredRecord": {
460
+ "name": "PartRuleStoredRecord",
461
+ "category": "pipeline_storage",
462
+ "sourcePaths": [
463
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
464
+ ],
465
+ "description": "part-rules-parsed.json on disk: PartRuleParsed plus batch metadata.",
466
+ "schema": {
467
+ "source": "user_paste | user_upload | inferred_from_filings | pending_inference | none",
468
+ "savedAt": "string (ISO datetime)",
469
+ "extraction": "PartRuleExtraction | null",
470
+ "inferredFromDocs": "array (optional)",
471
+ "...PartRuleParsed fields": "see PartRuleParsed"
472
+ },
473
+ "example": null
474
+ },
475
+ "PartRuleExtraction": {
476
+ "name": "PartRuleExtraction",
477
+ "category": "pipeline_storage",
478
+ "sourcePaths": [
479
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
480
+ ],
481
+ "description": "part-rules-extraction.json: file upload metadata for a part rule file.",
482
+ "schema": {
483
+ "storedName": "string",
484
+ "originalName": "string",
485
+ "fileKind": "pdf | text | image | office | binary",
486
+ "extractionQuality": "ExtractionQuality",
487
+ "mimeType": "string",
488
+ "sizeBytes": "number"
489
+ },
490
+ "example": null
491
+ },
492
+ "ExtractionQuality": {
493
+ "name": "ExtractionQuality",
494
+ "category": "pipeline_runtime",
495
+ "sourcePaths": [
496
+ "backend/src/modules/case-filing-ai/services/documentText.service.js"
497
+ ],
498
+ "description": "Text extraction quality flags for uploads and filings.",
499
+ "schema": {
500
+ "method": "string",
501
+ "fileKind": "string",
502
+ "textLength": "number",
503
+ "ocr_needed": "boolean",
504
+ "ocr_used": "boolean",
505
+ "ocr_model": "string | null",
506
+ "ocr_pages": "number[] | null",
507
+ "reviewStatus": "ai_extracted_unreviewed | ...",
508
+ "note": "string | null"
509
+ },
510
+ "example": null
511
+ },
512
+ "DocumentProcessingOutput": {
513
+ "name": "DocumentProcessingOutput",
514
+ "category": "pipeline_storage",
515
+ "sourcePaths": [
516
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js",
517
+ "data/case-filing-ai/batches/batch-002/outputs/doc-001.json"
518
+ ],
519
+ "description": "Per-document JSON saved under data/.../outputs/doc-NNN.json after LLM processing.",
520
+ "schema": {
521
+ "docKey": "string",
522
+ "docIndex": "number",
523
+ "storedName": "string",
524
+ "originalName": "string",
525
+ "fileKind": "string",
526
+ "model": "string",
527
+ "usage": "object",
528
+ "documentMetadata": "object",
529
+ "extractionQuality": "object",
530
+ "docketEntry": "object",
531
+ "caseUpdates": "object",
532
+ "parties": "array",
533
+ "witnesses": "array",
534
+ "tasks": "array",
535
+ "deadlines": "array",
536
+ "humanReviewItems": "array",
537
+ "auditNotes": "array"
538
+ },
539
+ "example": null
540
+ },
541
+ "BatchProcessingResult": {
542
+ "name": "BatchProcessingResult",
543
+ "category": "api_response",
544
+ "sourcePaths": [
545
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
546
+ ],
547
+ "description": "POST /process-batch and GET /batches/:id/results response body.",
548
+ "schema": {
549
+ "batchId": "string",
550
+ "caseSnapshot": "CaseStateSnapshotModel",
551
+ "documents": "DocumentProcessingOutput[]",
552
+ "tasks": "array (aggregated)",
553
+ "deadlines": "array (aggregated)",
554
+ "humanReviewItems": "array (aggregated)",
555
+ "partRule": "PartRuleStoredRecord | null"
556
+ },
557
+ "example": null
558
+ },
559
+ "BatchStatus": {
560
+ "name": "BatchStatus",
561
+ "category": "api_response",
562
+ "sourcePaths": [
563
+ "backend/src/modules/case-filing-ai/services/uploadBatch.service.js"
564
+ ],
565
+ "description": "GET /batches/:id/status response body.",
566
+ "schema": {
567
+ "batchId": "string",
568
+ "status": "pending | processing | completed",
569
+ "currentStep": "string",
570
+ "currentDocument": "string | null",
571
+ "processedCount": "number",
572
+ "totalCount": "number"
573
+ },
574
+ "example": null
575
+ },
576
+ "RuleTextExtractResponse": {
577
+ "name": "RuleTextExtractResponse",
578
+ "category": "api_response",
579
+ "sourcePaths": [
580
+ "backend/src/modules/case-filing-ai/services/ruleText.service.js",
581
+ "backend/src/modules/case-filing-ai/routes/caseFiling.routes.js"
582
+ ],
583
+ "description": "POST /extract-rule-text response body.",
584
+ "schema": {
585
+ "text": "string",
586
+ "fileKind": "string",
587
+ "extractionQuality": "ExtractionQuality",
588
+ "originalName": "string"
589
+ },
590
+ "example": null
591
+ }
592
+ },
593
+ "exampleInstances": {
594
+ "backend/data/case-filing-ai/examples/case.json": {
595
+ "caseId": "example_case",
596
+ "county": "Queens",
597
+ "part": "Part 10",
598
+ "currentPhase": "commencement",
599
+ "synthetic": true,
600
+ "note": "Placeholder example for model-condenser inventory only."
601
+ },
602
+ "backend/data/case-filing-ai/examples/case-snapshot.json": {
603
+ "snapshotId": "example_snapshot",
604
+ "caseId": "example_case",
605
+ "currentPhase": "commencement",
606
+ "confirmedFacts": [],
607
+ "openTasks": [],
608
+ "synthetic": true
609
+ }
610
+ },
611
+ "evalDatasets": {
612
+ "description": "Per-module eval fixture files (API health shape tests, not case domain models).",
613
+ "paths": [
614
+ "backend/src/modules/_reference/evals/datasets/example.cases.json",
615
+ "backend/src/modules/case-filing-ai/evals/datasets/example.cases.json",
616
+ "backend/src/modules/case-workflow/evals/datasets/example.cases.json",
617
+ "backend/src/modules/court-rules/evals/datasets/example.cases.json",
618
+ "backend/src/modules/filing-pipeline/evals/datasets/example.cases.json",
619
+ "backend/src/modules/filing-text-vault/evals/datasets/example.cases.json",
620
+ "backend/src/modules/human-review/evals/datasets/example.cases.json",
621
+ "backend/src/modules/task-docketing/evals/datasets/example.cases.json"
622
+ ],
623
+ "sharedShape": null
624
+ }
625
+ }
File without changes
@@ -0,0 +1,2 @@
1
+ # Frontend — copy to frontend/.env.local (optional)
2
+ VITE_API_BASE_URL=http://localhost:3001