Use this playbook once you have audited your applications and confirmed that the remaining gaps in Xtraq have been addressed. It focuses on the final migration activity rather than discovery or optimisation.
| Step | Outcome |
|---|---|
| Prepare | Team agrees on migration scope, timelines, and rollback plan. |
| Cut-over | SpocR artefacts are replaced with Xtraq equivalents, and cross-cutting behaviours are reattached. |
| Validate | Regression tests, performance checks, and observability confirm parity. |
| Decommission | Legacy assets are retired, documentation updated, and lessons captured. |
Xtraq/ and .xtraq/ remain disposable and can be cleared; keep custom code outside of them (see Generated output is disposable).ResponseResult) have a documented adapter plan using pipeline policies or interceptors.💡 Prompt idea: "Review our SpocR → Xtraq readiness checklist and report any missing prerequisites."
With(...) plumbing is brittle.ResponseResult/CrudResult) and log history/audit content beside the main procedure result.*AsJson), while other paths consume typed records; both shapes must remain usable during migration.ParameterBindings.BindTableFrom<TInput,...> or BindTableWithInput to hydrate a context TVP from DI/claims (user/app/language) and merge record-level fields (RecordId, RowVersion, Overwrite) from the request before execution.ResultCallbackExecutionPolicy<TInput, TResult> to wrap pipeline outputs into legacy envelopes and trigger history/audit calls (for example invoking a HistoryCreate procedure) without changing executor signatures.DispatchExecutionPolicy<TInput, TResult> to fire notifications (SignalR, metrics, logging) on success and optionally on failure. Plug your dispatcher into the callback..WithTransaction(...) or custom policies plus the ambient accessors (ProcedureExecutionContext.AmbientConnection/AmbientTransaction) when auxiliary ADO.NET work must share the scope with generated procedures.Api section when you need request DTOs, table-type request rows, and the associated Api.Requests.* auto-bind allow-lists; omit the section when a project only requires raw input structs.ResultSet.Json.IncludeNullValues.Context-TVP Binding: Use
ParameterBindingOptions.BindTableWithInputto merge ambient data (for exampleIHttpContextAccessorfor user/app/language) with per-request record metadata at call time:services.AddXtraqDbContext(options => { options.ParameterBindings .BindTableWithInput<ContextTableType>("@Context", (input, sp, ct) => { var accessor = sp?.GetService<IHttpContextAccessor>(); var userId = accessor?.HttpContext?.User?.FindFirstValue("sub"); var record = input as IRecordContext; return new[] { new ContextTableType { UserId = int.TryParse(userId, out var uid) ? uid : 0, RecordId = record?.RecordId, RowVersion = record?.RowVersion, Overwrite = record?.Overwrite } }; }); });
IXtraqDbContext to implement IXtraqAmbientTransactionAccessor so the orchestrator can join EF-managed transactions (see Entity Framework Integration).ConfigureProcedure(...), pipeline execution methods, and policies.IProcedureExecutionPolicy implementations for retries, caching, history logging, or timeouts.ResponseResult) when required.WithLabel(...) annotations for telemetry and logging scopes.💡 Prompt idea: "Refactor this service to call the Xtraq pipeline and include a labelled retry policy." 💡 Prompt idea: "Create a pipeline policy that maps
InvoiceCreateResultinto our existingResponseResultshell."
💡 Prompt idea: "Generate a validation checklist for the Xtraq migration including performance and observability steps."
💡 Prompt idea: "Draft a release note summarising the migration from SpocR to Xtraq and its operational impact."
Quickstart
[object Object]
CLI Overview
Overview of xtraq command-line interface and global options. The xtraq CLI uses a dual-file configuration model anchored on the tracked `.xtraqconfig` snapshot. Secrets remain outside of source control (typically in `.env` or environment variables). Run `xtraq init` once to scaffold both files, then reuse them across `snapshot`, `build`, and the default `xtraq` entry point.