Machine-readable discovery
dotnet causalia inspect ... --format json gives an agent structured leads about likely simulation boundaries and determinism seams.
AI agents can inspect code, edit files and run tests. Causalia adds something especially useful for distributed-system debugging: a failure execution that can be replayed after the agent changes the code.
If the same test can pass or fail because wall-clock timing changed, an agent has weak evidence for whether its patch worked. A deterministic replay makes the validation target stable.
dotnet causalia inspect ... --format json gives an agent structured leads about likely simulation boundaries and determinism seams.
A replay token and reduced failure sequence let the agent test the same problematic execution before and after a change.
After the exact reproduction passes, the agent can run wider deterministic exploration plus the repository's ordinary tests.
Run dotnet causalia inspect <solution> --format json. Treat findings as leads, not conclusions.
Start from a real production symptom and write the business invariant before modifying behavior.
Prefer ordinary .NET seams such as TimeProvider, propagated cancellation and narrow dependency interfaces.
If a simulation fails, keep the replay token and reduced sequence. Do not treat the trace as automatic root-cause proof.
Make the smallest production change justified by the failure path, then replay that exact path.
Run broader exploration and the existing unit, integration and end-to-end suite. Modeled provider semantics do not certify a real provider.
When investigating timing, retry, duplicate-delivery, restart, or concurrency risk in this .NET solution: 1. Run "dotnet causalia inspect <solution> --format json" and use findings as leads, not conclusions. 2. State the business invariant before editing production behavior. 3. Choose one high-value boundary and build the smallest deterministic Causalia simulation around it. 4. Prefer TimeProvider, CancellationToken and narrow dependency interfaces over Causalia-specific production abstractions. 5. Preserve any replay token and reduced failure sequence. 6. Make the smallest change supported by the evidence. 7. Replay the exact failure, then run broader Causalia exploration and the existing test suite. 8. Keep real infrastructure integration tests and do not claim modeled provider semantics certify the real provider.
The trace is reproducible evidence. Use minimization and analysis to understand which scheduling or injected-failure conditions the reproduction actually depends on.
Keep real Kafka, RabbitMQ, Dapr, database and HTTP integration tests. Causalia verifies modeled semantics under deterministic control.
If adopting Causalia requires pushing its runtime types throughout the application/domain layer, the boundary is probably too broad.
The goal is a defensible invariant and a stable reproduction, not merely changing code until one test run passes.
Start with llms.txt, then let it follow the canonical README and scenario cookbook.