Skip to content

feat(init): rename and rewrite identity setup output files#200

Merged
EMaher merged 15 commits into
mainfrom
emaher-rename-and-rewrite-init-files
Jul 1, 2026
Merged

feat(init): rename and rewrite identity setup output files#200
EMaher merged 15 commits into
mainfrom
emaher-rename-and-rewrite-init-files

Conversation

@EMaher

@EMaher EMaher commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Motivation

The apiops init command generates identity setup guides and Copilot prompt files. The previous output had several issues:

  • File names were generic and didn't clearly indicate their purpose
  • Manual guides contained CLI commands (better suited for the prompt file)
  • Prompt files and manual guides weren't clearly differentiated in content style
  • The two-stage template rendering added unnecessary indirection

Approach

Renamed output files for clarity:

  • Manual guides: APIOPS-PIPELINE-IDENTITY-SETUP.md / APIOPS-WORKFLOW-IDENTITY-SETUP.md
  • Prompt files: apiops-setup-pipeline-identity.prompt.md / apiops-setup-workflow-identity.prompt.md

Rewrote manual guides to be UI-focused -- they now walk users through the Azure portal and Azure DevOps/GitHub web interfaces with step-by-step instructions and links to official documentation. No CLI commands, no dynamic token injection.

Kept prompt files CLI/command-focused -- these retain the scripted approach with PowerShell and Bash commands that Copilot can run interactively.

Added agent behavior rules to prompt files instructing Copilot to:

  • Complete one step at a time (never combine steps)
  • Confirm user input before proceeding
  • Ask permission before moving to the next step

Simplified template architecture:

  • Removed identity-setup-azure-devops-core.md -- inlined directly into the prompt template
  • Manual guide service now returns static content (no parameters/token injection)
  • Removed legacy file conflict detection from init service

Other changes

  • Renamed pipeline files to run-apiops-extractor.yml / run-apiops-publisher.yml across docs
  • Added official documentation reference links to all UI navigation steps in manual guides
  • Clarified identity distinction: Azure identity reads APIM; Build Service/GITHUB_TOKEN creates PRs

EMaher and others added 11 commits June 29, 2026 11:02
- Rename manual guide: IDENTITY-SETUP-GITHUB.md → APIOPS-WORKFLOW-IDENTITY-SETUP.md
- Rename manual guide: IDENTITY-SETUP-AZDO.md → APIOPS-PIPELINE-IDENTITY-SETUP.md
- Rename prompt: apiops-setup-identity.prompt.md → apiops-setup-{workflow|pipeline}-identity.prompt.md
- Rewrite manual guides to focus on web UI steps with documentation links
- Add note about identity distinction (Azure access vs PR creation)
- Add reference to prompt file in manual guides

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a reference link to the relevant Microsoft/GitHub docs page
above every section that instructs the user to navigate a web UI,
so readers have a fallback if the UI changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
apiops init is only run once, so no need to check for old file names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Renames generated pipeline YAML filenames from run-apim-* to
run-apiops-extractor.yml and run-apiops-publish.yml across all
source, docs, and tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the UI Reference Context section that injected the entire
manual guide into the Copilot prompt files. Keeps prompts lean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Manual guide markdown files are now fully static with generic
'for each environment' instructions. No more dynamic rendering —
the identity-guide-service just returns the template content as-is.
This makes the guides easier to maintain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Combines src/templates/shared/identity-setup-azure-devops-core.md directly
into the Azure DevOps prompt template, eliminating a level of indirection.
The two dynamic tokens (ENVIRONMENTS_ARRAY_POWERSHELL/BASH) are now
rendered directly in the prompt template.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Instructs the Copilot agent to complete one step at a time, confirm
user input before proceeding, ask permission to move to the next step,
and never combine steps automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@EMaher EMaher marked this pull request as ready for review June 29, 2026 21:21
@EMaher EMaher marked this pull request as draft June 29, 2026 21:22
@EMaher EMaher requested a review from Copilot June 29, 2026 21:22

Copilot AI left a comment

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.

Pull request overview

This PR updates apiops init identity setup outputs to use clearer, provider-specific filenames and rewrites identity setup content to better separate “manual UI guide” instructions from “Copilot prompt/CLI automation” instructions, while simplifying the underlying template composition.

Changes:

  • Renames generated workflow/pipeline YAML filenames and identity setup output files (manual guides + Copilot prompt files).
  • Rewrites identity manual guides to be portal/UI-focused and makes the guide service return static content (no token injection).
  • Inlines the Azure DevOps identity setup “core” content directly into the Copilot prompt template and updates tests/docs accordingly.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/unit/templates/copilot/identity-setup-prompt.test.ts Adds assertions for new identity-distinction notes in Copilot prompts.
tests/unit/services/init-service.test.ts Updates expected generated filenames/paths for workflows/pipelines, prompts, and guides.
tests/unit/services/identity-guide-service.test.ts Updates guide tests for new static, UI-oriented content and removed templating.
src/templates/shared/identity-setup-azure-devops-core.md Removes the standalone Azure DevOps “core steps” template.
src/templates/identity/identity-guide-github-actions.md Rewrites GitHub Actions manual identity guide to UI steps + identity distinction note.
src/templates/identity/identity-guide-azure-devops.md Rewrites Azure DevOps manual identity guide to UI steps + Build Service identity distinction note.
src/templates/copilot/identity-setup-prompt.ts Simplifies Azure DevOps prompt rendering by inlining core steps placeholders directly.
src/templates/copilot/identity-setup-prompt-github-actions.md Adds identity distinction + agent behavior rules to GitHub Actions prompt.
src/templates/copilot/identity-setup-prompt-azure-devops.md Inlines the Azure DevOps core steps into the prompt and adds agent behavior rules.
src/services/init-service.ts Renames generated output files and makes identity guide generation static (no placeholders).
src/services/identity-guide-service.ts Changes guide API to parameterless methods returning static templates.
src/cli/init-command.ts Updates “Next steps” messages to new guide/prompt filenames.
scripts/embed-markdown-templates.mjs Stops embedding the removed Azure DevOps core template file.
docs/walkthrough/air-gapped-azure-devops-offline-tarball.md Updates generated file list and references new identity guide name (has a doc typo to fix).
docs/walkthrough/air-gapped-azure-devops-local-registry.md Updates generated file list and references new identity guide name (has a doc typo to fix).
docs/commands/init.md Updates the init docs to reflect new workflow/pipeline filenames and new identity outputs.

Comment thread docs/walkthrough/air-gapped-azure-devops-offline-tarball.md Outdated
Comment thread docs/walkthrough/air-gapped-azure-devops-offline-tarball.md Outdated
Comment thread docs/walkthrough/air-gapped-azure-devops-local-registry.md Outdated
Comment thread docs/walkthrough/air-gapped-azure-devops-local-registry.md Outdated
@EMaher EMaher marked this pull request as ready for review June 29, 2026 21:38
Comment thread src/cli/init-command.ts Outdated
Comment thread src/cli/init-command.ts Outdated
@EMaher EMaher requested a review from petehauge June 29, 2026 22:02
* 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: add prompt-files.md to docs README structure
@EMaher EMaher self-assigned this Jul 1, 2026
@EMaher EMaher merged commit 03fe887 into main Jul 1, 2026
5 checks passed
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.

4 participants