groundswell 0.0.1

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 (120) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/.claude/system_prompts/task-breakdown.md +100 -0
  3. package/PRPs/001-hierarchical-workflow-engine.md +2438 -0
  4. package/PRPs/PRDs/001-hierarchical-workflow-engine.md +543 -0
  5. package/PRPs/PRDs/002-agent-prompt.md +390 -0
  6. package/PRPs/PRDs/003-agent-prompt.md +943 -0
  7. package/PRPs/PRDs/004-agent-prompt.md +1136 -0
  8. package/PRPs/PRDs/tasks-001.json +492 -0
  9. package/PRPs/README.md +83 -0
  10. package/PRPs/templates/prp_base.md +222 -0
  11. package/README.md +218 -0
  12. package/docs/agent.md +422 -0
  13. package/docs/prompt.md +419 -0
  14. package/docs/workflow.md +600 -0
  15. package/examples/README.md +244 -0
  16. package/examples/examples/01-basic-workflow.ts +100 -0
  17. package/examples/examples/02-decorator-options.ts +217 -0
  18. package/examples/examples/03-parent-child.ts +241 -0
  19. package/examples/examples/04-observers-debugger.ts +340 -0
  20. package/examples/examples/05-error-handling.ts +387 -0
  21. package/examples/examples/06-concurrent-tasks.ts +352 -0
  22. package/examples/examples/07-agent-loops.ts +432 -0
  23. package/examples/examples/08-sdk-features.ts +667 -0
  24. package/examples/examples/09-reflection.ts +573 -0
  25. package/examples/examples/10-introspection.ts +550 -0
  26. package/examples/index.ts +143 -0
  27. package/examples/utils/helpers.ts +57 -0
  28. package/llms_full.txt +5890 -0
  29. package/package.json +63 -0
  30. package/plan/P1P2/PRP.md +527 -0
  31. package/plan/P1P2/research/LRU_CACHE_BEST_PRACTICES.md +1929 -0
  32. package/plan/P1P2/research/LRU_CACHE_CODE_PATTERNS.md +857 -0
  33. package/plan/P1P2/research/LRU_CACHE_INTEGRATION_GUIDE.md +738 -0
  34. package/plan/P1P2/research/LRU_CACHE_RESEARCH_INDEX.md +424 -0
  35. package/plan/P1P2/research/REFLECTION_INDEX.md +291 -0
  36. package/plan/P1P2/research/REFLECTION_RESEARCH_REPORT.md +1342 -0
  37. package/plan/P1P2/research/RESEARCH_SUMMARY.md +342 -0
  38. package/plan/P1P2/research/anthropic-sdk.md +174 -0
  39. package/plan/P1P2/research/async-local-storage.md +200 -0
  40. package/plan/P1P2/research/reflection-code-patterns.md +1205 -0
  41. package/plan/P1P2/research/reflection-decision-matrix.md +421 -0
  42. package/plan/P1P2/research/reflection-implementation-guide.md +1341 -0
  43. package/plan/P1P2/research/reflection-integration-guide.md +834 -0
  44. package/plan/P1P2/research/reflection-patterns.md +1468 -0
  45. package/plan/P1P2/research/reflection-quick-reference.md +558 -0
  46. package/plan/P1P2/research/zod-schema.md +152 -0
  47. package/plan/P3P4/PRP.md +1388 -0
  48. package/plan/P3P4/research/caching-lru.md +116 -0
  49. package/plan/P3P4/research/introspection-tools.md +177 -0
  50. package/plan/P3P4/research/reflection-patterns.md +117 -0
  51. package/plan/P4P5/PRP.md +1136 -0
  52. package/plan/P4P5/research/RESEARCH_SUMMARY.md +151 -0
  53. package/plan/architecture/external_deps.md +358 -0
  54. package/plan/architecture/system_context.md +242 -0
  55. package/plan/backlog.json +867 -0
  56. package/plan/research/INTROSPECTION_RESEARCH_SUMMARY.md +378 -0
  57. package/plan/research/README-INTROSPECTION.md +352 -0
  58. package/plan/research/agent-introspection-patterns.md +1085 -0
  59. package/plan/research/introspection-security-guide.md +928 -0
  60. package/plan/research/introspection-tool-examples.md +875 -0
  61. package/scripts/generate-llms-full.ts +206 -0
  62. package/src/__tests__/integration/agent-workflow.test.ts +256 -0
  63. package/src/__tests__/integration/tree-mirroring.test.ts +114 -0
  64. package/src/__tests__/unit/agent.test.ts +169 -0
  65. package/src/__tests__/unit/cache-key.test.ts +182 -0
  66. package/src/__tests__/unit/cache.test.ts +172 -0
  67. package/src/__tests__/unit/context.test.ts +138 -0
  68. package/src/__tests__/unit/decorators.test.ts +100 -0
  69. package/src/__tests__/unit/introspection-tools.test.ts +277 -0
  70. package/src/__tests__/unit/prompt.test.ts +135 -0
  71. package/src/__tests__/unit/reflection.test.ts +210 -0
  72. package/src/__tests__/unit/tree-debugger.test.ts +85 -0
  73. package/src/__tests__/unit/workflow.test.ts +81 -0
  74. package/src/cache/cache-key.ts +244 -0
  75. package/src/cache/cache.ts +236 -0
  76. package/src/cache/index.ts +8 -0
  77. package/src/core/agent.ts +573 -0
  78. package/src/core/context.ts +119 -0
  79. package/src/core/event-tree.ts +260 -0
  80. package/src/core/factory.ts +123 -0
  81. package/src/core/index.ts +17 -0
  82. package/src/core/logger.ts +87 -0
  83. package/src/core/mcp-handler.ts +184 -0
  84. package/src/core/prompt.ts +150 -0
  85. package/src/core/workflow-context.ts +349 -0
  86. package/src/core/workflow.ts +302 -0
  87. package/src/debugger/index.ts +1 -0
  88. package/src/debugger/tree-debugger.ts +210 -0
  89. package/src/decorators/index.ts +3 -0
  90. package/src/decorators/observed-state.ts +95 -0
  91. package/src/decorators/step.ts +139 -0
  92. package/src/decorators/task.ts +96 -0
  93. package/src/examples/index.ts +2 -0
  94. package/src/examples/tdd-orchestrator.ts +65 -0
  95. package/src/examples/test-cycle-workflow.ts +64 -0
  96. package/src/index.ts +140 -0
  97. package/src/reflection/index.ts +5 -0
  98. package/src/reflection/reflection.ts +407 -0
  99. package/src/tools/index.ts +36 -0
  100. package/src/tools/introspection.ts +464 -0
  101. package/src/types/agent.ts +90 -0
  102. package/src/types/decorators.ts +25 -0
  103. package/src/types/error-strategy.ts +13 -0
  104. package/src/types/error.ts +20 -0
  105. package/src/types/events.ts +74 -0
  106. package/src/types/index.ts +55 -0
  107. package/src/types/logging.ts +24 -0
  108. package/src/types/observer.ts +18 -0
  109. package/src/types/prompt.ts +40 -0
  110. package/src/types/reflection.ts +117 -0
  111. package/src/types/sdk-primitives.ts +128 -0
  112. package/src/types/snapshot.ts +14 -0
  113. package/src/types/workflow-context.ts +163 -0
  114. package/src/types/workflow.ts +37 -0
  115. package/src/utils/id.ts +11 -0
  116. package/src/utils/index.ts +3 -0
  117. package/src/utils/observable.ts +77 -0
  118. package/tasks.json +0 -0
  119. package/tsconfig.json +22 -0
  120. package/vitest.config.ts +16 -0
@@ -0,0 +1,543 @@
1
+ # **📘 PRODUCT REQUIREMENTS DOCUMENT (PRD)**
2
+
3
+ ### **Hierarchical Workflow Engine with Full Observability & Tree Debugging**
4
+
5
+ Version: **1.0**
6
+ Status: **Implementation-ready**
7
+
8
+ ---
9
+
10
+ # **1. Overview**
11
+
12
+ This PRD defines a TypeScript workflow orchestration engine that provides:
13
+
14
+ * Hierarchical workflows with sequential + concurrent steps.
15
+ * Automatic parent/child attachment.
16
+ * High-resolution observability (logs, events, snapshots).
17
+ * Error introspection with full child state visibility.
18
+ * Restart logic handled at correct parent level.
19
+ * Real-time tree debugger API for terminal visualization.
20
+
21
+ All logs & events must form a **perfect 1:1 tree mirror** of the workflow execution tree in memory.
22
+
23
+ This PRD includes:
24
+
25
+ ✔️ Full data model
26
+ ✔️ All TypeScript interfaces
27
+ ✔️ Decorator specs
28
+ ✔️ Workflow base class skeleton
29
+ ✔️ Logger implementation skeleton
30
+ ✔️ Observer/event system skeleton
31
+ ✔️ Snapshot system spec
32
+ ✔️ Error/restart semantics
33
+
34
+ ---
35
+
36
+ # **2. Architecture**
37
+
38
+ ```
39
+ Workflow
40
+ ├─ Steps (decorated methods)
41
+ ├─ Tasks (decorated methods)
42
+ ├─ Observed state (decorated fields)
43
+ ├─ Children (other workflows)
44
+ ├─ Logs
45
+ └─ Events
46
+ ```
47
+
48
+ The tree debugger subscribes to a root workflow and receives real-time events.
49
+
50
+ ---
51
+
52
+ # **3. Core Data Model (Interfaces)**
53
+
54
+ ## **3.1 WorkflowNode**
55
+
56
+ ```ts
57
+ export interface WorkflowNode {
58
+ id: string;
59
+ name: string;
60
+
61
+ parent: WorkflowNode | null;
62
+ children: WorkflowNode[];
63
+
64
+ status: WorkflowStatus;
65
+
66
+ logs: LogEntry[];
67
+ events: WorkflowEvent[];
68
+
69
+ // optional state snapshot
70
+ stateSnapshot: SerializedWorkflowState | null;
71
+ }
72
+ ```
73
+
74
+ ## **3.2 WorkflowStatus**
75
+
76
+ ```ts
77
+ export type WorkflowStatus =
78
+ | 'idle'
79
+ | 'running'
80
+ | 'completed'
81
+ | 'failed'
82
+ | 'cancelled';
83
+ ```
84
+
85
+ ---
86
+
87
+ # **4. Logging & Events Model**
88
+
89
+ ## **4.1 LogEntry**
90
+
91
+ ```ts
92
+ export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
93
+
94
+ export interface LogEntry {
95
+ id: string;
96
+ workflowId: string;
97
+ timestamp: number;
98
+ level: LogLevel;
99
+ message: string;
100
+ data?: unknown;
101
+ parentLogId?: string;
102
+ }
103
+ ```
104
+
105
+ ## **4.2 WorkflowEvent**
106
+
107
+ ```ts
108
+ export type WorkflowEvent =
109
+ | { type: 'childAttached'; parentId: string; child: WorkflowNode }
110
+ | { type: 'stateSnapshot'; node: WorkflowNode }
111
+ | { type: 'stepStart'; node: WorkflowNode; step: string }
112
+ | { type: 'stepEnd'; node: WorkflowNode; step: string; duration: number }
113
+ | { type: 'error'; node: WorkflowNode; error: WorkflowError }
114
+ | { type: 'taskStart'; node: WorkflowNode; task: string }
115
+ | { type: 'taskEnd'; node: WorkflowNode; task: string }
116
+ | { type: 'treeUpdated'; root: WorkflowNode };
117
+ ```
118
+
119
+ ---
120
+
121
+ # **5. Error Model**
122
+
123
+ ## **5.1 WorkflowError**
124
+
125
+ ```ts
126
+ export interface WorkflowError {
127
+ message: string;
128
+ original: unknown;
129
+ workflowId: string;
130
+ stack?: string;
131
+
132
+ state: SerializedWorkflowState; // a snapshot
133
+ logs: LogEntry[]; // logs from this node only
134
+ }
135
+ ```
136
+
137
+ ---
138
+
139
+ # **6. Snapshot System**
140
+
141
+ ## **6.1 State Snapshot**
142
+
143
+ ```ts
144
+ export type SerializedWorkflowState = Record<string, unknown>;
145
+ ```
146
+
147
+ ## **6.2 ObservedState Metadata**
148
+
149
+ ```ts
150
+ export interface StateFieldMetadata {
151
+ hidden?: boolean; // not shown in debugger
152
+ redact?: boolean; // shown as "***"
153
+ }
154
+ ```
155
+
156
+ ---
157
+
158
+ # **7. Observers**
159
+
160
+ ## **7.1 WorkflowObserver**
161
+
162
+ ```ts
163
+ export interface WorkflowObserver {
164
+ onLog(entry: LogEntry): void;
165
+ onEvent(event: WorkflowEvent): void;
166
+ onStateUpdated(node: WorkflowNode): void;
167
+ onTreeChanged(root: WorkflowNode): void;
168
+ }
169
+ ```
170
+
171
+ Observers attach to the **root workflow** and receive all events.
172
+
173
+ ---
174
+
175
+ # **8. Decorators (Complete Technical Specification)**
176
+
177
+ ## **8.1 @Step() Decorator**
178
+
179
+ ```ts
180
+ export interface StepOptions {
181
+ name?: string;
182
+ snapshotState?: boolean;
183
+ trackTiming?: boolean;
184
+ logStart?: boolean;
185
+ logFinish?: boolean;
186
+ }
187
+
188
+ export function Step(options: StepOptions = {}): MethodDecorator;
189
+ ```
190
+
191
+ **Responsibilities:**
192
+
193
+ * Emit `stepStart` + `stepEnd`.
194
+ * Optionally snapshot state.
195
+ * Catch and wrap errors into `WorkflowError`.
196
+
197
+ ---
198
+
199
+ ## **8.2 @Task() Decorator**
200
+
201
+ ```ts
202
+ export interface TaskOptions {
203
+ name?: string;
204
+ concurrent?: boolean;
205
+ }
206
+
207
+ export function Task(options: TaskOptions = {}): MethodDecorator;
208
+ ```
209
+
210
+ **Responsibilities:**
211
+
212
+ * Emit `taskStart` + `taskEnd`
213
+ * Attach returned workflow(s) as children.
214
+ * Enforce concurrency rules.
215
+
216
+ ---
217
+
218
+ ## **8.3 @ObservedState Decorator**
219
+
220
+ ```ts
221
+ export function ObservedState(meta: StateFieldMetadata = {}): PropertyDecorator;
222
+ ```
223
+
224
+ Fields marked with this decorator are included in snapshots.
225
+
226
+ ---
227
+
228
+ # **9. Restart Semantics**
229
+
230
+ * Descendant workflows never request restart upward.
231
+ * A parent step decides whether restart is needed by analyzing:
232
+
233
+ * all captured `WorkflowError`s
234
+ * descendant state snapshots
235
+ * logs from failing nodes
236
+ * Parent step may:
237
+
238
+ 1. Retry the step
239
+ 2. Abort the workflow
240
+ 3. Rebuild the plan and continue
241
+
242
+ Restartability is **opt-in** at the step method level; not global.
243
+
244
+ ---
245
+
246
+ # **10. Optional Multi-Error Merging**
247
+
248
+ ```ts
249
+ export interface ErrorMergeStrategy {
250
+ enabled: boolean;
251
+ maxMergeDepth?: number;
252
+ combine?(errors: WorkflowError[]): WorkflowError;
253
+ }
254
+ ```
255
+
256
+ Default: **disabled** → first error wins (race is preserved).
257
+
258
+ ---
259
+
260
+ # **11. Tree Debugger API**
261
+
262
+ ## **11.1 Tree Debugger Interface**
263
+
264
+ ```ts
265
+ export interface WorkflowTreeDebugger {
266
+ getTree(): WorkflowNode;
267
+ getNode(id: string): WorkflowNode | undefined;
268
+
269
+ events: Observable<WorkflowEvent>;
270
+
271
+ toTreeString(node?: WorkflowNode): string;
272
+ toLogString(node?: WorkflowNode): string;
273
+ }
274
+ ```
275
+
276
+ This is consumed by the terminal UI.
277
+
278
+ ---
279
+
280
+ # **12. Base Classes (Class Skeletons)**
281
+
282
+ Below are implementation-ready class skeletons with exact method signatures.
283
+
284
+ ---
285
+
286
+ # **12.1 WorkflowLogger Skeleton**
287
+
288
+ ```ts
289
+ export class WorkflowLogger {
290
+ constructor(private readonly node: WorkflowNode,
291
+ private readonly observers: WorkflowObserver[]) {}
292
+
293
+ private emit(entry: LogEntry) {
294
+ this.node.logs.push(entry);
295
+ for (const obs of this.observers) obs.onLog(entry);
296
+ }
297
+
298
+ debug(message: string, data?: unknown) { /* ... */ }
299
+ info(message: string, data?: unknown) { /* ... */ }
300
+ warn(message: string, data?: unknown) { /* ... */ }
301
+ error(message: string, data?: unknown) { /* ... */ }
302
+
303
+ child(meta: Partial<LogEntry>): WorkflowLogger {
304
+ return new WorkflowLogger(this.node, this.observers);
305
+ }
306
+ }
307
+ ```
308
+
309
+ ---
310
+
311
+ # **12.2 Workflow Base Class Skeleton**
312
+
313
+ ```ts
314
+ export abstract class Workflow {
315
+ public readonly id: string;
316
+ public parent: Workflow | null = null;
317
+ public children: Workflow[] = [];
318
+ public status: WorkflowStatus = 'idle';
319
+
320
+ protected readonly logger: WorkflowLogger;
321
+ protected readonly node: WorkflowNode;
322
+
323
+ constructor(name?: string, parent?: Workflow) {
324
+ this.id = generateId();
325
+ this.parent = parent || null;
326
+
327
+ this.node = {
328
+ id: this.id,
329
+ name: name ?? this.constructor.name,
330
+ parent: parent?.node ?? null,
331
+ children: [],
332
+ logs: [],
333
+ events: [],
334
+ status: 'idle',
335
+ stateSnapshot: null,
336
+ };
337
+
338
+ this.logger = new WorkflowLogger(this.node, this.getRootObservers());
339
+ if (parent) parent.attachChild(this);
340
+ }
341
+
342
+ private getRootObservers(): WorkflowObserver[] {
343
+ return this.parent ? this.parent.getRootObservers() : [];
344
+ }
345
+
346
+ attachChild(child: Workflow) {
347
+ this.children.push(child);
348
+ this.node.children.push(child.node);
349
+ this.emitEvent({ type: 'childAttached', parentId: this.id, child: child.node });
350
+ }
351
+
352
+ protected emitEvent(event: WorkflowEvent) {
353
+ this.node.events.push(event);
354
+ for (const obs of this.getRootObservers()) {
355
+ obs.onEvent(event);
356
+ if (event.type === 'treeUpdated') obs.onTreeChanged(this.node);
357
+ }
358
+ }
359
+
360
+ snapshotState() {
361
+ const snapshot = createStateSnapshot(this);
362
+ this.node.stateSnapshot = snapshot;
363
+ for (const obs of this.getRootObservers()) obs.onStateUpdated(this.node);
364
+ }
365
+
366
+ abstract run(...args: any[]): Promise<any>;
367
+ }
368
+ ```
369
+
370
+ ---
371
+
372
+ # **12.3 Decorator Skeletons**
373
+
374
+ These are implementation-level scaffolds.
375
+
376
+ ### **@ObservedState**
377
+
378
+ ```ts
379
+ const OBSERVED_STATE_FIELDS = new WeakMap<object, Map<string, StateFieldMetadata>>();
380
+
381
+ export function ObservedState(meta: StateFieldMetadata = {}): PropertyDecorator {
382
+ return (target, propertyKey) => {
383
+ let map = OBSERVED_STATE_FIELDS.get(target);
384
+ if (!map) {
385
+ map = new Map();
386
+ OBSERVED_STATE_FIELDS.set(target, map);
387
+ }
388
+ map.set(propertyKey.toString(), meta);
389
+ };
390
+ }
391
+
392
+ export function getObservedState(obj: any): SerializedWorkflowState {
393
+ const map = OBSERVED_STATE_FIELDS.get(Object.getPrototypeOf(obj));
394
+ if (!map) return {};
395
+ const result: SerializedWorkflowState = {};
396
+ for (const [key, meta] of map) {
397
+ let v = (obj as any)[key];
398
+ if (meta.redact) v = '***';
399
+ if (!meta.hidden) result[key] = v;
400
+ }
401
+ return result;
402
+ }
403
+ ```
404
+
405
+ ---
406
+
407
+ ### **@Step**
408
+
409
+ ```ts
410
+ export function Step(opts: StepOptions = {}): MethodDecorator {
411
+ return (target, prop, descriptor: PropertyDescriptor) => {
412
+ const original = descriptor.value;
413
+
414
+ descriptor.value = async function (...args: any[]) {
415
+ const wf = this as Workflow;
416
+ const stepName = opts.name ?? String(prop);
417
+
418
+ if (opts.logStart) wf.logger.info(`STEP START: ${stepName}`);
419
+
420
+ wf.emitEvent({ type: 'stepStart', node: wf.node, step: stepName });
421
+
422
+ let start = Date.now();
423
+ try {
424
+ const result = await original.apply(this, args);
425
+
426
+ if (opts.snapshotState) wf.snapshotState();
427
+ if (opts.trackTiming) {
428
+ const duration = Date.now() - start;
429
+ wf.emitEvent({ type: 'stepEnd', node: wf.node, step: stepName, duration });
430
+ }
431
+
432
+ if (opts.logFinish) wf.logger.info(`STEP END: ${stepName}`);
433
+ return result;
434
+
435
+ } catch (err: any) {
436
+ const snap = getObservedState(wf);
437
+ const wfError: WorkflowError = {
438
+ message: err?.message ?? 'error',
439
+ original: err,
440
+ workflowId: wf.id,
441
+ stack: err?.stack,
442
+ state: snap,
443
+ logs: [...wf.node.logs],
444
+ };
445
+
446
+ wf.emitEvent({ type: 'error', node: wf.node, error: wfError });
447
+
448
+ throw wfError;
449
+ }
450
+ };
451
+ };
452
+ }
453
+ ```
454
+
455
+ ---
456
+
457
+ ### **@Task**
458
+
459
+ ```ts
460
+ export function Task(opts: TaskOptions = {}): MethodDecorator {
461
+ return (target, prop, descriptor: PropertyDescriptor) => {
462
+ const original = descriptor.value;
463
+
464
+ descriptor.value = async function (...args: any[]) {
465
+ const wf = this as Workflow;
466
+ const taskName = opts.name ?? String(prop);
467
+
468
+ wf.emitEvent({ type: 'taskStart', node: wf.node, task: taskName });
469
+
470
+ const result = await original.apply(this, args);
471
+
472
+ // must return Workflow or Workflow[]
473
+ const workflows = Array.isArray(result) ? result : [result];
474
+ for (const child of workflows) {
475
+ if (!(child instanceof Workflow)) {
476
+ throw new Error(`@Task method "${taskName}" did not return a Workflow.`);
477
+ }
478
+ child.parent = wf;
479
+ wf.attachChild(child);
480
+ }
481
+
482
+ wf.emitEvent({ type: 'taskEnd', node: wf.node, task: taskName });
483
+
484
+ return result;
485
+ };
486
+ };
487
+ }
488
+ ```
489
+
490
+ ---
491
+
492
+ # **13. Example Workflow Using the System**
493
+
494
+ ```ts
495
+ class TestCycleWorkflow extends Workflow {
496
+ @ObservedState() currentTest!: string;
497
+
498
+ @Step({ snapshotState: true })
499
+ async generateTest() { /* ... */ }
500
+
501
+ @Step()
502
+ async runTest() { /* ... may throw ... */ }
503
+
504
+ @Step()
505
+ async updateImplementation() { /* ... */ }
506
+ }
507
+
508
+ class TDDOrchestrator extends Workflow {
509
+ @Step({ logStart: true })
510
+ async setupEnvironment() { /* ... */ }
511
+
512
+ @Task()
513
+ async runCycle() {
514
+ return new TestCycleWorkflow('Cycle', this);
515
+ }
516
+
517
+ async run() {
518
+ try {
519
+ await this.setupEnvironment();
520
+ await this.runCycle();
521
+ } catch (err) {
522
+ /* analyze & restart logic here */
523
+ }
524
+ }
525
+ }
526
+ ```
527
+
528
+ ---
529
+
530
+ # **14. Acceptance Criteria (Updated)**
531
+
532
+ This PRD now includes:
533
+
534
+ * explicit interfaces
535
+ * complete decorators
536
+ * class skeletons
537
+ * logger skeleton
538
+ * observer system
539
+ * real-time debugger interface
540
+ * error/restart models
541
+ * snapshot system
542
+
543
+ A senior engineer should be able to implement the full engine from this PRD.