@pukujan/create-modular-monolith 2.2.1 → 2.2.3
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/package.json +1 -1
- package/template/.cursor/rules/file-exchange-inbox.mdc +1 -1
- package/template/ARCHITECTURE_EXPORT_README.md +30 -0
- package/template/EXPORT_MANIFEST.json +74 -0
- package/template/NOTICE +2 -3
- package/template/README.md +1 -61
- package/template/backend/package.json +1 -1
- package/template/backend/src/modules/model-condenser/services/modelCondenser.service.js +36 -465
- package/template/backend/src/modules/model-condenser/tests/unit/modelCondenser.service.test.js +2 -3
- package/template/backend/src/shared/utils/consolidatedExport.js +155 -11
- package/template/backend/src/shared/utils/consolidatedExport.test.js +50 -0
- package/template/docs/README.md +0 -1
- package/template/docs/architecture/EVAL_AND_CI.md +68 -41
- package/template/docs/architecture/REPO_ARTIFACT_LAYOUT.md +57 -14
- package/template/docs/architecture/contracts/consolidatedExports.contract.md +14 -10
- package/template/docs/architecture/contracts/manifest.json +17 -0
- package/template/file-exchange/README.md +20 -15
- package/template/frontend/package.json +1 -1
- package/template/package.json +3 -3
- package/template/scripts/condense-all.mjs +52 -0
- package/template/scripts/condense-file-structure.mjs +19 -10
- package/template/scripts/condense-models.mjs +5 -3
- package/template/scripts/condense-prompts.mjs +13 -51
- package/template/scripts/consolidated-output.mjs +22 -10
- package/template/scripts/export-architecture-starter.mjs +389 -0
- package/template/scripts/lib/api-inventory.mjs +16 -61
- package/template/scripts/lib/repo-tree.mjs +26 -4
- package/template/scripts/sync-cli-template.mjs +44 -0
- package/template/scripts/write-pre-push-dev-log.mjs +1 -0
- package/template/file-exchange/exports/consolidated-models.json +0 -625
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pukujan/create-modular-monolith",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Scaffold a modular monolith with architecture contracts, file-exchange, agent dev logs, and lint automation for Cursor-scale engineering.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@ alwaysApply: true
|
|
|
18
18
|
- Ingest golden from that stamp: `npm run ingest:golden-parsed`, `npm run ingest:golden-expected`.
|
|
19
19
|
- Point `process-batch` / `curl` uploads at PDFs **inside** `file-exchange/imports/{stamp}/`, not `Downloads/` or repo root.
|
|
20
20
|
- Copy deliverables to `file-exchange/exports/{stamp}/` when done.
|
|
21
|
-
- Consolidated repo snapshots: `file-exchange/exports/
|
|
21
|
+
- Consolidated repo snapshots: `file-exchange/exports/{stamp}_consolidated/` (`npm run condense:all`); latest copies at `exports/consolidated-*.json`.
|
|
22
22
|
|
|
23
23
|
## Do not
|
|
24
24
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Architecture starter export
|
|
2
|
+
|
|
3
|
+
Generated by `npm run export:architecture-starter`.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
|
|
7
|
+
A **clean modular-monolith boilerplate**: contracts, file-exchange, dev-logs, model-condenser, `_reference` module, lint scripts — **without** litigation/case-filing domain modules or runtime data.
|
|
8
|
+
|
|
9
|
+
## What was excluded
|
|
10
|
+
|
|
11
|
+
- Domain backend/frontend modules (case-filing-ai, court-rules, …)
|
|
12
|
+
- `node_modules`, `dist`, `build`
|
|
13
|
+
- `data/`, `evals/golden`, batch PDFs, import bundles
|
|
14
|
+
- Legal-specific ingest/eval scripts
|
|
15
|
+
|
|
16
|
+
See `EXPORT_MANIFEST.json` for the full list.
|
|
17
|
+
|
|
18
|
+
## Update npm CLI template
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm run export:architecture-starter -- --to ../create-modular-monolith/packages/template
|
|
22
|
+
# or from this repo:
|
|
23
|
+
npm run export:architecture-starter -- --to packages/create-modular-monolith/template
|
|
24
|
+
cd packages/create-modular-monolith && npm publish --access public
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Docs
|
|
28
|
+
|
|
29
|
+
Start at [docs/architecture/CONTRACTS_OVERVIEW.md](docs/architecture/CONTRACTS_OVERVIEW.md).
|
|
30
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"exportedAt": "2026-05-23T17:53:29.141Z",
|
|
3
|
+
"sourceRepo": "legal-prmpt-eng",
|
|
4
|
+
"description": "Architecture-only starter — no domain modules, no build artifacts",
|
|
5
|
+
"included": {
|
|
6
|
+
"backendModules": [
|
|
7
|
+
"_reference",
|
|
8
|
+
"model-condenser"
|
|
9
|
+
],
|
|
10
|
+
"frontendModules": [
|
|
11
|
+
"_reference"
|
|
12
|
+
],
|
|
13
|
+
"docs": [
|
|
14
|
+
"docs/architecture/**",
|
|
15
|
+
"docs/API.md (starter)",
|
|
16
|
+
"docs/model-condenser/API.md"
|
|
17
|
+
],
|
|
18
|
+
"scripts": [
|
|
19
|
+
"new-module.mjs",
|
|
20
|
+
"sync-cli-template.mjs",
|
|
21
|
+
"export-architecture-starter.mjs",
|
|
22
|
+
"check-api-docs.mjs",
|
|
23
|
+
"lint-contracts.mjs",
|
|
24
|
+
"lint-repo-artifacts.mjs",
|
|
25
|
+
"condense-models.mjs",
|
|
26
|
+
"condense-prompts.mjs",
|
|
27
|
+
"condense-file-structure.mjs",
|
|
28
|
+
"condense-all.mjs",
|
|
29
|
+
"consolidated-output.mjs",
|
|
30
|
+
"write-pre-push-dev-log.mjs",
|
|
31
|
+
"verify-dev-log.mjs",
|
|
32
|
+
"import-to-file-exchange.mjs",
|
|
33
|
+
"resolve-import-stamp.mjs",
|
|
34
|
+
"export-consolidated-models.mjs",
|
|
35
|
+
"run-module-evals.mjs",
|
|
36
|
+
"scripts/lib/**",
|
|
37
|
+
"scripts/git-hooks/**"
|
|
38
|
+
],
|
|
39
|
+
"other": [
|
|
40
|
+
"file-exchange/",
|
|
41
|
+
"work-log/ (structure)",
|
|
42
|
+
".cursor/",
|
|
43
|
+
"backend/src/core",
|
|
44
|
+
"backend/src/shared",
|
|
45
|
+
"frontend/src/core",
|
|
46
|
+
"frontend/src/shared"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"excluded": {
|
|
50
|
+
"dirs": [
|
|
51
|
+
"node_modules",
|
|
52
|
+
".git",
|
|
53
|
+
"dist",
|
|
54
|
+
"build",
|
|
55
|
+
"coverage",
|
|
56
|
+
"packages",
|
|
57
|
+
"export",
|
|
58
|
+
"data",
|
|
59
|
+
"eval-bundles",
|
|
60
|
+
"case-exports",
|
|
61
|
+
"evals"
|
|
62
|
+
],
|
|
63
|
+
"backendModules": "case-filing-ai, court-rules, case-workflow, filing-*, human-review, task-docketing",
|
|
64
|
+
"data": "runtime batches, golden fixtures, PDFs",
|
|
65
|
+
"scripts": "ingest-golden-*, rerun-batch-evals, run-module-evals"
|
|
66
|
+
},
|
|
67
|
+
"nextSteps": [
|
|
68
|
+
"Review export/ARCHITECTURE_EXPORT_README.md",
|
|
69
|
+
"npm install in backend/ and frontend/",
|
|
70
|
+
"npm run lint:contracts && npm run lint:architecture",
|
|
71
|
+
"node scripts/new-module.mjs my-feature --label \"My Feature\"",
|
|
72
|
+
"Copy into packages/create-modular-monolith/template or publish CLI"
|
|
73
|
+
]
|
|
74
|
+
}
|
package/template/NOTICE
CHANGED
|
@@ -5,9 +5,8 @@ Copyright (c) 2026 Pukujan. All rights reserved.
|
|
|
5
5
|
This project was scaffolded from @pukujan/create-modular-monolith
|
|
6
6
|
(https://github.com/Pukujan/create-modular-monolith).
|
|
7
7
|
|
|
8
|
-
Platform files
|
|
9
|
-
|
|
10
|
-
License. See LICENSE in the create-modular-monolith repository.
|
|
8
|
+
Platform files remain subject to the Pukujan Modular Monolith Platform License.
|
|
9
|
+
See LICENSE in the create-modular-monolith repository.
|
|
11
10
|
|
|
12
11
|
Attribution: retain this NOTICE (or equivalent credit in README) if you keep
|
|
13
12
|
substantial platform files from the template.
|
package/template/README.md
CHANGED
|
@@ -35,80 +35,20 @@ cd backend && npm install && npm run dev
|
|
|
35
35
|
cd frontend && npm install && npm run dev
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
- API: `http://localhost:3001` — [docs/API.md](docs/API.md)
|
|
39
|
-
- UI: Vite dev server — see `frontend/package.json`
|
|
40
|
-
|
|
41
38
|
---
|
|
42
39
|
|
|
43
40
|
## Daily commands
|
|
44
41
|
|
|
45
42
|
```bash
|
|
46
|
-
# Before every git push
|
|
47
43
|
npm run dev-log:pre-push -- --slug your-topic
|
|
48
44
|
npm run test:ci
|
|
49
|
-
|
|
50
|
-
# Inbound files for agents (never process from Downloads/ directly)
|
|
51
45
|
npm run import:file-exchange -- "/path/to/bundle"
|
|
52
|
-
|
|
53
|
-
# Refresh agent-readable snapshots
|
|
54
46
|
npm run condense:all
|
|
55
|
-
|
|
56
|
-
# New feature
|
|
57
47
|
npm run new:module -- billing --label "Billing"
|
|
58
48
|
```
|
|
59
49
|
|
|
60
50
|
---
|
|
61
51
|
|
|
62
|
-
## Repository map
|
|
63
|
-
|
|
64
|
-
```text
|
|
65
|
-
my-modular-monolith/
|
|
66
|
-
├── backend/src/modules/ # add features here (_reference = layout example)
|
|
67
|
-
├── frontend/src/modules/
|
|
68
|
-
├── docs/architecture/ # contracts, guardrails
|
|
69
|
-
├── file-exchange/ # imports/{stamp}/ exports/consolidated-*.json
|
|
70
|
-
├── work-log/ # handoffs + dev-logs (human + agent)
|
|
71
|
-
├── scripts/ # lint, condense, dev-log, new-module
|
|
72
|
-
└── .github/workflows/ci.yml
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Canonical paths: [docs/architecture/REPO_ARTIFACT_LAYOUT.md](docs/architecture/REPO_ARTIFACT_LAYOUT.md)
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## What is included
|
|
80
|
-
|
|
81
|
-
- **Modules:** `_reference` (example layout), `model-condenser` (schema inventory API)
|
|
82
|
-
- **Platform contracts** v001 — file exchange, dev logs, consolidated exports, API registry
|
|
83
|
-
- **Lint:** `lint:architecture`, `lint:contracts`, `lint:repo-artifacts`
|
|
84
|
-
- **CI:** GitHub Actions runs the same checks as `npm run test:ci`
|
|
85
|
-
- **Observability:** `backend/src/shared/utils/traceId.js` for correlating workflow steps
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## What you add
|
|
90
|
-
|
|
91
|
-
- Domain modules under `backend/src/modules/<name>/` and `frontend/src/modules/<name>/`
|
|
92
|
-
- Prompts in each module’s `prompts/`
|
|
93
|
-
- Optional `evals/golden/{caseId}/` when you have curated expected JSON for regression
|
|
94
|
-
- Runtime data under `data/` (gitignored by default)
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Architecture checks
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
npm run test:ci # recommended before push
|
|
102
|
-
npm run lint:architecture
|
|
103
|
-
npm run test:evals # module example eval runners (offline)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
52
|
## License & attribution
|
|
109
53
|
|
|
110
|
-
|
|
111
|
-
and [NOTICE](NOTICE)). **Keep attribution** in README or NOTICE if you retain
|
|
112
|
-
those files. Application code you write is yours.
|
|
113
|
-
|
|
114
|
-
Full terms: [create-modular-monolith/LICENSE](https://github.com/Pukujan/create-modular-monolith/blob/main/LICENSE)
|
|
54
|
+
Platform files from [@pukujan/create-modular-monolith](https://github.com/Pukujan/create-modular-monolith). See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"lint:layers": "node scripts/check-module-layers.mjs",
|
|
11
11
|
"lint:api-docs": "node ../scripts/check-api-docs.mjs",
|
|
12
12
|
"lint:architecture": "npm run lint:boundaries && npm run lint:layers && npm run lint:api-docs",
|
|
13
|
-
"test": "node --test
|
|
13
|
+
"test": "node --test",
|
|
14
14
|
"condense-models": "node ../scripts/condense-models.mjs",
|
|
15
15
|
"condense-prompts": "node ../scripts/condense-prompts.mjs",
|
|
16
16
|
"condense-file-structure": "node ../scripts/condense-file-structure.mjs",
|