Skip to content

Commit 4ae9edb

Browse files
refactor(ai): consolidate skills structure and simplify agent contexts
- Consolidate 19 skills down to 13 cohesive skills. - Extract common patterns into global rules and shared references. - Merge theming tools into a single 'theme' skill. - Rename create-* component skills for better grouping. - Make 'module-scaffold' the primary orchestrator instead of 'create-module'. - Update 'ai:sync' in package.json to perform clean copies.
1 parent 622726b commit 4ae9edb

41 files changed

Lines changed: 693 additions & 1052 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.ai/agents/architect.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,19 @@ Analyze the user's request and produce a concrete, layered implementation plan.
2020

2121
1. Load the relevant skills via the `skill` tool before planning:
2222

23-
- For new modules: load `create-module`, `layer-domain`, `layer-infrastructure`, `layer-application`, `layer-ui`, `navigation`
24-
- For UI work: load `create-core-component`, `create-layout-component`, `create-form-component`
25-
- For forms: load `form-handling`, `layer-domain`
23+
- For new modules: load `module-scaffold`, `layer-domain`, `layer-infrastructure`, `layer-application`, `layer-ui`, `navigation`
24+
- For UI work: load `component-core`, `component-layout`, `component-form`
25+
- For forms: load `layer-ui`, `layer-domain`
2626
- For navigation: load `navigation`
2727
- For state/queries: load `layer-application`
28-
- Always load `third-party-libraries` to validate library choices
2928

3029
2. Produce a structured plan with:
3130

3231
- **Summary**: what will be built and why
3332
- **Affected layers**: domain / infrastructure / application / ui / navigation / config
3433
- **Files to create or modify** (exact paths using kebab-case)
3534
- **Contracts**: interfaces, types, repository methods, query keys
36-
- **Library choices**: justified against `third-party-libraries` skill
35+
- **Library choices**: justified against rules/dependencies.md
3736
- **Registration checklist**: query keys, API routes, navigation, index exports
3837
- **Verification**: commands to run after implementation (`bun run lint`, `bun run typecheck`, `bun run test`)
3938

‎.ai/agents/code-reviewer.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Review code for correctness, architecture compliance, and project standards. You
2828

2929
Load the following skills via the `skill` tool:
3030

31-
- `third-party-libraries` — verify no forbidden primitives are used
31+
- rules/dependencies.md — verify no forbidden primitives are used
3232
- `layer-domain`, `layer-infrastructure`, `layer-application`, `layer-ui` — verify layer boundaries
33-
- Load specific skills based on what is being reviewed (e.g., `create-core-component` for component reviews, `form-handling` for form reviews)
33+
- Load specific skills based on what is being reviewed (e.g., `component-core` for component reviews, `layer-ui` for form reviews)
3434

3535
## What you check
3636

‎.ai/agents/module-builder.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ Canonical rules: [index rules](../rules/index.md) (architecture, error-handling,
2424

2525
Load ALL relevant skills via the `skill` tool based on what is being built:
2626

27-
- **Full module**: `create-module`, `layer-domain`, `layer-infrastructure`, `layer-application`, `layer-ui`, `navigation`, `third-party-libraries`
27+
- **Full module**: `module-scaffold`, `layer-domain`, `layer-infrastructure`, `layer-application`, `layer-ui`, `navigation`
2828
- **Domain only**: `layer-domain`
2929
- **Infrastructure only**: `layer-infrastructure`
3030
- **Application only**: `layer-application`
31-
- **UI only**: `layer-ui`, `create-core-component` or `create-layout-component` or `create-form-component` as needed
31+
- **UI only**: `layer-ui` (covers forms and filtered lists via internal references)
32+
- For new core/form/layout **components**: also load `component-core`, `component-form`, or `component-layout`
3233
- **Navigation only**: `navigation`
33-
- **Forms**: `form-handling`, `layer-domain`
34-
- **Core/network changes**: `core-module` or `network-module`
35-
- Always load `third-party-libraries`
34+
- **Forms**: `layer-ui`, `layer-domain` (`layer-ui` contains the form-flow pattern)
35+
- **Filtered list**: `layer-ui` (contains the layer-ui pattern)
36+
- **Core/network changes**: consult `rules/core-network.md` — no dedicated skill needed
37+
- **Theme/styles**: `theme`
3638

3739
## Implementation order (full module)
3840

‎.ai/agents/planner.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ Determina qué categoría(s) aplica:
4141
| ------------------------------- | --------------------------------------------- | --------------------------------------------------------------------------- |
4242
| **Módulo nuevo** | Nueva entidad con CRUD completo | `module-builder` → `architect` primero |
4343
| **Feature en módulo existente** | Agregar campos, endpoints, pantallas | `architect` → `module-builder` parcial |
44-
| **Componente UI** | Nuevo componente genérico reutilizable | `create-core-component`, `create-layout-component`, `create-form-component` |
45-
| **Formulario** | Pantalla de creación/edición | `form-handling` skill |
44+
| **Componente UI** | Nuevo componente genérico reutilizable | `component-core`, `component-layout`, `component-form` |
45+
| **Formulario** | Pantalla de creación/edición | `layer-ui` skill |
4646
| **Navegación** | Registrar rutas, stacks, hooks | `navigation` skill |
4747
| **Tests** | Cobertura para código existente | `test-writer` |
4848
| **Bug / Error** | Runtime, TypeScript, build | `debugger` |
4949
| **Review** | Validar implementación existente | `code-reviewer` |
50-
| **Tema / Estilos** | Tokens, style factories, animaciones | `create-styles`, `create-theme-token` |
50+
| **Tema / Estilos** | Tokens, style factories, animaciones | `theme`, `theme` |
5151
| **Provider** | Nueva infraestructura transversal | `create-provider` skill |
5252
| **Refactor** | Cambios estructurales sin funcionalidad nueva | `code-reviewer` → implementar manualmente |
5353

‎.ai/commands/add-backend.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Steps:
1515
1. Locate the module and its `{entity}.service.ts` factory.
1616
2. Load skills:
1717
- `layer-infrastructure` — for service implementation templates and error mapper patterns
18-
- `third-party-libraries` — to verify no prohibited libraries are introduced in the new provider
1918
3. Create `{entity}.{provider}.service.ts` implementing the domain repository
2019
interface — services return `Promise<T | Error>` and never throw.
2120
4. Normalize failures with the matching mapper (`manageAxiosError`,
@@ -26,7 +25,7 @@ Steps:
2625
After implementing the provider, run the dependency audit:
2726
```bash
2827
# Note: Replace <AGENT_DIR> with your active agent directory (e.g., .agents, .opencode, .claude)
29-
./<AGENT_DIR>/skills/third-party-libraries/scripts/audit-deps.sh src/modules/<module>/
28+
./<AGENT_DIR>/scripts/audit-deps.sh src/modules/<module>/
3029
```
3130

3231
Do not force provider parity — add only the requested provider.

‎.ai/commands/check-rules.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Delegate to the `code-reviewer` subagent (read-only). It MUST:
1010

1111
1. Inspect the diff (`git status`, `git diff`).
1212
2. Load the following skills and rules before reviewing:
13-
- Skills: `third-party-libraries` (library policy checks), `layer-domain` (service contracts), `layer-application` (query keys, store access patterns)
13+
- Skills: `layer-domain` (service contracts), `layer-application` (query keys, store access patterns)
1414
- Rules: [rules/index.md](../rules/index.md), [rules/architecture.md](../rules/architecture.md), [rules/error-handling.md](../rules/error-handling.md), [rules/dependencies.md](../rules/dependencies.md)
1515

1616
Also run the automated dependency audit as part of the review:
1717
```bash
1818
# Note: Replace <AGENT_DIR> with your active agent directory (e.g., .agents, .opencode, .claude)
19-
./<AGENT_DIR>/skills/third-party-libraries/scripts/audit-deps.sh
19+
./<AGENT_DIR>/scripts/audit-deps.sh
2020
```
2121
3. Check, at minimum:
2222
- Layer boundaries (`domain` imports nothing outward).

‎.ai/commands/initialize.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ agent: build
44
---
55

66
Skills to load:
7-
- `third-party-libraries` — to verify the project's dependency stack is correctly configured
8-
- `core-module` — to understand the global state and permissions setup being validated
7+
98

109
Usa @TEMPLATE_USAGE.md como checklist oficial.
1110

‎.ai/commands/new-module.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Canonical rules: [index rules](../rules/index.md) — especially `1. Architectur
1111
Reference module to copy: `src/modules/products`.
1212

1313
Delegate the implementation to the `module-builder` subagent. It MUST load the
14-
relevant skills (`create-module`, `layer-domain`, `layer-infrastructure`,
14+
relevant skills (`module-scaffold`, `layer-domain`, `layer-infrastructure`,
1515
`layer-application`, `layer-ui`, `navigation`) before writing code.
1616

1717
Steps:

‎.ai/commands/new-screen.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Honor:
1818
`{Entity}Form` owns `useForm`, fields, and `handleSubmit`.
1919

2020
Load skills:
21-
- Always: `layer-ui`, `components-gallery` (for component usage reference)
22-
- For form screens: also load `form-handling`
23-
- For filtered list screens: also load `list-view-with-filters`
21+
- Always: `layer-ui` (for component usage reference)
22+
- For form screens: also load `layer-ui`
23+
- For filtered list screens: also load `layer-ui`
2424
- If the screen requires a **new route** (not yet in the module's navigator): also load `navigation`
2525

2626
Finish with `bun run lint`, `bun run typecheck`, `bun run test`.

.ai/skills/components-gallery/references/core-components.md renamed to .ai/references/components-gallery/core-components.md

File renamed without changes.

0 commit comments

Comments
 (0)