@bugzy-ai/bugzy 1.7.0 → 1.8.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.
- package/dist/cli/index.cjs +200 -6
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +200 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +199 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +199 -6
- package/dist/index.js.map +1 -1
- package/dist/subagents/index.cjs +146 -0
- package/dist/subagents/index.cjs.map +1 -1
- package/dist/subagents/index.js +146 -0
- package/dist/subagents/index.js.map +1 -1
- package/dist/subagents/metadata.cjs +18 -0
- package/dist/subagents/metadata.cjs.map +1 -1
- package/dist/subagents/metadata.js +18 -0
- package/dist/subagents/metadata.js.map +1 -1
- package/dist/tasks/index.cjs +30 -1
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.js +30 -1
- package/dist/tasks/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/init/.bugzy/runtime/testing-best-practices.md +93 -1
package/dist/index.cjs
CHANGED
|
@@ -157,8 +157,22 @@ 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
|
+
}
|
|
160
174
|
}
|
|
161
|
-
// github: {
|
|
175
|
+
// github-modelcontextprotocol: {
|
|
162
176
|
// provider: 'github',
|
|
163
177
|
// name: 'GitHub',
|
|
164
178
|
// description: 'GitHub MCP server for repository operations',
|
|
@@ -1688,6 +1702,35 @@ CHANGE_CONTEXT = {
|
|
|
1688
1702
|
}
|
|
1689
1703
|
\`\`\``
|
|
1690
1704
|
},
|
|
1705
|
+
// Step 6b: Retrieve Code Change Details (conditional - changelog-historian)
|
|
1706
|
+
{
|
|
1707
|
+
inline: true,
|
|
1708
|
+
title: "Retrieve Code Change Details",
|
|
1709
|
+
content: `{{INVOKE_CHANGELOG_HISTORIAN}} to gather comprehensive context about recent code changes:
|
|
1710
|
+
|
|
1711
|
+
Explore version control history related to the verification scope.
|
|
1712
|
+
|
|
1713
|
+
Specifically gather:
|
|
1714
|
+
- Recent changes merged to the target branch
|
|
1715
|
+
- Change authors and contributors
|
|
1716
|
+
- Scope and impact of each change
|
|
1717
|
+
- Change descriptions and rationale
|
|
1718
|
+
- Related issues or tickets
|
|
1719
|
+
- Files and components affected
|
|
1720
|
+
|
|
1721
|
+
The agent will:
|
|
1722
|
+
1. Check its memory for previously discovered repository context
|
|
1723
|
+
2. Explore version control for relevant changes
|
|
1724
|
+
3. Build comprehensive understanding of the change history
|
|
1725
|
+
4. Return synthesized change information
|
|
1726
|
+
|
|
1727
|
+
Use this information to:
|
|
1728
|
+
- Identify which changes may have caused test failures
|
|
1729
|
+
- Understand the scope and risk of the changes
|
|
1730
|
+
- Enhance the verification report with change attribution
|
|
1731
|
+
- Provide better context for manual verification checklist`,
|
|
1732
|
+
conditionalOnSubagent: "changelog-historian"
|
|
1733
|
+
},
|
|
1691
1734
|
// Step 7: Determine Test Scope (inline)
|
|
1692
1735
|
{
|
|
1693
1736
|
inline: true,
|
|
@@ -1982,7 +2025,7 @@ A successful verification includes:
|
|
|
1982
2025
|
}
|
|
1983
2026
|
],
|
|
1984
2027
|
requiredSubagents: ["test-runner", "test-debugger-fixer"],
|
|
1985
|
-
optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator"],
|
|
2028
|
+
optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator", "changelog-historian"],
|
|
1986
2029
|
dependentTasks: []
|
|
1987
2030
|
};
|
|
1988
2031
|
|
|
@@ -5083,6 +5126,128 @@ Maintain organized issue tracking:
|
|
|
5083
5126
|
|
|
5084
5127
|
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
5128
|
|
|
5129
|
+
// src/subagents/templates/changelog-historian/github.ts
|
|
5130
|
+
var FRONTMATTER14 = {
|
|
5131
|
+
name: "changelog-historian",
|
|
5132
|
+
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.
|
|
5133
|
+
user: "The checkout flow test is failing in staging. What changed recently?"
|
|
5134
|
+
assistant: "Let me use the changelog-historian agent to retrieve the recent PRs and commits that went into this build."
|
|
5135
|
+
<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.
|
|
5136
|
+
user: "What changed between v1.2.0 and v1.3.0?"
|
|
5137
|
+
assistant: "I'll use the changelog-historian agent to compare the two releases and list all the changes."
|
|
5138
|
+
<commentary>The agent will use GitHub comparison tools to show all commits and PRs between the two versions.</commentary></example>`,
|
|
5139
|
+
model: "haiku",
|
|
5140
|
+
color: "gray"
|
|
5141
|
+
};
|
|
5142
|
+
var CONTENT14 = `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.
|
|
5143
|
+
|
|
5144
|
+
## Core Responsibilities
|
|
5145
|
+
|
|
5146
|
+
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.
|
|
5147
|
+
|
|
5148
|
+
2. ${MEMORY_READ_INSTRUCTIONS.replace(/{ROLE}/g, "changelog-historian")}
|
|
5149
|
+
|
|
5150
|
+
**Memory Sections for Changelog Historian**:
|
|
5151
|
+
- Repository information (owner, repo, default branch)
|
|
5152
|
+
- Recent release tags and their commit SHAs
|
|
5153
|
+
- Key PRs and their associated test impacts
|
|
5154
|
+
- Known patterns of changes that cause specific types of failures
|
|
5155
|
+
- Quick reference for common queries (last deployment, recent hotfixes)
|
|
5156
|
+
|
|
5157
|
+
## Available GitHub Tools
|
|
5158
|
+
|
|
5159
|
+
You have access to the following GitHub MCP tools:
|
|
5160
|
+
|
|
5161
|
+
1. **github_list_prs**: List pull requests with filters
|
|
5162
|
+
- Filter by state (open, closed, all)
|
|
5163
|
+
- Filter by base branch (e.g., "main")
|
|
5164
|
+
- Sort by created, updated, popularity, or long-running
|
|
5165
|
+
- Pagination support
|
|
5166
|
+
|
|
5167
|
+
2. **github_get_pr**: Get detailed PR information
|
|
5168
|
+
- Files changed with additions/deletions
|
|
5169
|
+
- Commits in the PR
|
|
5170
|
+
- Labels, reviewers, and status
|
|
5171
|
+
|
|
5172
|
+
3. **github_list_commits**: List commits on a branch
|
|
5173
|
+
- Filter by date range (since, until)
|
|
5174
|
+
- Get commit messages and authors
|
|
5175
|
+
- Pagination support
|
|
5176
|
+
|
|
5177
|
+
4. **github_get_commit**: Get detailed commit information
|
|
5178
|
+
- Full list of file changes
|
|
5179
|
+
- Stats (additions, deletions)
|
|
5180
|
+
- Author and committer details
|
|
5181
|
+
|
|
5182
|
+
5. **github_compare_commits**: Compare two refs
|
|
5183
|
+
- See all commits between two points
|
|
5184
|
+
- Get diff of file changes
|
|
5185
|
+
- Understand what changed between releases
|
|
5186
|
+
|
|
5187
|
+
## Operational Workflow
|
|
5188
|
+
|
|
5189
|
+
1. **Initial Check**: Read \`.bugzy/runtime/memory/changelog-historian.md\` to load repository context and known patterns
|
|
5190
|
+
|
|
5191
|
+
2. **Context Gathering**:
|
|
5192
|
+
- Identify the repository owner and name from context or memory
|
|
5193
|
+
- Determine the relevant time range or refs to analyze
|
|
5194
|
+
- Use appropriate GitHub tools to gather change information
|
|
5195
|
+
|
|
5196
|
+
3. **Change Analysis**:
|
|
5197
|
+
- For recent failures: List recent merged PRs and commits
|
|
5198
|
+
- For release comparison: Use compare_commits between tags/refs
|
|
5199
|
+
- For specific issues: Find PRs/commits related to affected files
|
|
5200
|
+
|
|
5201
|
+
4. ${MEMORY_UPDATE_INSTRUCTIONS.replace(/{ROLE}/g, "changelog-historian")}
|
|
5202
|
+
|
|
5203
|
+
Specifically for changelog-historian, consider updating:
|
|
5204
|
+
- **Repository Config**: Store owner/repo if not already known
|
|
5205
|
+
- **Release History**: Note significant release tags encountered
|
|
5206
|
+
- **Impact Patterns**: Record correlations between changes and test impacts
|
|
5207
|
+
- **Hotfix Tracking**: Note emergency fixes for future reference
|
|
5208
|
+
|
|
5209
|
+
## Analysis Best Practices
|
|
5210
|
+
|
|
5211
|
+
- Start with recent merged PRs when investigating failures
|
|
5212
|
+
- Cross-reference PR labels for context (bug, feature, hotfix)
|
|
5213
|
+
- Note file changes that overlap with failing test areas
|
|
5214
|
+
- Look for patterns in commit messages (conventional commits)
|
|
5215
|
+
- Track which changes went into specific environments
|
|
5216
|
+
|
|
5217
|
+
## Query Response Approach
|
|
5218
|
+
|
|
5219
|
+
1. Understand what period or refs the user is asking about
|
|
5220
|
+
2. Check memory for repository context and known patterns
|
|
5221
|
+
3. Use appropriate GitHub tools to gather change data
|
|
5222
|
+
4. Synthesize findings into a clear timeline or comparison
|
|
5223
|
+
5. Highlight changes most likely to impact the area of interest
|
|
5224
|
+
6. Update memory with new findings and patterns
|
|
5225
|
+
|
|
5226
|
+
## Output Format
|
|
5227
|
+
|
|
5228
|
+
When reporting changes, include:
|
|
5229
|
+
- PR number, title, and author
|
|
5230
|
+
- Merge date and target branch
|
|
5231
|
+
- Files changed with brief description
|
|
5232
|
+
- Relevance to the current investigation
|
|
5233
|
+
|
|
5234
|
+
Example output:
|
|
5235
|
+
\`\`\`
|
|
5236
|
+
## Recent Changes (last 7 days)
|
|
5237
|
+
|
|
5238
|
+
### PR #142: Fix checkout validation (merged 2 days ago)
|
|
5239
|
+
- Author: @developer
|
|
5240
|
+
- Files: src/checkout/validation.ts, tests/checkout.spec.ts
|
|
5241
|
+
- Relevance: HIGH - directly affects checkout flow
|
|
5242
|
+
|
|
5243
|
+
### PR #140: Update dependencies (merged 3 days ago)
|
|
5244
|
+
- Author: @maintainer
|
|
5245
|
+
- Files: package.json, package-lock.json
|
|
5246
|
+
- Relevance: MEDIUM - may affect test stability
|
|
5247
|
+
\`\`\`
|
|
5248
|
+
|
|
5249
|
+
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.`;
|
|
5250
|
+
|
|
5086
5251
|
// src/subagents/templates/index.ts
|
|
5087
5252
|
var TEMPLATES = {
|
|
5088
5253
|
"test-runner": {
|
|
@@ -5152,6 +5317,12 @@ var TEMPLATES = {
|
|
|
5152
5317
|
frontmatter: FRONTMATTER13,
|
|
5153
5318
|
content: CONTENT13
|
|
5154
5319
|
}
|
|
5320
|
+
},
|
|
5321
|
+
"changelog-historian": {
|
|
5322
|
+
github: {
|
|
5323
|
+
frontmatter: FRONTMATTER14,
|
|
5324
|
+
content: CONTENT14
|
|
5325
|
+
}
|
|
5155
5326
|
}
|
|
5156
5327
|
};
|
|
5157
5328
|
function getTemplate(role, integration) {
|
|
@@ -5235,6 +5406,13 @@ var INTEGRATIONS = {
|
|
|
5235
5406
|
integrationType: "local"
|
|
5236
5407
|
// Uses platform API key, no OAuth needed
|
|
5237
5408
|
},
|
|
5409
|
+
github: {
|
|
5410
|
+
id: "github",
|
|
5411
|
+
name: "GitHub",
|
|
5412
|
+
provider: "github",
|
|
5413
|
+
requiredMCP: "mcp__github__*",
|
|
5414
|
+
integrationType: "oauth"
|
|
5415
|
+
},
|
|
5238
5416
|
local: {
|
|
5239
5417
|
id: "local",
|
|
5240
5418
|
name: "Local (Terminal)",
|
|
@@ -5322,6 +5500,17 @@ var SUBAGENTS = {
|
|
|
5322
5500
|
isRequired: true,
|
|
5323
5501
|
// Required for automated test execution and fixing
|
|
5324
5502
|
version: "1.0.0"
|
|
5503
|
+
},
|
|
5504
|
+
"changelog-historian": {
|
|
5505
|
+
role: "changelog-historian",
|
|
5506
|
+
name: "Changelog Historian",
|
|
5507
|
+
description: "Retrieves and analyzes code changes from GitHub PRs and commits",
|
|
5508
|
+
icon: "git-pull-request",
|
|
5509
|
+
integrations: [INTEGRATIONS.github],
|
|
5510
|
+
model: "haiku",
|
|
5511
|
+
color: "gray",
|
|
5512
|
+
isRequired: false,
|
|
5513
|
+
version: "1.0.0"
|
|
5325
5514
|
}
|
|
5326
5515
|
};
|
|
5327
5516
|
function getAllSubAgents() {
|
|
@@ -5386,7 +5575,8 @@ var TOOL_STRINGS = {
|
|
|
5386
5575
|
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
5576
|
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
5577
|
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.'
|
|
5578
|
+
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.',
|
|
5579
|
+
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
5580
|
},
|
|
5391
5581
|
"cursor": {
|
|
5392
5582
|
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 +5585,8 @@ var TOOL_STRINGS = {
|
|
|
5395
5585
|
INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/team-communicator.md)" --output-format text\n```',
|
|
5396
5586
|
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
5587
|
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```'
|
|
5588
|
+
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/documentation-researcher.md)" --output-format text\n```',
|
|
5589
|
+
INVOKE_CHANGELOG_HISTORIAN: 'Run the changelog-historian agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/changelog-historian.md)" --output-format text\n```'
|
|
5399
5590
|
},
|
|
5400
5591
|
"codex": {
|
|
5401
5592
|
INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncodex -p "$(cat .codex/agents/test-runner.md)"\n```',
|
|
@@ -5404,7 +5595,8 @@ var TOOL_STRINGS = {
|
|
|
5404
5595
|
INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncodex -p "$(cat .codex/agents/team-communicator.md)"\n```',
|
|
5405
5596
|
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
5597
|
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```'
|
|
5598
|
+
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncodex -p "$(cat .codex/agents/documentation-researcher.md)"\n```',
|
|
5599
|
+
INVOKE_CHANGELOG_HISTORIAN: 'Run the changelog-historian agent:\n```bash\ncodex -p "$(cat .codex/agents/changelog-historian.md)"\n```'
|
|
5408
5600
|
}
|
|
5409
5601
|
};
|
|
5410
5602
|
function getToolString(toolId, key) {
|
|
@@ -5426,7 +5618,8 @@ function replaceInvocationPlaceholders(content, toolId, isLocal = false) {
|
|
|
5426
5618
|
"INVOKE_TEST_CODE_GENERATOR",
|
|
5427
5619
|
"INVOKE_TEAM_COMMUNICATOR",
|
|
5428
5620
|
"INVOKE_ISSUE_TRACKER",
|
|
5429
|
-
"INVOKE_DOCUMENTATION_RESEARCHER"
|
|
5621
|
+
"INVOKE_DOCUMENTATION_RESEARCHER",
|
|
5622
|
+
"INVOKE_CHANGELOG_HISTORIAN"
|
|
5430
5623
|
];
|
|
5431
5624
|
for (const key of keys) {
|
|
5432
5625
|
const placeholder = `{{${key}}}`;
|