Skip to content

TASK-C04: Runtime Deep Dive

  • Status: Ready
  • Scope Type: Advanced teaching module
  • Recommended Model Tier: Frontier
  • Recommended Reasoning: High

Objective

Write the runtime deep-dive module that explains why workflow orchestration, state, async work, and failure handling are difficult and how this repo addresses them.

Scope

Create one substantial course module focused on:

  • central app state
  • workflow orchestration
  • stop versus abort versus fault
  • cancellation and background work
  • streaming and bounded pipelines
  • UI responsiveness and projection concerns

Non-Scope

  • rewriting all async lessons
  • introducing a new runtime design
  • benchmarking or performance experiments

Files To Read First

  • docs/adrs/ADR-001-use-central-app-state-store.md
  • docs/specs/SLICE-001-first-strong-vertical-slice.md
  • docs/specs/SLICE-004-operational-maturity.md
  • docs/lessons/industrial-desktop-systems/01-Async Await Deep Dive.md
  • docs/lessons/industrial-desktop-systems/20-Advanced Async Coordination.md
  • src/InspectionPrototype.Application/Services/WorkflowService.cs
  • src/InspectionPrototype.Application/State/AppState.cs

Deliverable

  • docs/course/04-workflow-and-async-runtime.md

Verification

  • the module stays grounded in current code
  • state and failure semantics are explained consistently
  • npm run docs:build

Copy/Paste Prompt

text
You are working in C:\Lcn.Workspaces\lcn-wafer-inspection-desktop.

Audience: a newcomer software engineer or automation engineer learning this project.
Goal: turn this repo into a high-quality engineering training course, not just reference docs.
Style: practical, detailed, blog-quality English; clear headings; concrete examples; no fluff.
Ground all claims in the repo docs and code. Do not invent behavior that the current project does not support.
Prefer reusing and linking existing content under docs/lessons, docs/specs, docs/tasks, docs/adrs, docs/implementation, and the source code when helpful.
For diagrams, do not generate binary assets. Instead, produce a Draw.io-friendly diagram brief: title, purpose, nodes, edges, grouping, caption, and destination file path.
If you edit docs, keep VitePress navigation coherent and make sure npm run docs:build passes.

Task: Write the runtime deep-dive course module.

Create:
- docs/course/04-workflow-and-async-runtime.md

Use current code, requirements, ADRs, and lessons to explain:
- the central app state approach
- workflow orchestration
- stop vs abort vs fault semantics
- cancellation and background work
- streaming and backpressure ideas
- UI responsiveness considerations

Structure:
- why this is hard in real industrial desktop systems
- how this repo approaches it
- code tour
- sequence or state diagram briefs
- common mistakes
- exercises for newcomers
- related lessons links

Verify with npm run docs:build.

Docs-first project memory for AI-assisted implementation.