Skip to content

feat(agents): add Claude Code routines scaffolding#259

Merged
bokelley merged 6 commits intomainfrom
bokelley/add-issue-triage-bridge
Apr 23, 2026
Merged

feat(agents): add Claude Code routines scaffolding#259
bokelley merged 6 commits intomainfrom
bokelley/add-issue-triage-bridge

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

  • Commits the source of truth for a Claude Code triage routine that runs against this repo: .agents/routines/triage-prompt.md (behavior), environment-setup.sh (cloud env install), and README.md (identity + setup checklist).
  • Adds .github/workflows/claude-issue-triage.yml — a minimal bridge that POSTs new issues to a per-routine /fire endpoint so the triage routine reacts within minutes instead of waiting for its next scheduled run.

What this does NOT do

  • Does not create the routine itself — that still requires the claude.ai web UI (or the CLI /schedule skill) to set prompt/repo/environment/schedule/API trigger. The committed prompt is what the routine points at.
  • The bridge workflow is a no-op until CLAUDE_ROUTINE_TRIAGE_URL and CLAUDE_ROUTINE_TRIAGE_TOKEN repo secrets are set (logs a warning and exits 0).

Notes

  • This repo uses release-please, so no changeset is added. Title follows conventional-commits for versioning.

Test plan

  • YAML lint on .github/workflows/claude-issue-triage.yml.
  • After the routine is created and secrets are set, open a throwaway issue and verify the workflow fires and the routine posts a triage comment.
  • Verify existing CI (ci, release-please, etc.) still passes.

🤖 Generated with Claude Code

bokelley and others added 4 commits April 23, 2026 07:31
Add the committed half of the issue-triage routines setup: triage
prompt and cloud environment setup script. Also add a GitHub Actions
bridge that fires the routine's `/fire` endpoint on `issues.opened` /
`reopened` so response happens in minutes rather than at the next
scheduled run.

See `.agents/routines/README.md` for the identity and setup-order
checklist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add pre-classification (RFC/epic/tracking → no auto-PR), scope-bucket
labeling (gh label list, map to existing labels, repo-specific
buckets), and milestone-assignment (gh api milestones, suggest fit,
apply to auto-PRs). Updates the structured triage comment with
**Bucket(s):** and **Suggested milestone:** lines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address review feedback from security / prompt-engineering / code
review / DX / ad-tech product agents:

- Bridge workflow wraps untrusted issue body in a fenced "data, not
  instructions" block; 8KB truncation; NUL-byte strip; curl exit
  handled separately from HTTP status; redacts bearer-looking
  substrings; tighter bot filter; concurrency group; 2-min timeout;
  set -euo pipefail.
- environment-setup.sh uses --ignore-scripts (npm) / upgrades pip /
  removes || true fallbacks / pins golangci-lint installer URL.
- CODEOWNERS added so agent-authored PRs touching .agents/, .github/,
  deps, release tooling, and (adcp-go) TEE-bound paths require human
  review before merge.
- Triage prompt: RFC/epic/tracking/child-of-open-parent pre-class
  (never auto-PR); author-association gate (drive-bys get comment-
  only); bucket labels must be a clear match (never invent);
  milestone only when target version named/linked/labeled; 1500-char
  comment cap; duplicate + open-PR checks; API-failure retry path;
  first-time-contributor "Thanks for filing!" framing.
- adcp-go: added claude-bot-path-guard.yml that fails bot PRs touching
  identity/, router/pinhole*, router/metrics*, internal/sanitize/,
  go.mod/go.sum, .agents/, .github/workflows/, release-please-*.
  Security-sensitive issues never get PRs and never describe the
  vector in the public comment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
First live run on adcp surfaced that the routine was posting
boilerplate triage comments on well-structured RFCs/features from
maintainers — pure noise. Add a silent path: apply claude-triaged +
bucket labels with no comment when the comment would add no signal
(classification is feature/RFC/epic, author is established, body is
well-structured, issue already has on-target label).

Still comment on drive-bys, bugs, needs-info, and anything that
surfaces a duplicate / related PR / cross-repo redirect.

For adcp-go specifically: security-sensitive bugs and performance
issues are never silent-triaged — the withheld-vector comment *is*
the signal there.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley marked this pull request as ready for review April 23, 2026 18:52
bokelley and others added 2 commits April 23, 2026 15:01
Port the v2 triage pattern from adcp to this repo:

- Scaffolds 6 expert subagents under .claude/agents/ tailored to this
  repo's scope: ad-tech-protocol, adtech-product, code-reviewer,
  dx-expert, docs-expert, security-reviewer. Skipped experts
  (prompt-engineer, education, etc.) that don't apply to a library /
  SDK context.
- Rewrites triage-prompt.md to match adcp v2: bucket-driven expert
  panel, four outcomes (clarify / flag / execute-PR / defer),
  concurrency check (10-min comment-presence lock), coverage
  checklist at synthesis step.
- Drops silent-triage default and NONE-author PR gate — drive-by
  bugs welcome when small and correct; CODEOWNERS still gates merge.
- Repo-specific adaptations: bucket list, expert panel mapping, test
  commands, forbidden paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The routine's v2 expert-consultation path requires these files to be
reachable in the cloud session via the Task tool. The .claude/
directory was gitignored wholesale; narrow the ignore to only exclude
user-scoped settings files while allowing the committed agents dir.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit aa23ef3 into main Apr 23, 2026
10 checks passed
bokelley added a commit that referenced this pull request Apr 23, 2026
…y-engaged-and-ship-more

fix(agents): triage already-engaged + ship-more (missed in #259)
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