fix(copilot): generate .prompt.md file for VS Code Copilot slash commands#328
fix(copilot): generate .prompt.md file for VS Code Copilot slash commands#328vkayatas wants to merge 1 commit into
Conversation
…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)
|
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
left a comment
There was a problem hiding this comment.
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 incli/assets/**must stay in sync. - Strategic necessity: clear value; VS Code Copilot reusable prompts do need a directly addressable
.prompt.mdfile instead of a nestedPROMPT.mdfolder layout. - CI/checks: missing/not required in metadata for this PR.
Findings:
- Important:
src/ui-ux-pro-max/templates/platforms/copilot.jsonis still unchanged whilecli/assets/templates/platforms/copilot.jsonis modified. That means the canonical template still generates.github/prompts/ui-ux-pro-max/PROMPT.mdwithnamefrontmatter, while only the packaged asset copy generates.github/prompts/ui-ux-pro-max.prompt.mdwithmode: 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.dataPathonly 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
left a comment
There was a problem hiding this comment.
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.jsonwas changed, but the canonical source-of-truth config atsrc/ui-ux-pro-max/templates/platforms/copilot.jsonwas not updated.CLAUDE.mdsays templates must be edited insrc/ui-ux-pro-max/templates/and then synced intocli/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
VS Code Copilot requires reusable prompts to be files named
<name>.prompt.mddirectly 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:
After this fix,
uipro init --ai copilotproduces:.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)