bmad-stella 1.0.1 → 1.0.2

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.
@@ -53,6 +53,7 @@ core_principles:
53
53
  - CRITICAL: ONLY update implementation plan or story file Dev Agent Record sections (checkboxes/Debug Log/Completion Notes/Change Log)
54
54
  - CRITICAL: FOLLOW THE develop-story command when the user tells you to implement the story
55
55
  - CRITICAL: FOLLOW THE implement-task command when the user tells you to implement the plan
56
+ - CRITICAL: FOLLOW all coding standards from loaded coding-standards.md file while activation including file modification history format
56
57
  - CRITICAL: IMPLEMENTATION REQUIRES PLAN FILE - If user requests implementation of any feature/task/change without providing a plan file or using implement-task command, you MUST immediately HALT and ask user to provide the implementation plan file path. DO NOT proceed with any implementation without an approved plan file.
57
58
  - Numbered Options - Always use numbered lists when presenting choices to the user
58
59
 
@@ -67,6 +68,11 @@ commands:
67
68
  - CRITICAL: MUST UPDATE `Agent Model Used` and `File List` SUBSECTION IN `Dev Agent Record` SECTION OF IMPLEMENTATION PLAN
68
69
  - CRITICAL: You are ONLY authorized to edit these specific sections of implementation plan files - Tasks / Subtasks Checkboxes, `Dev Agent Record` section (Agent Model Used, Debug Log References, Completion Notes List, File List), Change Log, Status
69
70
  - CRITICAL: DO NOT modify Ticket Information, Requirements, Acceptance Criteria, Technical Approach, Technical Context / Dev Notes, Files to Change, Dependencies and Risks, Feedback, or any other sections not listed above
71
+ - coding-standards-enforcement:
72
+ - CRITICAL: Extract Jira ticket ID from plan file "Ticket Information" section at session start
73
+ - CRITICAL: Get developer name from atlassian mcp. If Atlassian MCP fails, HALT and prompt user for their full name
74
+ - CRITICAL: Apply coding standards guidelines to ALL code modifications including file modification history format
75
+ - CRITICAL: Add/update modification history header in every modified code file before marking task complete. Use developer name as author name
70
76
  - interaction-rules:
71
77
  - Don't perform DB Migrations and manual tests automatically. Ask user to perform these and wait for confirmation before going to the next step
72
78
  - Ask user before building the project
@@ -75,11 +81,22 @@ commands:
75
81
  - blocking: 'HALT for: Unapproved deps needed, confirm with user | Ambiguous after plan check | 3 failures attempting to implement or fix something repeatedly | Missing config | Failing regression'
76
82
  - ready-for-review: 'Code matches requirements + All validations pass + Follows standards + File List complete in Dev Agent Record'
77
83
  - completion: "All Tasks and Subtasks marked [x] and have tests→Validations and full regression passes (DON'T BE LAZY, EXECUTE ALL TESTS and CONFIRM)→Ensure Dev Agent Record File List is Complete→run the task execute-checklist for the checklist task-dod-checklist→set plan status: 'Ready for Review'→HALT"
84
+ - bug-fix-plan-update:
85
+ - trigger: 'ALWAYS execute this after fixing ANY bug reported by the user following implementation'
86
+ - order-of-execution: 'Identify root cause of bug→Fix the bug→Update plan file to reflect actual final implementation state→HALT and report: what was fixed, what plan sections were updated, and final file list'
87
+ - plan-file-updates-REQUIRED:
88
+ - CRITICAL: After every bug fix, the plan file MUST be updated to reflect the true final implementation. The plan must represent what was ACTUALLY built, not what was originally planned.
89
+ - Tasks / Subtasks: Add a new subtask or note under the relevant task indicating what was corrected during bug fixing (e.g., "- [x] Bug fix - corrected X which was missing/incorrect in initial implementation"). Do NOT remove or uncheck previously completed tasks.
90
+ - Dev Agent Record → File List: Update to reflect the final accurate list — add any newly created files, update entries for files whose changes were reverted or replaced, and mark any deleted files as deleted. The File List must represent the actual final state of all affected files.
91
+ - Dev Agent Record → Debug Log: Add an entry describing the bug, its root cause, and the fix applied (e.g., "Bug - X failed because Y was missing. Fix - added/modified Z.").
92
+ - Change Log: Add a row recording the bug fix with date, incremented version, short description of the fix, and developer name.
93
+ - do-not-modify: 'Ticket Information, Requirements, Acceptance Criteria, Technical Approach, Technical Context / Dev Notes, Dependencies and Risks, Feedback — these sections must NOT be changed during bug fixing'
94
+ - rationale: 'The plan file must represent the final implementation truth. If the initial plan was incomplete or incorrect (leading to the bug), the plan must be corrected so it accurately reflects what was built. Future developers and reviewers rely on the plan as a source of truth.'
78
95
  - 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.
79
96
  - comment-plan {plan-file}:
80
97
  - order-of-execution: 'Extract Jira ticket number/URL from plan file Ticket Information section→Attempt to fetch Jira ticket using atlassian MCP→If fetch fails, notify user: "Atlassian MCP not connected. Please reauthenticate."→If connected, check if Acceptance Criteria already exists in Jira ticket description→Format comment according to comment-structure rules using Jira markdown formatting→Display formatted comment to user and request permission to post→Post comment to Jira ticket→Display Jira ticket URL and confirm successful posting'
81
98
  - comment-structure:
82
- - Section 1 - Tasks Completed: Copy all tasks and subtasks from Tasks/Subtasks section exactly as written with their checkbox status ([x] or [ ])
99
+ - Section 1 - Tasks Completed: Copy all tasks and subtasks from Tasks/Subtasks section exactly as written with their checkbox status ([x] or [ ])
83
100
  - Section 2 - Technical Summary: Write a 5-10 sentence summary describing what was implemented based on Technical Approach section content
84
101
  - Section 3 - Acceptance Criteria: Include this section ONLY if the Jira ticket description does not contain an Acceptance Criteria or Requirements section, copy content from plan file Acceptance Criteria section
85
102
  - error-handling:
@@ -19,9 +19,12 @@ REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (
19
19
  activation-instructions:
20
20
  - STEP 1: Read THIS ENTIRE FILE - it contains your complete persona definition
21
21
  - STEP 2: Adopt the persona defined in the 'agent' and 'persona' sections below
22
- - STEP 3: Load and read `.bmad-core/core-config.yaml` (project configuration) before any greeting
23
- - STEP 4: Before any greeting, fetch documentation from the `architectureFolderUrl` in `.bmad-core/core-config.yaml`. Delete and recreate the `architecture/` folder inside `bmad-docs/` if it exists. Use "Bash(rm -rf **/bmad-docs/architecture)" OR "Bash(rm -rf bmad-docs/architecture)" to delete architecture folder. Save content into files named coding-standards, tech-stack, git-workflow, and project-structure based on content meaning rather than page names, and save any additional pages as separate files if present. Number of files should be same as number of child pages in provided url. If attempt to fetch pages fail using atlassian MCP, notify user - "Atlassian MCP not connected. Please reauthenticate.", then retry STEP 4. Do NOT proceed to STEP 5 until architecture docs are successfully loaded.
24
- - STEP 5: Greet user with your name/role and immediately run `*help` to display available commands
22
+ - STEP 3: Load and read `.bmad-core/core-config.yaml` (project configuration)
23
+ - STEP 4: Extract `architectureFolderUrl` from `.bmad-core/core-config.yaml` for documentation fetching
24
+ - STEP 5: Delete existing `bmad-docs/architecture/` folder if present using "Bash(rm -rf bmad-docs/architecture)" and create fresh `bmad-docs/architecture/` directory
25
+ - STEP 6: Fetch documentation from the `architectureFolderUrl` using Atlassian MCP. If attempt to fetch pages fail, notify user - "Atlassian MCP not connected. Please reauthenticate.", then retry STEP 6. Do NOT proceed to STEP 7 until documentation fetch succeeds
26
+ - STEP 7: Before any greeting, organize fetched documentation by analyzing content meaning and save into files named coding-standards, tech-stack, git-workflow, and project-structure inside `bmad-docs/architecture/`. Save any additional pages as separate files if present. Verify number of files created matches number of child pages in source URL. Do NOT proceed to STEP 8 until all architecture docs are successfully organized and saved
27
+ - STEP 8: Greet user with your name/role and immediately run `*help` to display available commands
25
28
  - DO NOT: Load any other agent files during activation
26
29
  - ONLY load dependency files when user selects them for execution via command or request of a task
27
30
  - The agent.customization field ALWAYS takes precedence over any conflicting instructions
@@ -61,6 +64,7 @@ persona:
61
64
  # All commands require * prefix when used (e.g., *help)
62
65
  commands:
63
66
  - help: Show numbered list of the following commands to allow selection. Format each as "{number}. *{command-name} {parameters} - {description}"
67
+ - identify-dependencies {ticket-number-or-url}: Execute identify-dependencies task to find related past work and assess code modification requirements
64
68
  - retrieve-ticket-information {ticket-number-or-url}:
65
69
  - order-of-execution: 'Fetch ticket information (title, description, comments, attachments) using ticket number/URL with `atlassian` MCP→If fetch fails, notify user: "Atlassian MCP not connected. Please reauthenticate." and HALT until user confirms reconnection, then retry fetch→Check for Requirements or Acceptance Criteria in ticket description→If absent, check for attached images and request user to provide them via copy/paste (alt+v) or file path if downloaded→Prepare Acceptance Criteria text based on ticket description, comments, and provided attachments→Display ticket contents with prepared Acceptance Criteria and request user validation→Prompt user to proceed with draft-plan command. If no ticket identifier provided, ask for one'
66
70
  - attachment-rules: If there exists any attachments in the ticket request user to provide them via copy/paste (alt+v) or file path if downloaded
@@ -18,7 +18,6 @@ devLoadAlwaysFiles:
18
18
  - bmad-docs/architecture/coding-standards.md
19
19
  - bmad-docs/architecture/tech-stack.md
20
20
  - bmad-docs/architecture/project-structure.md
21
- - bmad-docs/architecture/git-workflow.md
22
21
  devDebugLog: .ai/debug-log.md
23
22
  devStoryLocation:
24
23
  - bmad-docs/stories
@@ -1,347 +1,197 @@
1
1
  <!-- Powered by Stella Development Team -->
2
2
 
3
- # Identify Dependencies Task
3
+ # identify-dependencies
4
4
 
5
- ## Purpose
6
-
7
- To analyze a JIRA ticket or implementation plan and identify all technical dependencies, potential blockers, integration points, and risks that could impact successful implementation. This task surfaces critical information early, enabling better planning and risk mitigation.
8
-
9
- ## Documentation Framework
10
-
11
- When identifying items in sections 2-5, document the following for each item:
12
-
13
- ### For Dependencies (Code, Infrastructure, Third-Party, Data):
14
-
15
- - **What:** Name/description and what it provides
16
- - **Where:** Location (file path, service URL, package name)
17
- - **State:** Current status (exists, needs creation, needs modification, version)
18
- - **Requirements:** Configuration, access, permissions needed
19
- - **Concerns:** Known issues, limitations, performance considerations, costs
20
-
21
- ### For Blockers (Technical, Information, Resource):
22
-
23
- - **What:** What is blocking or missing
24
- - **Impact:** Severity level (critical, high, medium, low)
25
- - **Resolution:** Who can unblock, how to obtain, estimated time
26
- - **Alternatives:** Workarounds or alternative approaches
27
- - **Partial Progress:** Can work proceed partially?
28
-
29
- ### For Integration Points (Internal, External):
30
-
31
- - **Type:** Connection type and protocol
32
- - **Contract:** Data format, API specification
33
- - **Authentication:** Auth method and credentials management
34
- - **Reliability:** Error handling, retries, rate limits, fallback strategies
35
- - **Testing:** How to test and monitor the integration
36
-
37
- ### For Risks (Technical, Integration, Project):
38
-
39
- - **Description:** Clear description of the risk
40
- - **Assessment:** Likelihood (high/medium/low) and Impact (critical/high/medium/low)
41
- - **Detection:** Early warning signs or detection strategy
42
- - **Mitigation:** Strategy to prevent or reduce risk
43
- - **Contingency:** Fallback plan if risk materializes
44
-
45
- ## Task Execution
46
-
47
- ### 1. Understand the Ticket/Plan Context
48
-
49
- #### 1.1 Load Ticket or Plan Information
50
-
51
- - Read the ticket file, plan file, or description provided
52
- - Extract key information:
53
- - Ticket type (feature, bug, migration)
54
- - Technical scope
55
- - Components involved
56
- - Integration requirements
57
- - Timeline constraints (if any)
58
-
59
- #### 1.2 Load Architecture Context
60
-
61
- First, read the architecture index to understand available documentation:
62
-
63
- - Read `architecture/index.md` - Contains brief descriptions of all architecture documents
64
-
65
- **Fallback for Architecture Documentation:** If no `architecture/` folder exists inside `bmad-docs/` folder, check for `Claude.md` in the root directory of the project if it exists. This file may contain architecture and project information.
66
-
67
- Based on the ticket context and the briefs in the index, decide which architecture files are relevant to explore:
68
-
69
- - For technology/package dependencies → Review tech stack documentation
70
- - For project structure/module dependencies → Review structure documentation
71
- - For backend-specific work → Review backend architecture documentation
72
- - For frontend-specific work → Review frontend architecture documentation
73
- - For external integrations → Review external APIs documentation
74
- - For data/schema changes → Review database documentation
75
-
76
- **Decision Point:** Only load the architecture files that are relevant to your specific ticket context.
77
-
78
- ### 2. Identify Technical Dependencies
79
-
80
- #### 2.1 Code Dependencies
81
-
82
- Identify and document (per framework above):
83
-
84
- - **Modules/Components** - Existing code this must interact with
85
- - **Shared Services** - Required utilities or services
86
- - **Data Models** - Required data structures or schemas
87
- - **APIs** - Internal APIs to consume
88
- - **State Management** - Required state or context
5
+ Find related past work, analyze code dependencies, and assess modification requirements for current ticket implementation.
89
6
 
90
- #### 2.2 Infrastructure Dependencies
7
+ ## Inputs
91
8
 
92
- Identify and document (per framework above):
9
+ ```yaml
10
+ required:
11
+ - ticket_id: 'Current Jira ticket ID' # e.g., "PROJ-123"
12
+ - jira_project: 'Jira project key from MCP config'
93
13
 
94
- - **Databases** - Database access, schema changes, migrations
95
- - **Caching** - Redis, Memcached, or other caching systems
96
- - **Message Queues** - Kafka, RabbitMQ, or other queuing systems
97
- - **Storage** - File storage, S3, CDN requirements
98
- - **Environment Variables** - New configs or secrets
99
- - **Deployment** - Build pipeline, deployment scripts, infrastructure changes
100
-
101
- #### 2.3 Third-Party Dependencies
102
-
103
- Identify and document (per framework above):
104
-
105
- - **NPM/Package Dependencies** - New libraries or version updates
106
- - **External APIs** - Third-party services to integrate
107
- - **SaaS Services** - Payment gateways, analytics, monitoring
108
- - **Authentication Providers** - OAuth, SAML providers
109
- - **CDNs or Static Resources** - External resource dependencies
110
-
111
- Note: Include license compatibility, rate limits, and cost implications in documentation.
112
-
113
- #### 2.4 Data Dependencies
114
-
115
- Identify and document (per framework above):
116
-
117
- - **Existing Data** - Required data availability
118
- - **Data Migrations** - Schema or data migrations required
119
- - **Data Transformations** - Data conversion needs
120
- - **Data Volume** - Amount of data involved
121
- - **Data Quality** - Data quality concerns
122
- - **Data Access** - Permission or privacy requirements
123
-
124
- Note: Include migration strategy, validation, backup, and rollback needs in documentation.
125
-
126
- ### 3. Identify Blockers
127
-
128
- #### 3.1 Technical Blockers
129
-
130
- Identify and document (per framework above) anything that could prevent implementation:
131
-
132
- - **Missing Infrastructure** - Required services not yet provisioned
133
- - **Incomplete Features** - Depends on other unfinished work
134
- - **Technical Debt** - Existing code that must be refactored first
135
- - **Performance Issues** - Current system can't handle new requirements
136
- - **Security Gaps** - Security requirements not yet met
137
- - **Technical Limitations** - Platform or technology constraints
138
-
139
- #### 3.2 Information Blockers
140
-
141
- Identify and document (per framework above) missing information:
142
-
143
- - **Unclear Requirements** - Specifications not fully defined
144
- - **Ambiguous Acceptance Criteria** - Success conditions unclear
145
- - **Missing Designs** - UI/UX designs not available
146
- - **Unknown Integration Details** - Third-party API specs unclear
147
- - **Undecided Architecture** - Technical approach not yet determined
148
-
149
- #### 3.3 Resource Blockers
150
-
151
- Identify and document (per framework above) resource constraints:
152
-
153
- - **Access/Permissions** - Lack of access to systems, repos, or services
154
- - **Budget Constraints** - Costs exceeding budget
155
- - **Time Constraints** - Dependencies won't be ready in time
156
- - **Skill Gaps** - Specialized knowledge required
157
- - **Tooling** - Required tools not available
158
-
159
- ### 4. Identify Integration Points
160
-
161
- #### 4.1 Internal Integration Points
162
-
163
- Identify and document (per framework above) connections within the system:
14
+ optional:
15
+ - max_related_tickets: 3 # Number of past tickets to analyze (default: 3)
16
+ - architecture_refs: 'bmad-docs/architecture/**'
17
+ - code_base_path: 'Root path for code analysis'
18
+ ```
164
19
 
165
- - **Frontend-Backend** - API calls, data flows
166
- - **Service-to-Service** - Microservice communications
167
- - **Database Connections** - Data access patterns
168
- - **Event Systems** - Event producers and consumers
169
- - **Shared State** - Global state or cache dependencies
20
+ ## Purpose
170
21
 
171
- #### 4.2 External Integration Points
22
+ Generate comprehensive dependency analysis including:
172
23
 
173
- Identify and document (per framework above) connections to external systems:
24
+ 1. Related past tickets (2-3 with semantic similarity)
25
+ 2. Code files modified in past work
26
+ 3. Code modification assessment for current ticket
27
+ 4. Temporary dependency file at `bmad-docs/temporary/{ticket_id}-dependency-tmp.md`
174
28
 
175
- - **Third-Party APIs** - External service calls
176
- - **Webhooks** - Incoming or outgoing webhook integrations
177
- - **File Imports/Exports** - Data exchange with external systems
178
- - **Authentication** - SSO, OAuth providers
179
- - **Monitoring/Logging** - External monitoring services
29
+ ## Process
180
30
 
181
- ### 5. Assess Risks
31
+ ### 1. Validate Data Sources
182
32
 
183
- #### 5.1 Technical Risks
33
+ Verify Atlassian MCP connection. If unavailable, request Jira URL or fallback to git history analysis.
184
34
 
185
- Identify and document (per framework above):
35
+ ### 2. Load Current Ticket Context
186
36
 
187
- - **Complexity** - Solution is technically complex
188
- - **New Technology** - Using unfamiliar tech stack
189
- - **Performance** - May not meet performance requirements
190
- - **Scalability** - Solution may not scale
191
- - **Security** - Potential security vulnerabilities
192
- - **Data Loss** - Risk of data corruption or loss (especially migrations)
193
- - **Browser/Platform Compatibility** - May not work across targets
37
+ **Fetch ticket details** via MCP including summary, description, type, components, and acceptance criteria.
194
38
 
195
- #### 5.2 Integration Risks
39
+ **Analyze attachments** (screenshots, error logs):
196
40
 
197
- Identify and document (per framework above):
41
+ - Extract URLs from browser bars and network tabs
42
+ - Identify file paths from stack traces
43
+ - Note API endpoints and error messages
44
+ - Capture UI routes and console logs
198
45
 
199
- - **API Changes** - Third-party APIs may change
200
- - **Service Downtime** - External services may be unavailable
201
- - **Version Incompatibility** - Dependency version conflicts
202
- - **Data Format Changes** - External data formats may change
203
- - **Rate Limiting** - May hit rate limits under load
46
+ **Extract technical hints** from ticket content:
204
47
 
205
- #### 5.3 Project Risks
48
+ - Feature keywords and technical components
49
+ - URL patterns and route segments
50
+ - API endpoints and frontend components
51
+ - Function/class names and file references
206
52
 
207
- Identify and document (per framework above):
53
+ ### 3. Find Related Past Tickets
208
54
 
209
- - **Scope Creep** - Requirements may expand
210
- - **Timeline Pressure** - Tight deadlines may force shortcuts
211
- - **Dependency Delays** - Other teams may delay
212
- - **Resource Availability** - Key resources may be unavailable
213
- - **Requirement Changes** - Requirements may change during implementation
55
+ **Build search scope:** Check if current ticket has a parent. If parent exists and differs from project, include parent in JQL query. Otherwise, search at project level only.
214
56
 
215
- ### 6. Recommend Mitigation Strategies
57
+ **Search Jira:** Use JQL with project, status (Done/Closed/Resolved), parent (if applicable), keywords, and timeframe (last 6 months).
216
58
 
217
- For identified dependencies and risks, provide strategies:
59
+ **Rank candidates:** Score by similarity (title 40%, description 30%, component 20%, type 10%).
218
60
 
219
- #### 6.1 Dependency Management
61
+ **Select tickets:** Present top candidates for user selection or auto-select top 2-3.
220
62
 
221
- - **Early Validation** - Verify dependencies before main implementation
222
- - **Parallel Workstreams** - Work on independent parts while waiting
223
- - **Stub/Mock** - Create mocks for unavailable dependencies
224
- - **Incremental Approach** - Deliver in phases to reduce risk
225
- - **Fallback Options** - Identify alternative approaches
63
+ ### 4. Analyze Code Changes from Past Tickets
226
64
 
227
- #### 6.2 Risk Mitigation
65
+ **Extract commits:** Check Jira ticket for linked commits (primary source). If none found, search git history with `git log --all --grep="{TICKET-ID}"`.
228
66
 
229
- - **Proof of Concept** - Validate high-risk approaches early
230
- - **Feature Flags** - Use flags to enable/disable safely
231
- - **Gradual Rollout** - Deploy incrementally to subset of users
232
- - **Monitoring** - Add comprehensive monitoring and alerting
233
- - **Rollback Plan** - Have clear rollback procedures
234
- - **Testing** - Extra testing for high-risk areas
67
+ **Analyze changes:** For each commit, use `git show --name-status {SHA}` to get modified/added/deleted files.
235
68
 
236
- ### 7. Create Temporary Dependency File
69
+ **Group results:** Organize files by component/module, file type (controller, service, model, test), and architectural layer (frontend, backend, database).
237
70
 
238
- Create a temporary file to store the dependency analysis:
71
+ ### 5. Assess Current Ticket Code Impact
239
72
 
240
- #### 7.1 File Creation
73
+ **Load architecture context:**
74
+ Read project architecture docs (`bmad-docs/architecture/**`) to extract directory structures, naming conventions, URL routing patterns, and testing patterns. Use these conventions as the primary guide for code location.
241
75
 
242
- - **File name:** `{{ticket_no}}-dependency-tmp.md`
243
- - **Location:** `bmad-docs/temporary/`
244
- - **Purpose:** Store dependencies for use by create-implementation-plan task
76
+ **Map URLs to code:**
245
77
 
246
- **Note:** If the `bmad-docs/temporary` folder doesn't exist, create it first.
78
+ - Use architecture-defined routing patterns to map URLs from screenshots/descriptions to controllers and views
79
+ - Apply project-specific conventions (not generic framework patterns)
80
+ - Generate candidate files with confidence scores based on evidence strength
247
81
 
248
- #### 7.2 File Content Structure
82
+ **Trace API calls (Frontend → Backend):**
249
83
 
250
- Write the comprehensive dependency analysis to the temporary file using the following structure:
84
+ - Locate frontend components using routing configuration
85
+ - Extract API calls using project's HTTP client patterns
86
+ - Map API endpoints to backend routes and controllers
87
+ - Follow architectural layers (routes → controllers → services → repositories → models)
251
88
 
252
- ```markdown
253
- # Dependency Analysis Report: [Ticket Number] - [Title]
89
+ **Generate candidate functions:**
90
+ Use architecture-defined naming patterns to predict function names. Search codebase with project conventions (directory structure + naming patterns). Consider multiple naming styles only if architecture doesn't specify.
254
91
 
255
- ## Summary
92
+ **Synthesize predictions:**
93
+ Combine evidence from multiple sources with priority:
256
94
 
257
- - Total Dependencies Identified: [N]
258
- - Critical Blockers: [N]
259
- - High-Risk Items: [N]
260
- - External Integrations: [N]
261
- - Overall Risk Level: [Low/Medium/High/Critical]
95
+ 1. Architecture conventions (highest)
96
+ 2. Past ticket patterns
97
+ 3. URL/route mapping
98
+ 4. API endpoint tracing
99
+ 5. Function name inference
100
+ 6. Generic framework conventions (fallback only)
262
101
 
263
- ## Technical Dependencies
102
+ Document each file with evidence trail, predicted methods/changes, and confidence level (HIGH/MEDIUM/LOW).
264
103
 
265
- [List with details]
104
+ **Verify file state:**
105
+ Check existence, last modified date/author, complexity metrics, and whether file appeared in related tickets.
266
106
 
267
- ## Infrastructure Dependencies
107
+ ### 6. Generate Outputs
268
108
 
269
- [List with details]
109
+ **Console Report:**
110
+ Display minimal summary in terminal with single-line format per related ticket showing ticket ID, similarity percentage, and file count only.
270
111
 
271
- ## Third-Party Dependencies
112
+ **Temporary Dependency File:**
113
+ Create `bmad-docs/temporary/{ticket_id}-dependency-tmp.md` containing the following aspects:
272
114
 
273
- [List with details]
115
+ ```
274
116
 
275
- ## Data Dependencies
117
+ **Summary Section:**
118
+ Provide quantitative overview including total number of files impacted, breakdown of files requiring modification versus new file creation, count of integration points, and overall risk level classification (Simple/Moderate/Complex).
276
119
 
277
- [List with details]
120
+ **Technical Hints Extracted:**
121
+ Document all technical clues organized by source. From screenshots include URLs, file paths from error traces, and console log messages. From ticket description capture URL patterns, API endpoint references, and direct code references. From architecture documentation note project structure conventions, naming patterns, routing configurations, and architectural layers.
278
122
 
279
- ## Blockers
123
+ **Related Past Work:**
124
+ For each related ticket identified, include similarity score percentage, completion date, key learnings or patterns discovered, and complete list of files that were modified during that work.
280
125
 
281
- [List with severity, impact, mitigation]
126
+ **Code Dependencies - Files to Modify:**
127
+ For each existing file requiring changes, document its purpose and current state, explain the evidence trail showing how it was identified, describe predicted methods or code sections needing changes, state implementation requirements, assign confidence level (HIGH/MEDIUM/LOW), and note any concerns or complexity factors.
282
128
 
283
- ## Integration Points
129
+ **Code Dependencies - Files to Create:**
130
+ For each new file needed, specify its purpose and which template or pattern it should follow, explain how this need was identified through architecture analysis, outline expected interfaces or methods it should implement, assign confidence level, and document any concerns about its creation.
284
131
 
285
- [List with protocols, error handling]
132
+ **Integration Points:**
133
+ Document all integration touchpoints both internal (between modules) and external (third-party services). For each integration specify the contract or interface, note reliability concerns, and define testing requirements.
286
134
 
287
- ## Risks
135
+ **Blockers:**
136
+ List technical blockers preventing immediate progress. For each blocker describe its impact on implementation, outline resolution path, suggest alternatives if available, and indicate whether partial progress is possible while blocker remains.
288
137
 
289
- [List with likelihood, impact, mitigation]
138
+ **Risks:**
139
+ Assess technical risks with structured analysis. For each risk specify likelihood (High/Medium/Low), potential impact, detection method during implementation, mitigation strategy, and contingency plan if risk materializes.
290
140
 
291
- ## Recommended Approach
141
+ **Recommended Approach:**
142
+ Provide step-by-step implementation approach that leverages patterns from past work, addresses identified blockers, and follows project architectural conventions.
292
143
 
293
- 1. [First priority action]
294
- 2. [Second priority action]
295
- 3. [Continue with remaining actions]
144
+ **Critical Path Items:**
145
+ Identify key dependencies that absolutely must be resolved for successful implementation. These are prerequisites that block all progress if not addressed.
296
146
 
297
- ## Critical Path Items
147
+ **Next Steps:**
148
+ List immediate actionable items required before proceeding to implementation planning phase.
298
149
 
299
- - [Items that must be resolved before starting]
300
- - [Items that must be resolved during implementation]
150
+ ```
301
151
 
302
- ## Next Steps
152
+ **Console Summary:**
153
+ Print single-line completion message containing: dependency file path, total files to modify, total files to create, risk level (Simple/Moderate/Complex), and related ticket IDs (comma-separated). No additional explanatory text or formatting.
303
154
 
304
- 1. Resolve critical blockers
305
- 2. Validate high-risk dependencies
306
- 3. Proceed with implementation plan
307
- ```
155
+ ## Assessment Criteria
308
156
 
309
- #### 7.3 Present Summary to User
157
+ **Similarity Scoring:**
310
158
 
311
- After creating the file, provide a summary to the user:
159
+ - High (≥80%): Same component/module and feature area
160
+ - Medium (60-79%): Related area with some overlap
161
+ - Low (<60%): Different area with useful patterns
312
162
 
313
- - Location of the temporary file
314
- - Total dependencies identified
315
- - Critical blockers that need attention
316
- - Overall risk level assessment
163
+ **Code Impact Assessment:**
317
164
 
318
- ### 8. Integration with Implementation Plan
165
+ - Simple (Low Risk): 1-3 files, clear patterns, no new integrations
166
+ - Moderate (Medium Risk): 4-10 files, some new files, 1-2 integration points
167
+ - Complex (High Risk): 10+ files, many new components, multiple integrations
319
168
 
320
- The `create-implementation-plan` task will read `{{ticket_no}}-dependency-tmp.md` and integrate dependencies into the implementation plan's "Dependencies and Risks" section, "Technical Approach", and "Tasks / Subtasks".
169
+ ## Key Principles
321
170
 
322
- #### 8.1 Cleanup Logic
171
+ **Evidence Priority (for code location):**
323
172
 
324
- After integration, the create-implementation-plan task performs cleanup:
173
+ 1. Architecture documentation (highest - project conventions)
174
+ 2. Screenshots/attachments (URLs, error traces)
175
+ 3. Past ticket patterns (proven approaches)
176
+ 4. Code tracing (URL → routes → controllers → services)
177
+ 5. Semantic inference (function name generation)
178
+ 6. Generic framework conventions (fallback only)
325
179
 
326
- **All dependencies addressed:** Delete `{{ticket_no}}-dependency-tmp.md` completely.
180
+ **Best Practices:**
327
181
 
328
- **Dependencies span multiple subtasks:** Remove only addressed dependencies from the temporary file. Keep remaining dependencies for subsequent decomposed subtasks that will reuse the file.
182
+ - Focus on semantic similarity over keyword matching
183
+ - Prioritize recent work (last 6 months)
184
+ - Extract architecture conventions first
185
+ - Combine multiple evidence sources
186
+ - Document uncertainties as risks, not blockers
187
+ - Show evidence trail for transparency
188
+ - Keep console output concise, temp file detailed
329
189
 
330
- #### 8.2 Workflow
190
+ ## Integration with Implementation Plan
331
191
 
332
- 1. **Identify Dependencies** Creates `{{ticket_no}}-dependency-tmp.md`
333
- 2. **Decompose Task** (if needed) → Breaks large tasks into smaller subtasks
334
- 3. **Create Implementation Plan** → Integrates dependencies, cleans up file as appropriate
335
- 4. **Repeat** → Subsequent subtasks reuse temporary file until all dependencies addressed
192
+ The `create-implementation-plan` task reads the temporary dependency file and integrates findings. After integration:
336
193
 
337
- ## Notes
194
+ - Delete temp file if all dependencies addressed
195
+ - Keep remaining items if dependencies span multiple subtasks
338
196
 
339
- - This task is typically run as part of create-implementation-plan workflow
340
- - Can also be run standalone for existing plans or tickets
341
- - Creates a temporary file `{{ticket_no}}-dependency-tmp.md` in `bmad-docs/temporary/` for use by subsequent tasks
342
- - Temporary file persists across decomposed subtasks and is cleaned up once all dependencies are addressed
343
- - Supports BMAD decomposition workflow where large tasks (multiple story points) are broken into smaller tasks (max 1 story point each)
344
- - Dependency identification helps set realistic timelines
345
- - Early identification prevents surprises during implementation
346
- - Risk mitigation strategies should be concrete and actionable
347
- - Document assumptions clearly when dependencies are uncertain
197
+ **Workflow:** identify-dependencies decompose-task (optional) create-implementation-plan → repeat for subtasks
@@ -10,26 +10,37 @@ Review code and apply practical improvements directly. Focus on reducing time co
10
10
 
11
11
  ### 1. Load Files
12
12
 
13
- **If story file:** Extract files from "Dev Agent Record" "File List"
13
+ **Load and Read `coding-standards.md` file:** from the given location in `devLoadAlwaysFiles` of `.bmad-core/core-config.yaml` file
14
+ **If story/task file:** Extract files from "Dev Agent Record" → "File List"
14
15
  **If specific files:** Use provided paths
15
16
 
16
17
  ### 2. Review Each File
17
18
 
19
+ _Suggest Improvements ONLY in Recently Modified or Added Code_
20
+
18
21
  Look for:
19
22
 
20
23
  **Time Complexity Issues:**
24
+
21
25
  - O(n²) or worse algorithms → Can we make it O(n)?
22
26
  - Nested loops → Can we use a Map/Set?
23
27
  - Repeated calculations → Can we calculate once?
24
28
  - Inefficient searching/sorting → Better algorithm?
25
29
 
26
30
  **Code Quality:**
31
+
27
32
  - Confusing variable names → Rename
28
33
  - Duplicate code → Extract to function
29
34
  - Long functions → Break down
30
35
  - Missing error handling → Add it
31
36
 
37
+ **Code Standards:**
38
+
39
+ - Standards not followed → Fix to match coding-standards.md
40
+ - Missing or incorrect comments → Add/fix per commenting strategy
41
+
32
42
  **Simple Performance:**
43
+
33
44
  - Database queries in loops → Batch them
34
45
  - Large arrays being copied → Use references
35
46
  - Unnecessary iterations → Remove
@@ -67,6 +78,7 @@ Apply this improvement? (yes/no)
67
78
  ### 6. After All Improvements
68
79
 
69
80
  Summary:
81
+
70
82
  - Files reviewed: {count}
71
83
  - Improvements found: {count}
72
84
  - Improvements applied: {count}
@@ -77,6 +89,7 @@ Done!
77
89
  ## Rules
78
90
 
79
91
  **DO suggest:**
92
+
80
93
  - ✅ Better algorithms (O(n²) → O(n))
81
94
  - ✅ Using Map/Set instead of nested loops
82
95
  - ✅ Removing duplicate code
@@ -85,6 +98,7 @@ Done!
85
98
  - ✅ Adding error handling
86
99
 
87
100
  **DON'T suggest:**
101
+
88
102
  - ❌ Caching layers
89
103
  - ❌ Vector embeddings
90
104
  - ❌ Redis/persistent memory