Skip to content

feat: add Copilot agentic workflows and harness engineering improvements#35929

Draft
tudorpopams wants to merge 12 commits intomicrosoft:masterfrom
tudorpopams:feat/copilot-agents
Draft

feat: add Copilot agentic workflows and harness engineering improvements#35929
tudorpopams wants to merge 12 commits intomicrosoft:masterfrom
tudorpopams:feat/copilot-agents

Conversation

@tudorpopams
Copy link
Copy Markdown
Contributor

@tudorpopams tudorpopams commented Mar 30, 2026

Summary

The main goal for this PR is to enable GitHub Agentic Workflows within the repo and implement Harness engineering best practices.

  • Add five GitHub Agentic Workflows for automated issue triage, bug fixing, PR review, documentation auditing, and agent skills improvement
  • Restructure agent instructions following harness engineering best practices: progressive disclosure via AGENTS.md as a map, detailed docs in docs/
  • Add CLAUDE.md symlinked to AGENTS.md for cross-tool compatibility
  • Improve ESLint rule error messages with doc URLs and fix instructions so AI agents can self-correct on failure

What's included

Agentic Workflows (.github/workflows/agent-*.md)

Workflow Trigger Purpose
agent-triage Issue opened/reopened Classify, label, validate incoming issues
agent-fix agent:fix label added Implement bug fixes and open PRs
agent-review PR opened/updated Devil's advocate review with confidence scoring
agent-docs-grooming Weekly (Monday) Documentation staleness audit
agent-skills-improvement Weekly (Friday) Analyze agent PRs and improve instructions

Harness Engineering (docs/ restructure)

  • AGENTS.md slimmed to ~60 lines as a pointer-only map
  • .github/instructions/copilot.instructions.md reduced from 473 to ~50 lines
  • Detailed guidance moved to:
    • docs/architecture/component-patterns.md — v9 hooks, slots, Griffel
    • docs/architecture/design-tokens.md — token categories and usage
    • docs/architecture/layers.md — package dependency tiers
    • docs/workflows/contributing.md — PR checklist and commands
    • docs/workflows/testing.md — test types and SSR safety
    • docs/team-routing.md — teams, labels, CODEOWNERS
    • docs/quality-grades.md — per-package quality tracking
    • docs/tech-debt-tracker.md — known debt items for agents

ESLint Error Message Improvements

Updated 5 existing rules (ban-context-export, ban-instanceof-html-element, no-global-react, no-restricted-imports, no-context-default-value) to
include fix instructions and docs/ references in error messages.

Test plan

  • Enable Copilot coding agent on the fork
  • Set GH_AW_AGENT_TOKEN secret (fine-grained PAT)
  • Open a test issue and verify agent-triage workflow runs
  • Add agent:fix label to an issue and verify agent-fix workflow runs
  • Verify agent-review triggers on agent-created PRs
  • Manually trigger agent-docs-grooming and agent-skills-improvement via gh aw run
  • Verify ESLint rules produce updated error messages with doc URLs

tudorpopams and others added 6 commits March 30, 2026 18:20
…, docs, and skills improvement

Adds five custom Copilot agent profiles (.github/agents/*.agent.md) for:
- triage: classify, label, and route incoming issues
- fix: implement bug fixes and open PRs
- devils-advocate: critically review PRs with confidence scoring
- docs-groomer: audit documentation for staleness and gaps
- skills-improver: analyze agent performance and improve instructions

Also adds global copilot-instructions.md and issue templates for periodic
docs audits and skills reviews.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… skills

Adds five agentic workflows (.md + compiled .lock.yml):
- agent-triage: classifies, labels, and validates incoming issues
- agent-fix: implements bug fixes and opens PRs (triggered by agent:fix label)
- agent-review: devil's advocate review with confidence scoring for agent PRs
- agent-docs-grooming: weekly documentation audit
- agent-skills-improvement: weekly analysis of agent PRs to improve instructions

Also includes gh-aw init scaffolding (agentic-workflows agent, .gitattributes).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These are superseded by the agentic workflows (agent-*.md + .lock.yml).
Keeps copilot-instructions.md as global context for all Copilot agents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merges global agent context (from .github/copilot-instructions.md) into
AGENTS.md alongside the existing Nx guidelines. CLAUDE.md is a symlink
to AGENTS.md so both Claude Code and Copilot read the same instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Applies progressive disclosure, mechanical enforcement, and feedback loop
patterns from OpenAI's harness engineering approach.

1. Progressive disclosure: Slim down copilot.instructions.md (473→50 lines)
   and AGENTS.md into pointer-only maps. Detailed docs moved to docs/:
   - docs/architecture/component-patterns.md (v9 hooks, slots, Griffel)
   - docs/architecture/design-tokens.md (token categories and usage)
   - docs/architecture/layers.md (package dependency tiers)
   - docs/workflows/contributing.md (PR checklist, commands)
   - docs/workflows/testing.md (test types, SSR safety)
   - docs/team-routing.md (teams, labels, CODEOWNERS)

2. Agent-guiding error messages: Updated all custom ESLint rules to include
   doc URLs and fix instructions in error messages so agents self-correct.

3. New ESLint rule: @fluentui/no-hardcoded-style-values — flags hardcoded
   colors and spacing in .styles.ts files, requiring design tokens.

4. Structural validation: check-v9-structure.js validates that component
   packages follow the canonical file structure.

5. Layer boundary validation: check-layer-boundaries.js validates that
   component packages (Tier 3) don't depend on other component packages.

6. Quality tracking: docs/quality-grades.md and docs/tech-debt-tracker.md
   for agents and engineers to track package quality and debt.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removes no-hardcoded-style-values ESLint rule, check-layer-boundaries.js,
and check-v9-structure.js as requested.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the CI label Mar 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@@ -3,3 +3,5 @@

Copy link
Copy Markdown

@github-actions github-actions bot Mar 30, 2026

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Charts-DonutChart 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 7530 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 5570 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 605 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 748 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 183 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 31 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 45 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 31 Changed
vr-tests-web-components/Accordion 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Accordion. - Dark Mode.normal.chromium_1.png 3154 Changed
vr-tests-web-components/Avatar 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Avatar. - Dark Mode.normal.chromium_1.png 298 Changed
vr-tests/Callout 7 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Callout.Bottom left edge - RTL.default.chromium.png 2199 Changed
vr-tests/Callout.Bottom right edge - RTL.default.chromium.png 1124 Changed
vr-tests/Callout.Rendering callout attached to a rectangle.default.chromium.png 1835 Changed
vr-tests/Callout.Bottom right edge.default.chromium.png 1130 Changed
vr-tests/Callout.Left bottom edge.default.chromium.png 3182 Changed
vr-tests/Callout.Right bottom edge.default.chromium.png 3095 Changed
vr-tests/Callout.Right center.default.chromium.png 2117 Changed
vr-tests/Coachmark 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Coachmark.Collapsed.default.chromium.png 159 Changed
vr-tests/Keytip 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Keytip.Offset.default.chromium.png 86 Changed
vr-tests/react-charting-MultiStackBarChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-MultiStackBarChart.Basic_Absolute - Dark Mode.default.chromium.png 363 Changed

tudorpopams and others added 6 commits March 31, 2026 12:38
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Applies findings from "Increasing AI coding success to 99%" article:
- Add "instructions are source of truth, not existing code" as first line
- Add critical rules as negative constraints ("Never X") in always-loaded context
- Add concrete v9 component code template to override training defaults
- Add legacy anti-patterns section warning about v8 code agents will find
- Add exploration guidance for the large monorepo
- Reframe positive guidance as negative constraints for higher compliance

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant