@cleocode/contracts 2026.5.101 → 2026.5.102
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/dist/boundary.d.ts +166 -0
- package/dist/boundary.d.ts.map +1 -0
- package/dist/boundary.js +663 -0
- package/dist/boundary.js.map +1 -0
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +53 -0
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/doctor.d.ts +76 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/errors.d.ts +54 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +44 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/operations/tasks.d.ts +91 -0
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/worktree.d.ts +30 -0
- package/dist/operations/worktree.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/boundary.ts +875 -0
- package/src/dispatch/operations-registry.ts +55 -0
- package/src/doctor.ts +84 -0
- package/src/errors.ts +61 -0
- package/src/index.ts +21 -0
- package/src/operations/tasks.ts +96 -0
- package/src/operations/worktree.ts +30 -0
package/src/boundary.ts
ADDED
|
@@ -0,0 +1,875 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boundary Registry — SSoT for per-module Rust/TS layering decisions across cleocode.
|
|
3
|
+
*
|
|
4
|
+
* Every module (crate, package, harness adapter, archived target) declares a
|
|
5
|
+
* {@link BoundaryEntry} in {@link BOUNDARY_REGISTRY}. CI gates (lint-boundary-registry,
|
|
6
|
+
* lint-dual-implementation, perf-budget bench gate) validate the registry against
|
|
7
|
+
* filesystem reality and enforce declared budgets at build time.
|
|
8
|
+
*
|
|
9
|
+
* Intent is expressed along two axes: workload shape ({@link WorkloadIntent}) and
|
|
10
|
+
* quantitative {@link PerfBudget} / {@link SafetyBudget} thresholds. The pair derives
|
|
11
|
+
* the language choice mechanically — it is not an aesthetic call.
|
|
12
|
+
*
|
|
13
|
+
* The registry is **static-with-amendment**: declared at module creation; subsequent
|
|
14
|
+
* changes require an ADR amendment + PR. This data file is populated by T10197;
|
|
15
|
+
* gates land in T10198 / T10199.
|
|
16
|
+
*
|
|
17
|
+
* @see ADR-078 — Boundary Registry as SSoT for Rust/TS layering
|
|
18
|
+
* @see D010 — vendor worktrunk → crates/worktrunk-core (reference impl)
|
|
19
|
+
* @see Saga T10176 (SG-BOUNDARY-REGISTRY)
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// ============================================================
|
|
23
|
+
// Workload intent — the qualitative axis
|
|
24
|
+
// ============================================================
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Workload shape declaration for a module. Derived from what the code DOES,
|
|
28
|
+
* not from what convention says it should look like.
|
|
29
|
+
*
|
|
30
|
+
* - `cpu-bound` — Hot path; Rust required (parsing, graph ops, vector math, FFI hot loops).
|
|
31
|
+
* - `io-coordination` — Event-loop-friendly orchestration; TS preferred (async I/O glue, fetch/DB orchestration).
|
|
32
|
+
* - `ffi-surface` — Multi-runtime consumers; Rust core + napi binding (publishable as a Rust lib).
|
|
33
|
+
* - `orchestration-glue` — TS-only (CLI dispatch, agent harness, lifecycle hooks).
|
|
34
|
+
* - `data-manifest` — TS-only zero-dep config or registry data (no logic).
|
|
35
|
+
* - `harness-adapter` — TS-only provider-specific glue (claude-code, gemini, openai bridges).
|
|
36
|
+
* - `frontend` — SvelteKit / browser code; TS always.
|
|
37
|
+
* - `scaffold-pending-consumer` — Rust impl exists but has no consumer yet; {@link BoundaryEntry.plannedConsumerEta} REQUIRED.
|
|
38
|
+
* - `migration-pending` — Currently lives here; destination declared in {@link BoundaryEntry.canonicalHome}.
|
|
39
|
+
* - `migrated-out` — Reference-only entry pointing to the new external canonical home.
|
|
40
|
+
*
|
|
41
|
+
* @see ADR-078 §"Two-axis intent system"
|
|
42
|
+
*/
|
|
43
|
+
export type WorkloadIntent =
|
|
44
|
+
| 'cpu-bound'
|
|
45
|
+
| 'io-coordination'
|
|
46
|
+
| 'ffi-surface'
|
|
47
|
+
| 'orchestration-glue'
|
|
48
|
+
| 'data-manifest'
|
|
49
|
+
| 'harness-adapter'
|
|
50
|
+
| 'frontend'
|
|
51
|
+
| 'scaffold-pending-consumer'
|
|
52
|
+
| 'migration-pending'
|
|
53
|
+
| 'migrated-out';
|
|
54
|
+
|
|
55
|
+
// ============================================================
|
|
56
|
+
// Performance budget — the quantitative latency / footprint axis
|
|
57
|
+
// ============================================================
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Throughput threshold expressed as a unit + value pair (e.g. `{ unit: 'ops/s', value: 5000 }`).
|
|
61
|
+
*
|
|
62
|
+
* @see PerfBudget.throughput_min
|
|
63
|
+
*/
|
|
64
|
+
export interface ThroughputThreshold {
|
|
65
|
+
/** Throughput unit string (e.g. `'ops/s'`, `'bytes/s'`, `'rows/s'`). */
|
|
66
|
+
unit: string;
|
|
67
|
+
/** Minimum acceptable value in `unit`. CI fails if a measured bench is below this. */
|
|
68
|
+
value: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Declared performance ceiling for a module. CI perf-budget gate fails the build when a
|
|
73
|
+
* criterion bench measures p50/p99/throughput/memory/startup outside these thresholds.
|
|
74
|
+
* Each field is optional — modules declare only what they care about.
|
|
75
|
+
*
|
|
76
|
+
* A TS module exceeding its `latency_p50_ms` is auto-flagged as a Rust-port candidate.
|
|
77
|
+
*
|
|
78
|
+
* @see ADR-078 §"Two-axis intent system"
|
|
79
|
+
*/
|
|
80
|
+
export interface PerfBudget {
|
|
81
|
+
/** Hard ceiling on median (p50) operation latency in milliseconds. */
|
|
82
|
+
latency_p50_ms?: number;
|
|
83
|
+
/** Hard ceiling on tail (p99) operation latency in milliseconds. */
|
|
84
|
+
latency_p99_ms?: number;
|
|
85
|
+
/** Minimum sustained throughput the module must meet. */
|
|
86
|
+
throughput_min?: ThroughputThreshold;
|
|
87
|
+
/** Hard ceiling on resident memory in megabytes. */
|
|
88
|
+
memory_max_mb?: number;
|
|
89
|
+
/** Hard ceiling on cold startup time in milliseconds. */
|
|
90
|
+
startup_max_ms?: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ============================================================
|
|
94
|
+
// Safety budget — the qualitative behavioral / sandbox axis
|
|
95
|
+
// ============================================================
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Declared safety posture for a module. Each axis is enforced by a corresponding lint
|
|
99
|
+
* or static-analysis gate (e.g. `cargo clippy -D clippy::panic` for `panic_unwind: 'forbidden'`).
|
|
100
|
+
*
|
|
101
|
+
* A Rust module whose `panic_unwind` is `'forbidden'` MUST NOT compile with any reachable
|
|
102
|
+
* `panic!()` / `unwrap()` / `expect()` outside test code.
|
|
103
|
+
*
|
|
104
|
+
* @see ADR-078 §"Two-axis intent system"
|
|
105
|
+
*/
|
|
106
|
+
export interface SafetyBudget {
|
|
107
|
+
/**
|
|
108
|
+
* Whether the module may panic.
|
|
109
|
+
* - `'forbidden'` — no reachable panic in production code paths (enforced via clippy).
|
|
110
|
+
* - `'allowed-with-recovery'` — panics permitted IFF the caller installs a recovery boundary.
|
|
111
|
+
*/
|
|
112
|
+
panic_unwind?: 'forbidden' | 'allowed-with-recovery';
|
|
113
|
+
/**
|
|
114
|
+
* Whether the module may escape its declared filesystem root.
|
|
115
|
+
* - `'forbidden'` — operations confined to the declared root (path-jail enforced).
|
|
116
|
+
* - `'allowed-with-justification'` — root escapes permitted with documented rationale + audit log.
|
|
117
|
+
*/
|
|
118
|
+
root_escape?: 'forbidden' | 'allowed-with-justification';
|
|
119
|
+
/**
|
|
120
|
+
* Whether the module may originate outbound network traffic.
|
|
121
|
+
* - `'allowed'` — egress permitted.
|
|
122
|
+
* - `'sandbox-required'` — must run under a network-blocking sandbox in production.
|
|
123
|
+
*/
|
|
124
|
+
network_egress?: 'allowed' | 'sandbox-required';
|
|
125
|
+
/**
|
|
126
|
+
* Whether the module may write outside its declared root.
|
|
127
|
+
* - `'forbidden'` — writes outside root are a hard error.
|
|
128
|
+
* - `'audited'` — writes permitted but must be appended to the audit log.
|
|
129
|
+
*/
|
|
130
|
+
fs_writes_outside_root?: 'forbidden' | 'audited';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ============================================================
|
|
134
|
+
// Canonical home — where the module actually lives
|
|
135
|
+
// ============================================================
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Declared canonical home for a module. Modules that don't live in cleocode (e.g.
|
|
139
|
+
* signaldock-* modules migrating to `/mnt/projects/signaldock/`, or signaldock-runtime
|
|
140
|
+
* at a standalone repo) appear in this registry ONLY as a reference pointer via the
|
|
141
|
+
* `{ external: string }` variant.
|
|
142
|
+
*
|
|
143
|
+
* @see ADR-078 §"Canonical homes recorded explicitly"
|
|
144
|
+
*/
|
|
145
|
+
export type CanonicalHome =
|
|
146
|
+
| 'cleocode'
|
|
147
|
+
| 'signaldock-monorepo'
|
|
148
|
+
| 'signaldock-runtime-repo'
|
|
149
|
+
| 'archived'
|
|
150
|
+
| { external: string };
|
|
151
|
+
|
|
152
|
+
// ============================================================
|
|
153
|
+
// Boundary entry — one row per module
|
|
154
|
+
// ============================================================
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* One row in {@link BOUNDARY_REGISTRY}. Declares per-module Rust/TS layering intent,
|
|
158
|
+
* canonical home, and perf/safety budgets. CI gates derived from these rows reject
|
|
159
|
+
* orphan modules, modules whose implementation contradicts the declared `intent`,
|
|
160
|
+
* and dual implementations (Rust + TS shipping the same primitive).
|
|
161
|
+
*
|
|
162
|
+
* `plannedConsumerEta` is REQUIRED when `intent === 'scaffold-pending-consumer'`.
|
|
163
|
+
*
|
|
164
|
+
* @see ADR-078 §"Registry shape"
|
|
165
|
+
*/
|
|
166
|
+
export interface BoundaryEntry {
|
|
167
|
+
/** Stable module identifier (e.g. `'worktree'`, `'cant'`, `'lafs'`). One word, kebab-case. */
|
|
168
|
+
module: string;
|
|
169
|
+
/** Declared workload intent — see {@link WorkloadIntent}. */
|
|
170
|
+
intent: WorkloadIntent;
|
|
171
|
+
/** Path to `crates/<X>-core` (if a Rust core exists). Relative to repo root. */
|
|
172
|
+
rustCore?: string;
|
|
173
|
+
/** Path to `crates/<X>-napi` (if a napi binding exists). Relative to repo root. */
|
|
174
|
+
napiBinding?: string;
|
|
175
|
+
/** Path to `packages/<X>` (if a TS wrapper / package exists). Relative to repo root. */
|
|
176
|
+
tsWrapper?: string;
|
|
177
|
+
/** Where the module canonically lives — see {@link CanonicalHome}. */
|
|
178
|
+
canonicalHome: CanonicalHome;
|
|
179
|
+
/** Declared performance ceiling — see {@link PerfBudget}. */
|
|
180
|
+
perfBudget: PerfBudget;
|
|
181
|
+
/** Declared safety posture — see {@link SafetyBudget}. */
|
|
182
|
+
safetyBudget: SafetyBudget;
|
|
183
|
+
/** ADR slugs that have touched this entry (e.g. `['adr-077-worktreeinclude', 'adr-078-boundary-registry']`). */
|
|
184
|
+
amendments: string[];
|
|
185
|
+
/** 1-3 sentence rationale for the per-module decision. Required even for migrated-out entries. */
|
|
186
|
+
rationale: string;
|
|
187
|
+
/** ISO date (YYYY-MM-DD). REQUIRED when `intent === 'scaffold-pending-consumer'`; ignored otherwise. */
|
|
188
|
+
plannedConsumerEta?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// ============================================================
|
|
192
|
+
// Registry — populated by T10197 from the verified decision matrices
|
|
193
|
+
// ============================================================
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Canonical Boundary Registry for cleocode. Skeleton shipped in T10196; populated
|
|
197
|
+
* with per-module entries by T10197 from the verified decision matrices
|
|
198
|
+
* (`sg-boundary-crates-decision-matrix` + `sg-boundary-packages-decision-matrix`).
|
|
199
|
+
* CI gates over this data ship in T10198 / T10199.
|
|
200
|
+
*
|
|
201
|
+
* Entry order: crates first (19 entries), then packages (20 entries). Within each
|
|
202
|
+
* group entries are alphabetical by `module` for diff-friendliness.
|
|
203
|
+
*
|
|
204
|
+
* Entries are added/modified ONLY via ADR amendment + PR per the static-with-amendment
|
|
205
|
+
* policy declared in ADR-078.
|
|
206
|
+
*
|
|
207
|
+
* @see ADR-078 — Boundary Registry as SSoT for Rust/TS layering
|
|
208
|
+
*/
|
|
209
|
+
export const BOUNDARY_REGISTRY: readonly BoundaryEntry[] = [
|
|
210
|
+
// ============================================================
|
|
211
|
+
// Crates (19 entries) — from sg-boundary-crates-decision-matrix
|
|
212
|
+
// ============================================================
|
|
213
|
+
|
|
214
|
+
{
|
|
215
|
+
module: 'cant-core',
|
|
216
|
+
intent: 'cpu-bound',
|
|
217
|
+
rustCore: 'crates/cant-core',
|
|
218
|
+
tsWrapper: 'packages/cant',
|
|
219
|
+
canonicalHome: 'cleocode',
|
|
220
|
+
perfBudget: {
|
|
221
|
+
latency_p50_ms: 5,
|
|
222
|
+
latency_p99_ms: 50,
|
|
223
|
+
},
|
|
224
|
+
safetyBudget: {
|
|
225
|
+
panic_unwind: 'forbidden',
|
|
226
|
+
root_escape: 'forbidden',
|
|
227
|
+
},
|
|
228
|
+
amendments: [],
|
|
229
|
+
rationale:
|
|
230
|
+
'Cant parser/compiler (19,002 LOC) — CPU-bound hot path consumed by cant-runtime, cant-lsp, cant-napi, signaldock-protocol, signaldock-sdk, integration-tests, and via napi from packages/cant. Flip publish=true to expose as a Rust SDK for external consumers.',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
module: 'cant-lsp',
|
|
234
|
+
intent: 'cpu-bound',
|
|
235
|
+
rustCore: 'crates/cant-lsp',
|
|
236
|
+
canonicalHome: 'cleocode',
|
|
237
|
+
perfBudget: {
|
|
238
|
+
latency_p50_ms: 50,
|
|
239
|
+
latency_p99_ms: 500,
|
|
240
|
+
startup_max_ms: 200,
|
|
241
|
+
},
|
|
242
|
+
safetyBudget: {
|
|
243
|
+
panic_unwind: 'forbidden',
|
|
244
|
+
root_escape: 'forbidden',
|
|
245
|
+
},
|
|
246
|
+
amendments: [],
|
|
247
|
+
rationale:
|
|
248
|
+
'Cant Language Server Protocol binary (1,935 LOC) invoked by editors. Internal-only: publish=false since it ships as a binary, not a library consumed by other crates.',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
module: 'cant-napi',
|
|
252
|
+
intent: 'ffi-surface',
|
|
253
|
+
napiBinding: 'crates/cant-napi',
|
|
254
|
+
tsWrapper: 'packages/cant',
|
|
255
|
+
canonicalHome: 'cleocode',
|
|
256
|
+
perfBudget: {
|
|
257
|
+
latency_p50_ms: 5,
|
|
258
|
+
latency_p99_ms: 50,
|
|
259
|
+
startup_max_ms: 100,
|
|
260
|
+
},
|
|
261
|
+
safetyBudget: {
|
|
262
|
+
panic_unwind: 'allowed-with-recovery',
|
|
263
|
+
root_escape: 'forbidden',
|
|
264
|
+
},
|
|
265
|
+
amendments: [],
|
|
266
|
+
rationale:
|
|
267
|
+
'napi binding shim (736 LOC) for cant-core. Loaded via packages/cant/src/native-loader.ts and packages/core/src/system/dependencies.ts. Internal-only — shipped via per-platform packages/cant-napi-* npm packages, not crates.io.',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
module: 'cant-router',
|
|
271
|
+
intent: 'cpu-bound',
|
|
272
|
+
rustCore: 'crates/cant-router',
|
|
273
|
+
canonicalHome: 'cleocode',
|
|
274
|
+
perfBudget: {
|
|
275
|
+
latency_p50_ms: 5,
|
|
276
|
+
latency_p99_ms: 50,
|
|
277
|
+
},
|
|
278
|
+
safetyBudget: {
|
|
279
|
+
panic_unwind: 'forbidden',
|
|
280
|
+
root_escape: 'forbidden',
|
|
281
|
+
},
|
|
282
|
+
amendments: [],
|
|
283
|
+
rationale:
|
|
284
|
+
'Cant Router (984 LOC) — CPU-bound dispatch consumed by cant-napi and integration-tests. Flip publish=true: useful externally for cant ecosystem consumers.',
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
module: 'cant-runtime',
|
|
288
|
+
intent: 'cpu-bound',
|
|
289
|
+
rustCore: 'crates/cant-runtime',
|
|
290
|
+
canonicalHome: 'cleocode',
|
|
291
|
+
perfBudget: {
|
|
292
|
+
latency_p50_ms: 5,
|
|
293
|
+
latency_p99_ms: 50,
|
|
294
|
+
},
|
|
295
|
+
safetyBudget: {
|
|
296
|
+
panic_unwind: 'forbidden',
|
|
297
|
+
root_escape: 'forbidden',
|
|
298
|
+
},
|
|
299
|
+
amendments: [],
|
|
300
|
+
rationale:
|
|
301
|
+
'Cant runtime / pipeline orchestration (1,221 LOC) consumed by cant-napi. Partial TS parallel impl exists; Rust is canonical. Flip publish=true to ship alongside cant-core.',
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
module: 'cleo-llm-native',
|
|
305
|
+
intent: 'migration-pending',
|
|
306
|
+
rustCore: 'crates/cleo-llm-native',
|
|
307
|
+
canonicalHome: 'archived',
|
|
308
|
+
perfBudget: {
|
|
309
|
+
latency_p50_ms: 5,
|
|
310
|
+
latency_p99_ms: 50,
|
|
311
|
+
},
|
|
312
|
+
safetyBudget: {
|
|
313
|
+
panic_unwind: 'forbidden',
|
|
314
|
+
root_escape: 'forbidden',
|
|
315
|
+
},
|
|
316
|
+
amendments: ['adr-078-boundary-registry'],
|
|
317
|
+
rationale:
|
|
318
|
+
'Verified-dead code: 531 LOC Rust crate referenced ONLY by packages/core/src/llm/rust/__tests__/. Production transports (chat-completions/gemini/openai) import StreamingThinkScrubber from the TS think-scrubber.js path. CLEO_USE_RUST gate is never set in any workflow. Scheduled for deletion in T10205; see ADR-078 implementation tasks.',
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
module: 'conduit-core',
|
|
322
|
+
intent: 'data-manifest',
|
|
323
|
+
rustCore: 'crates/conduit-core',
|
|
324
|
+
canonicalHome: 'cleocode',
|
|
325
|
+
perfBudget: {
|
|
326
|
+
latency_p50_ms: 10,
|
|
327
|
+
},
|
|
328
|
+
safetyBudget: {
|
|
329
|
+
panic_unwind: 'forbidden',
|
|
330
|
+
root_escape: 'forbidden',
|
|
331
|
+
},
|
|
332
|
+
amendments: [],
|
|
333
|
+
rationale:
|
|
334
|
+
'Conduit serde-types crate (681 LOC) — stable contract surface consumed by cant-core, signaldock-protocol, signaldock-core, integration-tests, AND external /mnt/projects/signaldock-core + /mnt/projects/signaldock/backend via git deps. Mirrors @cleocode/contracts/conduit.ts. Forced KEEP+publish=true: deleting breaks production, and signaldock-protocol publish requires it.',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
module: 'integration-tests',
|
|
338
|
+
intent: 'cpu-bound',
|
|
339
|
+
rustCore: 'crates/integration-tests',
|
|
340
|
+
canonicalHome: 'cleocode',
|
|
341
|
+
perfBudget: {
|
|
342
|
+
latency_p50_ms: 100,
|
|
343
|
+
latency_p99_ms: 2000,
|
|
344
|
+
},
|
|
345
|
+
safetyBudget: {
|
|
346
|
+
panic_unwind: 'allowed-with-recovery',
|
|
347
|
+
root_escape: 'forbidden',
|
|
348
|
+
},
|
|
349
|
+
amendments: [],
|
|
350
|
+
rationale:
|
|
351
|
+
'Internal Rust test harness (241 LOC) over lafs-core/conduit-core/cant-core/cant-router/signaldock-core. publish=false intentional — test code never ships.',
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
module: 'lafs-core',
|
|
355
|
+
intent: 'cpu-bound',
|
|
356
|
+
rustCore: 'crates/lafs-core',
|
|
357
|
+
tsWrapper: 'packages/lafs',
|
|
358
|
+
canonicalHome: 'cleocode',
|
|
359
|
+
perfBudget: {
|
|
360
|
+
latency_p50_ms: 5,
|
|
361
|
+
latency_p99_ms: 50,
|
|
362
|
+
},
|
|
363
|
+
safetyBudget: {
|
|
364
|
+
panic_unwind: 'forbidden',
|
|
365
|
+
root_escape: 'forbidden',
|
|
366
|
+
},
|
|
367
|
+
amendments: [],
|
|
368
|
+
rationale:
|
|
369
|
+
'LAFS envelope serialization core (1,432 LOC) consumed by conduit-core, signaldock-protocol, lafs-napi, integration-tests. Mirrors @cleocode/lafs/src/envelope.ts. Flip publish=true to expose canonical envelope spec as a Rust library.',
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
module: 'lafs-napi',
|
|
373
|
+
intent: 'ffi-surface',
|
|
374
|
+
napiBinding: 'crates/lafs-napi',
|
|
375
|
+
tsWrapper: 'packages/lafs',
|
|
376
|
+
canonicalHome: 'cleocode',
|
|
377
|
+
perfBudget: {
|
|
378
|
+
latency_p50_ms: 5,
|
|
379
|
+
latency_p99_ms: 50,
|
|
380
|
+
startup_max_ms: 100,
|
|
381
|
+
},
|
|
382
|
+
safetyBudget: {
|
|
383
|
+
panic_unwind: 'allowed-with-recovery',
|
|
384
|
+
root_escape: 'forbidden',
|
|
385
|
+
},
|
|
386
|
+
amendments: [],
|
|
387
|
+
rationale:
|
|
388
|
+
'napi binding shim (95 LOC) for lafs-core. Loaded via packages/lafs/src/native-loader.ts. Internal-only — shipped via packages/lafs-napi-* per-platform npm packages.',
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
module: 'signaldock-core',
|
|
392
|
+
intent: 'migrated-out',
|
|
393
|
+
canonicalHome: { external: '/mnt/projects/signaldock/' },
|
|
394
|
+
perfBudget: { latency_p50_ms: 10, latency_p99_ms: 100 },
|
|
395
|
+
safetyBudget: {
|
|
396
|
+
panic_unwind: 'forbidden',
|
|
397
|
+
root_escape: 'forbidden',
|
|
398
|
+
network_egress: 'allowed',
|
|
399
|
+
},
|
|
400
|
+
amendments: ['adr-078-boundary-registry'],
|
|
401
|
+
rationale:
|
|
402
|
+
'Migrated to /mnt/projects/signaldock/ via Saga T10180 (T10187). crates/signaldock-core deleted from cleocode.',
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
module: 'signaldock-payments',
|
|
406
|
+
intent: 'migrated-out',
|
|
407
|
+
canonicalHome: { external: '/mnt/projects/signaldock/' },
|
|
408
|
+
perfBudget: { latency_p50_ms: 50, latency_p99_ms: 1000 },
|
|
409
|
+
safetyBudget: {
|
|
410
|
+
panic_unwind: 'forbidden',
|
|
411
|
+
root_escape: 'forbidden',
|
|
412
|
+
network_egress: 'allowed',
|
|
413
|
+
},
|
|
414
|
+
amendments: ['adr-078-boundary-registry'],
|
|
415
|
+
rationale:
|
|
416
|
+
'Migrated to /mnt/projects/signaldock/ via Saga T10180 (T10187). crates/signaldock-payments deleted from cleocode.',
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
module: 'signaldock-protocol',
|
|
420
|
+
intent: 'migrated-out',
|
|
421
|
+
canonicalHome: { external: '/mnt/projects/signaldock/' },
|
|
422
|
+
perfBudget: { latency_p50_ms: 10 },
|
|
423
|
+
safetyBudget: { panic_unwind: 'forbidden', root_escape: 'forbidden' },
|
|
424
|
+
amendments: ['adr-078-boundary-registry'],
|
|
425
|
+
rationale:
|
|
426
|
+
'Migrated to /mnt/projects/signaldock/ via Saga T10180 (T10187). crates/signaldock-protocol deleted from cleocode.',
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
module: 'signaldock-runtime',
|
|
430
|
+
intent: 'migrated-out',
|
|
431
|
+
canonicalHome: { external: '/mnt/projects/signaldock-runtime/' },
|
|
432
|
+
perfBudget: { latency_p50_ms: 50, latency_p99_ms: 1000, startup_max_ms: 500 },
|
|
433
|
+
safetyBudget: {
|
|
434
|
+
panic_unwind: 'allowed-with-recovery',
|
|
435
|
+
root_escape: 'forbidden',
|
|
436
|
+
network_egress: 'allowed',
|
|
437
|
+
},
|
|
438
|
+
amendments: ['adr-078-boundary-registry'],
|
|
439
|
+
rationale:
|
|
440
|
+
'Migrated to /mnt/projects/signaldock-runtime/ via Saga T10180 (T10187). crates/signaldock-runtime deleted from cleocode.',
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
module: 'signaldock-sdk',
|
|
444
|
+
intent: 'migrated-out',
|
|
445
|
+
canonicalHome: { external: '/mnt/projects/signaldock/' },
|
|
446
|
+
perfBudget: { latency_p50_ms: 50, latency_p99_ms: 1000 },
|
|
447
|
+
safetyBudget: {
|
|
448
|
+
panic_unwind: 'forbidden',
|
|
449
|
+
root_escape: 'forbidden',
|
|
450
|
+
network_egress: 'allowed',
|
|
451
|
+
},
|
|
452
|
+
amendments: ['adr-078-boundary-registry'],
|
|
453
|
+
rationale:
|
|
454
|
+
'Migrated to /mnt/projects/signaldock/ via Saga T10180 (T10187). crates/signaldock-sdk deleted from cleocode.',
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
module: 'signaldock-storage',
|
|
458
|
+
intent: 'migrated-out',
|
|
459
|
+
canonicalHome: { external: '/mnt/projects/signaldock/' },
|
|
460
|
+
perfBudget: { latency_p50_ms: 10, latency_p99_ms: 100 },
|
|
461
|
+
safetyBudget: { panic_unwind: 'forbidden', root_escape: 'forbidden' },
|
|
462
|
+
amendments: ['adr-078-boundary-registry'],
|
|
463
|
+
rationale:
|
|
464
|
+
'Migrated to /mnt/projects/signaldock/ via Saga T10180 (T10187). crates/signaldock-storage deleted from cleocode.',
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
module: 'signaldock-transport',
|
|
468
|
+
intent: 'migrated-out',
|
|
469
|
+
canonicalHome: { external: '/mnt/projects/signaldock/' },
|
|
470
|
+
perfBudget: { latency_p50_ms: 50, latency_p99_ms: 1000 },
|
|
471
|
+
safetyBudget: {
|
|
472
|
+
panic_unwind: 'forbidden',
|
|
473
|
+
root_escape: 'forbidden',
|
|
474
|
+
network_egress: 'allowed',
|
|
475
|
+
},
|
|
476
|
+
amendments: ['adr-078-boundary-registry'],
|
|
477
|
+
rationale:
|
|
478
|
+
'Migrated to /mnt/projects/signaldock/ via Saga T10180 (T10187). crates/signaldock-transport deleted from cleocode.',
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
module: 'worktree-napi',
|
|
482
|
+
intent: 'ffi-surface',
|
|
483
|
+
napiBinding: 'crates/worktree-napi',
|
|
484
|
+
tsWrapper: 'packages/worktree',
|
|
485
|
+
canonicalHome: 'cleocode',
|
|
486
|
+
perfBudget: {
|
|
487
|
+
latency_p50_ms: 5,
|
|
488
|
+
latency_p99_ms: 50,
|
|
489
|
+
startup_max_ms: 100,
|
|
490
|
+
},
|
|
491
|
+
safetyBudget: {
|
|
492
|
+
panic_unwind: 'allowed-with-recovery',
|
|
493
|
+
root_escape: 'forbidden',
|
|
494
|
+
},
|
|
495
|
+
amendments: ['adr-077-worktreeinclude'],
|
|
496
|
+
rationale:
|
|
497
|
+
'napi binding shim (515 LOC) for worktrunk-core, used by packages/core spawn-pipeline tests, packages/core/src/scaffold/ensure-config.ts, and shipped via packages/worktree-napi-* per-platform npm packages. Internal-only.',
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
module: 'worktrunk-core',
|
|
501
|
+
intent: 'cpu-bound',
|
|
502
|
+
rustCore: 'crates/worktrunk-core',
|
|
503
|
+
tsWrapper: 'packages/worktree',
|
|
504
|
+
canonicalHome: 'cleocode',
|
|
505
|
+
perfBudget: {
|
|
506
|
+
latency_p50_ms: 5,
|
|
507
|
+
latency_p99_ms: 50,
|
|
508
|
+
},
|
|
509
|
+
safetyBudget: {
|
|
510
|
+
panic_unwind: 'forbidden',
|
|
511
|
+
root_escape: 'forbidden',
|
|
512
|
+
},
|
|
513
|
+
amendments: ['adr-077-worktreeinclude', 'adr-078-boundary-registry'],
|
|
514
|
+
rationale:
|
|
515
|
+
'Worktree primitives core (1,352 LOC) vendored from /mnt/projects/worktrunk per D010, consumed by worktree-napi. Reference implementation of the boundary-registry pattern. Internal-only today; publish=true is a future option if external worktree-tooling emerges.',
|
|
516
|
+
},
|
|
517
|
+
|
|
518
|
+
// ============================================================
|
|
519
|
+
// Packages (20 entries) — from sg-boundary-packages-decision-matrix
|
|
520
|
+
// ============================================================
|
|
521
|
+
|
|
522
|
+
{
|
|
523
|
+
module: 'adapters',
|
|
524
|
+
intent: 'harness-adapter',
|
|
525
|
+
tsWrapper: 'packages/adapters',
|
|
526
|
+
canonicalHome: 'cleocode',
|
|
527
|
+
perfBudget: {
|
|
528
|
+
latency_p50_ms: 100,
|
|
529
|
+
latency_p99_ms: 2000,
|
|
530
|
+
},
|
|
531
|
+
safetyBudget: {
|
|
532
|
+
panic_unwind: 'allowed-with-recovery',
|
|
533
|
+
root_escape: 'allowed-with-justification',
|
|
534
|
+
network_egress: 'allowed',
|
|
535
|
+
fs_writes_outside_root: 'audited',
|
|
536
|
+
},
|
|
537
|
+
amendments: [],
|
|
538
|
+
rationale:
|
|
539
|
+
'Claude Code / Cursor / OpenCode harness adapters (10,661 LOC) consumed only by core. Provider-specific FS layouts + child_process spawning; TS-only fit.',
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
module: 'agents',
|
|
543
|
+
intent: 'data-manifest',
|
|
544
|
+
tsWrapper: 'packages/agents',
|
|
545
|
+
canonicalHome: 'cleocode',
|
|
546
|
+
perfBudget: {
|
|
547
|
+
latency_p50_ms: 10,
|
|
548
|
+
},
|
|
549
|
+
safetyBudget: {
|
|
550
|
+
panic_unwind: 'forbidden',
|
|
551
|
+
root_escape: 'forbidden',
|
|
552
|
+
},
|
|
553
|
+
amendments: [],
|
|
554
|
+
rationale:
|
|
555
|
+
'Asset-only package (0 TS LOC) — ships .cant + templates consumed by 2 packages. No logic; pure data manifest.',
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
module: 'animations',
|
|
559
|
+
intent: 'frontend',
|
|
560
|
+
tsWrapper: 'packages/animations',
|
|
561
|
+
canonicalHome: 'cleocode',
|
|
562
|
+
perfBudget: {
|
|
563
|
+
latency_p50_ms: 16,
|
|
564
|
+
latency_p99_ms: 33,
|
|
565
|
+
},
|
|
566
|
+
safetyBudget: {
|
|
567
|
+
panic_unwind: 'allowed-with-recovery',
|
|
568
|
+
root_escape: 'forbidden',
|
|
569
|
+
},
|
|
570
|
+
amendments: [],
|
|
571
|
+
rationale:
|
|
572
|
+
'TTY render animations (1,351 LOC) consumed by cleo. 60fps frame budget; terminal output is irrelevant for Rust.',
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
module: 'brain',
|
|
576
|
+
intent: 'io-coordination',
|
|
577
|
+
tsWrapper: 'packages/brain',
|
|
578
|
+
canonicalHome: 'cleocode',
|
|
579
|
+
perfBudget: {
|
|
580
|
+
latency_p50_ms: 100,
|
|
581
|
+
latency_p99_ms: 1000,
|
|
582
|
+
},
|
|
583
|
+
safetyBudget: {
|
|
584
|
+
panic_unwind: 'allowed-with-recovery',
|
|
585
|
+
root_escape: 'forbidden',
|
|
586
|
+
},
|
|
587
|
+
amendments: [],
|
|
588
|
+
rationale:
|
|
589
|
+
'Multi-DB substrate adapter (1,628 LOC) consumed by studio + self. IO-bound over better-sqlite3 + drizzle; no Rust port warranted today. Hot path (embeddings) lives in core/src/memory/, not here.',
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
module: 'caamp',
|
|
593
|
+
intent: 'orchestration-glue',
|
|
594
|
+
tsWrapper: 'packages/caamp',
|
|
595
|
+
canonicalHome: 'cleocode',
|
|
596
|
+
perfBudget: {
|
|
597
|
+
latency_p50_ms: 100,
|
|
598
|
+
latency_p99_ms: 2000,
|
|
599
|
+
},
|
|
600
|
+
safetyBudget: {
|
|
601
|
+
panic_unwind: 'allowed-with-recovery',
|
|
602
|
+
root_escape: 'forbidden',
|
|
603
|
+
fs_writes_outside_root: 'audited',
|
|
604
|
+
},
|
|
605
|
+
amendments: [],
|
|
606
|
+
rationale:
|
|
607
|
+
'CAAMP packaging + harness registry (28,439 LOC) consumed by 3 packages. FS layouts + provider quirks fit TS; no Rust hot path.',
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
module: 'cant',
|
|
611
|
+
intent: 'ffi-surface',
|
|
612
|
+
tsWrapper: 'packages/cant',
|
|
613
|
+
canonicalHome: 'cleocode',
|
|
614
|
+
perfBudget: {
|
|
615
|
+
latency_p50_ms: 10,
|
|
616
|
+
latency_p99_ms: 100,
|
|
617
|
+
startup_max_ms: 100,
|
|
618
|
+
},
|
|
619
|
+
safetyBudget: {
|
|
620
|
+
panic_unwind: 'allowed-with-recovery',
|
|
621
|
+
root_escape: 'forbidden',
|
|
622
|
+
},
|
|
623
|
+
amendments: [],
|
|
624
|
+
rationale:
|
|
625
|
+
'Thin TS wrapper (4,960 LOC) over cant-core/cant-napi/cant-runtime Rust crates. 651 LOC is the native-loader; remaining glue is composer/bundle/migrate/markdown-parser/mental-model. Working hybrid — no deletion needed.',
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
module: 'cleo',
|
|
629
|
+
intent: 'orchestration-glue',
|
|
630
|
+
tsWrapper: 'packages/cleo',
|
|
631
|
+
canonicalHome: 'cleocode',
|
|
632
|
+
perfBudget: {
|
|
633
|
+
latency_p50_ms: 100,
|
|
634
|
+
latency_p99_ms: 2000,
|
|
635
|
+
startup_max_ms: 500,
|
|
636
|
+
},
|
|
637
|
+
safetyBudget: {
|
|
638
|
+
panic_unwind: 'allowed-with-recovery',
|
|
639
|
+
root_escape: 'forbidden',
|
|
640
|
+
fs_writes_outside_root: 'audited',
|
|
641
|
+
},
|
|
642
|
+
amendments: [],
|
|
643
|
+
rationale:
|
|
644
|
+
'CLI dispatch binary (83,143 LOC, 0 consumers — top of stack). Decomposition tracked under SG-ARCH-SOLID T9833. TS-only orchestration glue; no Rust hot path.',
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
module: 'cleo-os',
|
|
648
|
+
intent: 'harness-adapter',
|
|
649
|
+
tsWrapper: 'packages/cleo-os',
|
|
650
|
+
canonicalHome: 'cleocode',
|
|
651
|
+
perfBudget: {
|
|
652
|
+
latency_p50_ms: 100,
|
|
653
|
+
latency_p99_ms: 2000,
|
|
654
|
+
startup_max_ms: 500,
|
|
655
|
+
},
|
|
656
|
+
safetyBudget: {
|
|
657
|
+
panic_unwind: 'allowed-with-recovery',
|
|
658
|
+
root_escape: 'allowed-with-justification',
|
|
659
|
+
fs_writes_outside_root: 'audited',
|
|
660
|
+
},
|
|
661
|
+
amendments: [],
|
|
662
|
+
rationale:
|
|
663
|
+
'Pi launcher wrapper (3,598 LOC) — 0 consumers (binary). Wraps JS-only Pi harness; TS-only fit.',
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
module: 'contracts',
|
|
667
|
+
intent: 'data-manifest',
|
|
668
|
+
tsWrapper: 'packages/contracts',
|
|
669
|
+
canonicalHome: 'cleocode',
|
|
670
|
+
perfBudget: {
|
|
671
|
+
latency_p50_ms: 10,
|
|
672
|
+
},
|
|
673
|
+
safetyBudget: {
|
|
674
|
+
panic_unwind: 'forbidden',
|
|
675
|
+
root_escape: 'forbidden',
|
|
676
|
+
},
|
|
677
|
+
amendments: ['adr-078-boundary-registry'],
|
|
678
|
+
rationale:
|
|
679
|
+
'Typed contracts SSoT (35,905 LOC, Zod schemas) consumed by 15 packages. Pure types; no logic; TS-only by definition (it defines the type surface). Hosts BOUNDARY_REGISTRY itself.',
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
module: 'core',
|
|
683
|
+
intent: 'orchestration-glue',
|
|
684
|
+
tsWrapper: 'packages/core',
|
|
685
|
+
canonicalHome: 'cleocode',
|
|
686
|
+
perfBudget: {
|
|
687
|
+
latency_p50_ms: 100,
|
|
688
|
+
latency_p99_ms: 2000,
|
|
689
|
+
},
|
|
690
|
+
safetyBudget: {
|
|
691
|
+
panic_unwind: 'allowed-with-recovery',
|
|
692
|
+
root_escape: 'forbidden',
|
|
693
|
+
fs_writes_outside_root: 'audited',
|
|
694
|
+
},
|
|
695
|
+
amendments: [],
|
|
696
|
+
rationale:
|
|
697
|
+
'SDK runtime (295,846 LOC) consumed by 10 packages — currently a god-package. Decomposition tracked under SG-ARCH-SOLID T9834. Mixed workload; most paths are IO-coordination but no module is CPU-bound enough to mandate a Rust port today.',
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
module: 'git-shim',
|
|
701
|
+
intent: 'ffi-surface',
|
|
702
|
+
tsWrapper: 'packages/git-shim',
|
|
703
|
+
canonicalHome: 'cleocode',
|
|
704
|
+
perfBudget: {
|
|
705
|
+
latency_p50_ms: 50,
|
|
706
|
+
latency_p99_ms: 1000,
|
|
707
|
+
startup_max_ms: 100,
|
|
708
|
+
},
|
|
709
|
+
safetyBudget: {
|
|
710
|
+
panic_unwind: 'allowed-with-recovery',
|
|
711
|
+
root_escape: 'forbidden',
|
|
712
|
+
fs_writes_outside_root: 'forbidden',
|
|
713
|
+
},
|
|
714
|
+
amendments: [],
|
|
715
|
+
rationale:
|
|
716
|
+
'PATH-binary git shim (1,452 LOC) — standalone, 0 in-repo consumers. Must fork+exec; bin must be Node for npm distribution. TS-only fit.',
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
module: 'lafs',
|
|
720
|
+
intent: 'io-coordination',
|
|
721
|
+
tsWrapper: 'packages/lafs',
|
|
722
|
+
canonicalHome: 'cleocode',
|
|
723
|
+
perfBudget: {
|
|
724
|
+
latency_p50_ms: 50,
|
|
725
|
+
latency_p99_ms: 1000,
|
|
726
|
+
},
|
|
727
|
+
safetyBudget: {
|
|
728
|
+
panic_unwind: 'allowed-with-recovery',
|
|
729
|
+
root_escape: 'forbidden',
|
|
730
|
+
network_egress: 'allowed',
|
|
731
|
+
},
|
|
732
|
+
amendments: [],
|
|
733
|
+
rationale:
|
|
734
|
+
'Envelope + A2A bridge (11,353 LOC) consumed by 6 packages. Rust core (lafs-core + lafs-napi) handles canonical envelope serialization; TS layer is A2A express bridge + envelope validation glue (2,600 LOC a2a/* uses JS-only @a2a-js/sdk).',
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
module: 'mcp-adapter',
|
|
738
|
+
intent: 'orchestration-glue',
|
|
739
|
+
tsWrapper: 'packages/mcp-adapter',
|
|
740
|
+
canonicalHome: 'cleocode',
|
|
741
|
+
perfBudget: {
|
|
742
|
+
latency_p50_ms: 100,
|
|
743
|
+
latency_p99_ms: 2000,
|
|
744
|
+
},
|
|
745
|
+
safetyBudget: {
|
|
746
|
+
panic_unwind: 'allowed-with-recovery',
|
|
747
|
+
root_escape: 'forbidden',
|
|
748
|
+
network_egress: 'allowed',
|
|
749
|
+
},
|
|
750
|
+
amendments: [],
|
|
751
|
+
rationale:
|
|
752
|
+
'External MCP bridge (379 LOC) — 0 in-repo consumers (binary only). MCP SDK is JS-native; TS-only fit.',
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
module: 'nexus',
|
|
756
|
+
intent: 'cpu-bound',
|
|
757
|
+
tsWrapper: 'packages/nexus',
|
|
758
|
+
canonicalHome: 'cleocode',
|
|
759
|
+
perfBudget: {
|
|
760
|
+
latency_p50_ms: 50,
|
|
761
|
+
latency_p99_ms: 500,
|
|
762
|
+
},
|
|
763
|
+
safetyBudget: {
|
|
764
|
+
panic_unwind: 'allowed-with-recovery',
|
|
765
|
+
root_escape: 'forbidden',
|
|
766
|
+
},
|
|
767
|
+
amendments: [],
|
|
768
|
+
rationale:
|
|
769
|
+
'Code-intelligence (16,431 LOC) consumed by cleo + core. CPU-bound (tree-sitter AST + graphology), but tree-sitter is already native via npm. Pure-JS graphology hot loop is the only candidate; future SG-NEXUS-RUST-CORE saga (out-of-scope per ADR-078) may add a nexus-core Rust crate. Keep TS for now.',
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
module: 'paths',
|
|
773
|
+
intent: 'data-manifest',
|
|
774
|
+
tsWrapper: 'packages/paths',
|
|
775
|
+
canonicalHome: 'cleocode',
|
|
776
|
+
perfBudget: {
|
|
777
|
+
latency_p50_ms: 5,
|
|
778
|
+
},
|
|
779
|
+
safetyBudget: {
|
|
780
|
+
panic_unwind: 'forbidden',
|
|
781
|
+
root_escape: 'forbidden',
|
|
782
|
+
},
|
|
783
|
+
amendments: [],
|
|
784
|
+
rationale:
|
|
785
|
+
'XDG paths SSoT (588 LOC) consumed by 9 packages. Leaf data-manifest with no logic beyond path resolution; TS-only.',
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
module: 'playbooks',
|
|
789
|
+
intent: 'orchestration-glue',
|
|
790
|
+
tsWrapper: 'packages/playbooks',
|
|
791
|
+
canonicalHome: 'cleocode',
|
|
792
|
+
perfBudget: {
|
|
793
|
+
latency_p50_ms: 100,
|
|
794
|
+
latency_p99_ms: 2000,
|
|
795
|
+
},
|
|
796
|
+
safetyBudget: {
|
|
797
|
+
panic_unwind: 'allowed-with-recovery',
|
|
798
|
+
root_escape: 'forbidden',
|
|
799
|
+
},
|
|
800
|
+
amendments: [],
|
|
801
|
+
rationale:
|
|
802
|
+
'Playbook state machine (3,094 LOC) consumed by cleo + adapters. Pure DI; IO-coordination dominated. TS-only fit.',
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
module: 'runtime',
|
|
806
|
+
intent: 'io-coordination',
|
|
807
|
+
tsWrapper: 'packages/runtime',
|
|
808
|
+
canonicalHome: 'cleocode',
|
|
809
|
+
perfBudget: {
|
|
810
|
+
latency_p50_ms: 100,
|
|
811
|
+
latency_p99_ms: 1000,
|
|
812
|
+
},
|
|
813
|
+
safetyBudget: {
|
|
814
|
+
panic_unwind: 'allowed-with-recovery',
|
|
815
|
+
root_escape: 'forbidden',
|
|
816
|
+
network_egress: 'allowed',
|
|
817
|
+
},
|
|
818
|
+
amendments: [],
|
|
819
|
+
rationale:
|
|
820
|
+
'Poller/SSE/heartbeat runtime (681 LOC) consumed by cleo. Node event loop + fetch are the natural fit; no Rust port warranted.',
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
module: 'skills',
|
|
824
|
+
intent: 'data-manifest',
|
|
825
|
+
tsWrapper: 'packages/skills',
|
|
826
|
+
canonicalHome: 'cleocode',
|
|
827
|
+
perfBudget: {
|
|
828
|
+
latency_p50_ms: 10,
|
|
829
|
+
},
|
|
830
|
+
safetyBudget: {
|
|
831
|
+
panic_unwind: 'forbidden',
|
|
832
|
+
root_escape: 'forbidden',
|
|
833
|
+
},
|
|
834
|
+
amendments: [],
|
|
835
|
+
rationale:
|
|
836
|
+
'Asset-only package (0 TS LOC) — ships JSON skill registry + generated index.js consumed by core. No logic; pure data manifest.',
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
module: 'studio',
|
|
840
|
+
intent: 'frontend',
|
|
841
|
+
tsWrapper: 'packages/studio',
|
|
842
|
+
canonicalHome: 'cleocode',
|
|
843
|
+
perfBudget: {
|
|
844
|
+
latency_p50_ms: 16,
|
|
845
|
+
latency_p99_ms: 33,
|
|
846
|
+
},
|
|
847
|
+
safetyBudget: {
|
|
848
|
+
panic_unwind: 'allowed-with-recovery',
|
|
849
|
+
root_escape: 'forbidden',
|
|
850
|
+
network_egress: 'allowed',
|
|
851
|
+
},
|
|
852
|
+
amendments: [],
|
|
853
|
+
rationale:
|
|
854
|
+
'SvelteKit frontend (16,636 LOC, d3/three/sigma) — 0 in-repo consumers. SvelteKit + browser code; TS always.',
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
module: 'worktree',
|
|
858
|
+
intent: 'ffi-surface',
|
|
859
|
+
tsWrapper: 'packages/worktree',
|
|
860
|
+
canonicalHome: 'cleocode',
|
|
861
|
+
perfBudget: {
|
|
862
|
+
latency_p50_ms: 50,
|
|
863
|
+
latency_p99_ms: 1000,
|
|
864
|
+
startup_max_ms: 100,
|
|
865
|
+
},
|
|
866
|
+
safetyBudget: {
|
|
867
|
+
panic_unwind: 'allowed-with-recovery',
|
|
868
|
+
root_escape: 'forbidden',
|
|
869
|
+
fs_writes_outside_root: 'audited',
|
|
870
|
+
},
|
|
871
|
+
amendments: ['adr-077-worktreeinclude', 'adr-078-boundary-registry'],
|
|
872
|
+
rationale:
|
|
873
|
+
'Worktree SSoT primitive layer (1,972 LOC) — canonical create/destroy/list/prune/include/copy-on-write bound by @cleocode/paths. Post-PR-#487 the responsibilities are distinct from packages/core/src/worktree/ (SDK-level enrichment). Consumes worktrunk-core via worktree-napi.',
|
|
874
|
+
},
|
|
875
|
+
] as const;
|