feat(copilot-agent): enable Copilot coding agent for landing-page feedback - #721
Conversation
…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>
…ead of non-existent site-src
There was a problem hiding this comment.
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.ymlworkflow that preinstalls Node 20, runsnpm ci, and smoke-buildssite-src/before each Copilot session. - New
.github/copilot-instructions.mddescribing repo structure, branching strategy (landing-page work targetsfeature/github-pages-agent), commit conventions, and a pointer tosite-src/AGENTS.md. - New
site-feedback.ymlissue 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.
| - 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| - **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/**` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| **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) |
There was a problem hiding this comment.
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.
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>
…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>
Enables the GitHub Copilot cloud agent to pick up landing-page feedback issues from the team and ship PRs automatically.
What this adds
.github/workflows/copilot-setup-steps.yml— preinstalls Node 20 +npm ciinsite-src/before each Copilot session, so the agent boots into a working dev env. Includes a smokenpm run buildstep so the workflow itself fails fast if deps are broken onmain..github/copilot-instructions.md— repo-wide context: structure, branching strategy (PRs againstfeature/github-pages-agentfor landing-page work,mainfor everything else), commit conventions, pointer to the more detailedsite-src/AGENTS.md(which lands on the redesign PR)..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
copilot-instructions.md+site-src/AGENTS.md, branches offfeature/github-pages-agent, editssite-src/, rebuildsdocs/, opens a draft PRPrerequisite
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
mainThe
copilot-setup-steps.ymlworkflow only triggers when present on the default branch — so this PR is a prerequisite for any landing-page feedback flow.