create_deploy_spec
Skill0 starsChanged 6 months agoMITView on GitHub
USE when a product needs its `<product>/agent-stack/deploy.yml` written for the first time, or when adding a new deployable component to an existing one. Ensures the spec validates against schema `deploy/1` (run `wsp schema deploy` for the live source of truth) and that each component declares: name, target, repo, requires_human_approval, pre_steps, promote_after_pass when relevant. NEVER deploy a product without a deploy spec — improvising the procedure is forbidden by `use_deploy_spec` rule. Activate when: the user asks to deploy a product that has no deploy.yml, the product introduces a new deployable component, or refactoring a legacy ad-hoc deploy script into a declarative spec.
In this repository7 other files it gives its agents.
- create_agent_ruleSkill
- create_repo_readmeSkill
- create_skillSkill
- discover_awac_in_fresh_workspaceSkill
- manage_project_stateSkill
- use_wsp_cliSkill
- verify_codeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
If you find yourself wanting to put deploy logic in the spec, that's a sign the topical workflow is missing something — extend the workflow …
- Very specific: line 71
If none of the targets match, propose extending the schema enum in the wsp source (wsp/schemas/deploy.schema.json) and adding a new …
- Very specific: line 115
Default: true for everything that hits a real environment.
- Very specific: line 123
Never false for: production, anything customer-facing, anything that mutates AWS resources, anything that mutates Odoo.SH.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Create a deploy spec
A product without <product>/agent-stack/deploy.yml cannot be deployed by
agents — use_deploy_spec rule forbids improvising. This skill walks an
agent through writing a valid spec from scratch (or extending an existing
one) so that future deploys are reproducible and ack-gated.
1. Decide which stack repo (always the product stack)
The spec is per-product. It always lives at:
<product>/agent-stack/deploy.ymlEven when the deploy procedure is "shared logic" (e.g. push Odoo modules to
Odoo.SH, then to a canonical branch) — the LOGIC lives in the topical
workflow inside the relevant ecosystem stack (e.g.
<ecosystem-org>/agent-stack/workflows/deploy_to_odoo_sh.md); only the
PARAMETERS live in the product spec (which project, which modules, which
branch, who acks).
If you find yourself wanting to put deploy logic in the spec, that's a sign the topical workflow is missing something — extend the workflow instead.
2. Inventory the deployable components
For the product, list every artifact that gets deployed somewhere:
- API/services (
orchestrator,mail-api,api,platform) - Static sites (
web,docs) - Cross-org modules consumed by the product (e.g. shared add-ons in another org)
- Background workers, MCP servers, etc.
Each becomes one entry under components:. A component that doesn't have
a target type yet is NOT a component — it's research-stage code.
3. Pick the right target per component
| Component shape | Likely target |
| Python/Node service in containers, ECS Fargate | aws_ecs |
| Lambda function | aws_lambda |
| EC2 instance behind SSM (no SSH) | aws_ec2_ssm |
| Astro / Next.js / Vite static site on Cloudflare | cloudflare_pages |
| Cloudflare Worker | cloudflare_workers |
| Odoo addon module pushed to Odoo.SH then to canonical | odoo_sh |
| Docs site published via GH Pages | github_pages |
| Anything that doesn't fit and requires manual steps | manual (last resort; document the steps in pre_steps) |
If none of the targets match, propose extending the schema enum in the wsp
source (wsp/schemas/deploy.schema.json) and adding a new
deploy_to_<target>.md topical workflow.
4. Required fields per component
- name: orchestrator # Required. Stable id.
target: aws_ec2_ssm # Required. Picks the topical workflow.
repo: <product>/orchestrator # Recommended. Source repo.
requires_human_approval: true # Default true. Set false ONLY for low-risk
# preview/staging deploys.
pre_steps:
- run_tests_local # Workflow IDs from any active stack.
- terraform_plan
promote_after_pass: [] # Empty unless this is an Odoo-style flow.For the Odoo case, promote_after_pass is non-trivial:
- name: <product>_portal_module
target: odoo_sh
repo: <ecosystem-org>/<product>_portal
requires_human_approval: true
odoo_sh:
project: <product>-portal
branch: main
module_scope: list
modules: [<product>_portal]
pre_steps:
- run_odoo_tests_docker_wsl # MANDATORY before Odoo.SH
promote_after_pass:
- target_repo: <ecosystem-org>/<product>_portal
target_branch: 19.0
require_pass_on: odoo_sh5. requires_human_approval defaults
Default: true for everything that hits a real environment. Reasoning:
the agent SHOULD pause before each component because the user might want
to deploy components selectively (e.g. push the API but not the modules).
Acceptable to set false:
- Preview deploys to ephemeral environments (CF Pages preview branch).
- Internal-only admin deploys behind feature flags.
Never false for: production, anything customer-facing, anything that
mutates AWS resources, anything that mutates Odoo.SH.
6. Validation before commit
# Print the schema
wsp schema deploy
# Smoke-validate by running the deploy command in plan-only mode
wsp deploy <product> --planThe CLI validates the spec at parse time and refuses to run if it doesn't
match deploy/1.
7. Step-by-step
- Decide host stack repo — always
<product>/agent-stack/. - Inventory components (§ 2).
- Pick
targetfor each (§ 3). - Fill required fields (§ 4).
- Decide approval defaults (§ 5).
- Write the file at
<product>/agent-stack/deploy.yml. - Validate:
wsp deploy <product> --plan. - Commit + push to the agent-stack repo. From this point, any
workspace running
wsp sync(orwsp bootstrap) sees the new spec.
8. Cross-references
- Schema:
wsp schema deploy - Rule:
use_deploy_spec.md(in agent-stack-core/rules/) - Workflow router:
deploy_product.md(in agent-stack-core/workflows/) - Topical examples:
deploy_to_<target>.mdin the relevant ecosystem stack (e.g. the Odoo ecosystem stack hostsdeploy_to_odoo_sh.md). - Related skills:
manage_project_state(for the00_Mapa_Repositorios.mdcross-references),create_repo_readme.
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.

