Skip to content

Add Claude Jira integration workflow#5942

Draft
allisonschiang wants to merge 3 commits into
viamrobotics:mainfrom
allisonschiang:claude-jira-integration
Draft

Add Claude Jira integration workflow#5942
allisonschiang wants to merge 3 commits into
viamrobotics:mainfrom
allisonschiang:claude-jira-integration

Conversation

@allisonschiang
Copy link
Copy Markdown
Member

Summary

  • Adds the first Claude Code workflow to rdk, mirroring the pattern used by viam-java-sdk and the other SDK repos. Wraps the reusable workflow at viamrobotics/claude-ci-workflows.
  • Handles two scopes within the rdk monorepo via a scope field in the dispatch payload: viam-cli (CLI work scoped to cli/) and gosdk (Go SDK work in components/<type>/client.go, robot/client/, etc.). Scope is communicated to Claude via extra_prompt branching on the label value.
  • Hard scope enforcement is intentionally minimal — .claude/settings.ci.json denies only the obviously dangerous paths (.github/, api/, Makefile, go.mod, go.sum). Discipline relies on the prompt + the 75-turn (medium complexity) default budget. Post-flight scope checks can be added in a follow-up if leakage becomes a problem.

Files

  • .claude/settings.ci.json — deny rules for protected paths
  • .github/workflows/claude-jira.yml — workflow wrapper (reusable workflow + container golang:1.25 + Go-specific allowed_tools)
  • CLAUDE.md — root pointer to subpackage CLAUDE.md files (currently cli/CLAUDE.md)

Middleware dependency

The Jira middleware will need to forward the matched label as scope in the client_payload (one-line change on the middleware side). Until that lands, the workflow can be smoke-tested via manual workflow_dispatch runs from the Actions tab — the scope input is exposed there as a required choice between viam-cli and gosdk.

Test plan

  • Manually trigger via Actions → Claude Jira Implementation → Run workflow with scope: viam-cli and a small CLI test ticket. Verify Claude opens a claude/-prefixed PR that compiles.
  • Repeat with scope: gosdk and a small Go SDK test ticket. Verify Claude works in the Go SDK client paths and not elsewhere.
  • Confirm Jira ticket comments post back (if JIRA_API_TOKEN is configured).
  • Confirm Slack failure notification fires on a deliberate failure (if SLACK_AI_WORKFLOW_ALERT_WEBHOOK_URL is configured).
  • Coordinate with middleware owner to add scope field to the client_payload. Once landed, fire a real Jira ticket end-to-end.

Adds the first Claude Code workflow to rdk, mirroring the pattern used
by viam-java-sdk and other SDK repos. Wraps the reusable workflow at
viamrobotics/claude-ci-workflows.

The workflow handles two scopes within the rdk monorepo, selected via
a `scope` field in the dispatch payload:

- viam-cli: CLI work scoped to cli/
- gosdk:    Go SDK work in components/<type>/client.go, robot/client/, etc.

Scope is communicated to Claude via extra_prompt branching. The Jira
middleware will need to forward the matched label as `scope` in the
client_payload (one-line change on the middleware side).

Hard scope enforcement is intentionally minimal — settings.ci.json
denies only the obviously dangerous paths (.github, api, Makefile,
go.mod/go.sum). Scope discipline relies on the prompt + Claude's
75-turn budget. Post-flight scope checks can be added in a follow-up
if scope leakage becomes a problem.

Files:
- .claude/settings.ci.json: deny rules for protected paths
- .github/workflows/claude-jira.yml: workflow wrapper
- CLAUDE.md: root pointer to subpackage CLAUDE.md files (cli/CLAUDE.md)
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Apr 14, 2026
Adds the two remaining Claude workflows used by the SDK repos:

- claude-pr-assistant.yml: auto-reviews Claude PRs after CI passes,
  and responds to @claude mentions in PR comments and review comments.
  Wraps both the claude-auto-review and claude-pr-assistant reusable
  workflows.

- claude-ci-fix.yml: when the Test workflow fails on a claude/* branch,
  Claude attempts to auto-fix the failure. Also supports manual dispatch
  for fixing arbitrary failed runs.

Both workflows mirror the Flutter SDK pattern, adapted for Go: install
via `go mod download`, run inside `golang:1.25` container, allowed_tools
scoped to Go and make commands. Auto-review and on-demand both include
extra instructions to verify api/, .github/, Makefile, and go.mod/go.sum
were not modified.

NOTE: team_mention in claude-ci-fix.yml is set to @viamrobotics/core-rdk
as a placeholder. Update this to the correct team handle if it differs.
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Apr 14, 2026
Aligns the format with viam-python-sdk/CLAUDE.md and viam-typescript-sdk/CLAUDE.md:
- Codebase Structure as an annotated tree
- Go Conventions section with method signature pattern, formatting, anti-patterns
- Verification Commands section

Preserves the rdk-specific bits not present in the SDK templates:
- Subpackages with their own CLAUDE.md (monorepo routing)
- Protected Paths (mirrors .claude/settings.ci.json)
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Apr 14, 2026
@allisonschiang allisonschiang marked this pull request as draft April 14, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants