@ancleto/spec 0.7.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -9
- package/agents/orchestrator.md +8 -0
- package/commands/cleto-security.md +7 -0
- package/commands/cleto-transplant.md +30 -0
- package/package.json +2 -1
- package/profiles/test/agents/reviewer.md +35 -0
- package/profiles/test/agents/tester.md +68 -0
- package/profiles/test/commands/cleto-test-apply.md +10 -0
- package/profiles/test/commands/cleto-test-archive.md +9 -0
- package/profiles/test/commands/cleto-test-coverage.md +10 -0
- package/profiles/test/commands/cleto-test-heal.md +10 -0
- package/profiles/test/commands/cleto-test-proposal.md +10 -0
- package/profiles/test/templates/AGENTS.md +14 -0
- package/skills/ancleto-security/SKILL.md +40 -0
- package/src/cli/index.js +734 -35
package/README.md
CHANGED
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
- [Referencia de comandos CLI](#referencia-de-comandos-cli)
|
|
32
32
|
- [Motor de memoria persistente](#motor-de-memoria-persistente)
|
|
33
33
|
- [Comandos del ciclo SDD en tu IDE](#comandos-del-ciclo-sdd-en-tu-ide)
|
|
34
|
+
- [Perfil de test automation](#perfil-de-test-automation)
|
|
35
|
+
- [Portabilidad entre máquinas](#portabilidad-entre-máquinas)
|
|
34
36
|
- [Azure DevOps (opcional)](#azure-devops-opcional)
|
|
35
37
|
- [Referencia: agentes y modelos por tier](#referencia-agentes-y-modelos-por-tier)
|
|
36
38
|
|
|
@@ -74,6 +76,12 @@ Ancleto resuelve esto centralizando las reglas de negocio en un motor de memoria
|
|
|
74
76
|
|
|
75
77
|
**Wizard interactivo** — Banner animado y menús navegables con flechas en `init` e `install`, sin librerías pesadas.
|
|
76
78
|
|
|
79
|
+
**Hosts e IDEs (7)** — opencode, claude, vscode, antigravity, cursor, roo y copilot, cada uno con su layout nativo (Copilot: prompts en `.github/prompts` + MCP en `copilot-mcp.json`).
|
|
80
|
+
|
|
81
|
+
**Perfil de test automation** — `--profile test`: tester ampliado (planning/generation/healing/coverage), comandos `cleto-test-*` y estructura `testspec/` para proyectos Playwright.
|
|
82
|
+
|
|
83
|
+
**Portabilidad entre máquinas** — `ancleto export`/`import` mudan el proyecto regenerando el MCP local (`import --repair` repara rutas rotas sin bundle).
|
|
84
|
+
|
|
77
85
|
---
|
|
78
86
|
|
|
79
87
|
## Requisitos
|
|
@@ -138,24 +146,49 @@ del host (el CLI no deduplica ni elige un "ganador").
|
|
|
138
146
|
| `opencode` (default) | `.opencode/skills/<n>/SKILL.md` | `.opencode/agents/<n>.md` | `.opencode/commands/<n>.md` |
|
|
139
147
|
| `claude` | `.claude/skills/<n>/SKILL.md` | `.claude/agents/<n>.md` (adaptado) | `.claude/commands/<n>.md` |
|
|
140
148
|
| `vscode` (VS Code / Copilot) | `.github/skills/<n>/SKILL.md` | `.github/agents/<n>.agent.md` | `.github/prompts/<n>.prompt.md` |
|
|
141
|
-
| `antigravity` | `.agents/skills/<n>/SKILL.md` |
|
|
149
|
+
| `antigravity` | `.agents/skills/<n>/SKILL.md` | `.agents/agents/<n>.md` (adaptado) | `.agents/skills/<n>/SKILL.md` (como skill) |
|
|
142
150
|
| `cursor` | `.cursor/skills/<n>/SKILL.md` | — | — |
|
|
143
151
|
| `roo` | `.roo/skills/<n>/SKILL.md` | — | — |
|
|
152
|
+
| `copilot` | — | `.github/prompts/<n>.prompt.md` | `.github/prompts/<n>.prompt.md` |
|
|
144
153
|
|
|
145
154
|
Cada host recibe sus skills en **su** directorio nativo. **`.agents/skills` es un punto de lectura
|
|
146
155
|
compartido** —lo leen opencode, Cursor, VS Code y Antigravity—, no un destino universal: Claude lee
|
|
147
156
|
`.claude/skills` y Roo, `.roo/skills`. Por eso el CLI no escribe todas las skills en `.agents/skills`.
|
|
148
157
|
|
|
149
|
-
|
|
158
|
+
**Antigravity** no tiene directorio de commands de proyecto; sus `/cleto-*` se materializan como
|
|
159
|
+
**command-skills** en `.agents/skills/<n>/SKILL.md` (los Workflows están deprecados a favor de Agent
|
|
160
|
+
Skills), por eso `installedPaths.commands` queda vacío para este host. Sus `agents` se escriben en
|
|
161
|
+
`.agents/agents/<n>.md` con el frontmatter adaptado: `name` inyectado, `tools` como **lista** de ids
|
|
162
|
+
verificados de Antigravity (`read`→`view_file`, `edit`→`replace_file_content`, `grep`→`grep_search`,
|
|
163
|
+
`bash`→`run_command`, `todowrite`→`manage_task`), `mode`→`mainAgent`/`subagent`,
|
|
164
|
+
`commandExecutionPolicy: sandbox` y `model: inherit` (el tier no reescribe modelos de Antigravity). Una
|
|
165
|
+
tool de opencode sin id verificado se **omite con aviso** (`skip tool '<k>': no verified Antigravity id
|
|
166
|
+
for agent '<n>'`): un id inexistente cuelga el subagent. Los ids que sólo existen en el SDK
|
|
167
|
+
(`find_file`, `edit_file`, `search_web`, `read_url_content`, …), los de comunidad (`write_to_file`,
|
|
168
|
+
`call_mcp_tool`, `multi_replace_file_content`, …) y los de delegación (`invoke_subagent`,
|
|
169
|
+
`start_subagent`, `define_subagent`) **no** se emiten; el uso de MCP se expresa por
|
|
170
|
+
`mcpServers`/`.agents/mcp_config.json`, nunca como tool id. El campo `skill` no es una tool: se cubre
|
|
171
|
+
con el surfaceo automático de skills de Antigravity.
|
|
172
|
+
|
|
173
|
+
Los assets que un host no soporta (por ejemplo `agents`/`commands` de `cursor` y `roo`)
|
|
150
174
|
**no se escriben** y el instalador avisa por `stderr`
|
|
151
|
-
(`skip agents: not supported by host '
|
|
175
|
+
(`skip agents: not supported by host 'cursor'`) sin abortar. La instalación es **aditiva y no
|
|
152
176
|
destructiva**: instalar con otro agente escribe en su base y preserva los layouts previos, y el
|
|
153
177
|
manifiesto `.ancletorc.installedPaths` acumula la unión de los destinos realmente escritos.
|
|
154
178
|
|
|
155
|
-
La **configuración MCP específica de host** está fuera de alcance
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
179
|
+
La **configuración MCP específica de host** está fuera de alcance con **una excepción**: para
|
|
180
|
+
`agent: antigravity` el CLI genera o mergea (no destructivo) el MCP de workspace
|
|
181
|
+
`.agents/mcp_config.json` con esquema `{ "mcpServers": { "<n>": { "command", "args", "env" } } }`,
|
|
182
|
+
incluyendo el servidor de memoria `ancleto-memory`; preserva `mcpServers` preexistentes y no pisa
|
|
183
|
+
homónimos. `.mcp.json` (Claude) y `.vscode/mcp.json` (VS Code) siguen fuera de alcance, al igual que el
|
|
184
|
+
MCP global de Antigravity. `claude` se soporta con adaptación de frontmatter obligatoria para `agents`
|
|
185
|
+
(se omiten `model`/`tools` sin equivalencia verificada y las claves
|
|
186
|
+
`mode`/`color`/`temperature`/`permission`), sin MCP propio. **Copilot** instala agents y commands
|
|
187
|
+
como prompt files en `.github/prompts/*.prompt.md` (mismo adapter, sin `model:`) y su MCP en
|
|
188
|
+
`copilot-mcp.json` (merge en install, regeneración de rotas en upgrade, nunca toca tu
|
|
189
|
+
`copilot-instructions.md`); el modelo lo elegís en el picker —el tier solo marca el nivel de
|
|
190
|
+
esfuerzo—. Tanto `init` como `install --project`
|
|
191
|
+
configuran el MCP del host en la misma ejecución; `--no-mcp` lo omite.
|
|
159
192
|
|
|
160
193
|
---
|
|
161
194
|
|
|
@@ -297,10 +330,10 @@ ancleto discovery # Genera .discovery-map.json y empaqueta el repo
|
|
|
297
330
|
## Referencia de comandos CLI
|
|
298
331
|
|
|
299
332
|
```bash
|
|
300
|
-
ancleto init [--agent <nombre>] [--tier <nivel>] [--lang <codigo>] [--exclude <globs>] [--with-azure]
|
|
333
|
+
ancleto init [--agent <nombre>] [--tier <nivel>] [--lang <codigo>] [--exclude <globs>] [--with-azure] [--profile <perfil>]
|
|
301
334
|
# Configura el proyecto (interactivo en TTY)
|
|
302
335
|
|
|
303
|
-
ancleto install [--project <dir>] [--tier <nivel>] [--agent <nombre>] [--lang <codigo>] [--exclude <globs>] [--no-mcp]
|
|
336
|
+
ancleto install [--project <dir>] [--tier <nivel>] [--agent <nombre>] [--lang <codigo>] [--exclude <globs>] [--no-mcp] [--profile <perfil>]
|
|
304
337
|
# Instala agentes, skills y templates
|
|
305
338
|
|
|
306
339
|
ancleto update # Re-instala la última versión sobre lo existente
|
|
@@ -309,6 +342,13 @@ ancleto update # Re-instala la última versión sobre lo existente
|
|
|
309
342
|
|
|
310
343
|
ancleto upgrade # Re-aplica templates y skills respetando tus personalizaciones
|
|
311
344
|
|
|
345
|
+
ancleto export [--tar <archivo>]
|
|
346
|
+
# Empaqueta lo portable del proyecto (bundle + manifest.json sin rutas)
|
|
347
|
+
|
|
348
|
+
ancleto import <bundle> [--repair] | ancleto import --repair
|
|
349
|
+
# Restaura el bundle regenerando el MCP local; --repair solo arregla
|
|
350
|
+
# entradas con command inexistente
|
|
351
|
+
|
|
312
352
|
ancleto check # Verifica la integridad de la instalación (faltantes / huérfanos)
|
|
313
353
|
|
|
314
354
|
ancleto specs check [--change <nombre>] [--json]
|
|
@@ -386,11 +426,43 @@ Una vez instalado, tu IDE expone el ciclo de vida completo como comandos barra:
|
|
|
386
426
|
| `/cleto-ff` | Avanzar rápido con el contexto ya recuperado. |
|
|
387
427
|
| `/cleto-apply` | Aplicar el código del change. |
|
|
388
428
|
| `/cleto-verify` | Verificar reglas, tests y memoria antes de cerrar. |
|
|
429
|
+
| `/cleto-security` | Realizar una auditoría de seguridad integral en el proyecto o change. |
|
|
389
430
|
| `/cleto-sync` | Sincronizar las specs con el estado del repositorio. |
|
|
390
431
|
| `/cleto-archive` | Archivar el change y registrar aprendizajes. |
|
|
391
432
|
| `/cleto-continue` | Retomar un change con artefactos pendientes. |
|
|
392
433
|
| `/cleto-explore` | Explorar un problema sin comprometerse a implementar. |
|
|
393
434
|
| `/cleto-onboard` | Recorrer el ciclo completo en modo tutorial. |
|
|
435
|
+
| `/cleto-bulk-archive` | Archivar varios changes juntos. |
|
|
436
|
+
| `/cleto-recall` | Recuperar memoria del proyecto antes de empezar. |
|
|
437
|
+
| `/cleto-transplant` | Mudar el proyecto entre máquinas (export/import). |
|
|
438
|
+
|
|
439
|
+
Con perfil `test` se suman `cleto-test-proposal`, `cleto-test-apply`, `cleto-test-heal`, `cleto-test-coverage` y `cleto-test-archive` (ver perfil abajo).
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## Perfil de test automation
|
|
444
|
+
|
|
445
|
+
Para proyectos de test automation con Playwright:
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
ancleto init --profile test # o: ancleto install --project . --profile test
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Instala un tester ampliado con 4 workflows (planning, generation, healing, coverage), comandos `cleto-test-*`, estructura `testspec/specs` + `testspec/changes` (o reuso de `aspec/`) y convenciones Playwright en `AGENTS.md`. El orchestrator rutea lo test-only al tester ampliado y lo mixto al SDD general. Sin Playwright instalado, los workflows degradan a análisis y lo reportan. Combinable con cualquier host (`--profile test --agent copilot`, etc.).
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## Portabilidad entre máquinas
|
|
456
|
+
|
|
457
|
+
Al copiar un proyecto de una PC a otra, las rutas absolutas del MCP se rompen (caso real: Windows → Linux). Para mudarlo:
|
|
458
|
+
|
|
459
|
+
```bash
|
|
460
|
+
ancleto export --tar traslado.tgz # en origen, antes de copiar
|
|
461
|
+
ancleto import traslado.tgz # en destino, regenera el MCP local + doctor
|
|
462
|
+
ancleto import --repair # sin bundle: repara entradas con command inexistente
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
El bundle lleva solo lo portable (manifiesto con intención MCP, sin rutas ni secretos: nunca incluye credenciales, `service.json`, global ni `memory.db`). El import no pisa entradas MCP sanas.
|
|
394
466
|
|
|
395
467
|
---
|
|
396
468
|
|
package/agents/orchestrator.md
CHANGED
|
@@ -234,6 +234,14 @@ Delegate directly to `@tester` when the request is limited to testing work such
|
|
|
234
234
|
|
|
235
235
|
Do not use this category if the request is likely to require product-code changes, behavior changes, or broader requirement clarification.
|
|
236
236
|
|
|
237
|
+
### Test profile routing (only when `.ancletorc` declares `profile: test`)
|
|
238
|
+
|
|
239
|
+
When the project uses the test automation profile, refine the classification above:
|
|
240
|
+
|
|
241
|
+
- Change is test-only (new/fixed coverage, no product-code change) → run the profile workflow: planning (`cleto-test-proposal`), generation (`cleto-test-apply`), healing (`cleto-test-heal`), coverage (`cleto-test-coverage`); delegate to the amplified `@tester`.
|
|
242
|
+
- Change is mixed (product code + tests) → follow the general SDD paths above, with the amplified `@tester` owning the testing stages.
|
|
243
|
+
- Testing changes live under `testspec/changes/` (or `aspec/changes/` when the project reuses aspec).
|
|
244
|
+
|
|
237
245
|
### 3. `direct-implementation`
|
|
238
246
|
|
|
239
247
|
Skip `@spec-writer` and delegate directly to implementation when the request is limited to:
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Perform a comprehensive security audit of the codebase or a specific change
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Invoke the `ancleto-security` skill with the Skill tool and follow it exactly; do not improvise steps.
|
|
6
|
+
|
|
7
|
+
**Input**: The argument after `/cleto-security` is the optional target (e.g., a change name, a file path, or 'all'). If omitted, infer from context or ask the user.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Move a project between machines via ancleto export/import
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Mudá un proyecto ancleto entre máquinas sin romper el MCP local.
|
|
6
|
+
|
|
7
|
+
**En la máquina origen** (antes de copiar el proyecto), parado en su raíz:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ancleto export --tar traslado.tgz
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Llevá el proyecto + `traslado.tgz` a la máquina destino (cualquier medio: USB, red, nube).
|
|
14
|
+
|
|
15
|
+
**En la máquina destino** (tras copiar el proyecto), parado en su raíz:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
ancleto import traslado.tgz
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Esto aplica los portables (`.ancletorc`, templates, `aspec/`, agents, commands, skills),
|
|
22
|
+
regenera las entradas MCP con las rutas locales y corre `ancleto doctor` al final.
|
|
23
|
+
|
|
24
|
+
Si no tenés bundle y el `opencode.json` apunta a rutas inexistentes:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
ancleto import --repair
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Nunca se exportan credenciales, tokens, `service.json`, la config global ni `memory.db`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancleto/spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Orquestador SDD liviano con subagentes optimizados para costo/tokens",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"commands",
|
|
13
13
|
"skills",
|
|
14
14
|
"templates",
|
|
15
|
+
"profiles",
|
|
15
16
|
"src"
|
|
16
17
|
],
|
|
17
18
|
"publishConfig": {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Reviews test automation work for correctness, conventions, and approved-scope compliance (test profile)
|
|
3
|
+
mode: subagent
|
|
4
|
+
model: opencode-go/qwen3.6-plus
|
|
5
|
+
temperature: 0.1
|
|
6
|
+
color: '#ef4444'
|
|
7
|
+
tools:
|
|
8
|
+
read: true
|
|
9
|
+
write: false
|
|
10
|
+
edit: false
|
|
11
|
+
bash: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Reviewer Agent (test automation profile)
|
|
15
|
+
|
|
16
|
+
You perform a final review of test automation work for this project.
|
|
17
|
+
|
|
18
|
+
Read `AGENTS.md` at the repo root for project-specific conventions, tech stack, and patterns.
|
|
19
|
+
|
|
20
|
+
## Primary Responsibility
|
|
21
|
+
|
|
22
|
+
Review testing work using one of these approved inputs:
|
|
23
|
+
|
|
24
|
+
- An active testing change in `testspec/changes/{change-name}/` (or `aspec/changes/{change-name}/`)
|
|
25
|
+
- A direct test-only request explicitly approved by `@orchestrator`
|
|
26
|
+
|
|
27
|
+
## What to check
|
|
28
|
+
|
|
29
|
+
- Every generated or healed test traces to an approved plan item or requirement; no orphan tests.
|
|
30
|
+
- Playwright patterns match the repo conventions (selectors, fixtures, timeouts); no invented patterns when an established one exists.
|
|
31
|
+
- Healing changed the smaller side: test updated for intentional behavior change, product code touched only within the approved scope — otherwise flag for `@orchestrator`.
|
|
32
|
+
- The Validation Ledger classifies every command (`passed`, `task-regression`, `pre-existing-unrelated`, `inconclusive`); failures outside task-owned files are not dismissed as out of scope.
|
|
33
|
+
- No production behavior change hides inside a "test-only" change.
|
|
34
|
+
|
|
35
|
+
You do not have Bash and must not run commands. You do not write specs. Only raise flags so `@orchestrator` can decide.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plans, generates, heals and covers Playwright automation tests (test profile)
|
|
3
|
+
mode: subagent
|
|
4
|
+
model: opencode-go/deepseek-v4.1-flash
|
|
5
|
+
temperature: 0.1
|
|
6
|
+
color: '#3b82f6'
|
|
7
|
+
tools:
|
|
8
|
+
read: true
|
|
9
|
+
write: true
|
|
10
|
+
edit: true
|
|
11
|
+
bash: true
|
|
12
|
+
permission:
|
|
13
|
+
bash:
|
|
14
|
+
'*': allow
|
|
15
|
+
'*az *': deny
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Tester Agent (test automation profile)
|
|
19
|
+
|
|
20
|
+
You are the QA Automation Engineer for this project, running the **test automation profile**.
|
|
21
|
+
Everything in the base tester contract applies (input modes, bash rules, verification
|
|
22
|
+
priority, output expectations). This profile adds four test-automation workflows and
|
|
23
|
+
Playwright conventions below.
|
|
24
|
+
|
|
25
|
+
Read `AGENTS.md` at the repo root for project-specific testing conventions, frameworks, and patterns.
|
|
26
|
+
|
|
27
|
+
## Playwright precondition
|
|
28
|
+
|
|
29
|
+
Before any workflow that executes tests, check whether Playwright is available in the
|
|
30
|
+
target project (`package.json` dependency or `playwright.config.*` at the repo root).
|
|
31
|
+
|
|
32
|
+
- If present: run the workflows normally.
|
|
33
|
+
- If absent: degrade with a clear message — deliver planning and coverage analysis
|
|
34
|
+
(no execution), and do NOT attempt healing or generation runs. Report the gap instead
|
|
35
|
+
of guessing.
|
|
36
|
+
|
|
37
|
+
## Workflows
|
|
38
|
+
|
|
39
|
+
### 1. planning
|
|
40
|
+
|
|
41
|
+
Propose what to test: read the approved change artifacts (or the orchestrator brief),
|
|
42
|
+
define the coverage target (critical flows, edge cases, regressions), and record it as
|
|
43
|
+
a testing change under `testspec/changes/{name}/` (or `aspec/changes/{name}/` when the
|
|
44
|
+
project reuses aspec). No test code yet.
|
|
45
|
+
|
|
46
|
+
### 2. generation
|
|
47
|
+
|
|
48
|
+
Generate Playwright tests from the approved testing plan. Follow the repo's existing
|
|
49
|
+
test structure and patterns before introducing a new pattern. Each generated test maps
|
|
50
|
+
to a plan item; untestable items are reported as gaps, not skipped silently.
|
|
51
|
+
|
|
52
|
+
### 3. healing
|
|
53
|
+
|
|
54
|
+
When a Playwright test fails: reproduce first, then diagnose (product bug vs stale
|
|
55
|
+
test vs environment). Fix the smaller side — update the test when behavior changed
|
|
56
|
+
intentionally, fix the product code only when the orchestrator scope allows it;
|
|
57
|
+
otherwise escalate back to `@orchestrator` for reclassification. Re-run to green.
|
|
58
|
+
|
|
59
|
+
### 4. coverage
|
|
60
|
+
|
|
61
|
+
Report gaps between specs (source-of-truth and deltas) and existing tests: which
|
|
62
|
+
requirements lack automation, which tests lack a backing requirement. Output a
|
|
63
|
+
prioritized gap list, not new tests.
|
|
64
|
+
|
|
65
|
+
## Output expectations (profile addition)
|
|
66
|
+
|
|
67
|
+
Append to the base summary: workflow used (planning/generation/healing/coverage),
|
|
68
|
+
Playwright availability, and the coverage gaps found (if any).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate Playwright tests from an approved testing plan
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running the test-automation **generation** workflow under the test profile.
|
|
6
|
+
|
|
7
|
+
1. Load the approved testing plan (`testspec/changes/{name}/` or the aspec change).
|
|
8
|
+
2. Verify the Playwright precondition; if absent, stop and report instead of generating runnable tests.
|
|
9
|
+
3. Generate one Playwright test per plan item using the repo's existing patterns. Map each test to its item.
|
|
10
|
+
4. Report untestable items as gaps (never skip silently) and hand the new tests to validation (healing/coverage as needed).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Archive a finished testing change
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running the test-automation **archive** workflow under the test profile.
|
|
6
|
+
|
|
7
|
+
1. Verify the testing change is complete: plan approved, tests generated, suite green (or gaps explicitly accepted).
|
|
8
|
+
2. Confirm the delta specs reflect the final tests (re-delegate updates when behavior changed mid-flight).
|
|
9
|
+
3. Archive per the project's SDD close process (same rules as `cleto-archive`), keeping `testspec/` deltas consistent.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Report gaps between specs and existing automation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running the test-automation **coverage** workflow under the test profile.
|
|
6
|
+
|
|
7
|
+
1. Read the source-of-truth specs (`testspec/specs/` or `aspec/specs/`) plus active deltas.
|
|
8
|
+
2. Map each requirement to the existing Playwright tests (no execution needed — static analysis suffices).
|
|
9
|
+
3. Output a prioritized gap list: requirements without automation, tests without a backing requirement.
|
|
10
|
+
4. Do not write new tests here; propose them via `cleto-test-proposal` when asked.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Diagnose and repair a failing Playwright test
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running the test-automation **healing** workflow under the test profile.
|
|
6
|
+
|
|
7
|
+
1. Reproduce the failure first (run the single failing test, not the whole suite).
|
|
8
|
+
2. Diagnose: product bug vs stale test vs environment issue.
|
|
9
|
+
3. Fix the smaller side: update the test when the behavior change was intentional; touch product code only within the orchestrator-approved scope, otherwise escalate to `@orchestrator` for reclassification.
|
|
10
|
+
4. Re-run to green and report cause, side fixed, and commands run.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Propose what to automate (test planning) as a testing change
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running the test-automation **planning** workflow under the test profile.
|
|
6
|
+
|
|
7
|
+
1. Read the approved change artifacts (or the orchestrator brief) and the current Playwright suite layout.
|
|
8
|
+
2. Define the coverage target: critical flows, edge cases, regressions.
|
|
9
|
+
3. Check the Playwright precondition (`package.json` / `playwright.config.*`): if absent, plan analysis-only and say so.
|
|
10
|
+
4. Record the plan as a testing change under `testspec/changes/{name}/` (proposal + tasks; reuse `aspec/changes/{name}/` when the project reuses aspec). STOP and wait for approval before generating tests.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# AI Agents Context (test automation profile)
|
|
2
|
+
|
|
3
|
+
> Contexto global para agentes de IA en proyectos con perfil de test automation.
|
|
4
|
+
|
|
5
|
+
<!-- LOCKED: test-profile -->
|
|
6
|
+
### Test automation profile (Playwright)
|
|
7
|
+
|
|
8
|
+
Este proyecto usa el perfil `test` de ancleto (`profile: test` en `.ancletorc`).
|
|
9
|
+
|
|
10
|
+
- Workflows: planning (`cleto-test-proposal`), generation (`cleto-test-apply`), healing (`cleto-test-heal`), coverage (`cleto-test-coverage`), archive (`cleto-test-archive`).
|
|
11
|
+
- Estructura: `testspec/specs/` (cobertura actual) + `testspec/changes/` (deltas), o reuso de `aspec/` cuando el proyecto ya lo usa.
|
|
12
|
+
- Framework: Playwright. Si no está instalado, los workflows degradan a análisis sin ejecución y lo reportan.
|
|
13
|
+
- Ruteo: cambio test-only → tester ampliado; cambio mixto → SDD general con apoyo del tester.
|
|
14
|
+
<!-- /LOCKED: test-profile -->
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ancleto-security
|
|
3
|
+
description: Perform a comprehensive security audit of the codebase or a specific change. Checks for common vulnerabilities like SQL injection, XSS, hardcoded secrets, etc.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: No external binaries required. Works with any agent runtime.
|
|
6
|
+
metadata:
|
|
7
|
+
author: ancleto
|
|
8
|
+
version: '1.0'
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# aspec Security Audit
|
|
12
|
+
|
|
13
|
+
Perform a comprehensive security audit of the project.
|
|
14
|
+
|
|
15
|
+
**Input**: Optionally a change name or directory (e.g., `add-auth`, `src/`); if omitted, infer from context.
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Identify the Scope
|
|
20
|
+
Determine if the user wants to review a specific file, recent changes, or the whole project.
|
|
21
|
+
|
|
22
|
+
### 2. Basic Static Analysis
|
|
23
|
+
Run existing built-in static analysis tools (e.g., `npm run lint`) to catch obvious security issues caught by linters.
|
|
24
|
+
|
|
25
|
+
### 3. Agent Manual Review
|
|
26
|
+
Actively search for vulnerabilities in the target scope using file viewing and grep tools. Look for:
|
|
27
|
+
- **SQL Injections:** Check for concatenated queries instead of parameterized ones.
|
|
28
|
+
- **XSS (Cross-Site Scripting):** Review how user inputs are rendered in views.
|
|
29
|
+
- **Hardcoded Secrets:** Look for passwords, API tokens, or encryption keys in source code.
|
|
30
|
+
- **Command Injection:** Review usage of `exec`, `spawn`, or similar functions with unsanitized user input.
|
|
31
|
+
- **Path Traversal:** Check manipulation of file paths with user input.
|
|
32
|
+
|
|
33
|
+
### 4. Create Audit Report
|
|
34
|
+
Generate an artifact named `security_audit_report.md` detailing the findings:
|
|
35
|
+
- Classify by severity: Critical, High, Medium, Low.
|
|
36
|
+
- Show exactly in which file and line the issue occurs.
|
|
37
|
+
- Propose a remediation or corrected code.
|
|
38
|
+
|
|
39
|
+
### 5. Action Plan
|
|
40
|
+
Present the report to the user and offer to apply the security fixes.
|