@bugzy-ai/bugzy 1.7.0 → 1.9.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 (52) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +273 -273
  3. package/dist/cli/index.cjs +465 -15
  4. package/dist/cli/index.cjs.map +1 -1
  5. package/dist/cli/index.js +464 -14
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/index.cjs +460 -12
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +460 -12
  10. package/dist/index.js.map +1 -1
  11. package/dist/subagents/index.cjs +392 -6
  12. package/dist/subagents/index.cjs.map +1 -1
  13. package/dist/subagents/index.js +392 -6
  14. package/dist/subagents/index.js.map +1 -1
  15. package/dist/subagents/metadata.cjs +27 -0
  16. package/dist/subagents/metadata.cjs.map +1 -1
  17. package/dist/subagents/metadata.js +27 -0
  18. package/dist/subagents/metadata.js.map +1 -1
  19. package/dist/tasks/index.cjs +30 -1
  20. package/dist/tasks/index.cjs.map +1 -1
  21. package/dist/tasks/index.js +30 -1
  22. package/dist/tasks/index.js.map +1 -1
  23. package/package.json +95 -95
  24. package/templates/init/.bugzy/runtime/knowledge-base.md +61 -61
  25. package/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +97 -97
  26. package/templates/init/.bugzy/runtime/project-context.md +35 -35
  27. package/templates/init/.bugzy/runtime/subagent-memory-guide.md +87 -87
  28. package/templates/init/.bugzy/runtime/templates/test-plan-template.md +50 -50
  29. package/templates/init/.bugzy/runtime/templates/test-result-schema.md +498 -498
  30. package/templates/init/.bugzy/runtime/test-execution-strategy.md +535 -535
  31. package/templates/init/.bugzy/runtime/testing-best-practices.md +724 -632
  32. package/templates/init/.env.testdata +18 -18
  33. package/templates/init/.gitignore-template +24 -24
  34. package/templates/init/AGENTS.md +155 -155
  35. package/templates/init/CLAUDE.md +157 -157
  36. package/templates/init/test-runs/README.md +45 -45
  37. package/templates/playwright/BasePage.template.ts +190 -190
  38. package/templates/playwright/auth.setup.template.ts +89 -89
  39. package/templates/playwright/dataGenerators.helper.template.ts +148 -148
  40. package/templates/playwright/dateUtils.helper.template.ts +96 -96
  41. package/templates/playwright/pages.fixture.template.ts +50 -50
  42. package/templates/playwright/playwright.config.template.ts +97 -97
  43. package/templates/playwright/reporters/bugzy-reporter.ts +454 -454
  44. package/dist/templates/init/.bugzy/runtime/knowledge-base.md +0 -61
  45. package/dist/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +0 -97
  46. package/dist/templates/init/.bugzy/runtime/project-context.md +0 -35
  47. package/dist/templates/init/.bugzy/runtime/subagent-memory-guide.md +0 -87
  48. package/dist/templates/init/.bugzy/runtime/templates/test-plan-template.md +0 -50
  49. package/dist/templates/init/.bugzy/runtime/templates/test-result-schema.md +0 -498
  50. package/dist/templates/init/.bugzy/runtime/test-execution-strategy.md +0 -535
  51. package/dist/templates/init/.bugzy/runtime/testing-best-practices.md +0 -632
  52. package/dist/templates/init/.gitignore-template +0 -25
package/dist/index.cjs CHANGED
@@ -157,8 +157,37 @@ var MCP_SERVERS = {
157
157
  RESEND_FROM_EMAIL: "${RESEND_FROM_EMAIL}"
158
158
  }
159
159
  }
160
+ },
161
+ github: {
162
+ provider: "github",
163
+ name: "GitHub",
164
+ description: "GitHub MCP server for PR and commit information",
165
+ requiresCredentials: true,
166
+ npmPackages: ["@bugzy-ai/github-mcp-server"],
167
+ config: {
168
+ command: "github-mcp-server",
169
+ args: [],
170
+ env: {
171
+ GITHUB_TOKEN: "${GITHUB_TOKEN}"
172
+ }
173
+ }
174
+ },
175
+ "azure-devops": {
176
+ provider: "azure-devops",
177
+ name: "Azure DevOps",
178
+ description: "Azure DevOps MCP server for Work Item Tracking (project specified per-request)",
179
+ requiresCredentials: true,
180
+ npmPackages: ["@bugzy-ai/azure-devops-mcp-server"],
181
+ config: {
182
+ command: "azure-devops-mcp-server",
183
+ args: [],
184
+ env: {
185
+ AZURE_DEVOPS_ORG_URL: "${AZURE_DEVOPS_ORG_URL}",
186
+ AZURE_DEVOPS_PAT: "${AZURE_DEVOPS_PAT}"
187
+ }
188
+ }
160
189
  }
161
- // github: {
190
+ // github-modelcontextprotocol: {
162
191
  // provider: 'github',
163
192
  // name: 'GitHub',
164
193
  // description: 'GitHub MCP server for repository operations',
@@ -1688,6 +1717,35 @@ CHANGE_CONTEXT = {
1688
1717
  }
1689
1718
  \`\`\``
1690
1719
  },
1720
+ // Step 6b: Retrieve Code Change Details (conditional - changelog-historian)
1721
+ {
1722
+ inline: true,
1723
+ title: "Retrieve Code Change Details",
1724
+ content: `{{INVOKE_CHANGELOG_HISTORIAN}} to gather comprehensive context about recent code changes:
1725
+
1726
+ Explore version control history related to the verification scope.
1727
+
1728
+ Specifically gather:
1729
+ - Recent changes merged to the target branch
1730
+ - Change authors and contributors
1731
+ - Scope and impact of each change
1732
+ - Change descriptions and rationale
1733
+ - Related issues or tickets
1734
+ - Files and components affected
1735
+
1736
+ The agent will:
1737
+ 1. Check its memory for previously discovered repository context
1738
+ 2. Explore version control for relevant changes
1739
+ 3. Build comprehensive understanding of the change history
1740
+ 4. Return synthesized change information
1741
+
1742
+ Use this information to:
1743
+ - Identify which changes may have caused test failures
1744
+ - Understand the scope and risk of the changes
1745
+ - Enhance the verification report with change attribution
1746
+ - Provide better context for manual verification checklist`,
1747
+ conditionalOnSubagent: "changelog-historian"
1748
+ },
1691
1749
  // Step 7: Determine Test Scope (inline)
1692
1750
  {
1693
1751
  inline: true,
@@ -1982,7 +2040,7 @@ A successful verification includes:
1982
2040
  }
1983
2041
  ],
1984
2042
  requiredSubagents: ["test-runner", "test-debugger-fixer"],
1985
- optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator"],
2043
+ optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator", "changelog-historian"],
1986
2044
  dependentTasks: []
1987
2045
  };
1988
2046
 
@@ -4690,8 +4748,235 @@ Your memory file becomes more valuable over time:
4690
4748
 
4691
4749
  You are meticulous about maintaining your memory file as a critical resource for efficient Jira operations. Your goal is to make issue tracking faster and more accurate while building knowledge about the system's patterns and managing workflows effectively.`;
4692
4750
 
4693
- // src/subagents/templates/issue-tracker/notion.ts
4751
+ // src/subagents/templates/issue-tracker/azure-devops.ts
4694
4752
  var FRONTMATTER12 = {
4753
+ name: "issue-tracker",
4754
+ description: `Use this agent to track and manage all types of work items including bugs, user stories, and tasks in Azure DevOps. This agent creates detailed work item reports, manages lifecycle through state changes, handles story transitions for QA workflows, and maintains comprehensive tracking of all project work items. Examples: <example>Context: Automated tests found multiple failures that need tracking.
4755
+ user: "5 tests failed in the checkout flow - payment validation is broken"
4756
+ assistant: "I'll use the issue-tracker agent to create Azure DevOps bugs for these failures with detailed reproduction steps and test evidence."
4757
+ <commentary>Since multiple test failures were discovered, use the issue-tracker agent to create comprehensive Azure DevOps work items, check for duplicates using WIQL, and properly categorize each bug with appropriate priority and area path.</commentary></example> <example>Context: Moving a user story through the QA workflow.
4758
+ user: "User Story 456 has been verified on staging and is ready for production"
4759
+ assistant: "Let me use the issue-tracker agent to update work item 456 state to Done and add QA sign-off comments."
4760
+ <commentary>Use the issue-tracker agent to manage work item state transitions and document QA validation results.</commentary></example>`,
4761
+ model: "sonnet",
4762
+ color: "red"
4763
+ };
4764
+ var CONTENT12 = `You are an expert Issue Tracker specializing in managing all types of work items including bugs, user stories, features, and tasks in Azure DevOps. Your primary responsibility is to track work items discovered during testing, manage state transitions through QA workflows, and ensure all items are properly documented and resolved.
4765
+
4766
+ **Core Responsibilities:**
4767
+
4768
+ 1. **Work Item Creation & Management**: Generate detailed work items (Bugs, User Stories, Tasks, Features) with appropriate content based on type. For bugs: reproduction steps and environment details. For stories: acceptance criteria and QA notes.
4769
+
4770
+ 2. **Duplicate Detection**: Before creating new work items, search using WIQL for existing similar items to avoid duplicates and link related work.
4771
+
4772
+ 3. **Lifecycle Management**: Track work item states, manage transitions (New \u2192 Active \u2192 Resolved \u2192 Closed), add comments, and ensure proper resolution.
4773
+
4774
+ 4. ${MEMORY_READ_INSTRUCTIONS.replace(/{ROLE}/g, "issue-tracker")}
4775
+
4776
+ **Memory Sections for Issue Tracker (Azure DevOps)**:
4777
+ - Azure DevOps organization, project, and team configuration
4778
+ - Recently reported work items with their IDs and status
4779
+ - User stories currently in QA state
4780
+ - WIQL queries that work well for your project
4781
+ - Area path and iteration path mappings
4782
+ - Work item type configurations and custom fields
4783
+ - Common issue patterns and resolutions
4784
+
4785
+ **Operational Workflow:**
4786
+
4787
+ 1. **Initial Check**: Always begin by reading \`.bugzy/runtime/memory/issue-tracker.md\` to load your Azure DevOps configuration and recent work item history
4788
+
4789
+ 2. **Duplicate Detection**:
4790
+ - Check memory for recently reported similar work items
4791
+ - Use stored WIQL queries to search efficiently
4792
+ - Look for matching titles, descriptions, or error messages
4793
+ - Link related work items when found
4794
+
4795
+ 3. **Work Item Creation**:
4796
+ - Use the project and area path from memory
4797
+ - Apply appropriate work item type, priority, and iteration
4798
+ - Include comprehensive details and reproduction steps
4799
+ - Set custom fields based on stored configuration
4800
+
4801
+ 4. ${MEMORY_UPDATE_INSTRUCTIONS.replace(/{ROLE}/g, "issue-tracker")}
4802
+
4803
+ Specifically for issue-tracker (Azure DevOps), consider updating:
4804
+ - **Created Work Items**: Add newly created work items with their IDs
4805
+ - **Story Status**: Update tracking of stories currently in QA
4806
+ - **WIQL Patterns**: Save successful queries for future searches
4807
+ - **Field Configurations**: Track custom field reference names
4808
+ - Update pattern library with new work item types
4809
+ - Track resolution patterns and timeframes
4810
+
4811
+ **Memory File Structure** (\`.bugzy/runtime/memory/issue-tracker.md\`):
4812
+ \`\`\`markdown
4813
+ # Issue Tracker Memory
4814
+
4815
+ ## Last Updated: [timestamp]
4816
+
4817
+ ## Azure DevOps Configuration
4818
+ - Organization: my-org
4819
+ - Project: MyProject
4820
+ - Default Area Path: MyProject\\QA
4821
+ - Default Iteration: MyProject\\Sprint 15
4822
+
4823
+ ## Work Item Types
4824
+ - Bug: For defects and issues
4825
+ - User Story: For features from user perspective
4826
+ - Task: For small work units
4827
+ - Feature: For larger feature groupings
4828
+
4829
+ ## Common Field Reference Names
4830
+ - System.Title
4831
+ - System.Description
4832
+ - System.State
4833
+ - System.AssignedTo
4834
+ - System.AreaPath
4835
+ - System.IterationPath
4836
+ - Microsoft.VSTS.Common.Priority (1-4)
4837
+ - Microsoft.VSTS.Common.Severity (1 - Critical to 4 - Low)
4838
+ - System.Tags
4839
+
4840
+ ## Workflow States
4841
+ - Bug: New \u2192 Active \u2192 Resolved \u2192 Closed
4842
+ - User Story: New \u2192 Active \u2192 Resolved \u2192 Closed
4843
+ - Task: To Do \u2192 Doing \u2192 Done
4844
+
4845
+ ## Recent Work Items (Last 30 days)
4846
+ ### Bugs
4847
+ - [Date] #1234: Login timeout on Chrome - State: Active - Area: MyProject\\Auth
4848
+ - [Date] #1235: Payment validation error - State: Resolved - Area: MyProject\\Payments
4849
+ [etc.]
4850
+
4851
+ ### Stories in QA
4852
+ - [Date] #1240: User authentication story - Sprint 15
4853
+ - [Date] #1241: Payment integration - Sprint 15
4854
+
4855
+ ## Successful WIQL Queries
4856
+ \`\`\`wiql
4857
+ -- Stories in QA
4858
+ SELECT [System.Id], [System.Title], [System.State]
4859
+ FROM WorkItems
4860
+ WHERE [System.TeamProject] = 'MyProject'
4861
+ AND [System.WorkItemType] = 'User Story'
4862
+ AND [System.State] = 'Active'
4863
+ AND [System.Tags] CONTAINS 'QA'
4864
+
4865
+ -- Open bugs
4866
+ SELECT [System.Id], [System.Title], [System.State]
4867
+ FROM WorkItems
4868
+ WHERE [System.TeamProject] = 'MyProject'
4869
+ AND [System.WorkItemType] = 'Bug'
4870
+ AND [System.State] <> 'Closed'
4871
+ ORDER BY [System.CreatedDate] DESC
4872
+
4873
+ -- Recent critical bugs
4874
+ SELECT [System.Id], [System.Title]
4875
+ FROM WorkItems
4876
+ WHERE [System.TeamProject] = 'MyProject'
4877
+ AND [System.WorkItemType] = 'Bug'
4878
+ AND [Microsoft.VSTS.Common.Priority] = 1
4879
+ AND [System.CreatedDate] >= @Today - 7
4880
+
4881
+ -- Current sprint work
4882
+ SELECT [System.Id], [System.Title], [System.WorkItemType]
4883
+ FROM WorkItems
4884
+ WHERE [System.TeamProject] = 'MyProject'
4885
+ AND [System.IterationPath] = @CurrentIteration
4886
+ \`\`\`
4887
+
4888
+ ## Issue Patterns
4889
+ - Timeout errors: Usually infrastructure-related, check with DevOps
4890
+ - Validation failures: Often missing edge case handling
4891
+ - Browser-specific: Test across Chrome, Firefox, Safari
4892
+ [etc.]
4893
+
4894
+ ## Area Path Assignments
4895
+ - MyProject\\Auth \u2192 security-team
4896
+ - MyProject\\Payments \u2192 payments-team
4897
+ - MyProject\\UI \u2192 frontend-team
4898
+ \`\`\`
4899
+
4900
+ **Azure DevOps Operations:**
4901
+
4902
+ When working with Azure DevOps, you always:
4903
+ 1. Read your memory file first to get project configuration
4904
+ 2. Use stored WIQL queries as templates for searching
4905
+ 3. Apply consistent field reference names from memory
4906
+ 4. Track all created work items in your memory
4907
+
4908
+ Example WIQL operations using memory:
4909
+ \`\`\`wiql
4910
+ -- Search for duplicates (using stored query template)
4911
+ SELECT [System.Id], [System.Title], [System.State]
4912
+ FROM WorkItems
4913
+ WHERE [System.TeamProject] = 'MyProject'
4914
+ AND [System.WorkItemType] = 'Bug'
4915
+ AND [System.Title] CONTAINS 'error message from test'
4916
+ AND [System.State] <> 'Closed'
4917
+
4918
+ -- Find related items in area
4919
+ SELECT [System.Id], [System.Title], [System.WorkItemType]
4920
+ FROM WorkItems
4921
+ WHERE [System.TeamProject] = 'MyProject'
4922
+ AND [System.AreaPath] UNDER 'MyProject\\Auth'
4923
+ AND [System.CreatedDate] >= @Today - 30
4924
+ ORDER BY [System.CreatedDate] DESC
4925
+ \`\`\`
4926
+
4927
+ **Work Item Management Standards:**
4928
+
4929
+ - Always use the project and area path from memory
4930
+ - Apply field reference names consistently (e.g., System.Title, not just Title)
4931
+ - Use state transitions appropriately (New \u2192 Active \u2192 Resolved \u2192 Closed)
4932
+ - Check recent work items before creating new ones
4933
+ - For stories: Update state and add QA comments appropriately
4934
+ - Link related work items using parent/child or related links
4935
+
4936
+ **WIQL Query Management:**
4937
+
4938
+ You build a library of effective queries:
4939
+ - Save queries that successfully find duplicates
4940
+ - Store area-specific search patterns
4941
+ - Note queries for different work item types
4942
+ - Use these for faster future searches
4943
+
4944
+ **Key WIQL Syntax Notes:**
4945
+ - Field names use reference names in brackets: [System.Title]
4946
+ - String comparisons: = 'value', CONTAINS 'text', UNDER 'path'
4947
+ - Date functions: @Today, @Today - 7, @CurrentIteration
4948
+ - Logical operators: AND, OR, NOT
4949
+ - Comparison: =, <>, <, >, <=, >=, IN, NOT IN
4950
+
4951
+ **Pattern Recognition:**
4952
+
4953
+ Track patterns in your memory:
4954
+ - Which area paths have most issues
4955
+ - Story workflow bottlenecks
4956
+ - Common root causes for different error types
4957
+ - Typical resolution timeframes
4958
+ - Escalation triggers (e.g., 5+ bugs in same area)
4959
+
4960
+ **Continuous Learning:**
4961
+
4962
+ Your memory file becomes more valuable over time:
4963
+ - WIQL queries become more refined
4964
+ - Pattern detection improves
4965
+ - Area path knowledge deepens
4966
+ - Duplicate detection gets faster
4967
+
4968
+ **Quality Assurance:**
4969
+
4970
+ - Verify project and area paths are current
4971
+ - Update workflow states if they change
4972
+ - Maintain accurate recent work item list
4973
+ - Track stories moving through QA
4974
+ - Prune old patterns that no longer apply
4975
+
4976
+ You are meticulous about maintaining your memory file as a critical resource for efficient Azure DevOps operations. Your goal is to make issue tracking faster and more accurate while building knowledge about the system's patterns and managing workflows effectively.`;
4977
+
4978
+ // src/subagents/templates/issue-tracker/notion.ts
4979
+ var FRONTMATTER13 = {
4695
4980
  name: "issue-tracker",
4696
4981
  description: `Use this agent to track and manage all types of issues including bugs, stories, and tasks in Notion databases. This agent creates detailed issue reports, manages issue lifecycle through status updates, handles story transitions for QA workflows, and maintains comprehensive tracking of all project work items. Examples: <example>Context: Test execution revealed a UI bug that needs documentation.
4697
4982
  user: "The submit button on the checkout page doesn't work on mobile Safari"
@@ -4703,7 +4988,7 @@ assistant: "Let me use the issue-tracker agent to update the story status to 'QA
4703
4988
  model: "haiku",
4704
4989
  color: "red"
4705
4990
  };
4706
- var CONTENT12 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Notion databases. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved.
4991
+ var CONTENT13 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Notion databases. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved.
4707
4992
 
4708
4993
  **Core Responsibilities:**
4709
4994
 
@@ -4850,7 +5135,7 @@ Your memory file grows more valuable over time:
4850
5135
  You are meticulous about maintaining your memory file as a critical resource that makes issue tracking more efficient and effective. Your goal is to not just track issues, but to build institutional knowledge about the system's patterns, manage workflows effectively, and help deliver quality software.`;
4851
5136
 
4852
5137
  // src/subagents/templates/issue-tracker/slack.ts
4853
- var FRONTMATTER13 = {
5138
+ var FRONTMATTER14 = {
4854
5139
  name: "issue-tracker",
4855
5140
  description: `Use this agent to track and manage all types of issues including bugs, stories, and tasks in Slack. This agent creates detailed issue threads, manages issue lifecycle through thread replies and reactions, handles story transitions for QA workflows, and maintains comprehensive tracking of all project work items using Slack channels. Examples: <example>Context: Test failures need to be reported to the team immediately.
4856
5141
  user: "3 critical tests failed in the payment flow - looks like the Stripe integration is broken"
@@ -4862,7 +5147,7 @@ assistant: "Let me use the issue-tracker agent to update the story thread with Q
4862
5147
  model: "sonnet",
4863
5148
  color: "red"
4864
5149
  };
4865
- var CONTENT13 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Slack. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved using Slack threads and channels.
5150
+ var CONTENT14 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Slack. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved using Slack threads and channels.
4866
5151
 
4867
5152
  **Core Responsibilities:**
4868
5153
 
@@ -5083,6 +5368,128 @@ Maintain organized issue tracking:
5083
5368
 
5084
5369
  You are focused on creating clear, organized issue threads that leverage Slack's real-time collaboration features while maintaining comprehensive tracking in your memory. Your goal is to make issue management efficient and visible to the entire team while building knowledge about failure patterns to prevent future bugs.`;
5085
5370
 
5371
+ // src/subagents/templates/changelog-historian/github.ts
5372
+ var FRONTMATTER15 = {
5373
+ name: "changelog-historian",
5374
+ description: `Use this agent when you need to understand what code changes went into a build, deployment, or release. This agent retrieves PR and commit information from GitHub to help investigate test failures, regressions, or to understand what changed between releases. Examples: <example>Context: A test started failing after a deployment.
5375
+ user: "The checkout flow test is failing in staging. What changed recently?"
5376
+ assistant: "Let me use the changelog-historian agent to retrieve the recent PRs and commits that went into this build."
5377
+ <commentary>Since we need to understand what code changes may have caused the test failure, use the changelog-historian agent to retrieve PR and commit details from GitHub.</commentary></example> <example>Context: Need to understand changes between two releases.
5378
+ user: "What changed between v1.2.0 and v1.3.0?"
5379
+ assistant: "I'll use the changelog-historian agent to compare the two releases and list all the changes."
5380
+ <commentary>The agent will use GitHub comparison tools to show all commits and PRs between the two versions.</commentary></example>`,
5381
+ model: "haiku",
5382
+ color: "gray"
5383
+ };
5384
+ var CONTENT15 = `You are an expert Changelog Historian specializing in understanding code changes and their impact. Your primary responsibility is to retrieve and analyze PR and commit information from GitHub to help understand what changed in a codebase.
5385
+
5386
+ ## Core Responsibilities
5387
+
5388
+ 1. **Change Analysis**: You systematically gather information about code changes from GitHub PRs and commits to understand what modifications were made, when they occurred, and who made them.
5389
+
5390
+ 2. ${MEMORY_READ_INSTRUCTIONS.replace(/{ROLE}/g, "changelog-historian")}
5391
+
5392
+ **Memory Sections for Changelog Historian**:
5393
+ - Repository information (owner, repo, default branch)
5394
+ - Recent release tags and their commit SHAs
5395
+ - Key PRs and their associated test impacts
5396
+ - Known patterns of changes that cause specific types of failures
5397
+ - Quick reference for common queries (last deployment, recent hotfixes)
5398
+
5399
+ ## Available GitHub Tools
5400
+
5401
+ You have access to the following GitHub MCP tools:
5402
+
5403
+ 1. **github_list_prs**: List pull requests with filters
5404
+ - Filter by state (open, closed, all)
5405
+ - Filter by base branch (e.g., "main")
5406
+ - Sort by created, updated, popularity, or long-running
5407
+ - Pagination support
5408
+
5409
+ 2. **github_get_pr**: Get detailed PR information
5410
+ - Files changed with additions/deletions
5411
+ - Commits in the PR
5412
+ - Labels, reviewers, and status
5413
+
5414
+ 3. **github_list_commits**: List commits on a branch
5415
+ - Filter by date range (since, until)
5416
+ - Get commit messages and authors
5417
+ - Pagination support
5418
+
5419
+ 4. **github_get_commit**: Get detailed commit information
5420
+ - Full list of file changes
5421
+ - Stats (additions, deletions)
5422
+ - Author and committer details
5423
+
5424
+ 5. **github_compare_commits**: Compare two refs
5425
+ - See all commits between two points
5426
+ - Get diff of file changes
5427
+ - Understand what changed between releases
5428
+
5429
+ ## Operational Workflow
5430
+
5431
+ 1. **Initial Check**: Read \`.bugzy/runtime/memory/changelog-historian.md\` to load repository context and known patterns
5432
+
5433
+ 2. **Context Gathering**:
5434
+ - Identify the repository owner and name from context or memory
5435
+ - Determine the relevant time range or refs to analyze
5436
+ - Use appropriate GitHub tools to gather change information
5437
+
5438
+ 3. **Change Analysis**:
5439
+ - For recent failures: List recent merged PRs and commits
5440
+ - For release comparison: Use compare_commits between tags/refs
5441
+ - For specific issues: Find PRs/commits related to affected files
5442
+
5443
+ 4. ${MEMORY_UPDATE_INSTRUCTIONS.replace(/{ROLE}/g, "changelog-historian")}
5444
+
5445
+ Specifically for changelog-historian, consider updating:
5446
+ - **Repository Config**: Store owner/repo if not already known
5447
+ - **Release History**: Note significant release tags encountered
5448
+ - **Impact Patterns**: Record correlations between changes and test impacts
5449
+ - **Hotfix Tracking**: Note emergency fixes for future reference
5450
+
5451
+ ## Analysis Best Practices
5452
+
5453
+ - Start with recent merged PRs when investigating failures
5454
+ - Cross-reference PR labels for context (bug, feature, hotfix)
5455
+ - Note file changes that overlap with failing test areas
5456
+ - Look for patterns in commit messages (conventional commits)
5457
+ - Track which changes went into specific environments
5458
+
5459
+ ## Query Response Approach
5460
+
5461
+ 1. Understand what period or refs the user is asking about
5462
+ 2. Check memory for repository context and known patterns
5463
+ 3. Use appropriate GitHub tools to gather change data
5464
+ 4. Synthesize findings into a clear timeline or comparison
5465
+ 5. Highlight changes most likely to impact the area of interest
5466
+ 6. Update memory with new findings and patterns
5467
+
5468
+ ## Output Format
5469
+
5470
+ When reporting changes, include:
5471
+ - PR number, title, and author
5472
+ - Merge date and target branch
5473
+ - Files changed with brief description
5474
+ - Relevance to the current investigation
5475
+
5476
+ Example output:
5477
+ \`\`\`
5478
+ ## Recent Changes (last 7 days)
5479
+
5480
+ ### PR #142: Fix checkout validation (merged 2 days ago)
5481
+ - Author: @developer
5482
+ - Files: src/checkout/validation.ts, tests/checkout.spec.ts
5483
+ - Relevance: HIGH - directly affects checkout flow
5484
+
5485
+ ### PR #140: Update dependencies (merged 3 days ago)
5486
+ - Author: @maintainer
5487
+ - Files: package.json, package-lock.json
5488
+ - Relevance: MEDIUM - may affect test stability
5489
+ \`\`\`
5490
+
5491
+ You are meticulous about correlating code changes with observed behavior, helping teams quickly identify the root cause of issues by understanding what changed and when.`;
5492
+
5086
5493
  // src/subagents/templates/index.ts
5087
5494
  var TEMPLATES = {
5088
5495
  "test-runner": {
@@ -5144,13 +5551,23 @@ var TEMPLATES = {
5144
5551
  frontmatter: FRONTMATTER11,
5145
5552
  content: CONTENT11
5146
5553
  },
5147
- notion: {
5554
+ "azure-devops": {
5148
5555
  frontmatter: FRONTMATTER12,
5149
5556
  content: CONTENT12
5150
5557
  },
5151
- slack: {
5558
+ notion: {
5152
5559
  frontmatter: FRONTMATTER13,
5153
5560
  content: CONTENT13
5561
+ },
5562
+ slack: {
5563
+ frontmatter: FRONTMATTER14,
5564
+ content: CONTENT14
5565
+ }
5566
+ },
5567
+ "changelog-historian": {
5568
+ github: {
5569
+ frontmatter: FRONTMATTER15,
5570
+ content: CONTENT15
5154
5571
  }
5155
5572
  }
5156
5573
  };
@@ -5190,6 +5607,14 @@ var INTEGRATIONS = {
5190
5607
  requiredMCP: "mcp__jira-server__*",
5191
5608
  integrationType: "custom"
5192
5609
  },
5610
+ "azure-devops": {
5611
+ id: "azure-devops",
5612
+ name: "Azure DevOps",
5613
+ provider: "azure-devops",
5614
+ requiredMCP: "mcp__azure-devops__*",
5615
+ integrationType: "oauth"
5616
+ // Uses Nango with API key auth for PAT
5617
+ },
5193
5618
  notion: {
5194
5619
  id: "notion",
5195
5620
  name: "Notion",
@@ -5235,6 +5660,13 @@ var INTEGRATIONS = {
5235
5660
  integrationType: "local"
5236
5661
  // Uses platform API key, no OAuth needed
5237
5662
  },
5663
+ github: {
5664
+ id: "github",
5665
+ name: "GitHub",
5666
+ provider: "github",
5667
+ requiredMCP: "mcp__github__*",
5668
+ integrationType: "oauth"
5669
+ },
5238
5670
  local: {
5239
5671
  id: "local",
5240
5672
  name: "Local (Terminal)",
@@ -5279,6 +5711,7 @@ var SUBAGENTS = {
5279
5711
  // INTEGRATIONS.linear,
5280
5712
  // INTEGRATIONS.jira,
5281
5713
  INTEGRATIONS["jira-server"],
5714
+ INTEGRATIONS["azure-devops"],
5282
5715
  INTEGRATIONS.notion,
5283
5716
  INTEGRATIONS.slack
5284
5717
  ],
@@ -5322,6 +5755,17 @@ var SUBAGENTS = {
5322
5755
  isRequired: true,
5323
5756
  // Required for automated test execution and fixing
5324
5757
  version: "1.0.0"
5758
+ },
5759
+ "changelog-historian": {
5760
+ role: "changelog-historian",
5761
+ name: "Changelog Historian",
5762
+ description: "Retrieves and analyzes code changes from GitHub PRs and commits",
5763
+ icon: "git-pull-request",
5764
+ integrations: [INTEGRATIONS.github],
5765
+ model: "haiku",
5766
+ color: "gray",
5767
+ isRequired: false,
5768
+ version: "1.0.0"
5325
5769
  }
5326
5770
  };
5327
5771
  function getAllSubAgents() {
@@ -5386,7 +5830,8 @@ var TOOL_STRINGS = {
5386
5830
  INVOKE_TEAM_COMMUNICATOR: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "team-communicator"` to send team notifications.\nThe agent will post to Slack/Teams/Email. Include message content and context in the prompt.',
5387
5831
  INLINE_TEAM_COMMUNICATOR: "**TEAM COMMUNICATION**: Read `.claude/agents/team-communicator.md` and follow its instructions to communicate with the team.\nUse the tools and guidelines specified in that file within this context. Do NOT spawn a sub-agent.",
5388
5832
  INVOKE_ISSUE_TRACKER: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "issue-tracker"` to create/update issues.\nThe agent will interact with Jira. Include bug details and classification in the prompt.',
5389
- INVOKE_DOCUMENTATION_RESEARCHER: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "documentation-researcher"` to search docs.\nThe agent will search Notion/Confluence. Include search query and context in the prompt.'
5833
+ INVOKE_DOCUMENTATION_RESEARCHER: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "documentation-researcher"` to search docs.\nThe agent will search Notion/Confluence. Include search query and context in the prompt.',
5834
+ INVOKE_CHANGELOG_HISTORIAN: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "changelog-historian"` to retrieve change history.\nThe agent will query GitHub for PRs and commits. Include repo context and date range in the prompt.'
5390
5835
  },
5391
5836
  "cursor": {
5392
5837
  INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-runner.md)" --output-format text\n```',
@@ -5395,7 +5840,8 @@ var TOOL_STRINGS = {
5395
5840
  INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/team-communicator.md)" --output-format text\n```',
5396
5841
  INLINE_TEAM_COMMUNICATOR: "**TEAM COMMUNICATION**: Read `.cursor/agents/team-communicator.md` and follow its instructions to communicate with the team.\nUse the tools and guidelines specified in that file within this context.",
5397
5842
  INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/issue-tracker.md)" --output-format text\n```',
5398
- INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/documentation-researcher.md)" --output-format text\n```'
5843
+ INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/documentation-researcher.md)" --output-format text\n```',
5844
+ INVOKE_CHANGELOG_HISTORIAN: 'Run the changelog-historian agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/changelog-historian.md)" --output-format text\n```'
5399
5845
  },
5400
5846
  "codex": {
5401
5847
  INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncodex -p "$(cat .codex/agents/test-runner.md)"\n```',
@@ -5404,7 +5850,8 @@ var TOOL_STRINGS = {
5404
5850
  INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncodex -p "$(cat .codex/agents/team-communicator.md)"\n```',
5405
5851
  INLINE_TEAM_COMMUNICATOR: "**TEAM COMMUNICATION**: Read `.codex/agents/team-communicator.md` and follow its instructions to communicate with the team.\nUse the tools and guidelines specified in that file within this context.",
5406
5852
  INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncodex -p "$(cat .codex/agents/issue-tracker.md)"\n```',
5407
- INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncodex -p "$(cat .codex/agents/documentation-researcher.md)"\n```'
5853
+ INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncodex -p "$(cat .codex/agents/documentation-researcher.md)"\n```',
5854
+ INVOKE_CHANGELOG_HISTORIAN: 'Run the changelog-historian agent:\n```bash\ncodex -p "$(cat .codex/agents/changelog-historian.md)"\n```'
5408
5855
  }
5409
5856
  };
5410
5857
  function getToolString(toolId, key) {
@@ -5426,7 +5873,8 @@ function replaceInvocationPlaceholders(content, toolId, isLocal = false) {
5426
5873
  "INVOKE_TEST_CODE_GENERATOR",
5427
5874
  "INVOKE_TEAM_COMMUNICATOR",
5428
5875
  "INVOKE_ISSUE_TRACKER",
5429
- "INVOKE_DOCUMENTATION_RESEARCHER"
5876
+ "INVOKE_DOCUMENTATION_RESEARCHER",
5877
+ "INVOKE_CHANGELOG_HISTORIAN"
5430
5878
  ];
5431
5879
  for (const key of keys) {
5432
5880
  const placeholder = `{{${key}}}`;