Skip to content

Commit d360cd3

Browse files
algattikCopilot
andcommitted
fix(skills): bootstrap shared RPI tracking instructions
- provision the pinned hve-core tracking contract with the RPI skills - cover download and generated-artifact handling with contract tests 📝 - Generated by Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f7c52ba commit d360cd3

8 files changed

Lines changed: 48 additions & 17 deletions

File tree

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
],
7272
"ignorePaths": [
7373
".agent/reviews/**",
74+
".github/instructions/hve-core/copilot-tracking.instructions.md",
7475
"**/.github/chatmodes/**",
7576
"**/node_modules/**",
7677
"**/vscode-extension/**",

.github/copilot-instructions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,15 @@ The weekly `copilot-setup-steps.yml` cron and `Test-BinaryFreshness.ps1` weekly
334334

335335
The `Bootstrap hve-core RPI skills` step in `copilot-setup-steps.yml` runs **outside** the cloud-agent firewall and uses `gh skill install` to download the complete RPI skill suite from a pinned `microsoft/hve-core` commit into immediate subdirectories of `.github/skills/`.
336336

337-
The generated `.github/skills/rpi-*/` directories are gitignored and excluded from repository Markdown linting. The setup step names all eight allowed skill paths explicitly, pins every installation to the reviewed commit, and relies on the GitHub CLI to preserve each skill's references and templates and inject its source commit and tree metadata into `SKILL.md`. Bootstrap failure is fatal because no local fallback provides these workflows.
337+
The generated `.github/skills/rpi-*/` directories and `.github/instructions/hve-core/copilot-tracking.instructions.md` are gitignored and excluded from repository linting. The setup step names all eight allowed skill paths explicitly, pins every installation to the reviewed commit, and downloads the shared tracking instruction from the same commit.
338+
339+
The GitHub CLI preserves each skill's references and templates and injects its source commit and tree metadata into `SKILL.md`. Bootstrap failure is fatal because no local fallback provides these workflows.
338340

339341
The cloud agent discovers the `rpi-quick`, `rpi-research`, `rpi-plan`, `rpi-implement`, and `rpi-review` workflows directly from their `SKILL.md` files. The bootstrap also preserves `rpi-challenger`, `rpi-plan-critique`, `rpi-walkthrough`, and every bundled reference and template.
340342

341343
The current immutable commit predates a published hve-core release containing the skill-forward layout. Prefer a released commit on upgrades; when none exists, review the complete upstream commit and tree before changing `RPI_SKILLS_REF`.
342344

343-
Before starting RPI work, verify each required `.github/skills/rpi-*/SKILL.md` exists and its `metadata.github-pinned` value matches `RPI_SKILLS_REF`; otherwise stop with a bootstrap failure. Treat `.copilot-tracking/` files as session scratch because the directory is gitignored.
345+
Before starting RPI work, verify each required `.github/skills/rpi-*/SKILL.md` exists, its `metadata.github-pinned` value matches `RPI_SKILLS_REF`, and `.github/instructions/hve-core/copilot-tracking.instructions.md` exists; otherwise stop with a bootstrap failure. The generated instruction is the source of truth for `.copilot-tracking/` artifact paths, evidence ownership, IDs, formatting, and handoffs.
344346

345347
In cloud-agent PR work, persist each completed RPI phase as a PR comment and maintain an `RPI Artifact Index` in the PR description with the phase comment links and resolved upstream SHA. If PR write tools are unavailable, include the complete phase artifacts in the final response rather than claiming durable persistence.
346348

.github/workflows/copilot-setup-steps.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,10 @@ jobs:
150150
--dir .github/skills \
151151
--force
152152
done
153+
154+
tracking_instruction=".github/instructions/hve-core/copilot-tracking.instructions.md"
155+
mkdir -p "$(dirname "$tracking_instruction")"
156+
gh api \
157+
"repos/microsoft/hve-core/contents/.github/instructions/hve-core/copilot-tracking.instructions.md?ref=$RPI_SKILLS_REF" \
158+
--header "Accept: application/vnd.github.raw+json" \
159+
> "$tracking_instruction"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ venv/
465465
**/out/*
466466
.agent/
467467
.copilot-tracking/
468+
.github/instructions/hve-core/copilot-tracking.instructions.md
468469
.github/skills/rpi-*/
469470

470471
# Environment-specific deployment artifacts

.markdownlint-cli2.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"**/node_modules/**",
44
".agent/reviews/**",
55
".copilot-tracking/**",
6+
".github/instructions/hve-core/copilot-tracking.instructions.md",
67
".github/skills/rpi-*/**",
78
"venv/**",
89
".venv/**",

docs/contributing/architecture.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,12 @@ HVE-Core artifacts are registered via the extension's `package.json` `contribute
387387

388388
This repository defines project-specific artifacts in `.github/` that extend HVE-Core with domain knowledge:
389389

390-
| Artifact Type | Count | Purpose |
391-
|---------------|-------|----------------------------------------------------------------------------------|
392-
| Agents | 2 | OSMO training manager, dataviewer developer |
393-
| Instructions | 4 | Copilot instructions, dataviewer conventions, documentation style, shell scripts |
394-
| Prompts | 4 | OSMO training submission, LeRobot pipeline, dataviewer workflows |
395-
| Skills | 15 | Seven committed domain skills and eight runtime-provisioned RPI skills |
390+
| Artifact Type | Count | Purpose |
391+
|---------------|-------|------------------------------------------------------------------------------|
392+
| Agents | 2 | OSMO training manager, dataviewer developer |
393+
| Instructions | 5 | Four committed instructions and runtime-provisioned RPI tracking conventions |
394+
| Prompts | 4 | OSMO training submission, LeRobot pipeline, dataviewer workflows |
395+
| Skills | 15 | Seven committed domain skills and eight runtime-provisioned RPI skills |
396396

397397
Project artifacts are auto-discovered by VS Code from the `.github/` directory without explicit registration.
398398

docs/reference/copilot-artifacts.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The cloud-agent setup workflow provisions the RPI skill suite at runtime.
2929
| Instruction | Commit Messages | Conventional Commits format for all commit messages | `.github/instructions/commit-message.instructions.md` |
3030
| Instruction | Dataviewer | Coding standards for dataviewer development | `.github/instructions/dataviewer.instructions.md` |
3131
| Instruction | Docs Style and Conventions | Writing standards for all markdown files | `.github/instructions/docs-style-and-conventions.instructions.md` |
32+
| Instruction | RPI Tracking | Shared RPI working-artifact conventions | `.github/instructions/hve-core/copilot-tracking.instructions.md` |
3233
| Instruction | Shell Scripts | Implementation standards for bash scripts | `.github/instructions/shell-scripts.instructions.md` |
3334
| Prompt | `/chatlog` | Create and maintain conversation logs | `.github/prompts/chatlog.prompt.md` |
3435
| Prompt | `/check-training-status` | Monitor OSMO training job progress | `.github/prompts/check-training-status.prompt.md` |
@@ -139,13 +140,9 @@ discovery (frontmatter only) → instructions (SKILL.md body) → resources
139140

140141
### rpi-* skill suite
141142

142-
The cloud-agent setup workflow uses `gh skill install` to download eight
143-
explicit RPI skill paths from a pinned `microsoft/hve-core` commit into
144-
gitignored `.github/skills/rpi-*/` directories. Each skill is an immediate
145-
child of `.github/skills/`, as required for discovery. Local clones do not
146-
contain these skills unless the setup workflow has provisioned them. Each skill
147-
retains its upstream references and templates, and the GitHub CLI injects the
148-
source commit and tree metadata into its `SKILL.md` front matter.
143+
The cloud-agent setup workflow uses `gh skill install` to download eight explicit RPI skill paths from a pinned `microsoft/hve-core` commit into gitignored `.github/skills/rpi-*/` directories. It also downloads the shared `copilot-tracking.instructions.md` from the same commit into `.github/instructions/hve-core/`.
144+
145+
Each skill is an immediate child of `.github/skills/`, as required for discovery. Local clones do not contain these runtime artifacts unless the setup workflow has provisioned them. Each skill retains its upstream references and templates, and the GitHub CLI injects the source commit and tree metadata into its `SKILL.md` front matter.
149146

150147
| Skill | Purpose |
151148
|---------------------|-----------------------------------------------------|

scripts/tests/security/Test-HveCoreFreshness.Tests.ps1

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,40 @@ Describe 'RPI bootstrap workflow contract' -Tag 'Contract' {
158158
$declaredSkills | Should -Be $script:RequiredRpiSkills
159159
}
160160

161+
It 'Downloads the shared tracking instruction from the reviewed commit' {
162+
$script:RpiStep.run | Should -Match (
163+
'tracking_instruction="\.github/instructions/hve-core/copilot-tracking\.instructions\.md"'
164+
)
165+
$script:RpiStep.run | Should -Match 'gh api'
166+
$script:RpiStep.run | Should -Match (
167+
'copilot-tracking\.instructions\.md\?ref=\$RPI_SKILLS_REF'
168+
)
169+
$script:RpiStep.run | Should -Match (
170+
'--header "Accept: application/vnd\.github\.raw\+json"'
171+
)
172+
$script:RpiStep.run | Should -Match '> "\$tracking_instruction"'
173+
}
174+
161175
It 'Runs last and fails the setup workflow on installation errors' {
162176
$steps = @($script:CheckedInWorkflow.jobs.'copilot-setup-steps'.steps)
163177

164178
$steps[-1].name | Should -Be 'Bootstrap hve-core RPI skills'
165179
$script:RpiStep.PSObject.Properties.Name | Should -Not -Contain 'continue-on-error'
166180
}
167181

168-
It 'Keeps the generated skills gitignored and untracked' {
182+
It 'Keeps the generated RPI artifacts ignored and untracked' {
169183
$gitignore = Get-Content -Path (Join-Path $script:RepoRoot '.gitignore') -Raw
170-
$trackedFiles = @(git -C $script:RepoRoot ls-files -- '.github/skills/rpi-*')
184+
$markdownlintConfig = Get-Content -Path (Join-Path $script:RepoRoot '.markdownlint-cli2.jsonc') -Raw
185+
$cspellConfig = Get-Content -Path (Join-Path $script:RepoRoot '.cspell.json') -Raw
186+
$trackingInstruction = '.github/instructions/hve-core/copilot-tracking.instructions.md'
187+
$trackedFiles = @(git -C $script:RepoRoot ls-files -- '.github/skills/rpi-*' $trackingInstruction)
171188

172189
$gitignore | Should -Match '(?m)^\.github/skills/rpi-\*/$'
190+
$gitignore | Should -Match (
191+
'(?m)^\.github/instructions/hve-core/copilot-tracking\.instructions\.md$'
192+
)
193+
$markdownlintConfig | Should -Match ([regex]::Escape($trackingInstruction))
194+
$cspellConfig | Should -Match ([regex]::Escape($trackingInstruction))
173195
$trackedFiles | Should -BeNullOrEmpty
174196
}
175197
}

0 commit comments

Comments
 (0)