Skip to content

feat(copilot-agent): enable Copilot coding agent for landing-page feedback - #721

Merged
Rajeev Pentyala (RajeevPentyala) merged 9 commits into
mainfrom
demora-copilot-agent-setup
May 27, 2026
Merged

feat(copilot-agent): enable Copilot coding agent for landing-page feedback#721
Rajeev Pentyala (RajeevPentyala) merged 9 commits into
mainfrom
demora-copilot-agent-setup

Conversation

@denise-msft

Copy link
Copy Markdown
Member

Enables the GitHub Copilot cloud agent to pick up landing-page feedback issues from the team and ship PRs automatically.

What this adds

  1. .github/workflows/copilot-setup-steps.yml — preinstalls Node 20 + npm ci in site-src/ before each Copilot session, so the agent boots into a working dev env. Includes a smoke npm run build step so the workflow itself fails fast if deps are broken on main.
  2. .github/copilot-instructions.md — repo-wide context: structure, branching strategy (PRs against feature/github-pages-agent for landing-page work, main for everything else), commit conventions, pointer to the more detailed site-src/AGENTS.md (which lands on the redesign PR).
  3. .github/ISSUE_TEMPLATE/site-feedback.yml — structured issue form: section selector, change-type dropdown, description, rationale, screenshot, priority. Submitters then assign Copilot to trigger the agent.

Team workflow this unlocks

  1. Team member opens https://github.com/microsoft/Power-CAT-Copilot-Studio-Kit/issues/new?template=site-feedback.yml
  2. Fills the form, submits, assigns Copilot
  3. Copilot reads copilot-instructions.md + site-src/AGENTS.md, branches off feature/github-pages-agent, edits site-src/, rebuilds docs/, opens a draft PR
  4. Maintainer reviews + merges; Pages auto-deploys

Prerequisite

The Copilot coding agent must be enabled at the repo or org level in repo Settings → Code & automation → Copilot. If it's not yet enabled, ping the org admin.

Note on landing on main

The copilot-setup-steps.yml workflow only triggers when present on the default branch — so this PR is a prerequisite for any landing-page feedback flow.

…dback

Wires up the GitHub Copilot cloud agent so the team can file structured
issues against the landing-page redesign and have them auto-implemented.

Three new files:
- .github/workflows/copilot-setup-steps.yml
  Preinstalls Node 20 + npm ci on site-src/ before each Copilot session, so
  the agent boots into a working dev env instead of trial-and-erroring its
  way through setup.
- .github/copilot-instructions.md
  Repo-wide context: project structure, branching strategy (PRs against
  feature/github-pages-agent for landing-page work, main for everything
  else), commit conventions, pointer to site-src/AGENTS.md for design
  tokens and build pipeline.
- .github/ISSUE_TEMPLATE/site-feedback.yml
  Structured issue form: section selector, change-type dropdown,
  description, rationale, screenshot, priority. Filers assign Copilot
  after submitting to trigger the agent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

Adds GitHub configuration files to enable the GitHub Copilot coding agent to pick up landing-page feedback issues and produce PRs automatically. Introduces a Copilot setup-steps workflow, a repo-wide Copilot instructions doc, and a structured landing-page feedback issue form.

Changes:

  • New copilot-setup-steps.yml workflow that preinstalls Node 20, runs npm ci, and smoke-builds site-src/ before each Copilot session.
  • New .github/copilot-instructions.md describing repo structure, branching strategy (landing-page work targets feature/github-pages-agent), commit conventions, and a pointer to site-src/AGENTS.md.
  • New site-feedback.yml issue template that collects structured landing-page feedback (section, change type, description, rationale, screenshot, priority) and instructs submitters to assign Copilot.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/copilot-setup-steps.yml Preinstalls Node + site-src/ deps and smoke-builds before Copilot sessions.
.github/copilot-instructions.md Repo-wide guidance for Copilot/contributors: structure, branches, commit conventions.
.github/ISSUE_TEMPLATE/site-feedback.yml Structured landing-page feedback form that routes work to Copilot.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +45
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: agent-review-pipeline/package-lock.json

- name: Install agent-review-pipeline dependencies
working-directory: agent-review-pipeline
run: npm ci

# Validate the build works in the runner. If this step fails on the
# default branch, dependencies are broken and Copilot tasks will fail.
- name: Smoke-build agent-review-pipeline
working-directory: agent-review-pipeline
run: npm run build

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.

Applied option (b): added if: hashFiles('agent-review-pipeline/package-lock.json') != '' guards to the Set up Node.js, Install dependencies, and Smoke-build steps so they silently skip when the file isn't present. Commit: ci: guard Node.js steps so they no-op when agent-review-pipeline/package-lock.json is absent.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Resolved in 699dc94. The earlier round of fixes overcorrected by swapping site-src/ for agent-review-pipeline/, which dropped the landing-page setup entirely. This commit restores site-src/ and supports both Node subprojects, each guarded with if: hashFiles('<path>/package-lock.json') != '' so each step is a silent no-op on branches where its project isn't present. Safe on main (no site-src/), safe on feature/github-pages-agent (no agent-review-pipeline/ in scope), and Node 20 is set up unconditionally.

Comment on lines +37 to +39
- **Open the PR against the `feature/github-pages-agent` branch**, NOT `main`
- The Pages deploy workflow only fires on pushes to `feature/github-pages-agent`
that touch `docs/**`

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.

Updated deploy-pages.yml to trigger on feature/github-pages-agent instead of main, aligning the workflow with the branching strategy described in the instructions. Commit: ci: update deploy-pages trigger branch to feature/github-pages-agent.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Confirmed correct. gh api repos/microsoft/Power-CAT-Copilot-Studio-Kit/pages reports source.branch: feature/github-pages-agent, source.path: /docs — so the deploy workflow trigger now matches the actual GitHub Pages configuration. The previous branches: [main] trigger was a latent misconfiguration; pushes to docs/** on main weren't deploying anyway because Pages reads from a different branch.

Comment thread .github/ISSUE_TEMPLATE/site-feedback.yml Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment on lines +27 to +35
**Read [`site-src/AGENTS.md`](../site-src/AGENTS.md) before touching anything in `site-src/`.**
It has the design tokens, the build pipeline, the scroll-reveal pattern, and
the branching strategy.

Key rules for landing-page work:

- Edit source in `site-src/src/` (most often `theme.ts`, `App.tsx`, `features.ts`)
- Build with `cd site-src && npm ci && npm run build`
- The build writes into `../docs/` (committed — this is the Pages source)

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.

Added a blockquote note in the "Landing-page changes" section clarifying that site-src/ and its contents (AGENTS.md, src/, package.json) exist only on the feature/github-pages-agent branch and are not present on main. Also removed the broken relative link, replacing it with a plain reference pointing readers to the correct branch. Commit: a3e1389.

Comment thread .github/workflows/copilot-setup-steps.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

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

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

…de subprojects

PR review surfaced that the previous round of fixes replaced site-src/ with
agent-review-pipeline/ — that swap was based on the (correct) observation
that site-src/ doesn't exist on main, but it dropped the landing-page setup
entirely. The right answer is to support BOTH Node subprojects with
hashFiles() guards so each step is a silent no-op on branches where its
project isn't checked out.

- copilot-setup-steps.yml: Node 20 is set up unconditionally; site-src/ and
  agent-review-pipeline/ each get their own cache/install/smoke-build steps,
  all guarded with if: hashFiles('<path>/package-lock.json') != ''.
- copilot-instructions.md: updated the Setup-steps section to accurately
  describe both subprojects and the guard pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@RajeevPentyala
Rajeev Pentyala (RajeevPentyala) merged commit ee646a9 into main May 27, 2026
9 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