Skip to content

Prototype: connect GitHub and prepare Kiro in aws-devops-agent setup - #985

Draft
cchu-ld wants to merge 2 commits into
mainfrom
cchu/aws-devops-agent-github-kiro
Draft

cchu-ld wants to merge 2 commits into
mainfrom
cchu/aws-devops-agent-github-kiro

Conversation

@cchu-ld

@cchu-ld cchu-ld commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

This prototype adds a GitHub and Kiro step to ldcli aws-devops-agent setup. The step runs when you pass --github-repo owner/name. The goal is to replace guide Steps 3 to 6 of Automating the experimentation lifecycle with AWS DevOps Agent with one command. Then the in-app setup page can skip the link to the guide.

The step does these actions after the usual setup:

  1. It finds the GitHub registration of the AWS account for the repository owner. The AWS API cannot register GitHub, because RegisterService does not accept github. If there is no registration, setup opens the console form at #/services/register/github and prints two or three steps: choose Organization for an organization repository, choose Submit, and authorize the app in GitHub. Then it polls ListServices until the registration appears.
  2. It connects the repository to the agent space with AssociateService and a GitHubConfiguration.
  3. It stores the Kiro API key as the KIRO_API_KEY repository secret. It reads the key from the KIRO_API_KEY environment variable, or it asks for the key with hidden input. It sends the key to gh secret set on stdin.
  4. It turns on "Allow GitHub Actions to create and approve pull requests" and keeps the default token permissions.
  5. It writes .kiro/agents/flag-implementer.json, .github/workflows/kiro-implement.yml and .github/workflows/merge-pr.yml into --repo-dir. The files are copies from the guide. --base gets the real default branch of the repository, not main. Setup keeps a file that exists and does not commit.
  6. It warns when no other workflow has a workflow_dispatch trigger.
  7. It asks before it protects the default branch.

These are the open questions:

  • Nobody has run this on a real AWS account. The behavior of AssociateService when the GitHub App is not on the repository is not known.
  • Steps 3 to 7 use the gh CLI as the person who runs setup, and they need admin access. A version for release can use the GitHub API directly.
  • The Kiro files come from the guide. They can move to launchdarkly/ai-tooling, the same as the skill.
  • The branch protection rule needs one approval and passing checks. Some teams can want a different rule.

This prototype has no tests.

🤖 Generated with Claude Code

cchu-ld and others added 2 commits October 29, 2026 15:35
Add the --github-repo and --repo-dir flags to setup. With --github-repo,
setup finds the GitHub registration of the AWS account, or opens the
console and waits for it. Then it connects the repository to the agent
space. With the gh CLI, it stores the Kiro API key as a secret, lets
GitHub Actions open pull requests, writes the three Kiro files, and asks
before it protects the default branch.

This is a prototype. It has no tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the AWS account has no GitHub registration, setup now opens the
console form that registers GitHub, not the console home page. It prints
two or three steps: choose Organization for an organization repository,
choose Submit, and authorize the app in GitHub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
persist-credentials: false

- name: Install Kiro CLI
run: curl -fsSL https://cli.kiro.dev/install | bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we install a fixed version here? As it is, this can change out from under us, and this workflow runs with permission to write to the repo.

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.

2 participants