fix(agents): fix plugin compatibility and robustness for coding-standards code review agents#1289
fix(agents): fix plugin compatibility and robustness for coding-standards code review agents#1289erikschlegel wants to merge 5 commits intomicrosoft:mainfrom
Conversation
…tep 4 The #file: reference was missing the coding-standards/ segment, pointing to instructions/code-review/ instead of instructions/coding-standards/code-review/.
…lution - Convert docs/templates references from relative paths to workspace-root prose pattern (matching adr-creation, brd-builder, system-architecture- reviewer convention) — ensures resolution works in both repo and plugin contexts where .github/ prefix stripping shifts relative depth - Fix Step 3b skill catalog path: try .github/skills/ first, fall back to skills/ for plugin/extension compatibility - Fix Step 3c skill discovery scope: search .github/skills/ if exists, otherwise skills/ — ensures consumer skill discovery works in plugin - Add pr-reference skill to coding-standards collection so diff-computation scripts are available to coding-standards-only plugin users - Delete orphaned foundational-coding-guidelines.md from python-foundational references/ (duplicate of design-principles.md; not in SKILL.md table)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1289 +/- ##
==========================================
- Coverage 87.72% 87.71% -0.02%
==========================================
Files 61 61
Lines 9320 9320
==========================================
- Hits 8176 8175 -1
- Misses 1144 1145 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
code-review-full: - Document disable-model-invocation / Step 4 interaction; add verbatim fallback with warning when transformation rules cannot be applied - Replace vague 'instruct it to skip' with prescribed skip phrases for both subagent invocations so skip behavior is deterministic - Define fallback sources for standards-exclusive report sections (metadata description, Recommended Actions, Risk Assessment) when the standards subagent is skipped - Add Error Recovery section covering diff failure, subagent failure, malformed output, persistence failure, and clarifying-question deadlock code-review-standards: - Change template references from passive 'Follow' to active 'Read and use' with missing-file recovery language for consumer workspaces where docs/ may be absent
…pr-reference skill
katriendg
left a comment
There was a problem hiding this comment.
Thanks for these updates, I left a few comments if we can still finetune the skills discovery to be left over at the platform level and not file location (which is how we expect this should work). Wdyt?
Note in the issue comment you mention you deleted the orphaned file but I don't seen any deletionn?
…Steps 3b and 3c Replace path-based skill resolution with platform-discoverable skill matching to ensure portability across repo, extension, and plugin install contexts.
This was related to a PR fix that was merged yesterday |
|
Good call @katriendg - I implemented your suggestions from the last review. LMK if those look good? |
Related Issue(s)
Fixes #1286
Description
These changes were discovered while testing the
Code Review StandardsandCode Review Fullagents from the Coding Standards Plugin installation in VS Code. The plugin install surface exposed three categories of silent failure invisible when running the agents directly from the plugin.Three commits fix path resolution failures, reference correctness, and agent robustness.
Commit 1 — correct
review-artifactspath in Step 4The
#file:reference incode-review-standards.agent.mdStep 4 pointed to../../instructions/code-review/review-artifacts.instructions.md, missing thecoding-standards/path segment. Corrected to../../instructions/coding-standards/code-review/review-artifacts.instructions.md.Commit 2 — fix plugin compatibility for coding-standards skill resolution
The plugin generator strips the
.github/prefix from all artifact paths. An agent at.github/agents/coding-standards/(3 levels deep in the repo) becomesagents/coding-standards/(2 levels deep in the plugin), breaking any reference that assumed.github/depth.docs/templates/relative links escape the plugin root.#file:../../../docs/templates/worked in the repo but escaped the plugin root entirely. Converted to workspace-root prose (at `docs/templates/file.md`), consistent withadr-creation,brd-builder, andsystem-architecture-reviewer.Skill loading failed entirely in plugin context.
Steps 3b and 3c assumed
.github/skills/prefix. Skills live underskills/in the plugin. Both steps now use a dual path fallback: try.github/skills/...first, fall back toskills/....pr-referenceskill missing from thecoding-standardscollection.The diff computation protocol relies on scripts in
pr-reference, absent fromcoding-standards.collection.yml. Added so diff computation works for coding-standards-only plugin users.Commit 3 — improve robustness of code review agents
code-review-full.agent.md:disable-model-invocation/ Step 4 interaction: manual invocation retains full model reasoning; added verbatim-output fallback with⚠️warning when transformation rules cannot be applied## Error Recoverysection covering diff failure, subagent failure, malformed output, persistence failure, and clarifying-question deadlockcode-review-standards.agent.md:docs/may be absentRelated Issue(s)
Fixes #
Type of Change
Code & Documentation:
AI Artifacts:
.github/agents/*.agent.md).github/skills/*/SKILL.md)Sample Prompts (for AI Artifact Contributions)
User Request:
Execution Flow:
pr-referencescripts (now packaged in the collection)python-foundationalSKILL.md from.github/skills/...(repo) orskills/...(plugin).github/skills/orskills/depending on contextdocs/templates/standards-review-output-format.md; recovers gracefully if absentreview-artifacts.instructions.mdpathSuccess Indicators:
Skills are loaded and cited in findings. Report template is read from disk. Behavior is identical from repo or plugin install. No "skill unavailable" warnings for
python-foundational.Testing
greppr-referencesymlink atplugins/coding-standards/skills/shared/pr-referencenpm run plugin:generate,plugin:validate,lint:md, andlint:frontmatter— all passed with 0 errorsChecklist
Required Checks