From 59cfc4a000c862bbb868e0fd36bd45609e3ef0e4 Mon Sep 17 00:00:00 2001 From: Kevin Chan Date: Tue, 28 Jul 2026 15:28:43 +1000 Subject: [PATCH] [codex] Add Kiro setup recipe (#4535) * Add Kiro setup recipe * docs: register integrations/kiro in docs.json navigation The docsync guard (TestEveryDocsPageIsPublished) requires every docs/ page in the Mintlify nav; it landed after this PR was written. Agent-Signature: claude-fable-5-high on behalf of maphew Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01P3JtQ3ukoVmfg6LCKcKBBh --------- Co-authored-by: matt wilkie Co-authored-by: Claude Fable 5 --- cmd/bd/setup.go | 3 ++- cmd/bd/setup_test.go | 29 +++++++++++++++++++++++++++++ docs/docs.json | 1 + docs/getting-started/ide-setup.md | 3 ++- docs/integrations/index.md | 1 + docs/integrations/kiro.md | 22 ++++++++++++++++++++++ internal/recipes/recipes.go | 6 ++++++ internal/recipes/recipes_test.go | 2 +- 8 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 docs/integrations/kiro.md diff --git a/cmd/bd/setup.go b/cmd/bd/setup.go index 0d7a8bbac..8b6f23ccb 100644 --- a/cmd/bd/setup.go +++ b/cmd/bd/setup.go @@ -33,11 +33,12 @@ var setupCmd = &cobra.Command{ Long: `Setup integration files for AI editors and coding assistants. Recipes define where beads workflow instructions are written. Built-in recipes -include cursor, claude, copilot, gemini, aider, factory, codex, mux, opencode, junie, windsurf, cody, and kilocode. +include cursor, claude, copilot, gemini, aider, factory, codex, mux, opencode, junie, kiro, windsurf, cody, and kilocode. Examples: bd setup cursor # Install Cursor IDE integration (rules + agent hooks) bd setup cursor --global # Install global Cursor hooks (~/.cursor/hooks.json) + bd setup kiro # Install Kiro steering guidance bd setup codex # Install Codex skill + AGENTS.md guidance + native hooks bd setup codex --global # Install global Codex skill + guidance + native hooks bd setup copilot # Install Copilot CLI plugin + repository instructions diff --git a/cmd/bd/setup_test.go b/cmd/bd/setup_test.go index 4c3a14164..cc9ff8b5e 100644 --- a/cmd/bd/setup_test.go +++ b/cmd/bd/setup_test.go @@ -189,6 +189,35 @@ func TestRunRecipe_BuiltinFileRecipeWorksWithoutWorkspace(t *testing.T) { } } +func TestRunRecipe_KiroWorksWithoutWorkspace(t *testing.T) { + tmpDir := t.TempDir() + t.Chdir(tmpDir) + t.Setenv("BEADS_DIR", "") + resetSetupResolutionCaches(t) + resetSetupGlobals(t) + + out := captureStdout(t, func() error { + runRecipe("kiro") + return nil + }) + + if !strings.Contains(out, "Installing Kiro CLI integration") { + t.Fatalf("expected install output, got:\n%s", out) + } + + installedPath := filepath.Join(tmpDir, ".kiro", "steering", "beads.md") + data, err := os.ReadFile(installedPath) + if err != nil { + t.Fatalf("ReadFile(%q): %v", installedPath, err) + } + if string(data) != recipes.Template { + t.Fatalf("installed Kiro recipe contents did not match template") + } + if _, err := os.Stat(filepath.Join(tmpDir, ".beads")); !os.IsNotExist(err) { + t.Fatalf("expected no local .beads directory to be created, got err=%v", err) + } +} + func TestRunRecipe_CopilotWorksWithoutWorkspace(t *testing.T) { tmpDir := t.TempDir() diff --git a/docs/docs.json b/docs/docs.json index 362355c9f..d6b355bb9 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -302,6 +302,7 @@ "integrations/gemini", "integrations/junie", "integrations/kilocode", + "integrations/kiro", "integrations/mux", "integrations/opencode", "integrations/windsurf", diff --git a/docs/getting-started/ide-setup.md b/docs/getting-started/ide-setup.md index 2754311e3..47a4537da 100644 --- a/docs/getting-started/ide-setup.md +++ b/docs/getting-started/ide-setup.md @@ -35,6 +35,7 @@ bd setup claude --remove # Uninstall | `windsurf` | `.windsurf/rules/beads.md` | [Windsurf](/integrations/windsurf) | | `cody` | `.cody/rules/beads.md` | [Cody](/integrations/cody) | | `kilocode` | `.kilocode/rules/beads.md` | [Kilo Code](/integrations/kilocode) | +| `kiro` | `.kiro/steering/beads.md` | [Kiro CLI](/integrations/kiro) | `bd prime` is the single source of truth for operational workflow commands. Each integration's instruction file either points to `bd prime` (hook-enabled agents) or carries the full command reference (AGENTS-first agents). @@ -348,7 +349,7 @@ bd setup --print | Type | Description | Used by | |------|-------------|---------| -| `file` | Write the template to a single file | windsurf, cody, kilocode | +| `file` | Write the template to a single file | windsurf, cody, kilocode, kiro | | `hooks` | Modify JSON settings to add hooks | claude, gemini | | `section` | Inject a marked section into an existing file | factory, codex, mux, opencode | | `multifile` | Write multiple files | aider, copilot, junie | diff --git a/docs/integrations/index.md b/docs/integrations/index.md index d040540e8..a6fd401bb 100644 --- a/docs/integrations/index.md +++ b/docs/integrations/index.md @@ -27,6 +27,7 @@ bd setup --list | `gemini` | [Gemini CLI](/integrations/gemini) | Gemini hooks and `GEMINI.md` | | `junie` | [Junie](/integrations/junie) | `.junie/guidelines.md` and MCP config | | `kilocode` | [Kilo Code](/integrations/kilocode) | `.kilocode/rules/beads.md` | +| `kiro` | [Kiro CLI](/integrations/kiro) | `.kiro/steering/beads.md` | | `mux` | [Mux](/integrations/mux) | `AGENTS.md`, optional `.mux/AGENTS.md`, and Mux hooks | | `opencode` | [OpenCode](/integrations/opencode) | `AGENTS.md` | | `windsurf` | [Windsurf](/integrations/windsurf) | `.windsurf/rules/beads.md` | diff --git a/docs/integrations/kiro.md b/docs/integrations/kiro.md new file mode 100644 index 000000000..4613dfbab --- /dev/null +++ b/docs/integrations/kiro.md @@ -0,0 +1,22 @@ +--- +id: kiro +title: Kiro CLI +--- + +# Kiro CLI Integration + +Use Beads with Kiro CLI through workspace steering guidance. + +```bash +bd setup kiro +bd setup kiro --check +``` + +The setup command writes Beads workflow guidance to `.kiro/steering/beads.md`. +Kiro reads workspace steering files when it starts a session. + +## Remove + +```bash +bd setup kiro --remove +``` diff --git a/internal/recipes/recipes.go b/internal/recipes/recipes.go index 2c5ddddd1..b6a949ece 100644 --- a/internal/recipes/recipes.go +++ b/internal/recipes/recipes.go @@ -67,6 +67,12 @@ var BuiltinRecipes = map[string]Recipe{ Type: TypeFile, Description: "Kilo Code rules file", }, + "kiro": { + Name: "Kiro CLI", + Path: ".kiro/steering/beads.md", + Type: TypeFile, + Description: "Kiro steering file", + }, "claude": { Name: "Claude Code", Type: TypeHooks, diff --git a/internal/recipes/recipes_test.go b/internal/recipes/recipes_test.go index d371574ef..b5e71a837 100644 --- a/internal/recipes/recipes_test.go +++ b/internal/recipes/recipes_test.go @@ -10,7 +10,7 @@ import ( func TestBuiltinRecipes(t *testing.T) { // Ensure all expected built-in recipes exist - expected := []string{"cursor", "windsurf", "cody", "kilocode", "claude", "copilot", "gemini", "factory", "codex", "mux", "aider", "junie"} + expected := []string{"cursor", "windsurf", "cody", "kilocode", "kiro", "claude", "copilot", "gemini", "factory", "codex", "mux", "aider", "junie"} for _, name := range expected { recipe, ok := BuiltinRecipes[name]