Skip to content

Improve Agent Syncs between Github Copilot/Cursor/Claude Code#16962

Merged
QilongTang merged 6 commits into
masterfrom
ImproveAgentSync
Mar 13, 2026
Merged

Improve Agent Syncs between Github Copilot/Cursor/Claude Code#16962
QilongTang merged 6 commits into
masterfrom
ImproveAgentSync

Conversation

@QilongTang

@QilongTang QilongTang commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Purpose

Improve cross-tool agent skill consistency by making .agents/ canonical, generating thin Copilot wrappers from canonical skills, and enforcing drift checks in CI.

Key changes:

  • Added canonical policy, wrapper sync commands, and cross-tool parity matrix to agent guidance.
  • Updated PR/Jira skill docs to remove ambiguity and centralize Jira template usage.
  • Added generated wrapper files for onboarding, PR description, and Jira ticket skills.
  • Added tools/agents/sync-agent-wrappers.ps1 to generate and validate wrappers.
  • Added CI workflow as Github Action to run wrapper sync checks on pull requests.
  • Added orphan generated-wrapper detection and optional -VerboseReport diagnostics in check mode.
  • Added auto-generated warning banners to generated wrapper files.
  • Added a Dynamo Skill Writer agent to help align agent skill format and syncing

Declarations

Check these if you believe they are true

Release Notes

N/A

Reviewers

@DynamoDS/eidos

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

Comment on lines +13 to +21
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate generated wrappers
shell: pwsh
run: ./tools/agents/sync-agent-wrappers.ps1 -Check

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 4 months ago

In general, the fix is to explicitly restrict the GITHUB_TOKEN permissions for this workflow to the minimum it needs. This job only checks out the repository and runs a local script, so it only requires read access to repository contents. We should therefore add a permissions block specifying contents: read.

The best way to fix this without changing functionality is to add a workflow-level permissions block near the top (after name: and/or on:) or a job-level block under validate-agent-wrappers:. A workflow-level block is more future-proof if more jobs are added later that have similar needs; if a future job needs additional privileges, it can override permissions at the job level. For this specific file, we will add:

permissions:
  contents: read

at the root level, between the on: section and jobs:. No imports or extra methods are needed since this is a YAML workflow configuration only.

Suggested changeset 1
.github/workflows/agent_wrapper_sync_check.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/agent_wrapper_sync_check.yml b/.github/workflows/agent_wrapper_sync_check.yml
--- a/.github/workflows/agent_wrapper_sync_check.yml
+++ b/.github/workflows/agent_wrapper_sync_check.yml
@@ -8,6 +8,9 @@
       - 'tools/agents/**'
   workflow_dispatch:
 
+permissions:
+  contents: read
+
 jobs:
   validate-agent-wrappers:
     runs-on: windows-latest
EOF
@@ -8,6 +8,9 @@
- 'tools/agents/**'
workflow_dispatch:

permissions:
contents: read

jobs:
validate-agent-wrappers:
runs-on: windows-latest
Copilot is powered by AI and may make mistakes. Always verify output.
@QilongTang QilongTang committed this autofix suggestion 4 months ago.

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.

Applied the suggested fix

Copilot AI 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.

Pull request overview

This PR formalizes .agents/ as the canonical source of agent skills/guidance and adds automation to keep GitHub Copilot agent wrapper files in .github/agents/ synchronized (and drift-checked in CI).

Changes:

  • Added a PowerShell script to generate and validate thin Copilot wrapper files from canonical .agents/skills/*/SKILL.md frontmatter.
  • Added a GitHub Actions workflow to enforce wrapper sync/drift checks on PRs that touch relevant agent guidance paths.
  • Updated agent guidance docs and refined the PR description + Jira ticket skill docs to reduce ambiguity and centralize template usage.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/agents/sync-agent-wrappers.ps1 Generates wrappers and supports -Check mode drift/orphan detection for .github/agents/.
.github/workflows/agent_wrapper_sync_check.yml Adds CI enforcement to ensure generated wrappers remain in sync on PRs.
.agents/skills/dynamo-pr-description/SKILL.md Clarifies PR template usage guidance and tightens wording around template adherence.
.agents/skills/dynamo-jira-ticket/template.md Refines the canonical Jira ticket template structure and sections.
.agents/skills/dynamo-jira-ticket/SKILL.md Points the skill to the canonical template.md and removes embedded template duplication.
.agents/README.md Documents the canonical policy, wrapper sync commands, and cross-tool parity matrix.

Comment thread tools/agents/sync-agent-wrappers.ps1 Outdated
Comment thread .agents/skills/dynamo-jira-ticket/template.md
Comment thread tools/agents/sync-agent-wrappers.ps1 Outdated
QilongTang and others added 4 commits March 12, 2026 18:05
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@kalunkuo kalunkuo 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.

This is awesome!! a good way to in sync without duplicating content @QilongTang 🚀 👀 . We should set it up in other repos too.

In the future if we end up having many skills across repos, it might be interesting to set up auto-discovery.

@QilongTang
QilongTang merged commit 2d7aebc into master Mar 13, 2026
25 of 27 checks passed
@QilongTang
QilongTang deleted the ImproveAgentSync branch March 13, 2026 13:30
@sonarqubecloud

Copy link
Copy Markdown

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.

4 participants