-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackages.json
More file actions
542 lines (542 loc) · 20.6 KB
/
Copy pathpackages.json
File metadata and controls
542 lines (542 loc) · 20.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
{
"schemaVersion": 1,
"$comment": [
"The authoritative package catalog: one entry per workspace package, giving it",
"exactly one role, an explicit dependency contract, and an explicit statement of",
"what it must never do.",
"",
"Why this exists",
"---------------",
"The dependency direction was already correct and already enforced -- but only",
"pairwise, by hand-written rules in tools/validate-boundaries.mjs section 10",
"('application must not import cli', 'mcp must not import cli', ...). Adding a",
"package meant remembering to hand-write its rules, and nothing said what a",
"package was FOR. Three properties were therefore unenforced: no cycle check, no",
"general rule that a layer may only depend downward, and no guard against",
"importing another package's internals.",
"",
"This catalog states those properties as data. tools/validate-packages.mjs",
"derives the checks from it, so the guarantees hold for every package including",
"ones added later.",
"",
"IMPORTANT: this file does not describe a repair. The v0.5.4 audit found the",
"graph already cycle-free, no cross-package deep `src/` imports anywhere, and",
"@oh-my-pm/contracts already dependency-free. The catalog LOCKS IN that",
"structure; it did not create it.",
"",
"Fields, per entry:",
"",
" role the single architectural role. Layer order is the `layers`",
" array below: a package may depend only on its own layer or a",
" LOWER one, which is what makes the direction mechanical",
" rather than a list of pairs.",
"",
" allowed workspace packages this package may declare as production",
" dependencies. Anything outside this set is a violation even if",
" the layer order would permit it, so a package cannot quietly",
" widen its surface.",
"",
" forbidden packages this package must never depend on OR import, called",
" out explicitly because these are the inversions that would",
" break the architecture rather than merely surprise a reader.",
"",
" sideEffects which process-level effects the package may perform.",
" `stdout`/`stderr`/`exit` are reserved for presentation and",
" executable boundaries; a package below the presentation",
" layer writing to a stream makes it unusable by a second",
" surface.",
"",
" inBundle whether the release bundler deploys this package's code.",
" Verified against a real built bundle, not assumed.",
"",
" dataOwnership what state the package is authoritative for; `none` means it",
" owns no persistent state.",
"",
" testOwnership where the package's behaviour is verified."
],
"layers": [
"contract",
"capability",
"composition",
"orchestration",
"application",
"presentation",
"packaging",
"development"
],
"$layerComment": [
"Ordered lowest to highest. A package may depend on its own layer or any",
"layer to its LEFT, never to its right. `development` is highest so nothing",
"can depend on it.",
"",
"These names describe THIS graph rather than importing a generic",
"domain/infrastructure split, which does not fit: `providers` owns both the",
"network boundary and the ProviderRegistry abstraction that `planner` is",
"written against, so neither is cleanly 'above' the other under the usual",
"convention. Ranking by actual longest dependency path gives an unambiguous",
"order, and each name states the job of that rank:",
"",
" contract shared shapes and owned local state, no workspace deps",
" (contracts, project-memory)",
" capability a single self-contained capability over the contracts",
" (kernel, providers, skills)",
" composition combines capabilities without orchestrating a request",
" (planner, installer)",
" orchestration sequences capabilities into a request/response flow",
" (runtime)",
" application the shared use cases every surface consumes (application)",
" presentation an adapter over the application boundary (cli, mcp-server)",
" packaging the release dependency surface and entrypoints",
" (distribution)",
" development harnesses that ship no code (examples)",
"",
"`project-memory` sits at `contract` because it declares no workspace",
"dependency at all: it owns the store format the way contracts owns the",
"shared shapes. `kernel` is a capability, not infrastructure -- it is the",
"pure Rust/WASM control plane, and WASM instantiation is an implementation",
"detail of that same package."
],
"packages": [
{
"name": "@oh-my-pm/contracts",
"path": "contracts",
"role": "contract",
"responsibilities": [
"own the shared data shapes for the whole workspace",
"own the generated TypeScript and Rust contract output",
"own the schema that both generated forms derive from"
],
"nonResponsibilities": [
"execute a workflow",
"read or write the filesystem",
"know any provider, runtime, or presentation concept"
],
"entryPoints": ["."],
"allowed": [],
"forbidden": [
"@oh-my-pm/application",
"@oh-my-pm/runtime",
"@oh-my-pm/planner",
"@oh-my-pm/providers",
"@oh-my-pm/skills",
"@oh-my-pm/project-memory",
"@oh-my-pm/kernel",
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/installer",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": [],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "generated contract shapes and their schemaVersion values",
"testOwnership": "contracts/test"
},
{
"name": "@oh-my-pm/project-memory",
"path": "project-memory",
"role": "contract",
"responsibilities": [
"own the local Project Brain record store format",
"own snapshot capture, comparison, and chronology semantics",
"own the store-format version and its migration rules"
],
"nonResponsibilities": [
"decide when a capture happens",
"render a report",
"reach the network"
],
"entryPoints": ["."],
"allowed": [],
"forbidden": [
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/application",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": ["filesystem-scoped-write"],
"dataOwnership": "the local Project Memory store (store format 2)",
"inBundle": true,
"compatibility": "store format version and record envelope shapes",
"testOwnership": "project-memory/test"
},
{
"name": "@oh-my-pm/kernel",
"path": "kernel/binding",
"role": "capability",
"responsibilities": [
"expose the pure Rust/WASM control plane to TypeScript",
"own validation, state, feature-flag, and update-safety decisions",
"own the generated WASM binding surface"
],
"nonResponsibilities": [
"read configuration",
"perform I/O of its own",
"know a provider or a presentation surface"
],
"entryPoints": ["."],
"allowed": ["@oh-my-pm/contracts"],
"forbidden": [
"@oh-my-pm/application",
"@oh-my-pm/runtime",
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": [],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "kernel API surface and the Rust crate version",
"testOwnership": "kernel/binding/test plus the Rust crate's own tests"
},
{
"name": "@oh-my-pm/providers",
"path": "providers",
"role": "capability",
"responsibilities": [
"own read-only context acquisition from local and GitHub sources",
"own the single GitHub network boundary (github/transport.ts)",
"normalize provider items into the shared shape"
],
"nonResponsibilities": [
"write to any external system",
"read environment variables",
"decide which workflow runs"
],
"entryPoints": ["."],
"allowed": ["@oh-my-pm/contracts"],
"forbidden": [
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/application",
"@oh-my-pm/runtime",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": ["network-explicit-opt-in"],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "provider identifiers, normalized item shape, and config schema",
"testOwnership": "providers/test"
},
{
"name": "@oh-my-pm/skills",
"path": "skills",
"role": "capability",
"responsibilities": [
"own deterministic project-management transformations",
"own the skill registry and its envelopes"
],
"nonResponsibilities": [
"acquire context",
"perform I/O",
"depend on wall-clock time or randomness"
],
"entryPoints": ["."],
"allowed": ["@oh-my-pm/contracts"],
"forbidden": [
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/application",
"@oh-my-pm/runtime",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": [],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "skill identifiers and envelope shapes",
"testOwnership": "skills/test"
},
{
"name": "@oh-my-pm/planner",
"path": "planner",
"role": "composition",
"responsibilities": ["own task planning and dependency shaping over provider items"],
"nonResponsibilities": ["acquire context itself", "render output", "perform I/O"],
"entryPoints": ["."],
"allowed": ["@oh-my-pm/contracts", "@oh-my-pm/providers"],
"forbidden": [
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/application",
"@oh-my-pm/runtime",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": [],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "task graph shapes",
"testOwnership": "planner/test"
},
{
"name": "@oh-my-pm/runtime",
"path": "runtime",
"role": "orchestration",
"responsibilities": [
"own request orchestration and execution flow",
"sequence Kernel validation, provider acquisition, planning, and skills",
"produce a RuntimeResponse"
],
"nonResponsibilities": [
"parse arguments",
"render terminal or protocol output",
"choose an exit code"
],
"entryPoints": ["."],
"allowed": [
"@oh-my-pm/contracts",
"@oh-my-pm/kernel",
"@oh-my-pm/planner",
"@oh-my-pm/providers",
"@oh-my-pm/skills"
],
"forbidden": [
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/application",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": [],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "RuntimeRequest and RuntimeResponse shapes",
"testOwnership": "runtime/test",
"$devDependencyComment": [
"@oh-my-pm/project-memory is a DEV dependency only: the runtime's",
"project_changes tests exercise real store fixtures, while the runtime",
"itself must not import the store. The boundary validator asserts the",
"production direction, so this dev edge cannot become a runtime one."
]
},
{
"name": "@oh-my-pm/application",
"path": "application",
"role": "application",
"responsibilities": [
"own the shared use cases every presentation surface consumes",
"own workflow sequencing, failure classification, and result contracts",
"own the presentation-neutral response projection"
],
"nonResponsibilities": [
"parse argv or produce help",
"write to a stream or choose an exit code",
"know an executable name, an MCP tool, or a terminal output mode",
"start a server"
],
"entryPoints": [".", "./node"],
"allowed": [
"@oh-my-pm/contracts",
"@oh-my-pm/kernel",
"@oh-my-pm/project-memory",
"@oh-my-pm/providers",
"@oh-my-pm/runtime",
"@oh-my-pm/skills"
],
"forbidden": [
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/installer",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": ["filesystem-read-via-node-entrypoint"],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "ApplicationResult, Diagnostic, error taxonomy, and use-case signatures",
"testOwnership": "application/test"
},
{
"name": "@oh-my-pm/installer",
"path": "installer",
"role": "composition",
"responsibilities": [
"own the deterministic installation and update lifecycle",
"own manifest validation, install/update/rollback planning and reports",
"own real transactional installation into an explicit prefix"
],
"nonResponsibilities": [
"download an artifact or make any network request",
"read an environment-derived prefix",
"edit PATH, a shell profile, or an MCP client configuration",
"write outside the explicit prefix"
],
"entryPoints": ["."],
"allowed": ["@oh-my-pm/contracts", "@oh-my-pm/kernel"],
"forbidden": [
"@oh-my-pm/cli",
"@oh-my-pm/mcp-server",
"@oh-my-pm/application",
"@oh-my-pm/runtime",
"@oh-my-pm/providers",
"@oh-my-pm/distribution",
"@oh-my-pm/examples"
],
"sideEffects": ["filesystem-scoped-write"],
"dataOwnership": "the installed prefix layout and install.json",
"inBundle": true,
"compatibility": "install manifest shape and installed layout",
"testOwnership": "installer/test"
},
{
"name": "@oh-my-pm/cli",
"path": "cli",
"role": "presentation",
"responsibilities": [
"own the command grammar, parsing, and help",
"own terminal formatting, output-mode selection, and stream routing",
"own the CLI exit-code mapping",
"compose the local runtime identity for the status/doctor/plan commands"
],
"nonResponsibilities": [
"own shared business logic any other surface needs",
"be imported by another presentation surface"
],
"entryPoints": ["."],
"allowed": [
"@oh-my-pm/application",
"@oh-my-pm/contracts",
"@oh-my-pm/installer",
"@oh-my-pm/kernel",
"@oh-my-pm/project-memory",
"@oh-my-pm/providers",
"@oh-my-pm/runtime",
"@oh-my-pm/skills"
],
"forbidden": ["@oh-my-pm/mcp-server", "@oh-my-pm/distribution", "@oh-my-pm/examples"],
"sideEffects": ["stdout", "stderr", "exit", "filesystem-read"],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "command surface, flags, output formats, and exit codes",
"testOwnership": "cli/test",
"$asymmetryComment": [
"The CLI declares runtime/providers/skills/kernel while the MCP server",
"reaches the shared project workflows through @oh-my-pm/application. That",
"is INTENTIONAL, not residual duplication: cli/src/local-process.ts",
"composes a local Runtime for `status`, `doctor`, and `plan`, which are",
"runtime-identity and free-form planning commands the application boundary",
"does not expose and that no second surface consumes. The four SHARED",
"project workflows (brief/risks/next/handoff) go through the application",
"boundary on both surfaces, and tests/e2e asserts they agree semantically.",
"Until v0.6.1 that last sentence was aspirational: the CLI called only the",
"shared document loader and then re-composed the Runtime, provider, and",
"Kernel itself, so the two surfaces shared one step of the pipeline rather",
"than all of it. The CLI now calls runLocalProjectWorkflow directly, and",
"tools/validate-application-boundary.mjs fails if either half of the claim",
"stops holding -- a shared workflow re-composed per surface, or a CLI-only",
"command pushed through the boundary for symmetry alone.",
"@oh-my-pm/project-memory is a production dependency so it ships in the",
"bundle, while being reached only through a lazy dynamic import;",
"cli/test/memory-boundary.test.ts enforces both halves."
]
},
{
"name": "@oh-my-pm/mcp-server",
"path": "mcp-server",
"role": "presentation",
"responsibilities": [
"own MCP tool registration, input schemas, and annotations",
"own strict source projection and structured content",
"own protocol stdout safety and the MCP error mapping"
],
"nonResponsibilities": [
"own shared business logic any other surface needs",
"depend on CLI error rendering",
"expose an HTTP or SSE transport",
"register a write tool"
],
"entryPoints": ["."],
"allowed": [
"@oh-my-pm/application",
"@oh-my-pm/contracts",
"@oh-my-pm/kernel",
"@oh-my-pm/project-memory",
"@oh-my-pm/providers",
"@oh-my-pm/runtime",
"@oh-my-pm/skills"
],
"forbidden": ["@oh-my-pm/cli", "@oh-my-pm/distribution", "@oh-my-pm/examples"],
"sideEffects": ["stdout-protocol-only", "stderr", "exit", "filesystem-read"],
"dataOwnership": "none",
"inBundle": true,
"compatibility": "MCP tool inventory, order, input schemas, and annotations",
"testOwnership": "mcp-server/test"
},
{
"name": "@oh-my-pm/distribution",
"path": "distribution",
"role": "packaging",
"responsibilities": [
"declare the production dependency surface the release bundler deploys",
"provide the thin portable command entrypoints, canonical and alias"
],
"nonResponsibilities": [
"contain build logic or a repository path",
"become a dependency of any domain or application package",
"write files or reach the network"
],
"entryPoints": [],
"allowed": [
"@oh-my-pm/cli",
"@oh-my-pm/kernel",
"@oh-my-pm/mcp-server",
"@oh-my-pm/providers",
"@oh-my-pm/runtime",
"@oh-my-pm/skills"
],
"forbidden": ["@oh-my-pm/examples"],
"sideEffects": ["stdout", "stderr", "exit"],
"dataOwnership": "none",
"inBundle": false,
"$inBundleComment": [
"The bundle IS this package's entrypoints plus the deployed dependency",
"tree, so it is not itself a nested node_modules entry. Verified against a",
"real built bundle: node_modules/@oh-my-pm contains the eleven deployed",
"packages, and distribution is not among them."
],
"compatibility": "installed command names and entrypoint paths",
"testOwnership": "distribution/libexec plus the release qualification tooling"
},
{
"name": "@oh-my-pm/examples",
"path": "examples",
"role": "development",
"responsibilities": [
"wire the real packages together so each documented composition is tested",
"own the Markdown project fixtures the installed qualification analyzes"
],
"nonResponsibilities": [
"be imported by any shipped package",
"contribute to the release dependency graph",
"be the only place a behaviour is verified"
],
"entryPoints": ["."],
"allowed": [
"@oh-my-pm/cli",
"@oh-my-pm/contracts",
"@oh-my-pm/installer",
"@oh-my-pm/kernel",
"@oh-my-pm/mcp-server",
"@oh-my-pm/providers",
"@oh-my-pm/runtime",
"@oh-my-pm/skills"
],
"forbidden": ["@oh-my-pm/distribution"],
"sideEffects": ["stdout", "filesystem-read"],
"dataOwnership": "none",
"inBundle": false,
"$inBundleComment": [
"None of this package's CODE ships. Its fixtures/markdown-project/ tree is",
"copied into the bundle as the sample project, which is data, not a",
"dependency edge."
],
"compatibility": "none \u2014 no public surface",
"testOwnership": "examples/test"
}
]
}