Skip to content

fix: make PO Agent source-agnostic, remove AzDo hard dependency#3

Open
Adrian62D wants to merge 12 commits intovyzn-tech:mainfrom
Adrian62D:main
Open

fix: make PO Agent source-agnostic, remove AzDo hard dependency#3
Adrian62D wants to merge 12 commits intovyzn-tech:mainfrom
Adrian62D:main

Conversation

@Adrian62D
Copy link
Copy Markdown
Contributor

Summary

  • Fix critical bug: detect_work_item_id() crashes with set -e when no Azure DevOps patterns are found in PR titles/bodies. grep -oP returns exit code 1 on no match, which kills the entire "Fetch context" step before Claude is ever invoked. Added || true to prevent this.
  • Remove company-specific VYZN- pattern from all files (action.yml, resume/action.yml, prompts/source-azure-devops.md)
  • Guard AzDo work item linking behind AZURE_DEVOPS_PAT/AZURE_DEVOPS_ORG env var checks in both GitHub PR and Slack source contexts, so the code path is never entered for repos without AzDo integration
  • Update resume/action.yml to use standard AB# pattern only instead of VYZN-

Problem

This bug affects ALL repos that don't use Azure DevOps integration — the detect_work_item_id grep pipeline fails silently and bash set -e + pipefail terminates the script at the "Fetch context" step, before Claude Code is ever invoked.

See issue #2 for full details and reproduction steps.

Fixes #2

Test plan

  • Verified no remaining VYZN- references in codebase
  • Verified all grep -oP calls have proper error handling
  • Verified AzDo-specific code paths are properly guarded behind env var checks
  • Trigger @po-agent on a PR in a repo without AzDo credentials to confirm the fix

🤖 Generated with Claude Code

Adrian62D and others added 12 commits March 5, 2026 12:15
The detect_work_item_id() function crashed with set -e when no Azure
DevOps patterns (AB#, VYZN-) were found in PR titles/bodies, because
grep -oP returns exit code 1 on no match. This broke ALL repos that
don't use Azure DevOps integration.

Changes:
- Add || true to detect_work_item_id() so grep failures don't crash
- Add 2>/dev/null to suppress grep errors on non-PCRE systems
- Remove hard-coded VYZN- company-specific pattern from all files
- Guard AzDo work item linking behind AZURE_DEVOPS_PAT/ORG env checks
  in both GitHub PR and Slack source contexts
- Update resume/action.yml to use standard AB# pattern only
- Update AzDo prompt to use generic PR title format

Fixes: vyzn-tech#2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- vyzn-tech#3: Better error diagnostics (stderr capture, error classification)
- #4: anthropic_base_url as first-class input
- #5: Progress comments during long runs
- #6: Configurable timeout awareness
- #7: Support issue triggers (github-issue source)
- #8: Dry-run / explain mode
- #9: Persistent conversation context across resumes
- #10: Smarter skill routing in core.md
- #11: Skill test framework (validate-skill.sh)
- #12: MCP server health checks after registration
- #13: Cost estimation before execution
- #14: Transcript storage for debugging
- #15: Multi-model support (investigation/implementation models)
- #16: Queue management docs and concurrency guidance

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add CLAUDE.md describing the po-agent architecture
- Add .github/workflows/po-agent.yml (PR + Issue triggers, copilot-api proxy)
- Add .github/workflows/po-agent-resume.yml (auto-resume on CI completion)
- Add .po-agent/skills/validate-action-yml/ (validates action.yml after edits)
- Add .po-agent/skills/test-skills/ (validates all skill definitions)
- Uses `./` self-reference so the action dogfoods its own code
- Concurrency group prevents parallel agent runs on same PR/issue

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: self-host PO Agent on its own repo
Add author_association check to the workflow's if condition so only
OWNER, MEMBER, and COLLABORATOR can trigger the agent via @PO-Agent
comments. Prevents random users from burning API quota.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add "Why I Built This" section with the vision of enabling every
organisation to have a 24/7 dev factory, and a "Principles" section
inspired by NanoClaw's philosophy style — covering think-first approach,
skills over config, transparency, security, autonomy, and budget awareness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite README inspired by NanoClaw's approach: centered hero header
with badge bar, conversational philosophy section, cleaner structure,
and better visual hierarchy. Added RFS section, all trigger sources,
full configuration table with new inputs, and comparison table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two example prompts: one for existing repos, one from scratch with
React + Vite starter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Bug: detect_work_item_id crashes with set -e when no AzDo work item linked

1 participant