Skip to content

[WIP] Fix hardcoded workspace-root paths in AI artifacts - #745

Closed
katriendg with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-hardcoded-paths-in-artifacts
Closed

[WIP] Fix hardcoded workspace-root paths in AI artifacts#745
katriendg with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-hardcoded-paths-in-artifacts

Conversation

Copilot AI commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>fix: Distributed AI artifacts reference hardcoded workspace-root paths that break in extension and peer-clone installs</issue_title>
<issue_description>## Summary

Multiple AI artifacts (agents, instructions, prompts) contain hardcoded workspace-root-relative paths in their prose body text — paths like .github/instructions/design-thinking/dt-coaching-identity.instructions.md. These paths assume the hve-core repository IS the workspace root.

When artifacts are loaded from a VS Code extension install path (~/.vscode-server-insiders/data/User/globalStorage/ise-hve-essentials.hve-core/.github/...), a peer clone (../hve-core/.github/...), or any non-workspace-root installation, the AI follows these literal paths and fails to find the referenced files. The hve-core-location.instructions.md fallback guidance exists but is not reliably followed by the AI when a literal path is present.

Note: docs/templates/ are correctly packaged in the VSIX extension. References to those files using file-relative paths (e.g., ../../docs/templates/brd-template.md) resolve correctly and do not need changes (both in extension packaging and plugin folder distribution).

Problem

Artifacts instruct the AI to read or reference files using paths anchored at the workspace root:

Read `.github/instructions/design-thinking/dt-coaching-identity.instructions.md`

When installed via extension, the file's actual disk location is something like:

/home/user/.vscode-server-insiders/data/User/globalStorage/ise-hve-essentials.hve-core/.github/agents/design-thinking/dt-coach.agent.md

The AI resolves .github/instructions/... relative to the workspace root, not to the artifact's location on disk, so the file is not found.

Affected Files

These files contain workspace-root-anchored paths in prose (e.g., .github/instructions/...) rather than file-relative paths. Files using correct relative paths like ../../docs/templates/... or ../../instructions/... are not affected.

File Path References
.github/agents/design-thinking/dt-coach.agent.md 4 paths to .github/instructions/design-thinking/dt-*.instructions.md
.github/agents/hve-core/doc-ops.agent.md 3 paths to .github/instructions/hve-core/*.instructions.md
.github/agents/hve-core/rpi-agent.agent.md .github/copilot-instructions.md, .github/instructions/, .github/agents/**/researcher-subagent.agent.md
.github/instructions/hve-core/prompt-builder.instructions.md Multiple .github/agents/, .github/skills/ structure references
.github/instructions/hve-core/commit-message.instructions.md .github/agents/, .github/prompts/, etc. as scope prefixes
.github/instructions/github/community-interaction.instructions.md CONTRIBUTING.md, GOVERNANCE.md, CODE_OF_CONDUCT.md via ../../../
.github/copilot-instructions.md Multiple .github/ structure references in Project Structure section

Proposed Solution

Replace prose paths with #file: directives. VS Code resolves #file: relative to the file's disk location, so the reference works regardless of installation method. Convert:

<!-- Before -->
Read `.github/instructions/design-thinking/dt-coaching-identity.instructions.md`
<!-- After -->
Read #file:../../instructions/design-thinking/dt-coaching-identity.instructions.md

Related Issues

Acceptance Criteria

  • No AI artifact in a distributed collection uses a hardcoded workspace-root .github/ path in prose text where the AI is expected to resolve it as a file reference
  • All file references use file-relative paths (resolving from the artifact's own disk location) or are converted to descriptive text
  • hve-core-location.instructions.md is evaluated for strengthening or replacement</issue_description>

<agent_instructions>Implement the changes, ensure to run a validation step where you verify all updated links are resolvable by relative (up the tree) paths.
DO NOT update anything in .github/instructions/github/community-interaction.instructions.md file - we will add a note to the issue on separate discussion for this one.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@katriendg

Copy link
Copy Markdown
Contributor

@copilot try again, just read the issue details #741 - summarize the issue before doing the work @copilot

@katriendg

Copy link
Copy Markdown
Contributor

Not fixed, closing

@katriendg katriendg closed this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Distributed AI artifacts reference hardcoded workspace-root paths that break in extension and peer-clone installs

2 participants