Incident To Regression
Use this skill to transform an observed incident into deterministic regression checks.
Gait Context
Gait is an offline-first runtime for AI agents that enforces tool-boundary policy, emits signed and verifiable evidence artifacts, and supports deterministic regressions.
Use this skill when:
- incident triage needs repeatable regression fixtures
- CI gate failures need deterministic reproduction
- evidence outputs must be generated from Gait artifacts
Do not use this skill when:
- Gait CLI is unavailable in the environment
- no Gait run/pack artifact or run identifier is available as input
Required Inputs
run_source: run id, runpack path, or equivalent source accepted bygait regress init.workdir: writable working directory where fixtures and outputs will be created.
Workflow
- Resolve
run_sourcebefore changing directories:- keep identifiers unchanged (for example run ids)
- if
run_sourceis a relative file path, normalize to absolute path run_source_ref="$(python3 -c 'import os,sys; v=sys.argv[1]; print(os.path.abspath(v) if os.path.exists(v) else v)' <run_source>)"
- Enter the declared working directory before generating artifacts:
mkdir -p <workdir> && cd <workdir>
- Initialize deterministic fixture from the incident source:
gait regress init --from <run_source_ref> --json
- Parse fields from init output and record them:
ok,run_id,fixture_name,fixture_dir,config_path,next_commands
- Execute regression graders:
gait regress run --json
- If CI evidence is needed, rerun with JUnit output:
gait regress run --json --junit <junit_path>
- Return a concise summary with:
- source identifier
- fixture directory and config path
- status and failed grader count
- evidence output paths
Safety And Portability Rules
- Use CLI outputs only; do not infer grader results from config text.
- Treat non-zero regress exit codes as actionable outcomes, not warnings.
- Do not assume repository-specific fixture paths.
- Keep paths relative to the active workspace unless the user explicitly asks for absolute paths.
Usage Example
run_source_ref="$(python3 -c 'import os,sys; v=sys.argv[1]; print(os.path.abspath(v) if os.path.exists(v) else v)' run_demo)"
mkdir -p ./regress-workdir && cd ./regress-workdir
gait demo --json
gait regress init --from "${run_source_ref}" --json
mkdir -p ./artifacts
gait regress run --json --junit ./artifacts/junit.xml
Expected result:
- init output includes
ok=trueand afixture_dir - run output includes stable
statusand grader failure details - JUnit file exists at
./artifacts/junit.xml
Validation Example
mkdir -p ./regress-workdir && cd ./regress-workdir
gait demo --json
gait regress init --from run_demo --json
mkdir -p ./artifacts
gait regress run --json > ./artifacts/regress_result.json
python3 - <<'PY'
import json
from pathlib import Path
p = json.loads(Path('./artifacts/regress_result.json').read_text(encoding='utf-8'))
assert p.get('status') in {'pass', 'fail'}
print('validated status:', p.get('status'))
PY
Expected result:
- script prints
validated status: passorvalidated status: fail
Provider Notes (Anthropic Claude)
- Ask Claude to use the
incident-to-regressionskill by name when this workflow applies. - Keep outputs grounded in command results and
--jsonpayload fields.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.