pwc-deploy
Skill294 starsChanged 9 days agoApache-2.0View on GitHub
Safely inspect, deploy, roll back, clean, or change nginx for the Papers With Code production and staging environments through the installed immutable-release interfaces. Use this whenever a request mentions PwC deployment, release status, staging promotion, production cutover, rollback, release cleanup, deployed service lifecycle, nginx changes, or environment migration. Do not use it for ordinary local development, data curation, database migrations, CRON job diagnosis, or paper/task/benchmark operations.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Read the repository AGENTS.md and docs/deployment.md.
- Very specific: line 15
Run python deploy/topology_audit.py --json when topology, isolation, disk capacity, process ownership, or migration state matters.
- Very specific: line 36
Never move current or previous manually, edit a release directory, serve frontend/dist, invoke systemctl restart as a substitute for a …
- Distinctive: line 74
Do not infer production authorization from approval to deploy staging, test a branch, merge code, or prepare a release.
- Very specific: line 80
After success, use pwc-status and the release smoke checks.
- Distinctive: line 137
If incident evidence suggests nginx but no checked-in fix exists, inspect and report the evidence, then request a separately reviewed nginx …
- Distinctive: line 144
Use qualification-only only when an existing legacy owner still occupies the live production port:
- Distinctive: line 167
Do not print environment-file contents, credentials, private chat data, or raw transcripts.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Papers With Code deployment
Operate the two deployed environments through their installed interfaces. The developer checkout is release source, never a runtime directory.
Start with read-only evidence
- Read the repository
AGENTS.mdanddocs/deployment.md. - Run
pwc-status. - Run
python deploy/topology_audit.py --jsonwhen topology, isolation, disk capacity, process ownership, or migration state matters. - Resolve the requested ref to an exact 40-character commit. Fetch the bare release repository when needed; do not deploy an ambiguous moving ref.
- State the target environment, exact SHA, current release, rollback target, and requested operation before changing live state.
Status and audit requests are read-only. Do not turn them into a deploy, restart, cleanup, rollback, or nginx reload.
Choose the supported interface
| Intent | Interface |
| Inspect releases and services | pwc-status |
| Deploy backend plus frontend | pwc-deploy |
| Restore the prior complete release | pwc-rollback |
| Remove unreferenced releases | pwc-cleanup |
| Apply a checked-in nginx template | pwc-nginx |
| Inspect registered scheduled jobs | pwc-cron status |
Never move current or previous manually, edit a release directory, serve
frontend/dist, invoke
systemctl restart as a substitute for a deployment, or delete release
directories directly. These bypass candidate qualification, feature-manifest
validation, smoke checks, and atomic rollback.
Route CRON health and job diagnostics to the repository pwc-cli skill.
Route database/data migrations and Papers With Code curation to their relevant
skills. A deploy does not authorize either.
Deploy staging
Staging accepts an exact feature-branch SHA:
sudo pwc-deploy staging <exact-sha>The command builds the staging frontend profile, validates the complete
backend/frontend release, qualifies a candidate on the reserved candidate
range, atomically updates the pointer, restarts only staging, and runs live
smoke checks. Report the resulting current and previous releases from
pwc-status.
Staging is static, admin-gated, and owns only staging user/workflow state. A
staging deployment must not start Vite, use production port 8000, mutate the
production catalog, or enable production CRON. The release contract keeps
codex_add_evals and codex_enrich_paper false in staging.
Deploy production
Production deployment requires an explicit user request for production and an
exact commit reachable from origin/main:
sudo pwc-deploy production <exact-main-sha> --confirm DEPLOY_PRODUCTIONDo not infer production authorization from approval to deploy staging, test a branch, merge code, or prepare a release. Preserve all staging-only feature boundaries; currently production chat and Sandbox features remain disabled. Production Codex curation controls are admin-only and require the protected HF/OpenAI/GitHub job credentials plus the writable production catalog.
After success, use pwc-status and the release smoke checks. Verify at least
health/release identity, the SPA shell and hashed asset MIME types, a paper
page, one paper API response, and the production chat-absence boundary. Report
the immediately recoverable previous release.
Known transient failure: graceful drain
A first pwc-deploy can fail with external Pi worker did not prove graceful drain while the old release keeps serving. Confirm with pwc-status that current is still the old release, then run the identical command again; it has succeeded on retry every time. Investigate only if the retry fails too.
Roll back
Rollback requires an explicit rollback request. Inspect previous first:
sudo pwc-rollback staging
sudo pwc-rollback production --confirm ROLLBACK_PRODUCTIONThe command atomically swaps the complete release pointer, restarts only the target backend, and smokes the restored release. Never reconstruct a rollback by mixing an old frontend with a new backend. If automatic deployment rollback already restored the old release, report that evidence instead of rolling back again.
Clean releases
Cleanup is separate from deploy and requires explicit authorization:
sudo pwc-cleanup --confirm CLEAN_RELEASESIt may remove only releases outside the union of production/staging current
and previous. Inspect status and disk capacity before and after. Do not
remove shared runtime, environment state, thumbnails, or backups.
Change nginx
An application deploy never edits or reloads nginx. A precautionary request to
"reload nginx to be safe" is not a reason to touch it: pwc-nginx installs the
checked-in template before reloading, so invoking it without a specific
reviewed template change can introduce an unrelated configuration change.
Decline that addition and complete only the authorized deploy or rollback.
A specific checked-in nginx change requires an explicit request to apply that change and the environment-specific command:
sudo pwc-nginx staging --confirm APPLY_NGINX_STAGING
sudo pwc-nginx production --confirm APPLY_NGINX_PRODUCTIONReview the displayed diff. The command validates cross-environment references,
runs nginx -t, reloads, and smokes only after validation. Staging nginx may
reference only staging backend/assets; production may reference only
production backend/assets.
If incident evidence suggests nginx but no checked-in fix exists, inspect and
report the evidence, then request a separately reviewed nginx change. Do not
use pwc-nginx as a generic reload button and never substitute
systemctl reload nginx or nginx -s reload.
One-time legacy migration
Use qualification-only only when an existing legacy owner still occupies the live production port:
sudo pwc-deploy production <exact-main-sha> \
--qualify-only --confirm DEPLOY_PRODUCTIONProceed to the cutover only after candidate qualification passes and the user
has authorized the production migration. Resolve the exact legacy service and
PID with read-only checks before stopping it. --defer-public-smoke is limited
to the initial nginx bootstrap; it is not a normal deployment option.
Handoff
Lead with the outcome. Include:
- target environment and exact SHA;
- resulting
currentandprevious; - candidate and live smoke outcome;
- whether automatic rollback ran;
- any remaining authorization boundary or failed gate.
Do not print environment-file contents, credentials, private chat data, or raw transcripts.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- frontend/public/llms.txtllms.txt
- add-benchmarkSkill
- add-conferenceSkill
- add-evalsSkill
- add-external-paperSkill
- add-methodSkill
- add-taskSkill
- complete-task-based-on-hfSkill
- complete-taskSkill
- complete-task-v2Skill
- create-thumbnailSkill
- create-trendsSkill
- curate-daily-papersSkill
- enrich-paperSkill
- grill-meSkill
- handoffSkill
- hf-cliSkill
- implementSkill
- lean-code-cleanupSkill
- process-x-bookmarksSkill
- pwc-brandSkill
- pwc-cliSkill
- pwc-cron-healthSkill
- remote-paper-curationSkill
- reply-github-issueSkill
- resolve-model-paperSkill
- s2-cliSkill
- skill-creatorSkill
- to-ticketsSkill
- verify-evalsSkill
- s2-cliSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

