diff --git a/README.md b/README.md
index cd9c9d6..ed6ca23 100644
--- a/README.md
+++ b/README.md
@@ -107,7 +107,7 @@ calibrations or applied model/device changes. See
[Step-09 worker report](prompts/Step-09-Report.md). Step-09 was accepted on
2026-10-30.
-### Implemented, pending manual review
+### Accepted isolated programming rehearsal milestone
Step-10 adds an explicit isolated Simulation rehearsal within `/calibration`.
Its real mutable logical image supports independent volatile backup,
@@ -115,15 +115,25 @@ source/head/revision-bound single-use approval, atomic CAS, full readback,
read-only reconciliation and separately approved original Restore. It never
applies authoring values to a dynamics configuration or a physical target.
See [rehearsal contracts](docs/calibration-rehearsal.md) and the
-[Step-10 worker report](prompts/Step-10-Report.md). Step-10 remains pending
-manual orchestrator review.
+[Step-10 worker report](prompts/Step-10-Report.md).
Step-10A corrects close ownership while a new rehearsal factory return is
pending: a newly admitted opening lifetime cannot reuse the previous close
completion, and Close/disposal drains its actual owner before returning.
The [corrective report](prompts/Step-10A-Report.md) records controlled
-pre/post behavior and native recheck. Step-10 remains not accepted pending
-manual review of the correction; no programming scope or limits were added.
+pre/post behavior and native recheck. Corrected Step-10/10A was accepted on
+2026-10-31; no programming scope or limits were added by the correction.
+
+### Implemented, pending manual review
+
+Step-11 adds `/runbooks`: strict manual schema-v1 JSON validation against an
+explicit current synthetic authoring source/head, complete template rules
+and exact read-only candidate/diff preview. Invalid input retains the last
+successful preview, and source changes label it Stale without rebasing.
+There is no model, retrieval, authoring Save, approval, target access or runbook
+execution. See [runbook schema/preview contracts](docs/runbooks-v1.md) and the
+[Step-11 worker report](prompts/Step-11-Report.md). Step-11 remains pending
+manual orchestrator review.
### Planned
@@ -148,7 +158,8 @@ The application slices provide explicit target metadata resolution,
vehicle-profile metadata import/list/select/export, dynamics configuration
catalog/import/export, simulation-only diagnostic sessions, bounded session
recording, archive inspection, offline recorded replay, synthetic calibration
-authoring, isolated simulated programming rehearsal and a shared display-unit preference with a
+authoring, isolated simulated programming rehearsal, deterministic read-only
+runbook preview and a shared display-unit preference with a
native local-preference adapter. The Client
composes separate static and dynamics synthetic providers through
provider-neutral factory contracts and a session-lifetime in-memory profile/
@@ -264,6 +275,7 @@ acceptance remains the orchestrator's responsibility.
- [Recorded telemetry replay](docs/telemetry-replay.md)
- [Synthetic calibration authoring](docs/calibration-authoring.md)
- [Verified simulated programming rehearsal](docs/calibration-rehearsal.md)
+- [Manual runbook schema v1 and read-only preview](docs/runbooks-v1.md)
- [Vehicle-profile schema v1 and usage](docs/vehicle-profile-schema-v1.md)
- [Build, tests and native smoke guide](docs/build-and-test.md)
- [ADR-0001: historical .NET foundation](docs/adr-0001-headless-foundation.md)
diff --git a/docs/README.md b/docs/README.md
index c25daba..2a2a9d0 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -16,9 +16,11 @@ Step-08 is accepted. Step-09 adds bounded synthetic scalar/table authoring with
immutable source-bound proposals and exact diffs, without model/device changes.
Step-09 is accepted. Step-10 adds isolated simulated image backup/approval/
CAS/readback/reconciliation/Restore, without dynamics or physical application.
-Step-10 worker status remains pending manual orchestrator review.
Step-10A corrects the pending-reopen close/disposal completion lifetime.
-Original Step-10 evidence is preserved; acceptance awaits corrective review.
+Corrected Step-10/10A is accepted. Step-11 adds strict deterministic manual
+runbook JSON/source/head validation and immutable read-only previews.
+Step-11 worker status remains pending manual orchestrator review; no inference
+or execution feature is implemented.
- [Architecture](architecture.md): actual nine-project graph, responsibilities,
route ownership and provider/reference boundaries.
@@ -45,6 +47,9 @@ Original Step-10 evidence is preserved; acceptance awaits corrective review.
- [Verified simulated programming rehearsal](calibration-rehearsal.md): typed
isolated target, independently verified supported-image backup, immutable
single-use approval, exact readback/recovery and bounded volatile audit.
+- [Manual runbook schema v1 and read-only preview](runbooks-v1.md): exact
+ allowlisted fields/limits, current authoring source/head/template validation,
+ canonical immutable diff, source staleness and no execution authority.
- [ADR-0001: Headless .NET 10 foundation](adr-0001-headless-foundation.md):
historical foundation decisions; dual-shell/deferred-host decision superseded.
- [ADR-0002: Single native shell and feature slices](adr-0002-single-shell-vsa.md):
@@ -81,5 +86,6 @@ historical/worker reports for their own execution evidence:
[Step-08 worker report](../prompts/Step-08-Report.md) and
[Step-09 worker report](../prompts/Step-09-Report.md) and
[Step-10 worker report](../prompts/Step-10-Report.md) and
-[Step-10A corrective report](../prompts/Step-10A-Report.md).
+[Step-10A corrective report](../prompts/Step-10A-Report.md) and
+[Step-11 worker report](../prompts/Step-11-Report.md).
Handoffs are manual; acceptance remains the orchestrator's responsibility.
diff --git a/docs/architecture.md b/docs/architecture.md
index 3391a51..e672600 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -14,7 +14,9 @@ Step-08 adds archive-only recorded replay with exact prefix reduction and one
page-owned cancellable clock and is accepted. Step-09 adds source-bound,
process-memory synthetic calibration authoring and is accepted. Step-10 adds
isolated simulated programming rehearsal with independent backup and full
-readback/recovery. Step-10 remains pending manual review; execution is not acceptance.
+readback/recovery and is accepted after Step-10A. Step-11 adds strict read-only
+manual runbook validation/preview. Step-11 remains pending manual review;
+execution evidence is not acceptance.
```mermaid
flowchart TD
@@ -49,7 +51,7 @@ All nine projects are in [AutoForge.slnx](../src/AutoForge.slnx):
| [Core](../src/AutoForge.Core/AutoForge.Core.csproj) | `net10.0`; platform-neutral target/profile invariants, immutable dynamics contracts and bounded synthetic calibration definition/value/applicability validation | None |
| [Diagnostics](../src/AutoForge.Diagnostics/AutoForge.Diagnostics.csproj) | `net10.0`; diagnostic contracts/protocol/trace plus a separate narrow typed simulated-calibration target port | Core |
| [Simulation](../src/AutoForge.Simulation/AutoForge.Simulation.csproj) | `net10.0`; static/dynamic providers and a separate mutable logical calibration rehearsal image/CAS owner | Core, Diagnostics |
-| [Application](../src/AutoForge.Application/AutoForge.Application.csproj) | `net10.0`; target/profile/diagnostics/dynamics coordination, units/dashboard/recording/replay, authoring and guarded rehearsal workflow | Core, Diagnostics |
+| [Application](../src/AutoForge.Application/AutoForge.Application.csproj) | `net10.0`; target/profile/diagnostics/dynamics coordination, units/dashboard/recording/replay, authoring/rehearsal and strict read-only runbook preview | Core, Diagnostics |
| [Components](../src/AutoForge.Components/AutoForge.Components.csproj) | `net10.0` RCL; generic `StatusNotice` and numeric/bar gauge with accessible state and safe rendering | None |
| [UI](../src/AutoForge.UI/AutoForge.UI.csproj) | `net10.0` RCL; all application routes, navigation, layout and presentation, including shared dashboard and recording/archive inspection controls | Application, Components, Diagnostics |
| [Client](../src/AutoForge.Client/AutoForge.Client.csproj) | `net10.0-windows10.0.26100.0`; only MAUI Blazor Hybrid application executable, native preference adapter and app-local archive root | Application, Simulation, UI |
@@ -92,6 +94,7 @@ assembly, not the native Client assembly.
| `/simulation` | `Features/Vehicles/Simulation/SimulationPage.razor` | Explicit profile/config/provider selection, JSON import/export, stopped-by-default dynamics session, lifecycle/step/pacing/scenario controls, source/unit/quality/model-time/config/run-aware telemetry over diagnostic protocol v2, and the same dashboard and recording/archive controls |
| `/telemetry-replay` | `Features/Vehicles/Telemetry/Replay/TelemetryReplayPage.razor` | Strict saved capture selection/load, distinct RecordedReplay instance and immutable original metadata, exact time/ordinal prefix navigation, one cancellable clock, partial acknowledgement and shared recorded numeric/bar gauges |
| `/calibration` | `Features/Vehicles/Calibration/CalibrationPage.razor` | Explicit configuration-derived synthetic baseline, immutable Proposed history, complete scalar/table validation, exact head/source tokens and diffs, pinned torque-unit drafts; no application or programming |
+| `/runbooks` | `Features/Vehicles/Runbooks/RunbookPage.razor` | Manual schema-v1 input/template, explicit validation and immutable canonical preview/diff with current/Stale source status; no Save, approval, target/model/command access |
| Any unmatched route | `Features/Foundation/NotFoundPage.razor` via UI `Routes.razor` | Explicit not-found page and supported navigation |
The generic [StatusNotice](../src/AutoForge.Components/StatusNotice.razor)
@@ -217,6 +220,21 @@ and [simulation guide](simulation.md).
## Honest limitations and safety boundaries
+The runbook slice receives only `CalibrationAuthoringService`, using its
+read-only immutable snapshot and narrow current-head guard. Application owns
+the strict bounded allowlisted parser, complete template validation and pure
+exact diff. All syntax/source/value checks precede last-success publication
+under the actual current-head guard. The preview service retains only one
+successful immutable result and computes source freshness from the actual
+current snapshot, without rebasing. Snapshot reading releases the preview gate
+before reading the source gate; no inverse lock ordering is introduced.
+The UI separately owns manual input/errors and last-successful preview labels,
+and source/unit notifications only rerender. It never validates on render.
+The slice has no diagnostic/rehearsal/transport/model/archive/network dependency
+or Save/approval/Execute control. Step-12 generated text must eventually use
+this same strict boundary; inference/retrieval is not implemented.
+See [runbook schema/preview contracts](runbooks-v1.md).
+
The authoring slice has only configuration/profile read dependencies. Core
owns defensively copied applicability, definition and value contracts for the
single synthetic engine template. Application's singleton
diff --git a/docs/build-and-test.md b/docs/build-and-test.md
index d07a3b7..b761784 100644
--- a/docs/build-and-test.md
+++ b/docs/build-and-test.md
@@ -45,12 +45,46 @@ dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.cs
dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~CalibrationAuthoringTests"
dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~CalibrationRehearsalTests|FullyQualifiedName~RenderedRehearsal|FullyQualifiedName~RehearsalIsolation|FullyQualifiedName~CalibrationAuthoringTests"
dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~CalibrationRehearsalReopenTests|FullyQualifiedName~CalibrationRehearsalTests|FullyQualifiedName~RenderedRehearsal|FullyQualifiedName~RehearsalIsolation"
+dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~RunbookPreviewTests|FullyQualifiedName~RunbookUi_|FullyQualifiedName~RunbookIsolation_"
```
+## Step-11 deterministic runbook preview verification
+
+Corrected Step-10/10A is accepted; Step-11 remains pending manual review.
+The focused runbook command passed **105 cases**, including exact source/head/
+candidate/diff vectors, every schema object's missing/duplicate/unknown fields,
+wrong kinds/integers/allowlist/identity/unit/axis/full-shape vectors, defensive
+copies, stale result retention, safe rendered rationale and no auto validation.
+Input at exactly 131072 UTF-8 bytes succeeds; one more fails without replacing
+the last preview. Rationale 2000/2001 and step-ID 128/129 UTF-16 boundaries,
+supplementary Unicode, invalid encoding/escapes and parser depth 32/33 are
+asserted separately. Tiny canonical differences are not rounded away.
+
+The required sequential nine-project Release build passed with **0 warnings,
+0 errors**; the complete suite passed **179 unit + 368 integration = 547 cases**,
+zero failed/skipped, preserving all 442 baseline cases. Real live diagnostics/
+dynamics, saved recording, validated replay and a pending approved rehearsal
+remain unchanged across template/valid/invalid preview invocation. Counted
+transport/model/archive-Save/rehearsal open/read/write deltas are zero; authoring
+change notifications and history mutations are zero, with unchanged approval,
+source export, trace/state, archive bytes and replay snapshot.
+
+Native smoke on the rebuilt Client verified empty-source rejection, explicit
+source/template with no auto preview, NoChanges, exact 650->1250/+600 rpm and
+360->350/-10 N*m candidate/diff, safe rationale text and display-only units.
+Malformed, physical-target, wrong-head and invalid-value inputs visibly rejected
+while retaining the previous preview ID and exact diff. An explicit authoring
+head change marked that captured result Stale; old input rejected and a new
+template still did not validate until the explicit action. Current Proposed
+head revalidation produced NoChanges without another authoring version.
+Source export stayed identical and original preferences/old routes worked.
+This normal UI evidence is not headless exact-limit/coexistence proof.
+See the [Step-11 worker report](../prompts/Step-11-Report.md).
+
## Step-10A pending-reopen close ownership verification
-Step-10 remains not accepted pending manual corrective review. Original
-Step-10 results below and its worker report are preserved.
+Corrected Step-10/10A is accepted. Original corrective results below and the
+worker reports are preserved.
Before the fix, the two `PendingReopenCloseOrDispose_DrainsCurrentOwnerWithoutPriorCompletionReplay`
cases executed against the actual Simulation factory and failed with:
@@ -86,8 +120,8 @@ Exact commands, observations, cleanup and limitations are in the
## Step-10 simulated programming rehearsal verification
-Step-09 is accepted; Step-10 remains pending manual review. The final focused
-command passed **86 cases**: 31 new rehearsal cases plus 55 accepted authoring
+Step-09 and corrected Step-10/10A are accepted. The historical focused
+Step-10 command passed **86 cases**: 31 new rehearsal cases plus 55 accepted authoring
cases. They use actual Simulation target storage/CAS through typed Diagnostics
ports, real authoring/configuration/profile services and controlled forwarding
faults. Independent backup, complete scalar/table readback, immutable approval,
diff --git a/docs/calibration-rehearsal.md b/docs/calibration-rehearsal.md
index ae7914c..e4398de 100644
--- a/docs/calibration-rehearsal.md
+++ b/docs/calibration-rehearsal.md
@@ -152,7 +152,7 @@ values or dispatch commands.
## Verification status
-Step-09 is accepted; Step-10 remains pending manual review. Real-port tests
+Step-09 and corrected Step-10/10A are accepted. Real-port tests
exercise independent backup, exact scalar/table/CAS/Restore, malformed/stale
requests, real commit with lost acknowledgement/cancel/read failure, full
unchanged-cell checks, reconciliation, held cleanup and exact 32/33 capacity.
diff --git a/docs/runbooks-v1.md b/docs/runbooks-v1.md
new file mode 100644
index 0000000..0431179
--- /dev/null
+++ b/docs/runbooks-v1.md
@@ -0,0 +1,154 @@
+# Manual runbook schema v1 and read-only preview
+
+## Preview only
+
+Open `/runbooks` from shared navigation. Supply manual structured JSON, then
+choose **Validate / Preview explicitly**. Entry, rendering and unit changes do
+not create a workspace, template or preview. There is no LLM/model/runtime,
+retrieval/network/upload, authoring Save, approval, target read/write or runbook
+execution. Validation produces no authorization token or saved authoring
+revision. Rationale is informational text, never instructions or policy.
+
+First explicitly create a synthetic configuration-derived authoring workspace
+through the existing simulation/calibration UI. **Create input template from
+current authoring source** copies that actual immutable workspace/head and
+complete canonical values into an input draft. It does not validate or save.
+Missing source gives a visible error, not a seeded/default/live fallback.
+Both current Baseline and current Proposed authoring heads can be preview sources.
+
+## Exact object fields
+
+All fields below are required, exact camelCase. Every schema object rejects
+missing, duplicate or unknown properties, including escaped duplicate names.
+Comments, trailing commas/data, incorrect JSON kinds and unsupported tokens
+are handled typed errors. No SQL/script/frame/offset/approval/execution property
+is allowed at any schema level.
+
+### Root
+
+| Field | Contract |
+|---|---|
+| `schemaVersion` | JSON Int32 integer exactly 1, not string/fraction/exponent syntax |
+| `runbookIdentifier` | Lowercase GUID in `N` format, exactly 32 characters |
+| `targetKind` | Exact string `simulation`; this is not target access/permission |
+| `rationale` | String, empty permitted, at most 2000 UTF-16 code units |
+| `steps` | Array with exactly one step |
+
+### Step
+
+| Field | Contract |
+|---|---|
+| `stepIdentifier` | Explicit nonblank trimmed string, 1..128 UTF-16 code units |
+| `operation` | Exact `proposeCalibration`, read-only preview only |
+| `source` | Complete source object below |
+| `values` | Complete scalar/table value object below, not a partial patch |
+
+### Source
+
+Exactly:
+
+- `workspaceIdentifier`, `expectedHeadIdentifier`
+- `profileIdentifier`, `profileRevision`
+- `configurationIdentifier`, `moduleIdentifier`
+- `modelIdentifier`, `modelVersion`
+- `definitionIdentifier`, `definitionRevision`
+
+Revision/version fields are positive JSON Int32 integers. Other source fields
+are explicit nonblank trimmed strings and must match the actual current
+authoring workspace/head/applicability. Profile/module comparison retains
+existing ordinal case-insensitive policy. Configuration fingerprint, model/
+definition identifiers, workspace/head identities, logical keys and units are
+exact. No module role, catalogue, live feed or latest-head resolution can fill
+or replace a supplied source field.
+
+### Values
+
+The values object contains exactly `scalars` and `tables` arrays.
+Each scalar object contains exactly `logicalIdentifier`, `unit`, `value`.
+Each table object contains exactly `logicalIdentifier`, `unit`, `axisUnit`,
+`axis`, `cells`; axis/cells are arrays of finite JSON numbers.
+
+The existing full [synthetic authoring template](calibration-authoring.md)
+validates the complete candidate:
+
+- Exactly one `engine.warm-idle-target` scalar in source rpm, finite and in the
+ inclusive selected model IdleSpeedRpm..MaximumEngineSpeedRpm range.
+- Exactly one `engine.torque-curve` table, source N*m cells and fixed source
+ rpm axis copied exactly from the selected configuration. All 2..32 rows,
+ units and counts must match. Every cell is finite in inclusive [1,1000].
+- No axis edit/reordering/sorting/insertion/deletion, clipping, interpolation,
+ arbitrary key or display-unit conversion is performed.
+
+JSON is always canonical source units even when global display is Imperial.
+For the warm example, 650->1250 rpm and 2000-rpm torque 360->350 N*m produce
+exactly two diff entries: scalar +600 rpm and table -10 N*m. Unchanged cells/
+axes are omitted. Read-only display conversion can show lbf*ft alongside the
+canonical candidate but never changes JSON, bounds or diff.
+
+## Exact bounds and handled errors
+
+| Limit | Maximum |
+|---|---:|
+| Original complete input, UTF-8 encoding | 131072 bytes (128 KiB) |
+| JSON parser nesting depth | 32 |
+| Rationale | 2000 UTF-16 code units |
+| Step identifier | 128 trimmed UTF-16 code units, minimum 1 |
+
+Input size is not string.Length. Supplementary Unicode uses two UTF-16 code
+units per character and its actual UTF-8 byte size for the independent payload
+bound. Otherwise valid JSON with whitespace at exactly 131072 bytes is accepted;
+one extra byte is rejected. Non-finite/invalid-number, invalid encoding,
+malformed syntax and depth-overflow inputs never produce a healthy default.
+
+Errors expose a typed failure, JSON/source/value path and readable reason:
+InvalidJson, LimitExceeded, UnsupportedSchema, SchemaViolation,
+OperationNotAllowed, SourceUnavailable, StaleSource or InvalidValues.
+The UI identifies rejected draft input separately from the preserved previous
+successful preview. An invalid attempt does not replace valid source/head/
+history/candidate/diff state.
+
+## Immutable result and current versus Stale
+
+The last successful preview contains copied preview/runbook/step/source/head
+identity, rationale, captured head kind/revision/content, complete canonical
+candidate, deterministic exact logical-ID/axis-ordered diff and:
+
+- **NoChanges**: exact captured head content and empty diff;
+- **ChangesProposed**: changed preview, not a saved Proposed revision or a
+ Tested/Approved/Applied result.
+
+Parsing, allowlist, source/reference and full template validation all precede
+publication under the actual authoring current-head guard. Only one successful
+result is retained in process memory; there is no runbook repository, history,
+Git backup, disk persistence, branch or merge layer. Snapshots/collections are
+defensive/read-only. Canonical double comparisons have no display tolerance,
+so a tiny representable change still yields its exact signed delta.
+
+When shown, source freshness is compared separately with the actual current
+workspace/head/applicability and captured content. A changed/replaced source
+labels the immutable old preview **Stale**, without rewriting it or the draft,
+running validation on render or granting current execution authority.
+Supply explicit updated input and revalidate to obtain a new current preview.
+A new template is only a draft and does not clear staleness by itself.
+
+The page owns its unsaved input/error state; source and global-unit
+notifications only rerender. Leaving the route loses that draft, while the
+bounded last-successful preview remains in the running app and is labeled
+separately on re-entry. Restart loses the preview. A future executor would
+need independent fresh checks/approval; no executor is implemented here.
+
+## Verification and next boundary
+
+Tests use actual authoring/profile/configuration services, independent exact
+value/diff vectors, all schema/source/value/limit boundaries, defensive copies,
+source staleness, actual rendered controls and safely escaped rationale.
+Real live diagnostics/recording/replay/approved-rehearsal instances coexist
+around feature invocation with zero unassigned calls or mutations.
+Native normal UI evidence is separate from headless boundary/coexistence proof.
+See [build/test evidence](build-and-test.md) and the
+[Step-11 worker report](../prompts/Step-11-Report.md).
+
+Corrected Step-10/10A is accepted; Step-11 remains pending manual review.
+Step-12 local inference/knowledge and later executor integration remain future
+and unimplemented. Any future generated text must use this same strict
+parser/validator, not a privileged alternate mutation path.
diff --git a/prompts/ROADMAP.md b/prompts/ROADMAP.md
index 8d7a9ad..468b93e 100644
--- a/prompts/ROADMAP.md
+++ b/prompts/ROADMAP.md
@@ -3,9 +3,9 @@
## Status and authority
- Initialized: 2026-10-28.
-- Current phase: corrected programming rehearsal accepted; deterministic runbook validation/preview next.
-- Active assignment: [Step-11](Step-11.md), ready for manual worker execution.
-- Last accepted milestone: Step-10 with Step-10A, accepted 2026-10-31.
+- Current phase: deterministic runbook preview accepted; bounded local-only AI generation next.
+- Active assignment: [Step-12](Step-12.md), ready for manual worker execution.
+- Last accepted milestone: Step-11, accepted 2026-10-31.
- Last accepted correction: Step-10A; all Step-10 findings closed.
- Outstanding corrections: none.
- Step-05 status: ACCEPTED after Step-05A/Step-05B, 2026-10-29.
@@ -14,8 +14,9 @@
- Step-08 status: ACCEPTED 2026-10-30; no Step-08A required.
- Step-09 status: ACCEPTED 2026-10-30; no Step-09A required.
- Step-10 status: ACCEPTED after Step-10A, 2026-10-31.
-- Step-11 status: READY FOR WORKER; deterministic simulation runbook validation/preview only.
-- Step-12 status: local AI/knowledge integration; BLOCKED / NOT ASSIGNED until the validation boundary is accepted.
+- Step-11 status: ACCEPTED 2026-10-31; no Step-11A required.
+- Step-12 status: READY FOR WORKER; local-only model-generated calibration preview with exact applicable synthetic context.
+- Step-13 status: comparative demonstration; BLOCKED / NOT ASSIGNED until local generation acceptance.
- Current state and handoff: [STATE.md](STATE.md).
- Authority: the master charter, repository/handoff amendment, and the owner's
2026-10-28 architectural realignment. The latest decision cancels the dual-shell
@@ -256,6 +257,28 @@ approve a mutation or execute a runbook. A valid preview is not an authorization
token or target verification. Later inference may propose structured data;
existing deterministic source/head/template and approval checks remain required.
+### Step-12 first local inference provider
+
+Accepted Step-11 is now the authoritative generated-output validator.
+Step-12 adds one opt-in local-only Ollama HTTP provider and a bounded synthetic
+knowledge lookup for that same one-step calibration preview. The model is
+explicitly selected from an existing installed catalogue; there is no default
+cloud model, pull/install/update, tool execution or inference on page entry.
+
+Production HTTP stays on loopback, without proxy/redirect or cloud fallback.
+Ollama itself supports cloud delegation, so loopback alone is insufficient:
+the operator must configure local-only mode, and remote/cloud model metadata
+must be rejected. Runtime/model prerequisites and real local-generation/native
+evidence are required; a stub response cannot satisfy those checks.
+No model runtime has been started or verified by the orchestrator.
+
+Knowledge is a small explicit source/definition-matched synthetic policy pack
+plus actual source/head/values/bounds, not broad vehicle research or a vector
+database. Generated text passes the existing strict validator unchanged; it
+cannot approve/execute/save or overwrite a newer manual preview.
+Larger diagnostic/scenario/knowledge capabilities remain future slices, not
+claimed by this first provider. No future numbering changes in this handoff.
+
## Architecture baseline
### Existing accepted foundation, preserved
@@ -450,8 +473,10 @@ Step-09 authoring is accepted: exact source binding, immutable linear proposals,
atomic validation/head checks, precise diffs and zero source side effects are
supported. Corrected Step-10/10A is accepted: isolated target backup/approval/
CAS/readback/recovery and current-lifetime close drainage are supported.
-Step-11 is the only active assignment for deterministic runbook preview;
-local inference/knowledge is the following Step-12, not bundled into validation.
+Step-11 deterministic runbook validation/preview is accepted: strict schema/
+limits/allowlist/source-head/template, exact immutable diff and no-side-effect
+behavior are supported. Step-12 is the only active assignment for the first
+local-only model/context-generated calibration preview; no executor is assigned.
Dependencies indicate acceptance prerequisites, not permission for automatic
handoff. Later assignments refine these scopes using actual implementation
evidence; they must not silently discard required capabilities.
@@ -480,9 +505,9 @@ evidence; they must not silently discard required capabilities.
| 09 | Synthetic calibration authoring and immutable proposals | 08 accepted | ACCEPTED 2026-10-30 | Real configuration/profile binding, immutable scalar/table proposals, exact diffs/stale-head/limits and no source mutation; reported 179 unit/226 integration passes |
| 10 | Verified simulated programming and recovery | 09 accepted | ACCEPTED 2026-10-31 AFTER 10A | Isolated supported-image backup, exact approval/CAS/full readback/reconcile/Restore and current close ownership; no physical writes/model application |
| 10A | Close/disposal ownership during pending rehearsal reopen | 10 review C-07/C-11 | ACCEPTED 2026-10-31 | Old close task retired at admission, disposed/generation guards and atomic close completion; actual pre-fix/controlled cleanup plus reported 179 unit/263 integration passes |
-| 11 | Deterministic simulation runbook validation and preview | 10 and corrections accepted | READY FOR WORKER | Strict bounded schema-v1/allowlist/source-head/template validation, immutable exact proposal preview and stale status; no model, save, approval or execution |
-| 12 | Local AI and applicable knowledge integration | 11 accepted | BLOCKED / NOT ASSIGNED | Replaceable local inference/context returns structured data through the accepted validator; missing/disconnected/invalid outcomes explicit, no bypass of mutation approval |
-| 13 | Comparative evaluation and complete synthetic demonstration | 12 | PLANNED | Complete demonstration below plus deterministic fault/regression matrix and independent verification of intended and unintended changes |
+| 11 | Deterministic simulation runbook validation and preview | 10 and corrections accepted | ACCEPTED 2026-10-31 | Strict schema/limits/allowlist/source-head/template, immutable preview/diff/staleness and no execution; reported 179 unit/368 integration passes |
+| 12 | Local AI and applicable knowledge integration | 11 accepted | READY FOR WORKER | Opt-in loopback-only installed Ollama model and matched synthetic context generate one unchanged-validator preview; no cloud/tool/write execution or late manual-preview overwrite |
+| 13 | Comparative evaluation and complete synthetic demonstration | 12 accepted | BLOCKED / NOT ASSIGNED | Complete demonstration below plus deterministic fault/regression matrix and independent verification of intended and unintended changes |
| 14 | Verified OBDX Pro GT read-only integration | 13 plus documented device research/access | PLANNED / HARDWARE GATE | Source-backed device support matrix, explicit physical target, real read-only identification/diagnostics/telemetry recording where supported; no write path |
| 15 | Advanced dashboards, analysis, and comparisons | 13; 14 for real captures | PLANNED | Persist configurable layouts/thresholds, linked charts, larger-capture analysis, raw-data inspection and multi-run/multi-vehicle comparisons with lineage/uncertainty |
| 16 | Broader diagnostic protocols and hardware adapters | 14 | PLANNED | Conformance-backed additional CAN/ISO-TP/UDS/KWP2000/J2534 or legacy adapters where verified; same application ports and capability restrictions |
@@ -956,20 +981,39 @@ history, not repeated redesign without evidence.
- Prepared [Step-11](Step-11.md), separating deterministic runbook validation/
preview from subsequent Step-12 local inference/knowledge. Only unassigned
future envelopes/dependencies shifted; completed history is unchanged.
+- Reviewed Step-11's entire parser/source/current-head/preview/staleness/UI flow,
+ all new tests, docs and Release artifacts. Worker reports 179 unit +
+ 368 integration passes (547 total, zero failed/skipped), clean complete Release
+ build and native exact preview/rejection/stale/no-source-mutation evidence.
+- Accepted Step-11 against its frozen ten-case/five-criterion matrix without
+ Step-11A. The orchestrator ran no application checks; native and controlled
+ exact-limit/no-side-effect proof remain distinct.
+- Prepared [Step-12](Step-12.md) for one local-only provider/context/validated
+ generation owner. Runtime prerequisites, remote-delegation exclusions, strict
+ output/source/manual-preview guards and real-model evidence are frozen.
+ No inference installation or future renumbering was performed.
### Remaining
-- Worker execution of Step-11, then review its frozen schema/allowlist/source/
- head/template/preview/no-side-effect matrix and shared quality gate.
- Correct genuine unmet requirements as Step-11A before local inference.
-- Step-12 AI is blocked and not assigned. Runbook preview is assigned work,
- not implemented functionality; programming rehearsal and earlier work are accepted.
+- Worker execution of Step-12, then review its frozen local-only/model/context/
+ generation/validator/owner matrix and shared quality gate. Correct genuine
+ unmet requirements as Step-12A before comparative demonstration.
+- Step-13 demonstration is blocked and not assigned. AI generation/context is
+ assigned work, not implemented functionality; runbook validation and earlier
+ work are accepted.
- Profile/module metadata, synthetic virtual-module communication and deterministic
dynamics/v2 and corrected dashboard are accepted; later features remain planned.
Preserve the complete sequence/safety gates.
### Known blockers and uncertainties
+No blocking Step-11 deficiency was identified against its frozen contract.
+Step-12 needs an existing operator-approved local-only Ollama runtime and local
+completion model for real generation smoke. The orchestrator verified current
+public API/cloud-local-only documentation, not runtime/model availability.
+Absent prerequisites mean BLOCKED/INCOMPLETE model checks, not permission to
+install/pull/update or substitute a mock/cloud inference service.
+
No blocking Step-10 deficiency remains. Its pending-reopen finding below is
historical and closed by accepted Step-10A:
@@ -1000,7 +1044,7 @@ Save-followup refresh is still pending during host navigation. That unchanged
recording flow is outside Step-08; no replay check is claimed to cover/fix it.
Native preparation was restarted and final-binary replay passed without the
error overlay. Retain the issue for a separately scoped recording follow-up,
-not a retrospective replay/authoring criterion or automatic Step-11 cleanup.
+not a retrospective replay/authoring criterion or automatic Step-12 cleanup.
No blocking Step-07 deficiency remains. Its source-close follow-up below is
historical and closed by accepted Step-07B:
diff --git a/prompts/STATE.md b/prompts/STATE.md
index 5e4f766..e2d1752 100644
--- a/prompts/STATE.md
+++ b/prompts/STATE.md
@@ -5,13 +5,13 @@
| Field | Value |
|---|---|
| Updated | 2026-10-31 |
-| Phase | Corrected programming rehearsal accepted; deterministic runbook preview next |
-| Active step | Step-11 - Deterministic simulation runbook validation and preview |
-| Assignment | [Step-11.md](Step-11.md) |
+| Phase | Deterministic runbook preview accepted; bounded local-only AI generation next |
+| Active step | Step-12 - Local AI and applicable knowledge integration |
+| Assignment | [Step-12.md](Step-12.md) |
| Assignment status | READY FOR WORKER / AWAITING MANUAL HANDOFF |
-| Expected worker report | `prompts/Step-11-Report.md` - not yet created |
+| Expected worker report | `prompts/Step-12-Report.md` - not yet created |
| Last accepted correction | Step-10A - accepted 2026-10-31 |
-| Last accepted major milestone | Step-10 with Step-10A - accepted 2026-10-31 |
+| Last accepted major milestone | Step-11 - accepted 2026-10-31 |
| Outstanding corrections | None |
| Step-02 status | ACCEPTED after Step-02A |
| Step-03 status | ACCEPTED after Step-03A/Step-03B |
@@ -25,10 +25,11 @@
| Step-08 status | ACCEPTED 2026-10-30; no correction required |
| Step-09 status | ACCEPTED 2026-10-30; no correction required |
| Step-10 status | ACCEPTED after Step-10A |
-| Step-11 status | READY FOR WORKER; deterministic simulation runbook preview only |
-| Step-12 status | Local inference/knowledge; BLOCKED until validator acceptance |
-| Worker execution | Step-10A returned and accepted; Step-11 not invoked |
-| Immediate next action | User manually directs the worker to execute Step-11 and shared quality gate only |
+| Step-11 status | ACCEPTED 2026-10-31; no correction required |
+| Step-12 status | READY FOR WORKER; local-only one-step calibration generation/preview |
+| Step-13 status | Comparative demonstration; BLOCKED until Step-12 acceptance |
+| Worker execution | Step-11 returned and accepted; Step-12 not invoked |
+| Immediate next action | User manually directs the worker to execute Step-12 and shared quality gate only |
| Next orchestrator action | After manual return, inspect the assignment, report, implementation, tests, Git changes, documentation and recorded command evidence |
## Repository baseline at initialization
@@ -1230,6 +1231,57 @@ implemented/assigned in this slice. Current domain source/head/target checks
remain necessary; the earlier Git discussion did not authorize a persistence
rewrite of the accepted volatile rehearsal.
+## Step-11 acceptance
+
+Decision: **ACCEPTED**, 2026-10-31. Frozen C-01..C-10/AC-01..AC-05 are satisfied
+on reviewed source and worker evidence. No Step-11A is required.
+
+Reviewed [Step-11](Step-11.md), its [report](Step-11-Report.md), the entire strict
+parser/current-source/head/template/diff/publication/freshness implementation,
+actual template/validation/error/stale UI, all three new test files,
+docs/README, graph and existing Release outputs.
+
+| Criterion | Decision | Evidence |
+|---|---|---|
+| AC-01 | ACCEPTED | Required/duplicate/unknown/type/version/operation/target/source/full-template guards, exact UTF-8/UTF-16/depth limits and independent typed atomic negative vectors |
+| AC-02 | ACCEPTED | Exact canonical scalar/table/multi-cell/reverse/tiny diffs, copied one-preview retention, current-head guarded publication and immutable prior preview with explicit Stale status |
+| AC-03 | ACCEPTED | Actual rendered/native template/Validate/error/source/stale/safe-rationale/units path and counted real live/recording/replay/approved-rehearsal zero-call/state preservation |
+| AC-04 | ACCEPTED ON WORKER EXECUTION EVIDENCE | Reported complete nine-project Release build zero warnings/errors; 179 unit + 368 integration passes (547 total, zero failed/skipped), native exact manual preview/rejection/source isolation |
+| AC-05 | ACCEPTED | Executable matrix, own post-green source-path/Unicode/type/full-shape additions, aligned docs/history/protection/dependency/manual workflow preserved |
+
+The 105 added integration cases preserve all 442 prior cases. The service
+depends only on actual authoring state, reuses complete template/diff/current-
+head helpers and releases its own snapshot gate before reading authoring state.
+It neither saves nor generates authority; invalid inputs retain prior success.
+
+The orchestrator ran no application builds/tests/native/workload commands.
+Source-case inventory, unchanged graph and existing outputs corroborate worker
+evidence, not independent runtime verification. Native limits/coexistence
+claims remain separated from controlled tests.
+
+## Step-12 local-only generation handoff
+
+[Step-12](Step-12.md) introduces one explicit installed Ollama model over
+loopback HTTP, a matched synthetic policy/context pack and one cancellable
+generation owner. It produces only the existing read-only calibration runbook
+preview, through the unchanged authoritative validator.
+
+The HTTP client must not use remote/cloud URLs, proxies, redirects, credentials
+or tool calls. Ollama can relay cloud models even through its local API:
+operator local-only configuration/acknowledgement and remote-model metadata
+rejection are required. The orchestrator checked official API/local-only docs,
+not installed runtime/model availability.
+Use an existing approved runtime/model; do not install/pull/start/update shared
+services or count stub HTTP output as real LLM/native evidence.
+
+Capture explicit source/head/model/digest/knowledge context and prior-preview
+identity at request start. Cancellation, source changes, model eligibility/
+identity changes or a newer manual preview cannot yield stale successful
+publication. No output repair/rebinding, proposal Save, approval, target write,
+physics action or knowledge-based permission is introduced.
+Missing/disconnected/invalid output remains a typed visible failure, while all
+manual/core workflows remain available without a model.
+
## Prerequisites, limitations, and known issues
- Step-01A worker evidence establishes portable and native Windows compatibility
@@ -1257,23 +1309,28 @@ rewrite of the accepted volatile rehearsal.
202-/207-case reports and original numerical/native evidence distinctly.
- Profile metadata/UI, synthetic diagnostics, deterministic dynamics/v2 and the
corrected dashboard/display units/recording archive/replay/authoring are accepted.
- Corrected simulated programming is accepted. Runbook validation/preview,
- local inference/knowledge and physical hardware operations remain unimplemented.
+ Corrected simulated programming and deterministic runbook preview are accepted.
+ Local inference/knowledge generation and physical hardware operations remain
+ unimplemented.
+- Step-12 real-model smoke needs operator-provided local-only Ollama and an
+ installed local completion model. No runtime/model installation, pull, service
+ start/update or cloud use is authorized by this handoff. Report exact missing
+ prerequisites and BLOCKED/INCOMPLETE rather than replacing the real proof.
- No application build or test has been executed by the orchestrator.
## Review and progression gate
-On manual return, evaluate Step-11 and its frozen runbook-preview contract/shared gate using the
+On manual return, evaluate Step-12 and its frozen local-generation contract/shared gate using the
assignment, worker report, actual code/tests, dependency graph, Git changes,
README/docs, and recorded build/test evidence. Do not accept solely on a success
claim; do not claim independent runtime verification.
-- Inspect strict schema/limits/allowlist, exact current source/head/template,
- immutable preview/diff/staleness, real UI and zero save/approval/model effects.
- Do not add deferred inference/retrieval/execution/persistence requirements.
-- If accepted: accept Step-11, update roadmap/state, prepare a bounded Step-12 local-inference/knowledge assignment
+- Inspect local-only eligibility/HTTP bounds, applicable context, untouched
+ validator, request/source/model/manual-preview identity, cancellation/drain,
+ real model/native evidence and zero mutation. Do not add broad RAG/execution.
+- If accepted: accept Step-12, update roadmap/state, prepare a bounded Step-13 comparative-demonstration assignment
and stop for manual handoff.
-- If deficient: issue narrowly scoped Step-11A only for a material unmet contract/
+- If deficient: issue narrowly scoped Step-12A only for a material unmet contract/
regression, then stop. Planned new features are not corrections.
- If blocked: retain the active step, document the prerequisite and required
worker evidence; do not advance or mark unexecuted checks as successful.
@@ -1357,12 +1414,14 @@ claim; do not claim independent runtime verification.
| 2026-10-31 | Corrected Step-10 ACCEPTED | Original and 10A criteria closed; backup/approval/CAS/readback/restore/source safety preserved; no 10B |
| 2026-10-31 | Runbook/inference envelope split prospectively | Step-11 deterministic validation/preview, Step-12 local inference/knowledge; former unassigned 12-23 become 13-24, completed history preserved |
| 2026-10-31 | Step-11 prepared | One allowlisted simulation proposal, strict source/head/template/JSON validation and immutable no-execution preview; manual handoff pending |
+| 2026-10-31 | Step-11 returned and ACCEPTED | Frozen validator/preview contract satisfied; reported 547-case/clean Release/native evidence, strict parser/source/head/limits/diff/staleness/no-side-effect and self-review inspected; no 11A |
+| 2026-10-31 | Step-12 prepared | Opt-in local-only Ollama generation, one matched synthetic context and unchanged-validator preview; real runtime/model prerequisite, no cloud/write/executor or renumbering |
## Manual handoff instruction
-Provide [Step-11.md](Step-11.md) and the shared
+Provide [Step-12.md](Step-12.md) and the shared
[worker gate](WORKER-QUALITY-GATE.md) to the separate worker and request execution
-of that assignment only. The worker must produce `prompts/Step-11-Report.md`
-and stop for review. Do not begin Step-12 local inference/knowledge.
+of that assignment only. The worker must produce `prompts/Step-12-Report.md`
+and stop for review. Do not begin Step-13 comparative demonstration.
Return manually to the orchestrator for review. Reports, including final chat
reports, must follow the single plain triple-backtick copy-window requirement.
diff --git a/prompts/Step-11-Report.md b/prompts/Step-11-Report.md
new file mode 100644
index 0000000..5c7e6e3
--- /dev/null
+++ b/prompts/Step-11-Report.md
@@ -0,0 +1,236 @@
+```
+# Step-11 - Deterministic simulation runbook validation and preview
+
+## Status
+
+COMPLETE. Strict bounded manual schema/source/head/template validation,
+immutable exact preview/staleness, actual local UI, real-source no-side-effect
+tests, post-green self-review, nine-project Release build/full regressions and
+native smoke passed.
+
+Step-11 remains pending manual orchestrator review; this report grants no
+acceptance or mutation authority. Corrected Step-10/10A remains accepted.
+Step-12 local inference/knowledge and runbook execution were not started.
+No model/runtime/retrieval/network feature, authoring Save, target command,
+approval or app-level Git persistence was implemented.
+
+## Files, functions and interfaces
+
+- [RunbookPreviewService.cs](../src/AutoForge.Application/Features/Vehicles/Runbooks/RunbookPreviewService.cs):
+ typed RunbookPreviewException/failures, immutable source/result/snapshot
+ contracts, strict allowlisted parsing, Validate, CreateInputTemplate and
+ fresh Snapshot status. The only constructor dependency is the existing
+ CalibrationAuthoringService; validation reads its immutable snapshot and
+ publishes under its existing narrow current-head guard.
+- Existing SyntheticEngineCalibration validates complete scalar/table values;
+ existing CalibrationValueDifferences supplies the pure exact diff. Neither
+ helper, authoring Save, rehearsal, target or source model implementation
+ was changed or duplicated.
+- [RunbookPage.razor](../src/AutoForge.UI/Features/Vehicles/Runbooks/RunbookPage.razor):
+ /runbooks, manual JSON input, explicit source template/Validate actions,
+ typed input errors, previous successful result labels, current/Stale source
+ status, canonical candidate/diff and optional display-only units.
+ Authoring/preview notifications only schedule rendering; they never rebase
+ input, validate, save or execute.
+- [AddAutoForgeUi.cs](../src/AutoForge.UI/Features/Foundation/AddAutoForgeUi.cs),
+ [MainLayout.razor](../src/AutoForge.UI/Layout/MainLayout.razor) and
+ [Home.razor](../src/AutoForge.UI/Features/Foundation/Home.razor):
+ minimal preview registration and shared navigation. Client DI and all
+ nine project references remain unchanged.
+
+Executable evidence:
+
+- [RunbookPreviewTests.cs](../src/tests/AutoForge.IntegrationTests/RunbookPreviewTests.cs)
+- [RunbookPreviewUiTests.cs](../src/tests/AutoForge.IntegrationTests/RunbookPreviewUiTests.cs)
+- [RunbookPreviewIsolationTests.cs](../src/tests/AutoForge.IntegrationTests/RunbookPreviewIsolationTests.cs)
+
+The initial frozen schema/source/value/limit/immutability/stale/UI/isolation
+tests were written before production implementation. The post-green review
+added exact exponent/Unicode/escaped-property/count/missing-source vectors.
+
+## Frozen C-01..C-10 matrix
+
+All rows below are PASSED. Named methods were executed tests, not proposals.
+
+| ID | Named evidence and exact result |
+|---|---|
+| C-01 | ExplicitSourceAndNoChanges_PreviewCopiesWholeHeadWithoutImplicitWorkspaceOrSave; MissingActualWorkspace_RejectsStructuredInputWithoutCreatingSourceOrPreview. No source/template/preview is created implicitly. Valid unchanged complete current-head input yields NoChanges, empty diff, exact copied workspace/head/applicability, scalar 650 and six original torque rows. Missing actual workspace rejects SourceUnavailable even for structured otherwise-valid input. Source/history remain the same immutable snapshot. Both Baseline and Proposed current heads are usable. |
+| C-02 | ScalarTableMultiCellReverseAndTinyChanges_AreExactCanonicalDiffNotAuthoringSave. Independent candidate 1250 rpm plus 2000-rpm torque 350 yields exactly two ordered canonical entries: table before 360/after 350/delta -10 N*m/axis 2000 rpm; scalar before 650/after 1250/delta +600 rpm. Multiple-cell ordering, reverse +10/-600 and representable tiny differences are asserted without tolerance. No authoring/config/target is changed by preview. |
+| C-03 | EverySchemaObject_RejectsMissingDuplicateUnknownFieldsAtomically (18 object/mutation vectors); WrongKindsAndIntegerSyntax_RejectWithoutReplacingPriorSuccessfulPreview (24 vectors); MalformedCommentsTrailingDataAndWrongRoot_AreHandledAtomicErrors; EscapedDuplicatePropertiesInvalidUnicodeAndNonJsonNumbers_AreTypedAtomicRejections. Root/step/source/values/scalar/table properties are all required, unique and allowlisted. Wrong kinds, fractional/exponent reference syntax, malformed/comments/trailing input, unsupported version, null input and invalid strings/numbers reject through typed failure/path/reason before replacement. Prior preview and source/head/history remain identical. |
+| C-04 | OperationAllowlistAndSingleStep_RejectExecutionOrOtherTargets (10 vectors); ArbitraryCommandAndAuthorityFields_AreNeverInterpreted (6 vectors); safe rationale rendered test. Only exact simulation/proposeCalibration and one step are allowed. Physical/replay/undefined/case-changed target/operation, empty/multiple steps and SQL/script/frame/offset/approval/execute fields reject. Rationale is safely rendered informational text and never grants command or policy authority. |
+| C-05 | EverySourceComponent_MustMatchActualWorkspaceAndCurrentHead (10 vectors); FieldSpecificCasePolicies_AcceptProfileModuleButNotFingerprintModelDefinitionKeyOrUnit. Every workspace/head/profile revision/config/module/model version/definition reference must match actual current source. Profile/module case variants preserve existing ordinal-insensitive policy; fingerprint/model/definition/key/unit stay exact. No catalogue, role or latest-head fallback occurs. |
+| C-06 | FullTemplateInvalidNumbersKeysUnitsAxisAndShape_RejectAtomically (14 vectors); ExactTemplateBoundsAndNoOp_KeepCanonicalValuesWithoutClipping; SupplementaryStepIdentifierAndWholeCandidateCounts_FollowExactExistingLimits; exact tiny/reverse diff test. Full existing template validates finite scalar/cells, keys/units/fixed axes/counts. Out-of-range/non-finite/wrong-axis/shape/key/unit candidates reject atomically. Inclusive 650/5000 rpm and 1/1000 N*m boundaries remain exact; tiny canonical deltas are not rounded away and no sorting/clipping occurs. |
+| C-07 | SourceChangeAndReplacement_MarkImmutableOldPreviewStaleUntilExplicitCorrectRevalidation; actual rendered stale/draft test. Old-head request rejects; source/head change/replacement after success marks the same immutable captured result Stale. Its before/candidate/diff/identity are not rebased. Explicit correct input/revalidation is required; source changes do not alter draft or invoke validation. Publication reuses the actual source/head guard. |
+| C-08 | Utf8PayloadBoundary_IsExactly131072BytesIncludingMultibyteRationaleAndWhitespace; RationaleAndStepIdentifier_AreExactUtf16CodeUnitLimits; supplementary Unicode/depth tests. Valid original payload exactly 131072 UTF-8 bytes succeeds despite shorter string.Length; one more byte rejects with prior result retained. Rationale 2000 succeeds/2001 rejects; step 128 succeeds/129 rejects. Supplementary Unicode is counted in UTF-16 correctly. Depth 32 parses then receives appropriate schema rejection for the deliberately unknown structure; depth 33 is handled InvalidJson. Invalid UTF-8 encoding/escaped surrogate and non-JSON NaN are handled without fallback. |
+| C-09 | PreviewCollectionsAndRetainedResult_AreDefensiveAndBoundedToOneSuccess; RunbookUi_TemplateValidateRejectedDraftStaleAndUnits_NeverAutoValidateOrRebase. Parsed collections/current-head values/diff are copied/read-only; mutation attempts reject and old preview contents survive a later success. Service retains one last success, invalid attempt preserves its identity, and UI separates old result from rejected/edited input. Units/rerenders/source notifications do not validate or modify canonical input/data/diff. |
+| C-10 | RunbookUi_SafeRationaleUnavailableSourceAndNoExecutionControls_AreRealRenderedBehavior; RunbookIsolation_ActualLiveRecordingReplayAndApprovedRehearsalRemainUntouched; native evidence. Actual route/template/Validate/error/stale/rendering path works without Save/approval/Execute controls. Real live source/recording/replay/approved rehearsal coexist around invocation: transport/model/archive-Save/rehearsal open/read/write deltas=0, authoring changes/history mutation=0, approval remains same/unconsumed, and source export/trace/status/archive bytes/replay snapshot are unchanged. Constructor/source-path review confirms no Save/approval/network/model path. All 442 regressions plus 105 new cases, nine-project Release and native smoke pass. |
+
+## Acceptance criteria
+
+| ID | Result | Evidence |
+|---|---|---|
+| AC-01 | PASSED | C-03..C-06/C-08 independent strict schema/allowlist/kind/reference/full-template vectors, exact UTF-8/UTF-16/depth bounds and typed atomic rejection assertions. |
+| AC-02 | PASSED | C-01/C-02/C-07/C-09 exact immutable before/candidate/source/head/diff, NoChanges/ChangesProposed, tiny changes, defensive copies, Stale versus current and bounded one-preview retention. |
+| AC-03 | PASSED | C-10 real rendered/native controls, safely encoded rationale, unchanged approved real rehearsal/live/recording/replay/source counters/state, no execution or inference dependency/path. |
+| AC-04 | PASSED | Final 547 passes with all 442 baseline cases preserved; all nine Release projects/native Client, 0 warnings/errors; required native normal preview/rejection/staleness/source/unit smoke passed. |
+| AC-05 | PASSED | Frozen executable matrix, own post-green source-path review, exact schema/usage/docs/README, protection/history/manual gate preserved and this single fenced report saved. |
+
+## Final commands and outcomes
+
+SDK: dotnet --version -> 10.0.403 under the unchanged global.json policy.
+Existing xUnit v2/VSTest is unchanged. No package/SDK/workload/tool install,
+restore, update or repair occurred.
+
+Focused, required build and complete regressions ran sequentially:
+
+| Exact command | Exit | Result |
+|---|---:|---|
+| dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~RunbookPreviewTests|FullyQualifiedName~RunbookUi_|FullyQualifiedName~RunbookIsolation_" | 0 | 105 new runbook cases passed, zero failed/skipped. |
+| dotnet build .\src\AutoForge.slnx --configuration Release --no-restore | 0 | All nine projects/native Client; 0 warnings, 0 errors. MAUI XAML source-generation output was informational. |
+| dotnet test .\src\AutoForge.slnx --configuration Release --no-build | 0 | 179 unit + 368 integration = 547 passed, zero failed/skipped. |
+| git --no-pager diff --check | 0 | No whitespace errors; existing README/build-guide LF-to-CRLF notices only. |
+| git --no-pager diff --exit-code -- prompts global.json Directory.Build.props Directory.Packages.props NuGet.Config src\AutoForge.Core src\AutoForge.Diagnostics src\AutoForge.Simulation src\AutoForge.Client src\AutoForge.Application\Features\Vehicles\Calibration src\AutoForge.Application\Features\Vehicles\Telemetry | 0 | Existing protected history/dependencies/core/ports/models/Client/authoring/rehearsal/recording/replay implementations unchanged before adding this report. |
+
+Per-project Release: AutoForge.Core, AutoForge.Diagnostics,
+AutoForge.Simulation, AutoForge.Application, AutoForge.Components,
+AutoForge.UI, AutoForge.Client, AutoForge.UnitTests and
+AutoForge.IntegrationTests all PASSED. Portable projects remain net10.0;
+Client remains net10.0-windows10.0.26100.0 / win-x64.
+
+The baseline is unchanged: 179 unit + 263 integration = 442 cases. This step
+adds 105 integration cases; no baseline safety/source assertion was deleted
+or weakened. Preview limits are 131072 original UTF-8 bytes, depth 32,
+rationale 2000 UTF-16 units, step ID 1..128 trimmed UTF-16 units and one
+allowlisted step. Existing authoring/rehearsal/archive/gauge limits remain.
+
+Iteration:
+
+- First executable focused run passed 99 cases without compilation/behavioral
+ failures. The post-green review added exponent/escaped-property/Unicode/
+ full-count cases, yielding 104. A final independent missing-workspace
+ validator case raised the final count to 105.
+- The full reviewed suite initially passed 546; final focused/build/full
+ checks passed 105/547 after that last test addition. Production source
+ was unchanged after the initial implementation/source-path review.
+- Native automation initially matched the explanatory word ChangesProposed
+ in a NoChanges status before the actual diff rendered, causing a helper
+ null-DOM read. It was corrected to wait for the exact captured indication
+ and element presence. This was not a parser/app failure or a successful
+ observation. The actual native workflow then completed without an error
+ overlay.
+- No pre-fix behavioral reproduction is claimed: this is a new feature, not
+ an existing validator bug correction.
+
+## Native normal evidence versus headless proof
+
+The actual rebuilt Windows Client was operated through task-owned WebView2
+data/local DevTools port 9382 with a temporary built-in Node/WebSocket helper.
+No new application web host, runtime/model or dependency was added.
+
+Native observations:
+
+1. /runbooks entered with empty input/no preview. Explicit template attempt
+ without source gave SourceUnavailable and created no source/default result.
+2. Explicitly created warm source through existing simulation/calibration UI.
+ Actual workspace f1b8740bd2414b7aa3e7be78ff35139f, baseline head
+ 60bc53bc58d04ae38ab208aecf4d8ced. Template copied that source without
+ validation; explicit Validate yielded NoChanges/current/empty diff.
+3. Manual canonical edits 1250 rpm and torque 350 at 2000 rpm yielded preview
+ 493f4f636782496eb50df0e4294e5a9f, ChangesProposed/current, with exactly:
+ engine.torque-curve axis 2000 rpm, 360->350 N*m, signed delta -10 N*m;
+ engine.warm-idle-target 650->1250 rpm, signed delta +600 rpm.
+4. Rationale "Manual preview only: this is not approval." rendered as
+ text. Its HTML used <b> and no b element was created.
+ Metric->Imperial changed optional torque display only; JSON draft, preview
+ identity and exact canonical diff stayed unchanged.
+5. Malformed JSON, physicalHardware target, wrong expected head and scalar
+ 600 each yielded the appropriate InvalidJson/OperationNotAllowed/
+ StaleSource/InvalidValues error with path/reason, while the previous
+ preview ID and diff remained exactly unchanged and explicitly labeled
+ Previous successful preview retained.
+6. Returning to authoring confirmed history count 1 and original scalar 650;
+ rehearsal remained Inactive/audit 0. Preview created no saved proposal,
+ target or approval.
+7. A separate explicit authoring Save changed current head to revision 2 /
+ c2cb7ddefe474f44a17754896b3fde9c. On runbooks re-entry the original preview
+ was visibly Stale, with its old identity/diff unchanged. Old JSON input
+ rejected StaleSource. A new template still did not validate/clear stale
+ result automatically; explicit Validate produced NoChanges/current for
+ the current Proposed head. History remained exactly 2, not 3.
+8. Original source configuration export stayed exactly identical, fingerprint
+ sha256:v1:e8991ae139b54959ec53a4fe64b08dc9bfc03feb533496cf741f2c9f3a2342da.
+ No model/session/target execution was opened by this native preview smoke.
+ Original Metric/Road preferences were restored and observed; existing
+ replay/Home routes worked, with replay Unloaded.
+
+Native evidence is normal real-UI/source behavior, not exact-limit or
+concurrency/coexistence proof. Actual active live/recording/replay/approved-
+rehearsal coexistence and zero boundary calls are headless real-service/port
+tests. Normal route cleanup is not attributed to validator invocation.
+No inference, knowledge, physical target or programming was used.
+
+Cleanup PASSED: task Client PID 40340 completed after route cleanup. Transient
+WebView PIDs 45756/44632 were checked against the task profile before any
+specific-PID cleanup. No owned WebView/listener remained; port 9382 was closed.
+Exact task-only profile/helper were removed. Native source/proposal/preview
+data were process-memory only; the app-local recordings directory remained
+empty. No unrelated file/archive/default WebView data/preferences were reset.
+
+## Own post-green producer/consumer review
+
+Reviewed manual JSON -> original strict UTF-8 bound -> JsonDocument depth/
+syntax/object/type/allowlist checks -> detached source/value contracts ->
+actual authoring snapshot/component matching -> full existing template ->
+pure exact diff -> current-head guarded publication -> copied last success ->
+current versus Stale snapshot -> actual input/error/preview UI.
+
+Public entry points reviewed: Validate, CreateInputTemplate, Snapshot and
+route template/Validate/subscription/render/disposal paths. Normal, rejected,
+boundary, source-change/replacement, old-preview, draft/error and unit cases
+were walked against C-01..C-10.
+
+All schema/source/template checks precede replacement. Publication is under
+the existing exact source/head guard. Snapshot releases the preview gate
+before reading the authoring gate, avoiding inverse lock order. Captured
+values/source/head/diff remain immutable; later source data only determines
+freshness, never rebasing. No method calls Save, Approve, target/model/store/
+network or arbitrary tool code. UI notifications only render, with separate
+rejected/edited draft and previous successful labels. Rationale is plain safe
+text. The retained state is one preview, not a version/history framework.
+
+Review strengthened actual integer syntax, escaped duplicate property,
+invalid Unicode/NaN, supplementary-code-unit, duplicate whole-value-array
+and missing-real-workspace assertions. No production defect required a
+follow-up fix. Affected focused and full build/regressions were rerun to
+105/547 passes. Native used the same unchanged production implementation.
+No known unresolved assigned exit-contract defect remains.
+
+## Documentation and preservation
+
+Added [runbook schema-v1/preview guide](../docs/runbooks-v1.md); updated
+[README.md](../README.md), [documentation index](../docs/README.md),
+[architecture](../docs/architecture.md), [build/test guide](../docs/build-and-test.md)
+and the directly related accepted-status note in
+[rehearsal contracts](../docs/calibration-rehearsal.md).
+They document exact fields/limits/allowlist, source/head/template/canonical
+rules, defensive one-preview/current-Stale behavior, input versus old result,
+manual/no-model/no-save/no-execution/no-authority scope and actual evidence.
+Corrected Step-10/10A is accepted; Step-11 remains pending manual review.
+Future generated Step-12 text must use this same boundary, not a privileged
+path. Inference/knowledge and executor integration remain unimplemented.
+
+Worktree began clean on main at bccb797 and HEAD is unchanged. Existing
+prompts/state/roadmap/assignments/shared gate/reports and protected files were
+not edited; this is the only new prompts file. Index remains empty.
+All nine projects/references/dependencies and existing Core/profile/config/
+Simulation/Diagnostics/authoring/rehearsal/recording/replay/physics contracts
+are unchanged. Source/tests remain under src/src/tests; docs under docs.
+The separately disclosed recording navigation issue was not modified.
+
+No new project/package/host/model/runtime/schema change to other features,
+permission/version-control/backup framework, app Git persistence, agent,
+automatic handoff, staging, commit, push, system installation or unrelated
+cleanup occurred.
+
+STOP.
+```
diff --git a/prompts/Step-12.md b/prompts/Step-12.md
new file mode 100644
index 0000000..b1ce1c0
--- /dev/null
+++ b/prompts/Step-12.md
@@ -0,0 +1,327 @@
+# Step-12 - Local AI and applicable knowledge integration
+
+## STEP IDENTIFIER
+
+Step-12. Step-11 was accepted on 2026-10-31 with no correction.
+This is the sole active implementation assignment. Step-13 demonstration is blocked.
+
+## STEP TITLE
+
+Generate one synthetic calibration runbook with an explicitly selected local-only
+model and applicable context, then use the existing deterministic preview validator.
+
+## OBJECTIVE
+
+One user outcome: an explicit bounded natural-language calibration request
+produces either a model-generated validated read-only preview or a precise error.
+One primary new contract: a local-only, source/model/context-bound cancellable
+generation whose untrusted output cannot bypass validation or mutation approval.
+
+No authoring Save, target open/write, runbook execution, cloud inference or
+physical operation is assigned. Read [STATE.md](STATE.md), [ROADMAP.md](ROADMAP.md),
+[runbooks v1](../docs/runbooks-v1.md) and [WORKER-QUALITY-GATE.md](WORKER-QUALITY-GATE.md).
+Establish the frozen matrix before coding, self-review after first green,
+write `prompts/Step-12-Report.md`, and STOP.
+
+## ARCHITECTURAL CONTEXT
+
+Keep all nine projects, one Client and independent Components.
+Application owns a small replaceable inference port, matched context provider
+and generation orchestration against actual authoring/preview contracts.
+An Ollama HTTP implementation may live in the existing Application feature with
+Client configuring the real transport; UI owns explicit selection/generation/
+cancel/context/output/error and page lifetime. No new project/package/host,
+generic agent/tool/runtime framework or vector database.
+
+Reuse [RunbookPreviewService](../src/AutoForge.Application/Features/Vehicles/Runbooks/RunbookPreviewService.cs),
+the actual [authoring service](../src/AutoForge.Application/Features/Vehicles/Calibration/CalibrationAuthoringService.cs)
+and existing synthetic definition/diff/units. The deterministic validator stays
+authoritative; do not implement a weaker model-only schema/source validator.
+Source/tests remain under `src`, tests under `src/tests`.
+
+## CURRENT IMPLEMENTATION STATE AND PREREQUISITES
+
+Accepted manual runbooks allow one simulation/proposeCalibration step, exact
+source/head/full scalar/table values, strict schema/limits, immutable preview/
+diff and Stale status. They save/approve/execute nothing.
+Worker baseline: 179 unit + 368 integration passes (547 total, zero failed/
+skipped), clean nine-project Release build and native manual-preview checks.
+The orchestrator did not run those commands.
+
+First provider: Ollama local HTTP at `http://127.0.0.1:11434`.
+Use an **existing operator-approved runtime and installed local model**.
+Do not install/pull/update models or runtimes, sign in, start/restart a shared
+service or alter user/system settings automatically. Real model availability
+was not verified by the orchestrator. Missing prerequisites block the assigned
+real-generation/native checks; do not substitute a stub or cloud and declare COMPLETE.
+
+Verified public contracts, recheck against the installed runtime before coding:
+
+- [Chat API](https://docs.ollama.com/api/chat): POST `/api/chat`, explicit model/
+ messages, `stream:false`, structured `format`; read `message.content`.
+- [Model catalogue](https://docs.ollama.com/api/tags): GET `/api/tags`, local
+ model name/digest/size and optional remote_model/remote_host.
+- [Model details](https://docs.ollama.com/api-reference/show-model-details):
+ POST `/api/show`, completion capabilities and model metadata.
+- [Local-only configuration](https://docs.ollama.com/faq#how-do-i-disable-ollamas-cloud-features):
+ operator disables cloud with documented server configuration or
+ `OLLAMA_NO_CLOUD=1`, then verifies the runtime's cloud-disabled status.
+
+Use the actual documented anchor/path the installed docs expose if necessary;
+do not invent unsupported APIs. A loopback URL alone does not prove the Ollama
+model will not delegate to cloud. No API key/authentication is needed or allowed.
+
+## REQUIRED IMPLEMENTATION
+
+### Frozen contract matrix
+
+| ID | Input/precondition | Required result |
+|---|---|---|
+| C-01 | App/route entry or ordinary manual workflow without a model | No automatic network/generation/model/source action; manual validator/authoring/diagnostic/replay/rehearsal still works. Explicit catalogue refresh and opt-in/model selection are required. |
+| C-02 | Eligible installed local model versus remote/cloud/ambiguous/stale metadata, absent runtime/model or redirect/proxy | Only loopback local-only eligible selection can generate; precise visible rejection before goal/context reaches an ineligible destination. No model substitution, pull/install/cloud/tool call. |
+| C-03 | Actual current supported authoring source/head and matched synthetic knowledge | Capture exact immutable source/head/values/constraints, model name/digest, knowledge ID/revision/applicability and bounded goal. Missing/mismatched source/knowledge rejects before chat. |
+| C-04 | Controlled valid response and real native goal from warm baseline | Original model content passes existing Step-11 validator; exact 1250 rpm and 2000-rpm torque 350 N*m yield +600/-10 diff with unchanged other cells. No saving/approval/write; real model evidence distinguishes intent accuracy from mere parse success. |
+| C-05 | Invalid/refused/empty/markdown/truncated/tool-call/wrong-source/wrong-unit/unknown-key model output | Typed generation/validation error, no repaired/rebound/default candidate; previous successful preview remains intact. Unvalidated content is safely labeled/limited, never actionable authority. |
+| C-06 | Source/head changes, newer manual preview or model selection/digest superseded while generation is pending | No stale overwrite or rebasing. Publish only for the current owner/source/head/selected model and captured prior-preview identity, through atomic validator publication checks. |
+| C-07 | Repeated Generate, competing refresh/selection, Cancel/close/re-entry and delayed response | One owner; conflicts reject before mutation/request, cancellation/close drains outside required gates, no late preview/Ready state, fresh page lifetime does not reuse closed completion. |
+| C-08 | HTTP errors/timeouts/invalid metadata/duplicate critical response fields/chunked oversized body | Typed visible failure; bounded actual reads/request sizes, no success-shaped empty catalogue/content or partial JSON publication. Preserve prior source/preview/core workflows. |
+| C-09 | Prompt/rationale attempts to alter policy/source, global units/renders/hide | Quoted goal/context/model output remain untrusted data; deterministic allowlist/source/template still applies. No tool/write/model control, validation on render or unit-based source mutation. |
+| C-10 | Real generation/coexistence and complete verification | All 547 baseline cases/new coverage and nine-project Release build pass; real installed local-model/native preview runs with cloud disabled; counted existing transport/model/archive/rehearsal/authoring mutations remain zero. |
+
+### A. Explicit local-only provider and transport
+
+Use a small replaceable typed inference port; implement Ollama first using built-
+in .NET HTTP/JSON, not a new SDK dependency. Production base URI is fixed loopback
+above; tests may inject a controlled loopback HTTP peer/handler below the provider.
+Reject non-loopback destinations. Disable redirects, system proxies and default
+credentials; requests cannot carry API keys or resolve an arbitrary model-supplied URL.
+Allowed calls are catalogue/details/chat only, never pull/create/delete/push/
+cloud/search/tool execution. Do not stop or unload unrelated runtime/model work.
+
+Require explicit local-only operator acknowledgement before sending a goal or
+source context. Native verification must record actual operator-configured cloud-
+disabled runtime evidence, not a boolean checkbox claimed as cryptographic proof.
+Do not modify the runtime configuration yourself without separate approval.
+
+Select an exact reported installed model, not freeform fallback/first model.
+Eligibility requires usable name/digest, positive installed size, local model
+details and completion capability. Reject remote_model/remote_host indicators,
+cloud-tagged models and malformed/ambiguous eligibility data. Show rejected
+models/reasons, not a misleading healthy empty catalogue. A failed refresh may
+retain last-known display but never authorizes generation without fresh checks.
+Recheck selected catalogue identity/digest/details before each explicit chat.
+After completion, recheck that same local eligibility and catalogue digest before
+validator publication. Changed/unavailable metadata rejects the result; a model
+name in the chat response alone does not attest its digest or local execution.
+
+Use one non-streaming POST `/api/chat` per explicit Generate:
+`stream:false`, structured JSON format for the accepted runbook shape, bounded
+generation options such as temperature 0 and a finite output-token budget.
+The format is a generation hint, not validation or a guarantee of determinism.
+Supply the application-generated runbook/source template and require source/
+head/keys/units/axes unchanged. Do not grant tools or feed previous unbounded
+chat history. Ignore reasoning fields as content; never interpret tool calls.
+
+Validate the completed response envelope: explicit requested model, assistant
+message string content, actual finished state and non-truncated outcome.
+Reject empty/refused/malformed/truncated or tool-call completion.
+Handle additive API metadata compatibly, but reject duplicate/invalid critical
+identity/completion/content/error fields. No silent defaults for those fields.
+
+Fixed bounds, not new user settings: goal <=2000 UTF-16 code units, complete
+UTF-8 chat request <=131072 bytes, each catalogue/details/chat response <=1 MiB
+(1,048,576 bytes), HTTP JSON depth <=64 and operation deadline <=180 seconds.
+Read bodies bounded even without Content-Length; a one-byte-over/chunked response
+cannot be buffered unboundedly before rejection. Distinguish timeout/cancel/
+HTTP/metadata/completion/validator failures; do not return fake success.
+The decoded runbook must also meet all unchanged Step-11 limits.
+
+### B. Small applicable local knowledge and exact source snapshot
+
+Provide one local synthetic engine-authoring policy pack with explicit ID/revision
+and exact model/definition applicability. Its authority is the accepted synthetic
+template/owned contracts, not manufacturer or real-vehicle truth.
+Retrieve by exact source model/version/definition/revision; no generic "nearest"
+or role-based fallback. Missing/mismatched pack is a visible pre-chat failure.
+
+Context includes copied actual authoring workspace/head/applicability, canonical
+whole values, scalar bounds, fixed rpm axis, torque-cell bounds/units, supported
+operation and the pack's relevant synthetic restrictions. Keep the pack provenance
+and included facts visible independently of anything the model claims.
+Use a simple local provider/data definition, not embeddings/web retrieval/RAG/
+filesystem crawling or another schema/persistence subsystem.
+
+Capture the bounded explicit goal, selected model/digest and prior successful
+preview ID at request start. Show source and selected context for deliberate user
+review. Do not include arbitrary files, source code, raw diagnostic archives,
+credentials, vehicle personal data or undocumented operating instructions.
+Only bounded explicitly selected synthetic authoring data is supplied.
+
+System guidance restricts generation to synthetic warm-idle/fixed-axis torque
+proposals, with no hardware programming, emissions/anti-theft/odometer/safety
+bypass instructions, external tools or claims of approval/testing. Treat the
+goal/pack/output as quoted untrusted data; model obedience is not the safeguard.
+Existing deterministic schema/source/template validation is still mandatory.
+
+### C. One generation owner and unchanged validator publication
+
+Explicit Generate captures an immutable request/context; it never saves an
+authoring revision or opens/approves/mutates a target.
+At most one catalogue/generation operation is active in the page-owned feature.
+Reject competing Generate/refresh/model-change actions visibly before starting
+another request. Cancel/Close share a drainable cleanup as appropriate; no gate
+is held across an await needed by cleanup. New page entry creates a fresh owner.
+
+After HTTP completion, enforce current owner/generation/cancellation/model/
+source/head and prior-preview identity before publication. A newer manual preview
+must not be overwritten even if its authoring head is unchanged.
+Make these checks atomic with accepted validator publication: minimally extend
+the existing service with expected-preview/cancellation/current-request admission
+if needed, reusing its strict parser/source/head/template/diff logic.
+Do not merely precheck then call an unguarded publish that can race.
+Preserve all existing manual Validate behavior and tests.
+
+Pass the original decoded `message.content` through the authoritative validator,
+without stripping markdown fences, fixing syntax, injecting absent IDs, changing
+unit/source/head, clipping values or replacing invalid output with a template.
+No auto retry/correction loop. A retry is an explicit new request against fresh
+current context. Valid JSON alone does not establish correct user intent;
+show the original goal and exact candidate/diff for human review.
+
+Successful output is only an AI-generated read-only validated preview, still
+unverified for intent/physical applicability/testing/approval. Retain model/digest/
+context/goal provenance separately from source facts; model rationale is safe
+text, not evidence or policy. Existing staleness still applies after publication.
+Keep only bounded latest generation evidence/prior success, not hidden history.
+
+Failures/cancellation/close/source or manual-preview replacement preserve prior
+success and source state. Late callbacks cannot publish after owner close or a
+new request. No fault becomes healthy "empty model result", Ready, Saved or
+Applied. Manual/no-model workflows remain usable and errors are visible.
+
+### D. Real UI and real-model evidence
+
+Extend the existing runbook area with explicit local-only acknowledgement,
+catalogue refresh, installed model selection/eligibility, bounded goal, source/
+knowledge preview, Generate/Cancel and separate model-output/error/provenance.
+No network request on route entry/render/unit change.
+
+Show valid output through existing candidate/diff/current-Stale presentation.
+Invalid output is labeled unvalidated/not an actionable preview, bounded and
+escaped. Separate old successful preview from rejected/changed request data.
+Global units only project human-readable values; requests/content/diffs stay
+canonical and unchanged. No Save/Approve/Execute/Apply or tool control.
+Page unmount cancels/drains its own request without touching shared Ollama.
+
+Native decisive goal on the actual warm baseline:
+`Propose warm-idle target 1250 rpm and set torque at 2000 rpm to 350 N*m; keep every other value unchanged.`
+Require a real local model response whose validated canonical candidate and
+diff match that exact goal, not merely any parseable in-range result.
+Report all attempts honestly. No request repair, canned native response or
+hidden rule-based generator counts as local model success.
+
+## FILES OR PROJECTS EXPECTED TO CHANGE
+
+Focused Application inference/provider/context/generation and narrow guarded
+preview publication, UI runbook generation/lifetime, Client HTTP DI only if
+needed, tests and related README/docs. No new project/package/host or model
+installation, existing template/authoring-save/rehearsal/physics/protocol change.
+Only `prompts/Step-12-Report.md` under `prompts`.
+
+## INTERFACE AND DEPENDENCY REQUIREMENTS
+
+Keep nine projects/references, one Client, independent Components, immutable
+source/runbook/authoring values and all template/schema/approval/CAS limits.
+No public network/cloud/model pull, proxies/redirect fallback, source metadata
+backfill, model tool execution, source code/credential upload or arbitrary raw
+command. Generated knowledge cannot promote authority or bypass approval.
+Do not fix the separate recording navigation issue or add Git/durable backups.
+No SDK/workload/runtime/model/system install/update/repair/rollback, staging/
+commit/push or destructive Git; preserve existing work and protected history.
+
+## TESTING REQUIREMENTS
+
+Map C-01..C-10 to meaningful named tests before handoff:
+
+- Real provider over a controlled local HTTP peer/handler: catalogue/details/
+ completion fields, model eligibility/digest, remote/cloud/redirect/proxy exclusion,
+ one actual chat request, structured options/context and error classification.
+ This proves HTTP integration, not that a real LLM generated the test response.
+- Current-source/knowledge/no-match vectors and original validator negative
+ outputs, with exact previous-preview/source/head/history preservation.
+ Hold real workflow response/read publication to exercise cancel/source changes/
+ newer manual preview/closed/new-owner races, with atomic rejection assertions.
+- Fixed byte/depth/goal/deadline and missing/invalid/duplicate critical metadata/
+ chunked response bounds; no broad catches or count-only claims. Release owned
+ helpers/barriers in finally; do not use sleep/polling as race proof.
+- Actual rendered selection/opt-in/generation/cancel/error/stale/units controls,
+ no generation on render, and real diagnostics/recording/replay/approved-
+ rehearsal coexistence with counted zero unassigned business-source calls.
+- Keep all 547 baseline cases (179 unit, 368 integration), including manual
+ validator/authoring/source/physical gates. Compare canonical request/output/
+ source/config/archives and prove no mutation/execution.
+
+Run focused cases, then sequentially:
+
+- `dotnet build .\src\AutoForge.slnx --configuration Release --no-restore`
+- `dotnet test .\src\AutoForge.slnx --configuration Release --no-build`
+
+Build all nine projects/native Client. Install/restore code dependencies only
+after a genuine chosen-command missing dependency; this does not authorize
+model/runtime installation or pulling. Recheck actual installed API behavior.
+
+Required native/real-model smoke: operator-approved local-only runtime already
+running, verified cloud-disabled status and installed eligible model/digest;
+explicit actual source/context, decisive goal above, original real response,
+same-validator exact diff, no source/approval/target/dynamics-configuration/
+recording changes,
+manual invalid/source-stale handling, cancel/unmount and old routes/units.
+Record runtime/model/version/license/resource context honestly, without secrets
+or thinking traces. Controlled faults are not native platform observations.
+Absent runtime/model/local-only evidence or failure to produce the assigned
+valid native response is BLOCKED/INCOMPLETE, not a waiver or stub-success.
+Stop only task-owned test HTTP/native helpers; do not terminate a shared model
+runtime or reset user data/preferences. No installation/download is automatic.
+
+## DOCUMENTATION REQUIREMENTS
+
+Update README/index/architecture/build guide and local-generation/runbook usage:
+explicit local-only opt-in/eligible model, operator prerequisites, verified public
+API contracts, cloud delegation caveat, matched synthetic pack/source/context,
+strict unchanged-validator output, current-owner/manual-preview CAS/cancel/drain,
+real-model versus stub evidence and no write/tool/physical authority.
+Step-11 is accepted; Step-12 remains pending manual review. Broader diagnostics/
+scenario research/executors, vector knowledge and demonstration are future.
+
+## ACCEPTANCE CRITERIA
+
+| ID | Criterion | Evidence |
+|---|---|---|
+| AC-01 | C-01..C-03 explicit local-only transport/model eligibility and exact applicable context | Real HTTP boundary/metadata/remote-negative tests and operator/runtime local-only prerequisite evidence |
+| AC-02 | C-04/C-05/C-09 original model content uses authoritative validation without repair/authority/side effects | Exact controlled outputs, unchanged negative-parser/source tests and actual real-model decisive goal |
+| AC-03 | C-06..C-08 one owner, atomic source/model/manual-preview publication and bounded error/cancel/close handling | Controlled interleavings/limits/HTTP failures and rendered command/lifetime assertions |
+| AC-04 | C-10 all 547 regressions/new coverage, real-model/native workflow and full nine-project Release build pass | Exact worker commands/exits/warnings/counts, zero business-source mutation and native/stub distinction |
+| AC-05 | Matrix/self-review/docs/history/protection/manual gate accurately describe limits/prerequisites | Own post-green producer/consumer review, named evidence and `prompts/Step-12-Report.md` |
+
+## OUT-OF-SCOPE WORK
+
+Cloud/public inference, model/runtime installation/pull/update/agent hosting,
+tool/runbook execution, proposal Save/approval/programming, broad diagnostic/
+scenario planning, embeddings/vector/RAG/web research, persistent chat/model/
+runbook/Git backup storage, new templates/unit families/project/package/host,
+hardware/physics changes and unrelated cleanup.
+No future assignment, agents, automatic handoff, orchestration/shared-gate edit,
+staging, commit or push.
+
+## REPORTING REQUIREMENTS
+
+Save `prompts/Step-12-Report.md` wholly inside exactly one plain triple-backtick
+fence, no language tag/outside text/nested fences. Include identifier/title/status,
+functions/files/interfaces, C-01..C-10/AC-01..AC-05 mapping with named executed
+evidence, exact local-only/model/digest/context/response/validator/publish/cancel/
+negative/limit/no-side-effect outcomes, commands/exits/warnings/per-project
+counts, actual real-model/native versus stub/control evidence and prerequisites,
+docs/README, own post-green source-path self-review, limitations/deviations/
+blockers and preservation. COMPLETE requires all assigned checks; otherwise
+report INCOMPLETE/BLOCKED with the precise unmet criterion.
+Save and STOP; do not begin Step-13.
diff --git a/src/AutoForge.Application/Features/Vehicles/Runbooks/RunbookPreviewService.cs b/src/AutoForge.Application/Features/Vehicles/Runbooks/RunbookPreviewService.cs
new file mode 100644
index 0000000..110fb1c
--- /dev/null
+++ b/src/AutoForge.Application/Features/Vehicles/Runbooks/RunbookPreviewService.cs
@@ -0,0 +1,294 @@
+using System.Text;
+using System.Text.Json;
+using AutoForge.Application.Features.Vehicles.Calibration;
+using AutoForge.Core.Calibration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
+
+namespace AutoForge.Application.Features.Vehicles.Runbooks;
+
+public enum RunbookPreviewFailure
+{
+ InvalidJson, LimitExceeded, UnsupportedSchema, SchemaViolation,
+ OperationNotAllowed, SourceUnavailable, StaleSource, InvalidValues
+}
+public sealed class RunbookPreviewException(
+ RunbookPreviewFailure failure, string path, string message, Exception? inner = null)
+ : Exception($"{path}: {message}", inner)
+{
+ public RunbookPreviewFailure Failure { get; } = failure;
+ public string Path { get; } = path;
+}
+public enum RunbookChangeKind { NoChanges, ChangesProposed }
+public enum RunbookPreviewFreshness { None, Current, Stale }
+public sealed record RunbookSourceToken(
+ string WorkspaceIdentifier, string ExpectedHeadIdentifier, CalibrationApplicability Applicability);
+
+public sealed class RunbookPreview
+{
+ internal RunbookPreview(string runbookIdentifier, string stepIdentifier, string rationale, RunbookSourceToken source,
+ CalibrationVersion head, CalibrationValues candidate, IReadOnlyList
+ Manual structured JSON, read-only preview only. No model/inference, retrieval, save-to-authoring, + target operation, execution or approval occurs. Validation grants no programming or physical authority. +
+Create/select an actual authoring source explicitly. This route does not create one.
+@if (Authoring.Snapshot is { } current) +{ ++ Actual current workspace @current.Identifier; head revision @current.Head.Revision / @current.Head.Identifier; + source @current.Definition.Applicability.ConfigurationIdentifier. +
+} +else +{ +No authoring source is available. Source/head fields cannot fall back to a catalogue or live session.
+} +One simulation / proposeCalibration step only. Rationale is informational text, never permission or code.
+ + @if (_error is { } error) + { +@error.Failure: @error.Message
+ } + @if (_status is not null) + { +@_status
+ } ++ Captured indication @preview.Kind; source freshness @snapshot.Freshness. + ChangesProposed is not an authoring revision, tested result, approval or command. +
+ @if (snapshot.Freshness == RunbookPreviewFreshness.Stale) + { +Stale: actual workspace/head/source changed. This immutable old preview is not current; explicitly supply correct input and revalidate.
+ } + @if (_error is not null) + { +Previous successful preview retained; the current input action was rejected and did not replace this result.
+ } + else if (!ReferenceEquals(_acceptedPreview, preview) || _acceptedInput != _input) + { +Current draft is not this accepted input. The displayed result is a previous successful preview, not validation of the edited draft.
+ } ++ Preview @preview.Identifier; runbook @preview.RunbookIdentifier; step @preview.StepIdentifier; + captured workspace @preview.Source.WorkspaceIdentifier; + head @preview.Source.ExpectedHeadIdentifier / revision @preview.HeadRevision / @preview.HeadKind. +
++ Profile @preview.Source.Applicability.ProfileIdentifier revision @preview.Source.Applicability.ProfileRevision; + configuration @preview.Source.Applicability.ConfigurationIdentifier; + module @preview.Source.Applicability.ModuleIdentifier; + model @preview.Source.Applicability.ModelIdentifier v@(preview.Source.Applicability.ModelVersion); + definition @preview.Source.Applicability.DefinitionIdentifier revision @preview.Source.Applicability.DefinitionRevision. + Captured synthetic authoring metadata only, not current vehicle evidence. +
+@preview.Rationale
+NoChanges: exact captured head content, empty diff. Nothing was saved or executed.
+ } + else + { +@scalar.LogicalIdentifier: @Exact(scalar.Value) @scalar.Unit (canonical source).
+ } + @foreach (var table in preview.Candidate.Tables) + { +| Fixed canonical axis | Canonical cell | Display only |
|---|---|---|
| @Exact(table.Axis[index]) @table.AxisUnit | +@Exact(table.Cells[index]) @table.Unit | ++ @DisplayUnitConverter.Format(display, 3) @display.Unit + @if (display.Error is { } displayError) { @displayError } + | +
No successful preview. Entry, template creation, render and unit changes do not validate input.
+} + +@code { + [CascadingParameter] public DisplayUnitSelection DisplaySelection { get; set; } = DisplayUnitSelection.Default; + private string _input = string.Empty; + private string? _acceptedInput; + private RunbookPreview? _acceptedPreview; + private RunbookPreviewException? _error; + private string? _status; + private bool _disposed; + + protected override void OnInitialized() + { + Authoring.Changed += OnChanged; + PreviewService.Changed += OnChanged; + } + private void CreateTemplate() + { + try + { + _input = PreviewService.CreateInputTemplate(); + _error = null; + _status = "Input draft copied from the captured current source. It has not been validated, saved or executed."; + } + catch (RunbookPreviewException exception) { _error = exception; _status = null; } + } + private void Validate() + { + try + { + _acceptedPreview = PreviewService.Validate(_input); + _acceptedInput = _input; + _error = null; + _status = "Read-only validation completed. No authoring version, approval, target operation or execution was created."; + } + catch (RunbookPreviewException exception) { _error = exception; _status = null; } + } + private void OnChanged() + { + if (_disposed) return; + _ = InvokeAsync(() => { if (!_disposed) StateHasChanged(); }); + } + private static string Exact(double value) => value.ToString("R", CultureInfo.InvariantCulture); + private static string Signed(double value) => value > 0 ? $"+{Exact(value)}" : Exact(value); + public void Dispose() + { + _disposed = true; + Authoring.Changed -= OnChanged; + PreviewService.Changed -= OnChanged; + } +} diff --git a/src/AutoForge.UI/Layout/MainLayout.razor b/src/AutoForge.UI/Layout/MainLayout.razor index e8428de..a235d4d 100644 --- a/src/AutoForge.UI/Layout/MainLayout.razor +++ b/src/AutoForge.UI/Layout/MainLayout.razor @@ -13,6 +13,7 @@