Skip to content

Record the ticket key in the branch name and Source changes - #5273

Draft
10zingpd wants to merge 4 commits into
mainfrom
docs/agent-ticket-key-convention
Draft

Record the ticket key in the branch name and Source changes#5273
10zingpd wants to merge 4 commits into
mainfrom
docs/agent-ticket-key-convention

Conversation

@10zingpd

@10zingpd 10zingpd commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #5262. Stacked on it — based on its head, so the diff below includes its content until that merges.

Problem

Docs PRs branch as claude/update-<description> and cite only <repo>#<number>. Neither carries a ticket key, so GitHub for Jira never links the PR and no DOCS ticket knows about it.

Before the poller went live on 2026-04-07, 188 of 350 docs PRs (54%) had a DOCS key in the branch. After: 1 of 350.

Changes

docs-agent/playbook-daily-code-changes.md:

  1. Branch naming — DOCS key, else upstream key, else the existing fallback
  2. Source changes — prefix with the bare <TICKET-KEY>
  3. Recording the ticket key — how to obtain and resolve it
  4. Review in progress — the ticket moves when a docs PR opens, via a Jira Automation rule

Verified

Backfill

Mapping merged docs PRs back to open tickets by hand closed 16 DOCS tickets — 13 traced through a PR that cited the upstream change, 3 matched directly to merged docs. That was one manual pass over the backlog; the convention above is what removes the need for the next one.

To Do

The DOCS-key lookup only stops being best-effort once the agent has Jira read access. That means three variables in the Claude Code cloud agent's trigger environment, alongside the existing GH_TOKEN — not in this repo, not in viam-code-map, and not in any file (per docs-agent/README.md):

JIRA_BASE_URL    https://viam.atlassian.net
JIRA_USER_EMAIL  <service account>
JIRA_API_TOKEN   <scoped token, read:jira-work>

Read-only. Browse Projects on DOCS, APP and RSDK is the whole permission set — linkedIssues() reads both ends of the link, and the transition is performed by the automation rule under its own actor, so the agent never needs write access.

Until that exists, the agent writes the upstream key and the rule covers only PRs whose branch already carries a DOCS key.

Documents the scheduled agent that opens automated docs PRs: the full
playbook it follows on every run, plus a README covering how it runs,
which repos it monitors, and where its state files live.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Docs PRs currently branch as claude/update-<description> and cite only
<repo>#<number>, so no DOCS ticket ever links to the PR that satisfied it.
@netlify

netlify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploy Preview for viam-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 8935393
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6a85fcfe79addd0008477aa9

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Aug 19, 2026
@10zingpd

Copy link
Copy Markdown
Contributor Author

Names the rule and adds the status condition, which is what prevents a
closed ticket being reopened by a later PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants