Import reviewed specialist skill packages (FORGE-F018)

This commit is contained in:
rob
2026-12-02 12:11:59 +00:00
parent 31f8edf5cb
commit 1fd552cf32
49 changed files with 3774 additions and 0 deletions
+293
View File
@@ -0,0 +1,293 @@
---
name: deployment-check
description: Safely preflight, execute, verify, or assess a web-app deployment using repository and runtime evidence. Check release artifacts, configuration/secrets, migrations, containers/processes, reverse proxy/TLS, health, logs, smoke tests, backup/rollback readiness, and release recording. Production mutation requires explicit user authorization; stop on failed gates instead of improvising.
---
# Deployment Check
Version: **2.0**.
Use this skill when the user asks to prepare for, validate, perform, verify, troubleshoot, or roll back a deployment of a web application.
This skill is narrower than a production-readiness review. It answers: **can this specific release be deployed safely, and did the deployment actually succeed?**
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Related skills
- use `production-readiness-review` for broad launch readiness rather than a specific release operation;
- use `webapp-debug` if a post-deploy failure needs root-cause investigation rather than deployment gating.
Do not redefine the repository's task, decision, branch, or deployment conventions.
## Core principle
Deployment is a sequence of **gates**, not a script to force through.
At every stage ask:
- Do we know exactly what release is being deployed?
- Are configuration, secrets, data, and dependencies ready for that release?
- Is the migration path safe and recoverable?
- Can the release be verified from the user-facing path?
- Can we return to a known-good state if verification fails?
If a required gate fails, **stop**. Do not improvise destructive workarounds merely to get a green deployment.
## Deployment modes
Determine the requested mode from the user's instruction.
### Preflight
Read-only assessment before deployment. Verify readiness of the specific release and identify blockers. Do not mutate production.
### Execute
Perform the deployment only when the user has explicitly requested deployment and the required production access is available. Mutation is limited to the approved deployment scope.
### Verify
Inspect an already-performed deployment using health, logs, smoke tests, release identity, proxy/TLS, and data/migration evidence. Avoid unrelated changes.
### Rollback / recovery
Use only when explicitly requested or when the deployment plan already authorizes an automatic rollback on failed verification. Prefer the documented release-specific rollback path. Never invent rollback commands against production data.
If the user's request is ambiguous between checking and deploying, default to **Preflight**.
## Mutation authorization gate
Read the repository’s merge, release and deployment authority rules and identify the exact authorised artifact before acting. Successful source checks do not grant deployment authority.
Repository inspection, local validation, reading logs, and non-destructive health/smoke requests are normally safe.
Before any action that changes production state, confirm that the current user request explicitly authorizes that class of action. Examples include:
- pulling/restarting production containers;
- changing Compose/systemd/Kubernetes state;
- applying database migrations to production;
- updating a release/image reference;
- changing proxy configuration;
- changing DNS/TLS;
- rotating secrets;
- restoring a database;
- rollback to another release.
Authorization to "check deployment" is **not** authorization to deploy. Authorization to deploy application containers is **not** automatically authorization to change DNS, rotate credentials, or restore data.
Do not commit, push, merge, or switch branches unless the user explicitly requests it and repository rules permit it.
## Workflow
### 1. Establish release identity and topology
Read repository context and inspect deployment-relevant files. Determine, where evidence permits:
- source commit / tag / release ID;
- image name, tag, and preferably immutable digest;
- frontend/backend/database services;
- database engine and migration mechanism;
- production Compose/Kubernetes/systemd topology;
- reverse proxy and TLS termination;
- secrets/config source;
- persistent volumes/data paths;
- health/readiness mechanism;
- backup/recovery mechanism;
- expected external services;
- rollback method and previous known-good release.
Never deploy an unidentified working tree or ambiguous mutable artifact when the project requires immutable releases.
### 2. Preflight the release
Use `references/deployment-gates.md` as the coverage guide.
At minimum, verify the applicable gates:
- repository/Git state matches the intended release;
- required CI/build/test gates are satisfied or freshly rerun where practical;
- release artifacts exist and correspond to the intended source;
- runtime versions are supported;
- production config contains required keys without exposing secret values;
- no development/debug configuration is accidentally enabled;
- target ports/networks/volumes are coherent;
- database connectivity assumptions and migration head are known;
- destructive/irreversible migration risks are identified;
- current backup/recovery evidence is adequate for the planned data change;
- proxy/TLS hostnames and routing expectations are known;
- external dependencies required at startup/runtime are understood;
- disk/resource capacity has no obvious blocker when runtime access permits checking it;
- rollback target/procedure exists before changing production.
A successful syntax check is not sufficient if critical release identity, migration, or recovery gates are unknown.
### 3. Validate configuration without leaking secrets
Inspect names/presence/types and safe metadata only.
Do not echo secret contents into the response. When needed, report:
- missing key;
- unexpected source;
- empty value;
- malformed non-secret structure;
- permission/ownership issue;
- environment mismatch.
Use repository examples/schema/config code to determine requirements rather than guessing.
### 4. Treat database migrations as a separate gate
Use `references/migration-safety.md` to evaluate migration ordering, compatibility, backup and recovery.
Before production migration, inspect the actual migration(s) between current and target revisions.
Check for risks such as:
- drops/renames that lose data;
- non-null columns without safe population/default strategy;
- type conversions;
- uniqueness/foreign-key additions against existing data;
- long table rewrites/locks;
- data backfills mixed into schema change;
- one-way migrations that make application rollback unsafe;
- mismatch between application and migration release ordering.
Where supported, validate on a disposable/restored database first.
Do not rewrite existing production migration history to simplify deployment.
### 5. Execute only the documented minimal release change
In Execute mode, prefer project-defined scripts/workflows over ad-hoc commands.
Typical safe ordering may be:
1. capture current release identity and runtime state;
2. confirm recent backup/recovery gate if data changes require it;
3. fetch/pull the exact approved artifact;
4. run migration at the documented point in the release sequence;
5. replace/restart only intended services;
6. wait for health/readiness;
7. verify through the real proxy/user-facing path;
8. inspect relevant logs;
9. record the exact deployed release.
But always follow repository-specific deployment order when it differs.
Avoid `latest`-style ambiguity when immutable tags/digests are available.
### 6. Verify the deployed release
Verification must go beyond "container is running".
Where applicable, verify:
- deployed image/release identity matches the approved artifact;
- container/process state and restart loops;
- application liveness/readiness;
- database migration revision;
- user-facing HTTPS endpoint through the real reverse proxy;
- TLS certificate/hostname behavior;
- authentication/session path if safe test credentials exist;
- one or more critical read/write smoke paths appropriate to the app;
- static assets/frontend API routing;
- external service behavior needed for core flows;
- recent error/warning logs;
- backup/monitoring jobs remain healthy after deployment.
Do not create real customer/user data for smoke tests unless the project has an approved test mechanism.
### 7. Decide success, stop, or rollback
Use one of these deployment outcomes:
- **Pass** — all required gates and post-deploy verification succeeded.
- **Pass with conditions** — deployment is functioning, but explicit non-blocking limitations remain.
- **Stop before deployment** — a preflight gate failed; production was not changed.
- **Deployment failed — rollback required** — production changed and required verification failed, with a known rollback path available.
- **Deployment state uncertain** — evidence/access is insufficient to determine a safe state; avoid further mutation until state is established.
If rollback is required and authorized, use the known previous release and documented data compatibility rules. If database migration makes rollback unsafe, do not pretend application-only rollback is sufficient.
### 8. Update context after an authorized deployment
In BortStack projects, preserve durable deployment facts when appropriate, such as:
- exact deployed release/digest;
- validation result;
- new verified production state;
- blocker/failure discovered;
- rollback performed;
- task completion/blocking state;
- concise next-session handoff.
Do not store credentials, secret values, or noisy transient logs in context documentation.
Do not mark a deployment task Complete if required verification was blocked or failed.
## Failure handling rules
- Stop on an unexpected migration state before applying new migrations.
- Stop when the artifact does not match the intended release.
- Stop when required secrets/config are missing or ambiguous.
- Stop when there is no acceptable rollback/recovery path for a risky data change.
- Stop on failing health/readiness instead of hiding it with longer arbitrary sleeps.
- Inspect logs/evidence before restarting repeatedly.
- Do not disable TLS verification, auth, health checks, migrations, tests, or security controls merely to complete a deployment.
- Do not delete volumes, databases, caches, certificates, or release history unless the user explicitly authorizes the specific destructive action.
## Output format
For Preflight, start with one of:
- **Ready to deploy**
- **Ready to deploy with conditions**
- **Stop before deployment**
- **Preflight incomplete**
For Execute/Verify, start with one of:
- **Deployment passed**
- **Deployment passed with conditions**
- **Deployment failed — rollback required**
- **Deployment state uncertain**
Then report:
1. release identity and target environment;
2. repository/runtime/deployment evidence inspected;
3. preflight gate results;
4. actions actually performed (if any);
5. database/migration result;
6. service/container/process state;
7. proxy/TLS/health/smoke results;
8. relevant log findings;
9. rollback/recovery readiness or action;
10. validation limitations/unverified assumptions;
11. context/task updates made, if any;
12. exact recommended next action.
When useful, present gates as a concise table with **Pass / Fail / Blocked / Not applicable / Not verified**.
## Completion criteria
A deployment check is complete only when:
1. the intended release and environment are unambiguous;
2. applicable preflight gates were checked against real evidence;
3. production mutation, if any, was explicitly authorized;
4. migration/data risk was considered separately;
5. post-deploy verification used the real runtime/user-facing path where available;
6. release identity and rollback state are known;
7. failures/unknowns are reported honestly rather than worked around speculatively;
8. the final deployment outcome matches the evidence.
@@ -0,0 +1,16 @@
interface:
display_name: deployment check
short_description: Safely preflight, execute, verify, or assess a web-app deployment
using repository and runtime evidence. Check release artifacts, configuration/secrets,
migrations, containers/processes, reverse proxy/TLS, health, logs, smoke tests,
backup/rollback readiness, and release recording. Production mutation requires
explicit user authorization; stop on failed gates instead of improvising.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9125 21.4125C11.5292 21.8625 11.0292 22.0958 10.4125 22.1125C9.79586 22.1291 9.29586 21.9208 8.91252 21.4875C8.53752 21.0541 8.45836 20.4541 8.67503 19.6875L9.68752 16H4.57502C4.00836 16 3.56669 15.8375 3.25002 15.5125C2.93336 15.1791 2.77502 14.7791 2.77502 14.3125C2.77502 13.8375 2.92919 13.4125 3.23752 13.0375L12.1375 2.47497C12.5209 2.02497 13.0209 1.79164 13.6375 1.77497C14.2542 1.75831 14.75 1.96664 15.125 2.39997C15.5084 2.83331 15.5917 3.43331 15.375 4.19997L14.3125 7.99998H19.425C19.9917 7.99998 20.4334 8.16664 20.75 8.49997C21.075 8.83331 21.2375 9.23748 21.2375 9.71247C21.2375 10.1791 21.0792 10.5958 20.7625 10.9625L11.9125 21.4125Z" fill="#FFC93C"/>
</svg>

After

Width:  |  Height:  |  Size: 786 B

@@ -0,0 +1,74 @@
# Deployment Gates
Use this as a coverage guide. Apply only gates relevant to the repository/deployment model.
## Release identity
- Intended source commit/tag/release known
- Working tree/release source acceptable under repository rules
- Built artifact/image maps to intended source
- Immutable tag/digest available when project requires it
- Previous known-good release identified
## Validation
- Required CI gates passed
- Relevant backend tests passed
- Relevant frontend tests passed
- Lint/static checks passed or accepted findings documented
- Production build succeeds
- Container/config syntax validation succeeds
## Runtime/config
- Supported runtime versions
- Required environment keys present
- Production mode/debug settings correct
- Secrets sourced from approved location
- No secret values printed into logs/report
- Networks, ports, volumes and permissions coherent
- Resource/disk capacity acceptable where verifiable
## Database/migrations
- Current revision known
- Target revision known
- Migration delta inspected
- Existing-data constraints considered
- Lock/downtime risk considered
- Backup/recovery gate appropriate to migration risk
- Rollback compatibility understood
- Migration validated on disposable/restored DB where feasible
## Artifact/container/process
- Exact image/package exists
- Image architecture/runtime compatible
- Pull/build succeeds
- Services start without restart loop
- Health/readiness becomes healthy
- Persistent volumes remain mounted correctly
## Reverse proxy/TLS
- Expected hostname known
- Proxy routes to correct service/port/network
- HTTPS works through the real public/internal entry point
- Certificate valid for hostname
- HTTP→HTTPS behavior correct where intended
- Forwarded headers/proxy trust match app assumptions
## Smoke tests
- Landing/API health path
- Authentication path when safe test account exists
- Core protected read path
- Core write path only when approved safe test mechanism exists
- Frontend static assets/API requests
- Critical external service where required
## Logs/observability
- No new fatal/repeated error pattern
- App/proxy/database logs checked where available
- Monitoring/alerts remain active
- Backup timer/job still healthy
## Rollback/recovery
- Previous release known
- Command/workflow documented
- Application rollback compatible with new schema
- Data restore authority and backup location known for destructive failure
- Exact deployed release recorded
@@ -0,0 +1,22 @@
# Migration Safety Notes
Treat migrations as a production data operation, not merely part of container startup.
Before applying a migration, inspect the revisions between current and target state. Pay special attention to:
- dropping tables/columns/indexes/constraints;
- renaming without compatibility window;
- adding required columns to populated tables;
- new unique constraints over existing data;
- foreign keys with orphaned historical rows;
- enum/type narrowing or conversion;
- large backfills or full-table rewrites;
- long-running DDL/lock behavior;
- application versions that cannot operate before/after the migration;
- downgrade steps that do not restore lost data.
Prefer expand/migrate/contract patterns for changes that must support rolling or reversible deployments.
A syntactically valid migration is not proof that it is safe against production data.
If migration validation cannot be performed, report the exact uncertainty and do not call the data gate passed.