Windsurf rules
.windsurf/rules/deploy.mdBuild → verify artifact → deploy → wait → smoke deployment pipeline. Platform-agnostic (MCP or CLI), with configurable timeout, retry with exponential backoff, and integrated health-check. The deploy half of CI/CD: run after build to push to production.
Windsurf rules
Quality
77/100
Scores the file, not the repository.Length
894 words
18 headings · 8 code blocksRepository
114
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Deploy89> **HARD GATE** — Do not deploy without running tests first. Run `test` or your CI suite before this skill.10>11> **HARD GATE** — Use this skill from a CI/CD pipeline or post-merge on `main`/`master`. Never deploy from a feature branch.12>13> **HARD GATE** — The deploy skill orchestrates deployment; the `smoke-test` skill validates post-deploy health. Chain them: `deploy → smoke-test`.1415Orchestrate a full build-to-deployment pipeline: build the artifact, verify it exists and is non-empty, invoke a platform deploy tool (MCP or CLI), poll until the deploy completes or times out, then run a baseline smoke test against the live URL.1617## Pipeline Stages1819```20build → verify artifact → deploy → wait/retry → smoke21```2223| Stage | Description | Failure mode |24|-------|-------------|-------------|25| Build | Execute the project's build command | Non-zero exit: report build error |26| Verify | Check artifact exists and is non-empty | Missing/empty: report artifact path |27| Deploy | Invoke platform deploy tool (MCP, Vercel CLI, rsync, etc.) | Non-zero exit: report deploy error |28| Wait | Poll deploy status every 30s up to `DEPLOY_TIMEOUT` (default 5 min) | Timeout: report exceeded |29| Smoke | `curl -sSf $DEPLOY_URL` as baseline health check | Non-200: report failure |3031## Process3233### 1. Detect build command3435Read project manifest files in order to determine the build command:3637| Manifest | Build command |38|----------|--------------|39| `package.json` | `npm run build` (or `scripts.build` value) |40| `Cargo.toml` | `cargo build --release` |41| `pyproject.toml` / `setup.py` | Depends on build backend (`poetry build`, `pip install -e .`, etc.) |42| `Makefile` | `make build` or first target named `build` |43| `AGENTS.md` / `CLAUDE.md` | Look for `build:` in project commands section |4445If no manifest is found, prompt the user with: "No detected build command. Pass `--build 'npm run build'` or specify the command."4647### 2. Build the artifact4849```bash50npm run build51```5253Or the detected command from step 1. If the build fails, exit non-zero and report the build output.5455### 3. Verify the artifact5657```bash58ARTIFACT_DIR="${ARTIFACT_DIR:-dist}"59if [ ! -d "$ARTIFACT_DIR" ] || [ -z "$(ls -A "$ARTIFACT_DIR" 2>/dev/null)" ]; then60 echo "FAIL: build artifact not found at $ARTIFACT_DIR"61 exit 162fi63```6465Configurable via `$ARTIFACT_DIR` environment variable (default: `dist/`).6667### 4. Deploy to platform6869Platform-agnostic — supports multiple deployment targets via environment variables:7071| Platform | Env var | Example |72|----------|---------|---------|73| Vercel | `VERCEL_TOKEN`, `VERCEL_PROJECT_ID` | `vercel deploy --prod --token $VERCEL_TOKEN` |74| Netlify | `NETLIFY_AUTH_TOKEN`, `NETLIFY_SITE_ID` | `netlify deploy --prod --auth $NETLIFY_AUTH_TOKEN --dir $ARTIFACT_DIR` |75| Platform MCP | MCP tool call | `mcp deploy` via your platform MCP server |76| rsync/SSH | `DEPLOY_SSH_USER`, `DEPLOY_SSH_HOST`, `DEPLOY_SSH_PATH` | `rsync -avz $ARTIFACT_DIR/ $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST:$DEPLOY_SSH_PATH` |77| Custom | `DEPLOY_COMMAND` | Run any deploy command string |7879The deploy tool is selected by which environment variables are set. If none are configured:8081```bash82echo "No deploy target configured. Set one of: VERCEL_TOKEN, NETLIFY_AUTH_TOKEN, DEPLOY_SSH_USER+DEPLOY_SSH_HOST, DEPLOY_COMMAND, or MCP deploy tool."83exit 184```8586### 5. Wait and poll status8788After invoking the deploy command, poll for completion:8990See [REFERENCE.md](REFERENCE.md)9192Use exponential backoff for retries on transient failures:9394See [REFERENCE.md](REFERENCE.md)9596### 6. Baseline smoke test9798See [REFERENCE.md](REFERENCE.md)99100For comprehensive health-checking, chain to the `smoke-test` skill:101102```bash103# After deploy success104bash scripts/run-smoke.sh "$DEPLOY_URL"105```106107### 7. Three-independent-facts verification (e45s15)108109Before declaring deploy success, verify **three independent facts** — build artifact, platform accept, live/registry reachability. See [REFERENCE.md](REFERENCE.md#three-independent-facts).110111## Verify112113→ verify: `command -v curl >/dev/null 2>&1 && test -f skills/smoke-test/SKILL.md`114115---116117# Deploy — Reference118119## Configuration120121| Variable | Default | Description |122|----------|---------|-------------|123| `ARTIFACT_DIR` | `dist` | Build output directory |124| `DEPLOY_URL` | *(required)* | Live URL for smoke test |125| `DEPLOY_TIMEOUT` | `300` | Max wait for deploy completion (seconds) |126| `DEPLOY_POLL_INTERVAL` | `30` | Polling interval (seconds) |127| `RETRY_MAX` | `3` | Max deploy retry attempts |128| `BUILD_COMMAND` | *(auto-detect)* | Override build command |129130131---132133## Verification134135→ verify: `test -f deploy/SKILL.md && grep -q 'name: deploy' deploy/SKILL.md && echo OK`136→ verify: `grep -qi 'build\|artifact\|deploy\|smoke' deploy/SKILL.md && echo OK`137→ verify: `grep -ci 'package.json\|Cargo.toml\|Makefile\|manifest' deploy/SKILL.md | awk '{if($1>=1) print "OK"; else print "FAIL"}'`138→ verify: `grep -ci 'timeout\|poll\|status\|retry\|backoff' deploy/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`139→ verify: `grep -q 'curl.*DEPLOY_URL\|smoke\|health' deploy/SKILL.md && echo OK`140141---142143## Reference block 1144145```bash146DEPLOY_TIMEOUT="${DEPLOY_TIMEOUT:-300}" # seconds (default 5 minutes)147DEPLOY_POLL_INTERVAL="${DEPLOY_POLL_INTERVAL:-30}" # seconds148149start_time=$(date +%s)150while true; do151 elapsed=$(( $(date +%s) - start_time ))152 if [ "$elapsed" -ge "$DEPLOY_TIMEOUT" ]; then153 echo "FAIL: deploy status polling timed out after ${DEPLOY_TIMEOUT}s"154 exit 1155 fi156157 status=$(get_deploy_status) # platform-specific status check158 if [ "$status" = "ready" ] || [ "$status" = "done" ]; then159 echo "Deploy completed in ${elapsed}s"160 break161 fi162163 sleep "$DEPLOY_POLL_INTERVAL"164done165```166167---168169## Reference block 2170171```bash172RETRY_MAX="${RETRY_MAX:-3}"173base_delay=2174for attempt in $(seq 1 "$RETRY_MAX"); do175 if deploy_command; then176 break177 fi178 if [ "$attempt" -eq "$RETRY_MAX" ]; then179 echo "FAIL: deploy failed after ${RETRY_MAX} attempts"180 exit 1181 fi182 sleep $(( base_delay * 2 ** (attempt - 1) ))183done184```185186---187188## Reference block 3189190```bash191DEPLOY_URL="${DEPLOY_URL:?DEPLOY_URL must be set}"192if curl -sSf "$DEPLOY_URL" > /dev/null 2>&1; then193 echo "OK: $DEPLOY_URL responds with HTTP 200"194else195 echo "FAIL: $DEPLOY_URL is not responding with HTTP 200"196 exit 1197fi198```199
Also in danielvm-git/bigpowers
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| danielvm-git/bigpowers.cursor/rules/align-grid.mdc · 114 | Cursor rules | lint-formatdo-notagent-behaviour | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/assess-impact.mdc · 114 | Cursor rules | testtesting-strategydeployment | 66/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/audit-code.mdc · 114 | Cursor rules | setuptestlint-formatstyle+4 | 66/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/audit-plan.mdc · 114 | Cursor rules | buildteststylegit | 74/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/build-epic.mdc · 114 | Cursor rules | buildgit | 58/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/change-request.mdc · 114 | Cursor rules | no sections | 48/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/commit-message.mdc · 114 | Cursor rules | lint-formatstyletypesgit+3 | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/compose-workflow.mdc · 114 | Cursor rules | styledo-notagent-behaviour | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/context7-mcp.mdc · 114 | Cursor rules | style | 54/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/craft-skill.mdc · 114 | Cursor rules | stylearchgitdo-not | 69/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/deepen-architecture.mdc · 114 | Cursor rules | testtesting-strategydo-not | 57/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/define-language.mdc · 114 | Cursor rules | lint-formatdo-not | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/define-success.mdc · 114 | Cursor rules | no sections | 4/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/delegate-task.mdc · 114 | Cursor rules | git | 62/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/deploy.mdc · 114 | Cursor rules | setupbuildtestdeployment | 77/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/design-interface.mdc · 114 | Cursor rules | styleagent-behaviour | 58/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/develop-tdd.mdc · 114 | Cursor rules | teststylearchtesting-strategy+5 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/diagnose-root.mdc · 114 | Cursor rules | no sections | 39/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/diagnose-stall.mdc · 114 | Cursor rules | no sections | 44/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/dispatch-agents.mdc · 114 | Cursor rules | git | 54/100 | 3 days ago |
Diff against .cursor/rules/align-grid.mdc Diff against .cursor/rules/assess-impact.mdc Diff against .cursor/rules/audit-code.mdc Diff against .cursor/rules/audit-plan.mdc Diff against .cursor/rules/build-epic.mdc Diff against .cursor/rules/change-request.mdc Diff against .cursor/rules/commit-message.mdc Diff against .cursor/rules/compose-workflow.mdc Diff against .cursor/rules/context7-mcp.mdc Diff against .cursor/rules/craft-skill.mdc Diff against .cursor/rules/deepen-architecture.mdc Diff against .cursor/rules/define-language.mdc Diff against .cursor/rules/define-success.mdc Diff against .cursor/rules/delegate-task.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/design-interface.mdc Diff against .cursor/rules/develop-tdd.mdc Diff against .cursor/rules/diagnose-root.mdc Diff against .cursor/rules/diagnose-stall.mdc Diff against .cursor/rules/dispatch-agents.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| danielvm-git/bigpowers.windsurf/rules/organize-workspace.md · 114 | Windsurf rules | buildstylegitdeployment+2 | 89/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/guard-git.md · 114 | Windsurf rules | stylearchgitsecurity+2 | 89/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/quick-fix.md · 114 | Windsurf rules | teststylegitdeployment+1 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/develop-tdd.md · 114 | Windsurf rules | teststylearchtesting-strategy+5 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/session-state.md · 114 | Windsurf rules | lint-formatstyleagent-behaviour | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/commit-message.md · 114 | Windsurf rules | lint-formatstyletypesgit+3 | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/extract-design.md · 114 | Windsurf rules | lint-formatstyledependenciesui | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/setup-environment.md · 114 | Windsurf rules | setupstylesecuritydo-not+1 | 81/100 | 3 days ago |
