A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.
Design Studio Site Discovery
Shared site-location contract for workflows that create or modify components in a PAC CLI-downloaded non-SPA Power Pages site.
Use this reference before reading or writing webpages, web templates, page templates, web files, content snippets, site markers, or other Design Studio metadata. Component-specific references define which additional directories and files must exist after the site root is found.
Supported site type
A non-SPA site is identified by a .portalconfig directory and PAC-downloaded
metadata such as website.yml.
Do not treat powerpages.config.json by itself as a non-SPA site marker. That file
identifies a Power Pages SPA site built with React, Angular, Vue, or Astro, which uses a
different authoring model.
The non-SPA site root is always the parent of .portalconfig:
<site-root>/
├── .portalconfig/
├── website.yml
├── web-pages/
├── web-templates/
└── ...
The site root can be the current directory or a nested downloaded directory such as
.powerpages-site/.
Discovery procedure
- Search the current directory and its immediate child directories for
.portalconfig. - Exclude dependency, build-output, generated-output, temporary, and version-control directories.
- For every match, treat the parent directory as a candidate
<SITE_ROOT>. - Require
<SITE_ROOT>/website.yml. - Require every component-specific path named by the calling workflow.
- Reject candidates that have only SPA markers or are missing required non-SPA metadata.
- Resolve exactly one site before reading or writing component records.
Use file-search tools rather than shell-specific directory parsing so the workflow works consistently across supported hosts.
Component-specific requirements
Pass the paths required by the operation into the discovery check:
| Component | Required paths after website.yml |
|---|---|
| Webpage | web-pages/ |
| Web template | web-templates/ |
| Page template | page-templates/; also web-templates/ when creating, inspecting, or binding a Web Template-type record |
| Web file | web-files/, web-pages/ |
| Content snippet | content-snippets/, websitelanguage.yml |
| Site marker | web-pages/ and root-level sitemarker.yml; preserve its YAML sequence and existing records |
| Localized webpage component | web-pages/ |
Additional metadata can be required later by the component workflow. For example, multilingual webpage and snippet creation also needs valid portal-language and website-language records.
Do not create a missing component directory merely to make an unrelated candidate pass site discovery. Report the missing prerequisite or follow the component workflow's explicit initialization behavior.
Selecting among candidates
When exactly one candidate satisfies all required paths, select it automatically.
When several candidates remain, use available evidence in this order:
- an explicit path in the user's request;
- a component file or site directory already named in the request;
- the current working directory being one candidate's root;
- a uniquely matching component name, ID, route, or file in one candidate;
- the calling skill's documented selection policy.
Do not select the first filesystem result arbitrarily.
If the evidence does not distinguish the candidates, stop before writing. A calling skill can ask the user to choose when its interaction policy permits; an autonomous skill should report the candidate roots and the unresolved evidence.
Canonical variables
After discovery, use:
<SITE_ROOT>for the parent of.portalconfig;- component paths resolved relative to
<SITE_ROOT>; - absolute paths only for tool operations and user-facing diagnostics;
- repository-relative or site-relative paths in committed documentation and generated metadata.
Do not derive plugin-owned script or reference paths from <SITE_ROOT>. Resolve those
from ${PLUGIN_ROOT}.
Verification
Before component authoring begins, confirm:
- exactly one
<SITE_ROOT>is selected; <SITE_ROOT>/.portalconfigis a directory;<SITE_ROOT>/website.ymlis a file;- every calling workflow requirement exists with the expected file/directory type;
- the selected root is not inside a dependency, build, generated, temporary, or version-control directory;
- no path used for component writes escapes
<SITE_ROOT>; - the selected project is a non-SPA site, not a SPA site.
Prohibited shortcuts
- Do not use the process working directory as the site root without checking
.portalconfig. - Do not identify a non-SPA site from
website.ymlalone. - Do not treat
powerpages.config.jsonas a non-SPA site marker. - Do not select the first of multiple valid candidates without supporting evidence.
- Do not search broadly outside the current workspace to find a convenient site.
- Do not create missing metadata directories during discovery unless the component workflow explicitly owns that initialization.
- Do not resolve
${PLUGIN_ROOT}resources relative to the downloaded site.