/mainframe-natural-adabas:sifap-loop phase=archaeology|vision|architecture|implementation|quality|operations [slice=<NNN-slug>]from mainframe-natural-adabas
Runs SIFAP modernization phases as bounded correction loops with observable exit gates, iteration ledger, and Natural/Adabas engineering graph for legacy-to-target coverage.
Ships in mainframe-natural-adabas. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Run one SIFAP phase as a bounded loop: produce, check against an observable gate, correct or escalate, and record iteration evidence. Close a phase only when its gate passes on actual checks, and keep the Natural/Adabas engineering graph as the shared coverage artifact that every phase reads and extends.
Use $ARGUMENTS to select phase and an optional slice. Accept only the six phase names listed in the argument hint. When phase is absent, infer it from artifacts that exist in the target repository and confirm the inference before acting. When slice is absent, evaluate the gate over every node in the graph and label the result as unscoped. Never create a branch, issue, or pull request from an inferred phase.
Three loops run at different scopes. Each has one exit condition and one owner.
| Loop | Scope | Ends when |
|---|---|---|
| Inner | One phase, one slice | The phase gate passes on actual checks, not on produced volume. |
| Outer | Across phases | A defect is routed to the phase that owns its root cause and that phase's inner loop closes again. |
| Improvement | One closed slice | Improvement candidates are recorded with an owner and applied to the next slice. |
Each inner iteration follows produce -> check -> classify -> correct -> recheck:
Binding rules:
templates/loop-ledger.md into the slice folder.not-run, never as pass.| Loop | Workshop pair | Lead agent | Gate in one line | Graph gate |
|---|---|---|---|---|
archaeology | Day 1 kickoff | sifap-archaeologist | Every rule candidate derives from an inspected legacy artifact. | archaeology |
vision | Par 01 Vision | sifap-architect | No rule candidate is left undecided; each has value, priority, and acceptance intent. | vision |
architecture | Par 02 Architecture | sifap-architect | Every requirement has a valid source and every binding choice has a decision record. | architecture |
implementation | Par 03 Implementation | sifap-builder | Every in-scope requirement has code and a passing focused check. | implementation |
quality | Par 04 Quality | sifap-quality | Every requirement is verified by a test and every Adabas file has a migration mapping. | quality |
operations | Par 05 Operations | sifap-operations | Delivery, infrastructure, approval, and documentation evidence exists for the slice. | operations |
Full entry criteria, exit criteria, typical defects, and per-phase commands: references/phase-gates.md.
Route by root cause, not by the phase that observed the symptom.
| Symptom | Root cause layer | Owning phase |
|---|---|---|
| Test asserts behavior the legacy system never had | Misread legacy evidence | archaeology |
| Rule was implemented but nobody wanted it | Unowned or unprioritized scope | vision |
| Requirement is ambiguous, untestable, or has two behaviors | Requirement form or missing decision | architecture |
| Code diverges from an approved, unambiguous requirement | Implementation defect | implementation |
| Behavior matches but data does not reconcile | Migration mapping or oracle defect | quality |
| Behavior is correct but not deployable, observable, or documented | Delivery or documentation gap | operations |
Defect record shape, escalation thresholds, and budget-exhaustion handling: references/defect-protocol.md.
A gate result is evidence. A gate decision is authority. The loop computes the first and never claims the second.
These never close autonomously, at any autonomy level: scope acceptance, requirement approval, binding technical decisions, accepted deviations, slice re-scoping, budget-exhaustion escalation, reconciliation sign-off, legacy source writes, external mutations, merges, and deployments. Prepare the material, recommend an answer with evidence, then stop and report.
Everything read-only, local, or reversible runs unattended: reading legacy evidence, building and querying the graph, running builds and tests, writing the slice folder, and drafting issues, runbooks, and decision records for review.
Autonomy levels, the resume sequence, the full gate register, and the pause report: references/autonomous-run.md.
The graph is one JSON document linking legacy artifacts, business rules, requirements, target code, tests, and delivery. Each phase adds nodes and edges; each gate is a query over the same document, so coverage is computed instead of asserted.
Extract the legacy layer from the corpus instead of typing it, then merge each later phase into the same file:
python3 scripts/sifap_loop_extract.py --corpus <legacy-root> --slice <NNN-slug> --out <graph.json>
python3 scripts/sifap_loop_extract.py --corpus <legacy-root> --merge <graph.json> --out <graph.json>
python3 scripts/sifap_loop_graph.py validate --graph <graph.json>
python3 scripts/sifap_loop_graph.py gate --graph <graph.json> --phase quality --slice <NNN-slug>
python3 scripts/sifap_loop_graph.py query --graph <graph.json> --query slice-order
python3 scripts/sifap_loop_graph.py mermaid --graph <graph.json> --focus natural:PAY0100 --depth 2
The extractor emits only the legacy layer: members, CALLNAT, PERFORM, INCLUDE, map and data-area use, JCL entry points, and data access resolved through VIEW OF declarations. Anything it cannot cite becomes an unresolved note, never a node. Business rules, requirements, decisions, and target nodes stay authored by humans, so the archaeology gate still needs a person. --merge adds only what is missing and never overwrites an authored node.
The validator requires an evidence value on every node and edge, so an unproven relationship cannot enter the graph. Node types, edge types, allowed endpoint pairs, and every gate query: references/graph-schema.md. A runnable example lives in assets/graph-example.json.
references/phase-gates.md: entry and exit criteria, typical defects, and commands for the six loops.references/defect-protocol.md: defect classification, routing, record shape, and escalation thresholds.references/autonomous-run.md: autonomy levels, durable state, human gate register, and stop conditions.references/graph-schema.md: graph document shape, node and edge vocabulary, and gate query definitions.scripts/sifap_loop_extract.py: read-only legacy-layer extractor for Natural members, JCL, and DDM files.scripts/test_sifap_loop_extract.py: tests for member scanning, edge extraction, comment handling, merge safety, and the graph contract.scripts/sifap_loop_graph.py: read-only graph validator, gate evaluator, query engine, and Mermaid renderer.scripts/test_sifap_loop_graph.py: focused tests for validation, gates, cycles, slice order, and rendering.assets/graph-example.json: minimal well-formed graph covering one legacy program through delivery.templates/loop-ledger.md: per-slice iteration ledger scaffold.sifap-workshop-orchestration; this skill closes the loop inside a stage and decides when a handoff is earned.source_legacy lineage belong to sifap-requirements-traceability; the graph consumes that result and does not re-implement it.vision loop has no dedicated agent; sifap-architect leads it with the product owner accountable for scope.## SIFAP loop result
**Phase:** archaeology | vision | architecture | implementation | quality | operations
**Slice:** <NNN-slug or unscoped>
**Status:** closed | iterating | escalated | blocked | paused-for-human
**Iterations:** <used>/3
### Gate
| Criterion | Result | Evidence or blocker |
| --- | --- | --- |
### Iterations
| # | Change | Check run | Actual result |
| --- | --- | --- | --- |
### Routed defects
| Defect | Root cause layer | Owning phase | Owner |
| --- | --- | --- | --- |
### Improvements and residual risk
- <candidate or risk, owner, next checkpoint>
not-run.assets/graph-example.json (opens in a new tab)references/autonomous-run.md (opens in a new tab)references/defect-protocol.md (opens in a new tab)references/graph-schema.md (opens in a new tab)references/phase-gates.md (opens in a new tab)scripts/sifap_loop_extract.py (opens in a new tab)scripts/sifap_loop_graph.py (opens in a new tab)scripts/test_sifap_loop_extract.py (opens in a new tab)scripts/test_sifap_loop_graph.py (opens in a new tab)templates/loop-ledger.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mainframe-modernization, sifap, legacy-migration, phase-gates
26 skills in this plugin
/adabas-postgresql-migrationModel Adabas files, DDM and FDT definitions, MU and PE structures, packed and unpacked numerics, descriptors, and ISN identity as a PostgreSQL schema, then prove equivalence with recorded reconciliation numbers. Use when designing or reviewing an Adabas to PostgreSQL data migration, mapping legacy field formats to column types, deciding child-table versus array storage, or verifying that migrated data matches the legacy source./code-modernizationUse this skill when the user asks to modernize legacy code with a disciplined GitHub Copilot workflow: brief, assess, map, extract business rules, reimagine architecture, transform modules, and harden with tests and security review. Trigger for COBOL, JCL, legacy Java, .NET, C++, classic ASP, monolith modernization, behavior-preserving rewrite, business-rule extraction, modernization assessment, or legacy-to-modern transformation./create-architectural-decision-recordCreate an Architectural Decision Record (ADR) as a structured Markdown document with front matter, coded consequences, alternatives, implementation notes, and references. Use when the user asks to document an architecture decision, create an ADR, capture alternatives and trade-offs, or save a decision under docs/adr.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin mainframe-natural-adabasOther plugins' skills for the same job