siesa-agents 2.1.28 → 2.1.29

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 CHANGED
@@ -101,8 +101,6 @@ tu-proyecto/
101
101
  └── [workflows y configuración de GitHub]
102
102
  ```
103
103
 
104
-
105
-
106
104
  ## Soporte
107
105
 
108
106
  Si encuentras algún problema durante la instalación, por favor verifica:
package/bin/install.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  const fs = require('fs-extra');
4
4
  const path = require('path');
5
+ const { sourceMapsEnabled } = require('process');
5
6
  const readline = require('readline');
6
7
 
7
-
8
8
  class SiesaBmadInstaller {
9
9
  constructor() {
10
10
  // Definir las carpetas primero (nombres en el paquete vs nombres finales)
@@ -14,7 +14,8 @@ class SiesaBmadInstaller {
14
14
  { source: 'github', target: '.github' },
15
15
  { source: 'claude', target: '.claude' },
16
16
  { source: 'kiro', target: '.kiro' },
17
- { source: 'resources', target: '.resources' }
17
+ { source: 'resources', target: '.resources' },
18
+ { source: 'mcp.json', target: '.mcp.json' }
18
19
  ];
19
20
 
20
21
  // Lista de archivos que se preservan automáticamente (no se crean backups)
@@ -39,7 +40,7 @@ class SiesaBmadInstaller {
39
40
  console.log('╚════██║██║██╔══╝ ╚════██║██╔══██║ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ╚════██║');
40
41
  console.log('███████║██║███████╗███████║██║ ██║ ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ███████║');
41
42
  console.log('╚══════╝╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝');
42
- console.log('\n');
43
+ console.log('');
43
44
  }
44
45
 
45
46
  findPackageDir() {
@@ -163,8 +164,12 @@ class SiesaBmadInstaller {
163
164
 
164
165
  async getAllFiles(dir) {
165
166
  const files = [];
167
+ const stat = await fs.stat(dir);
168
+ if (stat.isFile()) {
169
+ files.push(dir);
170
+ return files;
171
+ }
166
172
  const items = await fs.readdir(dir);
167
-
168
173
  for (const item of items) {
169
174
  const fullPath = path.join(dir, item);
170
175
  const stat = await fs.stat(fullPath);
@@ -296,7 +301,6 @@ class SiesaBmadInstaller {
296
301
  const backupFiles = await this.findBackupFiles(targetPath);
297
302
 
298
303
  // Copiar la carpeta preservando technical-preferences.md
299
-
300
304
  await fs.copy(sourcePath, targetPath, {
301
305
  overwrite: true,
302
306
  recursive: true,
@@ -71,6 +71,7 @@ commands:
71
71
  - explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer.
72
72
  - review-qa: run task `apply-qa-fixes.md'
73
73
  - run-tests: Execute linting and tests
74
+ - update-story-jira-status {story}: run task `update-story-jira-status.md` with the provided story file - Update story status in Jira with validation of tasks completion and QA gates
74
75
  - exit: Say goodbye as the Developer, and then abandon inhabiting this persona
75
76
 
76
77
  dependencies:
@@ -79,5 +80,7 @@ dependencies:
79
80
  tasks:
80
81
  - apply-qa-fixes.md
81
82
  - execute-checklist.md
83
+ - update-story-jira-status.md
84
+ - validate-jira-auth.md
82
85
  - validate-next-story.md
83
86
  ```
@@ -30,12 +30,22 @@ activation-instructions:
30
30
  - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
31
31
  - STAY IN CHARACTER!
32
32
  - CRITICAL: On activation, ONLY greet user, auto-run `*help`, and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
33
+ - JIRA CONFIGURATION CHECK: Before executing any Jira-related command (sync-prd-to-jira, create-epic, create-story), ALWAYS check if docs/jira-conf.md exists. If NOT found, inform user that project-specific Jira configuration is required and offer to run `*jira-setup` command to create it interactively.
33
34
  agent:
34
35
  name: John
35
36
  id: pm
36
37
  title: Product Manager
37
38
  icon: 📋
38
39
  whenToUse: Use for creating PRDs, product strategy, feature prioritization, roadmap planning, and stakeholder communication
40
+ jira-config:
41
+ project-config-file: docs/jira-conf.md
42
+ global-preferences-file: .bmad-core/data/jira-preferences.md
43
+ required-project-fields:
44
+ - cloud-id: Jira Cloud ID (UUID format)
45
+ - jira-url: Full Jira instance URL
46
+ - project-key: Jira project key (e.g., PM, PROJ)
47
+ - project-name: Human-readable project name
48
+ validation: Auto-check docs/jira-conf.md before Jira operations, prompt for setup if missing
39
49
  persona:
40
50
  role: Investigative Product Strategist & Market-Savvy PM
41
51
  style: Analytical, inquisitive, data-driven, user-focused, pragmatic
@@ -64,7 +74,10 @@ commands:
64
74
  - create-prd: run task create-doc.md with template prd-tmpl.yaml
65
75
  - create-story: Create user story from requirements (task brownfield-create-story)
66
76
  - doc-out: Output full document to current destination file
77
+ - jira-setup: Configure Jira integration (provider, project, organization)
67
78
  - shard-prd: run the task shard-doc.md for the provided prd.md (ask if not found)
79
+ - sync-epic-files-to-jira: Sync individual epic files from docs/prd/ to Jira (task sync-epic-files-to-jira.md)
80
+ - sync-prd-to-jira: Automatically create Jira epics and stories from PRD (task sync-prd-to-jira.md)
68
81
  - yolo: Toggle Yolo Mode
69
82
  - exit: Exit (confirm)
70
83
  dependencies:
@@ -72,6 +85,7 @@ dependencies:
72
85
  - change-checklist.md
73
86
  - pm-checklist.md
74
87
  data:
88
+ - jira-preferences.md
75
89
  - technical-preferences.md
76
90
  tasks:
77
91
  - brownfield-create-epic.md
@@ -80,8 +94,13 @@ dependencies:
80
94
  - create-deep-research-prompt.md
81
95
  - create-doc.md
82
96
  - execute-checklist.md
97
+ - jira-setup.md
83
98
  - shard-doc.md
99
+ - sync-epic-files-to-jira.md
100
+ - sync-prd-to-jira.md
101
+ - validate-jira-auth.md
84
102
  templates:
85
103
  - brownfield-prd-tmpl.yaml
104
+ - jira-conf-tmpl.md
86
105
  - prd-tmpl.yaml
87
106
  ```
@@ -30,6 +30,7 @@ activation-instructions:
30
30
  - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
31
31
  - STAY IN CHARACTER!
32
32
  - CRITICAL: On activation, ONLY greet user, auto-run `*help`, and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
33
+ - JIRA CONFIGURATION CHECK: Before executing sync-story-to-jira command, ALWAYS check if docs/jira-conf.md exists. If NOT found, inform user that project-specific Jira configuration is required and offer to run `*jira-setup` command to create it interactively.
33
34
  agent:
34
35
  name: Sarah
35
36
  id: po
@@ -37,6 +38,15 @@ agent:
37
38
  icon: 📝
38
39
  whenToUse: Use for backlog management, story refinement, acceptance criteria, sprint planning, and prioritization decisions
39
40
  customization: null
41
+ jira-config:
42
+ project-config-file: docs/jira-conf.md
43
+ global-preferences-file: .bmad-core/data/jira-preferences.md
44
+ required-project-fields:
45
+ - cloud-id: Jira Cloud ID (UUID format)
46
+ - jira-url: Full Jira instance URL
47
+ - project-key: Jira project key (e.g., PM, PROJ)
48
+ - project-name: Human-readable project name
49
+ validation: Auto-check docs/jira-conf.md before Jira operations, prompt for setup if missing
40
50
  persona:
41
51
  role: Technical Product Owner & Process Steward
42
52
  style: Meticulous, analytical, detail-oriented, systematic, collaborative
@@ -64,7 +74,11 @@ commands:
64
74
  - create-story: Create user story from requirements (task brownfield-create-story)
65
75
  - doc-out: Output full document to current destination file
66
76
  - execute-checklist-po: Run task execute-checklist (checklist po-master-checklist)
77
+ - jira-setup: Configure Jira integration (provider, project, organization)
67
78
  - shard-doc {document} {destination}: run the task shard-doc against the optionally provided document to the specified destination
79
+ - sync-story-to-jira {story}: Sync approved story tasks/subtasks to Jira (task sync-story-to-jira)
80
+ - sync-epic-to-jira {epic-number}: Find all stories matching pattern {epic-number}.*.story.md in docs/stories/, then for EACH story execute the full sync-story-to-jira workflow creating all Jira subtasks (task sync-stories-batch-to-jira with scope epic-{epic-number})
81
+ - update-epic-status {epic-number}: Batch update status of all stories in an epic (task update-epic-stories-jira-status)
68
82
  - validate-story-draft {story}: run the task validate-next-story against the provided story file
69
83
  - yolo: Toggle Yolo Mode off on - on will skip doc section confirmations
70
84
  - exit: Exit (confirm)
@@ -72,11 +86,19 @@ dependencies:
72
86
  checklists:
73
87
  - change-checklist.md
74
88
  - po-master-checklist.md
89
+ data:
90
+ - jira-preferences.md
75
91
  tasks:
76
92
  - correct-course.md
77
93
  - execute-checklist.md
94
+ - jira-setup.md
78
95
  - shard-doc.md
96
+ - sync-stories-batch-to-jira.md
97
+ - sync-story-to-jira.md
98
+ - update-epic-stories-jira-status.md
99
+ - validate-jira-auth.md
79
100
  - validate-next-story.md
80
101
  templates:
102
+ - jira-conf-tmpl.md
81
103
  - story-tmpl.yaml
82
104
  ```
@@ -0,0 +1,153 @@
1
+ # Jira Integration Preferences
2
+
3
+ ## Connection Configuration
4
+
5
+ ### Provider Settings
6
+ - **Provider:** `jira`
7
+ - **Cloud ID:** `3b04e1a3-a260-4679-bdc8-0440507fbe26`
8
+ - **Jira URL:** `https://siesa-test-sandbox.atlassian.net`
9
+
10
+ ### Project Configuration
11
+ - **Project Key:** `PM`
12
+ - **Project Name:** `Prueba MCP`
13
+
14
+ ## Issue Type Configuration
15
+
16
+ ### Epic Configuration
17
+ - **Issue Type:** `Epic`
18
+ - **Issue Type ID:** `10317`
19
+ - **Default Epic Name Prefix:** _(none, use clean titles)_
20
+
21
+ ### Story Configuration
22
+ - **Issue Type:** `Story`
23
+ - **Issue Type ID:** `10316`
24
+ - **Default Story Name Prefix:** _(none, use clean titles)_
25
+
26
+ ### Other Available Issue Types
27
+ - **Task:** `10314`
28
+ - **Bug:** `10315`
29
+ - **Subtarea:** `10318`
30
+
31
+ ## Field Mappings
32
+
33
+ ### Standard Fields
34
+ - **Summary:** Maps to Epic/Story title
35
+ - **Description:** Maps to Epic/Story description
36
+ - **Priority:** Default is `Medium` (options: `Highest`, `High`, `Medium`, `Low`, `Lowest`)
37
+ - **Labels:** Auto-generated from PRD metadata (e.g., `prd-sync`, `automated`, epic name)
38
+
39
+ ### Custom Fields (Proyecto PM)
40
+
41
+ #### Story Custom Fields (REQUIRED)
42
+ - **Acceptance Criteria:** `customfield_10136` - **MANDATORY for Stories** - Success conditions extracted from PRD
43
+
44
+ #### Optional Custom Fields
45
+ - **Story Points:** `customfield_10016` - Effort estimation (optional)
46
+ - **Sprint:** `customfield_10020` - Sprint assignment (optional, array type)
47
+ - **Start Date:** `customfield_10015` - Planning date (optional)
48
+
49
+ #### Epic Custom Fields
50
+ _(No custom fields required for Epics in this project)_
51
+
52
+ ## PRD Parsing Configuration
53
+
54
+ ### Epic Detection
55
+ Epics are identified in PRD by:
56
+ - **Section Headers:** Level 2-3 headers (`##` or `###`) in the PRD containing "Epic", "Feature Set", or "Module"
57
+ - **YAML Frontmatter:** `epics:` section in PRD metadata
58
+ - **Explicit Markers:** `<!-- EPIC: Epic Name -->` in PRD
59
+
60
+ ### Story Detection
61
+ Stories are identified in PRD by:
62
+ - **Subsections:** Level 4+ headers (`####`) under epic sections
63
+ - **List Items:** Numbered or bulleted lists under "User Stories" or "Requirements" sections
64
+ - **User Story Format:** Text matching "As a [role], I want [action], so that [benefit]"
65
+
66
+ ### Content Extraction Rules
67
+ - **Epic Goal:** First paragraph after epic header
68
+ - **Epic Description:** Full content of epic section (required for Jira description field)
69
+ - **Story Description:** Content immediately following story identifier
70
+ - **Acceptance Criteria (REQUIRED):** Sections marked with "Acceptance Criteria", "AC:", "Definition of Done", or checkbox lists - **MUST BE EXTRACTED for all Stories**
71
+ - **Technical Details:** Sections marked with "Technical Notes", "Implementation", or "Tech Stack"
72
+
73
+ ## Automation Preferences
74
+
75
+ ### Batch Creation Settings
76
+ - **Create Epics First:** `true` - Create all epics before stories
77
+ - **Link Stories Automatically:** `true` - Auto-link stories to parent epics
78
+ - **Preserve PRD Structure:** `true` - Maintain hierarchy from PRD
79
+ - **Dry Run Mode:** `false` - Set to `true` to preview without creating
80
+
81
+ ### Naming Conventions
82
+ - **Epic Naming:** `{Epic Name} - {Brief Description}`
83
+ - **Story Naming:** `{User Role}: {Action/Capability}`
84
+ - **Include PRD Reference:** `true` - Add PRD source reference in description
85
+
86
+ ### Default Values
87
+ - **Default Assignee:** `unassigned` (or specify username)
88
+ - **Default Sprint:** `unassigned` (or specify sprint name)
89
+ - **Default Priority:** `Medium`
90
+ - **Default Story Points:** `null` (will be estimated later)
91
+
92
+ ## Error Handling
93
+
94
+ ### Duplicate Detection
95
+ - **Check Existing Issues:** `true` - Prevent duplicate creation
96
+ - **Match Criteria:** `summary` + `labels` containing `prd-sync`
97
+ - **On Duplicate:** `skip` | `update` | `create-new`
98
+
99
+ ### Failed Creation Handling
100
+ - **Continue on Error:** `true` - Continue creating remaining items
101
+ - **Log Failed Items:** `true` - Report items that couldn't be created
102
+ - **Retry Failed:** `false` - Manual retry required
103
+
104
+ ## Important Rules for Proyecto PM
105
+
106
+ ### Story Creation Requirements
107
+ ⚠️ **CRITICAL:** When creating Stories in the PM project:
108
+
109
+ 1. **Acceptance Criteria are MANDATORY**
110
+ - ALWAYS extract acceptance criteria from the PRD
111
+ - ALWAYS populate `customfield_10136` with acceptance criteria
112
+ - If no acceptance criteria found in PRD, STOP and request them from user before creating the Story
113
+ - Format: Use bullet points or numbered lists
114
+
115
+ 2. **Field Population**
116
+ - `summary`: Story title (required)
117
+ - `description`: Story description (required)
118
+ - `customfield_10136`: Acceptance criteria (REQUIRED - cannot be empty)
119
+ - `customfield_10016`: Story points (optional - leave empty if not in PRD)
120
+
121
+ 3. **Quality Standards**
122
+ - Acceptance criteria must be clear, testable, and specific
123
+ - Each criterion should be verifiable
124
+ - Use format: "- Criterion 1\n- Criterion 2\n- Criterion 3"
125
+
126
+ ### Epic Creation Requirements
127
+ - Epics do NOT require custom fields in this project
128
+ - Use standard `summary` and `description` fields only
129
+ - Description should include the epic goal and full context
130
+
131
+ ## Notes
132
+
133
+ ### Finding Your Custom Field IDs
134
+ The custom field IDs for this project are already configured above. If you need to find others:
135
+
136
+ 1. Go to Jira Settings > Issues > Custom Fields
137
+ 2. Click on the custom field you want to use
138
+ 3. Look at the URL - the ID is in the format `customfield_XXXXX`
139
+
140
+ Or use the Jira API:
141
+ ```bash
142
+ curl -u email@example.com:api_token \
143
+ https://siesa-test-sandbox.atlassian.net/rest/api/3/field
144
+ ```
145
+
146
+ ### Provider Information
147
+ **Provider = `jira`** means we're using Atlassian Jira Cloud as our issue tracking system.
148
+ Other options exist (GitHub, GitLab, Azure DevOps, Linear) but this project uses Jira.
149
+
150
+ ---
151
+
152
+ **Last Updated:** 2025-12-10
153
+ **Configuration Version:** 1.0.0
@@ -75,10 +75,41 @@ ALWAYS cite source documents: `[Source: architecture/{filename}.md#{section}]`
75
75
  - Ensure file paths, component locations, or module names align with defined structures
76
76
  - Document any structural conflicts in "Project Structure Notes" section within the story draft
77
77
 
78
+ ### 4.5. Elicit Jira Link (If Exists)
79
+
80
+ ```elicit
81
+ path: Check for existing Jira issue
82
+ format: |
83
+ Does this story already have a Jira issue created?
84
+
85
+ If yes, provide the Jira issue key (e.g., PM-9) or full URL.
86
+ If no, type 'no' or leave empty.
87
+
88
+ Jira link (or 'no'):
89
+ ```
90
+
91
+ **Action:** Handle Jira link information
92
+
93
+ - [ ] Accept user input
94
+ - [ ] If provided: Extract Jira key (e.g., PM-9) and construct full URL using jira-conf.md settings
95
+ - [ ] If not provided: Set default message "Not synced to Jira yet"
96
+ - [ ] Store for use in Jira Information section
97
+
78
98
  ### 5. Populate Story Template with Full Context
79
99
 
80
100
  - Create new story file: `{devStoryLocation}/{epicNum}.{storyNum}.story.md` using Story Template
81
101
  - Fill in basic story information: Title, Status (Draft), Story statement, Acceptance Criteria from Epic
102
+ - **`Jira Information` section:**
103
+ - If Jira key was provided: Populate with key and full URL
104
+ - If not provided: Set with default message:
105
+ ```markdown
106
+ ## Jira Information
107
+
108
+ **Jira Issue Key:** Not synced to Jira yet
109
+ **Jira URL:** Story will be synced to Jira using sync-story-to-jira task
110
+
111
+ _Note: Tasks will not be created in Jira until this story has an associated Jira issue._
112
+ ```
82
113
  - **`Dev Notes` section (CRITICAL):**
83
114
  - CRITICAL: This section MUST contain ONLY information extracted from architecture documents. NEVER invent or assume technical details.
84
115
  - Include ALL relevant technical details from Steps 2-3, organized by category: