Activation Contract
Activate when the user asks to create, start or scaffold a web or app project in this repo. Do not activate for deploys, features in existing projects, or single throwaway files.
Hard Rules
- Create everything inside
proyectos/because outside it nothing deploys or gets documented. - Apply
docs/convenciones.mdas is because it is the repo contract; any other user request is obeyed and recorded inTAREAS.md→## Decisiones. - Fix the type (
web,app,web-app) withdocs/cuando-usar-cada-stack.mdbecause each type has a different structure; with missing type or name, ask one question and wait. - Use mandatory prefix + kebab-case with no accents or spaces (
web-,app-,web-app-) because the prefix fixes the type; if the folder exists, stop and report. - Create
TAREAS.mdfirst fromassets/tareas-template.mdbecause it is the project memory and gets written before deciding. - Generate the structure only with
scripts/scaffold.shbecause hand-made scaffolds skip files (seereferences/flujo-de-creacion.md). - Put a 2 to 4 line header in English on every code file because the future reader lacks the context; verify with
scripts/validar-cabeceras.sh. - Keep the stack fixed unless decided otherwise (see
docs/stack.md) because another stack breaks the skeletons. - Never run installs, deploys or commits nor create secrets because those are user steps; leave
bun installandwrangler devinREADME.md. - Write documentation and comments in English and identifiers, files and folders in English because
docs/convenciones.mdsays so. - Never copy versions, prices or limits because they expire; cite
docs/cloudflare-free-tier.mdanddocs/stack.md. - Always use
web,app,web-app,scaffold,TAREAS.mdandtenant_idperreferences/glosario.mdbecause synonyms break activation. - After any change to the skill (
scripts/,assets/,references/or thisSKILL.md), run both suites in both copies (scripts/tests/scaffold.test.shandscripts/tests/validar-cabeceras.shin the local skill and inskills-dist/) and require exit 0 on all four before reporting, because an unverified skill ships broken scaffolds. - In data apps require the full pyramid (unit
bun test+ bindings-vs-c.envgrep + Playwright E2E against localwrangler devwith seeded + swept data and screenshots); static webs are exempt because they have no backend to break. - Every route touching D1 is stepped on by at least one test with real D1 (path coverage, not percentage) because fakes pass and production fails.
- Name the visual direction before drawing and forbid defaults (cream backgrounds+serif+terracotta, everything-in-cards, uppercase eyebrows) because defaults read as template.
- Verify every visual change in a real browser with screenshots and parent review before reporting, because rendering cannot be tested in text.
- Install, test and improve only on local/dev, never secrets or production, record every install in
TAREAS.mdand leaverm -rfto the parent, because that is the user's condition for the good of the app. - Seeds with hash-only in migrations and credentials only in dev
TAREAS.md+README.md, deleted before exposing, because a key in code stays exposed.
Decision Gates
| Situation | Action |
|---|---|
| Uncertain type after the checklist | Ask the user and wait before creating anything |
| Name without prefix or with uppercase/accents | Ask for a correction with the right prefix |
| The folder already exists | Stop and report; do not overwrite anything |
scaffold.sh exits non-zero | Stop and report the error without creating anything else |
| The user asks for another stack | Obey and record it in TAREAS.md → ## Decisiones |
| The user asks for deploy, secrets or a big feature | Not this skill's job; report it as a next step |
Execution Steps
- Read
references/glosario.md,references/ejemplos.mdandreferences/flujo-de-creacion.md. - Fix type and name with the checklist in
docs/cuando-usar-cada-stack.md; if anything is missing, ask one question and wait. - In the project root or its
proyectos/runbash <ruta-a-la-skill>/scripts/scaffold.sh <tipo> <nombre>(<ruta-a-la-skill>= skill directory; creates under$PWD/proyectos, or under$PWDinsideproyectos/) and stop on non-zero exit. - Complete
TAREAS.md(Objetivo, Tipo, Stack, tasks) and the created project'sREADME.md. - Run
bash <ruta-a-la-skill>/scripts/validar-cabeceras.sh <ruta-al-proyecto>(proyectos/<nombre>from the root,<nombre>from insideproyectos/) and fix until exit 0 (validate → fix → re-verify). - Report per
## Output Contract.
Output Contract
Return: created tree, type and name, questions asked and answers received, exit codes of both scripts with the validator output, what was NOT run (installs, tests, deploy) with next steps for the user (bun install, wrangler dev), and residual risks. A report without the four exit codes and their summary lines is incomplete and must not be delivered.
References
Paths relative to the skill directory: references/flujo-de-creacion.md, references/ejemplos.md, references/pruebas.md, references/contratos-de-capas.md, references/glosario.md, scripts/scaffold.sh, scripts/validar-cabeceras.sh. Project documents: use references/docs/ if present inside the skill; otherwise docs/ at the current project root (docs/convenciones.md, docs/cuando-usar-cada-stack.md, docs/stack.md, docs/cloudflare-free-tier.md).