Optimization: Heavy operational patterns live in references/ and are
loaded only when needed. The skill must remain useful if copied without those
files: keep the core workflow below self-contained, and treat references as
accelerators.
Language rule: Skill instructions are written in English. Detect the
project's dominant language from README, docs, comments, issues, and recent
commits. Produce user-facing reports in that language. If the user writes in
French, prefer French unless repository evidence strongly indicates otherwise.
Gotchas: If this skill is installed inside cli-code-skills, read
../gotchas.md before producing output.
Forge OCI Rootless — Lithic Contract-to-Product Migration
Do not migrate scripts into containers.
Extract the operational bedrock, refine it, then forge an operable OCI alloy.
You are an architecture, operations, and migration orchestrator. Your job is to
transform a historical Ansible/bare-metal/VM/service-shell system into an
operable rootless OCI product without confusing legacy sediment with durable
contract.
The target model is:
- separated OCI artifacts
- rootless container runtime (
podman rootless, docker rootless, nerdctl, or equivalent)
systemd --user lifecycle (or equivalent service manager)
- declarative unit definitions (Quadlet, compose, systemd units, or equivalent)
- explicit host bootstrap
- one public operator CLI
- executable validation gates
- local and remote supervision
- backup, restore, rerun, reboot, and degraded-mode proof
Runtime note: This skill uses Podman rootless + Quadlet as the reference
implementation because it is the most mature rootless-native stack with systemd
integration. The principles and contracts apply to any OCI-compliant runtime.
Adapt runtime-specific commands (podman → docker/nerdctl, Quadlet → compose/units)
to your environment.
This is not a Dockerization checklist. A stateful middleware is a geological
formation: layers accumulated over time, stress lines at interfaces, valuable
ore mixed with accidental gangue, and hidden faults that only appear under
pressure. The container is only one refined component of the final alloy.
1. Core doctrine — Bedrock before alloy
Use this stratigraphic and metallurgical frame throughout the analysis.
| Model |
Nature |
Migration meaning |
| Bedrock |
Stable foundation below surface layers |
Durable operational contract: actors, accounts, ports, paths, secrets, day-2 commands, monitoring, recovery |
| Strata |
Historical layers deposited over time |
Ansible roles, VM layout, scripts, systemd units, manual conventions, operator habits |
| Ore vs gangue |
Valuable mineral mixed with waste rock |
Contractual behavior to preserve vs accidental mechanics to discard |
| Core sample |
Small but traceable evidence sample |
File/path/line/command evidence supporting a migration claim |
| Fault line |
Boundary where stress concentrates |
Host/container, rootless user, UID mapping, TLS, storage, SELinux/AppArmor, network, registry, monitoring bridge |
| Metamorphism |
Transformation under heat/pressure without losing material identity |
Rewriting deployment mechanics while preserving operational meaning |
| Phase diagram |
Map of stable states under conditions |
Compatibility matrix across OS, Podman, cgroups, lingering, SELinux, storage, reboot, air-gap constraints |
| Alloy |
Engineered combination with target properties |
Runtime image + init logic + tools image + check image + host bootstrap + CLI + Quadlet |
| Heat treatment |
Controlled hardening to avoid brittleness |
Phased rollout, compatibility adapters, rollback, repeated rerun/reboot hardening |
| Fracture surface |
Place where cracks initiate or propagate |
Failure modes: missing secret, bad volume label, broken user bus, corrupt backup, stale wrapper, port conflict |
| Tailings |
Residual waste after extraction |
Legacy scripts, duplicate truth, old units, undocumented manual paths, obsolete wrappers |
| Stratigraphic memory |
Record of past events in layers |
Runbook deltas, blackbox entries, anti-regression tests, incident lessons |
Skill rule: extract the bedrock, refine the ore, forge one alloy, stress-test
all fault lines, and contain the tailings.
2. When to use this skill
Use this skill when the user asks for:
- migration from Ansible, shell scripts, VM, or bare-metal deployment to OCI
- rootless OCI runtime (Podman, Docker rootless, nerdctl), declarative units, or
systemd --user architecture
- transformation of middleware/stateful services into an operable product
- audit of parity between historical deployment and containerized target
- consolidation of scattered day-2 scripts into one operator CLI
- migration methodology with gates, proof, rollout, and rollback
- backup/restore, monitoring, TLS, identity, secrets, and recovery proof
- multi-agent decomposition of a migration audit or implementation plan
Especially relevant for databases, brokers, middleware, stateful local services,
applications with host secrets/certificates, and projects where Ansible roles
encode operations rather than only installation steps.
Do not use this as the primary skill for pure Kubernetes migration, simple
stateless Dockerfile cleanup, application API design, or general CI optimization.
Use handoffs instead of duplicating other skills.
3. Invocation modes
$ARGUMENTS can be a project path, Ansible role, playbook, inventory, deploy
directory, migration brief, incident report, or empty for auto-discovery.
Optional flags:
| Flag |
Meaning |
--solo |
One-agent analysis only. Use for small scopes or when Agent tool is unavailable. |
--agents |
Spawn internal specialist sub-agents for evidence extraction, alloy design, and stress review. |
--deep |
Spawn internal sub-agents and cross-skill handoff agents when local cli-* skills are available. |
--write |
In addition to the report, write reusable artifacts when safe: bedrock inventory, phase diagram, gate checklist, ADR skeleton, or migration backlog. Never mutate runtime files without explicit user intent. |
Default behavior is adaptive:
- Tier S: solo unless evidence is contradictory.
- Tier M: use internal sub-agents if the repository is available.
- Tier L/XL: use internal sub-agents by default; use cross-skill handoffs in
--deep mode or when the user explicitly asks to maximize LLM usage.
4. Seismic scaling — match depth to migration pressure
| Signal |
Tier |
Behavior |
| Mostly stateless service, no persistent local state |
S |
Focus on image/runtime/CLI basics and T0-T2 proof |
| One stateful service or middleware on one host |
M |
Full bedrock extraction, storage, identity, rootless, Quadlet, day-2 proof |
| Multiple instances, monitoring, backup/restore, TLS, prod-like constraints |
L |
Full agentic report, architecture, migration phases, T0-T4/M0 gates |
| Regulated, air-gapped, HA, multi-environment, strict recovery/SLOs |
XL |
Add compliance, supply chain, rollback, disaster recovery, clean-host restore, acceptance criteria |
Never produce an XL report for a simple Dockerfile. Never under-scope a stateful
system just because a container starts.
5. Agentic operating model
Load references/agent-roster.md for full sub-agent definitions, packet format,
wave orchestration, and tier-specific recommendations.
Summary: 10 specialist sub-agents run in 5 waves (orient → sample → refine →
fracture review → synthesis). Each returns a structured evidence packet, not
free-form text. The main skill owns the final decision.
| Wave |
Agents |
Purpose |
| 0 |
Main |
Detect scope, tier, evidence inventory |
| 1 |
Bedrock, Stratigraphy, Fault-Line, Reservoir, Operator, Observability |
Core sampling (parallel) |
| 2 |
Alloy, Assay, Tailings + optional cross-skill handoffs |
Refining and design (parallel) |
| 3 |
Fracture Risk |
Adversarial review |
| 4 |
Main |
Synthesis and convergence decision |
If Agent tool is unavailable, simulate the roles sequentially.
6. Cross-skill handoffs
Load references/handoffs.md when available. Do not duplicate other skills. In
--deep mode, inspect available local cli-* skill folders before claiming a
handoff exists.
| Trigger |
Prefer handoff |
What this skill still owns |
| Legacy stack pays compensations (wait loops, chown chains, run-once guards) across layers |
/cli-audit-hanoi |
Displacement catalog: what to fix at source in the target alloy vs consolidate in one layer |
| Complex shell wrappers or unsafe scripts |
/cli-audit-shell |
Classify contract vs legacy; decide adapter/removal |
| Podman/systemd/host bootstrap design details |
/cli-forge-infra |
Rootless migration verdict and bedrock preservation |
| Prod-parity/runbook/failure-injection needed |
/cli-forge-resilience |
Migration-specific fault map and acceptance gates |
| Test suite coverage audit |
/cli-audit-test |
T0-T4/M0 migration proof matrix |
| CI/CD pipeline creation |
/cli-forge-pipeline |
Which gates must exist and why |
| Repository structure redesign |
/cli-forge-tree |
OCI/rootless responsibility boundaries |
| Config/manifest/schema design |
/cli-forge-schema |
Operational contract semantics |
| HLD/LLD needed |
/cli-forge-hld or /cli-forge-lld |
Migration contract and proof requirements |
| Docs/runbooks needed |
/cli-forge-doc |
What must be documented as contract |
| Multi-agent implementation sprint |
/cli-forge-chef |
Migration backlog, work packages, gate owners |
| High-stakes multi-agent governance |
/cli-forge-quorum |
Evidence packets, invariants, acceptance criteria |
| Drift/invariant audit |
/cli-audit-drift or /cli-audit-sync |
T0 bedrock drift gates |
Handoff rule: provide the other skill a precise input packet. Never hand off a
vague task like "look at infra".
7. Workflow
Step 0 — Orient the survey
- Parse
$ARGUMENTS for path, brief, flags, and explicit deliverable.
- Determine output language.
- Detect whether a repository exists and whether local
cli-* skills are available.
- Estimate tier S/M/L/XL.
- Build an evidence map:
- Ansible:
roles/, tasks/, handlers/, templates/, defaults/, vars/, group_vars/, host_vars/, playbooks, inventories.
- Services: systemd units, init scripts, Quadlet files, service wrappers.
- Containers:
Containerfile, Dockerfile, compose, Podman scripts, registries.
- Ops: shell scripts, Makefile, CLI, docs, runbooks, monitoring checks, backup/restore scripts.
- State: data dirs, logs, certificates, secrets, exports, archives, WAL/binlog/journal paths.
- CI: pipelines, test scripts, scans, generated artifacts.
- Decide solo vs agentic execution.
Step 1 — Extract the bedrock contract
Always reconstruct these contracts before designing the target.
Instance contract
- instance name and identity
- public/listening ports
- sockets and endpoints
- service account and operator account
- per-instance directories
- TLS names and certificates
- service lifecycle semantics
Storage contract
- data directories
- journals, WAL/binlog/equivalent
- logs and audit logs
- exports/imports
- backup archives
- retention and purge policy
- ownership and labels
- mounts/volumes and capacity expectations
Identity and privilege contract
- service account
- operator account
- supervision account
- backup account
- application/database accounts
- compatibility accounts
- separation between Unix identity, application identity, monitoring identity, and backup identity
Security contract
- server TLS
- client TLS
- CA model
- certificate rotation
- secret rendering and ownership
- encryption at rest if present
- host hardening
- SELinux/AppArmor/security labels
Day-2 contract
- start/stop/status/restart
- logs/journal
- shell/client/SQL/protocol access
- export/import
- backup/verify/restore
- purge/retention
- plugin lifecycle
- diagnostics
- account/cert/secret rotation
- compatibility commands still used by operators
Observability contract
- local probes
- remote probes
- NRPE/Nagios/Icinga or equivalent bridge
- SQL or technical monitoring role
- check wrappers
- exit code and message semantics
- alert routing assumptions
Recovery contract
- logical backup
- physical backup
- verification
- restore
- clean-host restore
- journal/binlog/WAL replay
- rollback
- degraded-mode behavior
Step 2 — Separate bedrock from strata
Classify every historical artifact.
| Class |
Meaning |
Example |
| Preserve |
Durable bedrock; target must keep equivalent behavior |
port, account role, backup RPO/RTO, monitoring semantics |
| Refine |
Valuable ore that must be transformed into the target model |
Ansible template -> generated host manifest; backup script -> tools image command |
| Adapter |
Temporary compatibility layer over the new CLI/runtime |
old service-status.sh calls mycli status |
| Tailings |
Legacy waste to remove or quarantine |
interactive install wizard, duplicate root unit, stale wrapper mutating state |
| Unknown |
Not enough evidence |
undocumented script used by cron maybe |
Never copy strata just because it exists. Never discard strata until you know
whether it contains ore.
Step 3 — Map fault lines and phase conditions
Rootless migrations fail at boundaries. Build an explicit fault map:
- service user and operator user
subuid/subgid
- rootless container storage (Podman/Docker/nerdctl specific paths)
- cgroups mode
systemd --user availability
- user bus and lingering
- Quadlet location and reload semantics
- low ports and port forwarding
- bind mounts and UID mapping
- SELinux/AppArmor labels
- host secrets and certificate ownership
- registry reachability and image pinning
- inter-container communication (network DNS vs Unix socket vs pod localhost vs host network)
- local vs remote monitoring path
- backup archive path and restore target
- reboot/rerun/dirty-host behavior
For each fault line, define the phase conditions where the design is stable:
OS version, Podman version, filesystem, labels, user scope, network mode, offline
constraints, and reboot expectations.
Step 4 — Forge the target alloy
Assign each responsibility to one owner.
Reproducible builds are non-negotiable for T0/T1 bedrock: pinned digests (never :latest), SOURCE_DATE_EPOCH, hermetic build stages, content-addressed dependencies. The toolkit and rationale are shared across skills in ../shared/determinism.md (consumed by cli-forge-pipeline, cli-forge-resilience, cli-forge-perf, cli-audit-wizard). A migration that produces non-reproducible artifacts cannot pass T1.
Load references/containerfile-patterns.md when available. Every image MUST
follow these hardening patterns.
Runtime image
- multi-stage build: build tools NEVER in runtime image (prefer distroless/ubi-micro/scratch)
- non-root USER mandatory (UID 1001+, /usr/sbin/nologin) — not "when possible"
- read-only filesystem (
--read-only + tmpfs for /tmp, /run)
- no package manager in final image (apk/apt/dnf/yum/rpm/pip removed or absent)
- no shell if operations are possible through tools image
- no curl/wget/nc/ncat/ss — healthcheck uses app binary only
- HEALTHCHECK directive mandatory (interval=30s, timeout=5s, retries=3)
- FIPS crypto-policies set when regulated environment
- steady-state daemon/process only
- no permanent bootstrap logic hidden in entrypoint
- no host secrets baked into image
- CVE scan (vulnerability scanner (trivy, grype, or equivalent)) mandatory: HIGH+CRITICAL = 0 or documented exception with owner + expiry
- SBOM generated (spdx-json) and archived with every build
Init image or init logic
- storage bootstrap
- schema or instance initialization
- account initialization
- secret/cert installation or validation
- idempotent rerun behavior
- explicit completion marker if needed
Tools image
- client commands
- export/import
- backup/verify/restore
- purge/retention
- diagnostics
- account/secret/cert rotation helpers
Check image
- local health probes (compiled binary, not curl/wget)
- protocol probes
- remote monitoring compatible checks
- stable exit codes/messages (0=ok, 1=warn, 2=crit)
- no unnecessary mutation privileges
- no secrets in probe output
- goss/container-structure-test validated
Host bootstrap
- service account
- directories
- ownership and security labels
subuid/subgid
- rootless runtime prerequisites (Podman, Docker rootless, or nerdctl)
systemd --user and lingering if required
- secrets/certs rendered on host
- Quadlet manifests generated from a single source of truth
Public operator CLI
- one supported surface for all day-2 actions
- wrappers are adapters only
- no critical command hidden only in docs or scripts
- stable output where monitoring or automation depends on it
- this is rung 1 of
../shared/escalation-ladder.md — the migration target must expose every critical operation through a CLI or REST API, never only through an admin GUI. A migration that leaves a critical day-2 action stuck at rung 5 (only doable by clicking a vendor UI) has not converged.
Compatibility layer
- optional, bounded, and tested
- calls the new public CLI or new runtime
- never defines a second supported control plane
- has sunset conditions
Step 5 — Define migration phases
- Survey: build evidence inventory and bedrock contract.
- Assay: classify historical strata into Preserve/Refine/Adapter/Tailings/Unknown.
- Boundary design: map rootless and host fault lines.
- Alloy design: define runtime/init/tools/check images, host bootstrap, Quadlet, CLI, compatibility.
- Prototype: build minimal target with explicit storage and secrets model.
- Heat treatment: run rerun/restart/reboot/dirty-host and degraded tests.
- Field acceptance: prove day-2, monitoring, backup/restore, and clean-host restore.
- Tailings remediation: remove, quarantine, or sunset legacy wrappers and duplicate truths.
- Stratigraphic memory: update runbooks, blackbox entries, anti-regression gates.
Step 6 — Require proof before declaring convergence
Use the T0/T1/T2/T3/T4/M0 matrix. The rung semantics are shared across skills — see ../shared/gate-ladder.md. This skill keeps the lithic vocabulary (bedrock, alloy, fresh formation, field operations, fracture, stratigraphic memory) but the meaning of each rung — what it proves, what it catches — is the canonical version used by cli-forge-resilience, cli-forge-pipeline, cli-audit-test, cli-forge-demo, and cli-forge-perf. Load references/proof-gates.md when available. The per-rung "require proof" discipline is itself an instance of the 3-phase done-gate (pre: contract / during: one rung at a time / post: captured proof) — see ../shared/done-gate.md.
| Level |
Name |
Purpose |
Examples |
| T0 — Bedrock / contract |
Contract is explicit and internally consistent |
docs/code/manifest consistency, ports, users, paths, secrets, CLI inventory, syntax validation, drift guards |
|
| T1 — Alloy / components |
Artifacts are buildable, hardened, and scanned |
multi-stage build, non-root USER, read-only fs, no pkg manager, HEALTHCHECK, goss/CST, vulnerability scanner (trivy, grype, or equivalent) CVE scan, SBOM, FIPS if regulated |
|
| T2 — Fresh formation / deploy |
Clean host can become a running rootless instance |
bootstrap, Quadlet install, systemd --user, start/status/logs/restart, clean removal, rerun |
|
| T3 — Field operations / day-2 |
Product is operable |
clients, local/remote monitoring, export/import, backup/verify/restore, purge, rotations, diagnostics, compat wrappers |
|
| T4 — Stress & fracture |
Failures are detected and safe |
missing/invalid secrets, missing image, bad port, broken config, user bus down, disk full, registry down, corrupt archive, clock skew, SELinux denial, monitoring bridge broken |
|
| M0 — Stratigraphic memory |
Incidents become durable learning |
runbook deltas, blackbox entries, anti-regression tests, clarified invariants, debt owners |
|
Manual checks are allowed temporarily only if they have an automation target and
an owner. A migration can be partially converged with manual gates; it cannot be
fully converged if critical proof is only assumed.
8. Scenario routing
Load references/scenarios.md when available.
| Scenario |
Signals |
Primary agents |
Common handoffs |
| A. Ansible stateful service to rootless |
roles, group_vars, systemd, data dirs, backup scripts |
Bedrock, Stratigraphy, Fault-Line, Recovery, Proof |
shell, infra, resilience, test |
| B. Already containerized but not operable |
Containerfile exists, weak day-2/proof |
Operator, Alloy, Observability, Proof |
sync, pipeline, test, doc |
| C. Rootless/Quadlet failing after reboot |
manual podman works, user service fails |
Fault-Line, Proof, Risk |
infra, resilience |
| D. Monitoring/NRPE migration |
check scripts, nrpe, SQL monitoring role |
Observability, Operator, Fault-Line, Proof |
shell, resilience, lld |
| E. Backup/restore acceptance |
backup exists, restore weak/manual |
Recovery, Proof, Risk |
resilience, shell, test |
| F. Legacy CLI consolidation |
scripts/wrappers/aliases/Make targets |
Operator, Tailings, Stratigraphy, Proof |
shell, lld, doc |
| G. Air-gapped or regulated deployment |
private registry, signed images, compliance |
Fault-Line, Alloy, Proof, Risk |
infra, pipeline, hld, quorum |
| H. Multi-agent implementation sprint |
user asks to parallelize work |
Main skill then handoff |
chef or quorum |
| I. CI gate design |
CI exists but lacks migration proof |
Proof, Alloy, Risk |
pipeline, test, resilience |
| J. Incident-driven hardening |
outage or failed migration |
Relevant domain + Risk + Proof |
resilience, drift, sync |
9. Decision rules
Converged
Declare Converged only if:
- bedrock contract is explicit
- target responsibilities have one owner each
- rootless runtime model is unambiguous
- operator CLI routes critical day-2 operations
- backup and restore are proven, not merely documented
- local and remote monitoring paths are distinct and tested when both matter
- reboot and rerun are proven when production requires survival across reboot
- compatibility wrappers are adapters only and tested
- critical T0-T4/M0 gates pass or have accepted, bounded manual evidence
Partially converged
Declare Partially converged if:
- target structure exists
- but critical proof is incomplete
- or some responsibilities still depend on legacy mechanics
- or compatibility is necessary but bounded and routed through the new CLI
- or prod-like rerun/reboot/restore/remote monitoring is not fully proven yet
Non converged
Declare Non converged if:
- compatibility defines a second supported runtime/control plane
- historical commands changed semantics silently
- backup exists but restore is unproven
- remote monitoring path is undefined while required
- rootless runtime is not proven after reboot/rerun where required
- secrets/cert rotation is described but not reconciled/tested
- duplicate truths remain in templates, scripts, manifests, and docs
10. Universal caveats
Always surface relevant caveats:
- Containerization moves host complexity; it does not erase it.
- A green
podman run is not proof of post-reboot systemd --user behavior.
- Rootless boundaries concentrate stress at UID mapping, cgroups, ports, storage labels, and user bus.
- Local health and remote monitoring are different fault paths.
- Backup without a proven restore is not a recovery capability.
- Secret/certificate rotation without reconciliation creates false confidence.
- A compatibility wrapper that mutates state directly is a second control plane.
- Old units, volumes, and manifests are tailings: contain or remove them.
- Dirty reruns reveal more truth than clean demos.
- Offline/air-gapped deployments need image, signature, SBOM, registry, and restore proof.
11. Output format
Load references/output-template.md when available. Produce 10 sections:
- Executive summary
- Bedrock operational contract (7 sub-contracts)
- Strata and tailings not to copy
- Fault-line map
- Target OCI alloy (8 responsibilities)
- Migration plan (9 phases)
- Test and proof matrix (T0-T4/M0)
- Maturity scorecard (15 dimensions)
- Caveats and residual debt
- Decision: Converged / Partially converged / Non converged + recommended handoffs
12. Write mode artifacts
When --write is present and the user has not forbidden file writes, create only
safe planning artifacts unless explicitly asked to modify implementation files.
Preferred generated artifacts:
docs/oci-rootless-bedrock.md
docs/oci-rootless-fault-map.md
docs/oci-rootless-target-alloy.md
docs/oci-rootless-proof-gates.md
docs/oci-rootless-tailings.md
docs/adr/ADR-oci-rootless-migration.md
migration-backlog.md
Never write secrets. Never invent production values. Mark unknowns clearly.
13. References
| File |
Content |
references/agent-roster.md |
10 sub-agents, packet format, wave orchestration, tier recommendations |
references/scenarios.md |
10 scenario playbooks (A-J) with agent routing and exit criteria |
references/proof-gates.md |
T0-T4/M0 gate matrix with recommended and blocking gates |
references/handoffs.md |
Cross-skill handoff routing table and packet template |
references/lithic-model.md |
Geological/metallurgical reasoning model (13 concepts, 7 anti-patterns) |
references/containerfile-patterns.md |
Hardened image patterns: multi-stage, non-root, read-only, FIPS, CVE scan, SBOM, goss |
references/output-template.md |
Output structure, 15-dimension scoring framework |
Integration with other cli-* skills
| Skill |
Relationship |
/cli-forge-infra |
Design rootless/Podman/Quadlet implementation; simplify config paths |
/cli-forge-resilience |
Generate migration-specific runbooks, test ladder, failure injection |
/cli-audit-shell |
Audit legacy shell wrappers; classify as Adapter/Tailings |
/cli-audit-test |
Validate T0-T4/M0 test matrix coverage |
/cli-forge-pipeline |
Design CI gates for image build, scan, and deploy proof |
/cli-audit-sync |
Verify docs match bedrock; catch doc-code drift post-migration |
/cli-forge-doc |
Generate runbooks, day-2 guides, operator CLI docs |
/cli-forge-hld / /cli-forge-lld |
HLD for multi-instance designs; LLD for Quadlet/schemas |
/cli-forge-chef / /cli-forge-quorum |
Parallelize multi-phase migration across agents |
/cli-audit-drift |
Verify implementation honours bedrock operational contracts |
/cli-forge-schema |
Visualize migration phases, fault-line map, alloy architecture as Mermaid |
1---2name: cli-forge-oci-rootless3description: Agentic migration architect for transforming Ansible, bare-metal, VM, shell-scripted, or systemd-root deployed middleware into an operable OCI rootless product using any OCI-compliant runtime (Podman, Docker rootless, nerdctl, or equivalent), systemd --user, declarative units (Quadlet, compose), explicit host bootstrap, a single operator CLI, executable gates, monitoring, and proven recovery. Uses a stratigraphic/metallurgical reasoning model: extract the bedrock contract, separate ore from gangue, map fault lines, forge target alloys, stress-test fracture surfaces, and remediate legacy tailings.4---56> **Optimization:** Heavy operational patterns live in `references/` and are7> loaded only when needed. The skill must remain useful if copied without those8> files: keep the core workflow below self-contained, and treat references as9> accelerators.10>11> **Language rule:** Skill instructions are written in English. Detect the12> project's dominant language from README, docs, comments, issues, and recent13> commits. Produce user-facing reports in that language. If the user writes in14> French, prefer French unless repository evidence strongly indicates otherwise.15>16> **Gotchas:** If this skill is installed inside `cli-code-skills`, read17> `../gotchas.md` before producing output.1819# Forge OCI Rootless — Lithic Contract-to-Product Migration2021> Do not migrate scripts into containers.22> Extract the operational bedrock, refine it, then forge an operable OCI alloy.2324You are an architecture, operations, and migration orchestrator. Your job is to25transform a historical Ansible/bare-metal/VM/service-shell system into an26operable rootless OCI product without confusing legacy sediment with durable27contract.2829The target model is:3031- separated OCI artifacts32- rootless container runtime (`podman rootless`, `docker rootless`, `nerdctl`, or equivalent)33- `systemd --user` lifecycle (or equivalent service manager)34- declarative unit definitions (Quadlet, compose, systemd units, or equivalent)35- explicit host bootstrap36- one public operator CLI37- executable validation gates38- local and remote supervision39- backup, restore, rerun, reboot, and degraded-mode proof4041> **Runtime note:** This skill uses Podman rootless + Quadlet as the reference42> implementation because it is the most mature rootless-native stack with systemd43> integration. The principles and contracts apply to any OCI-compliant runtime.44> Adapt runtime-specific commands (podman → docker/nerdctl, Quadlet → compose/units)45> to your environment.4647This is not a Dockerization checklist. A stateful middleware is a geological48formation: layers accumulated over time, stress lines at interfaces, valuable49ore mixed with accidental gangue, and hidden faults that only appear under50pressure. The container is only one refined component of the final alloy.5152---5354## 1. Core doctrine — Bedrock before alloy5556Use this stratigraphic and metallurgical frame throughout the analysis.5758| Model | Nature | Migration meaning |59|---|---|---|60| **Bedrock** | Stable foundation below surface layers | Durable operational contract: actors, accounts, ports, paths, secrets, day-2 commands, monitoring, recovery |61| **Strata** | Historical layers deposited over time | Ansible roles, VM layout, scripts, systemd units, manual conventions, operator habits |62| **Ore vs gangue** | Valuable mineral mixed with waste rock | Contractual behavior to preserve vs accidental mechanics to discard |63| **Core sample** | Small but traceable evidence sample | File/path/line/command evidence supporting a migration claim |64| **Fault line** | Boundary where stress concentrates | Host/container, rootless user, UID mapping, TLS, storage, SELinux/AppArmor, network, registry, monitoring bridge |65| **Metamorphism** | Transformation under heat/pressure without losing material identity | Rewriting deployment mechanics while preserving operational meaning |66| **Phase diagram** | Map of stable states under conditions | Compatibility matrix across OS, Podman, cgroups, lingering, SELinux, storage, reboot, air-gap constraints |67| **Alloy** | Engineered combination with target properties | Runtime image + init logic + tools image + check image + host bootstrap + CLI + Quadlet |68| **Heat treatment** | Controlled hardening to avoid brittleness | Phased rollout, compatibility adapters, rollback, repeated rerun/reboot hardening |69| **Fracture surface** | Place where cracks initiate or propagate | Failure modes: missing secret, bad volume label, broken user bus, corrupt backup, stale wrapper, port conflict |70| **Tailings** | Residual waste after extraction | Legacy scripts, duplicate truth, old units, undocumented manual paths, obsolete wrappers |71| **Stratigraphic memory** | Record of past events in layers | Runbook deltas, blackbox entries, anti-regression tests, incident lessons |7273**Skill rule:** extract the bedrock, refine the ore, forge one alloy, stress-test74all fault lines, and contain the tailings.7576---7778## 2. When to use this skill7980Use this skill when the user asks for:8182- migration from Ansible, shell scripts, VM, or bare-metal deployment to OCI83- rootless OCI runtime (Podman, Docker rootless, nerdctl), declarative units, or `systemd --user` architecture84- transformation of middleware/stateful services into an operable product85- audit of parity between historical deployment and containerized target86- consolidation of scattered day-2 scripts into one operator CLI87- migration methodology with gates, proof, rollout, and rollback88- backup/restore, monitoring, TLS, identity, secrets, and recovery proof89- multi-agent decomposition of a migration audit or implementation plan9091Especially relevant for databases, brokers, middleware, stateful local services,92applications with host secrets/certificates, and projects where Ansible roles93encode operations rather than only installation steps.9495Do **not** use this as the primary skill for pure Kubernetes migration, simple96stateless Dockerfile cleanup, application API design, or general CI optimization.97Use handoffs instead of duplicating other skills.9899---100101## 3. Invocation modes102103`$ARGUMENTS` can be a project path, Ansible role, playbook, inventory, deploy104directory, migration brief, incident report, or empty for auto-discovery.105106Optional flags:107108| Flag | Meaning |109|---|---|110| `--solo` | One-agent analysis only. Use for small scopes or when Agent tool is unavailable. |111| `--agents` | Spawn internal specialist sub-agents for evidence extraction, alloy design, and stress review. |112| `--deep` | Spawn internal sub-agents and cross-skill handoff agents when local `cli-*` skills are available. |113| `--write` | In addition to the report, write reusable artifacts when safe: bedrock inventory, phase diagram, gate checklist, ADR skeleton, or migration backlog. Never mutate runtime files without explicit user intent. |114115Default behavior is adaptive:116117- Tier S: solo unless evidence is contradictory.118- Tier M: use internal sub-agents if the repository is available.119- Tier L/XL: use internal sub-agents by default; use cross-skill handoffs in120 `--deep` mode or when the user explicitly asks to maximize LLM usage.121122---123124## 4. Seismic scaling — match depth to migration pressure125126| Signal | Tier | Behavior |127|---|---:|---|128| Mostly stateless service, no persistent local state | **S** | Focus on image/runtime/CLI basics and T0-T2 proof |129| One stateful service or middleware on one host | **M** | Full bedrock extraction, storage, identity, rootless, Quadlet, day-2 proof |130| Multiple instances, monitoring, backup/restore, TLS, prod-like constraints | **L** | Full agentic report, architecture, migration phases, T0-T4/M0 gates |131| Regulated, air-gapped, HA, multi-environment, strict recovery/SLOs | **XL** | Add compliance, supply chain, rollback, disaster recovery, clean-host restore, acceptance criteria |132133Never produce an XL report for a simple Dockerfile. Never under-scope a stateful134system just because a container starts.135136---137138## 5. Agentic operating model139140Load `references/agent-roster.md` for full sub-agent definitions, packet format,141wave orchestration, and tier-specific recommendations.142143**Summary:** 10 specialist sub-agents run in 5 waves (orient → sample → refine →144fracture review → synthesis). Each returns a structured evidence packet, not145free-form text. The main skill owns the final decision.146147| Wave | Agents | Purpose |148|---|---|---|149| 0 | Main | Detect scope, tier, evidence inventory |150| 1 | Bedrock, Stratigraphy, Fault-Line, Reservoir, Operator, Observability | Core sampling (parallel) |151| 2 | Alloy, Assay, Tailings + optional cross-skill handoffs | Refining and design (parallel) |152| 3 | Fracture Risk | Adversarial review |153| 4 | Main | Synthesis and convergence decision |154155If Agent tool is unavailable, simulate the roles sequentially.156157---158159## 6. Cross-skill handoffs160161Load `references/handoffs.md` when available. Do not duplicate other skills. In162`--deep` mode, inspect available local `cli-*` skill folders before claiming a163handoff exists.164165| Trigger | Prefer handoff | What this skill still owns |166|---|---|---|167| Legacy stack pays compensations (wait loops, chown chains, run-once guards) across layers | `/cli-audit-hanoi` | Displacement catalog: what to fix at source in the target alloy vs consolidate in one layer |168| Complex shell wrappers or unsafe scripts | `/cli-audit-shell` | Classify contract vs legacy; decide adapter/removal |169| Podman/systemd/host bootstrap design details | `/cli-forge-infra` | Rootless migration verdict and bedrock preservation |170| Prod-parity/runbook/failure-injection needed | `/cli-forge-resilience` | Migration-specific fault map and acceptance gates |171| Test suite coverage audit | `/cli-audit-test` | T0-T4/M0 migration proof matrix |172| CI/CD pipeline creation | `/cli-forge-pipeline` | Which gates must exist and why |173| Repository structure redesign | `/cli-forge-tree` | OCI/rootless responsibility boundaries |174| Config/manifest/schema design | `/cli-forge-schema` | Operational contract semantics |175| HLD/LLD needed | `/cli-forge-hld` or `/cli-forge-lld` | Migration contract and proof requirements |176| Docs/runbooks needed | `/cli-forge-doc` | What must be documented as contract |177| Multi-agent implementation sprint | `/cli-forge-chef` | Migration backlog, work packages, gate owners |178| High-stakes multi-agent governance | `/cli-forge-quorum` | Evidence packets, invariants, acceptance criteria |179| Drift/invariant audit | `/cli-audit-drift` or `/cli-audit-sync` | T0 bedrock drift gates |180181Handoff rule: provide the other skill a precise input packet. Never hand off a182vague task like "look at infra".183184---185186## 7. Workflow187188### Step 0 — Orient the survey1891901. Parse `$ARGUMENTS` for path, brief, flags, and explicit deliverable.1912. Determine output language.1923. Detect whether a repository exists and whether local `cli-*` skills are available.1934. Estimate tier S/M/L/XL.1945. Build an evidence map:195 - Ansible: `roles/`, `tasks/`, `handlers/`, `templates/`, `defaults/`, `vars/`, `group_vars/`, `host_vars/`, playbooks, inventories.196 - Services: systemd units, init scripts, Quadlet files, service wrappers.197 - Containers: `Containerfile`, `Dockerfile`, `compose`, Podman scripts, registries.198 - Ops: shell scripts, Makefile, CLI, docs, runbooks, monitoring checks, backup/restore scripts.199 - State: data dirs, logs, certificates, secrets, exports, archives, WAL/binlog/journal paths.200 - CI: pipelines, test scripts, scans, generated artifacts.2016. Decide solo vs agentic execution.202203### Step 1 — Extract the bedrock contract204205Always reconstruct these contracts before designing the target.206207#### Instance contract208209- instance name and identity210- public/listening ports211- sockets and endpoints212- service account and operator account213- per-instance directories214- TLS names and certificates215- service lifecycle semantics216217#### Storage contract218219- data directories220- journals, WAL/binlog/equivalent221- logs and audit logs222- exports/imports223- backup archives224- retention and purge policy225- ownership and labels226- mounts/volumes and capacity expectations227228#### Identity and privilege contract229230- service account231- operator account232- supervision account233- backup account234- application/database accounts235- compatibility accounts236- separation between Unix identity, application identity, monitoring identity, and backup identity237238#### Security contract239240- server TLS241- client TLS242- CA model243- certificate rotation244- secret rendering and ownership245- encryption at rest if present246- host hardening247- SELinux/AppArmor/security labels248249#### Day-2 contract250251- start/stop/status/restart252- logs/journal253- shell/client/SQL/protocol access254- export/import255- backup/verify/restore256- purge/retention257- plugin lifecycle258- diagnostics259- account/cert/secret rotation260- compatibility commands still used by operators261262#### Observability contract263264- local probes265- remote probes266- NRPE/Nagios/Icinga or equivalent bridge267- SQL or technical monitoring role268- check wrappers269- exit code and message semantics270- alert routing assumptions271272#### Recovery contract273274- logical backup275- physical backup276- verification277- restore278- clean-host restore279- journal/binlog/WAL replay280- rollback281- degraded-mode behavior282283### Step 2 — Separate bedrock from strata284285Classify every historical artifact.286287| Class | Meaning | Example |288|---|---|---|289| **Preserve** | Durable bedrock; target must keep equivalent behavior | port, account role, backup RPO/RTO, monitoring semantics |290| **Refine** | Valuable ore that must be transformed into the target model | Ansible template -> generated host manifest; backup script -> tools image command |291| **Adapter** | Temporary compatibility layer over the new CLI/runtime | old `service-status.sh` calls `mycli status` |292| **Tailings** | Legacy waste to remove or quarantine | interactive install wizard, duplicate root unit, stale wrapper mutating state |293| **Unknown** | Not enough evidence | undocumented script used by cron maybe |294295Never copy strata just because it exists. Never discard strata until you know296whether it contains ore.297298### Step 3 — Map fault lines and phase conditions299300Rootless migrations fail at boundaries. Build an explicit fault map:301302- service user and operator user303- `subuid`/`subgid`304- rootless container storage (Podman/Docker/nerdctl specific paths)305- cgroups mode306- `systemd --user` availability307- user bus and lingering308- Quadlet location and reload semantics309- low ports and port forwarding310- bind mounts and UID mapping311- SELinux/AppArmor labels312- host secrets and certificate ownership313- registry reachability and image pinning314- inter-container communication (network DNS vs Unix socket vs pod localhost vs host network)315- local vs remote monitoring path316- backup archive path and restore target317- reboot/rerun/dirty-host behavior318319For each fault line, define the phase conditions where the design is stable:320OS version, Podman version, filesystem, labels, user scope, network mode, offline321constraints, and reboot expectations.322323### Step 4 — Forge the target alloy324325Assign each responsibility to one owner.326327**Reproducible builds are non-negotiable** for T0/T1 bedrock: pinned digests (never `:latest`), `SOURCE_DATE_EPOCH`, hermetic build stages, content-addressed dependencies. The toolkit and rationale are shared across skills in `../shared/determinism.md` (consumed by `cli-forge-pipeline`, `cli-forge-resilience`, `cli-forge-perf`, `cli-audit-wizard`). A migration that produces non-reproducible artifacts cannot pass T1.328329Load `references/containerfile-patterns.md` when available. Every image MUST330follow these hardening patterns.331332#### Runtime image333334- multi-stage build: build tools NEVER in runtime image (prefer distroless/ubi-micro/scratch)335- non-root USER mandatory (UID 1001+, /usr/sbin/nologin) — not "when possible"336- read-only filesystem (`--read-only` + tmpfs for /tmp, /run)337- no package manager in final image (apk/apt/dnf/yum/rpm/pip removed or absent)338- no shell if operations are possible through tools image339- no curl/wget/nc/ncat/ss — healthcheck uses app binary only340- HEALTHCHECK directive mandatory (interval=30s, timeout=5s, retries=3)341- FIPS crypto-policies set when regulated environment342- steady-state daemon/process only343- no permanent bootstrap logic hidden in entrypoint344- no host secrets baked into image345- CVE scan (vulnerability scanner (trivy, grype, or equivalent)) mandatory: HIGH+CRITICAL = 0 or documented exception with owner + expiry346- SBOM generated (spdx-json) and archived with every build347348#### Init image or init logic349350- storage bootstrap351- schema or instance initialization352- account initialization353- secret/cert installation or validation354- idempotent rerun behavior355- explicit completion marker if needed356357#### Tools image358359- client commands360- export/import361- backup/verify/restore362- purge/retention363- diagnostics364- account/secret/cert rotation helpers365366#### Check image367368- local health probes (compiled binary, not curl/wget)369- protocol probes370- remote monitoring compatible checks371- stable exit codes/messages (0=ok, 1=warn, 2=crit)372- no unnecessary mutation privileges373- no secrets in probe output374- goss/container-structure-test validated375376#### Host bootstrap377378- service account379- directories380- ownership and security labels381- `subuid`/`subgid`382- rootless runtime prerequisites (Podman, Docker rootless, or nerdctl)383- `systemd --user` and lingering if required384- secrets/certs rendered on host385- Quadlet manifests generated from a single source of truth386387#### Public operator CLI388389- one supported surface for all day-2 actions390- wrappers are adapters only391- no critical command hidden only in docs or scripts392- stable output where monitoring or automation depends on it393- this is **rung 1** of `../shared/escalation-ladder.md` — the migration target must expose every critical operation through a CLI or REST API, never only through an admin GUI. A migration that leaves a critical day-2 action stuck at rung 5 (only doable by clicking a vendor UI) has not converged.394395#### Compatibility layer396397- optional, bounded, and tested398- calls the new public CLI or new runtime399- never defines a second supported control plane400- has sunset conditions401402### Step 5 — Define migration phases4034041. **Survey:** build evidence inventory and bedrock contract.4052. **Assay:** classify historical strata into Preserve/Refine/Adapter/Tailings/Unknown.4063. **Boundary design:** map rootless and host fault lines.4074. **Alloy design:** define runtime/init/tools/check images, host bootstrap, Quadlet, CLI, compatibility.4085. **Prototype:** build minimal target with explicit storage and secrets model.4096. **Heat treatment:** run rerun/restart/reboot/dirty-host and degraded tests.4107. **Field acceptance:** prove day-2, monitoring, backup/restore, and clean-host restore.4118. **Tailings remediation:** remove, quarantine, or sunset legacy wrappers and duplicate truths.4129. **Stratigraphic memory:** update runbooks, blackbox entries, anti-regression gates.413414### Step 6 — Require proof before declaring convergence415416Use the T0/T1/T2/T3/T4/M0 matrix. The rung **semantics** are shared across skills — see `../shared/gate-ladder.md`. This skill keeps the lithic vocabulary (bedrock, alloy, fresh formation, field operations, fracture, stratigraphic memory) but the meaning of each rung — what it proves, what it catches — is the canonical version used by `cli-forge-resilience`, `cli-forge-pipeline`, `cli-audit-test`, `cli-forge-demo`, and `cli-forge-perf`. Load `references/proof-gates.md` when available. The per-rung "require proof" discipline is itself an instance of the 3-phase done-gate (pre: contract / during: one rung at a time / post: captured proof) — see `../shared/done-gate.md`.417418| Level | Name | Purpose | Examples |419|---|---|---|---|420| **T0 — Bedrock / contract** | Contract is explicit and internally consistent | docs/code/manifest consistency, ports, users, paths, secrets, CLI inventory, syntax validation, drift guards |421| **T1 — Alloy / components** | Artifacts are buildable, hardened, and scanned | multi-stage build, non-root USER, read-only fs, no pkg manager, HEALTHCHECK, goss/CST, vulnerability scanner (trivy, grype, or equivalent) CVE scan, SBOM, FIPS if regulated |422| **T2 — Fresh formation / deploy** | Clean host can become a running rootless instance | bootstrap, Quadlet install, `systemd --user`, start/status/logs/restart, clean removal, rerun |423| **T3 — Field operations / day-2** | Product is operable | clients, local/remote monitoring, export/import, backup/verify/restore, purge, rotations, diagnostics, compat wrappers |424| **T4 — Stress & fracture** | Failures are detected and safe | missing/invalid secrets, missing image, bad port, broken config, user bus down, disk full, registry down, corrupt archive, clock skew, SELinux denial, monitoring bridge broken |425| **M0 — Stratigraphic memory** | Incidents become durable learning | runbook deltas, blackbox entries, anti-regression tests, clarified invariants, debt owners |426427Manual checks are allowed temporarily only if they have an automation target and428an owner. A migration can be partially converged with manual gates; it cannot be429fully converged if critical proof is only assumed.430431---432433## 8. Scenario routing434435Load `references/scenarios.md` when available.436437| Scenario | Signals | Primary agents | Common handoffs |438|---|---|---|---|439| **A. Ansible stateful service to rootless** | roles, group_vars, systemd, data dirs, backup scripts | Bedrock, Stratigraphy, Fault-Line, Recovery, Proof | shell, infra, resilience, test |440| **B. Already containerized but not operable** | Containerfile exists, weak day-2/proof | Operator, Alloy, Observability, Proof | sync, pipeline, test, doc |441| **C. Rootless/Quadlet failing after reboot** | manual podman works, user service fails | Fault-Line, Proof, Risk | infra, resilience |442| **D. Monitoring/NRPE migration** | check scripts, nrpe, SQL monitoring role | Observability, Operator, Fault-Line, Proof | shell, resilience, lld |443| **E. Backup/restore acceptance** | backup exists, restore weak/manual | Recovery, Proof, Risk | resilience, shell, test |444| **F. Legacy CLI consolidation** | scripts/wrappers/aliases/Make targets | Operator, Tailings, Stratigraphy, Proof | shell, lld, doc |445| **G. Air-gapped or regulated deployment** | private registry, signed images, compliance | Fault-Line, Alloy, Proof, Risk | infra, pipeline, hld, quorum |446| **H. Multi-agent implementation sprint** | user asks to parallelize work | Main skill then handoff | chef or quorum |447| **I. CI gate design** | CI exists but lacks migration proof | Proof, Alloy, Risk | pipeline, test, resilience |448| **J. Incident-driven hardening** | outage or failed migration | Relevant domain + Risk + Proof | resilience, drift, sync |449450---451452## 9. Decision rules453454### Converged455456Declare **Converged** only if:457458- bedrock contract is explicit459- target responsibilities have one owner each460- rootless runtime model is unambiguous461- operator CLI routes critical day-2 operations462- backup and restore are proven, not merely documented463- local and remote monitoring paths are distinct and tested when both matter464- reboot and rerun are proven when production requires survival across reboot465- compatibility wrappers are adapters only and tested466- critical T0-T4/M0 gates pass or have accepted, bounded manual evidence467468### Partially converged469470Declare **Partially converged** if:471472- target structure exists473- but critical proof is incomplete474- or some responsibilities still depend on legacy mechanics475- or compatibility is necessary but bounded and routed through the new CLI476- or prod-like rerun/reboot/restore/remote monitoring is not fully proven yet477478### Non converged479480Declare **Non converged** if:481482- compatibility defines a second supported runtime/control plane483- historical commands changed semantics silently484- backup exists but restore is unproven485- remote monitoring path is undefined while required486- rootless runtime is not proven after reboot/rerun where required487- secrets/cert rotation is described but not reconciled/tested488- duplicate truths remain in templates, scripts, manifests, and docs489490---491492## 10. Universal caveats493494Always surface relevant caveats:495496- Containerization moves host complexity; it does not erase it.497- A green `podman run` is not proof of post-reboot `systemd --user` behavior.498- Rootless boundaries concentrate stress at UID mapping, cgroups, ports, storage labels, and user bus.499- Local health and remote monitoring are different fault paths.500- Backup without a proven restore is not a recovery capability.501- Secret/certificate rotation without reconciliation creates false confidence.502- A compatibility wrapper that mutates state directly is a second control plane.503- Old units, volumes, and manifests are tailings: contain or remove them.504- Dirty reruns reveal more truth than clean demos.505- Offline/air-gapped deployments need image, signature, SBOM, registry, and restore proof.506507---508509## 11. Output format510511Load `references/output-template.md` when available. Produce 10 sections:5125131. Executive summary5142. Bedrock operational contract (7 sub-contracts)5153. Strata and tailings not to copy5164. Fault-line map5175. Target OCI alloy (8 responsibilities)5186. Migration plan (9 phases)5197. Test and proof matrix (T0-T4/M0)5208. Maturity scorecard (15 dimensions)5219. Caveats and residual debt52210. Decision: **Converged / Partially converged / Non converged** + recommended handoffs523524---525526## 12. Write mode artifacts527528When `--write` is present and the user has not forbidden file writes, create only529safe planning artifacts unless explicitly asked to modify implementation files.530531Preferred generated artifacts:532533- `docs/oci-rootless-bedrock.md`534- `docs/oci-rootless-fault-map.md`535- `docs/oci-rootless-target-alloy.md`536- `docs/oci-rootless-proof-gates.md`537- `docs/oci-rootless-tailings.md`538- `docs/adr/ADR-oci-rootless-migration.md`539- `migration-backlog.md`540541Never write secrets. Never invent production values. Mark unknowns clearly.542543---544545## 13. References546547| File | Content |548|------|---------|549| `references/agent-roster.md` | 10 sub-agents, packet format, wave orchestration, tier recommendations |550| `references/scenarios.md` | 10 scenario playbooks (A-J) with agent routing and exit criteria |551| `references/proof-gates.md` | T0-T4/M0 gate matrix with recommended and blocking gates |552| `references/handoffs.md` | Cross-skill handoff routing table and packet template |553| `references/lithic-model.md` | Geological/metallurgical reasoning model (13 concepts, 7 anti-patterns) |554| `references/containerfile-patterns.md` | Hardened image patterns: multi-stage, non-root, read-only, FIPS, CVE scan, SBOM, goss |555| `references/output-template.md` | Output structure, 15-dimension scoring framework |556557## Integration with other cli-* skills558559| Skill | Relationship |560|-------|-------------|561| `/cli-forge-infra` | Design rootless/Podman/Quadlet implementation; simplify config paths |562| `/cli-forge-resilience` | Generate migration-specific runbooks, test ladder, failure injection |563| `/cli-audit-shell` | Audit legacy shell wrappers; classify as Adapter/Tailings |564| `/cli-audit-test` | Validate T0-T4/M0 test matrix coverage |565| `/cli-forge-pipeline` | Design CI gates for image build, scan, and deploy proof |566| `/cli-audit-sync` | Verify docs match bedrock; catch doc-code drift post-migration |567| `/cli-forge-doc` | Generate runbooks, day-2 guides, operator CLI docs |568| `/cli-forge-hld` / `/cli-forge-lld` | HLD for multi-instance designs; LLD for Quadlet/schemas |569| `/cli-forge-chef` / `/cli-forge-quorum` | Parallelize multi-phase migration across agents |570| `/cli-audit-drift` | Verify implementation honours bedrock operational contracts |571| `/cli-forge-schema` | Visualize migration phases, fault-line map, alloy architecture as Mermaid |