# EV-002 Downstream system-test scenario library

## Claim

Added deterministic, mock-driven system-test scenarios for the PRD Plugin
downstream system-test harness, plus optional opencode CLI-driven counterparts
that are skipped when the opencode CLI is not available.

## Scenario coverage

- `system_tests/scenarios/test_bug_report_and_fix.py` — bug intake, health
  finding, code fix, evidence, and request closure.
- `system_tests/scenarios/test_session_close.py` — session close, memory
  promotion, tracking update, and changelog entry.
- `system_tests/scenarios/test_upstream_bug_report.py` — create a bug request
  and export a sanitized upstream submission with `request_export.py`.
- `system_tests/scenarios/test_health_check.py` — health check with stale
  request refresh and resolved health finding.
- `system_tests/scenarios/test_feature_idea_to_plan.py` — new feature from
  idea to PRD, architecture, and implementation plan (opencode only).
- `system_tests/scenarios/test_drift_monitor.py` — drift monitor session
  tracking and report generation (mock only).

Also fixed the teardown-order bug in `test_feature_idea_to_plan.py` where the
post-run `fixture.repo_root.exists()` assertion ran after the fixture had
already been cleaned up.

## Verification

```text
python -m pytest system_tests -v
======================== 11 passed, 5 skipped in 4.82s ========================
```

All five opencode-driven tests are skipped in CI when the opencode CLI is not
installed.

## Linked IDs

- REQ-028
- IMP-001 (IMP-TASK-009 through IMP-TASK-013)
- PRD-001
- ARCH-001
