Automation With Human Repair
Summary
Automation with human repair is the pattern that lets LKCI move work forward without pretending every operational ambiguity can be solved automatically. Jobs and DAGs do deterministic work. When judgment, missing evidence, provider ambiguity, or unsafe side effects appear, they create explicit review or repair state.
Reader Question
How should an automated workflow pause, expose state to a human, and resume without losing auditability or idempotency?
Surface Or Workflow
The entry points are jobs, DAGs, review queues, case views, artifact viewers, and repair actions. A reader starts from a failed job, a blocked workflow, a review queue item, or a retry/resume/cancel control in the UI.
Lifecycle
An automated job begins with explicit parameters and a service call. It records run state and artifacts. If it can complete deterministically, it publishes a dataset, dispatches an action, or advances workflow state. If it cannot, the failure becomes data: an issue, review item, audit event, or repair action.
A human decision should be recorded with actor, tenant, reason, and evidence. Only then should a later job or service resume execution. This keeps repair state visible and avoids hidden manual edits.
Child Threads
- Review Primitives: the reusable queue, artifact, audit, and repair concepts.
- Jobs And DAG Execution Foundations: how automated work is registered, launched, inspected, retried, and repaired.
- Jobs Console: how automated work is inspected.
- Retry Resume Cancel: how operators control resumable work.
- Run Artifacts And Observability: how evidence is captured.
- Idempotency In Operational Jobs: how retries avoid duplicate side effects.
- Jobs Escalate To Review: how automated failure becomes human state.
Implementation Boundaries
Evidence spans docs/reference/job-layout.md, domain docs for POA and precon, and services/workflow. Domain-specific implementations should link back here when explaining why their jobs escalate into review surfaces.
Tradeoffs
Human repair introduces more state than a fail-fast script. That state is the point: operational work needs to be auditable, resumable, and visible months later.
Visual Notes
The target visual is a state transition diagram from job run to artifact, issue, human action, and resumed execution.
Source Evidence
docs/reference/job-layout.mddocs/domains/poa.mddocs/domains/preconstruction.mdservices/workflow