microsoft / microsoft/hve-core

fix(packaging): prompts and instructions missing from installed plugin (pointer files have no target)

Open
#1,844 2 comments 0 reactions 0 assignees View on GitHub
bug needs-triage
Dominant language
Python
Stars
1.5k
Forks
301
Avg merge
3d 3h
Merged PRs (30d)
92

Description

### Component

Instruction Files

### Bug Description

After installing the plugin via `copilot plugin install hve-core@hve-core`, **all prompt files (referenced by commands) and all instruction files (referenced by prompts) are missing from the installed plugin directory**.

The installer ships:
- `commands/` — pointer files (work because CLI invokes the command, which loads the prompt by relative path)
- `agents/` — pointer files (broken — see #785)
- `skills/` — config

…but **NOT** the actual content under:
- `.github/prompts/` — 69 files for v3.3.101
- `.github/instructions/` — 26 files for v3.3.101
- `.github/agents/` — 54 files (#785 covers this for the related symptom)

When a user or LLM agent tries to execute a command/skill, they get a pointer file with no resolvable target. For example, `ado-triage-work-items.prompt.md` references `#file:../../instructions/ado/ado-backlog-triage.instructions.md` and `#file:../../instructions/ado/ado-wit-planning.instructions.md` — neither file exists in the installed plugin tree, so the LLM either skips them (silent quality degradation) or fabricates the missing workflow logic.

This affects **all 10 categories** of prompts: `ado`, `coding-standards`, `data-science`, `design-thinking`, `experimental`, `github`, `hve-core`, `jira`, `rai-planning`, `security`.

**Affected version:** `hve-core v3.3.101`

### Expected Behavior

After `copilot plugin install hve-core@hve-core`, the installed plugin tree should include the actual content of `.github/{prompts,agents,instructions}/` so that all `#file:` references inside commands, prompts, and instructions resolve to real files.

Either:
1. **Inline** the content from `.github/` into `commands/`, `agents/`, `instructions/` at package time (similar to the agents fix proposed in #785); OR
2. **Include** the `.github/{prompts,agents,instructions}/` trees alongside the pointer files so relative paths resolve.

### Steps to Reproduce

```powershell
# 1. Install plugin
copilot plugin install hve-core@hve-core

# 2. Inspect a command pointer
Get-Content ~/.copilot/installed-plugins/hve-core/hve-core-all/commands/ado/ado-triage-work-items.md
# => 1-line pointer: ../../../../.github/prompts/ado/ado-triage-work-items.prompt.md

# 3. Try to resolve the pointer
Test-Path ~/.copilot/installed-plugins/.github/prompts/ado/ado-triage-work-items.prompt.md
# => False (file missing)

# 4. Same for instructions referenced by prompts
Test-Path ~/.copilot/installed-plugins/.github/instructions/ado/ado-backlog-triage.instructions.md
# => False

# 5. End-to-end: trying to use the skill via the CLI agent
# => agent receives only the pointer string, no actual workflow logic
```

### Additional Context

## Workaround used locally

Manually downloaded all referenced assets directly from this repo's `main` branch:

```powershell
$base = "https://raw.githubusercontent.com/microsoft/hve-core/main/.github"
$dst = "$HOME\.copilot\installed-plugins\.github"
# fetch each file into the appropriate subdirectory of $dst
```

After this workaround:
- 69 prompts + 54 agents + 26 instructions resolve correctly
- A full ref-graph scan of 149 .md files returns **0 broken `#file:` references** (the only "missing" is `path/to/file.ext`, a placeholder string inside `diff-computation.instructions.md` documentation)
- Tested `ado-triage-work-items` end-to-end against a real Azure DevOps project: 9 work items audited successfully (recommendations applied, no fabrication)

## Related

- #785 — Frontmatter formatter error using hve-core agents in Copilot CLI (covers the agent-specific symptom; **this issue is the broader packaging gap that affects prompts + instructions too**, and explicitly contradicts #785's claim that "Commands, instructions, and skills use the same path-reference pattern and are handled correctly by the CLI")

## Environment

- OS: Windows 11
- Copilot CLI: v1.0.57
- Install method: `copilot plugin install hve-core@hve-core`
- Plugin version: `hve-core v3.3.101`

Contributor guide

Open the contributing guide

Research direction

Start at the packaging and install entry point that produces commands/, agents/, and skills/, then compare its output with .github/prompts/, .github/instructions/, and .github/agents/. Reproduce the install with the Copilot CLI and inspect the pointer paths; done means all referenced files are present and the listed #file: references resolve without the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, powershell
Domain
build-system, cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.