feat(cli): deterministic Simulation Mode + trace→workflow generator + coverage toolchain #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a controlled “Simulation Mode” (no API key, no network) and a trace-driven toolchain to go from run output → workflow generation + coverage.
What’s included
Simulation mode:
AIFLOW_MODE=sim(also supports legacyAIFLOW_MOCK_LLM=1)AIFLOW_SEEDAIFLOW_SIM_TICKET_TYPE=technical|billing|generalAIFLOW_SIM_SOLUTION_FOUND=true|falseTrace → Workflow generator:
runtime/cli/traceToAiflow.mtsflow.__generator.rulesCoverage tooling:
runtime/cli/traceCoverage.mts(per-run coverage report)runtime/cli/coverageSweep.mts(union coverage)--autoderives SIM scenarios from missed edges using existing overrides only (no scope creep)One-command design pipeline:
runtime/cli/designToolchain.mts:How to test (local)
unset API_KEY GEMINI_API_KEY AIFLOW_MODE=sim AIFLOW_SEED=42 node runtime/cli/runAiflow.mts examples/CustomerSupportFlow/CustomerSupportFlow_v1.0.0.aiflow node runtime/cli/coverageSweep.mts examples/CustomerSupportFlow/CustomerSupportFlow_v1.0.0.aiflow --seed 42 --auto node runtime/cli/designToolchain.mts examples/CustomerSupportFlow/CustomerSupportFlow_v1.0.0.aiflow --seed 42 --auto --out-dir /tmp/aiflow-next-artifacts