src/main/resources/targets/claude/skills/conditional/test/x-execute-shell-regression-tests/SKILL.md
Regression-shell gate: reads QualityConfig.regression, runs curated scenario scripts against the target (self mode: generator output; service mode: client services), compares against baseline, and blocks merge on unexpected diffs.
npx skillsauth add edercnj/claude-environment x-execute-shell-regression-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Regression-shell quality gate. Reads QualityConfig.regression from the project YAML,
dispatches scenario scripts, captures output, diffs against
governance/baselines/regression-baseline.json, and exits non-zero when unexpected
divergence is detected.
Two modes:
ia-dev-env generate on a
reference YAML config and compares the produced .claude/ directory against the
stored golden snapshot.tests/regression/scenarios.yaml (HTTP/gRPC/CLI) and compares responses against
recorded baselines./x-execute-shell-regression-tests story-0073-0001 — auto-detects mode from quality.regression.mode/x-execute-shell-regression-tests story-0073-0001 --mode self — force self mode/x-execute-shell-regression-tests story-0073-0001 --mode service — force service mode/x-execute-shell-regression-tests story-0073-0001 --update-baseline — record new baseline (opt-in)/x-execute-shell-regression-tests story-0073-0001 --scenarios-file tests/regression/custom.yaml — override scenarios file| Flag | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| STORY-ID | String | — | Required. Story being gated. |
| --mode | Enum | from config | Override regression mode (self or service). |
| --update-baseline | Boolean | false | Write new baseline; do not fail on divergence. |
| --scenarios-file | String | from config | Override path to scenarios.yaml. |
| --report | String | auto | Output report path. |
Bash command: $CLAUDE_PROJECT_DIR/.claude/hooks/telemetry-phase.sh start x-execute-shell-regression-tests Phase-1-Parse
Read quality.regression from project YAML:
quality:
regression:
enabled: true
mode: service # self | service
scenarios-file: tests/regression/scenarios.yaml
Resolve effective mode: --mode flag overrides YAML; YAML overrides default service.
When quality.regression.enabled=false → emit WARN: regression gate disabled and exit 0.
When --mode self and no generator binary found → exit 2 OPERATIONAL_ERROR.
When --mode service and scenarios file absent → exit 1 REGRESSION_SCENARIOS_MISSING.
Bash command: $CLAUDE_PROJECT_DIR/.claude/hooks/telemetry-phase.sh end x-execute-shell-regression-tests Phase-1-Parse ok
Bash command: $CLAUDE_PROJECT_DIR/.claude/hooks/telemetry-phase.sh start x-execute-shell-regression-tests Phase-2-Execute
# Generate to a temp dir and diff against golden
ia-dev-env generate --config <reference-config.yaml> --output /tmp/regression-output/
diff -r --exclude="*.log" governance/baselines/regression-self-golden/ /tmp/regression-output/
Capture exit code and diff output. Any diff line counts as a divergence unless the path
is listed in governance/baselines/regression-self-baseline.txt (exempt list).
Execute each scenario in scenarios.yaml using the declared tool:
| Scenario type | Tool | Min version |
| :--- | :--- | :--- |
| rest | curl | 7.68 |
| grpc | grpcurl | 1.8 |
| websocket | wscat | 5.0 |
| cli | native shell | — |
For each scenario:
governance/baselines/regression-baseline.json (scenario ID → expected response hash).Bash command: $CLAUDE_PROJECT_DIR/.claude/hooks/telemetry-phase.sh end x-execute-shell-regression-tests Phase-2-Execute ok
Bash command: $CLAUDE_PROJECT_DIR/.claude/hooks/telemetry-phase.sh start x-execute-shell-regression-tests Phase-3-Report
Produce report at ai/epics/epic-XXXX/reports/regression-report-STORY-ID.md using
_TEMPLATE-REGRESSION-SHELL.md.
When --update-baseline:
governance/baselines/regression-baseline.json from current run results.governance/baselines/regression-baseline-updates.log (append-only).When NOT --update-baseline:
failed > 0 → exit 1 REGRESSION_DETECTED.failed == 0 → exit 0.Bash command: $CLAUDE_PROJECT_DIR/.claude/hooks/telemetry-phase.sh end x-execute-shell-regression-tests Phase-3-Report ok
| Exit | Code | Condition |
| :--- | :--- | :--- |
| 0 | OK | All scenarios passed (or gate disabled). |
| 1 | REGRESSION_DETECTED | ≥1 scenario diverged from baseline. |
| 2 | OPERATIONAL_ERROR | Tool missing, scenarios file absent, or binary not found. |
| 3 | BASELINE_CORRUPT | governance/baselines/regression-baseline.json malformed. |
x-implement-story Phase 3.Q when quality.regression.enabled=true (conditional gate — EPIC-0073, Rule 24).ai/epics/epic-XXXX/reports/regression-report-STORY-ID.md (Rule 24 §Mandatory Evidence Artifacts).governance/baselines/regression-baseline-updates.log — silent overwrites fail audit-regression-shell.sh.x-internal-update-status is NOT invoked here; status updates are the caller's responsibility.tools
Documentation automation v2: stack-aware generation from documentation.targets.
development
Generates or updates CI/CD pipelines per project stack with actionlint validation.
tools
Generates ADRs from architecture-plan mini-ADRs with sequential numbering and index update.
development
Formats source code; first step of the pre-commit chain (format -> lint -> compile).