بنقرة واحدة
stack-switch
Switch a scaffolded service between stack profiles (local, staging, prod)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Switch a scaffolded service between stack profiles (local, staging, prod)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Recurring 23-domain enterprise/ISO repository audit — governance, traceability, security, supply chain, reproducibility, observability, architecture, technical debt, DX — produces a findings report with file:line evidence and risk ratings, and preserves the audit bar via anti-patterns Q-01…Q-08
Recurring 23-domain enterprise/ISO repository audit — governance, traceability, security, supply chain, reproducibility, observability, architecture, technical debt, DX — produces a findings report with file:line evidence and risk ratings, and preserves the audit bar via anti-patterns Q-01…Q-08 (Mode: AUTO — AGENTS.md Agent Behavior Protocol applies.)
Review cloud costs against budget and identify optimization opportunities
Debug ML inference issues — latency spikes, wrong predictions, event loop blocking
Scan a service for edge-protection coverage (WAF, DDoS mitigation, rate limiting) against ADR-042/D-38 — produces a PASS/FAIL report with file:line evidence
Scan a service for edge-protection coverage (WAF, DDoS mitigation, rate limiting) against ADR-042/D-38 — produces a PASS/FAIL report with file:line evidence (Mode: AUTO — AGENTS.md Agent Behavior Protocol applies.)
| name | stack-switch |
| description | Switch a scaffolded service between stack profiles (local, staging, prod) |
| allowed-tools | ["Read","Grep","Glob","Bash(git:*)","Bash(python3:*)","Bash(make:*)"] |
| when_to_use | Use when a scaffolded service needs to change its stack profile — e.g. from local to staging for cluster testing, or from staging to prod for production deployment. Examples: 'switch to staging profile', 'change from local to prod', 'activate cloud profile'. |
| argument-hint | [service-path] [profile] |
| arguments | ["service-path","profile"] |
| authorization_mode | {"check_current":"AUTO","switch_to_local":"AUTO","switch_to_staging":"CONSULT","switch_to_prod":"CONSULT","escalation_triggers":[{"uncommitted_changes":"STOP"},{"cloud_creds_in_local":"STOP"},{"active_incident":"STOP"}]} |
When a scaffolded service needs to transition between stack profiles
(local, staging, prod) as defined by ADR-033. This changes which
infrastructure targets are active and what dependencies are required.
configs/profiles/active_profile.yaml and requires a clean tree.local profile MUST NOT accept cloud
credentials. If you need cloud deps, switch to staging or prod.copier copy (or new-service.sh).configs/profiles/active_profile.yaml exists.configs/profiles/<profile>.yaml.git status shows no changes).cd "$service-path"
git status --porcelain # must be empty
test -f configs/profiles/active_profile.yaml # must exist
test -f configs/profiles/$profile.yaml # must exist
If any check fails → STOP with a clear message.
Read configs/profiles/active_profile.yaml and report:
Read configs/profiles/$profile.yaml and present:
local, cloud creds must be absent)Wait for explicit approval before proceeding.
make switch-profile PROFILE=$profile
This updates configs/profiles/active_profile.yaml to reference the
new profile.
# Verify the active profile was updated
cat configs/profiles/active_profile.yaml
# Run D-35 check if switching to local
python3 -c "
import yaml
data = yaml.safe_load(open('configs/profiles/local.yaml'))
assert data['requires']['cloud_credentials'] is False
assert data['requires']['kubernetes'] is False
assert data['requires']['docker'] is False
assert data['deploy']['enabled'] is False
print('D-35 check passed')
"
# Run agentic manifest validation
python3 scripts/validate_agentic_manifest.py --strict
Propose a commit message and wait for operator approval:
git add configs/profiles/active_profile.yaml
git commit -m "chore: switch stack profile to $profile
Previous profile: <old>
New profile: $profile
Deploy mode: <AUTO|CONSULT|STOP>"
make deploy or the deploy skills.copier update.local profile has cloud creds, this
skill will STOP.configs/profiles/active_profile.yaml is the single source of truth
for the active profile. Never hand-edit it — use make switch-profile
or this skill.prod is a CONSULT-class operation that requires
explicit approval and a clean working tree.local profile MUST NOT accept cloud credentials (D-35).