Skip to content

fix(copilot): generate .prompt.md file for VS Code Copilot slash commands#328

Open
vkayatas wants to merge 1 commit into
nextlevelbuilder:mainfrom
vkayatas:fix/copilot-prompt-md-format
Open

fix(copilot): generate .prompt.md file for VS Code Copilot slash commands#328
vkayatas wants to merge 1 commit into
nextlevelbuilder:mainfrom
vkayatas:fix/copilot-prompt-md-format

Conversation

@vkayatas

@vkayatas vkayatas commented Jun 1, 2026

Copy link
Copy Markdown

VS Code Copilot requires reusable prompts to be files named <name>.prompt.md directly in .github/prompts/. The previous config generated .github/prompts/ui-ux-pro-max/PROMPT.md (a folder with PROMPT.md inside), which is not recognized as a slash command in Copilot.

Changes:

  • copilot.json: set skillPath to 'prompts', filename to 'ui-ux-pro-max.prompt.md', add dataPath for data/scripts location
  • copilot.json: use 'mode: agent' frontmatter (VS Code format) instead of 'name' field
  • template.ts: add dataPath support so data/scripts go to a separate directory from the prompt file when configured
  • template.ts: rewrite hardcoded script paths to platform-specific scriptPath for platforms that differ from the default
  • uninstall.ts: handle copilot-specific file layout during uninstall

After this fix, uipro init --ai copilot produces:
.github/prompts/ui-ux-pro-max.prompt.md (slash command file)
.github/prompts/ui-ux-pro-max/data/ (search database)
.github/prompts/ui-ux-pro-max/scripts/ (search engine)

…ands

VS Code Copilot requires reusable prompts to be files named
`<name>.prompt.md` directly in `.github/prompts/`. The previous
config generated `.github/prompts/ui-ux-pro-max/PROMPT.md` (a folder
with PROMPT.md inside), which is not recognized as a slash command.

Changes:
- copilot.json: set skillPath to 'prompts', filename to
  'ui-ux-pro-max.prompt.md', add dataPath for data/scripts location
- copilot.json: use 'mode: agent' frontmatter (VS Code format) instead
  of 'name' field
- template.ts: add dataPath support so data/scripts go to a separate
  directory from the prompt file when configured
- template.ts: rewrite hardcoded script paths to platform-specific
  scriptPath for platforms that differ from the default
- uninstall.ts: handle copilot-specific file layout during uninstall

After this fix, `uipro init --ai copilot` produces:
  .github/prompts/ui-ux-pro-max.prompt.md  (slash command file)
  .github/prompts/ui-ux-pro-max/data/      (search database)
  .github/prompts/ui-ux-pro-max/scripts/   (search engine)
@vkayatas

vkayatas commented Jun 1, 2026

Copy link
Copy Markdown
Author

Had to fix it on local so that my VSC recognizes e.g. the slash commands. This fix resolved that issue for me and is probably helpful for anybody who uses Copilot in VSC.

@mrgoonie mrgoonie 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.

Summary: This PR correctly identifies the Copilot prompt-file layout issue, but the implementation only changes the packaged CLI asset copy and leaves the canonical source template unchanged.

Risk level: Medium

Mandatory gates:

  • Duplicate/prior implementation: clear; no existing GitHub issue/PR found for copilot prompt md, and the only relevant history is the original Copilot support commit/tag path.
  • Project standards: issue found; repo convention keeps src/ui-ux-pro-max/templates/** as the source-of-truth and generated/package assets in cli/assets/** must stay in sync.
  • Strategic necessity: clear value; VS Code Copilot reusable prompts do need a directly addressable .prompt.md file instead of a nested PROMPT.md folder layout.
  • CI/checks: missing/not required in metadata for this PR.

Findings:

  • Important: src/ui-ux-pro-max/templates/platforms/copilot.json is still unchanged while cli/assets/templates/platforms/copilot.json is modified. That means the canonical template still generates .github/prompts/ui-ux-pro-max/PROMPT.md with name frontmatter, while only the packaged asset copy generates .github/prompts/ui-ux-pro-max.prompt.md with mode: agent. The next asset sync/codegen pass can overwrite or diverge this fix. Please update the source template and then regenerate/sync the CLI assets so both copies match intentionally.
  • Important: the template engine/schema change adds folderStructure.dataPath only in CLI code paths. If the source-side generator/types have an equivalent schema or generated asset pipeline, they need the same field support or a documented reason why this CLI-only schema extension is safe.

Verdict: REQUEST_CHANGES

Next step: make the Copilot platform config change in src/ui-ux-pro-max/templates/platforms/copilot.json, sync cli/assets/templates/platforms/copilot.json from it, and include a smoke check/output showing uipro init --ai copilot creates .github/prompts/ui-ux-pro-max.prompt.md plus the data/scripts directory without breaking uninstall.

@mrgoonie mrgoonie added agent:github-maintain Processed by github-maintain automation pr:reviewed PR reviewed by maintain workflow pr:changes-requested Maintain review requested changes labels Jun 20, 2026

@mrgoonie mrgoonie 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.

Summary: This fixes the VS Code Copilot prompt-file layout, but the patch only updates the bundled CLI asset copy of the Copilot platform config.

Risk level: Medium

Mandatory gates:

  • Duplicate/prior implementation: clear; no matching open issue/PR found beyond this PR.
  • Project standards: issue found.
  • Strategic necessity: clear value; Copilot slash prompts do need a .prompt.md file directly under .github/prompts.
  • CI/checks: missing.

Findings:

  • Important: cli/assets/templates/platforms/copilot.json was changed, but the canonical source-of-truth config at src/ui-ux-pro-max/templates/platforms/copilot.json was not updated. CLAUDE.md says templates must be edited in src/ui-ux-pro-max/templates/ and then synced into cli/assets/templates/. As written, the next template sync/publish step can overwrite this fix or leave source and package assets inconsistent. Please apply the same Copilot config change to the source template and keep the CLI asset mirror byte-aligned.

Verdict: REQUEST_CHANGES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation pr:changes-requested Maintain review requested changes pr:reviewed PR reviewed by maintain workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants