@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/cli/index.cjs
CHANGED
|
@@ -1558,6 +1558,35 @@ CHANGE_CONTEXT = {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
\`\`\``
|
|
1560
1560
|
},
|
|
1561
|
+
// Step 6b: Retrieve Code Change Details (conditional - changelog-historian)
|
|
1562
|
+
{
|
|
1563
|
+
inline: true,
|
|
1564
|
+
title: "Retrieve Code Change Details",
|
|
1565
|
+
content: `{{INVOKE_CHANGELOG_HISTORIAN}} to gather comprehensive context about recent code changes:
|
|
1566
|
+
|
|
1567
|
+
Explore version control history related to the verification scope.
|
|
1568
|
+
|
|
1569
|
+
Specifically gather:
|
|
1570
|
+
- Recent changes merged to the target branch
|
|
1571
|
+
- Change authors and contributors
|
|
1572
|
+
- Scope and impact of each change
|
|
1573
|
+
- Change descriptions and rationale
|
|
1574
|
+
- Related issues or tickets
|
|
1575
|
+
- Files and components affected
|
|
1576
|
+
|
|
1577
|
+
The agent will:
|
|
1578
|
+
1. Check its memory for previously discovered repository context
|
|
1579
|
+
2. Explore version control for relevant changes
|
|
1580
|
+
3. Build comprehensive understanding of the change history
|
|
1581
|
+
4. Return synthesized change information
|
|
1582
|
+
|
|
1583
|
+
Use this information to:
|
|
1584
|
+
- Identify which changes may have caused test failures
|
|
1585
|
+
- Understand the scope and risk of the changes
|
|
1586
|
+
- Enhance the verification report with change attribution
|
|
1587
|
+
- Provide better context for manual verification checklist`,
|
|
1588
|
+
conditionalOnSubagent: "changelog-historian"
|
|
1589
|
+
},
|
|
1561
1590
|
// Step 7: Determine Test Scope (inline)
|
|
1562
1591
|
{
|
|
1563
1592
|
inline: true,
|
|
@@ -1852,7 +1881,7 @@ A successful verification includes:
|
|
|
1852
1881
|
}
|
|
1853
1882
|
],
|
|
1854
1883
|
requiredSubagents: ["test-runner", "test-debugger-fixer"],
|
|
1855
|
-
optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator"],
|
|
1884
|
+
optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator", "changelog-historian"],
|
|
1856
1885
|
dependentTasks: []
|
|
1857
1886
|
};
|
|
1858
1887
|
}
|
|
@@ -5406,6 +5435,129 @@ Maintain organized issue tracking:
|
|
|
5406
5435
|
|
|
5407
5436
|
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.`;
|
|
5408
5437
|
|
|
5438
|
+
// src/subagents/templates/changelog-historian/github.ts
|
|
5439
|
+
init_cjs_shims();
|
|
5440
|
+
var FRONTMATTER14 = {
|
|
5441
|
+
name: "changelog-historian",
|
|
5442
|
+
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.
|
|
5443
|
+
user: "The checkout flow test is failing in staging. What changed recently?"
|
|
5444
|
+
assistant: "Let me use the changelog-historian agent to retrieve the recent PRs and commits that went into this build."
|
|
5445
|
+
<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.
|
|
5446
|
+
user: "What changed between v1.2.0 and v1.3.0?"
|
|
5447
|
+
assistant: "I'll use the changelog-historian agent to compare the two releases and list all the changes."
|
|
5448
|
+
<commentary>The agent will use GitHub comparison tools to show all commits and PRs between the two versions.</commentary></example>`,
|
|
5449
|
+
model: "haiku",
|
|
5450
|
+
color: "gray"
|
|
5451
|
+
};
|
|
5452
|
+
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.
|
|
5453
|
+
|
|
5454
|
+
## Core Responsibilities
|
|
5455
|
+
|
|
5456
|
+
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.
|
|
5457
|
+
|
|
5458
|
+
2. ${MEMORY_READ_INSTRUCTIONS.replace(/{ROLE}/g, "changelog-historian")}
|
|
5459
|
+
|
|
5460
|
+
**Memory Sections for Changelog Historian**:
|
|
5461
|
+
- Repository information (owner, repo, default branch)
|
|
5462
|
+
- Recent release tags and their commit SHAs
|
|
5463
|
+
- Key PRs and their associated test impacts
|
|
5464
|
+
- Known patterns of changes that cause specific types of failures
|
|
5465
|
+
- Quick reference for common queries (last deployment, recent hotfixes)
|
|
5466
|
+
|
|
5467
|
+
## Available GitHub Tools
|
|
5468
|
+
|
|
5469
|
+
You have access to the following GitHub MCP tools:
|
|
5470
|
+
|
|
5471
|
+
1. **github_list_prs**: List pull requests with filters
|
|
5472
|
+
- Filter by state (open, closed, all)
|
|
5473
|
+
- Filter by base branch (e.g., "main")
|
|
5474
|
+
- Sort by created, updated, popularity, or long-running
|
|
5475
|
+
- Pagination support
|
|
5476
|
+
|
|
5477
|
+
2. **github_get_pr**: Get detailed PR information
|
|
5478
|
+
- Files changed with additions/deletions
|
|
5479
|
+
- Commits in the PR
|
|
5480
|
+
- Labels, reviewers, and status
|
|
5481
|
+
|
|
5482
|
+
3. **github_list_commits**: List commits on a branch
|
|
5483
|
+
- Filter by date range (since, until)
|
|
5484
|
+
- Get commit messages and authors
|
|
5485
|
+
- Pagination support
|
|
5486
|
+
|
|
5487
|
+
4. **github_get_commit**: Get detailed commit information
|
|
5488
|
+
- Full list of file changes
|
|
5489
|
+
- Stats (additions, deletions)
|
|
5490
|
+
- Author and committer details
|
|
5491
|
+
|
|
5492
|
+
5. **github_compare_commits**: Compare two refs
|
|
5493
|
+
- See all commits between two points
|
|
5494
|
+
- Get diff of file changes
|
|
5495
|
+
- Understand what changed between releases
|
|
5496
|
+
|
|
5497
|
+
## Operational Workflow
|
|
5498
|
+
|
|
5499
|
+
1. **Initial Check**: Read \`.bugzy/runtime/memory/changelog-historian.md\` to load repository context and known patterns
|
|
5500
|
+
|
|
5501
|
+
2. **Context Gathering**:
|
|
5502
|
+
- Identify the repository owner and name from context or memory
|
|
5503
|
+
- Determine the relevant time range or refs to analyze
|
|
5504
|
+
- Use appropriate GitHub tools to gather change information
|
|
5505
|
+
|
|
5506
|
+
3. **Change Analysis**:
|
|
5507
|
+
- For recent failures: List recent merged PRs and commits
|
|
5508
|
+
- For release comparison: Use compare_commits between tags/refs
|
|
5509
|
+
- For specific issues: Find PRs/commits related to affected files
|
|
5510
|
+
|
|
5511
|
+
4. ${MEMORY_UPDATE_INSTRUCTIONS.replace(/{ROLE}/g, "changelog-historian")}
|
|
5512
|
+
|
|
5513
|
+
Specifically for changelog-historian, consider updating:
|
|
5514
|
+
- **Repository Config**: Store owner/repo if not already known
|
|
5515
|
+
- **Release History**: Note significant release tags encountered
|
|
5516
|
+
- **Impact Patterns**: Record correlations between changes and test impacts
|
|
5517
|
+
- **Hotfix Tracking**: Note emergency fixes for future reference
|
|
5518
|
+
|
|
5519
|
+
## Analysis Best Practices
|
|
5520
|
+
|
|
5521
|
+
- Start with recent merged PRs when investigating failures
|
|
5522
|
+
- Cross-reference PR labels for context (bug, feature, hotfix)
|
|
5523
|
+
- Note file changes that overlap with failing test areas
|
|
5524
|
+
- Look for patterns in commit messages (conventional commits)
|
|
5525
|
+
- Track which changes went into specific environments
|
|
5526
|
+
|
|
5527
|
+
## Query Response Approach
|
|
5528
|
+
|
|
5529
|
+
1. Understand what period or refs the user is asking about
|
|
5530
|
+
2. Check memory for repository context and known patterns
|
|
5531
|
+
3. Use appropriate GitHub tools to gather change data
|
|
5532
|
+
4. Synthesize findings into a clear timeline or comparison
|
|
5533
|
+
5. Highlight changes most likely to impact the area of interest
|
|
5534
|
+
6. Update memory with new findings and patterns
|
|
5535
|
+
|
|
5536
|
+
## Output Format
|
|
5537
|
+
|
|
5538
|
+
When reporting changes, include:
|
|
5539
|
+
- PR number, title, and author
|
|
5540
|
+
- Merge date and target branch
|
|
5541
|
+
- Files changed with brief description
|
|
5542
|
+
- Relevance to the current investigation
|
|
5543
|
+
|
|
5544
|
+
Example output:
|
|
5545
|
+
\`\`\`
|
|
5546
|
+
## Recent Changes (last 7 days)
|
|
5547
|
+
|
|
5548
|
+
### PR #142: Fix checkout validation (merged 2 days ago)
|
|
5549
|
+
- Author: @developer
|
|
5550
|
+
- Files: src/checkout/validation.ts, tests/checkout.spec.ts
|
|
5551
|
+
- Relevance: HIGH - directly affects checkout flow
|
|
5552
|
+
|
|
5553
|
+
### PR #140: Update dependencies (merged 3 days ago)
|
|
5554
|
+
- Author: @maintainer
|
|
5555
|
+
- Files: package.json, package-lock.json
|
|
5556
|
+
- Relevance: MEDIUM - may affect test stability
|
|
5557
|
+
\`\`\`
|
|
5558
|
+
|
|
5559
|
+
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.`;
|
|
5560
|
+
|
|
5409
5561
|
// src/subagents/templates/index.ts
|
|
5410
5562
|
var TEMPLATES = {
|
|
5411
5563
|
"test-runner": {
|
|
@@ -5475,6 +5627,12 @@ var TEMPLATES = {
|
|
|
5475
5627
|
frontmatter: FRONTMATTER13,
|
|
5476
5628
|
content: CONTENT13
|
|
5477
5629
|
}
|
|
5630
|
+
},
|
|
5631
|
+
"changelog-historian": {
|
|
5632
|
+
github: {
|
|
5633
|
+
frontmatter: FRONTMATTER14,
|
|
5634
|
+
content: CONTENT14
|
|
5635
|
+
}
|
|
5478
5636
|
}
|
|
5479
5637
|
};
|
|
5480
5638
|
function getTemplate(role, integration) {
|
|
@@ -5550,6 +5708,13 @@ var INTEGRATIONS = {
|
|
|
5550
5708
|
integrationType: "local"
|
|
5551
5709
|
// Uses platform API key, no OAuth needed
|
|
5552
5710
|
},
|
|
5711
|
+
github: {
|
|
5712
|
+
id: "github",
|
|
5713
|
+
name: "GitHub",
|
|
5714
|
+
provider: "github",
|
|
5715
|
+
requiredMCP: "mcp__github__*",
|
|
5716
|
+
integrationType: "oauth"
|
|
5717
|
+
},
|
|
5553
5718
|
local: {
|
|
5554
5719
|
id: "local",
|
|
5555
5720
|
name: "Local (Terminal)",
|
|
@@ -5637,6 +5802,17 @@ var SUBAGENTS = {
|
|
|
5637
5802
|
isRequired: true,
|
|
5638
5803
|
// Required for automated test execution and fixing
|
|
5639
5804
|
version: "1.0.0"
|
|
5805
|
+
},
|
|
5806
|
+
"changelog-historian": {
|
|
5807
|
+
role: "changelog-historian",
|
|
5808
|
+
name: "Changelog Historian",
|
|
5809
|
+
description: "Retrieves and analyzes code changes from GitHub PRs and commits",
|
|
5810
|
+
icon: "git-pull-request",
|
|
5811
|
+
integrations: [INTEGRATIONS.github],
|
|
5812
|
+
model: "haiku",
|
|
5813
|
+
color: "gray",
|
|
5814
|
+
isRequired: false,
|
|
5815
|
+
version: "1.0.0"
|
|
5640
5816
|
}
|
|
5641
5817
|
};
|
|
5642
5818
|
function getAllSubAgents() {
|
|
@@ -7366,7 +7542,8 @@ var TOOL_STRINGS = {
|
|
|
7366
7542
|
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.',
|
|
7367
7543
|
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.",
|
|
7368
7544
|
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.',
|
|
7369
|
-
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.'
|
|
7545
|
+
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.',
|
|
7546
|
+
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.'
|
|
7370
7547
|
},
|
|
7371
7548
|
"cursor": {
|
|
7372
7549
|
INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-runner.md)" --output-format text\n```',
|
|
@@ -7375,7 +7552,8 @@ var TOOL_STRINGS = {
|
|
|
7375
7552
|
INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/team-communicator.md)" --output-format text\n```',
|
|
7376
7553
|
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.",
|
|
7377
7554
|
INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/issue-tracker.md)" --output-format text\n```',
|
|
7378
|
-
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/documentation-researcher.md)" --output-format text\n```'
|
|
7555
|
+
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/documentation-researcher.md)" --output-format text\n```',
|
|
7556
|
+
INVOKE_CHANGELOG_HISTORIAN: 'Run the changelog-historian agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/changelog-historian.md)" --output-format text\n```'
|
|
7379
7557
|
},
|
|
7380
7558
|
"codex": {
|
|
7381
7559
|
INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncodex -p "$(cat .codex/agents/test-runner.md)"\n```',
|
|
@@ -7384,7 +7562,8 @@ var TOOL_STRINGS = {
|
|
|
7384
7562
|
INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncodex -p "$(cat .codex/agents/team-communicator.md)"\n```',
|
|
7385
7563
|
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.",
|
|
7386
7564
|
INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncodex -p "$(cat .codex/agents/issue-tracker.md)"\n```',
|
|
7387
|
-
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncodex -p "$(cat .codex/agents/documentation-researcher.md)"\n```'
|
|
7565
|
+
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncodex -p "$(cat .codex/agents/documentation-researcher.md)"\n```',
|
|
7566
|
+
INVOKE_CHANGELOG_HISTORIAN: 'Run the changelog-historian agent:\n```bash\ncodex -p "$(cat .codex/agents/changelog-historian.md)"\n```'
|
|
7388
7567
|
}
|
|
7389
7568
|
};
|
|
7390
7569
|
function getToolString(toolId, key) {
|
|
@@ -7406,7 +7585,8 @@ function replaceInvocationPlaceholders(content, toolId, isLocal = false) {
|
|
|
7406
7585
|
"INVOKE_TEST_CODE_GENERATOR",
|
|
7407
7586
|
"INVOKE_TEAM_COMMUNICATOR",
|
|
7408
7587
|
"INVOKE_ISSUE_TRACKER",
|
|
7409
|
-
"INVOKE_DOCUMENTATION_RESEARCHER"
|
|
7588
|
+
"INVOKE_DOCUMENTATION_RESEARCHER",
|
|
7589
|
+
"INVOKE_CHANGELOG_HISTORIAN"
|
|
7410
7590
|
];
|
|
7411
7591
|
for (const key of keys) {
|
|
7412
7592
|
const placeholder = `{{${key}}}`;
|
|
@@ -7660,8 +7840,22 @@ var MCP_SERVERS = {
|
|
|
7660
7840
|
RESEND_FROM_EMAIL: "${RESEND_FROM_EMAIL}"
|
|
7661
7841
|
}
|
|
7662
7842
|
}
|
|
7843
|
+
},
|
|
7844
|
+
github: {
|
|
7845
|
+
provider: "github",
|
|
7846
|
+
name: "GitHub",
|
|
7847
|
+
description: "GitHub MCP server for PR and commit information",
|
|
7848
|
+
requiresCredentials: true,
|
|
7849
|
+
npmPackages: ["@bugzy-ai/github-mcp-server"],
|
|
7850
|
+
config: {
|
|
7851
|
+
command: "github-mcp-server",
|
|
7852
|
+
args: [],
|
|
7853
|
+
env: {
|
|
7854
|
+
GITHUB_TOKEN: "${GITHUB_TOKEN}"
|
|
7855
|
+
}
|
|
7856
|
+
}
|
|
7663
7857
|
}
|
|
7664
|
-
// github: {
|
|
7858
|
+
// github-modelcontextprotocol: {
|
|
7665
7859
|
// provider: 'github',
|
|
7666
7860
|
// name: 'GitHub',
|
|
7667
7861
|
// description: 'GitHub MCP server for repository operations',
|