agentleFS
DataDogDataDog/datadog-agent/.agents/skills/resolve-sync-conflict/SKILL.md

resolve-sync-conflict

Skill3.8k starsChanged 5 days agoApache-2.0View on GitHub

Resolve a merge conflict while importing public DataDog/datadog-agent main into internal ddoghq/datadog-agent main, when the hourly sync workflow failed and disabled itself. Prepares and verifies the resolution for a human to publish.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projectsWeek of Nov 22: 0 new projects
Oct 2026Nov 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about DataDog/datadog-agent

The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 54

Talked about on GitHub and Stack Overflow (54 times).

On GitHub · 46

41 more on GitHub

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use a ddoghq/datadog-agent clone, where the sync script and workflow live.

    line 22
  2. Distinctive:

    Do not replace whole files with either side unless you have checked all changes.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Resolve an internal main sync conflict

Ownership: maintained by @DataDog/agent-devx.

Internal main is a stable integration branch. The hourly workflow merges public main without rebasing or force-pushing existing internal history. On a conflict it leaves remote main unchanged, disables itself, and alerts #agent-devx-ops.

Prepare and verify the resolution; leave publication to the human. Do not run --continue without --dry-run, push, or enable the workflow yourself.

1. Start a fresh merge

Use a ddoghq/datadog-agent clone, where the sync script and workflow live; this public source repository only carries the shared skill. First check:

tools/ci/sync-public-main.sh --help

The help must describe merging, not rebasing. If it still describes a rebase, stop: the merge-based sync implementation must land internally before using this procedure. Then run:

tools/ci/sync-public-main.sh --manual

Work in the printed worktree. Do not reuse a worktree prepared by the former rebase workflow: keep any valuable resolution notes, then start a fresh merge. The script stores the original and upstream SHAs in worktree-specific state.

2. Understand both sides

base=$(git merge-base refs/sync-public-main/origin refs/sync-public-main/upstream)
git diff "$base" refs/sync-public-main/origin -- <file>
git diff "$base" refs/sync-public-main/upstream -- <file>

During this merge, ours is internal and theirs is public upstream. Resolve hunk by hunk, preserving internal adaptations and upstream changes. Do not replace whole files with either side unless you have checked all changes. Retain internal CI identities and the public Go module/import paths. If upstream removed or moved edited code, follow the new structure and explain the resolution.

The script regenerates CODEOWNERS from upstream with the internal team/handle mapping only when the old internal file exactly matches that rewrite at the merge base. It also rewrites clean upstream additions. If internal CODEOWNERS has custom rules, resolve it manually and preserve them. If a new personal handle has no mapping, ask for its internal account and update CODEOWNERS_RULE before regenerating; do not silently publish public personal handles.

Scan newly imported CI configuration for new public repository identity references that Git merged cleanly. Retain public Go imports, documentation links, dependency repositories, and explicit public-source remotes. Explain any additional internal identity rewrites in the hand-over.

3. Finish the merge

git diff --check
git add <resolved-files>       # or git rm for accepted deletions
git merge --continue

To abandon this attempt: git merge --abort. Never rebase, reset, squash, or force-push internal main to resolve the sync.

4. Verify

tools/ci/sync-public-main.sh --continue --dry-run
git show --stat HEAD
git diff refs/sync-public-main/origin HEAD   # changes introduced into internal main

The dry run checks that both the original internal tip and the captured public tip remain ancestors and that the working tree is clean. Run checks appropriate to the resolved files. Report each resolution and any additional identity rewrites.

5. Hand over publication

Provide these commands to the human, leaving the worktree in place:

tools/ci/sync-public-main.sh --continue --workdir <worktree>
git worktree remove <worktree>

The first command performs a normal push and re-enables the workflow. If internal main advanced meanwhile and the push is rejected, start a fresh --manual merge from the updated main and reapply the reviewed resolution. Never force the push.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.