Deploy Validation
Prove one app package deploys correctly. Shared by the new-app, app-update, and restore-app workflows.
This skill follows docs/ai-sdlc/05-quality-gates.md and docs/ai-sdlc/06-test-report-format.md.
Supporting files in this skill:
checklist.md
prompt-fragments.md
report-template.md
Inputs
- app name (required)
- target: local | remote (default from
.secrets/remote.env; fallback local)
- ssh host (required when target=remote)
- ssh user (optional when target=remote; defaults to
root)
- deploy root (default
/opt/websoft9-test/apps; the app target is <deploy_root>/<app>)
- ssh secret path (default
.secrets/ssh/default.pem under the repository root; git-ignored, chmod 600; never commit it)
Steps
- Run the gates locally:
make --no-print-directory libs ARGS="check --app <app> --json". On failure, stop and report the first blocking error.
- Run
make --no-print-directory libs ARGS="app-deploy --app <app> [--target <local|remote>] [--ssh-host <ip> --ssh-user <name> --ssh-secret-path <path> --deploy-root <dir>] --json" to perform the compose deployment primitive. It handles local vs remote resolution, sync, network creation, config, up -d, and ps evidence.
- Run
make --no-print-directory libs ARGS="app-tests --app <app> [--base-url <url>] [--ssh-host <ip> --ssh-user <name> --ssh-secret-path <path> --deploy-root <dir>] --json" to perform functional checks. When tests/cases.yml is absent, the command still runs the default required checks.
- Check container logs for blocking errors.
- Cleanup in all outcomes with
make --no-print-directory libs ARGS="app-deploy --app <app> [--target <local|remote>] [--ssh-host <ip> --ssh-user <name> --ssh-secret-path <path> --deploy-root <dir>] --down --json". For remote, the server itself stays running; deletion stays manual.
- Return validation evidence: gates, deploy, functional checks, logs, cleanup, and the server identity when remote.
Output
- target and server identity (remote only)
- structure gate result
- policy gate result
- deploy result
- functional check result
- log check result
- cleanup status
- first blocking error (when failed)
Rules
- Validation only; never modify app files.
- Never skip a failed gate; report the first blocking error.
- When the ssh user is not provided, default to
root. If SSH auth fails with the default user, stop and ask the user for the correct user and secret path; do not retry with guessed users.
- The server is assumed dedicated and ephemeral; its IP is public information and is recorded openly in the report.
- Environment limitations (e.g. registry unreachable, missing docker daemon) are reported as environment blocks, not app defects.
down -v runs even when validation fails; server deletion stays manual.
- Produce evidence in the same language the user used unless the user asks otherwise.
1---2name: deploy-validation3description: Deploy Validation4---56# Deploy Validation78Prove one app package deploys correctly. Shared by the `new-app`, `app-update`, and `restore-app` workflows.910This skill follows `docs/ai-sdlc/05-quality-gates.md` and `docs/ai-sdlc/06-test-report-format.md`.1112Supporting files in this skill:1314- `checklist.md`15- `prompt-fragments.md`16- `report-template.md`1718## Inputs1920- app name (required)21- target: local | remote (default from `.secrets/remote.env`; fallback local)22- ssh host (required when target=remote)23- ssh user (optional when target=remote; defaults to `root`)24- deploy root (default `/opt/websoft9-test/apps`; the app target is `<deploy_root>/<app>`)25- ssh secret path (default `.secrets/ssh/default.pem` under the repository root; git-ignored, chmod 600; never commit it)2627## Steps28291. Run the gates locally: `make --no-print-directory libs ARGS="check --app <app> --json"`. On failure, stop and report the first blocking error.302. Run `make --no-print-directory libs ARGS="app-deploy --app <app> [--target <local|remote>] [--ssh-host <ip> --ssh-user <name> --ssh-secret-path <path> --deploy-root <dir>] --json"` to perform the compose deployment primitive. It handles local vs remote resolution, sync, network creation, `config`, `up -d`, and `ps` evidence.313. Run `make --no-print-directory libs ARGS="app-tests --app <app> [--base-url <url>] [--ssh-host <ip> --ssh-user <name> --ssh-secret-path <path> --deploy-root <dir>] --json"` to perform functional checks. When `tests/cases.yml` is absent, the command still runs the default required checks.324. Check container logs for blocking errors.335. Cleanup in all outcomes with `make --no-print-directory libs ARGS="app-deploy --app <app> [--target <local|remote>] [--ssh-host <ip> --ssh-user <name> --ssh-secret-path <path> --deploy-root <dir>] --down --json"`. For remote, the server itself stays running; deletion stays manual.346. Return validation evidence: gates, deploy, functional checks, logs, cleanup, and the server identity when remote.3536## Output3738- target and server identity (remote only)39- structure gate result40- policy gate result41- deploy result42- functional check result43- log check result44- cleanup status45- first blocking error (when failed)4647## Rules4849- Validation only; never modify app files.50- Never skip a failed gate; report the first blocking error.51- When the ssh user is not provided, default to `root`. If SSH auth fails with the default user, stop and ask the user for the correct user and secret path; do not retry with guessed users.52- The server is assumed dedicated and ephemeral; its IP is public information and is recorded openly in the report.53- Environment limitations (e.g. registry unreachable, missing docker daemon) are reported as environment blocks, not app defects.54- `down -v` runs even when validation fails; server deletion stays manual.55- Produce evidence in the same language the user used unless the user asks otherwise.