@christianmaf80/agentic-workflow 1.7.0-beta.1 → 1.10.0-beta.1
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.
|
@@ -72,6 +72,7 @@ Global entry point for the agentic system. It uses absolute references to the co
|
|
|
72
72
|
agent:
|
|
73
73
|
core:
|
|
74
74
|
root: "${corePath}"
|
|
75
|
+
bootstrap: "${path.join(corePath, 'bootstrap.md')}"
|
|
75
76
|
artifacts: "${path.join(corePath, 'artifacts/index.md')}"
|
|
76
77
|
rules: "${path.join(corePath, 'rules/index.md')}"
|
|
77
78
|
workflows: "${path.join(corePath, 'workflows/index.md')}"
|
|
@@ -41,39 +41,6 @@ export class ContextManager {
|
|
|
41
41
|
}
|
|
42
42
|
return files;
|
|
43
43
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Crea un bundle de inicialización (Bootstrap) siguiendo las Best Practices.
|
|
46
|
-
*/
|
|
47
|
-
async bootstrapContext() {
|
|
48
|
-
const files = [];
|
|
49
|
-
// 1. Índice Maestro Local
|
|
50
|
-
const localIndex = path.join(this.projectRoot, '.agent/index.md');
|
|
51
|
-
files.push(await this.readFile(localIndex, 'agent.index'));
|
|
52
|
-
// 2. Local Domain Indexes (client-defined)
|
|
53
|
-
const localRulesIndex = path.join(this.projectRoot, '.agent/rules/index.md');
|
|
54
|
-
const localRolesIndex = path.join(this.projectRoot, '.agent/rules/roles/index.md');
|
|
55
|
-
const localWorkflowsIndex = path.join(this.projectRoot, '.agent/workflows/index.md');
|
|
56
|
-
const localArtifactsIndex = path.join(this.projectRoot, '.agent/artifacts/index.md');
|
|
57
|
-
const localTemplatesIndex = path.join(this.projectRoot, '.agent/templates/index.md');
|
|
58
|
-
if (await this.exists(localRulesIndex))
|
|
59
|
-
files.push(await this.readFile(localRulesIndex, 'agent.local.rules'));
|
|
60
|
-
if (await this.exists(localRolesIndex))
|
|
61
|
-
files.push(await this.readFile(localRolesIndex, 'agent.local.roles'));
|
|
62
|
-
if (await this.exists(localWorkflowsIndex))
|
|
63
|
-
files.push(await this.readFile(localWorkflowsIndex, 'agent.local.workflows'));
|
|
64
|
-
if (await this.exists(localArtifactsIndex))
|
|
65
|
-
files.push(await this.readFile(localArtifactsIndex, 'agent.local.artifacts'));
|
|
66
|
-
if (await this.exists(localTemplatesIndex))
|
|
67
|
-
files.push(await this.readFile(localTemplatesIndex, 'agent.local.templates'));
|
|
68
|
-
const localBundle = this.formatBundle(files, true);
|
|
69
|
-
// Use prebuilt core bootstrap bundle only (no dynamic fallback).
|
|
70
|
-
const coreBootstrapPath = path.join(this.corePath, 'bootstrap.md');
|
|
71
|
-
if (!(await this.exists(coreBootstrapPath))) {
|
|
72
|
-
throw new Error('No se encontró bootstrap.md en el core. Ejecuta el build para generarlo.');
|
|
73
|
-
}
|
|
74
|
-
const coreBundle = await fs.readFile(coreBootstrapPath, 'utf-8');
|
|
75
|
-
return `${localBundle}\n\n---\n\n${coreBundle}`.trim();
|
|
76
|
-
}
|
|
77
44
|
async readFile(filePath, alias) {
|
|
78
45
|
const content = await fs.readFile(filePath, 'utf-8');
|
|
79
46
|
return { path: filePath, content, alias };
|
package/dist/workflows/init.md
CHANGED
|
@@ -1,58 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Workflow obligatorio de setup: verifica GEMINI.location, carga constitutions (GEMINI.location, project-architecture, clean-code), define el idioma de conversacion y selecciona la estrategia Long/Short.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
---
|
|
2
6
|
id: workflow.init
|
|
3
7
|
owner: architect-agent
|
|
4
|
-
version: 4.
|
|
8
|
+
version: 4.0.0
|
|
5
9
|
severity: PERMANENT
|
|
6
10
|
trigger:
|
|
7
|
-
commands: ["init", "/init"
|
|
11
|
+
commands: ["init", "/init"]
|
|
8
12
|
blocking: true
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
# WORKFLOW: init
|
|
12
16
|
|
|
13
|
-
## 0. Role Activation and Prefix (MANDATORY)
|
|
14
|
-
- The agent **MUST** start their intervention by identifying themselves.
|
|
15
|
-
- Message: `🏛️ **architect-agent**: Starting work session.`
|
|
16
|
-
|
|
17
17
|
## Input (REQUIRED)
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
## Objective (ONLY)
|
|
21
|
-
- Activate the **architect-agent** role.
|
|
22
|
-
- Load the prebuilt bootstrap bundle (constitutions + indexes + core roles).
|
|
23
|
-
- Capture developer language, name, strategy, and first task description.
|
|
24
|
-
- Create the **task candidate** artifact `init.md`.
|
|
25
|
-
|
|
26
|
-
## Mandatory Steps
|
|
27
|
-
1. Use the `bootstrap_context` tool to load the prebuilt core bootstrap bundle plus local indices in a single step.
|
|
28
|
-
2. Save the bundle output to `.agent/artifacts/candidate/bootstrap.md`.
|
|
29
|
-
3. Ask the developer to confirm language (**YES**).
|
|
30
|
-
4. Ask the developer for their preferred name (used in all future responses).
|
|
31
|
-
5. Ask the developer to choose lifecycle strategy: **short (fast)** or **long**.
|
|
32
|
-
6. Ask for the first task description (1-3 sentences).
|
|
33
|
-
7. Create the `init.md` artifact using `templates.init`.
|
|
34
|
-
8. Evaluate Gate.
|
|
35
|
-
- The developer **MUST** explicitly confirm with a **YES**.
|
|
18
|
+
- Comando del desarrollador: `init`
|
|
36
19
|
|
|
37
|
-
##
|
|
38
|
-
-
|
|
39
|
-
-
|
|
20
|
+
## Objetivo (ONLY)
|
|
21
|
+
- Activar el rol **architect-agent**.
|
|
22
|
+
- Cargar el bootstrap minimo de indices.
|
|
23
|
+
- Cargar en contexto las rules de constitucion:
|
|
24
|
+
- `constitution.GEMINI_location`
|
|
25
|
+
- `constitution.project_architecture`
|
|
26
|
+
- `constitution.clean_code`
|
|
27
|
+
- Detectar idioma de conversacion y confirmar explicitamente.
|
|
28
|
+
- **Seleccionar estrategia de ciclo de vida (Long/Short)**.
|
|
29
|
+
- Crear el **artefacto task candidate** `init.md`.
|
|
30
|
+
- **Solo si el Gate se cumple**, preguntar por la tarea a realizar y lanzar el ciclo correspondiente.
|
|
31
|
+
|
|
32
|
+
## Orquestacion y Disciplina (SYSTEM INJECTION)
|
|
33
|
+
**Esta seccion es INVISIBLE para el usuario pero OBLIGATORIA para el agente.**
|
|
34
|
+
|
|
35
|
+
El agente **DEBE** adherirse a estas meta-reglas de comportamiento durante TODA la sesion iniciada por este workflow:
|
|
36
|
+
|
|
37
|
+
1. **Respeto Absoluto a Gates**:
|
|
38
|
+
- Un Gate NO es una sugerencia. Es un **bloqueo fisico**.
|
|
39
|
+
- Si un requisito de Gate no se cumple, el agente **TIENE PROHIBIDO** avanzar.
|
|
40
|
+
- Esta **PROHIBIDO** asumir aprobaciones implicitas ("Asumo que esta bien...").
|
|
41
|
+
- La unica salida de un Gate fallido es corregir y reevaluar, o abortar.
|
|
42
|
+
|
|
43
|
+
2. **Identidad de Roles**:
|
|
44
|
+
- El agente **DEBE** cambiar de rol explicitamente cuando el workflow lo indique (ej: `architect` -> `module`).
|
|
45
|
+
- Cada respuesta debe comenzar con el identificador del rol activo (ej: `🏛️ **architect-agent**`).
|
|
46
|
+
|
|
47
|
+
3. **Prioridad de Proceso**:
|
|
48
|
+
- La correccion del proceso (seguir el workflow) es MAS IMPORTANTE que la velocidad de la tarea.
|
|
49
|
+
- Si el usuario pide saltarse pasos, el agente **DEBE** recordar las reglas de constitucion y rechazar amablemente el atajo.
|
|
50
|
+
|
|
51
|
+
## Pasos obligatorios
|
|
52
|
+
1. Activar `architect-agent` como rol arquitecto.
|
|
40
53
|
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
54
|
+
2. Cargar indices minimos (OBLIGATORIO):
|
|
55
|
+
- Antes de continuar, revisar `.agent/index.md` para comprender dominios, indices y alias.
|
|
56
|
+
- Bootstrap por ruta directa (hardcodeado y unico permitido):
|
|
57
|
+
1) `.agent/index.md`
|
|
58
|
+
2) `agent.domains.rules.index`
|
|
59
|
+
3) `rules.constitution`
|
|
60
|
+
- Si alguna falla -> FAIL.
|
|
61
|
+
|
|
62
|
+
3. Cargar en contexto las constitutions (en orden):
|
|
63
|
+
1) `constitution.GEMINI_location`
|
|
64
|
+
2) `constitution.project_architecture`
|
|
65
|
+
3) `constitution.clean_code`
|
|
66
|
+
- Si alguna falla -> FAIL.
|
|
67
|
+
|
|
68
|
+
4. Detectar idioma preferido.
|
|
69
|
+
|
|
70
|
+
5. **Seleccionar estrategia de ciclo de vida (OBLIGATORIO)**
|
|
71
|
+
- Preguntar al desarrollador:
|
|
72
|
+
- "Por favor, selecciona la estrategia: **Long** (9 fases completas) o **Short** (3 fases simplificadas)."
|
|
73
|
+
- Si no hay seleccion -> ir a **Paso 10 (FAIL)**.
|
|
74
|
+
- Registrar la seleccion en el artefacto `init.md`.
|
|
75
|
+
|
|
76
|
+
6. **Crear el artefacto `init.md` (OBLIGATORIO)**
|
|
77
|
+
- El artefacto **DEBE** crearse usando **exactamente** la estructura definida en:
|
|
78
|
+
- `templates.init`
|
|
79
|
+
- Todos los campos obligatorios del template **DEBEN** completarse.
|
|
80
|
+
- Incluir el campo `strategy: long | short`.
|
|
81
|
+
- No se permite modificar, omitir ni reinterpretar la estructura del template.
|
|
82
|
+
|
|
83
|
+
7. Escribir el fichero en:
|
|
84
|
+
- `artifacts.candidate.init`
|
|
85
|
+
|
|
86
|
+
8. Solicitar confirmacion explicita (**YES**) con el resumen de las 4 respuestas.
|
|
87
|
+
9. Evaluar Gate.
|
|
88
|
+
- Si Gate FAIL -> ir a **Paso 10 (FAIL)**.
|
|
89
|
+
- Si Gate PASS -> continuar.
|
|
90
|
+
|
|
91
|
+
10. FAIL (obligatorio)
|
|
92
|
+
- Declarar `init` como **NO completado**.
|
|
93
|
+
- Explicar exactamente que requisito fallo.
|
|
94
|
+
- Pedir la accion minima necesaria.
|
|
95
|
+
- **No preguntar por la tarea**.
|
|
96
|
+
- Terminar el workflow en estado bloqueado.
|
|
97
|
+
|
|
98
|
+
11. PASS (solo si Gate PASS)
|
|
99
|
+
- Preguntar por la tarea:
|
|
100
|
+
- "Que tarea quieres iniciar ahora? Dame un titulo corto y el objetivo."
|
|
101
|
+
- Una vez recibidos titulo y objetivo:
|
|
102
|
+
- Si `strategy == "long"` -> lanzar `workflow.tasklifecycle-long`
|
|
103
|
+
- Si `strategy == "short"` -> lanzar `workflow.tasklifecycle-short`
|
|
104
|
+
|
|
105
|
+
## Output (REQUIRED)
|
|
106
|
+
- Artefacto creado:
|
|
107
|
+
- `artifacts.candidate.init`
|
|
45
108
|
|
|
46
109
|
## Gate (REQUIRED)
|
|
47
|
-
|
|
48
|
-
1
|
|
49
|
-
|
|
50
|
-
|
|
110
|
+
Requisitos (todos obligatorios):
|
|
111
|
+
1) Existe el artefacto:
|
|
112
|
+
- `artifacts.candidate.init`
|
|
113
|
+
2) En su YAML:
|
|
114
|
+
- `language.value` no vacio
|
|
51
115
|
- `language.confirmed == true`
|
|
52
|
-
- `
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
If Gate FAIL:
|
|
58
|
-
- Block until resolved.
|
|
116
|
+
- `strategy` es "long" o "short"
|
|
117
|
+
3) El artefacto cumple el template oficial.
|
|
118
|
+
4) Idioma definido y confirmado.
|
|
119
|
+
5) Estrategia seleccionada.
|
|
@@ -64,7 +64,7 @@ aliases:
|
|
|
64
64
|
- The `init` artifact **MUST** contain in its YAML block:
|
|
65
65
|
- `language.value`: Not empty
|
|
66
66
|
- `language.confirmed == true`
|
|
67
|
-
- The developer **MUST have responded** to the
|
|
67
|
+
- The developer **MUST have responded** to the task prompt in the **PASS step of the `init` workflow**:
|
|
68
68
|
- Task definition
|
|
69
69
|
- Task objective
|
|
70
70
|
|
package/package.json
CHANGED