Skip to content

feat(agents): document plain-text path convention for .copilot-tracking artifacts#2147

Merged
WilliamBerryiii merged 12 commits into
microsoft:mainfrom
vdstrizhkova:feat/2018-standardize-subagent-file-references
Jun 27, 2026
Merged

feat(agents): document plain-text path convention for .copilot-tracking artifacts#2147
WilliamBerryiii merged 12 commits into
microsoft:mainfrom
vdstrizhkova:feat/2018-standardize-subagent-file-references

Conversation

@vdstrizhkova

Copy link
Copy Markdown
Contributor

Description

Establishes a formal convention for file references written by subagents into .copilot-tracking/ artifacts. The key principle: when agents cite workspace files in artifact content, use plain-text workspace-relative paths — no markdown links, no #file: directives, no backticks. This prevents VS Code from resolving the paths and flooding the Problems tab with missing-target errors.

The change introduces two complementary reference surfaces:

  • Surface A (artifact content): plain-text workspace-relative paths; external URLs may still use markdown links
  • Surface B (chat responses): markdown links per existing guidance, now with a boundary note clarifying the distinction

Changes

Subagent File Reference Formatting (8 files)

Added a new standardized ## File Reference Formatting section to:

  • .github/agents/hve-core/subagents/implementation-validator.agent.md
  • .github/agents/hve-core/subagents/phase-implementor.agent.md
  • .github/agents/hve-core/subagents/plan-validator.agent.md
  • .github/agents/hve-core/subagents/prompt-evaluator.agent.md
  • .github/agents/hve-core/subagents/prompt-tester.agent.md
  • .github/agents/hve-core/subagents/prompt-updater.agent.md
  • .github/agents/hve-core/subagents/rpi-validator.agent.md
  • .github/agents/hve-core/subagents/researcher-subagent.agent.md

Each section restates the plain-text path rule, provides two plain-text examples specific to the subagent's output artifact type, and notes that external URLs may still use markdown syntax.

Removed backticks from inline code examples in response-format pointer lines (e.g., "Re-read " instead of "Re-read <path>") to align with the plain-text convention when those pointers are emitted into artifact files.

Authoring Standard Update (1 file)

Updated .github/instructions/hve-core/prompt-builder.instructions.md to document the two-surface pattern explicitly:

  • Added a ## File Reference Formatting template row inside the Subagent Structural Template code block
  • Introduced a new ### Surface A: Artifact Content References subsection with the plain-text rule and examples
  • Added a boundary sentence to the User-Facing Responses section clarifying that markdown-link guidance applies to chat responses, while artifact content uses plain-text paths

Extended the Subagent Structural Template prose to explain when subagents should include the new File Reference Formatting section (paralleling the existing Required Protocol include/omit guidance).

Related Issue(s)

Closes #2018

Type of Change

  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot agent (.github/agents/*.agent.md)

Testing

Automated validation commands run during the implementation phase:

  • npm run lint:md — Passed (236 files scanned, 0 errors)
  • npm run lint:frontmatter — Passed (0 errors, 0 warnings)
  • npm run lint:ai-artifacts — Passed (70 files scanned, 0 issues)

No manual testing performed. All changes are documentation-only; no runtime or behavioral changes.

Checklist

Required Checks

  • Documentation is updated (if applicable) — Authoring standard updated
  • Files follow existing naming conventions — All agent and instruction files follow repo conventions
  • Changes are backwards compatible (if applicable) — Adds new optional sections; does not modify existing sections
  • Tests added for new functionality (if applicable) — Documentation-only; no tests required

AI Artifact Contributions

  • Used /prompt-analyze to review contribution — Subagents and instructions reviewed via task planning workflow
  • Addressed all feedback from prompt-builder review — Plan Validator findings resolved during planning phase
  • Verified contribution follows common standards and type-specific requirements — Frontmatter, markdown, writing style validated

Required Automated Checks

  • Markdown linting: npm run lint:md
  • Spell checking: npm run spell-check
  • Frontmatter validation: npm run lint:frontmatter
  • Skill structure validation: npm run validate:skills
  • Link validation: npm run lint:md-links
  • PowerShell analysis: npm run lint:ps
  • Plugin freshness: npm run plugin:generate
  • Docusaurus tests: npm run docs:test

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues — No new dependencies added
  • Security-related scripts follow the principle of least privilege — No security scripts modified

@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.36%. Comparing base (3af3352) to head (f376fea).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2147      +/-   ##
==========================================
+ Coverage   81.28%   81.36%   +0.07%     
==========================================
  Files         128      118      -10     
  Lines       18925    18849      -76     
  Branches       12        0      -12     
==========================================
- Hits        15384    15336      -48     
+ Misses       3538     3513      -25     
+ Partials        3        0       -3     
Flag Coverage Δ
docusaurus ?
pester 86.07% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdstrizhkova vdstrizhkova marked this pull request as ready for review June 23, 2026 06:35
@vdstrizhkova vdstrizhkova requested a review from a team as a code owner June 23, 2026 06:35

@katriendg katriendg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: Approve with comments — clean, well-scoped documentation change. All 8 subagents now carry the File Reference Formatting section and the backtick/link cleanup is consistent. A few items to resolve before merge, plus one completeness check against the linked issue.

1. Issue alignment — confirm AC2 & AC3 before auto-close. This PR Closes #2018, whose acceptance criteria include "read-only subagents use the compact pointer response format consistently" (AC2) and "write subagents use the structured template response format consistently" (AC3). The PR delivers the file-reference-formatting and plain-text-path criteria (AC1, AC4) and de-backticks the pointer lines, but I don't see active standardization of the response formats into those two categories. If they were already consistent pre-PR, great — could you note that so closing the issue is accurate? Otherwise consider deferring AC2/AC3 to a follow-up.

2. Markdown lint does not actually cover these files. Heads-up that the "npm run lint:md passed" evidence doesn't validate the changed files: .markdownlint-cli2.jsonc ignores .github/instructions/**, .github/agents/**, .github/prompts/**, and .github/skills/**. I ran markdownlint directly against the PR version and it reports MD004/ul-style violations (see inline). Worth fixing manually since CI won't catch them.

Remaining nits are inline. Nice cleanup overall — the chat-vs-artifact boundary note is a good addition.

Comment thread .github/instructions/hve-core/prompt-builder.instructions.md Outdated
Comment thread .github/instructions/hve-core/prompt-builder.instructions.md Outdated
Comment thread .github/agents/hve-core/subagents/phase-implementor.agent.md
Varvara Strizhkova and others added 4 commits June 23, 2026 12:08
…ubagent prompts

- replace em dashes with sentence breaks in File Reference Formatting sections
- convert dash bullets to asterisks for MD004 compliance
- label paired artifact and chat reference surfaces and add phase-implementor rationale

🔧 - Generated by Copilot
@WilliamBerryiii

Copy link
Copy Markdown
Member

Verified — thanks for the thorough review. Confirming for the record:

  • MD004 / Surface A-B / phase-implementor rationale (inline threads): all addressed in the current head. markdownlint run directly against all changed .md files reports 0 errors, and there are no remaining dash bullets. Resolving those threads.
  • AC2 (read-only -> compact pointer): the validators and researcher-subagent were already consistent; this PR also actively converted prompt-tester and prompt-evaluator from their old free-form requirement lists to the compact pointer format.
  • AC3 (write -> structured template): phase-implementor was the existing model and prompt-updater was converted to the full structured template to match.

So closing #2018 on merge is accurate. I verified the above, will resolve the threads and approve. Will just need a quick update with main (branch is currently behind) before merging.

@WilliamBerryiii

Copy link
Copy Markdown
Member

@vdstrizhkova - thanks for the help here ... mering it down!

@WilliamBerryiii WilliamBerryiii merged commit 3362577 into microsoft:main Jun 27, 2026
77 checks passed
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.

feat: standardize file reference formatting and response patterns across subagents

5 participants