From 57086c6ae6d4a437189e509d69c68b80635a1aa2 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 8 Sep 2026 18:50:01 -0500 Subject: [PATCH] Import Postgres-Extensions/ai's shared CLAUDE.md into the dev-facing docs pgxntool-test already points its own CLAUDE.md at ../ai/CLAUDE.md (#77) for org-wide agent conventions (CI monitoring, multi-session hygiene, executable-bit safety, etc.) instead of duplicating them locally. pgxntool's own developer-facing .claude/CLAUDE.md had the same duplicated content and no reference to ../ai/ at all. The import goes in .claude/CLAUDE.md, not the top-level CLAUDE.md: the top-level file is explicitly for extension developers consuming pgxntool via git subtree, most of whom have no ../ai/ sibling checkout (or any relationship to the Postgres-Extensions org) and for whom the clone-if-missing fallback would be actively wrong advice. .claude/CLAUDE.md is pgxntool-developer-only and already excluded from distributions, so it's the file actually read by an audience with an ../ai/ sibling checkout available -- the pgxntool-test/pgxntool/ai worktree layout this org uses. The import path is ../../ai/CLAUDE.md rather than ../ai/CLAUDE.md since this file lives one directory deeper than pgxntool-test's own. The now-redundant "Multiple Concurrent Sessions" section is dropped in favor of ../ai/PR.md's equivalent "Multi-session / state-drift hygiene" section, and the CI Monitoring section is trimmed to just this repo pairing's own addition (dual-repo background monitoring) on top of ../ai/CLAUDE.md's general convention. Co-Authored-By: Claude Sonnet 5 --- .claude/CLAUDE.md | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index e2e74fe..5caf672 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -3,26 +3,24 @@ This file contains guidance for Claude Code when working in this repository. It is excluded from distributions via `.gitattributes export-ignore`. -## CI Monitoring After Every Push - -**REQUIRED**: After every `git push`, immediately start a background task to -monitor the CI run for that push. If you pushed to both pgxntool and -pgxntool-test, start a background task for each repo — do not monitor them -sequentially. - -Use `gh run watch` or poll with `gh run list` / `gh pr checks` in the -background task. Report failures to the user as soon as they are detected; -do not wait for all jobs to finish before reporting. +@../../ai/CLAUDE.md + +If that import didn't resolve (`../../ai/CLAUDE.md`, relative to this file, +doesn't exist locally — see https://github.com/Postgres-Extensions/ai), +clone it now per its own first instruction, then re-read it: run `git clone +https://github.com/Postgres-Extensions/ai.git ../ai` from this repo's root +(`pgxntool/`, not from inside `.claude/`) so `ai/` lands as a sibling of +`pgxntool/`. + +Also see the `ai/` repo's `PR.md` (`../ai/PR.md` from this repo's root) for +cross-repo conventions not restated below (CI monitoring's general +principle, multi-session PR-ownership hygiene, executable-bit safety, shell +script standards, etc.). This repo pairs with **pgxntool-test**, so the +section below is a deliberate addition specific to that pairing, on top of +those general conventions. -## Multiple Concurrent Sessions - -It is common to have multiple Claude Code sessions open simultaneously across -pgxntool and pgxntool-test. To avoid cross-session interference: - -**If you are asked to do something on an existing PR that you did not open or -are not already working on in this session, immediately ask for confirmation -before proceeding.** For example: "I see PR #32 exists. Were you asking me to -work on that, or did you mean to send this to a different session?" +## CI Monitoring After Every Push -This applies to: editing PR branches, pushing to them, closing/reopening them, -adding commits, modifying PR descriptions, or any other PR-level action. +Addition specific to this paired repo, on top of the general convention in +`../../ai/CLAUDE.md`: if you pushed to both pgxntool and pgxntool-test, +start a background task for each — do not monitor them sequentially.