@exaudeus/workrail 3.11.2 → 3.13.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.
Files changed (77) hide show
  1. package/dist/console/assets/index-DW78t31j.css +1 -0
  2. package/dist/console/assets/index-EsSXrC_a.js +28 -0
  3. package/dist/console/index.html +2 -2
  4. package/dist/di/container.js +8 -0
  5. package/dist/di/tokens.d.ts +1 -0
  6. package/dist/di/tokens.js +1 -0
  7. package/dist/infrastructure/session/HttpServer.js +2 -14
  8. package/dist/manifest.json +139 -91
  9. package/dist/mcp/boundary-coercion.d.ts +2 -0
  10. package/dist/mcp/boundary-coercion.js +73 -0
  11. package/dist/mcp/handler-factory.d.ts +1 -1
  12. package/dist/mcp/handler-factory.js +13 -6
  13. package/dist/mcp/handlers/shared/request-workflow-reader.d.ts +10 -2
  14. package/dist/mcp/handlers/shared/request-workflow-reader.js +27 -10
  15. package/dist/mcp/handlers/shared/workflow-source-visibility.d.ts +3 -1
  16. package/dist/mcp/handlers/shared/workflow-source-visibility.js +7 -3
  17. package/dist/mcp/handlers/v2-execution/replay.js +25 -1
  18. package/dist/mcp/handlers/v2-execution/start.js +23 -17
  19. package/dist/mcp/handlers/v2-manage-workflow-source.d.ts +7 -0
  20. package/dist/mcp/handlers/v2-manage-workflow-source.js +50 -0
  21. package/dist/mcp/handlers/v2-workflow.js +123 -8
  22. package/dist/mcp/output-schemas.d.ts +393 -0
  23. package/dist/mcp/output-schemas.js +49 -1
  24. package/dist/mcp/server.js +2 -0
  25. package/dist/mcp/tool-descriptions.js +20 -0
  26. package/dist/mcp/tools.js +6 -0
  27. package/dist/mcp/types/tool-description-types.d.ts +1 -1
  28. package/dist/mcp/types/tool-description-types.js +1 -0
  29. package/dist/mcp/types/workflow-tool-edition.d.ts +1 -1
  30. package/dist/mcp/types.d.ts +2 -0
  31. package/dist/mcp/v2/tool-registry.js +8 -0
  32. package/dist/mcp/v2/tools.d.ts +15 -0
  33. package/dist/mcp/v2/tools.js +8 -1
  34. package/dist/v2/durable-core/constants.d.ts +1 -0
  35. package/dist/v2/durable-core/constants.js +2 -1
  36. package/dist/v2/durable-core/domain/observation-builder.d.ts +4 -1
  37. package/dist/v2/durable-core/domain/observation-builder.js +9 -0
  38. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +76 -16
  39. package/dist/v2/durable-core/schemas/session/events.d.ts +26 -5
  40. package/dist/v2/durable-core/schemas/session/events.js +2 -1
  41. package/dist/v2/infra/in-memory/managed-source-store/index.d.ts +8 -0
  42. package/dist/v2/infra/in-memory/managed-source-store/index.js +33 -0
  43. package/dist/v2/infra/local/data-dir/index.d.ts +2 -0
  44. package/dist/v2/infra/local/data-dir/index.js +6 -0
  45. package/dist/v2/infra/local/managed-source-store/index.d.ts +15 -0
  46. package/dist/v2/infra/local/managed-source-store/index.js +164 -0
  47. package/dist/v2/infra/local/session-summary-provider/index.js +2 -0
  48. package/dist/v2/infra/local/workspace-anchor/index.js +1 -0
  49. package/dist/v2/ports/data-dir.port.d.ts +2 -0
  50. package/dist/v2/ports/managed-source-store.port.d.ts +25 -0
  51. package/dist/v2/ports/managed-source-store.port.js +2 -0
  52. package/dist/v2/ports/workspace-anchor.port.d.ts +3 -0
  53. package/dist/v2/projections/resume-ranking.d.ts +1 -0
  54. package/dist/v2/usecases/console-routes.js +26 -0
  55. package/dist/v2/usecases/console-service.js +25 -6
  56. package/dist/v2/usecases/console-types.d.ts +22 -1
  57. package/dist/v2/usecases/worktree-service.d.ts +10 -0
  58. package/dist/v2/usecases/worktree-service.js +136 -0
  59. package/package.json +1 -1
  60. package/workflows/adaptive-ticket-creation.json +276 -282
  61. package/workflows/architecture-scalability-audit.json +317 -0
  62. package/workflows/document-creation-workflow.json +70 -191
  63. package/workflows/documentation-update-workflow.json +59 -309
  64. package/workflows/intelligent-test-case-generation.json +37 -212
  65. package/workflows/personal-learning-materials-creation-branched.json +1 -21
  66. package/workflows/presentation-creation.json +143 -308
  67. package/workflows/relocation-workflow-us.json +161 -535
  68. package/workflows/routines/tension-driven-design.json +5 -5
  69. package/workflows/scoped-documentation-workflow.json +110 -181
  70. package/workflows/workflow-for-workflows.v2.json +21 -5
  71. package/dist/console/assets/index-C5C4nDs4.css +0 -1
  72. package/dist/console/assets/index-CSUqsoQl.js +0 -28
  73. package/workflows/CHANGELOG-bug-investigation.md +0 -298
  74. package/workflows/bug-investigation.agentic.json +0 -212
  75. package/workflows/bug-investigation.json +0 -112
  76. package/workflows/mr-review-workflow.agentic.json +0 -538
  77. package/workflows/mr-review-workflow.json +0 -277
@@ -1,291 +1,285 @@
1
1
  {
2
- "id": "adaptive-ticket-creation",
3
- "name": "Adaptive Ticket Creation Workflow",
4
- "version": "0.1.0",
5
- "description": "An intelligent workflow for creating high-quality Jira tickets. Uses LLM-driven path selection to automatically choose between Simple, Standard, or Epic complexity paths based on request analysis.",
6
- "preconditions": [
7
- "User has provided a clear objective for the ticket(s) to be created",
8
- "Agent has access to relevant context (PRDs, Figma links, etc.) if available",
9
- "Agent has file system access for persistent feedback mechanism",
10
- "Agent can maintain context variables throughout the workflow"
11
- ],
12
- "clarificationPrompts": [
13
- "What is the main feature or task you want to implement?",
14
- "Do you have any supporting documentation (PRDs, designs, specs)?",
15
- "What are your team's Jira conventions or preferences?",
16
- "Are there any specific constraints or requirements?",
17
- "What is the expected timeline or priority level?"
18
- ],
19
- "steps": [
20
- {
21
- "id": "phase-0-intelligent-triage",
22
- "title": "Phase 0: Intelligent Triage & Path Selection",
23
- "prompt": "**PREP**: Analyze the user's request to determine the appropriate complexity path.\n\n**IMPLEMENT**: Evaluate the request for complexity indicators:\n- **Simple Path**: Single ticket, clear requirements, minimal dependencies, straightforward implementation\n- **Standard Path**: Multiple related tickets, moderate complexity, some analysis needed, clear scope\n- **Epic Path**: Complex feature requiring decomposition, extensive planning, multiple teams/dependencies\n\n**VERIFY**: Document your path selection reasoning and set the pathComplexity context variable. Load any existing rules from `./.workflow_rules/ticket_creation.md` to follow team preferences.",
24
- "agentRole": "You are an expert Product Manager and Mobile Tech Lead with extensive experience in feature scoping and project complexity assessment. Your role is to quickly and accurately classify requests based on scope, dependencies, and team impact while considering business priorities and technical constraints.",
25
- "guidance": [
26
- "Look for complexity indicators: scope size, unknowns, dependencies, team impact",
27
- "Make the decision autonomously based on the request analysis",
28
- "Set context variables that will be used in subsequent conditional steps"
29
- ],
30
- "requireConfirmation": true
2
+ "id": "adaptive-ticket-creation",
3
+ "name": "Adaptive Ticket Creation Workflow",
4
+ "version": "1.0.0",
5
+ "description": "Create high-quality Jira tickets by automatically selecting the right complexity path (Simple, Standard, or Epic) based on request analysis. One polished ticket for simple requests; structured decomposition with estimates for epics.",
6
+ "preconditions": [
7
+ "User has provided a description of the feature, task, or work to be ticketed.",
8
+ "Agent has file system access for loading team preferences and persisting rules."
9
+ ],
10
+ "metaGuidance": [
11
+ "ROLE: expert Product Manager and Mobile Tech Lead. Triage autonomously, write developer-ready tickets with full context, and produce objectively testable acceptance criteria — not user-story paraphrases.",
12
+ "EXPLORE FIRST: use tools to gather context before asking the user anything. Ask only for information you genuinely cannot determine with tools or from the request itself.",
13
+ "TEAM RULES: load and follow ./.workflow_rules/ticket_creation.md when it exists. Preferences there override your defaults. Rules are captured only on the Epic path complex sessions are where durable conventions emerge and where the investment pays off.",
14
+ "AUTONOMOUS TRIAGE: decide pathComplexity (Simple / Standard / Epic) yourself from the request. Surface your reasoning, then wait for confirmation.",
15
+ "QUALITY FLOOR: every ticket must have a context-rich description, checkbox-style acceptance criteria that are objectively testable, and an effort estimate."
16
+ ],
17
+ "steps": [
18
+ {
19
+ "id": "phase-0-triage",
20
+ "title": "Phase 0: Intelligent Triage and Path Selection",
21
+ "promptBlocks": {
22
+ "goal": "Analyze the request, gather available context, and select the right complexity path before doing any ticket work.",
23
+ "constraints": [
24
+ "Decide the path yourself do not ask the user to choose.",
25
+ "Load ./.workflow_rules/ticket_creation.md if it exists and let it influence your triage. If the file does not exist, note this explicitly in your output so the user knows team conventions were not applied.",
26
+ "Set pathComplexity to exactly one of: Simple, Standard, or Epic."
27
+ ],
28
+ "procedure": [
29
+ "Read any attached documents, linked PRDs, or referenced specs.",
30
+ "Identify complexity signals: scope breadth, number of distinct deliverables, cross-team dependencies, technical unknowns, and estimated ticket count.",
31
+ "Apply the triage rubric: Simple = single ticket, clear requirements, no blocking unknowns, minimal dependencies. Standard = multiple related tickets, moderate scope, some analysis needed. Epic = complex feature requiring decomposition, multiple teams or significant unknowns, likely 6+ tickets.",
32
+ "Upgrade triggers — escalate to Standard if: request implies more than one clearly separate work item. Escalate to Epic if: multiple teams are involved, architecture decisions are unresolved, or you estimate more than five tickets.",
33
+ "State your selected path and the top three reasons. Capture pathComplexity in context."
34
+ ],
35
+ "outputRequired": {
36
+ "notesMarkdown": "Selected path (Simple/Standard/Epic), top three triage reasons, any complexity upgrade triggers observed."
31
37
  },
32
- {
33
- "id": "phase-a1-simple-ticket-gen",
34
- "title": "Path A: Simple Ticket Generation",
35
- "runCondition": {
36
- "var": "pathComplexity",
37
- "equals": "Simple"
38
- },
39
- "prompt": "**PREP**: Since this is a simple request, focus on creating a single high-quality ticket.\n\n**IMPLEMENT**: Generate a complete ticket with:\n- Clear, descriptive title following team conventions\n- Detailed description with sufficient context\n- Specific, testable acceptance criteria\n- Appropriate labels, priority, and story points\n- Any relevant links or attachments\n\n**VERIFY**: Review the ticket for completeness and clarity. This completes the Simple path workflow.",
40
- "agentRole": "You are a skilled Product Manager focused on creating clear, actionable tickets for development teams. Your expertise lies in writing comprehensive ticket descriptions that provide developers with all necessary context while maintaining clarity and brevity.",
41
- "validationCriteria": [
42
- {
43
- "type": "regex",
44
- "pattern": "(?i)##?\\s*Title:?",
45
- "message": "Ticket must include a clear title (e.g., 'Title:' or '## Title')"
46
- },
47
- {
48
- "type": "regex",
49
- "pattern": "(?i)##?\\s*Description:?",
50
- "message": "Ticket must include a detailed description (e.g., 'Description:' or '## Description')"
51
- },
52
- {
53
- "type": "regex",
54
- "pattern": "(?i)##?\\s*Acceptance Criteria:?",
55
- "message": "Ticket must include specific acceptance criteria (e.g., 'Acceptance Criteria:' or '## Acceptance Criteria')"
56
- },
57
- {
58
- "type": "regex",
59
- "pattern": "\\[\\s*\\].{5,}",
60
- "message": "Acceptance criteria should include checkboxes followed by descriptive text (at least 5 characters)."
61
- },
62
- {
63
- "type": "length",
64
- "min": 300,
65
- "max": 2000,
66
- "message": "Ticket should be between 300-2000 characters for adequate detail"
67
- }
68
- ],
69
- "guidance": [
70
- "This is the complete fast track - workflow ends after this step",
71
- "Focus on quality over quantity - one excellent ticket",
72
- "Include all necessary context for the developer"
73
- ],
74
- "requireConfirmation": true,
75
- "hasValidation": true
38
+ "verify": [
39
+ "pathComplexity is set to Simple, Standard, or Epic.",
40
+ "Triage reasoning is explicit enough for the user to agree or push back.",
41
+ "Any loaded team rules are acknowledged if found."
42
+ ]
43
+ },
44
+ "requireConfirmation": true
45
+ },
46
+ {
47
+ "id": "phase-1-simple-ticket",
48
+ "title": "Path A: Generate Single Ticket",
49
+ "runCondition": {
50
+ "var": "pathComplexity",
51
+ "equals": "Simple"
52
+ },
53
+ "promptBlocks": {
54
+ "goal": "Generate one complete, developer-ready Jira ticket for this request.",
55
+ "constraints": [
56
+ "Acceptance criteria must be phrased as observable, testable conditions not user-story restatements.",
57
+ "Follow any team conventions from ./.workflow_rules/ticket_creation.md.",
58
+ "Include all fields a developer needs to start work without asking follow-up questions."
59
+ ],
60
+ "procedure": [
61
+ "Write the ticket title: concise, action-oriented, following team naming conventions.",
62
+ "Write the description: what the feature/fix is, why it matters, any relevant context or constraints the developer should know.",
63
+ "Write acceptance criteria as a checkbox list. Each item must be verifiable: 'Given X, when Y, then Z' or an equivalent observable condition.",
64
+ "Add: priority, story points (Fibonacci or T-shirt size per team convention), relevant labels, and any links (PRD, design, related tickets).",
65
+ "Review the complete ticket. Would a developer who knows nothing about this request have everything needed to implement it?"
66
+ ],
67
+ "outputRequired": {
68
+ "notesMarkdown": "Ticket title, brief summary of AC items, and story point estimate."
76
69
  },
77
- {
78
- "id": "phase-c0-context-priming",
79
- "title": "Path C, Phase 0: Comprehensive Context Gathering",
80
- "runCondition": {
81
- "or": [
82
- {
83
- "var": "pathComplexity",
84
- "equals": "Standard"
85
- },
86
- {
87
- "var": "pathComplexity",
88
- "equals": "Epic"
89
- }
90
- ]
91
- },
92
- "prompt": "**PREP**: Gather comprehensive context for this complex project.\n\n**IMPLEMENT**: Collect and analyze all available project materials:\n- Load existing rules from `./.workflow_rules/ticket_creation.md`\n- Review provided PRDs, technical specs, and design documents\n- Understand team conventions and Jira formatting preferences\n- Identify key stakeholders and dependencies\n- Note any constraints or special requirements\n\n**VERIFY**: Confirm you have sufficient context to proceed with analysis. Document any missing information that would be critical for planning.",
93
- "agentRole": "You are a thorough business analyst specializing in requirements gathering and stakeholder management. Your expertise lies in comprehensively understanding project context, identifying information gaps, and ensuring all necessary documentation is available before proceeding with detailed planning.",
94
- "guidance": [
95
- "Thorough context gathering is critical for complex projects",
96
- "Don't proceed without sufficient information",
97
- "Set context variables for team conventions and project details"
98
- ],
99
- "askForFiles": true,
100
- "requireConfirmation": true
70
+ "verify": [
71
+ "Title is present and follows conventions.",
72
+ "Description provides enough context to start work.",
73
+ "At least two checkbox-style acceptance criteria are present and objectively testable.",
74
+ "Story points and priority are set."
75
+ ]
76
+ },
77
+ "requireConfirmation": false
78
+ },
79
+ {
80
+ "id": "phase-1-context-and-gaps",
81
+ "title": "Path C, Phase 1: Gather Context and Surface Gaps",
82
+ "runCondition": {
83
+ "or": [
84
+ { "var": "pathComplexity", "equals": "Standard" },
85
+ { "var": "pathComplexity", "equals": "Epic" }
86
+ ]
87
+ },
88
+ "promptBlocks": {
89
+ "goal": "Collect all available project context and identify what is still missing before planning begins.",
90
+ "constraints": [
91
+ "Do not ask the user for things you can find with tools.",
92
+ "Ask only for information that is genuinely missing and would materially affect planning.",
93
+ "If the rules file exists, extract relevant conventions now."
94
+ ],
95
+ "procedure": [
96
+ "Read all linked or attached documents: PRDs, technical specs, design files, existing tickets.",
97
+ "Load ./.workflow_rules/ticket_creation.md and note any relevant team conventions.",
98
+ "Identify: key stakeholders, team dependencies, technical constraints, known risks, and any conflicting requirements.",
99
+ "Classify each gap as: Critical (blocks planning), Important (affects scope), or Nice-to-have (can proceed without it).",
100
+ "For Critical and Important gaps that tools cannot resolve, ask the user — in a single consolidated question block, not one at a time.",
101
+ "After receiving answers, check whether any response reveals scope that would change `pathComplexity` (e.g. the user confirms three teams are involved, or the feature is narrower than initially assessed). If so, state the new classification and reasoning, and ask the user to confirm before continuing to Phase 2."
102
+ ],
103
+ "outputRequired": {
104
+ "notesMarkdown": "Context sources reviewed, critical/important gaps found, any questions asked."
101
105
  },
102
- {
103
- "id": "phase-c1-analysis-and-questions",
104
- "title": "Path C, Phase 1: Analysis & Risk Identification",
105
- "runCondition": {
106
- "or": [
107
- {
108
- "var": "pathComplexity",
109
- "equals": "Standard"
110
- },
111
- {
112
- "var": "pathComplexity",
113
- "equals": "Epic"
114
- }
115
- ]
116
- },
117
- "prompt": "**PREP**: Analyze all provided context to identify ambiguities, risks, and missing information.\n\n**IMPLEMENT**: Create a structured analysis:\n- Identify unclear requirements or acceptance criteria\n- Highlight potential technical risks or blockers\n- Note missing information that could impact planning\n- Flag any conflicting requirements or constraints\n- Assess feasibility and effort implications\n\n**VERIFY**: Present findings as prioritized questions or clarifications needed. Only proceed when critical ambiguities are resolved.",
118
- "agentRole": "You are a risk assessment specialist and requirements analyst with expertise in identifying project risks, ambiguities, and potential blockers. Your role is to proactively surface issues that could derail project success while ensuring all requirements are clearly understood.",
119
- "guidance": [
120
- "This is a critical risk reduction step",
121
- "Better to ask questions now than discover issues later",
122
- "Focus on blockers and high-impact unknowns"
123
- ],
124
- "requireConfirmation": true
106
+ "verify": [
107
+ "All provided documents and links have been read.",
108
+ "Any Critical gaps are surfaced before proceeding.",
109
+ "Questions, if any, are consolidated into a single block."
110
+ ]
111
+ },
112
+ "requireConfirmation": false
113
+ },
114
+ {
115
+ "id": "phase-2-high-level-plan",
116
+ "title": "Path C, Phase 2: Create High-Level Plan",
117
+ "runCondition": {
118
+ "or": [
119
+ { "var": "pathComplexity", "equals": "Standard" },
120
+ { "var": "pathComplexity", "equals": "Epic" }
121
+ ]
122
+ },
123
+ "promptBlocks": {
124
+ "goal": "Produce a structured plan that will drive ticket generation. This plan is the source of truth for scope.",
125
+ "constraints": [
126
+ "Be explicit about scope boundaries — ambiguous scope will produce ambiguous tickets.",
127
+ "Success criteria must be measurable, not just descriptive.",
128
+ "For Standard path: this plan feeds directly into batch ticket generation."
129
+ ],
130
+ "procedure": [
131
+ "Write: Project Summary (2-3 sentences, what is being built and why).",
132
+ "Write: Key Deliverables (bulleted list of distinct components or features).",
133
+ "Write: In-Scope (explicit list — prevents scope creep).",
134
+ "Write: Out-of-Scope (explicit exclusions — prevents misunderstandings).",
135
+ "Write: Success Criteria (measurable definition of done — each item verifiable).",
136
+ "Write: High-Level Timeline (phases or milestones with rough sizing).",
137
+ "Review: does every deliverable map clearly to implementable work? Is anything in scope that should be out?"
138
+ ],
139
+ "outputRequired": {
140
+ "notesMarkdown": "Plan summary, deliverable count, any scope decisions made."
125
141
  },
126
- {
127
- "id": "phase-c2-high-level-plan",
128
- "title": "Path C, Phase 2: Create High-Level Plan",
129
- "runCondition": {
130
- "or": [
131
- {
132
- "var": "pathComplexity",
133
- "equals": "Standard"
134
- },
135
- {
136
- "var": "pathComplexity",
137
- "equals": "Epic"
138
- }
139
- ]
140
- },
141
- "prompt": "**PREP**: With clarified requirements, create a comprehensive high-level plan.\n\n**IMPLEMENT**: Generate a structured plan document:\n- **Project Summary**: Clear overview of the feature/project\n- **Key Deliverables**: Main components or features to be built\n- **In-Scope**: Explicitly defined scope boundaries\n- **Out-of-Scope**: Clear exclusions to prevent scope creep\n- **Success Criteria**: Measurable definition of done\n- **High-Level Timeline**: Major milestones and phases\n\n**VERIFY**: Ensure the plan is comprehensive and aligns with the original request. This plan will guide ticket creation.",
142
- "agentRole": "You are a strategic Product Manager and project planner with expertise in feature decomposition and scope management. Your strength lies in creating comprehensive project plans that balance business objectives with technical feasibility while preventing scope creep.",
143
- "validationCriteria": [
144
- {
145
- "type": "regex",
146
- "pattern": "(?i)##?\\s*Project Summary:?",
147
- "message": "Plan must include a Project Summary section"
148
- },
149
- {
150
- "type": "regex",
151
- "pattern": "(?i)##?\\s*Key Deliverables:?",
152
- "message": "Plan must include a Key Deliverables section"
153
- },
154
- {
155
- "type": "regex",
156
- "pattern": "(?i)##?\\s*In-Scope:?",
157
- "message": "Plan must explicitly define In-Scope items"
158
- },
159
- {
160
- "type": "regex",
161
- "pattern": "(?i)##?\\s*Out-of-Scope:?",
162
- "message": "Plan must explicitly define Out-of-Scope items"
163
- },
164
- {
165
- "type": "regex",
166
- "pattern": "(?i)##?\\s*Success Criteria:?",
167
- "message": "Plan must include measurable Success Criteria"
168
- },
169
- {
170
- "type": "regex",
171
- "pattern": "(?i)##?\\s*High-Level Timeline:?",
172
- "message": "Plan must include a High-Level Timeline section"
173
- },
174
- {
175
- "type": "length",
176
- "min": 800,
177
- "message": "Plan should be at least 800 characters for comprehensive coverage"
178
- }
179
- ],
180
- "guidance": [
181
- "This plan becomes the foundation for all ticket generation",
182
- "Be explicit about scope to prevent misunderstandings",
183
- "For Standard path, this leads directly to ticket generation"
184
- ],
185
- "requireConfirmation": true,
186
- "hasValidation": true
142
+ "verify": [
143
+ "All six sections are present: Summary, Deliverables, In-Scope, Out-of-Scope, Success Criteria, Timeline.",
144
+ "Success criteria are measurable.",
145
+ "Scope boundaries are explicit, not implied."
146
+ ]
147
+ },
148
+ "requireConfirmation": true
149
+ },
150
+ {
151
+ "id": "phase-3-epic-decompose",
152
+ "title": "Path E, Phase 3: Epic Decomposition",
153
+ "runCondition": {
154
+ "var": "pathComplexity",
155
+ "equals": "Epic"
156
+ },
157
+ "promptBlocks": {
158
+ "goal": "Break the approved plan into a logical work hierarchy that development teams can execute.",
159
+ "constraints": [
160
+ "Every item in the plan's In-Scope list must map to at least one work item in the hierarchy.",
161
+ "Dependencies must be explicit — not implied by ordering alone.",
162
+ "Oversized stories (more than one sprint of work) should be split."
163
+ ],
164
+ "procedure": [
165
+ "Define the top-level Epic: one ticket that is the container for all work, linked to the plan.",
166
+ "Identify Features or Story Groups: logical clusters of related functionality.",
167
+ "For each Story Group, list individual Stories: the smallest independently releasable work items.",
168
+ "For each Story, list any Tasks or sub-tasks if technical implementation steps are distinct enough to track.",
169
+ "Map dependencies: which stories must complete before others can start? Flag critical-path items.",
170
+ "Explain the grouping rationale: why are these stories together? Would the team organize them differently?"
171
+ ],
172
+ "outputRequired": {
173
+ "notesMarkdown": "Epic name, story count, dependency summary, and any grouping decisions."
187
174
  },
188
- {
189
- "id": "phase-c3a-epic-decomposition",
190
- "title": "Path C, Phase 3a: Epic Decomposition",
191
- "runCondition": {
192
- "var": "pathComplexity",
193
- "equals": "Epic"
194
- },
195
- "prompt": "**PREP**: Decompose the approved high-level plan into a logical hierarchy.\n\n**IMPLEMENT**: Create a structured breakdown:\n- **Epic**: Main feature/project container\n- **Features/Stories**: Logical groupings of related functionality\n- **Tasks**: Specific implementation work items\n- **Dependencies**: Clear relationships between items\n- **Rationale**: Explain the decomposition logic and groupings\n\n**VERIFY**: Ensure the hierarchy is logical, dependencies are clear, and nothing is missed from the original plan.",
196
- "agentRole": "You are a technical Product Manager specializing in epic decomposition and story mapping. Your expertise lies in breaking down complex features into logical, manageable work items while maintaining clear dependencies and ensuring nothing falls through the cracks.",
197
- "guidance": [
198
- "Epic path only - creates the story hierarchy",
199
- "Focus on logical groupings that make sense for development",
200
- "Consider team capacity and parallel work opportunities"
201
- ],
202
- "requireConfirmation": true
175
+ "verify": [
176
+ "Every In-Scope deliverable from the plan is represented in the hierarchy.",
177
+ "Dependencies are named, not just implied by order.",
178
+ "No story is so large it would span multiple sprints without a split."
179
+ ]
180
+ },
181
+ "requireConfirmation": true
182
+ },
183
+ {
184
+ "id": "phase-4-epic-estimate",
185
+ "title": "Path E, Phase 4: Estimation and Dependency Mapping",
186
+ "runCondition": {
187
+ "var": "pathComplexity",
188
+ "equals": "Epic"
189
+ },
190
+ "promptBlocks": {
191
+ "goal": "Add effort estimates, risk assessments, and team assignments to each story in the hierarchy.",
192
+ "constraints": [
193
+ "Conservative estimates are better than optimistic ones — note uncertainty explicitly.",
194
+ "Justify each estimate with one sentence of reasoning.",
195
+ "Flag stories on the critical path."
196
+ ],
197
+ "procedure": [
198
+ "For each Story, assign: effort estimate (Fibonacci or T-shirt size per team convention), brief justification.",
199
+ "Assess technical risk per story: Low / Medium / High, with one sentence of rationale.",
200
+ "Assign priority: must-have for MVP, should-have, nice-to-have.",
201
+ "Note suggested team or skill area for each story.",
202
+ "Identify critical path: which stories block the most downstream work? Surface these explicitly.",
203
+ "Flag any stories whose estimates feel uncertain — surface the unknowns rather than hiding them in a range."
204
+ ],
205
+ "outputRequired": {
206
+ "notesMarkdown": "Total story point estimate, critical path items, high-risk stories."
203
207
  },
204
- {
205
- "id": "phase-c3b-estimation-and-dependencies",
206
- "title": "Path C, Phase 3b: Estimation & Dependency Mapping",
207
- "runCondition": {
208
- "var": "pathComplexity",
209
- "equals": "Epic"
210
- },
211
- "prompt": "**PREP**: Add effort estimates and dependency mapping to the decomposed stories.\n\n**IMPLEMENT**: For each story, provide:\n- **Effort Estimate**: S/M/L/XL sizing with detailed justification\n- **Dependencies**: Prerequisites and blockers\n- **Risk Assessment**: Technical or business risks\n- **Priority Ranking**: Relative importance and sequencing\n- **Team Assignment**: Suggested team or skill requirements\n\n**VERIFY**: Review estimates for consistency and identify any oversized stories that need further breakdown.",
212
- "agentRole": "You are a technical project manager with expertise in agile estimation and dependency management. Your strength lies in accurately sizing work items, identifying critical path dependencies, and ensuring realistic project planning that accounts for team capacity and technical constraints.",
213
- "guidance": [
214
- "Epic path only - adds planning details",
215
- "Conservative estimates are better than optimistic ones",
216
- "Identify critical path items and potential bottlenecks"
217
- ],
218
- "requireConfirmation": true
208
+ "verify": [
209
+ "Every story has an estimate and a one-sentence justification.",
210
+ "Critical path items are named.",
211
+ "High-risk or highly uncertain stories are called out."
212
+ ]
213
+ },
214
+ "requireConfirmation": false
215
+ },
216
+ {
217
+ "id": "phase-5-batch-tickets",
218
+ "title": "Path C/E, Phase 5: Batch Ticket Generation",
219
+ "runCondition": {
220
+ "or": [
221
+ { "var": "pathComplexity", "equals": "Standard" },
222
+ { "var": "pathComplexity", "equals": "Epic" }
223
+ ]
224
+ },
225
+ "promptBlocks": {
226
+ "goal": "Generate the complete set of Jira tickets from the approved plan and decomposition.",
227
+ "constraints": [
228
+ "Every In-Scope deliverable from the plan must have at least one ticket.",
229
+ "Acceptance criteria must be checkbox-style and objectively testable.",
230
+ "Follow team conventions from ./.workflow_rules/ticket_creation.md.",
231
+ "Epic path: include the parent Epic ticket and set epic-link on all child stories."
232
+ ],
233
+ "procedure": [
234
+ "For Epic path: generate the Epic ticket first (title, description, success criteria from the plan, no story points).",
235
+ "For each Story in the decomposition (or each deliverable for Standard): generate a complete ticket with title, description, checkbox-style AC, story points, priority, labels, and dependency links.",
236
+ "Verify coverage: compare generated tickets against the plan's In-Scope list. Every item should have a ticket.",
237
+ "Check consistency: ticket titles follow conventions, estimates are consistent with the estimation step, priorities are set.",
238
+ "Present the complete batch clearly labeled and organized."
239
+ ],
240
+ "outputRequired": {
241
+ "notesMarkdown": "Ticket count, coverage confirmation (all In-Scope items represented), any gaps noted."
219
242
  },
220
- {
221
- "id": "phase-c4-batch-ticket-generation",
222
- "title": "Path C, Phase 4: Batch Ticket Generation",
223
- "runCondition": {
224
- "or": [
225
- {
226
- "var": "pathComplexity",
227
- "equals": "Standard"
228
- },
229
- {
230
- "var": "pathComplexity",
231
- "equals": "Epic"
232
- }
233
- ]
234
- },
235
- "prompt": "**PREP**: Generate all necessary Jira tickets based on the approved plan.\n\n**IMPLEMENT**: Create comprehensive tickets for every story/task:\n- **Epic Ticket**: Overall project container (Epic path only)\n- **Feature/Story Tickets**: Individual work items with full details\n- **Consistent Formatting**: Follow team conventions and templates\n- **Complete Information**: Title, description, acceptance criteria, labels, estimates\n- **Proper Linking**: Dependencies and epic relationships\n\n**VERIFY**: Review all tickets for completeness, consistency, and accuracy. Present the full batch for approval.",
236
- "agentRole": "You are an experienced Product Manager specializing in high-volume ticket creation and project organization. Your expertise lies in creating comprehensive, well-structured tickets that provide development teams with clear, actionable work items while maintaining consistency across large projects.",
237
- "validationCriteria": [
238
- {
239
- "type": "regex",
240
- "pattern": "(?i)##\\s*(Ticket\\s*\\d+|Epic)",
241
- "message": "Output must contain multiple numbered tickets (e.g., '## Ticket 1') or an Epic ('## Epic')"
242
- },
243
- {
244
- "type": "regex",
245
- "pattern": "(?i)Story Points?:",
246
- "message": "Tickets should include story point estimates"
247
- },
248
- {
249
- "type": "regex",
250
- "pattern": "(?i)Priority:",
251
- "message": "Tickets should include priority levels"
252
- },
253
- {
254
- "type": "length",
255
- "min": 1000,
256
- "message": "Batch ticket output should be substantial (1000+ characters) for multiple tickets"
257
- }
258
- ],
259
- "guidance": [
260
- "Automated batch generation saves significant time",
261
- "Ensure consistency across all tickets",
262
- "Include all necessary metadata and relationships"
263
- ],
264
- "requireConfirmation": true,
265
- "hasValidation": true
243
+ "verify": [
244
+ "Every In-Scope plan item has at least one ticket.",
245
+ "All tickets have checkbox-style AC with at least two testable criteria each.",
246
+ "Story points and priorities are set on all tickets.",
247
+ "Epic tickets are present and child tickets reference the parent (Epic path)."
248
+ ]
249
+ },
250
+ "requireConfirmation": true
251
+ },
252
+ {
253
+ "id": "phase-6-capture-rules",
254
+ "title": "Path E, Phase 6: Capture Team Rules",
255
+ "runCondition": {
256
+ "var": "pathComplexity",
257
+ "equals": "Epic"
258
+ },
259
+ "promptBlocks": {
260
+ "goal": "Extract actionable team preferences from this session and persist them so future runs use them automatically.",
261
+ "constraints": [
262
+ "Only write rules that are genuinely reusable across future tickets — skip one-off project specifics.",
263
+ "Keep rules concise and actionable, not narrative.",
264
+ "Append to ./.workflow_rules/ticket_creation.md rather than replacing it."
265
+ ],
266
+ "procedure": [
267
+ "Review what conventions, preferences, or requirements emerged during this session.",
268
+ "Identify patterns worth preserving: naming conventions, field usage, AC format preferences, estimation approach, labeling rules.",
269
+ "Draft new rules as short, imperative statements (e.g., 'Use T-shirt sizing not Fibonacci', 'Always include a Figma link in design tickets').",
270
+ "Check against existing rules — avoid duplicates or contradictions.",
271
+ "Append new rules to ./.workflow_rules/ticket_creation.md, creating the file if it does not exist."
272
+ ],
273
+ "outputRequired": {
274
+ "notesMarkdown": "New rules added (count and examples), rules file location."
266
275
  },
267
- {
268
- "id": "phase-c5-continuous-improvement",
269
- "title": "Path C, Phase 5: Continuous Improvement & Learning",
270
- "runCondition": {
271
- "var": "pathComplexity",
272
- "equals": "Epic"
273
- },
274
- "prompt": "**PREP**: Capture lessons learned and improve future ticket creation.\n\n**IMPLEMENT**: Based on feedback from the ticket review:\n- **Identify Patterns**: What worked well vs. what could be improved\n- **Extract Rules**: Formulate specific operational guidelines\n- **Document Preferences**: Team-specific conventions and requirements\n- **Update Rules File**: Append new rules to `./.workflow_rules/ticket_creation.md`\n- **Validate Learning**: Confirm the new rules make sense for future projects\n\n**VERIFY**: Ensure the persistent rules will improve future ticket creation quality and consistency.",
275
- "agentRole": "You are a process improvement specialist and organizational learning expert. Your role is to extract actionable insights from project experiences and codify them into reusable guidelines that improve team efficiency and consistency over time.",
276
- "guidance": [
277
- "Epic path only - creates persistent learning",
278
- "Focus on actionable, specific rules",
279
- "This makes the AI smarter over time"
280
- ],
281
- "requireConfirmation": true
282
- }
283
- ],
284
- "metaGuidance": [
285
- "Maintain the persona of an expert Product Manager and Mobile Tech Lead",
286
- "Make autonomous decisions based on context analysis rather than asking users to choose",
287
- "Always load and follow team-specific rules from ./.workflow_rules/ticket_creation.md when available",
288
- "Focus on creating tickets that provide clear value to development teams",
289
- "Ensure all tickets have measurable acceptance criteria and appropriate estimates"
290
- ]
291
- }
276
+ "verify": [
277
+ "Rules file has been updated or created.",
278
+ "New rules are actionable and reusable.",
279
+ "No contradictions introduced with existing rules."
280
+ ]
281
+ },
282
+ "requireConfirmation": false
283
+ }
284
+ ]
285
+ }