@christianmaf80/agentic-workflow 1.6.0-beta.1 → 1.8.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 };
@@ -20,15 +20,15 @@ First line of the document:
20
20
 
21
21
  ---
22
22
 
23
- ## 2. The 5 Mandatory Questions
23
+ ## 2. The 5 Mandatory Questions (Dynamic)
24
24
 
25
25
  | # | Question (formulated by architect) | Answer (from developer) |
26
26
  |---|-----------------------------------|-------------------------|
27
- | 1 | | |
28
- | 2 | | |
29
- | 3 | | |
30
- | 4 | | |
31
- | 5 | | |
27
+ | 1 | <dynamic question based on task description> | |
28
+ | 2 | <dynamic question based on task description> | |
29
+ | 3 | <dynamic question based on task description> | |
30
+ | 4 | <dynamic question based on task description> | |
31
+ | 5 | <dynamic question based on task description> | |
32
32
 
33
33
  ---
34
34
 
@@ -16,6 +16,13 @@ First line of the document:
16
16
  ```yaml
17
17
  bootstrap:
18
18
  done: true
19
+ language:
20
+ confirmed: false
21
+ developer:
22
+ name: ""
23
+ strategy: ""
24
+ task:
25
+ description: ""
19
26
  roles:
20
27
  architect: {{architectAgentId}}
21
28
  constitution:
@@ -24,6 +24,18 @@ First line of the document:
24
24
 
25
25
  ---
26
26
 
27
+ ## Clarifications (5 Mandatory Questions, Dynamic)
28
+
29
+ | # | Question (formulated by architect) | Answer (from developer) |
30
+ |---|-----------------------------------|-------------------------|
31
+ | 1 | <dynamic question based on task description> | |
32
+ | 2 | <dynamic question based on task description> | |
33
+ | 3 | <dynamic question based on task description> | |
34
+ | 4 | <dynamic question based on task description> | |
35
+ | 5 | <dynamic question based on task description> | |
36
+
37
+ ---
38
+
27
39
  ## 2. Detected Needs
28
40
  - Technical requirements identified by the architect-agent
29
41
  - Assumptions and limits
@@ -19,41 +19,40 @@ blocking: true
19
19
 
20
20
  ## Objective (ONLY)
21
21
  - Activate the **architect-agent** role.
22
- - Load the minimum bootstrap indices.
23
- - Load the constitution rules into context.
24
- - Detect the conversation language and confirm explicitly.
25
- - **Select the lifecycle strategy (Long/Short)**.
22
+ - Load the prebuilt bootstrap bundle directly from the core path (no index traversal).
23
+ - Capture developer language, name, strategy, and first task description (one question at a time).
26
24
  - Create the **task candidate** artifact `init.md`.
27
25
 
28
26
  ## Mandatory Steps
29
- 1. **Reasoning (MANDATORY)**
30
- - Explain to the developer what will be done in this phase and why.
31
- 2. Use the `bootstrap_context` tool to load the prebuilt core bootstrap bundle plus local indices in a single step.
32
- 3. Save the bundle output to `.agent/artifacts/candidate/bootstrap.md`.
33
- 4. Detect preferred language and ask for explicit confirmation (**YES**).
34
- 5. Select lifecycle strategy (**Long** or **Short**).
35
- 6. Create the `init.md` artifact using `templates.init`.
36
- 7. Evaluate Gate.
27
+ 1. Load the prebuilt bootstrap bundle from the core path: `${agent.core.root}/bootstrap.md`.
28
+ 2. Save the bundle content to `.agent/artifacts/candidate/bootstrap.md`.
29
+ 3. Ask the developer the **Gate questions** in order (one by one, do not continue until answered):
30
+ - Language confirmation (**YES**).
31
+ - Developer name (preferred form of address).
32
+ - Task strategy: **short (fast)** or **long**.
33
+ - Task description (1-3 sentences).
34
+ 7. Create the `init.md` artifact using `templates.init`.
35
+ 8. Evaluate Gate.
37
36
  - The developer **MUST** explicitly confirm with a **YES**.
38
37
 
39
38
  ## Output (REQUIRED)
40
39
  - Created artifact: `artifacts.candidate.init` (from `templates.init`).
41
- - Created artifact: `artifacts.candidate.bootstrap` (bundle from `bootstrap_context`).
42
-
43
- ## Reasoning (MANDATORY)
44
- - Before executing, the architect-agent must explain to the developer what will be done and why.
45
- - No document is required for this step.
40
+ - Created artifact: `artifacts.candidate.bootstrap` (bundle from `${agent.core.root}/bootstrap.md`).
46
41
 
47
42
  ## Pass
48
43
  - `init.md` is created from `templates.init`.
49
- - Language is confirmed and strategy is set.
44
+ - Language is confirmed, developer name is captured, strategy is set, and task description exists.
50
45
  - `bootstrap.md` exists and contains the bundle.
51
46
 
52
47
  ## Gate (REQUIRED)
53
48
  Requirements (all mandatory):
54
49
  1. `artifacts.candidate.init` exists.
55
50
  2. `artifacts.candidate.bootstrap` exists.
56
- 3. In `init.md` YAML: `language.confirmed == true` and `strategy` is defined.
51
+ 3. In `init.md` YAML:
52
+ - `language.confirmed == true`
53
+ - `developer.name` is defined
54
+ - `strategy` is defined (short/fast or long)
55
+ - `task.description` is defined
57
56
  4. The developer has explicitly approved with **YES**.
58
57
 
59
58
  If Gate FAIL:
@@ -70,11 +70,15 @@ blocking: true
70
70
  - `task.md` contains acceptance criteria
71
71
  - If fails → go to **Step 8 (FAIL)**.
72
72
 
73
- 2. Load research template (architect-agent)
73
+ 2. Ask 5 mandatory clarification questions (architect-agent)
74
+ - Generate them dynamically from the task description to clarify scope, inputs, outputs, constraints, and success criteria.
75
+ - Capture answers in `research.md` under a `clarifications` section.
76
+
77
+ 3. Load research template (architect-agent)
74
78
  - Load `templates.research`
75
79
  - If it doesn't exist or cannot be read → go to **Step 8 (FAIL)**.
76
80
 
77
- 3. **Delegate to researcher-agent (MANDATORY)**
81
+ 4. **Delegate to researcher-agent (MANDATORY)**
78
82
  > ⚠️ **PERMANENT RULE**: The `architect-agent` **CANNOT** create the research report.
79
83
  > The `researcher-agent` is the **only authorized agent** to create `research.md`.
80
84
 
@@ -98,7 +102,7 @@ blocking: true
98
102
  - Official or prestigious sources
99
103
  - Hand back control to the `architect-agent` upon completion
100
104
 
101
- 4. Request developer approval (MANDATORY, via console)
105
+ 5. Request developer approval (MANDATORY, via console)
102
106
  - The developer **MUST** issue a binary decision:
103
107
  - **YES** → Approved
104
108
  - **NO** → Rejected
@@ -112,7 +116,7 @@ blocking: true
112
116
  ```
113
117
  - If `decision != YES` → go to **Step 8 (FAIL)**.
114
118
 
115
- 5. PASS
119
+ 6. PASS
116
120
  - Update `.agent/artifacts/<taskId>-<taskTitle>/task.md` (using prefix):
117
121
  - Mark Phase 1 as completed
118
122
  - Set `task.lifecycle.phases.phase-1-research.validated_at = <ISO-8601>`
@@ -34,6 +34,7 @@ blocking: true
34
34
  - `task.strategy == "short"`.
35
35
 
36
36
  2. Execute 5 mandatory questions.
37
+ - Generate them dynamically from the task description to clarify scope, inputs, outputs, constraints, and success criteria.
37
38
 
38
39
  3. Complexity analysis.
39
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianmaf80/agentic-workflow",
3
- "version": "1.6.0-beta.1",
3
+ "version": "1.8.0-beta.1",
4
4
  "description": "Portable agentic workflow orchestration system with strict identity and gate discipline",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",