Skip to content

Commit 93e2acd

Browse files
committed
refactor: clarify sync workflow and merge guidelines in documentation
1 parent 405ec3c commit 93e2acd

3 files changed

Lines changed: 25 additions & 16 deletions

File tree

.github/agents/sync-upstream.agent.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You synchronize this Equinor-aligned fork with the upstream `microsoft/power-pla
1313

1414
1. **Equinor content is sacred.** Sections, guardrails, references, and review records added for Equinor alignment must never be silently overwritten. When upstream changes a file that contains Equinor-specific content, merge intelligently — incorporate new upstream information while preserving Equinor additions.
1515

16-
2. **Context from history.** Always inspect `git log` for upstream commits to understand the *intent* behind changes, not just the diff. Commit messages, PR titles, and change patterns inform how to merge.
16+
2. **Context from history.** Always inspect `git log` for upstream commits to understand the _intent_ behind changes, not just the diff. Commit messages, PR titles, and change patterns inform how to merge.
1717

1818
3. **PR-based output.** All changes land on a `sync/upstream-YYYY-MM-DD` branch and are submitted as a pull request for human review. Never push directly to `main`.
1919

@@ -38,6 +38,7 @@ Read before starting any sync:
3838

3939
## Guardrails
4040

41+
- **Never create, push, or submit pull requests to the upstream `microsoft/power-platform-skills` repository.** All PRs target `origin` (the Equinor fork) only. This workflow is one-way: pull FROM upstream, PR into the fork's `main`.
4142
- Do not overwrite `docs/equinor-alignment/**` with upstream content.
4243
- Do not remove Equinor-specific sections from READMEs, AGENTS.md, shared docs, or scripts.
4344
- Do not merge upstream changes that introduce production-system interaction without flagging for owner review.

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ git log --oneline --no-merges $(git merge-base HEAD upstream/main)..upstream/mai
8484
git diff --name-status $(git merge-base HEAD upstream/main)..upstream/main -- plugins/
8585
```
8686

87-
Use the `sync-upstream` skill or the **Upstream Sync Agent** for guided PR-based synchronization. The workflow:
87+
Use the `sync-upstream` skill or the **Upstream Sync Agent** for guided PR-based synchronization. The workflow is **one-way** (pull FROM upstream, PR into the Equinor fork's `main`). Never create or submit pull requests to the upstream `microsoft/power-platform-skills` repository.
8888

8989
1. Creates a `sync/upstream-YYYY-MM-DD` branch
9090
2. Analyzes upstream git history for context
9191
3. Merges changes while preserving Equinor-specific content
9292
4. Triggers plugin re-reviews for affected reviewed plugins
93-
5. Opens a pull request for human review
93+
5. Opens a pull request on the Equinor fork for human review
9494

9595
## PR and Code Review
9696

.github/skills/sync-upstream/SKILL.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ model: opus
1111

1212
Synchronize changes from `microsoft/power-platform-skills` into this fork via a **pull request** on a dedicated sync branch. Never merge directly to `main`.
1313

14+
**Direction:** This workflow pulls FROM upstream INTO this fork. Never create, push, or submit pull requests TO the upstream `microsoft/power-platform-skills` repository. All PRs target `origin` (the Equinor fork) only.
15+
1416
Default to read-only discovery. Do not apply changes until the user approves the sync plan.
1517

1618
## Inputs
@@ -107,13 +109,13 @@ Also inspect shared dependencies: `shared/`, `scripts/`, `.claude-plugin/marketp
107109

108110
Classify every changed file into one of these categories:
109111

110-
| Category | Criteria | Action |
111-
| --- | --- | --- |
112-
| **Direct copy** | File has no Equinor-specific content and is fully upstream-owned | Copy from upstream |
113-
| **Intelligent merge** | File contains both upstream content and Equinor sections (READMEs, AGENTS.md, shared docs, workflows) | Merge preserving Equinor content |
114-
| **Equinor-only** | File is entirely Equinor-created (`docs/equinor-alignment/**`, review records, `.github/skills/`, `.github/agents/`) | Never overwrite — skip |
115-
| **Review required** | File contains scripts, hooks, `.mcp.json`, or production-interaction patterns | Defer until inspected |
116-
| **New file** | File does not exist locally | Copy from upstream (new content) |
112+
| Category | Criteria | Action |
113+
| --------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
114+
| **Direct copy** | File has no Equinor-specific content and is fully upstream-owned | Copy from upstream |
115+
| **Intelligent merge** | File contains both upstream content and Equinor sections (READMEs, AGENTS.md, shared docs, workflows) | Merge preserving Equinor content |
116+
| **Equinor-only** | File is entirely Equinor-created (`docs/equinor-alignment/**`, review records, `.github/skills/`, `.github/agents/`) | Never overwrite — skip |
117+
| **Review required** | File contains scripts, hooks, `.mcp.json`, or production-interaction patterns | Defer until inspected |
118+
| **New file** | File does not exist locally | Copy from upstream (new content) |
117119

118120
**Protected paths — never direct-copy without explicit approval:**
119121

@@ -141,6 +143,7 @@ git checkout upstream/main -- <path>
141143
For files requiring merge, follow this process:
142144

143145
1. **Read the upstream version:**
146+
144147
```bash
145148
git show upstream/main:<path>
146149
```
@@ -221,6 +224,7 @@ Merge strategy: direct-copy (<n>), intelligent-merge (<n>), deferred (<n>)"
221224
```
222225

223226
If the changeset is large, split into multiple commits by category:
227+
224228
- `sync: direct-copy upstream files` — for files taken as-is
225229
- `sync: merge upstream changes preserving Equinor content` — for intelligently merged files
226230
- `sync: update review records for affected plugins` — for review record updates
@@ -233,6 +237,8 @@ git push origin sync/upstream-$(date +%Y-%m-%d)
233237

234238
#### 5.3 Create Pull Request
235239

240+
The PR targets `origin` (the Equinor fork), merging the sync branch into `main`. Never target the upstream Microsoft repository.
241+
236242
```bash
237243
gh pr create \
238244
--base main \
@@ -291,17 +297,19 @@ To make future syncs easier, when adding Equinor-specific content to upstream fi
291297

292298
```markdown
293299
<!-- equinor-start: description of addition -->
300+
294301
Equinor-specific content here...
302+
295303
<!-- equinor-end -->
296304
```
297305

298306
This allows the sync workflow to reliably identify and preserve Equinor sections during intelligent merges.
299307

300308
## Naming Convention
301309

302-
| Pattern | Example |
303-
| --- | --- |
304-
| Branch | `sync/upstream-2026-05-28` |
305-
| Branch (same-day duplicate) | `sync/upstream-2026-05-28-2` |
306-
| Commit prefix | `sync:` |
307-
| PR title | `sync: upstream microsoft/power-platform-skills 2026-05-28` |
310+
| Pattern | Example |
311+
| --------------------------- | ----------------------------------------------------------- |
312+
| Branch | `sync/upstream-2026-05-28` |
313+
| Branch (same-day duplicate) | `sync/upstream-2026-05-28-2` |
314+
| Commit prefix | `sync:` |
315+
| PR title | `sync: upstream microsoft/power-platform-skills 2026-05-28` |

0 commit comments

Comments
 (0)