[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79GNQ4V0V2FPRZJMNZ3TES1":3,"skill-same:01M79GNQ4V0V2FPRZJMNZ3TES1":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79GNQ4V0V2FPRZJMNZ3TES1","saasaloy-deploy",null,"Runbook for an AI agent that releases and deploys this project to production with pnpm release and pnpm deploy:production. Use when the owner says \"deploy\", \"ship this\", \"release\", \"cut a release\", \"bump the version\", \"update the changelog\", \"put this live\", \"hotfix production\", \"roll back production\", \"what is live\", or \"what will the next deploy ship\", when a release or a deploy stops at a gate, or when editing packages\u002Ftooling\u002Fsrc\u002Fdeploy.config.ts or targets.ts. Covers the go-ahead rule, the release and its changelog, the dry-run report, the gates and what clears each one, --migrate, --skip-ci and --only, smoke checks on a custom domain, the hotfix branch, and the rollback.","mimukit\u002Fsaasaloy","mimukit","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11677026?v=4","01M79GFSERAQQ77QPQMC1N0Y6M","Mukitul Islam Mukit","01M79GFSFA4WMGEEBHA68N59WV",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftemplates\u002Fbase\u002F_agents\u002Fskills\u002Fsaasaloy-deploy\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: saasaloy-deploy\ndescription: Runbook for an AI agent that releases and deploys this project to production with pnpm release and pnpm deploy:production. Use when the owner says \"deploy\", \"ship this\", \"release\", \"cut a release\", \"bump the version\", \"update the changelog\", \"put this live\", \"hotfix production\", \"roll back production\", \"what is live\", or \"what will the next deploy ship\", when a release or a deploy stops at a gate, or when editing packages\u002Ftooling\u002Fsrc\u002Fdeploy.config.ts or targets.ts. Covers the go-ahead rule, the release and its changelog, the dry-run report, the gates and what clears each one, --migrate, --skip-ci and --only, smoke checks on a custom domain, the hotfix branch, and the rollback.\n---\n\n# saasaloy-deploy\n\nA production deploy is two commands, in this order. `pnpm release` gives the commit a version and a changelog entry (see \"The release\"). `pnpm deploy:production` then puts it live.\n\n`pnpm deploy:production` runs `packages\u002Ftooling\u002Fsrc\u002Fdeploy-production.ts`. It does every mechanical step, in this order, and stops at the first failure:\n\n1. **Gates.** The branch, the tree, origin, CI and new migrations. A real run lists every failed gate at once, each with the command that clears it, and builds nothing.\n2. **Env check.** `node packages\u002Fenv\u002Fsrc\u002Fdeploy.ts --check` names every blank production key. The `saasaloy-env` skill covers the values.\n3. **Migration**, with `--migrate` only: `pnpm --filter @repo\u002Fdb run db:prod:migrate`.\n4. **Workers**, one at a time, lowest `order` first from `DEPLOY_TARGETS` in `packages\u002Ftooling\u002Fsrc\u002Ftargets.ts`. Each runs its own `deploy` script, `env-deploy \u003Cservice>`.\n5. **Smoke checks.** Each `SMOKE_CHECKS` row is requested on every custom domain of its service, three tries, 5 seconds apart.\n6. **Tag.** HEAD gets an annotated `deploy-\u003CUTC yyyymmdd-hhmm>` tag, pushed to origin. Its message names the release, such as `Production deploy of c75d4e1 (v0.1.0): api, admin, web.` A run that fails any step writes no tag.\n\nThe deploy prints the release on HEAD before the gates. When HEAD is not a release commit, it prints a warning that lists the commits `CHANGELOG.md` does not cover, and it still deploys. That warning is never a gate, so an urgent hotfix goes out first.\n\nThis skill covers what the command cannot decide: what the owner approves, what to read, and what to do when a step fails. `docs\u002Frunbook-deploy.md` holds this project's own steps: the first deploy, the hosting and the data restore.\n\n## The rule\n\n**Never run `pnpm release` or a real deploy without the owner's go-ahead in this session.** A go-ahead is a message from the owner, after your dry-run report, that tells you to release, to deploy, or both. \"Deploy\" in the first request is not a go-ahead for a run you have not reported yet. A go-ahead covers the commands your report named, once each. When a run fails and you change anything, report again and wait again.\n\nYou may run these without asking:\n\n- `pnpm release:dry`, any number of times. It prints the next version and the changelog entry, and commits, tags and pushes nothing.\n- `pnpm deploy:production --dry-run`, any number of times. It runs the env check and builds, uploads, migrates and tags nothing.\n- Read-only git: `git describe --tags --match 'deploy-*' --abbrev=0`, `git log \u003Ctag>..HEAD`, `git show \u003Ctag>`.\n- `pnpm --filter \u003Cpackage> exec env-deploy --run \u003Cservice> -- wrangler deployments list`, for each deploy target.\n\nOnly the owner decides these, each in its own message:\n\n- `--migrate`. The owner reads the SQL you show and says yes.\n- `--skip-ci \"\u003Creason>\"`. Use it only when GitHub Actions itself is down, never for a red run. The owner gives the reason.\n- `--only \u003Cservice>`.\n- `pnpm release major`, or an exact version. Below 1.0 a breaking change bumps the minor, so `1.0.0` is the owner's choice.\n- A deploy with no release first, for an urgent hotfix.\n- `wrangler rollback`, and the restore of a database dump.\n\nNever do these:\n\n- Move, delete or re-create a deploy tag or a release tag.\n- Edit a released `CHANGELOG.md` entry, or the root `package.json` `version`, by hand. `pnpm release` writes both.\n- Edit `packages\u002Fenv\u002F.env.prod`, or print a value from it.\n- Commit with `--no-verify`, stash or discard files to pass the tree gate.\n- Deploy a Worker with `pnpm --filter \u003Cpackage> run deploy` or `wrangler deploy`. Both skip the gates, the order and the tag. Use `pnpm deploy:production --only \u003Cservice>` for one Worker.\n- Push to `main` without the owner's approval.\n\n## Procedure\n\n1. Bring the checkout up to date:\n   ```sh\n   git switch main && git pull --ff-only\n   pnpm install\n   ```\n2. Check for unpushed commits and uncommitted files:\n   ```sh\n   git status -sb\n   ```\n   `pnpm release` pushes every local commit with the release commit, so a commit from another session would go to origin unreviewed. When the first line shows `ahead`, or any file is listed, stop and ask the owner what to do with them.\n3. Run both dry runs:\n   ```sh\n   pnpm release:dry\n   pnpm deploy:production --dry-run\n   ```\n4. When the deploy dry run lists migration files, print each `.sql` file it names and read it.\n5. Write the report. Use the template below.\n6. Stop. Wait for the owner's go-ahead.\n7. Run the release the owner approved, then wait for CI on the release commit when the config names a workflow:\n   ```sh\n   pnpm release                      # or pnpm release minor, major, \u003Cversion>\n   gh run watch\n   ```\n8. Run the deploy the owner approved, with exactly the flags in the report:\n   ```sh\n   pnpm deploy:production            # or with --migrate, --skip-ci \"\u003Creason>\", --only \u003Cservice>\n   ```\n9. Check what the smoke checks do not cover, such as a sign-in flow, in a browser. Use `playwright-cli` when `command -v playwright-cli` finds it. Otherwise list the pages for the owner.\n10. Report the result. Use the template below.\n\n## The dry-run report\n\n```markdown\n**Deploy proposal** for \u003Cbranch> at \u003Cshort sha>\n\nLast deploy: \u003Ctag, or \"none, this deploy writes the first tag\">\n\nRelease: \u003Cthe version and the changelog entry pnpm release:dry printed | \"none: an urgent hotfix, released after\">\n\nCommits this deploy ships:\n- \u003Csha> \u003Csubject>\n- ...\n\nMigrations: \u003Cnone | the file names, each with a one-line summary of its SQL, and a note on any statement that drops, renames or rewrites data>\n\nGates: \u003Call pass | each line the dry run printed as fail>\n\nEnv check: \u003Cpassed | the blank keys it named>\n\nDeploy order: \u003Cas the dry run printed it>\n\nSmoke checks: \u003Cthe URLs | the services it skipped for want of a custom domain>\n\nCommands I will run: `pnpm release \u003Cincrement, when one>`, then `pnpm deploy:production \u003Cflags>`\n\nRisks: \u003Ca commit that changes sign-in, payment or an authorization check; a migration that is not additive; \"none seen\">\n```\n\nLeave out a section only when it is empty. Do not claim a commit is safe without reading its diff. Name the files you read.\n\n## The release\n\n`pnpm release` runs `packages\u002Ftooling\u002Fsrc\u002Frelease.ts`, which runs release-it with options it builds from `deploy.config.ts`. It reads no `.release-it.json`, and it never asks a question. In one run it:\n\n1. Reads the Conventional Commits since the last release tag and picks the next version: a `fix` bumps the patch, a `feat` the minor, a breaking change the major. Below 1.0 a breaking change bumps the minor (`preMajor`).\n2. Writes the version into the root `package.json` and a new entry at the top of `CHANGELOG.md`.\n3. Commits both as `chore(release): v\u003Cversion>`, tags the commit `v\u003Cversion>`, pushes, and creates a GitHub Release.\n\nThe changelog shows `feat`, `fix`, `perf` and `revert` commits. A commit of any other type shows only when it is breaking, under its own heading, such as `Miscellaneous Chores` for a breaking `chore!`. The first release covers every commit since the project start, so its entry is long.\n\n| Command | What it does |\n| --- | --- |\n| `pnpm release:dry` | Prints the next version and the changelog entry. Changes nothing. |\n| `pnpm release` | The version the commits ask for. |\n| `pnpm release patch`, `minor`, `major` | That bump, whatever the commits ask for. |\n| `pnpm release 1.2.3` | That exact version. |\n\nIt refuses to start, and changes nothing, when:\n\n| The run prints | Clear it with |\n| --- | --- |\n| `Must be on branch ...` | The release takes the deploy's `branches`. `git switch main`, or release from the hotfix branch. |\n| `Working dir must be clean` | Commit or ask the owner. Never turn the check off: release-it commits with `git add . --update`, so a dirty file would go into the release commit. |\n| `No upstream configured for current branch` | `git push -u origin \u003Cbranch>`. |\n| `There are no commits since the latest tag` | Nothing to release. Deploy without one, or wait for a commit. |\n| `a GitHub Release needs a token and none was found` | `gh auth login`, or set `GITHUB_TOKEN`. The owner may set `release.githubRelease: false` instead. |\n\n## The gates and what clears each one\n\nThe gate values come from `packages\u002Ftooling\u002Fsrc\u002Fdeploy.config.ts`. A key the file leaves out falls back to the default shown.\n\n| Gate | It passes when | The run prints | Clear it with |\n| --- | --- | --- | --- |\n| Branch | The branch matches `branches` (default `[\"main\", \"hotfix-*\"]`; a trailing `*` matches any rest). | `The branch is \u003Cx>, and a deploy starts only from ...` | `git switch main`. For a fix while `main` holds unreleased work, see \"Hotfix\". |\n| Tree | `git status --porcelain` is empty. | `The tree has uncommitted changes (...)` | `git commit`, or `git stash push -u`. An agent asks the owner what to do with the named files. A file the build itself changed is a bug to fix, not to stash. |\n| Origin | HEAD is the same commit as `origin\u002F\u003Cbranch>`. | `origin has no \u003Cbranch>`, or `HEAD (...) is not origin\u002F\u003Cbranch> (...)` | `git push -u origin \u003Cbranch>`, or `git pull --ff-only`, or `git push`. |\n| CI | `ciWorkflow` names no workflow (the gate is off), or a run of that workflow on HEAD succeeded. | `\u003Cworkflow> failed on HEAD`, `is still running`, or `has no run on HEAD` | `gh run watch`, then the dry run again. A failed run: read it with `gh run view \u003Cid> --log-failed`, fix, push. When GitHub Actions is down: `--skip-ci \"\u003Creason>\"`. |\n| Migrations | No file matching `migrations` (default `packages\u002Fdb\u002Fmigrations\u002F*.sql`) changed since the last deploy tag, or `--migrate` is set. With no tag yet, every migration file counts as new. | `\u003Cn> migration file(s) changed since \u003Ctag>` | Read the SQL, then `pnpm deploy:production --migrate`. |\n\nTwo more checks stop the run before the gates, because the deploy order would be a guess:\n\n| The run prints | Clear it with |\n| --- | --- |\n| `apps\u002F\u003Cservice> deploys and has no DEPLOY_TARGETS row` | Add `{ service: \"\u003Cservice>\", order: \u003Cnumber> }` to `DEPLOY_TARGETS`. `saasaloy doctor` warns about the same state. |\n| `DEPLOY_TARGETS names \u003Cservice>, and apps\u002F\u003Cservice> is not a workspace with a wrangler.jsonc and a deploy script`, a service or smoke `id` listed twice, or a `SMOKE_CHECKS` row for a service that does not deploy | Remove or fix the row in `packages\u002Ftooling\u002Fsrc\u002Ftargets.ts`. |\n| `this repository has no commit yet` | Make the first commit and push it, as the message says. |\n\nA failure after the gates:\n\n| The run prints | What it means, and what to do |\n| --- | --- |\n| `\u003Cservice> has no production value for \u003CKEY>`, or another env check line | Nothing built. Report the key names. The owner sets the values. |\n| `Migrate failed. No deploy tag was written.` | No Worker deployed. Read the migration output. The migration output names the dump it took first. |\n| `Deploy \u003Cservice> failed. No deploy tag was written.` | That Worker did not go live. A Worker before it in the order is live on the new commit, and the run prints its rollback command. |\n| `The Workers are live, and a smoke check failed` | Follow \"Roll back\" at once: report the failing URL and its status, and propose the rollback the run printed. |\n| `... and the push failed, so the tag is local only` | The Workers are live. Run `git push origin \u003Ctag>`. |\n\n## The flags\n\n- `--dry-run` prints the last deploy tag, the commits since it, the new migration files, every gate, the deploy order and the smoke checks, then runs the env check. It exits 0 and ends with the list of what would stop a real run.\n- `--migrate` runs `pnpm --filter @repo\u002Fdb run db:prod:migrate` after the env check and before the first Worker, so a new migration lands before the code that reads it. A project with no `@repo\u002Fdb` workspace refuses the flag. Keep each migration additive (a new table, a nullable or defaulted column), so old code runs on the new schema and a code rollback stays safe.\n  - `database-postgres`: `db:prod:migrate` checks that `DATABASE_URL` names `\u003Cproject>_production` on a server other than the development one in `apps\u002Fapi\u002F.env`. It then dumps the database with `pg_dump` and applies the migrations with `drizzle-kit migrate`. No migration runs without a good dump.\n  - `database-d1`: `db:prod:migrate` runs `wrangler d1 migrations apply DB --remote`, and creates the database first when the account has none by its `database_name`. Before it migrates an existing database, it dumps it with `wrangler d1 export --remote`. No migration runs without a good dump. A database it has just created gets no dump, because it holds nothing.\n- `--skip-ci \"\u003Creason>\"` passes the CI gate. The reason goes into the tag message. Every other gate still runs.\n- `--only \u003Cservice>` deploys one Worker after the same gates, and runs only its smoke checks. It writes no tag, because the tag means \"this commit is live on every Worker\".\n\n`pnpm db:prod:dump` takes a dump on its own: `pg_dump --format=custom` for Postgres, `wrangler d1 export --remote` for D1. Dumps land in `~\u002F\u003Cproject>-backups\u002F` (mode 0700), or in `DB_DUMP_DIR` when it is set, outside the repository. For Postgres, `pg_dump` runs from the `postgres:\u003Cmajor>` image the root `compose.yaml` names, through Docker. Set `PG_DUMP=local` to use the `pg_dump` on `PATH` instead.\n\n## Changing the gates, the order and the smoke checks\n\n`packages\u002Ftooling\u002Fsrc\u002Fdeploy.config.ts` and `packages\u002Ftooling\u002Fsrc\u002Ftargets.ts` belong to the project. `saasaloy init` writes them once, and `saasaloy update` never writes them again. The engine reads every key with a default, so an older copy keeps working.\n\n`deploy.config.ts`:\n\n- `branches`: the branches a deploy may start from.\n- `tagPrefix`: the start of every deploy tag. Change it only before the first deploy, or the engine no longer finds the older tags.\n- `ciWorkflow`: the GitHub Actions workflow file that must pass on HEAD, such as `\"ci.yml\"`. `undefined` turns the CI gate off.\n- `migrations`: the git pathspec for migration files.\n- `release`: what `pnpm release` writes. `tagPrefix` (default `v`; change it only before the first release), `githubRelease` (default `true`), `preMajor` (default `true`), and `changelogSections`, the `conventionalcommits` preset's `types` list. Unset keeps the preset's sections. A key left out falls back to its default.\n\n`targets.ts` holds two arrays. Keep each in the shape `export const NAME: Type[] = [...]`, because `saasaloy add` appends its rows there with a `const-array` patch, and `saasaloy remove` takes them out again.\n\n- `DEPLOY_TARGETS`: `{ service, order }`. `service` is the directory under `apps\u002F`. The base adds `web` (30), the api module `api` (10) and the admin module `admin` (20). A new Worker needs its own row, or the deploy stops and names it.\n- `SMOKE_CHECKS`: `{ id, service, path, status, body? }`. `body` is text the response body must contain. The `id` stays unique.\n\n**A smoke check needs a custom domain.** The engine takes the host from each `routes[]` entry with `custom_domain: true` in `apps\u002F\u003Cservice>\u002Fwrangler.jsonc`. A service with none gets no smoke check, and the run says so. It never guesses a `workers.dev` address. To turn the checks on, add the route and deploy:\n\n```jsonc\n\u002F\u002F apps\u002Fapi\u002Fwrangler.jsonc\n\"routes\": [{ \"pattern\": \"api.example.com\", \"custom_domain\": true }]\n```\n\nWrangler creates the domain on the next deploy when the zone is on the same Cloudflare account. The next `pnpm deploy:production --dry-run` lists the smoke URLs for that host.\n\n## Hotfix\n\nUse this when live code needs a fix and `main` holds commits that must not go live yet. There is no long-lived production branch: the newest deploy tag marks what is live.\n\n1. Start the branch from the live commit:\n   ```sh\n   git switch -c hotfix-\u003Cslug> \"$(git describe --tags --match 'deploy-*' --abbrev=0)\"\n   ```\n2. Make the fix, run `pnpm typecheck`, `pnpm lint` and `pnpm test`, and commit.\n3. Ask the owner to approve the push. Then push it:\n   ```sh\n   git push -u origin hotfix-\u003Cslug>\n   ```\n4. Wait for CI on the branch when the config names a workflow. Then follow \"Procedure\" from step 2 on this branch. `pnpm release` on the branch makes a patch release such as `v0.3.1`. When the fix cannot wait for the release, the owner may deploy first and release after.\n5. After the deploy, ask the owner to merge the fix into `main`, so the next deploy keeps it. Merge, never rebase: a rebase rewrites the commit the release tag names.\n   ```sh\n   git switch main && git merge hotfix-\u003Cslug>\n   ```\n   When `main` has released since the hotfix branched, the merge conflicts in `CHANGELOG.md` and in the root `package.json` `version`. Keep both changelog entries, newest version first, and keep the higher version. Then commit the merge and push:\n   ```sh\n   git push\n   git branch -d hotfix-\u003Cslug> && git push origin --delete hotfix-\u003Cslug>\n   ```\n\nA release from a hotfix branch has not run on a real project yet. Read its `pnpm release:dry` output closely.\n\n## Roll back\n\n1. Report the failure and propose the rollback. Wait for the owner's go-ahead.\n2. Roll back each broken Worker to its previous version. A failed run prints one line per Worker it deployed, in this form:\n   ```sh\n   pnpm --filter \u003Cpackage> exec env-deploy --run \u003Cservice> -- wrangler rollback\n   ```\n   `wrangler deployments list` in the same form lists the versions. `wrangler rollback \u003Cversion-id>` picks an older one.\n3. Request the smoke-check URLs again, and check that each answers as `SMOKE_CHECKS` expects.\n4. Propose a `git revert \u003Csha>` on `main` for the bad commit, so the next deploy does not ship it again. Leave the deploy tags alone. After a rollback, the live code is the previous tag's commit, and the next deploy tags the revert.\n\nA code rollback does not undo a migration. A data restore loses every write since the dump. Only the owner decides on it, with the steps in `docs\u002Frunbook-deploy.md`.\n\n## The result report\n\n```markdown\n**Deployed** \u003Cshort sha> as \u003Ctag> (\u003CUTC time>)\n\nRelease: \u003Cv-version, with its GitHub Release link | \"none\", and why>\nRan: `pnpm release \u003Cincrement>`, then `pnpm deploy:production \u003Cflags>`\nMigration: \u003Cnone | the dump file it printed>\nSmoke checks: \u003Cpass | skipped for \u003Cservices>, no custom domain>\nBrowser checks: \u003Ceach page and its result | \"for the owner\", with the list>\n```\n\nWhen the run failed, report the step that failed, the error lines, what is live now, and your proposed next step.\n\n## A project made before the gated deploy\n\n`saasaloy update` adds `packages\u002Ftooling` and this skill. It lists the root `package.json`, `turbo.json` and `AGENTS.md` in the merge plan when you edited them. Finish by hand:\n\n1. Merge the root `package.json` scripts: `deploy:production` is `node packages\u002Ftooling\u002Fsrc\u002Fdeploy-production.ts`, `prepare` is `husky && node packages\u002Ftooling\u002Fsrc\u002Flink-skills.ts`, `skills:link` is `node packages\u002Ftooling\u002Fsrc\u002Flink-skills.ts`, and `lint:types` and `lint:fix` include `packages\u002Ftooling\u002Fsrc`.\n2. Merge `turbo.json`: remove `^db:migrate:prod` from the `deploy` task's `dependsOn`, and remove the `db:migrate:prod` task.\n3. With `database-d1`, check `packages\u002Fdb\u002Fpackage.json`. It needs `db:prod:migrate` and `db:prod:dump`, and the old `db:migrate:prod` script goes: rename it to `db:prod:migrate` if the update did not add that one. A D1 deploy no longer migrates on its own. Run `pnpm deploy:production --migrate` when the migration gate asks for it.\n4. Run `saasaloy doctor`. Its Deploy warnings name a `turbo.json` that still has `db:migrate:prod`, and each deploying workspace with no `DEPLOY_TARGETS` row. Each warning prints its fix.\n5. Add a `custom_domain` route to each Worker that has a production host, so its smoke checks run.\n6. Copy `docs\u002Frunbook-deploy.md` from a new project if you want the runbook. `saasaloy update` does not create seed files.\n\n## A project made before the release step\n\n`saasaloy update` adds `packages\u002Ftooling\u002Fsrc\u002Frelease.ts` and the two release-it pins in `packages\u002Ftooling\u002Fpackage.json`. Finish by hand:\n\n1. Merge the root `package.json` scripts: `release` is `node packages\u002Ftooling\u002Fsrc\u002Frelease.ts`, and `release:dry` is `node packages\u002Ftooling\u002Fsrc\u002Frelease.ts --dry-run`. `saasaloy doctor` warns while they are missing.\n2. Delete an older `.release-it.json`, and any `release-it` or `@release-it\u002Fconventional-changelog` in the root `package.json`. `release.ts` reads neither. Move a changelog choice into the `release` block of `deploy.config.ts`.\n3. Keep `CHANGELOG.md` and the `v*` tags. The next release reads the newest tag and adds its entry above the old ones.\n\nThe root `package.json` `version` belongs to the project. `saasaloy update` compares the file as if it held the template's version and keeps yours when it writes, so a release alone never puts the file in a merge plan.\n","# saasaloy-deploy\n\nA production deploy is two commands, in this order. `pnpm release` gives the commit a version and a changelog entry (see \"The release\"). `pnpm deploy:production` then puts it live.\n\n`pnpm deploy:production` runs `packages\u002Ftooling\u002Fsrc\u002Fdeploy-production.ts`. It does every mechanical step, in this order, and stops at the first failure:\n\n1. **Gates.** The branch, the tree, origin, CI and new migrations. A real run lists every failed gate at once, each with the command that clears it, and builds nothing.\n2. **Env check.** `node packages\u002Fenv\u002Fsrc\u002Fdeploy.ts --check` names every blank production key. The `saasaloy-env` skill covers the values.\n3. **Migration**, with `--migrate` only: `pnpm --filter @repo\u002Fdb run db:prod:migrate`.\n4. **Workers**, one at a time, lowest `order` first from `DEPLOY_TARGETS` in `packages\u002Ftooling\u002Fsrc\u002Ftargets.ts`. Each runs its own `deploy` script, `env-deploy \u003Cservice>`.\n5. **Smoke checks.** Each `SMOKE_CHECKS` row is requested on every custom domain of its service, three tries, 5 seconds apart.\n6. **Tag.** HEAD gets an annotated `deploy-\u003CUTC yyyymmdd-hhmm>` tag, pushed to origin. Its message names the release, such as `Production deploy of c75d4e1 (v0.1.0): api, admin, web.` A run that fails any step writes no tag.\n\nThe deploy prints the release on HEAD before the gates. When HEAD is not a release commit, it prints a warning that lists the commits `CHANGELOG.md` does not cover, and it still deploys. That warning is never a gate, so an urgent hotfix goes out first.\n\nThis skill covers what the command cannot decide: what the owner approves, what to read, and what to do when a step fails. `docs\u002Frunbook-deploy.md` holds this project's own steps: the first deploy, the hosting and the data restore.\n\n## The rule\n\n**Never run `pnpm release` or a real deploy without the owner's go-ahead in this session.** A go-ahead is a message from the owner, after your dry-run report, that tells you to release, to deploy, or both. \"Deploy\" in the first request is not a go-ahead for a run you have not reported yet. A go-ahead covers the commands your report named, once each. When a run fails and you change anything, report again and wait again.\n\nYou may run these without asking:\n\n- `pnpm release:dry`, any number of times. It prints the next version and the changelog entry, and commits, tags and pushes nothing.\n- `pnpm deploy:production --dry-run`, any number of times. It runs the env check and builds, uploads, migrates and tags nothing.\n- Read-only git: `git describe --tags --match 'deploy-*' --abbrev=0`, `git log \u003Ctag>..HEAD`, `git show \u003Ctag>`.\n- `pnpm --filter \u003Cpackage> exec env-deploy --run \u003Cservice> -- wrangler deployments list`, for each deploy target.\n\nOnly the owner decides these, each in its own message:\n\n- `--migrate`. The owner reads the SQL you show and says yes.\n- `--skip-ci \"\u003Creason>\"`. Use it only when GitHub Actions itself is down, never for a red run. The owner gives the reason.\n- `--only \u003Cservice>`.\n- `pnpm release major`, or an exact version. Below 1.0 a breaking change bumps the minor, so `1.0.0` is the owner's choice.\n- A deploy with no release first, for an urgent hotfix.\n- `wrangler rollback`, and the restore of a database dump.\n\nNever do these:\n\n- Move, delete or re-create a deploy tag or a release tag.\n- Edit a released `CHANGELOG.md` entry, or the root `package.json` `version`, by hand. `pnpm release` writes both.\n- Edit `packages\u002Fenv\u002F.env.prod`, or print a value from it.\n- Commit with `--no-verify`, stash or discard files to pass the tree gate.\n- Deploy a Worker with `pnpm --filter \u003Cpackage> run deploy` or `wrangler deploy`. Both skip the gates, the order and the tag. Use `pnpm deploy:production --only \u003Cservice>` for one Worker.\n- Push to `main` without the owner's approval.\n\n## Procedure\n\n1. Bring the checkout up to date:\n   ```sh\n   git switch main && git pull --ff-only\n   pnpm install\n   ```\n2. Check for unpushed commits and uncommitted files:\n   ```sh\n   git status -sb\n   ```\n   `pnpm release` pushes every local commit with the release commit, so a commit from another session would go to origin unreviewed. When the first line shows `ahead`, or any file is listed, stop and ask the owner what to do with them.\n3. Run both dry runs:\n   ```sh\n   pnpm release:dry\n   pnpm deploy:production --dry-run\n   ```\n4. When the deploy dry run lists migration files, print each `.sql` file it names and read it.\n5. Write the report. Use the template below.\n6. Stop. Wait for the owner's go-ahead.\n7. Run the release the owner approved, then wait for CI on the release commit when the config names a workflow:\n   ```sh\n   pnpm release                      # or pnpm release minor, major, \u003Cversion>\n   gh run watch\n   ```\n8. Run the deploy the owner approved, with exactly the flags in the report:\n   ```sh\n   pnpm deploy:production            # or with --migrate, --skip-ci \"\u003Creason>\", --only \u003Cservice>\n   ```\n9. Check what the smoke checks do not cover, such as a sign-in flow, in a browser. Use `playwright-cli` when `command -v playwright-cli` finds it. Otherwise list the pages for the owner.\n10. Report the result. Use the template below.\n\n## The dry-run report\n\n```markdown\n**Deploy proposal** for \u003Cbranch> at \u003Cshort sha>\n\nLast deploy: \u003Ctag, or \"none, this deploy writes the first tag\">\n\nRelease: \u003Cthe version and the changelog entry pnpm release:dry printed | \"none: an urgent hotfix, released after\">\n\nCommits this deploy ships:\n- \u003Csha> \u003Csubject>\n- ...\n\nMigrations: \u003Cnone | the file names, each with a one-line summary of its SQL, and a note on any statement that drops, renames or rewrites data>\n\nGates: \u003Call pass | each line the dry run printed as fail>\n\nEnv check: \u003Cpassed | the blank keys it named>\n\nDeploy order: \u003Cas the dry run printed it>\n\nSmoke checks: \u003Cthe URLs | the services it skipped for want of a custom domain>\n\nCommands I will run: `pnpm release \u003Cincrement, when one>`, then `pnpm deploy:production \u003Cflags>`\n\nRisks: \u003Ca commit that changes sign-in, payment or an authorization check; a migration that is not additive; \"none seen\">\n```\n\nLeave out a section only when it is empty. Do not claim a commit is safe without reading its diff. Name the files you read.\n\n## The release\n\n`pnpm release` runs `packages\u002Ftooling\u002Fsrc\u002Frelease.ts`, which runs release-it with options it builds from `deploy.config.ts`. It reads no `.release-it.json`, and it never asks a question. In one run it:\n\n1. Reads the Conventional Commits since the last release tag and picks the next version: a `fix` bumps the patch, a `feat` the minor, a breaking change the major. Below 1.0 a breaking change bumps the minor (`preMajor`).\n2. Writes the version into the root `package.json` and a new entry at the top of `CHANGELOG.md`.\n3. Commits both as `chore(release): v\u003Cversion>`, tags the commit `v\u003Cversion>`, pushes, and creates a GitHub Release.\n\nThe changelog shows `feat`, `fix`, `perf` and `revert` commits. A commit of any other type shows only when it is breaking, under its own heading, such as `Miscellaneous Chores` for a breaking `chore!`. The first release covers every commit since the project start, so its entry is long.\n\n| Command | What it does |\n| --- | --- |\n| `pnpm release:dry` | Prints the next version and the changelog entry. Changes nothing. |\n| `pnpm release` | The version the commits ask for. |\n| `pnpm release patch`, `minor`, `major` | That bump, whatever the commits ask for. |\n| `pnpm release 1.2.3` | That exact version. |\n\nIt refuses to start, and changes nothing, when:\n\n| The run prints | Clear it with |\n| --- | --- |\n| `Must be on branch ...` | The release takes the deploy's `branches`. `git switch main`, or release from the hotfix branch. |\n| `Working dir must be clean` | Commit or ask the owner. Never turn the check off: release-it commits with `git add . --update`, so a dirty file would go into the release commit. |\n| `No upstream configured for current branch` | `git push -u origin \u003Cbranch>`. |\n| `There are no commits since the latest tag` | Nothing to release. Deploy without one, or wait for a commit. |\n| `a GitHub Release needs a token and none was found` | `gh auth login`, or set `GITHUB_TOKEN`. The owner may set `release.githubRelease: false` instead. |\n\n## The gates and what clears each one\n\nThe gate values come from `packages\u002Ftooling\u002Fsrc\u002Fdeploy.config.ts`. A key the file leaves out falls back to the default shown.\n\n| Gate | It passes when | The run prints | Clear it with |\n| --- | --- | --- | --- |\n| Branch | The branch matches `branches` (default `[\"main\", \"hotfix-*\"]`; a trailing `*` matches any rest). | `The branch is \u003Cx>, and a deploy starts only from ...` | `git switch main`. For a fix while `main` holds unreleased work, see \"Hotfix\". |\n| Tree | `git status --porcelain` is empty. | `The tree has uncommitted changes (...)` | `git commit`, or `git stash push -u`. An agent asks the owner what to do with the named files. A file the build itself changed is a bug to fix, not to stash. |\n| Origin | HEAD is the same commit as `origin\u002F\u003Cbranch>`. | `origin has no \u003Cbranch>`, or `HEAD (...) is not origin\u002F\u003Cbranch> (...)` | `git push -u origin \u003Cbranch>`, or `git pull --ff-only`, or `git push`. |\n| CI | `ciWorkflow` names no workflow (the gate is off), or a run of that workflow on HEAD succeeded. | `\u003Cworkflow> failed on HEAD`, `is still running`, or `has no run on HEAD` | `gh run watch`, then the dry run again. A failed run: read it with `gh run view \u003Cid> --log-failed`, fix, push. When GitHub Actions is down: `--skip-ci \"\u003Creason>\"`. |\n| Migrations | No file matching `migrations` (default `packages\u002Fdb\u002Fmigrations\u002F*.sql`) changed since the last deploy tag, or `--migrate` is set. With no tag yet, every migration file counts as new. | `\u003Cn> migration file(s) changed since \u003Ctag>` | Read the SQL, then `pnpm deploy:production --migrate`. |\n\nTwo more checks stop the run before the gates, because the deploy order would be a guess:\n\n| The run prints | Clear it with |\n| --- | --- |\n| `apps\u002F\u003Cservice> deploys and has no DEPLOY_TARGETS row` | Add `{ service: \"\u003Cservice>\", order: \u003Cnumber> }` to `DEPLOY_TARGETS`. `saasaloy doctor` warns about the same state. |\n| `DEPLOY_TARGETS names \u003Cservice>, and apps\u002F\u003Cservice> is not a workspace with a wrangler.jsonc and a deploy script`, a service or smoke `id` listed twice, or a `SMOKE_CHECKS` row for a service that does not deploy | Remove or fix the row in `packages\u002Ftooling\u002Fsrc\u002Ftargets.ts`. |\n| `this repository has no commit yet` | Make the first commit and push it, as the message says. |\n\nA failure after the gates:\n\n| The run prints | What it means, and what to do |\n| --- | --- |\n| `\u003Cservice> has no production value for \u003CKEY>`, or another env check line | Nothing built. Report the key names. The owner sets the values. |\n| `Migrate failed. No deploy tag was written.` | No Worker deployed. Read the migration output. The migration output names the dump it took first. |\n| `Deploy \u003Cservice> failed. No deploy tag was written.` | That Worker did not go live. A Worker before it in the order is live on the new commit, and the run prints its rollback command. |\n| `The Workers are live, and a smoke check failed` | Follow \"Roll back\" at once: report the failing URL and its status, and propose the rollback the run printed. |\n| `... and the push failed, so the tag is local only` | The Workers are live. Run `git push origin \u003Ctag>`. |\n\n## The flags\n\n- `--dry-run` prints the last deploy tag, the commits since it, the new migration files, every gate, the deploy order and the smoke checks, then runs the env check. It exits 0 and ends with the list of what would stop a real run.\n- `--migrate` runs `pnpm --filter @repo\u002Fdb run db:prod:migrate` after the env check and before the first Worker, so a new migration lands before the code that reads it. A project with no `@repo\u002Fdb` workspace refuses the flag. Keep each migration additive (a new table, a nullable or defaulted column), so old code runs on the new schema and a code rollback stays safe.\n  - `database-postgres`: `db:prod:migrate` checks that `DATABASE_URL` names `\u003Cproject>_production` on a server other than the development one in `apps\u002Fapi\u002F.env`. It then dumps the database with `pg_dump` and applies the migrations with `drizzle-kit migrate`. No migration runs without a good dump.\n  - `database-d1`: `db:prod:migrate` runs `wrangler d1 migrations apply DB --remote`, and creates the database first when the account has none by its `database_name`. Before it migrates an existing database, it dumps it with `wrangler d1 export --remote`. No migration runs without a good dump. A database it has just created gets no dump, because it holds nothing.\n- `--skip-ci \"\u003Creason>\"` passes the CI gate. The reason goes into the tag message. Every other gate still runs.\n- `--only \u003Cservice>` deploys one Worker after the same gates, and runs only its smoke checks. It writes no tag, because the tag means \"this commit is live on every Worker\".\n\n`pnpm db:prod:dump` takes a dump on its own: `pg_dump --format=custom` for Postgres, `wrangler d1 export --remote` for D1. Dumps land in `~\u002F\u003Cproject>-backups\u002F` (mode 0700), or in `DB_DUMP_DIR` when it is set, outside the repository. For Postgres, `pg_dump` runs from the `postgres:\u003Cmajor>` image the root `compose.yaml` names, through Docker. Set `PG_DUMP=local` to use the `pg_dump` on `PATH` instead.\n\n## Changing the gates, the order and the smoke checks\n\n`packages\u002Ftooling\u002Fsrc\u002Fdeploy.config.ts` and `packages\u002Ftooling\u002Fsrc\u002Ftargets.ts` belong to the project. `saasaloy init` writes them once, and `saasaloy update` never writes them again. The engine reads every key with a default, so an older copy keeps working.\n\n`deploy.config.ts`:\n\n- `branches`: the branches a deploy may start from.\n- `tagPrefix`: the start of every deploy tag. Change it only before the first deploy, or the engine no longer finds the older tags.\n- `ciWorkflow`: the GitHub Actions workflow file that must pass on HEAD, such as `\"ci.yml\"`. `undefined` turns the CI gate off.\n- `migrations`: the git pathspec for migration files.\n- `release`: what `pnpm release` writes. `tagPrefix` (default `v`; change it only before the first release), `githubRelease` (default `true`), `preMajor` (default `true`), and `changelogSections`, the `conventionalcommits` preset's `types` list. Unset keeps the preset's sections. A key left out falls back to its default.\n\n`targets.ts` holds two arrays. Keep each in the shape `export const NAME: Type[] = [...]`, because `saasaloy add` appends its rows there with a `const-array` patch, and `saasaloy remove` takes them out again.\n\n- `DEPLOY_TARGETS`: `{ service, order }`. `service` is the directory under `apps\u002F`. The base adds `web` (30), the api module `api` (10) and the admin module `admin` (20). A new Worker needs its own row, or the deploy stops and names it.\n- `SMOKE_CHECKS`: `{ id, service, path, status, body? }`. `body` is text the response body must contain. The `id` stays unique.\n\n**A smoke check needs a custom domain.** The engine takes the host from each `routes[]` entry with `custom_domain: true` in `apps\u002F\u003Cservice>\u002Fwrangler.jsonc`. A service with none gets no smoke check, and the run says so. It never guesses a `workers.dev` address. To turn the checks on, add the route and deploy:\n\n```jsonc\n\u002F\u002F apps\u002Fapi\u002Fwrangler.jsonc\n\"routes\": [{ \"pattern\": \"api.example.com\", \"custom_domain\": true }]\n```\n\nWrangler creates the domain on the next deploy when the zone is on the same Cloudflare account. The next `pnpm deploy:production --dry-run` lists the smoke URLs for that host.\n\n## Hotfix\n\nUse this when live code needs a fix and `main` holds commits that must not go live yet. There is no long-lived production branch: the newest deploy tag marks what is live.\n\n1. Start the branch from the live commit:\n   ```sh\n   git switch -c hotfix-\u003Cslug> \"$(git describe --tags --match 'deploy-*' --abbrev=0)\"\n   ```\n2. Make the fix, run `pnpm typecheck`, `pnpm lint` and `pnpm test`, and commit.\n3. Ask the owner to approve the push. Then push it:\n   ```sh\n   git push -u origin hotfix-\u003Cslug>\n   ```\n4. Wait for CI on the branch when the config names a workflow. Then follow \"Procedure\" from step 2 on this branch. `pnpm release` on the branch makes a patch release such as `v0.3.1`. When the fix cannot wait for the release, the owner may deploy first and release after.\n5. After the deploy, ask the owner to merge the fix into `main`, so the next deploy keeps it. Merge, never rebase: a rebase rewrites the commit the release tag names.\n   ```sh\n   git switch main && git merge hotfix-\u003Cslug>\n   ```\n   When `main` has released since the hotfix branched, the merge conflicts in `CHANGELOG.md` and in the root `package.json` `version`. Keep both changelog entries, newest version first, and keep the higher version. Then commit the merge and push:\n   ```sh\n   git push\n   git branch -d hotfix-\u003Cslug> && git push origin --delete hotfix-\u003Cslug>\n   ```\n\nA release from a hotfix branch has not run on a real project yet. Read its `pnpm release:dry` output closely.\n\n## Roll back\n\n1. Report the failure and propose the rollback. Wait for the owner's go-ahead.\n2. Roll back each broken Worker to its previous version. A failed run prints one line per Worker it deployed, in this form:\n   ```sh\n   pnpm --filter \u003Cpackage> exec env-deploy --run \u003Cservice> -- wrangler rollback\n   ```\n   `wrangler deployments list` in the same form lists the versions. `wrangler rollback \u003Cversion-id>` picks an older one.\n3. Request the smoke-check URLs again, and check that each answers as `SMOKE_CHECKS` expects.\n4. Propose a `git revert \u003Csha>` on `main` for the bad commit, so the next deploy does not ship it again. Leave the deploy tags alone. After a rollback, the live code is the previous tag's commit, and the next deploy tags the revert.\n\nA code rollback does not undo a migration. A data restore loses every write since the dump. Only the owner decides on it, with the steps in `docs\u002Frunbook-deploy.md`.\n\n## The result report\n\n```markdown\n**Deployed** \u003Cshort sha> as \u003Ctag> (\u003CUTC time>)\n\nRelease: \u003Cv-version, with its GitHub Release link | \"none\", and why>\nRan: `pnpm release \u003Cincrement>`, then `pnpm deploy:production \u003Cflags>`\nMigration: \u003Cnone | the dump file it printed>\nSmoke checks: \u003Cpass | skipped for \u003Cservices>, no custom domain>\nBrowser checks: \u003Ceach page and its result | \"for the owner\", with the list>\n```\n\nWhen the run failed, report the step that failed, the error lines, what is live now, and your proposed next step.\n\n## A project made before the gated deploy\n\n`saasaloy update` adds `packages\u002Ftooling` and this skill. It lists the root `package.json`, `turbo.json` and `AGENTS.md` in the merge plan when you edited them. Finish by hand:\n\n1. Merge the root `package.json` scripts: `deploy:production` is `node packages\u002Ftooling\u002Fsrc\u002Fdeploy-production.ts`, `prepare` is `husky && node packages\u002Ftooling\u002Fsrc\u002Flink-skills.ts`, `skills:link` is `node packages\u002Ftooling\u002Fsrc\u002Flink-skills.ts`, and `lint:types` and `lint:fix` include `packages\u002Ftooling\u002Fsrc`.\n2. Merge `turbo.json`: remove `^db:migrate:prod` from the `deploy` task's `dependsOn`, and remove the `db:migrate:prod` task.\n3. With `database-d1`, check `packages\u002Fdb\u002Fpackage.json`. It needs `db:prod:migrate` and `db:prod:dump`, and the old `db:migrate:prod` script goes: rename it to `db:prod:migrate` if the update did not add that one. A D1 deploy no longer migrates on its own. Run `pnpm deploy:production --migrate` when the migration gate asks for it.\n4. Run `saasaloy doctor`. Its Deploy warnings name a `turbo.json` that still has `db:migrate:prod`, and each deploying workspace with no `DEPLOY_TARGETS` row. Each warning prints its fix.\n5. Add a `custom_domain` route to each Worker that has a production host, so its smoke checks run.\n6. Copy `docs\u002Frunbook-deploy.md` from a new project if you want the runbook. `saasaloy update` does not create seed files.\n\n## A project made before the release step\n\n`saasaloy update` adds `packages\u002Ftooling\u002Fsrc\u002Frelease.ts` and the two release-it pins in `packages\u002Ftooling\u002Fpackage.json`. Finish by hand:\n\n1. Merge the root `package.json` scripts: `release` is `node packages\u002Ftooling\u002Fsrc\u002Frelease.ts`, and `release:dry` is `node packages\u002Ftooling\u002Fsrc\u002Frelease.ts --dry-run`. `saasaloy doctor` warns while they are missing.\n2. Delete an older `.release-it.json`, and any `release-it` or `@release-it\u002Fconventional-changelog` in the root `package.json`. `release.ts` reads neither. Move a changelog choice into the `release` block of `deploy.config.ts`.\n3. Keep `CHANGELOG.md` and the `v*` tags. The next release reads the newest tag and adds its entry above the old ones.\n\nThe root `package.json` `version` belongs to the project. `saasaloy update` compares the file as if it held the template's version and keeps yours when it writes, so a release alone never puts the file in a merge plan.\n",{"name":5,"description":7},"main","a46a4dd388795519840da0ed1f695634b6dcd99b","packages\u002Fcli\u002Ftemplates\u002Fbase\u002F_agents\u002Fskills\u002Fsaasaloy-deploy",0,"https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy","https:\u002F\u002Fsaasaloy.com","https:\u002F\u002Fgithub.com\u002Fmimukit","https:\u002F\u002Fmimukit.com","Senior Software Engineer · 9+ yrs Fullstack (TS\u002FNode\u002FReact) · AI integrations, distributed systems · Building @saasaloy & @codealoy · Bangladesh 🇧🇩 \u002F Remote","2026-11-13 20:39:28",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mimukit\u002Fsaasaloy --skill saasaloy-deploy",{"tool":40,"command":41},"bunx","bunx skills add mimukit\u002Fsaasaloy --skill saasaloy-deploy",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mimukit\u002Fsaasaloy --skill saasaloy-deploy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftemplates\u002Fbase\u002F_agents\u002Fskills\u002Fsaasaloy-deploy\u002FSKILL.md",true,[],[49,56,63,70,77,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7BE75C34XHSPVJNQC8FY4Q0","saasaloy-subscription","Runbook for the subscription capability — provider-agnostic subscriptions in packages\u002Fsubscription, with a plan file, a projection table, a billable-subject file, plan entitlements and per-provider modules. Use when adding a plan, adding a plan feature or a numeric limit, gating an API route with requireFeature or requireWithinLimit, reading the 402 it returns, working out why a subject resolves to the free plan, wiring a checkout or portal route, reading a SubscriptionError, choosing or switching SUBSCRIPTION_PROVIDER, registering a webhook in the vendor's dashboard, writing a third subscription provider, or upgrading a project that still has `billing` installed.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fsubscription\u002Fskills\u002Fsaasaloy-subscription\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7BE68MJ8H47JZKTBDFYR6JD","saasaloy-notification","Runbook for the notification module, in-app notifications for apps\u002Fapp. It owns the notifications and notification_opt_outs tables, notify() in apps\u002Fapi\u002Fsrc\u002Flib\u002Fnotify.ts, the \u002Fnotifications api routes, the bell in the app header, the sidebar badge, the \u002Fnotifications page with Inbox and Preferences tabs, the notification config section, and the daily prune. Use when sending a notification from an api route, adding or changing a category, changing retention, debugging a badge or bell count that does not move, or removing the module.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fnotification\u002Fskills\u002Fsaasaloy-notification\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7BE53PDQV0YDPG8RNVGTPEQ","saasaloy-cms","Runbook for the cms module, the in-house CMS behind apps\u002Fadmin. Covers code-defined collections, the Tiptap editor, drafts, revisions and redirects, the publish-time renderer, the public blog on apps\u002Fweb and its 60-second cache. Use when adding a collection or a field, rendering a stored body, reusing the editor, renderer or media field from another module, moving the blog to another path, re-rendering live posts after a renderer upgrade or a STORAGE_PUBLIC_URL change, or working out why a published post is not live yet.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fcms\u002Fskills\u002Fsaasaloy-cms\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79GQ03M63V5EKSST92B3S5X","saasaloy-beta","The beta module's own procedure.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftest\u002Ffixtures\u002Fregistry-clean\u002Fbeta\u002Fsaasaloy-beta\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79GPXV3K8YF3M4VA0KGVE0B","helper","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftest\u002Ffixtures\u002Fregistry-broken\u002Fbad-skill\u002Fhelper\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79GPR8EVS1YX0W8X33Q9YD8","saasaloy-update","Runbook for an AI agent that updates this project to a newer Saasaloy CLI and newer module versions with saasaloy update. Use when the owner says \"update saasaloy\", \"upgrade the CLI\", \"pull the latest modules\", \"update the base template\", \"work the merge plan\", \"clear the update notes\", when saasaloy update or saasaloy outdated --check exits 3 or 2, when a merge plan or .saasaloy\u002Fmerge-plan.md is handed to you, or when an adopted project takes its first update. Covers the CLI upgrade, the preview, --out, the file merges, the update notes and \"Notes that may apply\", --resolved and --done, a file deleted locally and --restore, a three-way or two-way base, an update that skips releases, --from, the verify commands, and the exit codes.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftemplates\u002Fbase\u002F_agents\u002Fskills\u002Fsaasaloy-update\u002FSKILL.md",[],[]]