@christianmaf80/agentic-workflow 1.2.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.
Files changed (67) hide show
  1. package/LICENSE +15 -0
  2. package/README.es.md +88 -0
  3. package/README.md +88 -0
  4. package/bin/cli.js +44 -0
  5. package/dist/artifacts/index.md +28 -0
  6. package/dist/cli/commands/create.js +178 -0
  7. package/dist/cli/commands/init.js +212 -0
  8. package/dist/cli/commands/mcp-register.js +33 -0
  9. package/dist/cli/commands/restore.js +67 -0
  10. package/dist/cli/index.js +2 -0
  11. package/dist/core/context/manager.js +136 -0
  12. package/dist/core/index.js +1 -0
  13. package/dist/core/mapping/resolver.js +72 -0
  14. package/dist/core/migration/backup.js +14 -0
  15. package/dist/core/migration/detector.js +32 -0
  16. package/dist/core/migration/transformer.js +11 -0
  17. package/dist/core/utils/backup.js +41 -0
  18. package/dist/mcp/server.js +160 -0
  19. package/dist/rules/constitution/GEMINI.location.md +29 -0
  20. package/dist/rules/constitution/agent-system.md +77 -0
  21. package/dist/rules/constitution/agents-behavior.md +188 -0
  22. package/dist/rules/constitution/clean-code.md +153 -0
  23. package/dist/rules/constitution/index.md +29 -0
  24. package/dist/rules/constitution/project-architecture.md +57 -0
  25. package/dist/rules/index.md +26 -0
  26. package/dist/rules/roles/architect.md +40 -0
  27. package/dist/rules/roles/index.md +45 -0
  28. package/dist/rules/roles/neo.md +32 -0
  29. package/dist/rules/roles/qa.md +22 -0
  30. package/dist/rules/roles/researcher.md +22 -0
  31. package/dist/rules/roles/tooling.md +22 -0
  32. package/dist/templates/acceptance.md +64 -0
  33. package/dist/templates/agent-scores.md +25 -0
  34. package/dist/templates/agent-task.md +106 -0
  35. package/dist/templates/analysis.md +161 -0
  36. package/dist/templates/brief.md +96 -0
  37. package/dist/templates/changelog.md +30 -0
  38. package/dist/templates/closure.md +87 -0
  39. package/dist/templates/index.md +45 -0
  40. package/dist/templates/init.md +26 -0
  41. package/dist/templates/planning.md +157 -0
  42. package/dist/templates/research.md +89 -0
  43. package/dist/templates/results-acceptance.md +177 -0
  44. package/dist/templates/review.md +110 -0
  45. package/dist/templates/subtask-implementation.md +67 -0
  46. package/dist/templates/supplemental-report.md +30 -0
  47. package/dist/templates/task-metrics.md +39 -0
  48. package/dist/templates/task.md +151 -0
  49. package/dist/templates/todo-item.md +49 -0
  50. package/dist/templates/verification.md +77 -0
  51. package/dist/workflows/index.md +44 -0
  52. package/dist/workflows/init.md +61 -0
  53. package/dist/workflows/tasklifecycle-long/index.md +176 -0
  54. package/dist/workflows/tasklifecycle-long/phase-0-acceptance-criteria.md +161 -0
  55. package/dist/workflows/tasklifecycle-long/phase-1-research.md +151 -0
  56. package/dist/workflows/tasklifecycle-long/phase-2-analysis.md +136 -0
  57. package/dist/workflows/tasklifecycle-long/phase-3-planning.md +121 -0
  58. package/dist/workflows/tasklifecycle-long/phase-4-implementation.md +104 -0
  59. package/dist/workflows/tasklifecycle-long/phase-5-verification.md +82 -0
  60. package/dist/workflows/tasklifecycle-long/phase-6-results-acceptance.md +79 -0
  61. package/dist/workflows/tasklifecycle-long/phase-7-evaluation.md +85 -0
  62. package/dist/workflows/tasklifecycle-long/phase-8-commit-push.md +80 -0
  63. package/dist/workflows/tasklifecycle-short/index.md +67 -0
  64. package/dist/workflows/tasklifecycle-short/short-phase-1-brief.md +66 -0
  65. package/dist/workflows/tasklifecycle-short/short-phase-2-implementation.md +72 -0
  66. package/dist/workflows/tasklifecycle-short/short-phase-3-closure.md +67 -0
  67. package/package.json +53 -0
@@ -0,0 +1,82 @@
1
+ ---
2
+ id: workflow.tasklifecycle.phase-5-verification
3
+ description: Task cycle Phase 5. Verifies the implementation with tests (unit and E2E if applicable) and reports metrics and coverage. DOES NOT fix code; if errors occur, it delegates a new fix task to the responsible agent.
4
+ owner: architect-agent
5
+ version: 1.1.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["phase5", "phase-5", "verification", "verify"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle.phase-5-verification
13
+
14
+ ## Input (REQUIRED)
15
+ - Architect review report created in Phase 4 exists:
16
+ - `.agent/artifacts/<taskId>-<taskTitle>/architect/review.md`
17
+ - Current task exists:
18
+ - `.agent/artifacts/<taskId>-<taskTitle>/task.md`
19
+ - `task.md` **MUST** reflect:
20
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_5.id`
21
+
22
+ > [!IMPORTANT]
23
+ > **Active Constitution (MANDATORY)**:
24
+ > - Load `constitution.project_architecture` before starting
25
+ > - Load `constitution.agents_behavior` (Section 7: Gates, Section 8: Constitution)
26
+
27
+ ## Output (REQUIRED)
28
+ - Detailed verification and testing report:
29
+ - `.agent/artifacts/<taskId>-<taskTitle>/verification.md`
30
+ - Status update in:
31
+ - `.agent/artifacts/<taskId>-<taskTitle>/task.md`
32
+
33
+ ## Objective (ONLY)
34
+ - Verify the implementation through tests (unit and E2E if applicable).
35
+ - Obtain explicit developer approval (YES) to move forward.
36
+
37
+ ## Reasoning (MANDATORY)
38
+ - Before executing, the responsible agent must explain to the developer what will be done and why.
39
+ - No document is required for this step.
40
+
41
+ ## Mandatory Steps
42
+
43
+ 0. **Role Activation and Prefix (MANDATORY)**
44
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
45
+ - Message: `🏛️ **architect-agent**: Starting Phase 5 - Verification.`
46
+
47
+ 1. Assign verification role
48
+ - The `qa-agent` **MUST** execute this phase.
49
+ - Message: `🧪 **qa-agent**: Starting technical verification...`
50
+
51
+ 2. Verify inputs
52
+ - `architect/review.md` exists.
53
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_5.id`.
54
+
55
+ 3. Load verification template (`templates.verification`).
56
+
57
+ 4. Execute testing and create report (`verification.md`).
58
+
59
+ 5. Request developer approval (MANDATORY, via console)
60
+ - Require binary decision **YES**.
61
+ - Record in `verification.md`: `decision: YES`.
62
+
63
+ 6. PASS
64
+ - Update `.agent/artifacts/<taskId>-<taskTitle>/task.md` (using prefix):
65
+ - Mark Phase 5 as completed
66
+ - Set timestamps and advance to Phase 6.
67
+
68
+ ## Pass
69
+ - All required artifacts are created from templates.
70
+ - Developer approval is recorded where required.
71
+
72
+ ## Gate (REQUIRED)
73
+ Requirements (all mandatory):
74
+ 1. `verification.md` exists with Gate PASS (`decision: YES`).
75
+ 2. `task.md` reflects timestamps and state:
76
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_6.id`
77
+ - `task.lifecycle.phases.phase-5-verification.completed == true`
78
+ - `task.lifecycle.phases.phase-5-verification.validated_at` not null
79
+ - `task.phase.updated_at` not null
80
+
81
+ If Gate FAIL:
82
+ - Execute **FAIL**.
@@ -0,0 +1,79 @@
1
+ ---
2
+ id: workflow.tasklifecycle.phase-6-results-acceptance
3
+ description: Task cycle Phase 6. Presents the final results report and requires explicit developer acceptance (YES/NO).
4
+ owner: architect-agent
5
+ version: 1.1.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["phase6", "phase-6", "results", "acceptance"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle.phase-6-results-acceptance
13
+
14
+ ## Input (REQUIRED)
15
+ - Verification report exists:
16
+ - `.agent/artifacts/<taskId>-<taskTitle>/verification.md`
17
+ - Current task exists:
18
+ - `.agent/artifacts/<taskId>-<taskTitle>/task.md`
19
+ - `task.md` **MUST** reflect:
20
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_6.id`
21
+
22
+ > [!IMPORTANT]
23
+ > **Active Constitution (MANDATORY)**:
24
+ > - Load `constitution.project_architecture` before starting
25
+ > - Load `constitution.agents_behavior` (Section 7: Gates, Section 8: Constitution)
26
+
27
+ ## Output (REQUIRED)
28
+ - Create results acceptance report:
29
+ - `.agent/artifacts/<taskId>-<taskTitle>/results-acceptance.md`
30
+ - Final developer decision (MANDATORY): **YES / NO**
31
+ - Status update in `task.md`.
32
+
33
+ ## Objective (ONLY)
34
+ - Present a **final results report** based on verification.
35
+ - Obtain a **final explicit acceptance (YES)** from the developer.
36
+
37
+ ## Template (MANDATORY)
38
+ - The report **MUST** be created using `templates.results_acceptance`.
39
+
40
+ ---
41
+
42
+ ## Reasoning (MANDATORY)
43
+ - Before executing, the responsible agent must explain to the developer what will be done and why.
44
+ - No document is required for this step.
45
+
46
+ ## Mandatory Steps
47
+
48
+ 0. **Role Activation and Prefix (MANDATORY)**
49
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
50
+ - Message: `🏛️ **architect-agent**: Starting Phase 6 - Results Acceptance.`
51
+
52
+ 1. Verify inputs
53
+ - `verification.md` and `task.md` exist.
54
+
55
+ 2. Load template and create `results-acceptance.md`.
56
+
57
+ 3. Request final developer acceptance (MANDATORY, via console)
58
+ - Require binary decision **YES**.
59
+ - Record in `results-acceptance.md`: `decision: YES`.
60
+
61
+ 4. PASS
62
+ - Update `.agent/artifacts/<taskId>-<taskTitle>/task.md` (using prefix).
63
+ - Mark phase completed and advance to Phase 7.
64
+
65
+ ## Pass
66
+ - All required artifacts are created from templates.
67
+ - Developer approval is recorded where required.
68
+
69
+ ## Gate (REQUIRED)
70
+ Requirements (all mandatory):
71
+ 1. `results-acceptance.md` exists with Gate PASS (`decision: YES`).
72
+ 2. `task.md` reflects timestamps and state:
73
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_7.id`
74
+ - `task.lifecycle.phases.phase-6-results-acceptance.completed == true`
75
+ - `task.lifecycle.phases.phase-6-results-acceptance.validated_at` not null
76
+ - `task.phase.updated_at` not null
77
+
78
+ If Gate FAIL:
79
+ - Execute **FAIL**.
@@ -0,0 +1,85 @@
1
+ ---
2
+ id: workflow.tasklifecycle.phase-7-evaluation
3
+ description: Task cycle Phase 7. Evaluates agent participation and task execution with objective scores.
4
+ owner: architect-agent
5
+ version: 1.1.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["phase7", "phase-7", "evaluation", "scoring"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle.phase-7-evaluation
13
+
14
+ ## Input (REQUIRED)
15
+ - Architect review report exists:
16
+ - `.agent/artifacts/<taskId>-<taskTitle>/architect/review.md`
17
+ - Current task exists:
18
+ - `.agent/artifacts/<taskId>-<taskTitle>/task.md`
19
+ - `task.md` **MUST** reflect:
20
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_7.id`
21
+
22
+ > [!IMPORTANT]
23
+ > **Active Constitution (MANDATORY)**:
24
+ > - Load `constitution.project_architecture` before starting
25
+ > - Load `constitution.agents_behavior` (Section 7: Gates, Section 8: Constitution)
26
+
27
+ ## Output (REQUIRED)
28
+ - Create task metrics (per agent and global):
29
+ - `.agent/artifacts/<taskId>-<taskTitle>/metrics.md`
30
+ - Status update in `task.md`.
31
+
32
+ ## Objective (ONLY)
33
+ - Objectively evaluate each participating agent.
34
+ - Obtain developer approval (YES) for the evaluation.
35
+
36
+ ## Templates (MANDATORY)
37
+ - Task metrics: `templates.task_metrics`
38
+ - Global metrics: `templates.agent_scores`
39
+
40
+ ---
41
+
42
+ ## Reasoning (MANDATORY)
43
+ - Before executing, the responsible agent must explain to the developer what will be done and why.
44
+ - No document is required for this step.
45
+
46
+ ## Mandatory Steps
47
+
48
+ 0. **Role Activation and Prefix (MANDATORY)**
49
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
50
+ - Message: `🏛️ **architect-agent**: Starting Phase 7 - Evaluation.`
51
+
52
+ 1. Verify inputs (`task.md`, `review.md`).
53
+
54
+ 2. Load templates and generate `metrics.md`.
55
+
56
+ 3. Evaluate agents and calculate global score.
57
+
58
+ 4. Request developer feedback and mandatory score (via console)
59
+ - Present `metrics.md`.
60
+ - Require explicit confirmation **YES**.
61
+ - Record score (1-10) in the artifact.
62
+
63
+ 5. PASS
64
+ - Update `.agent/artifacts/<taskId>-<taskTitle>/task.md` (using prefix).
65
+ - Mark phase completed and advance to Phase 8.
66
+
67
+ ## FAIL (MANDATORY)
68
+ 9. Declare Phase 7 as **NOT completed**.
69
+ - End blocked: do not advance phase.
70
+
71
+ ## Pass
72
+ - All required artifacts are created from templates.
73
+ - Developer approval is recorded where required.
74
+
75
+ ## Gate (REQUIRED)
76
+ Requirements (all mandatory):
77
+ 1. `metrics.md` exists with validation `Approved: YES`.
78
+ 2. `task.md` reflects timestamps and state:
79
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_8.id`
80
+ - `task.lifecycle.phases.phase-7-evaluation.completed == true`
81
+ - `task.lifecycle.phases.phase-7-evaluation.validated_at` not null
82
+ - `task.phase.updated_at` not null
83
+
84
+ If Gate FAIL:
85
+ - Execute **FAIL**.
@@ -0,0 +1,80 @@
1
+ ---
2
+ id: workflow.tasklifecycle.phase-8-commit-push
3
+ description: Task cycle Phase 8. Consolidates and publishes changes to the target branch through normalized commits (Conventional Commits), generates changelog, and requires explicit developer approval before final push.
4
+ owner: architect-agent
5
+ version: 1.1.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["phase8", "phase-8", "commit", "push"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle.phase-8-commit-push
13
+
14
+ ## Input (REQUIRED)
15
+ - Agent evaluation report exists:
16
+ - `.agent/artifacts/<taskId>-<taskTitle>/metrics.md`
17
+ - Current task exists:
18
+ - `.agent/artifacts/<taskId>-<taskTitle>/task.md`
19
+ - `task.md` **MUST** reflect:
20
+ - `task.phase.current == aliases.taskcycle-long.phases.phase_8.id`
21
+
22
+ > [!IMPORTANT]
23
+ > **Active Constitution (MANDATORY)**:
24
+ > - Load `constitution.project_architecture` before starting
25
+ > - Load `constitution.agents_behavior` (Section 7: Gates, Section 8: Constitution)
26
+
27
+ ## Output (REQUIRED)
28
+ - Create changelog:
29
+ - `.agent/artifacts/<taskId>-<taskTitle>/changelog.md`
30
+ - Status update in `task.md`.
31
+
32
+ ## Objective (ONLY)
33
+ - Consolidate and publish changes.
34
+ - Obtain developer approval (YES) for the final push.
35
+
36
+ ---
37
+
38
+ ## Reasoning (MANDATORY)
39
+ - Before executing, the responsible agent must explain to the developer what will be done and why.
40
+ - No document is required for this step.
41
+
42
+ ## Mandatory Steps
43
+
44
+ 0. **Role Activation and Prefix (MANDATORY)**
45
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
46
+ - Message: `🏛️ **architect-agent**: Starting Phase 8 - Commit & Push.`
47
+
48
+ 1. Verify inputs (`task.md`, `metrics.md`).
49
+
50
+ 2. Prepare and execute commits following **Conventional Commits**.
51
+
52
+ 3. Generate changelog (`changelog.md`).
53
+
54
+ 4. Request developer approval (MANDATORY, via console)
55
+ - Require binary decision **YES**.
56
+ - Record approval in history or changelog if applicable.
57
+
58
+ 5. Push to the target branch.
59
+
60
+ 6. PASS
61
+ - Update `.agent/artifacts/<taskId>-<taskTitle>/task.md` (using prefix).
62
+ - Mark phase completed and task technically closed.
63
+
64
+ ## Pass
65
+ - All required artifacts are created from templates.
66
+ - Developer approval is recorded where required.
67
+
68
+ ## Gate (REQUIRED)
69
+ Requirements (all mandatory):
70
+ 1. All commits comply with **Conventional Commits**.
71
+ 2. `changelog.md` exists.
72
+ 3. Developer has explicitly approved (YES).
73
+ 4. `task.md` reflects timestamps and final state:
74
+ - Task technically closed
75
+ - `task.lifecycle.phases.phase-8-commit-push.completed == true`
76
+ - `task.lifecycle.phases.phase-8-commit-push.validated_at` not null
77
+ - `task.phase.updated_at` not null
78
+
79
+ If Gate FAIL:
80
+ - Execute **FAIL**.
@@ -0,0 +1,67 @@
1
+ ---
2
+ id: workflow.tasklifecycle-short
3
+ owner: architect-agent
4
+ version: 1.1.0
5
+ severity: PERMANENT
6
+ description: Orchestrates the simplified (Short) lifecycle of a task starting from a valid init.
7
+ trigger:
8
+ commands: ["tasklifecycle-short", "/tasklifecycle-short"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle-short (Index)
13
+
14
+ ## 0. Role Activation and Prefix (MANDATORY)
15
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
16
+ - Message: `🏛️ **architect-agent**: Starting Short lifecycle.`
17
+
18
+ ## Required Indexes (MANDATORY)
19
+ This workflow does **NOT** define aliases outside its domain (`taskcycle-short`).
20
+ To use artifacts and templates, global indexes **MUST** be loaded:
21
+
22
+ - Artifacts index: `.agent/artifacts/index.md`
23
+ - Templates index: `.agent/templates/index.md`
24
+
25
+ ## Domain Aliases: `taskcycle-short` (MANDATORY)
26
+ This workflow defines aliases **only** for the `taskcycle-short` (task lifecycle short) domain.
27
+ There is **one unique namespace** `aliases.taskcycle-short.phases.*` containing:
28
+ - `id`: Phase ID
29
+ - `workflow`: Path to the phase workflow file
30
+
31
+ ## Aliases (YAML)
32
+ ```yaml
33
+ aliases:
34
+ taskcycle-short:
35
+ phases:
36
+ short_phase_1:
37
+ id: short-phase-1-brief
38
+ workflow: .agent/workflows/tasklifecycle-short/short-phase-1-brief.md
39
+ short_phase_2:
40
+ id: short-phase-2-implementation
41
+ workflow: .agent/workflows/tasklifecycle-short/short-phase-2-implementation.md
42
+ short_phase_3:
43
+ id: short-phase-3-closure
44
+ workflow: .agent/workflows/tasklifecycle-short/short-phase-3-closure.md
45
+ ```
46
+
47
+ ## Input (REQUIRED)
48
+ - `init` artifact exists with `task.strategy == "short"`.
49
+ - The developer has defined the task title and objective.
50
+
51
+ ## Output (REQUIRED)
52
+ - Task candidate with `task.strategy: short`.
53
+
54
+ ## Objective (ONLY)
55
+ - Execute a simplified 3-phase cycle for low-complexity tasks.
56
+
57
+ ## Pass
58
+ - `artifacts.candidate.task` exists with `task.strategy: short`.
59
+ - All phase workflows for the `taskcycle-short` domain are available.
60
+
61
+ ## Gate (REQUIRED)
62
+ Requirements (all mandatory):
63
+ 1. `artifacts.candidate.task` exists with `task.strategy: short`.
64
+ 2. All phase workflows for the `taskcycle-short` domain are available.
65
+
66
+ If Gate FAIL:
67
+ - Block until resolved.
@@ -0,0 +1,66 @@
1
+ ---
2
+ id: workflow.tasklifecycle-short.short-phase-1-brief
3
+ description: Phase 1 of the Short cycle. Merges Acceptance + Analysis + Planning. Includes 5 mandatory questions and complexity detection.
4
+ owner: architect-agent
5
+ version: 1.1.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["short-phase-1", "brief"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle-short.short-phase-1-brief
13
+
14
+ ## Input (REQUIRED)
15
+ - Task candidate exists.
16
+ - `task.strategy == "short"`.
17
+
18
+ ## Output (REQUIRED)
19
+ - Create `brief.md` using `templates.brief`.
20
+ - Create `acceptance.md` using `templates.acceptance`.
21
+
22
+ ## Reasoning (MANDATORY)
23
+ - Before executing, the architect-agent must explain to the developer what will be done and why.
24
+ - No document is required for this step.
25
+
26
+ ## Mandatory Steps
27
+
28
+ 0. **Role Activation and Prefix (MANDATORY)**
29
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
30
+ - Message: `🏛️ **architect-agent**: Starting Phase 1 Short - Brief.`
31
+
32
+ 1. Verify inputs
33
+ - Task candidate exists.
34
+ - `task.strategy == "short"`.
35
+
36
+ 2. Execute 5 mandatory questions.
37
+
38
+ 3. Complexity analysis.
39
+
40
+ 4. Create artifacts (`brief.md` and `acceptance.md`) using templates.
41
+
42
+ 5. Request developer approval (via console)
43
+ - Require binary decision **YES**.
44
+ - Record in `brief.md`: `decision: YES`.
45
+
46
+ 6. PASS
47
+ - Update `task.md` (using prefix):
48
+ - Mark phase as completed.
49
+ - Set timestamps and advance to Phase 2 Short.
50
+
51
+ ## Pass
52
+ - `brief.md` and `acceptance.md` are created from templates.
53
+ - Developer approval is recorded in `brief.md`.
54
+
55
+ ## Gate (REQUIRED)
56
+ Requirements (all mandatory):
57
+ 1. `brief.md` and `acceptance.md` exist with correct templates.
58
+ 2. Explicit developer approval is recorded in `brief.md`:
59
+ - `approval.developer.decision == YES`
60
+ 3. `task.md` reflects timestamps and state:
61
+ - `task.lifecycle.phases.short-phase-1-brief.completed == true`
62
+ - `task.lifecycle.phases.short-phase-1-brief.validated_at` is not null
63
+ - `task.phase.updated_at` is not null
64
+
65
+ If Gate FAIL:
66
+ - Block until resolved.
@@ -0,0 +1,72 @@
1
+ ---
2
+ id: workflow.tasklifecycle-short.short-phase-2-implementation
3
+ description: Phase 2 of the Short cycle. Executes implementation according to the approved brief.
4
+ owner: architect-agent
5
+ version: 1.1.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["short-phase-2", "implementation"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle-short.short-phase-2-implementation
13
+
14
+ ## Input (REQUIRED)
15
+ - Approved `brief.md` exists.
16
+ - Current task exists.
17
+ - `task.phase.current == aliases.taskcycle-short.phases.short_phase_2.id`.
18
+
19
+ ## Output (REQUIRED)
20
+ - Implementation report:
21
+ - `.agent/artifacts/<taskId>-<taskTitle>/architect/implementation.md` (use `templates.subtask_implementation`).
22
+
23
+ ## Reasoning (MANDATORY)
24
+ - Before executing, the architect-agent must explain to the developer what will be done and why.
25
+ - No document is required for this step.
26
+
27
+ ## Mandatory Steps
28
+
29
+ 0. **Role Activation and Prefix (MANDATORY)**
30
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
31
+ - Message: `🏛️ **architect-agent**: Starting Phase 2 Short - Implementation.`
32
+
33
+ 1. Pre-Flight Validation Protocol (MANDATORY)
34
+ - Physically read `brief.md`.
35
+ - **Explicitly cite** approval: `decision: YES`.
36
+
37
+ 2. Execute implementation according to `brief.md`.
38
+ - **Gate A (Activation)**: The agent must wait to be activated by the developer.
39
+ - **Gate B (Reasoning)**: The agent must present its reasoning before execution.
40
+ - **FORBIDDEN**: Do not use tools without passing Gates.
41
+
42
+ 3. Architectural Review (MANDATORY)
43
+ - The `architect-agent` **MUST** verify compliance with AC and architecture.
44
+
45
+ 4. Create implementation report.
46
+ - Create `.agent/artifacts/<taskId>-<taskTitle>/architect/implementation.md` using `templates.subtask_implementation`.
47
+
48
+ 5. Request developer approval (MANDATORY, via console)
49
+ - Require binary decision **YES**.
50
+ - Record in `architect/implementation.md`: `decision: YES`.
51
+
52
+ 6. PASS
53
+ - Update `task.md` (using prefix):
54
+ - Mark phase as completed.
55
+ - Set timestamps and advance to Phase 3 Short.
56
+
57
+ ## Pass
58
+ - Implementation report is created from `templates.subtask_implementation`.
59
+ - Developer approval is recorded in `architect/implementation.md`.
60
+
61
+ ## Gate (REQUIRED)
62
+ Requirements (all mandatory):
63
+ 1. Implementation report exists with APPROVED status.
64
+ 2. Explicit developer approval is recorded in `architect/implementation.md`:
65
+ - `approval.developer.decision == YES`
66
+ 3. `task.md` reflects timestamps and state:
67
+ - `task.lifecycle.phases.short-phase-2-implementation.completed == true`
68
+ - `task.lifecycle.phases.short-phase-2-implementation.validated_at` is not null
69
+ - `task.phase.updated_at` is not null
70
+
71
+ If Gate FAIL:
72
+ - Block until resolved.
@@ -0,0 +1,67 @@
1
+ ---
2
+ id: workflow.tasklifecycle-short.short-phase-3-closure
3
+ description: Phase 3 of the Short cycle. Merges Verification + Results + Commit.
4
+ owner: architect-agent
5
+ version: 1.1.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["short-phase-3", "closure"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: tasklifecycle-short.short-phase-3-closure
13
+
14
+ ## Input (REQUIRED)
15
+ - Approved implementation report exists.
16
+ - Current task exists.
17
+ - `task.phase.current == aliases.taskcycle-short.phases.short_phase_3.id`.
18
+
19
+ ## Output (REQUIRED)
20
+ - Create `closure.md` using `templates.closure`.
21
+
22
+ ## Reasoning (MANDATORY)
23
+ - Before executing, the architect-agent must explain to the developer what will be done and why.
24
+ - No document is required for this step.
25
+
26
+ ## Mandatory Steps
27
+
28
+ 0. **Role Activation and Prefix (MANDATORY)**
29
+ - The `architect-agent` **MUST** begin its intervention by identifying itself.
30
+ - Message: `🏛️ **architect-agent**: Starting Phase 3 Short - Closure.`
31
+
32
+ 1. Pre-Flight Validation Protocol (MANDATORY)
33
+ - Physically read the approved implementation report.
34
+ - **Explicitly cite** approval: `decision: YES`.
35
+
36
+ 2. Execute technical verification.
37
+
38
+ 3. Create `closure.md` artifact using `templates.closure`.
39
+
40
+ 4. Request final acceptance via console (YES) and record it in `closure.md`.
41
+
42
+ 5. Evaluate agents (MANDATORY)
43
+ - Request score (1-10) from the developer for each agent.
44
+ - **MANDATORY GATE**: Without scores, the task CANNOT be closed.
45
+
46
+ 6. Consolidate commits following Conventional Commits.
47
+
48
+ 7. PASS
49
+ - Mark task as **COMPLETED** in `task.md` (using prefix).
50
+ - Set final timestamps.
51
+
52
+ ## Pass
53
+ - `closure.md` is created from `templates.closure`.
54
+ - Final developer acceptance is recorded.
55
+
56
+ ## Gate (REQUIRED)
57
+ Requirements (all mandatory):
58
+ 1. `closure.md` exists with final developer acceptance (**YES**).
59
+ 2. Agent scores have been recorded.
60
+ 3. `task.md` reflects the task as completed and closed.
61
+ 4. `task.md` reflects timestamps and state:
62
+ - `task.lifecycle.phases.short-phase-3-closure.completed == true`
63
+ - `task.lifecycle.phases.short-phase-3-closure.validated_at` is not null
64
+ - `task.phase.updated_at` is not null
65
+
66
+ If Gate FAIL:
67
+ - Block until resolved.
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@christianmaf80/agentic-workflow",
3
+ "version": "1.2.0-beta.1",
4
+ "description": "Portable agentic workflow orchestration system with strict identity and gate discipline",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "agentic-workflow": "bin/cli.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "bin",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc && npm run copy-assets",
18
+ "copy-assets": "cp -r src/rules src/workflows src/templates src/artifacts dist/",
19
+ "start": "node dist/index.js",
20
+ "mcp": "node bin/cli.js mcp",
21
+ "publish:npm": "npm publish --registry https://registry.npmjs.org --access public",
22
+ "publish:github": "npm publish --registry https://npm.pkg.github.com"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/christian-marino-alvarez/agentic-workflow.git"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/christian-marino-alvarez/agentic-workflow/issues"
30
+ },
31
+ "homepage": "https://github.com/christian-marino-alvarez/agentic-workflow#readme",
32
+ "keywords": [
33
+ "agent",
34
+ "workflow",
35
+ "orchestration",
36
+ "ai",
37
+ "llm",
38
+ "agentic",
39
+ "governance"
40
+ ],
41
+ "author": "Christian Marino Alvarez",
42
+ "license": "ISC",
43
+ "dependencies": {
44
+ "@clack/prompts": "^0.7.0",
45
+ "@modelcontextprotocol/sdk": "^1.25.2",
46
+ "commander": "^11.1.0",
47
+ "gray-matter": "^4.0.3"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^20.10.6",
51
+ "typescript": "^5.3.3"
52
+ }
53
+ }