Repository navigation
Description
Feature Request: Blueprint & Reference Architecture for Integrating Google AX with GitHub Projects
Target Repository: google/ax (https://github.com/google/ax)
Issue Type: Feature Request / Blueprint Proposal
Title: [Feature Request] Blueprint & Reference Architecture: Integrating Google AX with GitHub Projects for Autonomous Backlog Management
1. Summary
Provide an official Blueprint & Reference Implementation (documentation, reference webhook dispatcher, and turnkey setup scripts) for using Google AX together with GitHub Projects (v2) to run an autonomous, laptop-closed backlog management and software delivery workflow on Kubernetes / Agent Substrate.
Connecting Google AX to a project tracking backlog is one of the most common requirements for teams building autonomous agent workflows. However, teams currently face recurring hurdles: webhook recursive loops, Kubernetes/AX manifest naming rejections, silent deadlocks when agents fail, and lack of iteration loops for human playtesting. This blueprint packages production-tested patterns and GitHub best practices into an opinionated starter kit.
2. Motivation & Real-World Learnings: What We Learned & Mistakes We Made
While integrating Google AX with GitHub Projects and GKE Agent Substrate for an autonomous software engineering pipeline, we encountered several non-obvious failure modes. These friction points serve as the primary motivation for an official blueprint:
A. The "Todo → Done" Fallacy & The Missing Iteration Loop (To-be-fixed)
- The Mistake: We initially assumed a simple linear workflow (
Ready→In-Progress→Done) would suffice. - The Reality: Autonomous development requires a human-in-the-loop playtesting and review phase once code is deployed. Without a dedicated feedback state, human comments were either ignored or triggered a full re-implementation from scratch that lost prior context.
- The Solution: We introduced a five-state Kanban machine:
Backlog→Ready→In-Progress→To-be-fixed(Human Feedback) →Done. When moved toTo-be-fixed, a lightweight experience reflection step distills the reviewer’s comment into persistent project rules, triggering a targeted fix run without token bloat.
B. Silent Deadlocks on Agent Failures (Missing Blocked Escalation)
- The Mistake: When an agent task timed out, hit token budget ceilings (e.g. 400k tokens), or failed self-repair verification after 3 retries, the card remained stuck in
In-Progressindefinitely with no visibility into why it halted. - The Solution: An explicit failure state transition. On error, the dispatcher removes
In-Progress, applies aBlocked Coding Agentlabel, tags the issue author/founder (@user), posts a collapsible diagnostic log (<details><summary>Logs</summary>), and automatically tears down the AX Task resource (ax delete task).
C. Webhook Loop Hazards & Stored Prompt Injection
- The Mistake: Listening naively to issue comments or updates caused recursive execution storms: the agent posted a progress comment or PR link, which fired another webhook, re-triggering the AX task. Furthermore, accepting issues from arbitrary public users exposed the system to stored prompt injection.
- The Solution:
- Strict bot filtering (
comment.user.type === 'Bot') to eliminate self-trigger loops. - HMAC-SHA256 signature verification (
X-Hub-Signature-256) on all incoming webhooks. - Sender authorization allowlists (
authorizedUsers) before triggering expensive AX model invocations. - XML prompt encapsulation and input sanitization to strip instruction-override patterns from issue descriptions and feedback comments.
- Strict bot filtering (
D. AX Task Manifest & Substrate Validation Pitfalls
- The Mistake: Attempting to generate
ax.io/v1alpha1Taskmanifests directly from GitHub Issue metadata frequently failed with cryptic Kubernetes admission errors:- RFC-1123 Label Rejection: Raw issue titles contain spaces, uppercase letters, and punctuation. AX
metadata.nameandmetadata.atespacestrictly require lowercase RFC-1123 labels (<= 63 characters). - Image Digest Requirement: Passing standard tags (e.g.,
:latest) failed in Substrate; Substrate snapshots require images to be pinned by@sha256:...digest for reproducibility. - Resource Field Mismatch: AX Task manifests accept
spec.resources.limits(CPU and memory) but rejectspec.resources.requests. - Config Size Ceiling: Putting large diffs or multi-turn prompt history directly into
spec.configexceeded the 16 KiB limit.
- RFC-1123 Label Rejection: Raw issue titles contain spaces, uppercase letters, and punctuation. AX
- The Solution: The blueprint should include a reference manifest builder that enforces RFC-1123 sanitization, digest validation,
< 16 KiBconfig budgeting, and correct resource schemas.
E. Ingress & GKE Gateway Health Probing (HTTP 503 Traps)
- The Mistake: When exposing an AX webhook dispatcher behind a modern Kubernetes Gateway (
gatewayClassName: gke-l7-global-external-managed), the load balancer probes/over HTTP by default. Because the dispatcher only accepted POST requests on/webhook/githuband enforced HTTPS, the backend was marked unhealthy, producing continuous503 Service Unavailableerrors. - The Solution: The blueprint should ship with internal
/healthzendpoints and an attachedHealthCheckPolicymanifest out-of-the-box.
3. Proposed Blueprint Architecture (Aligned with GitHub Best Practices)
Based on GitHub Projects Best Practices, the proposed blueprint would provide a standardized reference implementation across four core areas:
flowchart TD
subgraph GitHub["GitHub Ecosystem"]
Board["GitHub Projects v2 Board\n(Views: Backlog, Telemetry, Triage)"]
Issue["GitHub Issues & Sub-issues\n(Labels: Ready, In-Progress, To-be-fixed, Blocked)"]
PR["Pull Requests\n(Refs #123, Auto-merge, Screenshots)"]
end
subgraph AXControlPlane["AX & Kubernetes Control Plane"]
Dispatcher["AX Webhook Dispatcher\n(HMAC-SHA256, Bot-filter, Sanitizer)"]
AXServer["Google AX Server\n(ax.io/v1alpha1 Workspace & Task)"]
Substrate["Agent Substrate Runtime\n(gVisor Sandbox, Digest-pinned)"]
end
Board <-->|"Sync Status & Fields"| Issue
Issue -->|"Webhook (labeled: Ready / To-be-fixed)"| Dispatcher
Dispatcher -->|"Submit Task (@sha256, RFC-1123)"| AXServer
AXServer -->|"Schedule Actor"| Substrate
Substrate -->|"Open PR + Post Preview & Logs"| PR
PR -->|"Squash Merge & Close/Update"| Issue
1. Communicate Across Issues and Pull Requests
- Bidirectional Status Sync: Moving a card to
Readyor labeling itTo-be-fixedtriggers an AX Task; the dispatcher immediately shifts the card status toIn-Progress. - Rich Completion Telemetry: When the AX task runner finishes, it opens a linked PR (
Refs #<issue>), merges it, and posts a rich report to the issue containing:- Deployed commit hash and preview URL.
- Headless browser verification screenshots (mobile and desktop viewports).
- Consumed token count vs. budget ceiling.
- Collapsible verification logs (
<details><summary>gVisor Sandbox Verification Log</summary>).
- Explicit Blocker Tagging: If an agent hits a constraint or failure, it removes
In-Progress, labels the issueBlocked Coding Agent, and@mentionsthe assignee with targeted diagnostics.
2. Break Down Large Tasks into Manageable Slices
- Issue Slicing Guidelines: Guidelines and issue templates instructing users how to structure tasks into small vertical slices (<= 5 files modified per task).
- Sub-issue Hierarchy: Leveraging GitHub's sub-issues to break larger epics into independent, testable AX tasks that run within token caps (e.g. 400k tokens per task).
3. Customized Views for Different Audiences
The blueprint includes pre-configured GitHub Project views:
- Product / Reviewer Board (Kanban): Focused on delivery:
Ready→In-Progress→To-be-fixed→Done, with live deployment links and screenshots for playtesting. - Engineering / Agent Telemetry (Table): Grouped by status, showing custom fields:
Model Route(e.g., Flash vs. Argon/Pro),Estimated Effort,Token Spend,Execution Time, andAX Task ID. - Triage / Exception View (Board/Table): Filtered exclusively to
Blocked Coding Agentitems to highlight issues requiring human developer intervention.
4. Turnkey Setup & Dispatcher Package
- Reference Webhook Dispatcher: Lightweight Node.js or Go microservice implementing HMAC verification, bot suppression, sender allowlisting, RFC-1123 task naming, digest verification, and AX task submission.
- Turnkey Setup Script (
scripts/setup-github.shorax project setup github): Single CLI command usingghto create the GitHub Project board, standard labels, custom fields, and Workload Identity secrets in seconds. - Zero-Leak Pre-flight Guardrails: Instructions for enforcing deterministic gates (
0 tokens: linting, typechecks, secret scanning) before LLMs are engaged.
4. Value to the Google AX Community
- Accelerated Time-to-Value: Enables new teams to connect AX to GitHub Projects in 15 minutes instead of spending weeks re-architecting webhook handling, manifest builders, and label state machines.
- Standardized Human-in-the-Loop Iteration: Moves the community beyond simple one-shot script execution to resilient, multi-turn product iteration (
To-be-fixedand experience reflection). - Hardened Operational Security: Provides battle-tested patterns for prompt-injection defense, bot loop prevention, and secret isolation.
5. Potential Discussion Points for Maintainers
- Should the GitHub Webhook Dispatcher live under
google/ax/examples/github-projectsas a reference deployment, or as an optional built-in component/plugin inax? - Would the team be interested in an
ax project init githubCLI extension that automates the GitHub Project board creation viaghCLI?
Activity
stephanwesten commentedon Nov 3, 2026
Looks very interesting. Hope that this can serve as a template for Jira/Gitlab integration. It is probably too complicated to make the git and project mgt pluggable. As such it makes more sense to me that the Github webhook is optional and can be replaced with a Gitlab one.
jpawelczak commentedon Nov 3, 2026
Good idea to start with Gitlab integration as a blueprint. I will build PoC to see if Antigravity piggy back on the things I implemented on my side = potential blueprint / demo or AGENTS.md for such integrations.