Frontend Engineering Standards — frontend-skill
How to use this document
This document defines behavior standards for executors working on frontend code. You were loaded because your task touches this stack; follow this flow:
- Load the injected skills — follow the skill-loading rules (section 1,
### Skill loading). Read them BEFORE touching code.
- Detect project and stack (section 1) — assume an existing project.
- If there is no project, run the questionnaire and the installation guide (section 2).
- Work architecture-first (section 3) and implement step by step.
- At the end, report
skill_resolution with the loading result.
1. Project and Stack Detection
Assume the directory is an existing project. This is the default case when the orchestrator delegates work. Only if there is NO project signal (empty directory, or only .git or README.md) go to section 2 (New Project Mode).
- Scan the structure —
src/, app/, components/, pages/, lib/, etc.
- Read configuration files (priority order):
package.json → npm/pnpm, scripts, dependencies
vite.config.* → Vite (dev server, build, plugins)
astro.config.* → Astro (output, integrations, adapters)
.next.config.* → Next.js (App Router, output, images, fonts)
.next.config.* → Next.js (App Router, output, images, fonts)
.eslintrc* → ESLint
eslint.config.* → ESLint (flat config)
.prettierrc* → Prettier
pnpm-workspace.yaml → pnpm workspace (monorepo)
.husky/ → Husky (git hooks)
typedoc.config.* → TypeDoc
vercel.json → Vercel
netlify.toml → Netlify
1. Read `dependencies` and `devDependencies`
2. Find package manager: "pnpm", "npm"
3. Find bundler: "vite", "webpack", "rollup", "next", "astro"
4. Find linting: "eslint", "prettier", "stylelint"
5. Find git hooks: "husky", "lint-staged", "commitlint"
6. Find monorepo: "workspaces", "pnpm-workspace.yaml"
7. Find documentation: "typedoc", "jsdoc"
8. Find deploy: "vercel", "netlify-cli", "gh-pages"
9. Find testing: "vitest", "playwright", "@testing-library"
- Identify framework/bundler, main libraries, patterns, tests/linting.
Default stack when no configuration is found
When no configuration files are detected, identify the project type from code signals and use its stack base:
The taxonomy below is the single source of truth for project types and their stack base. scripts/detect-stack.sh mirrors it in machine-readable form; update both together.
| Project type |
Description |
Signals |
Stack base (skills) |
Scaffolding |
| Static native site |
Static information, no interaction: brochure, simple portfolio |
index.html + styles.css, no JS or bundler |
html + css + accessibility + performance + deploy |
manual structure (no bundler) |
| Interactive native site |
HTML + CSS + vanilla JS: events, DOM, fetch, forms |
index.html + script.js with events/fetch/forms, no framework |
html + css + javascript + accessibility + performance + deploy |
manual structure (no bundler) |
| Landing / marketing |
SSG with zero JS by default, SEO and a11y |
.astro without islands, SEO/meta, zero JS by default |
astro (+ html, css, javascript, typescript, package-manager) + accessibility + performance + deploy |
pnpm create astro@latest |
| Blog / content |
Content collections + MDX, content publishing |
.astro + src/content/, .md/.mdx |
astro (+ html, css, javascript, typescript, package-manager) + accessibility + performance + docs + deploy |
pnpm create astro@latest |
| SPA |
Single-page app with islands (client:load) and view transitions |
.astro + islands (client:load), React components |
astro + reactjs + component-design + state-management + typescript + accessibility + performance + deploy |
pnpm create astro@latest |
| TanStack Start App |
Full-stack React with type-safe routing, server functions, SSR/SSG |
vinxi.config.ts + routes/, TanStack Router + Query + Start |
tanstack-start (+ reactjs, typescript, javascript, html, css, testing) + accessibility + performance + deploy |
npx create-tanstack-app@latest --framework=react --template=start |
| SSR / fullstack app |
Server Components, Server Actions, server-side data |
next.config.* + app/pages, Server Components |
nextjs (+ reactjs, html, css, javascript, typescript) + api-design + auth + security + state-management + accessibility + performance + deploy |
pnpm create next-app@latest |
| Dashboard / admin |
Panel with auth, tables, global state |
vite.config.* + .tsx, tables, global state |
vite + reactjs (+ html, css, javascript, typescript) + component-design + state-management + api-design + auth + security + accessibility + performance + deploy |
pnpm create vite@latest (react-ts) |
| E-commerce |
Catalog + auth + payments, critical perf and a11y |
next.config.* + app/, auth + payments |
nextjs (+ reactjs, html, css, javascript, typescript) + auth + security + api-design + performance + accessibility + deploy |
pnpm create next-app@latest |
No stack signals in the code → assume the simplest (static native / vanilla). When in doubt, do not assume vanilla or framework: in direct interaction, ask; in delegated mode, document it as an assumption.
Refinements del detector (scripts/detect-stack.sh): además de los 9 tipos de la tabla, emite monorepo (unión de los stack base de los paquetes del workspace) y unknown (sin señales). Un proyecto Vite sin React/TSX (Vite vanilla) se clasifica como static/interactive y conserva vite en su stack base.
Existing project rules
(1) do not rewrite whole files — surgical changes; (2) respect existing patterns — if they use pages/, do not propose app/; (3) do not reformat the whole file — only what is needed (unless there is a linter); (4) only install dependencies or change the folder structure if the delegated scope requires it — if unclear, documented assumption or risk; (5) do not migrate technologies without explicit permission.
Skill loading
Do not auto-load skills or decide priorities. Rules:
- Load ONLY the injected skills under
## Skills to load before work in your prompt.
- If a skill references another, follow the reference only if it is a direct dependency declared in the skill itself.
- Do not invent skills or paths.
Skill registry bootstrap
The skill index lives in .atl/skill-registry.md (generated by gentle-ai skill-registry refresh --force, never edited by hand). Before resolving skills for a project:
- If
.atl/skill-registry.md does not exist and gentle-ai is available, run gentle-ai skill-registry refresh --force once, then re-read the registry.
- Executors must NOT run that command mid-task: creating the registry is a setup/orchestrator action, not a delegation-time action.
- If the command is unavailable or still produces no registry, warn and proceed without project-specific skills.
2. New Project Mode
Only applies when the directory has NO project signal: it is empty, or only has .git or README.md. The flow:
Base convention (mandatory for every new project) — loaded for ALL project types, no question asked:
git — version control, conventional commits, branching, hooks. GitHub is the default remote/PR workflow; there is no separate github skill — the workflow lives in git (PRs, hooks, remotes) and deploy (GitHub Pages).
docs — README and changelog from day one.
package-manager — when the type produces a package.json (pnpm by default).
linting — ESLint (flat config) + Prettier, wired in the installation step.
Questionnaire — if the orchestrator already defined the stack in the delegation, follow it without asking; the questionnaire only applies in direct interaction with the user. One question at a time, in this order:
- What do you need to build? — choose the project type from the stack base table in section 1. Each row's description guides the choice:
- Static information, no interaction (brochure, portfolio) → Static native site
- Events, forms or fetch, no framework → Interactive native site
- Promotion with SEO and zero JS → Landing / marketing
- Content publishing (posts, docs) → Blog / content
- Single-page app with React components → SPA
- Full-stack React with type-safe routing, server functions, SSR/SSG → TanStack Start App
- Dynamic server data, auth, own API → SSR / fullstack app
- Panel with tables and global state → Dashboard / admin
- Catalog, cart, payments → E-commerce
- Language? — JavaScript or TypeScript (mandatory with frameworks; JavaScript by default for vanilla).
- Styles? — native CSS, Sass, Tailwind CSS or Bootstrap (native CSS by default). They are added to the selected type's stack base.
- Deploy? On which platform? — GitHub Pages, Vercel, Netlify, or no deploy. The platform is constrained by project type (see
### Deploy platform constraints below); choosing no deploy drops the deploy skill even if the type lists it.
- Optional skills? — pick extra skills from the optional pool that fit the scope (multi-select; in delegated mode derive them from the scope without asking).
Choose the stack base from the canonical table in section 1 (it includes the scaffolding command per type).
Style frameworks (Bootstrap, Tailwind CSS, Sass) are a transversal layer: they combine with any type and add their skill to the stack base (the questionnaire asks about them separately).
Optional skill pool
Extra skills that may or may not be loaded depending on the project's needs:
| Skill |
When to use |
Typical types |
api-design |
Own API or heavy client-server data |
SSR, Dashboard, E-commerce, SPA |
auth |
Users, roles, sessions |
SSR, Dashboard, E-commerce |
security |
Forms, sensitive data, server code |
SSR, Dashboard, E-commerce, Interactive |
state-management |
Shared global state |
SPA, Dashboard, E-commerce |
component-design |
Growing component library |
SPA, Dashboard |
graphql |
GraphQL API chosen |
SSR, SPA, Dashboard |
ddd · design-patterns · clean-code |
Quality/architecture depth (transversal) |
Any type |
testing |
Unit, integration, e2e testing |
Any type with tests |
tanstack-start |
TanStack Start framework chosen |
TanStack Start App |
tanstack-query |
TanStack Query for server state |
SPA, Dashboard, SSR, TanStack Start |
tanstack-router |
TanStack Router for routing |
SPA, TanStack Start |
accessibility and performance are quality floors: they appear in every type's stack base and are not optional. deploy is also in every stack base; it is the only base skill that can be dropped when the project has no deployment (see the questionnaire).
Deploy platform constraints
| Project type |
Deploy? |
Platforms |
| Static native site |
Optional (recommended) |
GH Pages · Netlify · Vercel |
| Interactive native site |
Optional (recommended) |
GH Pages · Netlify · Vercel |
| Landing / marketing |
Recommended |
Vercel · Netlify · GH Pages |
| Blog / content |
Recommended |
Vercel · Netlify · GH Pages |
| SPA |
Recommended |
Vercel · Netlify · GH Pages |
| TanStack Start App |
Required for production |
Vercel · Netlify — NOT GH Pages (static only) |
| SSR / fullstack app |
Required for production |
Vercel · Netlify — NOT GH Pages (static only) |
| Dashboard / admin |
Recommended |
Vercel · Netlify · GH Pages (if static) |
| E-commerce |
Required for production |
Vercel · Netlify — NOT GH Pages (static only) |
- Installation guide — based on the questionnaire answers:
- Run the scaffolding command for the chosen type (or create the manual structure if native, without bundler).
- Add the framework integrator when the type requires it (e.g.
npx astro add react for SPA with React).
- Install dependencies with
pnpm install (if there is a package.json).
- Configure linting: ESLint (flat config) + Prettier.
- Configure git hooks:
husky + lint-staged.
- Set up GitHub by convention:
git init with conventional commits, create the remote, push the initial branch; PR workflow from day one (see git skill).
- Create the initial folder structure according to the chosen stack.
- The injected skills of the stack base guide implementation details.
Minimal scaffolding (YAGNI): do not create filler files (empty index.js, .gitkeep); only create what the project needs now, not what it might need later; each folder must have at least one file with real content.
Stack discovery: in direct interaction, ask; in delegated mode, use the stack from the canonical table (section 1) or the one defined by the orchestrator — do not assume a framework, bundler or language outside this stack.
3. Architecture-First Thinking Flow
Do not write code until you have thought through the architecture. Follow this flow in order. This flow applies to work delegated by the orchestrator: you do not wait for intermediate confirmations or approvals — you implement, self-review, and report.
This flow targets executors that implement code (general, sdd-apply). Research and design executors (explore, sdd-design) apply sections 1, 2, 4, 5 and 8, and deliver their result without implementing.
- Understand the problem — summarize it in 1-2 sentences. If there is ambiguity in delegated mode: assumption — the doubt does not block: document it and continue with the most reasonable interpretation; risk — blocking or serious potential impact: report it to the orchestrator. Only in direct interaction with the user do you ask one single question.
- Choose the stack — new project → propose the stack according to the requirements; existing → use it as is, do not suggest stack changes unless the user asks for them.
- Design the structure — before writing code, define mentally:
📁 File structure → what files and where each thing goes
🧩 Component tree → what components and how they relate
📡 Data flow → local vs global vs server
🌐 Routing (if any) → routes, nested, protected
🚨 Errors and states → loading, empty, error, edge cases
📦 External dependencies → libraries, API endpoints, formats
Communicate the architecture — in at most 5 lines, at the start of the report to the orchestrator: "Stack: X | Components: A, B, C | Data: fetch from Y | State: Z". In direct interaction, wait for approval before implementing.
Implement incrementally — one file per internal step; implement the full batch without waiting for confirmation between files.
Self-review before the summary:
1. Does each created/modified file comply with the active skill's rules?
2. Is there orphan code, console.log, debugger or WIP/FIXME comments?
3. Does the structure respect the design defined in the design step of this flow?
4. Are there undeclared dependencies in package.json?
5. Was any anti-hallucination rule violated (APIs, files, data)?
6. Is the change minimal and surgical, without unnecessary refactor?
7. Does everything pass linting/typecheck?
8. Do the build and existing tests pass (if any)?
If the review finds problems → fix them and re-verify before presenting the summary. If it is clean → present the implementation summary to the user (or to the orchestrator in delegated mode), including assumptions, risks and skill_resolution.
4. Token Efficiency
Every token counts. Minimize output without sacrificing clarity. These rules apply to direct interaction with the user and, above all, to the final report to the orchestrator: the orchestrator aggregates reports from multiple executors, and padding costs tokens at every level.
- Ultra-compact reports by default — the report to the orchestrator follows the Result Contract (status, executive_summary, artifacts, next_recommended, risks, skill_resolution) with no padding: no courtesy phrases, no reintroductions, no repetitions. In direct interaction: simple problem → 1-3 lines, direct; knowledge question → direct answer without introduction.
- References instead of copying code — instead of rewriting a whole file, use
file.ts:15-30. If the user (or the orchestrator) asks to see the code, that's when you show it.
- Do not repeat context — do not repeat context the orchestrator already passed in the delegation; if it defined a direction, follow it without questioning it. The final closing report is mandatory, but compact: do not summarize what you already delivered in intermediate steps.
- One topic per message — do not mix analysis, implementation and suggestions; each answer (or report) resolves one thing.
- No code explanations — after writing code, do not explain what it does; only if asked "why?" or "how does it work?".
5. Anti-Hallucination
Inventing things is forbidden. Hard rules. In delegated mode you do not ask the user: you verify in the code or against the delegated scope (tasks/spec) and cite the evidence (file:line) in the report; if the doubt persists: assumption — it does not block: document it and continue with the most reasonable interpretation; risk — blocking or serious impact: report it to the orchestrator.
- Do not invent APIs — if you mention an endpoint, package, hook or library, make sure it exists (verify it in the code or in
package.json).
- Do not assume dependencies — do not import libraries that are not in
package.json. Verify first; if in doubt, documented assumption or risk.
- Do not assume configuration — if you do not see a stylesheet (
.css, <style>), do not assume there is CSS.
- Do not generate code that was not asked for — do not add extra features, validations, animations or improvements outside the delegated scope (tasks/spec).
- Do not invent files that do not exist — if the project is existing, only modify what exists; create new files only if the delegated scope requires them. If unclear, verify and document.
- Do not guess data structures — if you do not know an API's format, look for evidence in the code; if there is none, documented assumption or risk.
When in doubt: you do not know if a library exists → look in package.json or in the code; you do not know how a component works → read the file first; you do not know which route the API uses → look in the code; you do not know which style applies → inspect the existing CSS. If you cannot verify → documented assumption or risk to the orchestrator, never an invention. Without cited evidence, do not claim to have verified.
Alert signals: if you are about to use an API you have not seen in the code → stop and verify; to create a new file in an existing project → stop and verify against the scope; to modify a function you have not read completely → stop and read.
6. Behavior Summary
Executor behavior by situation. In delegated mode, authorizations (commit, push, merge) are handled by the orchestrator with the user; the executor does not decide on its own.
| Situation |
Action |
| First contact with the project |
Assume existing → detect project and stack (section 1) |
| New project |
Questionnaire (if applicable) → installation guide → steps (section 2) |
| Existing project |
Read configuration and patterns → surgical changes |
| Non-blocking ambiguity |
Document the assumption and continue with the most reasonable interpretation |
| Blocking ambiguity |
Report the risk to the orchestrator |
| Doubt about API/lib |
Verify in package.json or existing code, citing file:line |
| Doubt about structure |
Verify in the code; if it persists, assumption or risk |
| Impending hallucination |
Stop, verify, cite evidence or report the risk |
| High token output |
Reduce, reference, do not repeat (section 4) |
| Running commands |
In delegated mode, allowed as part of the task; in direct interaction, explain the plan and wait for confirmation |
| Commit / push |
Do NOT commit or push without explicit user authorization |
| Merge / Close PR |
Do NOT merge or close PRs without explicit user authorization |
| Documentation required |
Use the docs skill and generate README, JSDoc and changelog |
| Deploy required |
Use the deploy skill, guide per platform (Vercel, Netlify, GH Pages) |
| Configuration errors |
Activate diagnostic mode, detect the source and suggest the fix |
7. Diagnostic Mode
When the project has configuration errors, missing dependencies, or you cannot determine the state, activate the diagnostic flow:
1. Verify the project structure (package.json, src/, etc.)
2. Verify installed dependencies (node_modules, lockfile)
3. Verify configuration files (ESLint, Prettier, pnpm-workspace, etc.)
4. Verify git state (branch, uncommitted changes, upstream)
5. Look for recent error logs or terminal messages
6. If the doubt persists → report to the orchestrator with concrete options (in direct interaction, ask the user)
In delegated mode, running the fix commands (install, build, tests) is part of the task; in direct interaction, ask permission before running them.
Common symptoms:
| Symptom |
Possible cause |
Action |
| ESLint does not apply rules |
Flat config vs legacy .eslintrc |
Migrate to eslint.config.js (see linting skill) |
| Prettier does not format |
Missing config or ESLint conflict |
Create .prettierrc and add eslint-config-prettier |
| Styles are not applied |
<link rel="stylesheet"> missing or wrong href |
Verify the <link> and the CSS file path |
| Build fails with module error |
Dependency not installed |
Run pnpm install and verify package.json |
| Git hook does not run |
Husky not installed or .husky/ corrupted |
Reinstall husky: pnpm exec husky init |
8. Monorepo Awareness
When a monorepo is detected (pnpm-workspace.yaml or workspaces in package.json), apply these additional rules:
Detection: pnpm-workspace.yaml → pnpm workspace; workspaces in package.json → npm/yarn workspaces.
Rules: (1) scan each package as an independent project, detecting its individual stack (section 1); (2) share skills between packages — a loaded skill applies to the whole workspace, it is not duplicated; (3) the package-manager skill guides orchestration between packages (scripts, shared dependencies); (4) the root scripts (dev, build, lint, test) are the main ones — each package's are secondary; (5) do not mix stacks within the same monorepo unless it is an explicit project decision; (6) shared dependencies go at the root (devDependencies of the workspace root).
Execution priority:
1. Identify the workspace root and its structure
2. List all packages
3. For each package: detect stack
4. Consolidate skills (no duplicates)
5. Run from the root (scripts, builds, tests)
9. Skill Reference
The full skill index with paths and dependencies lives in .atl/skill-registry.md (generated with gentle-ai skill-registry refresh --force). This document does not duplicate that index.
Last updated: 2026-08
1---2name: frontend-skill3description: Frontend engineering standards for the frontend-skill. Inject into delegated executors (general, explore, sdd-apply, sdd-design) when the task touches frontend code. Covers stack detection, architecture-first, anti-hallucination and token efficiency, and defines the workflow and loading of injected skills.4---56# Frontend Engineering Standards — frontend-skill78## How to use this document910This document defines behavior standards for **executors** working on frontend code. You were loaded because your task touches this stack; follow this flow:11121. **Load the injected skills** — follow the skill-loading rules (section 1, `### Skill loading`). Read them BEFORE touching code.132. **Detect project and stack** (section 1) — assume an existing project.143. **If there is no project**, run the questionnaire and the installation guide (section 2).154. **Work architecture-first** (section 3) and implement step by step.165. **At the end**, report `skill_resolution` with the loading result.1718## 1. Project and Stack Detection1920**Assume the directory is an existing project.** This is the default case when the orchestrator delegates work. Only if there is NO project signal (empty directory, or only `.git` or `README.md`) go to section 2 (New Project Mode).2122- **Scan the structure** — `src/`, `app/`, `components/`, `pages/`, `lib/`, etc.23- **Read configuration files** (priority order):2425```text26package.json → npm/pnpm, scripts, dependencies27vite.config.* → Vite (dev server, build, plugins)28astro.config.* → Astro (output, integrations, adapters)29.next.config.* → Next.js (App Router, output, images, fonts)30.next.config.* → Next.js (App Router, output, images, fonts)31.eslintrc* → ESLint32eslint.config.* → ESLint (flat config)33.prettierrc* → Prettier34pnpm-workspace.yaml → pnpm workspace (monorepo)35.husky/ → Husky (git hooks)36typedoc.config.* → TypeDoc37vercel.json → Vercel38netlify.toml → Netlify39```4041- **Analyze `package.json`**:4243```text441. Read `dependencies` and `devDependencies`452. Find package manager: "pnpm", "npm"463. Find bundler: "vite", "webpack", "rollup", "next", "astro"474. Find linting: "eslint", "prettier", "stylelint"485. Find git hooks: "husky", "lint-staged", "commitlint"496. Find monorepo: "workspaces", "pnpm-workspace.yaml"507. Find documentation: "typedoc", "jsdoc"518. Find deploy: "vercel", "netlify-cli", "gh-pages"529. Find testing: "vitest", "playwright", "@testing-library"53```5455- **Identify** framework/bundler, main libraries, patterns, tests/linting.5657### Default stack when no configuration is found5859When no configuration files are detected, identify the project type from code signals and use its stack base:6061The taxonomy below is the single source of truth for project types and their stack base. `scripts/detect-stack.sh` mirrors it in machine-readable form; update both together.6263| Project type | Description | Signals | Stack base (skills) | Scaffolding |64| ----------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |65| Static native site | Static information, no interaction: brochure, simple portfolio | `index.html` + `styles.css`, no JS or bundler | `html` + `css` + `accessibility` + `performance` + `deploy` | manual structure (no bundler) |66| Interactive native site | HTML + CSS + vanilla JS: events, DOM, fetch, forms | `index.html` + `script.js` with events/`fetch`/forms, no framework | `html` + `css` + `javascript` + `accessibility` + `performance` + `deploy` | manual structure (no bundler) |67| Landing / marketing | SSG with zero JS by default, SEO and a11y | `.astro` without islands, SEO/meta, zero JS by default | `astro` (+ `html`, `css`, `javascript`, `typescript`, `package-manager`) + `accessibility` + `performance` + `deploy` | `pnpm create astro@latest` |68| Blog / content | Content collections + MDX, content publishing | `.astro` + `src/content/`, `.md`/`.mdx` | `astro` (+ `html`, `css`, `javascript`, `typescript`, `package-manager`) + `accessibility` + `performance` + `docs` + `deploy` | `pnpm create astro@latest` |69| SPA | Single-page app with islands (`client:load`) and view transitions | `.astro` + islands (`client:load`), React components | `astro` + `reactjs` + `component-design` + `state-management` + `typescript` + `accessibility` + `performance` + `deploy` | `pnpm create astro@latest` |70| TanStack Start App | Full-stack React with type-safe routing, server functions, SSR/SSG | `vinxi.config.ts` + `routes/`, TanStack Router + Query + Start | `tanstack-start` (+ `reactjs`, `typescript`, `javascript`, `html`, `css`, `testing`) + `accessibility` + `performance` + `deploy` | `npx create-tanstack-app@latest --framework=react --template=start` |71| SSR / fullstack app | Server Components, Server Actions, server-side data | `next.config.*` + `app`/`pages`, Server Components | `nextjs` (+ `reactjs`, `html`, `css`, `javascript`, `typescript`) + `api-design` + `auth` + `security` + `state-management` + `accessibility` + `performance` + `deploy` | `pnpm create next-app@latest` |72| Dashboard / admin | Panel with auth, tables, global state | `vite.config.*` + `.tsx`, tables, global state | `vite` + `reactjs` (+ `html`, `css`, `javascript`, `typescript`) + `component-design` + `state-management` + `api-design` + `auth` + `security` + `accessibility` + `performance` + `deploy` | `pnpm create vite@latest` (react-ts) |73| E-commerce | Catalog + auth + payments, critical perf and a11y | `next.config.*` + `app/`, auth + payments | `nextjs` (+ `reactjs`, `html`, `css`, `javascript`, `typescript`) + `auth` + `security` + `api-design` + `performance` + `accessibility` + `deploy` | `pnpm create next-app@latest` |7475**No stack signals in the code** → assume the simplest (static native / vanilla). When in doubt, do not assume vanilla or framework: in direct interaction, ask; in delegated mode, document it as an assumption.7677**Refinements del detector** (`scripts/detect-stack.sh`): además de los 9 tipos de la tabla, emite `monorepo` (unión de los stack base de los paquetes del workspace) y `unknown` (sin señales). Un proyecto Vite sin React/TSX (Vite vanilla) se clasifica como `static`/`interactive` y conserva `vite` en su stack base.7879### Existing project rules8081(1) do not rewrite whole files — surgical changes; (2) respect existing patterns — if they use `pages/`, do not propose `app/`; (3) do not reformat the whole file — only what is needed (unless there is a linter); (4) only install dependencies or change the folder structure if the delegated scope requires it — if unclear, documented assumption or risk; (5) do not migrate technologies without explicit permission.8283### Skill loading8485Do not auto-load skills or decide priorities. Rules:86871. Load ONLY the injected skills under `## Skills to load before work` in your prompt.882. If a skill references another, follow the reference only if it is a direct dependency declared in the skill itself.893. Do not invent skills or paths.9091### Skill registry bootstrap9293The skill index lives in `.atl/skill-registry.md` (generated by `gentle-ai skill-registry refresh --force`, never edited by hand). Before resolving skills for a project:94951. If `.atl/skill-registry.md` does not exist and `gentle-ai` is available, run `gentle-ai skill-registry refresh --force` once, then re-read the registry.962. Executors must NOT run that command mid-task: creating the registry is a setup/orchestrator action, not a delegation-time action.973. If the command is unavailable or still produces no registry, warn and proceed without project-specific skills.9899## 2. New Project Mode100101Only applies when the directory has NO project signal: it is empty, or only has `.git` or `README.md`. The flow:102103- **Base convention (mandatory for every new project)** — loaded for ALL project types, no question asked:104 - `git` — version control, conventional commits, branching, hooks. GitHub is the default remote/PR workflow; there is no separate `github` skill — the workflow lives in `git` (PRs, hooks, remotes) and `deploy` (GitHub Pages).105 - `docs` — README and changelog from day one.106 - `package-manager` — when the type produces a `package.json` (pnpm by default).107 - `linting` — ESLint (flat config) + Prettier, wired in the installation step.108109- **Questionnaire** — if the orchestrator already defined the stack in the delegation, follow it without asking; the questionnaire only applies in direct interaction with the user. One question at a time, in this order:110 - **What do you need to build?** — choose the project type from the stack base table in section 1. Each row's description guides the choice:111 - Static information, no interaction (brochure, portfolio) → Static native site112 - Events, forms or fetch, no framework → Interactive native site113 - Promotion with SEO and zero JS → Landing / marketing114 - Content publishing (posts, docs) → Blog / content115 - Single-page app with React components → SPA116 - Full-stack React with type-safe routing, server functions, SSR/SSG → TanStack Start App117 - Dynamic server data, auth, own API → SSR / fullstack app118 - Panel with tables and global state → Dashboard / admin119 - Catalog, cart, payments → E-commerce120 - **Language?** — JavaScript or TypeScript (mandatory with frameworks; JavaScript by default for vanilla).121 - **Styles?** — native CSS, Sass, Tailwind CSS or Bootstrap (native CSS by default). They are added to the selected type's stack base.122 - **Deploy? On which platform?** — GitHub Pages, Vercel, Netlify, or no deploy. The platform is constrained by project type (see `### Deploy platform constraints` below); choosing no deploy drops the `deploy` skill even if the type lists it.123 - **Optional skills?** — pick extra skills from the optional pool that fit the scope (multi-select; in delegated mode derive them from the scope without asking).124125- **Choose the stack base** from the canonical table in section 1 (it includes the scaffolding command per type).126127Style frameworks (Bootstrap, Tailwind CSS, Sass) are a transversal layer: they combine with any type and add their skill to the stack base (the questionnaire asks about them separately).128129### Optional skill pool130131Extra skills that may or may not be loaded depending on the project's needs:132133| Skill | When to use | Typical types |134| ---------------------------------------- | ---------------------------------------- | --------------------------------------- |135| `api-design` | Own API or heavy client-server data | SSR, Dashboard, E-commerce, SPA |136| `auth` | Users, roles, sessions | SSR, Dashboard, E-commerce |137| `security` | Forms, sensitive data, server code | SSR, Dashboard, E-commerce, Interactive |138| `state-management` | Shared global state | SPA, Dashboard, E-commerce |139| `component-design` | Growing component library | SPA, Dashboard |140| `graphql` | GraphQL API chosen | SSR, SPA, Dashboard |141| `ddd` · `design-patterns` · `clean-code` | Quality/architecture depth (transversal) | Any type |142| `testing` | Unit, integration, e2e testing | Any type with tests |143| `tanstack-start` | TanStack Start framework chosen | TanStack Start App |144| `tanstack-query` | TanStack Query for server state | SPA, Dashboard, SSR, TanStack Start |145| `tanstack-router` | TanStack Router for routing | SPA, TanStack Start |146147`accessibility` and `performance` are quality floors: they appear in **every** type's stack base and are not optional. `deploy` is also in every stack base; it is the only base skill that can be dropped when the project has no deployment (see the questionnaire).148149### Deploy platform constraints150151| Project type | Deploy? | Platforms |152| ----------------------- | ----------------------- | --------------------------------------------- |153| Static native site | Optional (recommended) | GH Pages · Netlify · Vercel |154| Interactive native site | Optional (recommended) | GH Pages · Netlify · Vercel |155| Landing / marketing | Recommended | Vercel · Netlify · GH Pages |156| Blog / content | Recommended | Vercel · Netlify · GH Pages |157| SPA | Recommended | Vercel · Netlify · GH Pages |158| TanStack Start App | Required for production | Vercel · Netlify — NOT GH Pages (static only) |159| SSR / fullstack app | Required for production | Vercel · Netlify — NOT GH Pages (static only) |160| Dashboard / admin | Recommended | Vercel · Netlify · GH Pages (if static) |161| E-commerce | Required for production | Vercel · Netlify — NOT GH Pages (static only) |162163- **Installation guide** — based on the questionnaire answers:164 - Run the scaffolding command for the chosen type (or create the manual structure if native, without bundler).165 - Add the framework integrator when the type requires it (e.g. `npx astro add react` for SPA with React).166 - Install dependencies with `pnpm install` (if there is a `package.json`).167 - Configure linting: ESLint (flat config) + Prettier.168 - Configure git hooks: `husky` + `lint-staged`.169 - Set up GitHub by convention: `git init` with conventional commits, create the remote, push the initial branch; PR workflow from day one (see `git` skill).170 - Create the initial folder structure according to the chosen stack.171 - The injected skills of the stack base guide implementation details.172173**Minimal scaffolding** (YAGNI): do not create filler files (empty `index.js`, `.gitkeep`); only create what the project needs **now**, not what it might need later; each folder must have at least one file with real content.174175**Stack discovery**: in direct interaction, ask; in delegated mode, use the stack from the canonical table (section 1) or the one defined by the orchestrator — do not assume a framework, bundler or language outside this stack.176177## 3. Architecture-First Thinking Flow178179**Do not write code until you have thought through the architecture.** Follow this flow in order. This flow applies to work delegated by the orchestrator: you do not wait for intermediate confirmations or approvals — you implement, self-review, and report.180181This flow targets executors that implement code (general, sdd-apply). Research and design executors (explore, sdd-design) apply sections 1, 2, 4, 5 and 8, and deliver their result without implementing.182183- **Understand the problem** — summarize it in 1-2 sentences. If there is ambiguity in delegated mode: **assumption** — the doubt does not block: document it and continue with the most reasonable interpretation; **risk** — blocking or serious potential impact: report it to the orchestrator. Only in direct interaction with the user do you ask **one single question**.184- **Choose the stack** — new project → propose the stack according to the requirements; existing → use it as is, do not suggest stack changes unless the user asks for them.185- **Design the structure** — before writing code, define mentally:186187```text188📁 File structure → what files and where each thing goes189🧩 Component tree → what components and how they relate190📡 Data flow → local vs global vs server191🌐 Routing (if any) → routes, nested, protected192🚨 Errors and states → loading, empty, error, edge cases193📦 External dependencies → libraries, API endpoints, formats194```195196- **Communicate the architecture** — in **at most 5 lines**, at the start of the report to the orchestrator: "Stack: X | Components: A, B, C | Data: fetch from Y | State: Z". In direct interaction, wait for approval before implementing.197- **Implement incrementally** — one file per internal step; implement the full batch without waiting for confirmation between files.198199- **Self-review before the summary**:200201```text2021. Does each created/modified file comply with the active skill's rules?2032. Is there orphan code, console.log, debugger or WIP/FIXME comments?2043. Does the structure respect the design defined in the design step of this flow?2054. Are there undeclared dependencies in package.json?2065. Was any anti-hallucination rule violated (APIs, files, data)?2076. Is the change minimal and surgical, without unnecessary refactor?2087. Does everything pass linting/typecheck?2098. Do the build and existing tests pass (if any)?210```211212If the review finds problems → fix them and re-verify before presenting the summary. If it is clean → present the implementation summary to the user (or to the orchestrator in delegated mode), including assumptions, risks and `skill_resolution`.213214## 4. Token Efficiency215216Every token counts. Minimize output without sacrificing clarity. These rules apply to direct interaction with the user and, above all, to the final report to the orchestrator: the orchestrator aggregates reports from multiple executors, and padding costs tokens at every level.2172181. **Ultra-compact reports by default** — the report to the orchestrator follows the Result Contract (status, executive_summary, artifacts, next_recommended, risks, skill_resolution) with no padding: no courtesy phrases, no reintroductions, no repetitions. In direct interaction: simple problem → 1-3 lines, direct; knowledge question → direct answer without introduction.2192. **References instead of copying code** — instead of rewriting a whole file, use `file.ts:15-30`. If the user (or the orchestrator) asks to see the code, that's when you show it.2203. **Do not repeat context** — do not repeat context the orchestrator already passed in the delegation; if it defined a direction, follow it without questioning it. The final closing report is mandatory, but compact: do not summarize what you already delivered in intermediate steps.2214. **One topic per message** — do not mix analysis, implementation and suggestions; each answer (or report) resolves **one thing**.2225. **No code explanations** — after writing code, do not explain what it does; only if asked "why?" or "how does it work?".223224## 5. Anti-Hallucination225226Inventing things is forbidden. Hard rules. In delegated mode **you do not ask the user**: you verify in the code or against the delegated scope (tasks/spec) and cite the evidence (`file:line`) in the report; if the doubt persists: **assumption** — it does not block: document it and continue with the most reasonable interpretation; **risk** — blocking or serious impact: report it to the orchestrator.2272281. **Do not invent APIs** — if you mention an endpoint, package, hook or library, make sure it exists (verify it in the code or in `package.json`).2292. **Do not assume dependencies** — do not import libraries that are not in `package.json`. Verify first; if in doubt, documented assumption or risk.2303. **Do not assume configuration** — if you do not see a stylesheet (`.css`, `<style>`), do not assume there is CSS.2314. **Do not generate code that was not asked for** — do not add extra features, validations, animations or improvements outside the delegated scope (tasks/spec).2325. **Do not invent files that do not exist** — if the project is existing, only modify what exists; create new files only if the delegated scope requires them. If unclear, verify and document.2336. **Do not guess data structures** — if you do not know an API's format, look for evidence in the code; if there is none, documented assumption or risk.234235**When in doubt**: you do not know if a library exists → look in `package.json` or in the code; you do not know how a component works → read the file first; you do not know which route the API uses → look in the code; you do not know which style applies → inspect the existing CSS. If you cannot verify → documented assumption or risk to the orchestrator, never an invention. Without cited evidence, do not claim to have verified.236237**Alert signals**: if you are about to use an API you have not seen in the code → **stop and verify**; to create a new file in an existing project → **stop and verify against the scope**; to modify a function you have not read completely → **stop and read**.238239## 6. Behavior Summary240241Executor behavior by situation. In delegated mode, authorizations (commit, push, merge) are handled by the orchestrator with the user; the executor does not decide on its own.242243| Situation | Action |244| ------------------------------ | ----------------------------------------------------------------------------------------------------------------- |245| First contact with the project | Assume existing → detect project and stack (section 1) |246| New project | Questionnaire (if applicable) → installation guide → steps (section 2) |247| Existing project | Read configuration and patterns → surgical changes |248| Non-blocking ambiguity | Document the assumption and continue with the most reasonable interpretation |249| Blocking ambiguity | Report the risk to the orchestrator |250| Doubt about API/lib | Verify in `package.json` or existing code, citing `file:line` |251| Doubt about structure | Verify in the code; if it persists, assumption or risk |252| Impending hallucination | Stop, verify, cite evidence or report the risk |253| High token output | Reduce, reference, do not repeat (section 4) |254| Running commands | In delegated mode, allowed as part of the task; in direct interaction, explain the plan and wait for confirmation |255| Commit / push | Do **NOT** commit or push without explicit user authorization |256| Merge / Close PR | Do **NOT** merge or close PRs without explicit user authorization |257| Documentation required | Use the `docs` skill and generate README, JSDoc and changelog |258| Deploy required | Use the `deploy` skill, guide per platform (Vercel, Netlify, GH Pages) |259| Configuration errors | Activate diagnostic mode, detect the source and suggest the fix |260261## 7. Diagnostic Mode262263When the project has configuration errors, missing dependencies, or you cannot determine the state, activate the diagnostic flow:264265```text2661. Verify the project structure (package.json, src/, etc.)2672. Verify installed dependencies (node_modules, lockfile)2683. Verify configuration files (ESLint, Prettier, pnpm-workspace, etc.)2694. Verify git state (branch, uncommitted changes, upstream)2705. Look for recent error logs or terminal messages2716. If the doubt persists → report to the orchestrator with concrete options (in direct interaction, ask the user)272```273274In delegated mode, running the fix commands (install, build, tests) is part of the task; in direct interaction, ask permission before running them.275276**Common symptoms**:277278| Symptom | Possible cause | Action |279| ----------------------------- | ------------------------------------------------- | ----------------------------------------------------- |280| ESLint does not apply rules | Flat config vs legacy `.eslintrc` | Migrate to `eslint.config.js` (see `linting` skill) |281| Prettier does not format | Missing config or ESLint conflict | Create `.prettierrc` and add `eslint-config-prettier` |282| Styles are not applied | `<link rel="stylesheet">` missing or wrong `href` | Verify the `<link>` and the CSS file path |283| Build fails with module error | Dependency not installed | Run `pnpm install` and verify `package.json` |284| Git hook does not run | Husky not installed or `.husky/` corrupted | Reinstall husky: `pnpm exec husky init` |285286## 8. Monorepo Awareness287288When a monorepo is detected (`pnpm-workspace.yaml` or `workspaces` in `package.json`), apply these additional rules:289290**Detection**: `pnpm-workspace.yaml` → pnpm workspace; `workspaces` in `package.json` → npm/yarn workspaces.291292**Rules**: (1) scan each package as an independent project, detecting its individual stack (section 1); (2) share skills between packages — a loaded skill applies to the whole workspace, it is not duplicated; (3) the `package-manager` skill guides orchestration between packages (scripts, shared dependencies); (4) the root scripts (`dev`, `build`, `lint`, `test`) are the main ones — each package's are secondary; (5) do not mix stacks within the same monorepo unless it is an explicit project decision; (6) shared dependencies go at the root (`devDependencies` of the workspace root).293294**Execution priority**:295296```text2971. Identify the workspace root and its structure2982. List all packages2993. For each package: detect stack3004. Consolidate skills (no duplicates)3015. Run from the root (scripts, builds, tests)302```303304## 9. Skill Reference305306The full skill index with paths and dependencies lives in `.atl/skill-registry.md` (generated with `gentle-ai skill-registry refresh --force`). This document does not duplicate that index.307308---309310Last updated: 2026-08