Skip to content

Commit 9cddca7

Browse files
authored
Merge pull request ag-grid#13321 from ag-grid/sync/sync-ag-shared
Sync ag-shared from ag-charts sync-ag-shared
2 parents e76e090 + 9d20f31 commit 9cddca7

17 files changed

Lines changed: 1376 additions & 19 deletions

File tree

.rulesync/README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,21 @@ Quick-reference for all AI agent commands, skills, sub-agents, and rules availab
5555

5656
## Planning and Analysis
5757

58-
| Type | Name | Invoke | What it does |
59-
| ----- | ------------------------------- | ------------------------------------ | ------------------------------------------------ |
60-
| Skill | 🔵 `plan-review` | `/plan-review` (user) | Review plans for completeness and correctness |
61-
| Skill | 🔵 `plan-implementation-review` | `/plan-implementation-review` (user) | Review plan execution, identify delivery gaps |
62-
| Skill | 🔵 `jira` | `/jira` | Create, estimate, or analyse JIRA tickets |
63-
| Agent | 🔵 `nx-expert` | Auto | Nx monorepo configuration and build optimisation |
58+
| Type | Name | Invoke | What it does |
59+
| ----- | ------------------------------- | ------------------------------------ | ---------------------------------------------------- |
60+
| Skill | 🔵 `jira` | `/jira` | Create, estimate, or analyse JIRA tickets |
61+
| Skill | 🔵 `nx-performance` | `/nx-performance` | Nx monorepo performance diagnostics and optimization |
62+
| Skill | 🔵 `plan-implementation-review` | `/plan-implementation-review` (user) | Review plan execution, identify delivery gaps |
63+
| Skill | 🔵 `plan-review` | `/plan-review` (user) | Review plans for completeness and correctness |
64+
| Agent | 🔵 `nx-expert` | Auto | Nx monorepo configuration and build optimisation |
6465

6566
## Prompt Hygiene
6667

6768
| Type | Name | Invoke | What it does |
6869
| ----- | --------------------- | -------------------------- | ------------------------------------------------ |
69-
| Skill | 🔵 `validate-prompts` | `/validate-prompts` (user) | Validate prompt file references for path hygiene |
70+
| Skill | 🔵 `reflect` | `/reflect` (user) | Self-reflection and meta-cognitive analysis |
7071
| Skill | 🔵 `rulesync` | `/rulesync` | Configure AI/agentic tooling via `.rulesync/` |
72+
| Skill | 🔵 `validate-prompts` | `/validate-prompts` (user) | Validate prompt file references for path hygiene |
7173

7274
## Memory
7375

@@ -144,12 +146,14 @@ Skills load on-demand when invoked. All skills are invoked via `/skill-name`. Al
144146
| 🔵 `git-split` | Split large files preserving git history |
145147
| 🔵 `git-worktree-clean` | Hard-reset worktree to `origin/latest` |
146148
| 🔵 `jira` | Create, estimate, or analyse JIRA tickets |
149+
| 🔵 `nx-performance` | Nx monorepo performance diagnostics and optimization |
147150
| 🔵 `plan-implementation-review` | Review plan execution, identify delivery gaps |
148151
| 🔵 `plan-review` | Review plans for completeness and correctness |
149152
| 🔵 `pr-create` | Commit, push, and open a PR |
150153
| 🔵 `pr-review` | Review a PR (Markdown default, JSON with `--json`) |
151154
| 🔵 `pr-split` | Split a branch into stacked PRs |
152155
| 🔵 `recall` | Load branch context, browse project memories |
156+
| 🔵 `reflect` | Self-reflection and meta-cognitive analysis |
153157
| 🔵 `remember` | Save branch context or project learnings as memory |
154158
| 🔵 `rulesync` | Configure AI/agentic tooling via `.rulesync/` |
155159
| 🔵 `sync-ag-shared` | Sync ag-shared subrepo changes across AG repos |

.rulesync/skills/nx-performance

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../external/ag-shared/prompts/skills/nx-performance/

.rulesync/skills/reflect

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../external/ag-shared/prompts/skills/reflect/

external/ag-shared/.gitrepo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[subrepo]
77
remote = https://github.com/ag-grid/ag-shared.git
88
branch = latest
9-
commit = 8ba8e8e436eed4992181a97843b045a0c5249aef
9+
commit = 2459687b24688dc840629ad808471e7ad7945a8f
1010
parent = d0d058059e38acc51bd4484e3861c57d6cada8b7
1111
method = rebase
1212
cmdver = 0.4.9

external/ag-shared/docs/SYNC-LOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ Newest entries first. Generated by `/ag-shared-sync-log`.
66

77
---
88

9+
## 2026-03-17 -- Migrate nx-performance skill to ag-shared
10+
11+
**Branch:** `latest`
12+
13+
### Changes
14+
15+
- **[prompts/skills]** Migrated `nx-performance` skill from ag-charts-local to ag-shared — generalized AG Charts-specific language to "AG product monorepos" while preserving concrete examples
16+
- **[prompts/skills]** Skill structure: `SKILL.md` + `references/` subdirectory with `caching-strategy.md`, `build-and-dev.md`, `ci-patterns.md`, `gotchas.md`
17+
18+
### Migration Actions
19+
20+
- [ ] ag-charts: Replace `.rulesync/skills/nx-performance/` directory with symlink → `../../external/ag-shared/prompts/skills/nx-performance/`
21+
- [ ] ag-grid: Add `.rulesync/skills/nx-performance` symlink → `../../external/ag-shared/prompts/skills/nx-performance/`
22+
- [ ] ag-studio: Add `.rulesync/skills/nx-performance` symlink → `../../external/ag-shared/prompts/skills/nx-performance/`
23+
- [ ] Run `./external/ag-shared/scripts/setup-prompts/setup-prompts.sh`
24+
- [ ] Run `./external/ag-shared/scripts/setup-prompts/verify-rulesync.sh`
25+
26+
---
27+
928
## 2026-03-12 -- Context optimisation, plunker multi-product, symlinked repo support
1029

1130
**Branch:** `latest`

external/ag-shared/github/actions/codex-pr-review/action.yml

Lines changed: 92 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,93 @@ runs:
288288
echo "prompt_file=${prompt_file}" >> $GITHUB_OUTPUT
289289
echo "output_ext=${output_ext}" >> $GITHUB_OUTPUT
290290
291+
- name: Generate PR Diff Context
292+
if: steps.check-auth.outputs.skipped != 'true'
293+
id: diff-context
294+
shell: bash
295+
env:
296+
PR_NUMBER: ${{ inputs.pr-number }}
297+
BASE_REF: ${{ inputs.base-ref }}
298+
HEAD_REF: ${{ inputs.head-ref }}
299+
PR_TITLE: ${{ inputs.pr-title }}
300+
PR_AUTHOR: ${{ inputs.pr-author }}
301+
ARGUMENTS: ${{ inputs.inline-comments == 'true' && format('--json {0}', inputs.pr-number) || inputs.pr-number }}
302+
GH_TOKEN: ${{ inputs.github-token }}
303+
run: |
304+
# Pre-generate the diff and metadata so Codex doesn't need to exec git commands.
305+
# This avoids sandbox (bwrap) issues on GitHub Actions runners.
306+
context_file=".codex-diff-context-${PR_NUMBER}.md"
307+
diff_file=".codex-diff-${PR_NUMBER}.patch"
308+
echo "context_file=${context_file}" >> $GITHUB_OUTPUT
309+
echo "diff_file=${diff_file}" >> $GITHUB_OUTPUT
310+
311+
PR_REF="origin/pr/${PR_NUMBER}"
312+
DIFF_BASE="origin/${BASE_REF}...${PR_REF}"
313+
HEAD_SHA=$(git rev-parse "${PR_REF}")
314+
PR_URL="https://github.com/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"
315+
316+
# Fill in missing metadata (e.g. workflow_dispatch doesn't have PR event context)
317+
if [ -z "${PR_TITLE}" ] || [ -z "${PR_AUTHOR}" ] || [ -z "${HEAD_REF}" ]; then
318+
PR_META=$(gh pr view "${PR_NUMBER}" --json title,author,headRefName 2>/dev/null || echo '{}')
319+
[ -z "${PR_TITLE}" ] && PR_TITLE=$(echo "${PR_META}" | jq -r '.title // empty')
320+
[ -z "${PR_AUTHOR}" ] && PR_AUTHOR=$(echo "${PR_META}" | jq -r '.author.login // empty')
321+
[ -z "${HEAD_REF}" ] && HEAD_REF=$(echo "${PR_META}" | jq -r '.headRefName // empty')
322+
fi
323+
324+
# Collect diff stats
325+
FILES_CHANGED=$(git diff --name-only "${DIFF_BASE}" | wc -l | tr -d ' ')
326+
DIFF_STAT=$(git diff --stat "${DIFF_BASE}")
327+
LINES_ADDED=$(git diff --numstat "${DIFF_BASE}" | awk '{ s += $1 } END { print s+0 }')
328+
LINES_REMOVED=$(git diff --numstat "${DIFF_BASE}" | awk '{ s += $2 } END { print s+0 }')
329+
330+
# Write the raw diff to a standalone file (avoids Markdown escaping issues)
331+
git diff "${DIFF_BASE}" > "${diff_file}"
332+
333+
# Build the context file (metadata only, no embedded diff).
334+
# Uses printf instead of a heredoc to keep content indented within the
335+
# YAML block scalar — unindented heredoc lines break GitHub Actions' YAML parser.
336+
COMMIT_MSGS=$(git log --format="%s" "origin/${BASE_REF}..${PR_REF}")
337+
printf '%s\n' \
338+
"" \
339+
"## Pre-generated PR Context" \
340+
"" \
341+
"The PR diff and metadata have been pre-generated and are provided below." \
342+
"**Do NOT run any git, gh, or shell commands.** Analyse the diff below directly." \
343+
"" \
344+
"### Arguments" \
345+
"" \
346+
"ARGUMENTS: ${ARGUMENTS}" \
347+
"" \
348+
"### PR Metadata" \
349+
"- **PR Number:** ${PR_NUMBER}" \
350+
"- **PR Title:** ${PR_TITLE}" \
351+
"- **PR URL:** ${PR_URL}" \
352+
"- **Author:** ${PR_AUTHOR}" \
353+
"- **Base Branch:** ${BASE_REF}" \
354+
"- **Head Branch:** ${HEAD_REF}" \
355+
"- **Head SHA:** ${HEAD_SHA}" \
356+
"- **Files Changed:** ${FILES_CHANGED}" \
357+
"- **Lines Added:** ${LINES_ADDED}" \
358+
"- **Lines Removed:** ${LINES_REMOVED}" \
359+
"" \
360+
"### Diff Stats" \
361+
'```' \
362+
"${DIFF_STAT}" \
363+
'```' \
364+
"" \
365+
"### Commit Messages" \
366+
'```' \
367+
"${COMMIT_MSGS}" \
368+
'```' \
369+
"" \
370+
"### Full Diff" \
371+
"" \
372+
"Everything below this line is the raw unified diff for this PR." \
373+
"---" \
374+
> "${context_file}"
375+
376+
echo "Generated context ($(wc -c < "${context_file}") bytes) + diff ($(wc -c < "${diff_file}") bytes)"
377+
291378
- name: Run Codex Review
292379
if: steps.check-auth.outputs.skipped != 'true'
293380
id: codex
@@ -306,15 +393,17 @@ runs:
306393
# Output file paths (unique per PR to avoid conflicts)
307394
output_file=".codex-review-${{ inputs.pr-number }}.${{ steps.prompt.outputs.output_ext }}"
308395
error_file=".codex-error-${{ inputs.pr-number }}.log"
396+
context_file="${{ steps.diff-context.outputs.context_file }}"
397+
diff_file="${{ steps.diff-context.outputs.diff_file }}"
309398
310399
echo "output_file=${output_file}" >> $GITHUB_OUTPUT
311400
312401
# Run Codex with ALL output suppressed
313-
# - stdin: Prompt file content piped in
402+
# - stdin: Review instructions + metadata context + raw diff (three files concatenated)
314403
# - stdout (>/dev/null): Suppresses reasoning/streaming output
315404
# - stderr (2>file): Captured to file for debugging, not logged
316405
set +e
317-
cat "${{ steps.prompt.outputs.prompt_file }}" | codex exec \
406+
cat "${{ steps.prompt.outputs.prompt_file }}" "${context_file}" "${diff_file}" | codex exec \
318407
--output-last-message "${output_file}" \
319408
--sandbox read-only \
320409
2>"${error_file}" \
@@ -672,4 +761,4 @@ runs:
672761
if: always()
673762
shell: bash
674763
run: |
675-
rm -f ".codex-review-${{ inputs.pr-number }}.md" ".codex-review-${{ inputs.pr-number }}.json" ".codex-error-${{ inputs.pr-number }}.log"
764+
rm -f ".codex-review-${{ inputs.pr-number }}.md" ".codex-review-${{ inputs.pr-number }}.json" ".codex-error-${{ inputs.pr-number }}.log" ".codex-diff-context-${{ inputs.pr-number }}.md" ".codex-diff-${{ inputs.pr-number }}.patch"

external/ag-shared/prompts/skills/jira/SKILL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ context: fork
2323

2424
Unified skill for creating, estimating, and analysing JIRA tickets across AG products.
2525

26+
## Step 0: Verify Atlassian MCP Connection
27+
28+
Before doing anything else, verify the Atlassian MCP is available by calling `mcp__atlassian__atlassianUserInfo`. If the tool is not available, returns an error, or the MCP server is not connected:
29+
30+
**Hard stop.** Output the following and do not proceed:
31+
32+
```
33+
Cannot proceed — Atlassian MCP is not connected.
34+
35+
This skill requires the Atlassian MCP server to interact with JIRA.
36+
Please ensure the MCP connection is configured and active, then retry.
37+
```
38+
39+
Do not attempt to work around the missing connection or produce partial results.
40+
2641
## Product Detection
2742

2843
Detect the product from the repository context:

0 commit comments

Comments
 (0)