Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions .github/agents/pr-review.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ All PR review tracking artifacts reside in `.copilot-tracking/pr/review/{{normal
review/
{{normalized_branch_name}}/
in-progress-review.md # Living PR review document
pr-reference.xml # Generated via scripts/dev-tools/pr-ref-gen.sh
pr-reference.xml # Generated via pr-ref-gen.sh (see script location in Phase 1)
handoff.md # Finalized PR comments and decisions
```

Expand Down Expand Up @@ -148,7 +148,7 @@ Repeat phases as needed when new information or user direction warrants deeper a

### Phase 1: Initialize Review

Key tools: `git`, `scripts/dev-tools/pr-ref-gen.sh`, workspace file operations
Key tools: `git`, `pr-ref-gen.sh` (with fallback resolution), workspace file operations

#### Step 1: Normalize Branch Name

Expand All @@ -160,7 +160,33 @@ Create the PR tracking directory `.copilot-tracking/pr/review/{{normalized_branc

#### Step 3: Generate PR Reference

Generate `pr-reference.xml` using `./scripts/dev-tools/pr-ref-gen.sh --output "{{tracking_directory}}/pr-reference.xml"`. Pass additional flags such as `--base` when the user specifies one.
Locate and execute the PR reference script using environment-specific fallback patterns.

**For Unix-like shells (bash/zsh)**:

```bash
# Try local first, then extension
SCRIPT_PATH="./scripts/dev-tools/pr-ref-gen.sh"
if [ ! -f "$SCRIPT_PATH" ]; then
SCRIPT_PATH=$(find ~/.vscode*/extensions -name "pr-ref-gen.sh" 2>/dev/null | head -1)
fi

Comment thread
katriendg marked this conversation as resolved.
"$SCRIPT_PATH" --output "{{tracking_directory}}/pr-reference.xml"

Copilot AI Feb 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{tracking_directory}} is used as an output path placeholder here, but it is not defined anywhere else in the agent. Use the explicit tracking path (e.g., .copilot-tracking/pr/review/{{normalized_branch_name}}) or define tracking_directory earlier so this command resolves deterministically.

Suggested change
"$SCRIPT_PATH" --output "{{tracking_directory}}/pr-reference.xml"
"$SCRIPT_PATH" --output ".copilot-tracking/pr/review/{{normalized_branch_name}}/pr-reference.xml"

Copilot uses AI. Check for mistakes.
```

**For Windows PowerShell**:

```powershell
# Try local first, then extension
$ScriptPath = "./scripts/dev-tools/Generate-PrReference.ps1"
if (-not (Test-Path $ScriptPath)) {
$ScriptPath = Get-ChildItem -Path "$HOME/.vscode*/extensions" -Filter "Generate-PrReference.ps1" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
}

pwsh -File $ScriptPath -Output "{{tracking_directory}}/pr-reference.xml"
Comment thread
katriendg marked this conversation as resolved.
Outdated
```

Pass additional flags such as `--base` (bash) or `-BaseBranch` (PowerShell) when the user specifies one.
Comment thread
WilliamBerryiii marked this conversation as resolved.
Outdated

#### Step 4: Seed Tracking Document

Expand Down
28 changes: 27 additions & 1 deletion .github/instructions/ado-create-pull-request.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,32 @@ Git operations via `run_in_terminal`:

Workspace utilities: `list_dir`, `read_file`, `grep_search`

**Script path resolution**: Use environment-specific fallback patterns.

Copilot AI Feb 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file now introduces script fallback resolution below, but the earlier Tooling bullets still instruct running scripts/dev-tools/pr-ref-gen.sh ... directly. To avoid conflicting guidance, update the Tooling bullet list to reference the new script path resolution (or remove the direct-path bullet).

Suggested change
**Script path resolution**: Use environment-specific fallback patterns.
**Script path resolution**: Use environment-specific fallback patterns instead of hardcoding `scripts/dev-tools/pr-ref-gen.sh`. If earlier instructions mention running `scripts/dev-tools/pr-ref-gen.sh` directly, treat this section as the authoritative guidance and use the resolved `SCRIPT_PATH` variable instead.

Copilot uses AI. Check for mistakes.

**For Unix-like shells (bash/zsh)**:

```bash
# Try local first, then extension
SCRIPT_PATH="./scripts/dev-tools/pr-ref-gen.sh"
if [ ! -f "$SCRIPT_PATH" ]; then
SCRIPT_PATH=$(find ~/.vscode*/extensions -name "pr-ref-gen.sh" 2>/dev/null | head -1)
fi

"$SCRIPT_PATH" --base-branch origin/main --output pr-reference.xml
```
Comment thread
katriendg marked this conversation as resolved.

**For Windows PowerShell**:

```powershell
# Try local first, then extension
$ScriptPath = "./scripts/dev-tools/Generate-PrReference.ps1"
if (-not (Test-Path $ScriptPath)) {
$ScriptPath = Get-ChildItem -Path "$HOME/.vscode*/extensions" -Filter "Generate-PrReference.ps1" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
}

pwsh -File $ScriptPath -BaseBranch origin/main -Output pr-reference.xml
Comment thread
katriendg marked this conversation as resolved.
Outdated
```

Persist all tool output into planning files per ado-wit-planning.instructions.md.

## Tracking Directory Structure
Expand Down Expand Up @@ -367,7 +393,7 @@ Execute without presenting details to user:
3. Initialize `planning-log.md` with Phase-1 status.
4. Check if `pr-reference.xml` exists:
* If exists: Use existing file silently.
* If not exists: Generate using `scripts/dev-tools/pr-ref-gen.sh` with optional `--no-md-diff` flag if `${input:includeMarkdown}` is false.
* If not exists: Generate using script path resolution with fallback patterns (see Tooling section) with optional `--no-md-diff` flag if `${input:includeMarkdown}` is false.
5. Read complete `pr-reference.xml`. For files exceeding 2000 lines, read in 1000-2000 line chunks, capturing complete commit boundaries before advancing to the next chunk.
6. Log artifact in `planning-log.md` with status `Complete`.

Expand Down
26 changes: 25 additions & 1 deletion .github/instructions/ado-wit-discovery.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,32 @@ Add an **External References** section to work item descriptions when authoritat

**Git context** (when `${input:includeBranchChanges}` is `true` and no documents exist):

* `run_in_terminal`: Generate diff XML via `scripts/dev-tools/pr-ref-gen.sh --base-branch "${input:baseBranch}" --output "<planning-folder>/git-branch-diff.xml"`
* Sync remote first: `git fetch <remote> <branch> --prune`
* `run_in_terminal`: Generate diff XML using environment-specific fallback patterns:

**For Unix-like shells (bash/zsh)**:

```bash
# Try local first, then extension
SCRIPT_PATH="./scripts/dev-tools/pr-ref-gen.sh"
if [ ! -f "$SCRIPT_PATH" ]; then
SCRIPT_PATH=$(find ~/.vscode*/extensions -name "pr-ref-gen.sh" 2>/dev/null | head -1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly the user could have installed this as a cloned repo (somewhere) on their computer, or a submodule, etc. I think I have a for this but it might seem a little weird.

I'll post a PR with the change here in a moment but it will basically take advantage of how instruction files and their descriptions are added to the system message for all conversations. Since any custom agent or prompt that needs to reference anything out of hve-core, will have this problem.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR #402 may help us address the fallback correctly in case of any installation method, including Extension. We do however still need to validate the extension file path resolution works because we risk your newest instruction to also not even load if loaded through Windows/WSL install mode.

I will do a new dedicated PR for Extension to be set as extensionKind: "workspace" and changes that affect the Extension only, as I believe we still need this to be fixed.

fi

Comment thread
katriendg marked this conversation as resolved.
"$SCRIPT_PATH" --base-branch "${input:baseBranch}" --output "<planning-folder>/git-branch-diff.xml"
```

**For Windows PowerShell**:

```powershell
# Try local first, then extension
$ScriptPath = "./scripts/dev-tools/Generate-PrReference.ps1"
if (-not (Test-Path $ScriptPath)) {
$ScriptPath = Get-ChildItem -Path "$HOME/.vscode*/extensions" -Filter "Generate-PrReference.ps1" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
}

pwsh -File $ScriptPath -BaseBranch "${input:baseBranch}" -Output "<planning-folder>/git-branch-diff.xml"
Comment thread
katriendg marked this conversation as resolved.
Outdated
```

**Workspace utilities**: `list_dir`, `read_file`, `grep_search` for artifact location.

Expand Down
1 change: 1 addition & 0 deletions extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "hve-core",
"displayName": "HVE Core",
"extensionKind": ["workspace", "ui"],
"version": "2.0.1",
"description": "AI-powered chat agents, prompts, and instructions for hybrid virtual environments",
"publisher": "ise-hve-essentials",
Expand Down
Loading