Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .rulesync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,21 @@ Quick-reference for all AI agent commands, skills, sub-agents, and rules availab

## Planning and Analysis

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

## Prompt Hygiene

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

## Memory

Expand Down Expand Up @@ -144,12 +146,14 @@ Skills load on-demand when invoked. All skills are invoked via `/skill-name`. Al
| 🔵 `git-split` | Split large files preserving git history |
| 🔵 `git-worktree-clean` | Hard-reset worktree to `origin/latest` |
| 🔵 `jira` | Create, estimate, or analyse JIRA tickets |
| 🔵 `nx-performance` | Nx monorepo performance diagnostics and optimization |
| 🔵 `plan-implementation-review` | Review plan execution, identify delivery gaps |
| 🔵 `plan-review` | Review plans for completeness and correctness |
| 🔵 `pr-create` | Commit, push, and open a PR |
| 🔵 `pr-review` | Review a PR (Markdown default, JSON with `--json`) |
| 🔵 `pr-split` | Split a branch into stacked PRs |
| 🔵 `recall` | Load branch context, browse project memories |
| 🔵 `reflect` | Self-reflection and meta-cognitive analysis |
| 🔵 `remember` | Save branch context or project learnings as memory |
| 🔵 `rulesync` | Configure AI/agentic tooling via `.rulesync/` |
| 🔵 `sync-ag-shared` | Sync ag-shared subrepo changes across AG repos |
Expand Down
1 change: 1 addition & 0 deletions .rulesync/skills/nx-performance
1 change: 1 addition & 0 deletions .rulesync/skills/reflect
2 changes: 1 addition & 1 deletion external/ag-shared/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/ag-grid/ag-shared.git
branch = latest
commit = 8ba8e8e436eed4992181a97843b045a0c5249aef
commit = 2459687b24688dc840629ad808471e7ad7945a8f
parent = d0d058059e38acc51bd4484e3861c57d6cada8b7
method = rebase
cmdver = 0.4.9
19 changes: 19 additions & 0 deletions external/ag-shared/docs/SYNC-LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ Newest entries first. Generated by `/ag-shared-sync-log`.

---

## 2026-03-17 -- Migrate nx-performance skill to ag-shared

**Branch:** `latest`

### Changes

- **[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
- **[prompts/skills]** Skill structure: `SKILL.md` + `references/` subdirectory with `caching-strategy.md`, `build-and-dev.md`, `ci-patterns.md`, `gotchas.md`

### Migration Actions

- [ ] ag-charts: Replace `.rulesync/skills/nx-performance/` directory with symlink → `../../external/ag-shared/prompts/skills/nx-performance/`
- [ ] ag-grid: Add `.rulesync/skills/nx-performance` symlink → `../../external/ag-shared/prompts/skills/nx-performance/`
- [ ] ag-studio: Add `.rulesync/skills/nx-performance` symlink → `../../external/ag-shared/prompts/skills/nx-performance/`
- [ ] Run `./external/ag-shared/scripts/setup-prompts/setup-prompts.sh`
- [ ] Run `./external/ag-shared/scripts/setup-prompts/verify-rulesync.sh`

---

## 2026-03-12 -- Context optimisation, plunker multi-product, symlinked repo support

**Branch:** `latest`
Expand Down
95 changes: 92 additions & 3 deletions external/ag-shared/github/actions/codex-pr-review/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,93 @@ runs:
echo "prompt_file=${prompt_file}" >> $GITHUB_OUTPUT
echo "output_ext=${output_ext}" >> $GITHUB_OUTPUT

- name: Generate PR Diff Context
if: steps.check-auth.outputs.skipped != 'true'
id: diff-context
shell: bash
env:
PR_NUMBER: ${{ inputs.pr-number }}
BASE_REF: ${{ inputs.base-ref }}
HEAD_REF: ${{ inputs.head-ref }}
PR_TITLE: ${{ inputs.pr-title }}
PR_AUTHOR: ${{ inputs.pr-author }}
ARGUMENTS: ${{ inputs.inline-comments == 'true' && format('--json {0}', inputs.pr-number) || inputs.pr-number }}
GH_TOKEN: ${{ inputs.github-token }}
run: |
# Pre-generate the diff and metadata so Codex doesn't need to exec git commands.
# This avoids sandbox (bwrap) issues on GitHub Actions runners.
context_file=".codex-diff-context-${PR_NUMBER}.md"
diff_file=".codex-diff-${PR_NUMBER}.patch"
echo "context_file=${context_file}" >> $GITHUB_OUTPUT
echo "diff_file=${diff_file}" >> $GITHUB_OUTPUT

PR_REF="origin/pr/${PR_NUMBER}"
DIFF_BASE="origin/${BASE_REF}...${PR_REF}"
HEAD_SHA=$(git rev-parse "${PR_REF}")
PR_URL="https://github.com/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"

# Fill in missing metadata (e.g. workflow_dispatch doesn't have PR event context)
if [ -z "${PR_TITLE}" ] || [ -z "${PR_AUTHOR}" ] || [ -z "${HEAD_REF}" ]; then
PR_META=$(gh pr view "${PR_NUMBER}" --json title,author,headRefName 2>/dev/null || echo '{}')
[ -z "${PR_TITLE}" ] && PR_TITLE=$(echo "${PR_META}" | jq -r '.title // empty')
[ -z "${PR_AUTHOR}" ] && PR_AUTHOR=$(echo "${PR_META}" | jq -r '.author.login // empty')
[ -z "${HEAD_REF}" ] && HEAD_REF=$(echo "${PR_META}" | jq -r '.headRefName // empty')
fi

# Collect diff stats
FILES_CHANGED=$(git diff --name-only "${DIFF_BASE}" | wc -l | tr -d ' ')
DIFF_STAT=$(git diff --stat "${DIFF_BASE}")
LINES_ADDED=$(git diff --numstat "${DIFF_BASE}" | awk '{ s += $1 } END { print s+0 }')
LINES_REMOVED=$(git diff --numstat "${DIFF_BASE}" | awk '{ s += $2 } END { print s+0 }')

# Write the raw diff to a standalone file (avoids Markdown escaping issues)
git diff "${DIFF_BASE}" > "${diff_file}"

# Build the context file (metadata only, no embedded diff).
# Uses printf instead of a heredoc to keep content indented within the
# YAML block scalar — unindented heredoc lines break GitHub Actions' YAML parser.
COMMIT_MSGS=$(git log --format="%s" "origin/${BASE_REF}..${PR_REF}")
printf '%s\n' \
"" \
"## Pre-generated PR Context" \
"" \
"The PR diff and metadata have been pre-generated and are provided below." \
"**Do NOT run any git, gh, or shell commands.** Analyse the diff below directly." \
"" \
"### Arguments" \
"" \
"ARGUMENTS: ${ARGUMENTS}" \
"" \
"### PR Metadata" \
"- **PR Number:** ${PR_NUMBER}" \
"- **PR Title:** ${PR_TITLE}" \
"- **PR URL:** ${PR_URL}" \
"- **Author:** ${PR_AUTHOR}" \
"- **Base Branch:** ${BASE_REF}" \
"- **Head Branch:** ${HEAD_REF}" \
"- **Head SHA:** ${HEAD_SHA}" \
"- **Files Changed:** ${FILES_CHANGED}" \
"- **Lines Added:** ${LINES_ADDED}" \
"- **Lines Removed:** ${LINES_REMOVED}" \
"" \
"### Diff Stats" \
'```' \
"${DIFF_STAT}" \
'```' \
"" \
"### Commit Messages" \
'```' \
"${COMMIT_MSGS}" \
'```' \
"" \
"### Full Diff" \
"" \
"Everything below this line is the raw unified diff for this PR." \
"---" \
> "${context_file}"

echo "Generated context ($(wc -c < "${context_file}") bytes) + diff ($(wc -c < "${diff_file}") bytes)"

- name: Run Codex Review
if: steps.check-auth.outputs.skipped != 'true'
id: codex
Expand All @@ -306,15 +393,17 @@ runs:
# Output file paths (unique per PR to avoid conflicts)
output_file=".codex-review-${{ inputs.pr-number }}.${{ steps.prompt.outputs.output_ext }}"
error_file=".codex-error-${{ inputs.pr-number }}.log"
context_file="${{ steps.diff-context.outputs.context_file }}"
diff_file="${{ steps.diff-context.outputs.diff_file }}"

echo "output_file=${output_file}" >> $GITHUB_OUTPUT

# Run Codex with ALL output suppressed
# - stdin: Prompt file content piped in
# - stdin: Review instructions + metadata context + raw diff (three files concatenated)
# - stdout (>/dev/null): Suppresses reasoning/streaming output
# - stderr (2>file): Captured to file for debugging, not logged
set +e
cat "${{ steps.prompt.outputs.prompt_file }}" | codex exec \
cat "${{ steps.prompt.outputs.prompt_file }}" "${context_file}" "${diff_file}" | codex exec \
--output-last-message "${output_file}" \
--sandbox read-only \
2>"${error_file}" \
Expand Down Expand Up @@ -672,4 +761,4 @@ runs:
if: always()
shell: bash
run: |
rm -f ".codex-review-${{ inputs.pr-number }}.md" ".codex-review-${{ inputs.pr-number }}.json" ".codex-error-${{ inputs.pr-number }}.log"
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"
15 changes: 15 additions & 0 deletions external/ag-shared/prompts/skills/jira/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ context: fork

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

## Step 0: Verify Atlassian MCP Connection

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:

**Hard stop.** Output the following and do not proceed:

```
Cannot proceed — Atlassian MCP is not connected.

This skill requires the Atlassian MCP server to interact with JIRA.
Please ensure the MCP connection is configured and active, then retry.
```

Do not attempt to work around the missing connection or produce partial results.

## Product Detection

Detect the product from the repository context:
Expand Down
Loading
Loading