Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the deterministic strategic-actor pipeline by (1) introducing template-driven planning inputs/outputs and (2) tightening validation around situation signals and scenario ontology ordering, while updating the CLI and tests to match the new artifact layout.
Changes:
- Add YAML templates for situation signal extraction and scenario planning; normalize/enforce richer signal schema and deterministic A/B/C ordering.
- Introduce a scenario planning orchestrator that emits auxiliary artifacts (
planning_query.json,prior_snapshot.json) and update theomen scenarioCLI defaults/pack-id handling accordingly. - Update deterministic
simulate/compareto persist actor-derivation traces; remove NL compile flags and adjust smoke/integration/unit tests; bump version to0.1.1.
Reviewed changes
Copilot reviewed 52 out of 52 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/omen/ingest/synthesizer/services/situation.py |
Loads signals.yaml, normalizes signal schema, and passes template/query payloads into LLM prompts. |
src/omen/scenario/planner.py |
New planning orchestrator building planning query + prior snapshot and producing scenario ontology output. |
src/omen/scenario/validator.py |
Enforces deterministic A/B/C ordering and validates richer situation signal schema. |
src/omen/cli/situation.py |
Updates default artifact paths, allows pack-id situation references, and routes scenario planning through the new planner. |
src/omen/cli/main.py / src/omen/cli/case.py |
Removes NL compile flags and adds actor derivation persistence into deterministic simulate/compare. |
tests/* + docs/guides/situation-analysis.md |
Updates tests/docs to reflect new artifact paths and behavior; adds new coverage for planning stability and signal validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pack_id = "strategic_actor_nokia_v1" | ||
| situation_path = tmp_path / "data" / "scenarios" / pack_id / "situation.json" | ||
| _write_situation_artifact(situation_path) |
There was a problem hiding this comment.
The test writes the situation artifact to data/scenarios/<pack_id>/situation.json, but the CLI resolves a pack-id situation reference via resolve_situation_artifact_ref() to data/scenarios/<pack_id>/generation/situation.json. As written, omen scenario --situation <pack_id> will not find the artifact and the test will fail. Write the fixture to the generation/situation.json path (or call resolve_situation_artifact_ref(pack_id) and write to that).
| - `data/scenarios/sap_v1/sap_reltio_acquisition_situation.json` | ||
| - `data/scenarios/sap_v1/sap_reltio_acquisition_situation.md` | ||
| - `data/scenarios/sap_v1/sap_reltio_acquisition_generation.json` |
There was a problem hiding this comment.
This guide still references the pre-refactor default output names/locations (e.g. sap_reltio_acquisition_situation.json, *_generation.json) but the CLI now defaults to data/scenarios/<pack_id>/generation/situation.json (and generation/generation.json). Please update the listed output paths to match the current CLI defaults to avoid misleading users.
| - `data/scenarios/sap_v1/sap_reltio_acquisition_situation.json` | |
| - `data/scenarios/sap_v1/sap_reltio_acquisition_situation.md` | |
| - `data/scenarios/sap_v1/sap_reltio_acquisition_generation.json` | |
| - `data/scenarios/sap_v1/generation/situation.json` | |
| - `data/scenarios/sap_v1/generation/situation.md` | |
| - `data/scenarios/sap_v1/generation/generation.json` |
| 拿到 situation artifact 后,执行场景分解: | ||
|
|
||
| ```bash | ||
| omen scenario --situation data/scenarios/sap_v1/sap_reltio_acquisition_situation.json | ||
| ``` | ||
|
|
||
| 随后可继续: | ||
|
|
||
| ```bash | ||
| omen simulate --scenario data/scenarios/sap_v1/sap_reltio_acquisition.json | ||
| ``` |
There was a problem hiding this comment.
The command examples still use the old artifact filenames (*_situation.json / sap_reltio_acquisition.json). With the new defaults, scenario planning writes scenario_pack.json and the situation artifact lives under generation/situation.json. Update these example commands to match the new paths so copy/paste works.
| ROOT = Path(__file__).resolve().parents[2] | ||
| SCENARIO_PATH = ROOT / "data" / "scenarios" / "ontology.json" | ||
| NL_INPUT_PATH = ROOT / "tests" / "fixtures" / "scenario_compilation" / "nokia_nl_scenarios.json" | ||
|
|
There was a problem hiding this comment.
SCENARIO_PATH is now unused after switching the test to write a temporary scenario_pack.json. ruff check will flag this as an unused assignment; remove SCENARIO_PATH (and ROOT if it becomes unused) to keep lint passing.
| ROOT = Path(__file__).resolve().parents[2] | ||
| SCENARIO_PATH = ROOT / "data" / "scenarios" / "ontology.json" | ||
| NL_INPUT_PATH = ROOT / "tests" / "fixtures" / "scenario_compilation" / "nokia_nl_scenarios.json" | ||
|
|
There was a problem hiding this comment.
SCENARIO_PATH is now unused after switching the test to write a temporary scenario_pack.json. ruff check will flag this as an unused assignment; remove SCENARIO_PATH (and ROOT if it becomes unused) to keep lint passing.
No description provided.