Skip to content

feat(agents): claude agents and commands for git operations, QA test coverage, and bug-fix pipeline#636

Open
bhabalan wants to merge 2 commits intowebex:nextfrom
bhabalan:claude-config
Open

feat(agents): claude agents and commands for git operations, QA test coverage, and bug-fix pipeline#636
bhabalan wants to merge 2 commits intowebex:nextfrom
bhabalan:claude-config

Conversation

@bhabalan
Copy link
Contributor

@bhabalan bhabalan commented Mar 2, 2026

COMPLETES #N/A (internal tooling)

This pull request addresses

Setting up Claude Code autonomous agents and slash commands for the widgets monorepo, enabling AI-assisted git operations, QA test coverage, and a three-stage bug-fix pipeline (scrub → triage → fix).

by making the following changes

Agents (.claude/agents/)

  • fixer.md — Implements bug fixes in isolated worktrees using systematic debugging and TDD
  • scrubber.md — Evaluates bug tickets for completeness and AI-readiness, classifies as prioritize/followup/dolater
  • triager.md — Deep-dives into prioritized bugs, performs root cause analysis, and proposes fix plans
  • git-pr.md — Updated agent for git PR operations
  • ticket-worker.md — Updated agent for ticket processing workflows
  • qa-test-coverage.md — Agent for QA test coverage analysis

Commands (.claude/commands/)

  • fix.md — Implements triaged bug fixes, creates worktree, runs tests, commits, pushes, and creates draft PR
  • scrub.md — Runs the scrubber agent on bug tickets to classify readiness
  • triage.md — Runs the triager agent to root-cause prioritized bugs
  • fix-tickets.md — Updated orchestrator for the full bug-fix pipeline
  • submit-pr.md — Command for submitting PRs with FedRAMP-compliant templates
  • cleanup-worktrees.md — Command to clean up stale git worktrees

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • Verified agents and commands load correctly in Claude Code
  • Tested scrub/triage/fix pipeline end-to-end on sample tickets
  • Verified worktree creation and cleanup workflows

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Claude Code (Anthropic)
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65a922672e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


**Remove:**
```bash
git worktree remove /tmp/claude-widgets/{TICKET_ID}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use --force after confirming dirty worktree removal

This workflow asks for extra confirmation when a worktree has uncommitted changes, but the removal command is still git worktree remove /tmp/claude-widgets/{TICKET_ID} without -f; Git's own usage is git worktree remove [-f] <worktree>, so dirty worktrees will not be removed even after the user confirms and cleanup will silently fail for the main warned-about case.

Useful? React with 👍 / 👎.


# Persistent Agent Memory

You have a persistent Persistent Agent Memory directory at `/Users/bhabalan/dev/widgets/.claude/agent-memory/qa-test-coverage/`. Its contents persist across conversations.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace machine-specific memory path with workspace path

The persistent memory directory is hardcoded to /Users/bhabalan/dev/widgets/.claude/agent-memory/qa-test-coverage/, which is specific to one local machine and will not exist in other developer or CI environments; this breaks the instructed memory read/write behavior and undermines the agent's cross-session state for most users.

Useful? React with 👍 / 👎.

@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-636.d1b38q61t1z947.amplifyapp.com

@bhabalan bhabalan requested a review from a team as a code owner March 24, 2026 04:09
@bhabalan bhabalan changed the title feat(agents): claude agents for git operations, QA test coverage, ticket handling feat(agents): claude agents and commands for git operations, QA test coverage, and bug-fix pipeline Mar 24, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c75cbdff86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +40 to +44
gh pr list --head {TICKET_ID} --repo webex/widgets --json number,title,state,reviews,reviewRequests
```

- **If PR exists and is open:** Enter review-polling mode (Step 7)
- **If PR exists and is merged:** Skip ticket, inform user it's already done

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include merged PRs when checking existing ticket branches

gh pr list defaults to open PRs (--state default is open), so this check cannot identify already-merged ticket PRs even though the next step branches on that outcome. In practice, merged tickets will be treated as “no PR” and can be reprocessed unnecessarily, including redundant worktree creation and attempted new implementation; add --state all (or an explicit merged query) before making the open/merged/no-PR decision.

Useful? React with 👍 / 👎.

Comment on lines +247 to +248
cd /tmp/claude-widgets/{TICKET_ID}
gh pr view {PR_NUMBER} --json reviews,reviewRequests,state

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove hard dependency on local worktree for review polling

Step 2 sends tickets with an existing open PR straight to review polling, but this step starts by cd-ing into /tmp/claude-widgets/{TICKET_ID} before querying GitHub. If that worktree was already cleaned up, polling fails immediately and the command cannot inspect reviews for the PR it just detected; make polling independent of local worktree existence or recreate/validate the worktree first.

Useful? React with 👍 / 👎.

git status

# Verify tests pass before proceeding
yarn workspace @webex/{SCOPE} test:unit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve scope before running workspace unit tests

The agent marks SCOPE as optional, but this verification step immediately runs yarn workspace @webex/{SCOPE} test:unit before the later metadata-derivation step can infer a missing scope. When SCOPE is not passed by the caller, test verification fails on an invalid workspace target and the workflow aborts prematurely; derive/detect scope first (or use a fallback test command).

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant