Skip to content

Commit 4e247eb

Browse files
authored
Add AGENTS.md, skills page, and refcache skill (#9706)
1 parent 5c73793 commit 4e247eb

6 files changed

Lines changed: 135 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
name: resolve-refcache-conflicts
3+
description:
4+
Skill for resolving static/refcache.json merge or rebase conflicts in the
5+
current branch or a specified PR.
6+
argument-hint: '[optional-pr-number]'
7+
---
8+
9+
`static/refcache.json` is an auto-generated file. Resolving conflicts requires
10+
first taking the integration branch's side, finishing the merge/rebase, then
11+
running `npm run fix:refcache` to restore any URLs unique to the active branch.
12+
13+
## Prerequisites
14+
15+
If the current branch has a merge or rebase in progress, then skip the rest of
16+
this section and jump to **Preparation**.
17+
18+
The current branch must be clean (`git status --short`). If not clean, offer to
19+
run `git stash` or `git commit` to clean it up, or stop.
20+
21+
If `$ARGUMENTS` is a PR number, then check out the PR branch with:
22+
`gh pr checkout $ARGUMENTS`.
23+
24+
## Preparation
25+
26+
At this point, we are ready to resolve the conflicts in the active branch:
27+
28+
1. Determine the integration reference (`$BASE_BRANCH`) and fetch it:
29+
- If an `upstream` remote exists: `git fetch upstream`, use `upstream/main`.
30+
- Otherwise: `git fetch origin`, use `origin/main`.
31+
32+
2. If merge or rebase is in progress (`git status`), skip this step. Otherwise,
33+
ask the user whether to run `git merge $BASE_BRANCH` or
34+
`git rebase $BASE_BRANCH`, then run it.
35+
36+
3. If there are no conflicts: stop, we are done.
37+
38+
4. Conflicts other than `static/refcache.json`: resolve them with the user.
39+
40+
5. If no `static/refcache.json` conflict remains: stop, we are done. Otherwise,
41+
proceed to **Resolve**.
42+
43+
## Resolve
44+
45+
1. Check out the `$BASE_BRANCH` version of `static/refcache.json`. Assumes the
46+
active branch is being rebased/merged from `$BASE_BRANCH`, not the other way
47+
around:
48+
49+
| Operation | Command |
50+
| ------------------------------------------- | -------------------------------------------- |
51+
| Rebase of active branch onto `$BASE_BRANCH` | `git checkout --ours static/refcache.json` |
52+
| Merge of `$BASE_BRANCH` into active branch | `git checkout --theirs static/refcache.json` |
53+
54+
2. Stage the resolved files, then continue:
55+
- Rebase: `git add static/refcache.json && git rebase --continue`
56+
- Merge: `git add static/refcache.json && git commit --no-edit`
57+
- If other files were resolved in Preparation step 4, `git add` those too
58+
before continuing.
59+
60+
3. Rebase only: for each subsequent rebase stop that conflicts on
61+
`static/refcache.json`, repeat Resolve steps 1–2. If other paths are also
62+
conflicted on that stop, run Preparation step 4 first.
63+
64+
4. Run `npm run fix:refcache` once, after the entire rebase/merge completes.
65+
Note: this runs a full Hugo build and link check — requires network,
66+
installed npm dependencies, and populated submodules; can take several
67+
minutes.
68+
69+
5. Commit the changes, if any:
70+
71+
```sh
72+
git add static/refcache.json
73+
git diff --cached --quiet static/refcache.json || \
74+
git commit -m "Refresh refcache after resolving conflicts"
75+
```
76+
77+
6. Push:
78+
- Merge: `git push`
79+
- Rebase: `git push --force-with-lease`

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# cSpell:ignore worktrees
2+
3+
/.claude/worktrees
4+
15
# Hugo-generated assets
26
.hugo_build.lock
37
/public

AGENTS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# AGENTS.md — OpenTelemetry.io guide for AI agents
2+
3+
Maintainer-focused documentation for **building, testing, and deploying this
4+
website** is the [**Site** section][content/en/site/].
5+
6+
Treat that tree as the primary reference for site tooling, CI, and conventions.
7+
Start at [content/en/site/][]. Useful subsections:
8+
9+
- [Build][] — npm scripts, workflows, patches, localization
10+
- [Testing][]
11+
- [Design][]
12+
- [Skills][]
13+
14+
The **Docsy** theme is a git submodule. For theme-specific agent notes, see
15+
[themes/docsy/AGENTS.md](themes/docsy/AGENTS.md).
16+
17+
Repo-wide contribution context: [CONTRIBUTING.md](CONTRIBUTING.md),
18+
[README.md](README.md).
19+
20+
[content/en/site/]: content/en/site/_index.md
21+
[Build]: content/en/site/build/_index.md
22+
[Testing]: content/en/site/testing/_index.md
23+
[Design]: content/en/site/design/_index.md
24+
[Skills]: content/en/site/skills.md

content/en/site/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Tentatively planned content organization:
2525
purpose, ownership, and overall status.
2626
- **Needs, requirements, and features** — Stakeholder needs, requirements, and
2727
other relevant information broken down into features.
28+
- [**Skills**](./skills/) — Skills for agents and humans to use when maintaining
29+
the site.
2830
- **Design** — Architectural design, Information Architecture (IA), layout, UX
2931
choices, theme related decisions, and other design-level artifacts.
3032
- **Implementation** — Code-level structure and conventions, Hugo/Docsy

content/en/site/skills.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Skills for agents and maintainers
3+
linkTitle: Skills
4+
description: Skills for agents and maintainers to use when maintaining the site.
5+
weight: 22
6+
---
7+
8+
Source: [`.claude/skills/`][] - links use the **upstream** repository and
9+
**`main`**; the same paths apply in any clone (including forks on another
10+
default branch).
11+
12+
- [`/resolve-refcache-conflicts <optional-pr-number>`][resolve-refcache-conflicts]:
13+
resolve `static/refcache.json` merge/rebase conflicts.
14+
15+
[`.claude/skills/`]:
16+
https://github.com/open-telemetry/opentelemetry.io/tree/main/.claude/skills
17+
[resolve-refcache-conflicts]:
18+
https://github.com/open-telemetry/opentelemetry.io/blob/main/.claude/skills/resolve-refcache-conflicts/SKILL.md

static/refcache.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15299,6 +15299,10 @@
1529915299
"StatusCode": 206,
1530015300
"LastSeen": "2026-04-10T10:01:49.139856918Z"
1530115301
},
15302+
"https://github.com/open-telemetry/opentelemetry.io/blob/main/.claude/skills/resolve-refcache-conflicts/SKILL.md": {
15303+
"StatusCode": 206,
15304+
"LastSeen": "2026-04-20T20:54:18.265886-04:00"
15305+
},
1530215306
"https://github.com/open-telemetry/opentelemetry.io/blob/main/.cspell.yml": {
1530315307
"StatusCode": 206,
1530415308
"LastSeen": "2026-04-10T09:58:01.148862206Z"
@@ -15507,6 +15511,10 @@
1550715511
"StatusCode": 206,
1550815512
"LastSeen": "2026-03-24T09:53:38.909114584Z"
1550915513
},
15514+
"https://github.com/open-telemetry/opentelemetry.io/tree/main/.claude/skills": {
15515+
"StatusCode": 206,
15516+
"LastSeen": "2026-04-20T20:54:16.690618-04:00"
15517+
},
1551015518
"https://github.com/open-telemetry/opentelemetry.io/tree/main/.github": {
1551115519
"StatusCode": 206,
1551215520
"LastSeen": "2026-04-10T10:03:33.402863208Z"

0 commit comments

Comments
 (0)