From 91ece89c19bb31f67d1495d511a6beee2b1dd311 Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:24:58 -0700 Subject: [PATCH 01/12] docs: add prompt files documentation Describes available prompt files, how to download them individually (bash and PowerShell), and how to use them in VS Code and GitHub Copilot CLI. --- docs/guides/prompt-files.md | 98 +++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 docs/guides/prompt-files.md diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md new file mode 100644 index 00000000..75711016 --- /dev/null +++ b/docs/guides/prompt-files.md @@ -0,0 +1,98 @@ +# Prompt Files + +APIOps provides [prompt files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental) that guide GitHub Copilot through common APIOps configuration tasks. These are reusable `.prompt.md` files that give Copilot the context it needs to help you configure extraction filters, environment overrides, and CI/CD identity setup. + +## What are prompt files? + +Prompt files are markdown files with a `.prompt.md` extension that provide instructions and context to GitHub Copilot. When you open a prompt file in VS Code and invoke Copilot, it uses the file's content as context to guide you through a task interactively. + +## Available prompt files + +| File | Description | +|------|-------------| +| `apiops-configure-filter.prompt.md` | Guides Copilot through creating a `configuration.extractor.yaml` filter file to control which API Management resources are extracted. | +| `apiops-configure-overrides.prompt.md` | Guides Copilot through creating environment override files (`configuration..yaml`) for promoting APIs across environments. | +| `apiops-setup-workflow-identity.prompt.md` | Walks through setting up Azure identity (app registration, federated credentials, RBAC) for GitHub Actions or Azure DevOps CI/CD pipelines. | + +## Getting prompt files + +### Via `apiops init` (recommended) + +The easiest way to get prompt files is to run [`apiops init`](../commands/init.md), which scaffolds your repository with prompt files already in place at `.github/prompts/`. + +### Download individually + +If you already have an APIOps repository and want to add prompt files without re-running init, you can download them directly from this repository. + +#### Bash + +```bash +# Create the prompts directory +mkdir -p .github/prompts + +# Download prompt files +curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-filter-prompt.md" \ + -o ".github/prompts/apiops-configure-filter.prompt.md" + +curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-overrides-prompt.md" \ + -o ".github/prompts/apiops-configure-overrides.prompt.md" + +# For GitHub Actions identity setup: +curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-github-actions.md" \ + -o ".github/prompts/apiops-setup-workflow-identity.prompt.md" + +# For Azure DevOps identity setup: +curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-azure-devops.md" \ + -o ".github/prompts/apiops-setup-workflow-identity.prompt.md" +``` + +#### PowerShell + +```powershell +# Create the prompts directory +New-Item -ItemType Directory -Path ".github/prompts" -Force + +# Download prompt files +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-filter-prompt.md" ` + -OutFile ".github/prompts/apiops-configure-filter.prompt.md" + +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-overrides-prompt.md" ` + -OutFile ".github/prompts/apiops-configure-overrides.prompt.md" + +# For GitHub Actions identity setup: +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-github-actions.md" ` + -OutFile ".github/prompts/apiops-setup-workflow-identity.prompt.md" + +# For Azure DevOps identity setup: +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-azure-devops.md" ` + -OutFile ".github/prompts/apiops-setup-workflow-identity.prompt.md" +``` + +## Using prompt files + +### In VS Code + +1. Open the prompt file (e.g., `.github/prompts/apiops-configure-filter.prompt.md`) in VS Code. +2. Open the Copilot Chat panel and type `#` followed by the prompt file name, or use the **Attach Context** button to select it. +3. Ask Copilot to help you complete the task described in the prompt. + +For more details on using prompt files in VS Code, see the [VS Code documentation on reusable prompt files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental). + +### In GitHub Copilot CLI + +You can reference prompt files when using [GitHub Copilot in the CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli): + +```bash +# Ask Copilot CLI to use a prompt file as context +gh copilot suggest --file .github/prompts/apiops-configure-filter.prompt.md "help me configure extraction filters" +``` + +For more details, see the [GitHub Copilot in the CLI documentation](https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli). + +## Further reading + +- [VS Code: Reusable prompt files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental) +- [GitHub Copilot in the CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli) +- [APIOps `init` command reference](../commands/init.md) +- [Filtering resources guide](./filtering-resources.md) +- [Environment overrides guide](./environment-overrides.md) From 5981bfd384c0ec12d358203bb69a93ea5c8b5efa Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:30:01 -0700 Subject: [PATCH 02/12] docs: clarify identity prompt has separate GitHub Actions and Azure DevOps variants --- docs/guides/prompt-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index 75711016..f8f70efb 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -12,7 +12,7 @@ Prompt files are markdown files with a `.prompt.md` extension that provide instr |------|-------------| | `apiops-configure-filter.prompt.md` | Guides Copilot through creating a `configuration.extractor.yaml` filter file to control which API Management resources are extracted. | | `apiops-configure-overrides.prompt.md` | Guides Copilot through creating environment override files (`configuration..yaml`) for promoting APIs across environments. | -| `apiops-setup-workflow-identity.prompt.md` | Walks through setting up Azure identity (app registration, federated credentials, RBAC) for GitHub Actions or Azure DevOps CI/CD pipelines. | +| `apiops-setup-workflow-identity.prompt.md` | Walks through setting up Azure identity (app registration, federated credentials, RBAC) for your CI/CD pipeline. There are separate versions for GitHub Actions and Azure DevOps — `apiops init` selects the correct one based on your chosen CI provider. | ## Getting prompt files From 90a72e4a1780cb329f9283b202d63924e063ff27 Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:31:18 -0700 Subject: [PATCH 03/12] docs: refactor download scripts to use a list and loop --- docs/guides/prompt-files.md | 64 ++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index f8f70efb..26f8d892 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -30,42 +30,46 @@ If you already have an APIOps repository and want to add prompt files without re # Create the prompts directory mkdir -p .github/prompts -# Download prompt files -curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-filter-prompt.md" \ - -o ".github/prompts/apiops-configure-filter.prompt.md" - -curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-overrides-prompt.md" \ - -o ".github/prompts/apiops-configure-overrides.prompt.md" - -# For GitHub Actions identity setup: -curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-github-actions.md" \ - -o ".github/prompts/apiops-setup-workflow-identity.prompt.md" - -# For Azure DevOps identity setup: -curl -sL "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-azure-devops.md" \ - -o ".github/prompts/apiops-setup-workflow-identity.prompt.md" +# Available prompt files — comment out any you don't need +files=( + "configure-filter-prompt.md:apiops-configure-filter.prompt.md" + "configure-overrides-prompt.md:apiops-configure-overrides.prompt.md" + # Choose ONE of the following identity setup prompts: + "identity-setup-prompt-github-actions.md:apiops-setup-workflow-identity.prompt.md" + # "identity-setup-prompt-azure-devops.md:apiops-setup-workflow-identity.prompt.md" +) + +base_url="https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" + +for entry in "${files[@]}"; do + src="${entry%%:*}" + dest="${entry##*:}" + curl -sL "${base_url}/${src}" -o ".github/prompts/${dest}" + echo "Downloaded ${dest}" +done ``` #### PowerShell ```powershell # Create the prompts directory -New-Item -ItemType Directory -Path ".github/prompts" -Force - -# Download prompt files -Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-filter-prompt.md" ` - -OutFile ".github/prompts/apiops-configure-filter.prompt.md" - -Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/configure-overrides-prompt.md" ` - -OutFile ".github/prompts/apiops-configure-overrides.prompt.md" - -# For GitHub Actions identity setup: -Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-github-actions.md" ` - -OutFile ".github/prompts/apiops-setup-workflow-identity.prompt.md" - -# For Azure DevOps identity setup: -Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot/identity-setup-prompt-azure-devops.md" ` - -OutFile ".github/prompts/apiops-setup-workflow-identity.prompt.md" +New-Item -ItemType Directory -Path ".github/prompts" -Force | Out-Null + +# Available prompt files — comment out any you don't need +$files = @( + @{ Source = "configure-filter-prompt.md"; Dest = "apiops-configure-filter.prompt.md" } + @{ Source = "configure-overrides-prompt.md"; Dest = "apiops-configure-overrides.prompt.md" } + # Choose ONE of the following identity setup prompts: + @{ Source = "identity-setup-prompt-github-actions.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } + # @{ Source = "identity-setup-prompt-azure-devops.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } +) + +$baseUrl = "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" + +foreach ($file in $files) { + Invoke-WebRequest -Uri "$baseUrl/$($file.Source)" -OutFile ".github/prompts/$($file.Dest)" + Write-Host "Downloaded $($file.Dest)" +} ``` ## Using prompt files From 820b7cfdf90a0b8cb3ab1592e1b738fde6835cb0 Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:34:01 -0700 Subject: [PATCH 04/12] docs: clarify identity prompt comment wording --- docs/guides/prompt-files.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index 26f8d892..d0303c3a 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -34,7 +34,7 @@ mkdir -p .github/prompts files=( "configure-filter-prompt.md:apiops-configure-filter.prompt.md" "configure-overrides-prompt.md:apiops-configure-overrides.prompt.md" - # Choose ONE of the following identity setup prompts: + # Remove the identity setup prompt that doesn't apply to your CI provider: "identity-setup-prompt-github-actions.md:apiops-setup-workflow-identity.prompt.md" # "identity-setup-prompt-azure-devops.md:apiops-setup-workflow-identity.prompt.md" ) @@ -59,7 +59,7 @@ New-Item -ItemType Directory -Path ".github/prompts" -Force | Out-Null $files = @( @{ Source = "configure-filter-prompt.md"; Dest = "apiops-configure-filter.prompt.md" } @{ Source = "configure-overrides-prompt.md"; Dest = "apiops-configure-overrides.prompt.md" } - # Choose ONE of the following identity setup prompts: + # Remove the identity setup prompt that doesn't apply to your CI provider: @{ Source = "identity-setup-prompt-github-actions.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } # @{ Source = "identity-setup-prompt-azure-devops.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } ) From d216535c5e3d4654b64b431edeffbce8923e9ec4 Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:34:35 -0700 Subject: [PATCH 05/12] docs: include both identity prompts uncommented, instruct to remove --- docs/guides/prompt-files.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index d0303c3a..aee02608 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -30,13 +30,13 @@ If you already have an APIOps repository and want to add prompt files without re # Create the prompts directory mkdir -p .github/prompts -# Available prompt files — comment out any you don't need +# Available prompt files — remove any you don't need files=( "configure-filter-prompt.md:apiops-configure-filter.prompt.md" "configure-overrides-prompt.md:apiops-configure-overrides.prompt.md" # Remove the identity setup prompt that doesn't apply to your CI provider: "identity-setup-prompt-github-actions.md:apiops-setup-workflow-identity.prompt.md" - # "identity-setup-prompt-azure-devops.md:apiops-setup-workflow-identity.prompt.md" + "identity-setup-prompt-azure-devops.md:apiops-setup-workflow-identity.prompt.md" ) base_url="https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" @@ -55,13 +55,13 @@ done # Create the prompts directory New-Item -ItemType Directory -Path ".github/prompts" -Force | Out-Null -# Available prompt files — comment out any you don't need +# Available prompt files — remove any you don't need $files = @( @{ Source = "configure-filter-prompt.md"; Dest = "apiops-configure-filter.prompt.md" } @{ Source = "configure-overrides-prompt.md"; Dest = "apiops-configure-overrides.prompt.md" } # Remove the identity setup prompt that doesn't apply to your CI provider: @{ Source = "identity-setup-prompt-github-actions.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } - # @{ Source = "identity-setup-prompt-azure-devops.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } + @{ Source = "identity-setup-prompt-azure-devops.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } ) $baseUrl = "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" From 869cc568ee836d2df5bb3933026ed869bd0a497a Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:36:26 -0700 Subject: [PATCH 06/12] docs: simplify download scripts since repo filenames match dest names --- docs/guides/prompt-files.md | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index aee02608..5ba5c078 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -32,20 +32,18 @@ mkdir -p .github/prompts # Available prompt files — remove any you don't need files=( - "configure-filter-prompt.md:apiops-configure-filter.prompt.md" - "configure-overrides-prompt.md:apiops-configure-overrides.prompt.md" + "apiops-configure-filter.prompt.md" + "apiops-configure-overrides.prompt.md" # Remove the identity setup prompt that doesn't apply to your CI provider: - "identity-setup-prompt-github-actions.md:apiops-setup-workflow-identity.prompt.md" - "identity-setup-prompt-azure-devops.md:apiops-setup-workflow-identity.prompt.md" + "apiops-setup-workflow-identity-github-actions.prompt.md" + "apiops-setup-workflow-identity-azure-devops.prompt.md" ) base_url="https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" -for entry in "${files[@]}"; do - src="${entry%%:*}" - dest="${entry##*:}" - curl -sL "${base_url}/${src}" -o ".github/prompts/${dest}" - echo "Downloaded ${dest}" +for file in "${files[@]}"; do + curl -sL "${base_url}/${file}" -o ".github/prompts/${file}" + echo "Downloaded ${file}" done ``` @@ -57,18 +55,18 @@ New-Item -ItemType Directory -Path ".github/prompts" -Force | Out-Null # Available prompt files — remove any you don't need $files = @( - @{ Source = "configure-filter-prompt.md"; Dest = "apiops-configure-filter.prompt.md" } - @{ Source = "configure-overrides-prompt.md"; Dest = "apiops-configure-overrides.prompt.md" } + "apiops-configure-filter.prompt.md" + "apiops-configure-overrides.prompt.md" # Remove the identity setup prompt that doesn't apply to your CI provider: - @{ Source = "identity-setup-prompt-github-actions.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } - @{ Source = "identity-setup-prompt-azure-devops.md"; Dest = "apiops-setup-workflow-identity.prompt.md" } + "apiops-setup-workflow-identity-github-actions.prompt.md" + "apiops-setup-workflow-identity-azure-devops.prompt.md" ) $baseUrl = "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" foreach ($file in $files) { - Invoke-WebRequest -Uri "$baseUrl/$($file.Source)" -OutFile ".github/prompts/$($file.Dest)" - Write-Host "Downloaded $($file.Dest)" + Invoke-WebRequest -Uri "$baseUrl/$file" -OutFile ".github/prompts/$file" + Write-Host "Downloaded $file" } ``` From 6f8c7902bea6b6d05906b438c519113523882ec6 Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:38:18 -0700 Subject: [PATCH 07/12] docs: remove 'Using prompt files' section, keep links in Further reading --- docs/guides/prompt-files.md | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index 5ba5c078..8f074734 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -70,27 +70,6 @@ foreach ($file in $files) { } ``` -## Using prompt files - -### In VS Code - -1. Open the prompt file (e.g., `.github/prompts/apiops-configure-filter.prompt.md`) in VS Code. -2. Open the Copilot Chat panel and type `#` followed by the prompt file name, or use the **Attach Context** button to select it. -3. Ask Copilot to help you complete the task described in the prompt. - -For more details on using prompt files in VS Code, see the [VS Code documentation on reusable prompt files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental). - -### In GitHub Copilot CLI - -You can reference prompt files when using [GitHub Copilot in the CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli): - -```bash -# Ask Copilot CLI to use a prompt file as context -gh copilot suggest --file .github/prompts/apiops-configure-filter.prompt.md "help me configure extraction filters" -``` - -For more details, see the [GitHub Copilot in the CLI documentation](https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli). - ## Further reading - [VS Code: Reusable prompt files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental) From 996591ed89400f91f7b278e732fa3298619d3e9a Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:39:18 -0700 Subject: [PATCH 08/12] docs: move guide links into table, remove from Further reading --- docs/guides/prompt-files.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index 8f074734..a6ca9b67 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -10,8 +10,8 @@ Prompt files are markdown files with a `.prompt.md` extension that provide instr | File | Description | |------|-------------| -| `apiops-configure-filter.prompt.md` | Guides Copilot through creating a `configuration.extractor.yaml` filter file to control which API Management resources are extracted. | -| `apiops-configure-overrides.prompt.md` | Guides Copilot through creating environment override files (`configuration..yaml`) for promoting APIs across environments. | +| `apiops-configure-filter.prompt.md` | Guides Copilot through creating a `configuration.extractor.yaml` filter file to control which API Management resources are extracted. See also: [Filtering resources guide](./filtering-resources.md) | +| `apiops-configure-overrides.prompt.md` | Guides Copilot through creating environment override files (`configuration..yaml`) for promoting APIs across environments. See also: [Environment overrides guide](./environment-overrides.md) | | `apiops-setup-workflow-identity.prompt.md` | Walks through setting up Azure identity (app registration, federated credentials, RBAC) for your CI/CD pipeline. There are separate versions for GitHub Actions and Azure DevOps — `apiops init` selects the correct one based on your chosen CI provider. | ## Getting prompt files @@ -75,5 +75,3 @@ foreach ($file in $files) { - [VS Code: Reusable prompt files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental) - [GitHub Copilot in the CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli) - [APIOps `init` command reference](../commands/init.md) -- [Filtering resources guide](./filtering-resources.md) -- [Environment overrides guide](./environment-overrides.md) From 58931cc9d62784b3c25a8e6e7a7ca1a486775817 Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:42:53 -0700 Subject: [PATCH 09/12] docs: list identity prompt files separately with CI provider in description --- docs/guides/prompt-files.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index a6ca9b67..04653e93 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -12,7 +12,8 @@ Prompt files are markdown files with a `.prompt.md` extension that provide instr |------|-------------| | `apiops-configure-filter.prompt.md` | Guides Copilot through creating a `configuration.extractor.yaml` filter file to control which API Management resources are extracted. See also: [Filtering resources guide](./filtering-resources.md) | | `apiops-configure-overrides.prompt.md` | Guides Copilot through creating environment override files (`configuration..yaml`) for promoting APIs across environments. See also: [Environment overrides guide](./environment-overrides.md) | -| `apiops-setup-workflow-identity.prompt.md` | Walks through setting up Azure identity (app registration, federated credentials, RBAC) for your CI/CD pipeline. There are separate versions for GitHub Actions and Azure DevOps — `apiops init` selects the correct one based on your chosen CI provider. | +| `apiops-setup-workflow-identity-github-actions.prompt.md` | Walks through setting up Azure identity (app registration, federated credentials, RBAC) for GitHub Actions CI/CD pipelines. | +| `apiops-setup-workflow-identity-azure-devops.prompt.md` | Walks through setting up Azure identity (app registration, federated credentials, RBAC) for Azure DevOps CI/CD pipelines. | ## Getting prompt files From 9d498d79006ed73f127b28ca95b1b470c5e47f8c Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:48:46 -0700 Subject: [PATCH 10/12] docs: use git rev-parse to resolve repo root in download scripts --- docs/guides/prompt-files.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index 04653e93..1a83dd4c 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -28,8 +28,11 @@ If you already have an APIOps repository and want to add prompt files without re #### Bash ```bash +# Resolve repo root so this works from any subdirectory +repo_root="$(git rev-parse --show-toplevel)" + # Create the prompts directory -mkdir -p .github/prompts +mkdir -p "${repo_root}/.github/prompts" # Available prompt files — remove any you don't need files=( @@ -43,7 +46,7 @@ files=( base_url="https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" for file in "${files[@]}"; do - curl -sL "${base_url}/${file}" -o ".github/prompts/${file}" + curl -sL "${base_url}/${file}" -o "${repo_root}/.github/prompts/${file}" echo "Downloaded ${file}" done ``` @@ -51,8 +54,11 @@ done #### PowerShell ```powershell +# Resolve repo root so this works from any subdirectory +$repoRoot = git rev-parse --show-toplevel + # Create the prompts directory -New-Item -ItemType Directory -Path ".github/prompts" -Force | Out-Null +New-Item -ItemType Directory -Path "$repoRoot/.github/prompts" -Force | Out-Null # Available prompt files — remove any you don't need $files = @( @@ -66,7 +72,7 @@ $files = @( $baseUrl = "https://raw.githubusercontent.com/Azure/apiops-cli/main/src/templates/copilot" foreach ($file in $files) { - Invoke-WebRequest -Uri "$baseUrl/$file" -OutFile ".github/prompts/$file" + Invoke-WebRequest -Uri "$baseUrl/$file" -OutFile "$repoRoot/.github/prompts/$file" Write-Host "Downloaded $file" } ``` From 7864b44b34a89f7ebb6ce639fb9fadfa568a7fcd Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:49:20 -0700 Subject: [PATCH 11/12] docs: remove duplicate init command link from Further reading --- docs/guides/prompt-files.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/guides/prompt-files.md b/docs/guides/prompt-files.md index 1a83dd4c..d958693b 100644 --- a/docs/guides/prompt-files.md +++ b/docs/guides/prompt-files.md @@ -81,4 +81,3 @@ foreach ($file in $files) { - [VS Code: Reusable prompt files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental) - [GitHub Copilot in the CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli) -- [APIOps `init` command reference](../commands/init.md) From 0e0b9ede54ccee0c25291fd056ca4ef5a05c35a3 Mon Sep 17 00:00:00 2001 From: Elizabeth Maher Date: Mon, 29 Jun 2026 15:52:44 -0700 Subject: [PATCH 12/12] docs: add prompt-files.md to docs README structure --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 2bb6f2ad..90900afd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -66,6 +66,7 @@ docs/ │ ├── multi-team-workflows.md — Selective extraction, CODEOWNERS │ ├── code-first-workflow.md — IDE → git → CI/CD → APIM │ ├── token-substitution.md — Pipeline token/placeholder substitution +│ ├── prompt-files.md — Copilot prompt files for APIOps tasks │ └── migration-from-v1.md — Migrate from Azure/apiops toolkit ├── ci-cd/ │ ├── github-actions.md — GitHub Actions integration