proc-test-gen
БесплатноБез исполняемых скриптовНе проверенDerive source-of-truth functional-equivalence assertions for ONE converted Informatica-to-Snowflake-Scripting mapping procedure (data-flow), independent of…
от sfc-gh-dflippo★ 35 звёзд на GitHubОб этом скилле
Proc Test Generator (scripting flavor)
Generate and run a functional-equivalence check for a single converted mapping procedure — an
Informatica mapping converted to a standalone Snowflake Scripting stored procedure — from the original
data-flow logic in the source mapping. The expected target-table contents are computed from the source
mapping applied to the seeded input, NOT from the converted SQL under repair, so the assertions are an
independent oracle. All generated artifacts are stored in <UNIT>/stabilization/tests/proc/<proc_name>/.
Scope. This is the data-flow counterpart to orchestration-test-gen: orchestration-test-gen tests control-flow elements of a task graph; proc-test-gen tests the output table of one mapping proc. It is the scripting-flavor analog of dbt-test-gen. In dbt mode a mapping becomes a model (tested by dbt-test-gen); in scripting mode a mapping becomes its own
kind=etlstored procedure, tested here.
Autonomous mode: When spawned as a team agent, skip all interactive stopping points, make reasonable defaults, and document assumptions in the completion report. When done,
send_messagetomainwith your results, and respond to anyshutdown_requestwithtype: "shutdown_response",approve: true.
Where this sits in the fix loop
block-locate ── the defective block + its source transform node (scripts/stabilization_tools.py block-locate, marker-scoped)
proc-fixer ── [agentic] author the fixed block SQL from the source node (sibling sub-skill)
block-replace ── splice the fix back, marker-integrity checked (scripts/stabilization_tools.py block-replace)
deploy-and-call ─ deploy the one proc into the test schema + smoke-CALL it (scai code deploy-and-call)
proc-test-gen ── [THIS SKILL] derive the source-of-truth expected target contents + batched assertions
grade ── run the assertions against the populated target; PASS/FAIL feeds the fixer loop
proc-test-gen owns the ARRANGE (input seed) and ASSERT (expected target) — the stable, source-derived
parts. The ACT (deploy + CALL the proc) is performed via deploy-and-call; the proc body itself is the
baseline snapshot the fixer iterates on.
AAA for a single mapping proc
- Arrange:Setup — create the test schema + the source/input tables the mapping reads (schema inferred from the source mapping's Source/Source-Qualifier definitions), and the target table shape. Run once.
- Arrange:Seed —
TRUNCATE+INSERTsynthetic input rows into the source tables. Run before every ACT/grade cycle to reset to a known state. The seed is the fixed input the expected output is computed from — it must not change once assertions are derived. - Act — deploy the (current) converted proc into the test schema and
CALLit, so its output lands in<test_schema>.<TARGET>. Done withscai code deploy-and-call(see Tooling); on the baseline run the proc may fail to CREATE or error at CALL — that is expected and recorded. - Assert — a single batched query over only the target table that verifies its contents equal what the source mapping produces for the seeded input (see proc-assertion-patterns.md).
Input
session_status.json— withsource_file_path, the pending mapping proc unit, andmigration_object_path- The converted proc
.sqlfile (akind=etlunit'sfiles.converted.path) - The source mapping definition (Informatica
.xml) atsource_file_path - The block FullName(s) under repair (from the block boundary markers / scan.json)
Prerequisites
- Python 3.11+; the deterministic tool layer present (
scripts/stabilization_tools.py— the block-locate / ewi-extract subcommands — andscripts/scan_unit.py) - The headless executor available:
scai code deploy-and-call(deploy one proc + CALL, returns aProcCallResultJSON) — see Tooling - An active Snowflake connection with a warehouse, and CREATE TABLE / CREATE PROCEDURE on a user-provided (test) database + schema
Output Location
<UNIT>/stabilization/tests/proc/<proc_name>/
<proc_name>.assert.sql # the batched target-only assertion query (source-derived)
<proc_name>.seed.sql # ARRANGE:SETUP + ARRANGE:SEED (input tables + synthetic rows)
test_report.md # baseline result, consumed by proc-fixer
The value of this skill is the seed (the fixed input) and the assert (expected target contents from source semantics). The proc body is the baseline; proc-fixer iterates it until the assert passes.
Tooling (headless, no IDE / no snowflake_sql_execute)
Unlike orchestration-test-gen (which runs SQL via the CoCo snowflake_sql_execute MCP tool), the scripting
loop is headless:
| Step | Command |
|---|---|
| locate the block + its span/body | `uv run --project {SKILL_DIR} python {SKILL_DIR}/scripts/stabilization_tools.py block-locat |
Установить proc-test-gen в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл proc-test-gen?
Derive source-of-truth functional-equivalence assertions for ONE converted Informatica-to-Snowflake-Scripting mapping procedure (data-flow), independent of the converted SQL. Seeds input, deploys+CALLs the proc in an isolated test schema, and grades its target table against expected contents computed from the source mapping. Use when the stabilization skill invokes test generation for a scripting-flavor mapping proc.
Как установить скилл proc-test-gen?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл proc-test-gen запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic